/* Remove outline on focus/active for better UX (optional, but use carefully) */
.flex-container a:active,
.flexslider a:active,
.flex-container a:focus,
.flexslider a:focus {
    outline: none;
}

/* Reset list styles */
.slides,
.flex-control-nav,
.flex-direction-nav {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Base flexslider container */
.flexslider {
    margin: 0;
    padding: 0;
    background: #fff;
    position: relative;
    /* Removed obsolete `zoom: 1` (IE6/7 hack) */
}

/* Box-sizing border-box for all children */
.flexslider,
.flexslider * {
    box-sizing: border-box;
}

/* Slides layout */
.flexslider .slides > li {
    display: none;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.flexslider .slides img {
    width: 100%;
    display: block;
    height: auto; /* Maintain aspect ratio */
}

/* Clearfix for slides container */
.slides::after {
    content: "";
    display: table;
    clear: both;
}

/* Fallback for no-js */
.no-js .slides > li:first-child {
    display: block;
}

/* Viewport with responsive heights */
/* .flex-viewport {
    height: 550px !important;
    transition: all 1s ease;
	background-size: cover;
	background-position: center center;
} */

.flex-viewport {
    width: 100% !important;
    aspect-ratio: 12 / 5 !important;
    /* 16:9 ratio (width:height) */
    /* or */
    /* aspect-ratio: 4 / 3 !important; */
    /* 4:3 ratio */
    transition: all 1s ease;
    background-size: cover;
    background-position: center center;
}

/* @media (max-width: 1024px) {
    .flex-viewport {
        height: 320px !important;
    }
}

@media (max-width: 767px) {
    .flex-viewport {
        height: 250px !important;
    }
}

@media (max-width: 480px) {
    .flex-viewport {
        height: 150px !important;
    }
} */

.loading .flex-viewport {
    max-height: 300px;
}

/* Slide links */
.flexslider .slides li a {
    display: block;
}

/* Direction navigation (prev/next arrows) */
.flex-direction-nav {
    /* Removed invalid `*height: 0` (IE hack) */
}

.flex-direction-nav a {
    width: 30px;
    height: 30px;
    margin-top: -15px; /* Center vertically: -height/2 */
    display: block;
    background: url(../images/bg_direction_nav.png) no-repeat 0 0;
    position: absolute;
    top: 50%;
    z-index: 10;
    cursor: pointer;
    text-indent: -9999px;
    opacity: 0.5;
    transition: all 0.3s ease;
    /* Ensure clickable area matches visible icon */
    overflow: hidden;
}

.flex-direction-nav .flex-next {
    background-position: right top;
    right: -36px;
}

.flex-direction-nav .flex-prev {
    left: -36px;
}

/* Show arrows on hover */
.flexslider:hover .flex-next {
    opacity: 0.8;
    right: 5px;
}

.flexslider:hover .flex-prev {
    opacity: 0.8;
    left: 5px;
}

.flexslider:hover .flex-next:hover,
.flexslider:hover .flex-prev:hover {
    opacity: 1;
}

.flex-direction-nav .flex-disabled {
    opacity: 0.3 !important;
    pointer-events: none; /* Better than cursor:default */
}

/* Control navigation (dots) */
.flex-control-nav {
    width: 100%;
    position: absolute;
    top: 5px;
    text-align: center;
}

.flex-control-nav li {
    margin: 0 6px;
    display: inline-block;
}

.flex-control-paging li a {
    width: 11px;
    height: 11px;
    display: block;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    text-indent: -9999px;
    border-radius: 50%; /* Use 50% instead of fixed 20px */
    box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3);
}

.flex-control-paging li a:hover {
    background: rgba(255, 255, 255, 0.7);
}

.flex-control-paging li .flex-active {
    background: rgba(255, 255, 255, 0.9);
    cursor: default;
}

/* Thumbnails (if used) */
.flex-control-thumbs {
    margin: 5px 0 0;
    position: static;
    overflow: hidden;
}

.flex-control-thumbs li {
    width: 25%;
    float: left;
    margin: 0;
}

.flex-control-thumbs img {
    width: 100%;
    display: block;
    opacity: 0.7;
    cursor: pointer;
}

.flex-control-thumbs img:hover {
    opacity: 1;
}

.flex-control-thumbs .flex-active {
    opacity: 1;
    cursor: default;
}

/* Caption styling */
.flex-caption {
    max-width: 70%;
    margin-top: 0;
    line-height: 1.2; /* Avoid fixed line-height in px */
    position: relative;
    display: inline-block;
    left: 0;
    top: 0;
    color: #28497A;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7); /* Softer, more readable */
    text-decoration: underline;
    font-size: 32px;
}

@media (max-width: 767px) {
    .flex-caption {
        font-size: 24px;
        margin-top: 10px;
        line-height: 1.3;
    }
}

/* Force arrows visible on small screens */
@media screen and (max-width: 860px) {
    .flex-direction-nav .flex-prev {
        opacity: 1;
        left: 0;
    }
    .flex-direction-nav .flex-next {
        opacity: 1;
        right: 0;
    }
}