/* Slider Styling */
#homepage-slider {
    margin-bottom: 2em;
    width: 100%;
    position: relative;
    overflow: hidden;
    background: #f4f4f4;
    border-radius: 4px;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 400px; /* Fixed height for consistency */
}

.slide {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.8s ease-in-out;
}

.slide.active {
    display: block;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Next & previous buttons */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0,0,0,0.3);
    text-decoration: none;
    z-index: 10;
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
    background-color: rgba(0,0,0,0.8);
}

/* Dots/indicators */
.slider-dots {
    position: absolute;
    bottom: 15px;
    width: 100%;
    text-align: center;
    z-index: 10;
}

.dot {
    cursor: pointer;
    height: 12px;
    width: 12px;
    margin: 0 5px;
    background-color: rgba(255,255,255,0.5);
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

.dot.active, .dot:hover {
    background-color: #f56a6a; /* Theme color */
}

@media screen and (max-width: 736px) {
    .slider-container {
        height: 250px;
    }
}

/* Linotext Font */
@font-face {
...    font-family: 'Linotext';
    src: url('assets/webfonts/Linotext.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

#banner .content h1 {
    font-family: 'Linotext', serif;
    font-weight: normal;
}

#banner .content header p {
    font-weight: bold;
    text-transform: uppercase;
}

/* Custom styles to fix WordPress menu display */
#sidebar nav#menu ul li ul {
    padding-left: 0.75em;
    margin-top: 0.25em;
    margin-bottom: 0.25em;
}

/* Ensure submenu expands when active */
#menu ul .opener.active + ul {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Automatic display of submenu when parent is current page */
#sidebar nav#menu ul li.current-menu-item > ul,
#sidebar nav#menu ul li.current-menu-parent > ul,
#sidebar nav#menu ul li.current-page-ancestor > ul,
#sidebar nav#menu ul li.current-menu-ancestor > ul {
    display: block !important;
}

/* Set cursor to pointer for opener class links */
#sidebar nav#menu ul li a.opener {
    cursor: pointer;
}

/* Banner layout fixes */
#banner {
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

#banner .content {
    flex: 3;
    padding-right: 2em;
}

#banner .image.object {
    flex: 2;
    max-width: 40%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#banner .image.object img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    max-height: 400px;
}

/* Responsive adjustments */
@media screen and (max-width: 736px) {
    #banner {
        flex-direction: column;
    }
    
    #banner .image.object {
        max-width: 100%;
        margin-top: 2em;
    }
}

/* Banner image styling */
#banner .image.object {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#banner .image.object img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    max-height: 100%;
}

.banner-featured-image {
    object-position: center;
}

/* Banner image fixes */
#banner {
    display: flex;
    flex-direction: row;
}

#banner .content {
    flex: 3;
}

#banner .image.object {
    flex: 2;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    height: auto;
}

.banner-image {
    object-fit: cover;
    width: 100%;
    height: auto;
    max-height: 400px;
}

/* Ensure the banner keeps its original layout on mobile */
@media screen and (max-width: 736px) {
    #banner {
        flex-direction: column;
    }
    
    #banner .image.object {
        margin-top: 1.5em;
    }
}

/* Slideshow plugin adjustments */
#banner .image.object .slideshow_container,
#banner .image.object .slideshow_view,
#banner .image.object .slideshow_slides {
    width: 100% !important;
    max-height: 400px !important;
}

#banner .image.object .slideshow_slide img {
    object-fit: cover;
    height: 100%;
    width: 100%;
}

/* General plugin container styles */
#banner .image.object > div {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
}

/* Responsive styles */
@media screen and (max-width: 736px) {
    #banner {
        flex-direction: column;
    }
    
    #banner .image.object {
        margin-top: 1.5em;
        width: 100%;
    }
}
