/* ============================================
   AUTO-ROTATING HERO BANNER
   Modern, Responsive, SEO-Friendly
   ============================================ */


/* CSS Variables for Easy Customization */

:root {
    /* Colors */
    --primary-color: rgb(47, 62, 0);
    --primary-hover: rgb(114, 151, 1);
    --secondary-color: #7c3aed;
    --text-light: #ffffff;
    --text-dark: #1f2937;
    --overlay-dark: rgba(0, 0, 0, 0.4);
    --overlay-gradient: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 100%);
    /* Timing */
    --slide-duration: 6000ms;
    --transition-speed: 600ms;
    /* Spacing */
    --content-max-width: 1400px;
    --section-padding: 2rem;
    /* Typography */
    --font-family: 'Avenir Next', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --title-size-desktop: 3.5rem;
    --title-size-tablet: 2.5rem;
    --title-size-mobile: 2rem;
    --desc-size-desktop: 1.25rem;
    --desc-size-mobile: 1rem;
}


/* Reset & Base Styles */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-dark);
}


/* ============================================
   HERO BANNER CONTAINER
   ============================================ */

.hero-banner {
    position: relative;
    width: 100%;
    height: 640px;
    min-height: 600px;
    max-height: 900px;
    overflow: hidden;
    background-color: #0f172a;
}


/* ============================================
   SLIDES CONTAINER
   ============================================ */

.hero-slides {
    position: relative;
    width: 100%;
    height: 100%;
}


/* ============================================
   INDIVIDUAL SLIDE
   ============================================ */

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-speed) ease-in-out, visibility var(--transition-speed) ease-in-out;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}


/* ============================================
   SLIDE BACKGROUND IMAGE
   ============================================ */

.slide-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.slide-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.1);
    transition: transform 8000ms ease-out;
}

.hero-slide.active .slide-background img {
    transform: scale(1);
}


/* ============================================
   SLIDE OVERLAY
   ============================================ */

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-gradient);
    z-index: 2;
}


/* ============================================
   SLIDE CONTENT - CSS GRID LAYOUT
   ============================================ */

.slide-content {
    position: relative;
    z-index: 3;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    padding: var(--section-padding);
}

.content-grid {
    display: grid;
    grid-template-columns: 5fr 4fr;
    /* Text gets slightly more space (55% / 45%) */
    gap: 5rem;
    align-items: center;
    max-width: var(--content-max-width);
    width: 100%;
    margin: 0 auto;
    padding: 0 3rem;
}


/* ============================================
   TEXT CONTENT (LEFT SIDE)
   ============================================ */

.text-content {
    color: var(--text-light);
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity var(--transition-speed) ease-out 200ms, transform var(--transition-speed) ease-out 200ms;
    padding-right: 1rem;
}

.hero-slide.active .text-content {
    opacity: 1;
    transform: translateX(0);
}


/* Optional label/tag above title */

.text-content::before {
    content: attr(data-label);
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 0px;
    font-size: 0.8rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
}

.slide-title {
    font-size: var(--title-size-desktop);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    /* text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); */
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.85) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.slide-description {
    font-size: var(--desc-size-desktop);
    line-height: 1.7;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    max-width: 520px;
    color: rgba(255, 255, 255, 0.92);
}


/* ============================================
   CTA BUTTON
   ============================================ */

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 0px;
    transition: all 300ms ease;
    box-shadow: 0 4px 15px rgba(52, 104, 1, 0.5);
}

.cta-button:hover {
    background: var(--primary-hover);
    color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(136, 235, 37, 0.5);
}

a.cta-button:hover {
    color: var(--text-light) !important;
}

.cta-button:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.cta-icon {
    width: 20px;
    height: 20px;
    transition: transform 300ms ease;
}

.cta-button:hover .cta-icon {
    transform: translateX(4px);
}


/* ============================================
   FEATURED IMAGE (RIGHT SIDE)
   ============================================ */

.featured-image {
    position: relative;
    opacity: 0;
    transform: translateX(60px);
    transition: opacity var(--transition-speed) ease-out 400ms, transform var(--transition-speed) ease-out 400ms;
    display: flex;
    justify-content: flex-end;
    /* Align image to the right */
}

.hero-slide.active .featured-image {
    opacity: 1;
    transform: translateX(0);
}


/* Decorative frame behind the image */

.featured-image::before {
    content: '';
    position: absolute;
    top: 20px;
    right: -20px;
    width: 100%;
    max-width: 480px;
    height: calc(100% - 20px);
    border: 0px solid var(--secondary-color);
    border-radius: 0px;
    z-index: -1;
    opacity: 0.6;
}

.featured-image img {
    width: 100%;
    max-width: 480px;
    height: auto;
    border-radius: 0px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
    display: block;
    transition: transform 400ms ease, box-shadow 400ms ease;
}


/* Subtle hover effect on the featured image */

.hero-slide.active .featured-image:hover img {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 35px 60px -15px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.15);
}


/* ============================================
   NAVIGATION CONTROLS
   ============================================ */

.hero-navigation {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    padding: 0rem 2rem 2rem;
}


/* ============================================
   PROGRESS BAR
   ============================================ */

.progress-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
}

.progress-bar {
    height: 100%;
    width: 0%;
    /* background: var(--primary-color); */
    background: #1F2622;
    transition: width 100ms linear;
}

.hero-banner:hover .progress-bar {
    animation-play-state: paused;
}


/* ============================================
   SLIDE INDICATORS / LABELS
   ============================================ */

.slide-indicators {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    max-width: var(--content-max-width);
    margin: 0 auto;
    flex-wrap: wrap;
}

.indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    /* border: 2px solid rgba(255, 255, 255, 0.3); */
    border-radius: 0px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 300ms ease;
    position: relative;
    overflow: hidden;
}

.indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background: var(--primary-color); */
    /* border: 2px solid rgba(78, 78, 78, 0.3); */
    opacity: 0;
    transition: opacity 300ms ease;
    z-index: -1;
}

.indicator:hover {
    /* border-color: rgba(255, 255, 255, 0.6); */
    color: rgba(255, 255, 255, 0.9);
}

.indicator.active {
    /* border-color: var(--primary-color); */
    border-top: 3px solid rgba(143, 192, 0, 1);
    width: 20%;
    color: #ffffff;
}

.indicator.active::before {
    opacity: 1;
}

.indicator:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.indicator-label {
    white-space: nowrap;
}


/* ============================================
   ARROW NAVIGATION
   ============================================ */

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 300ms ease;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.nav-arrow svg {
    width: 24px;
    height: 24px;
}

.nav-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-50%) scale(1.1);
}

.nav-arrow:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.nav-prev {
    left: 2rem;
}

.nav-next {
    right: 2rem;
}


/* ============================================
   AUTOPLAY TOGGLE
   ============================================ */

.autoplay-toggle {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 300ms ease;
    backdrop-filter: blur(10px);
    z-index: 10;
    display: none;
    /* Hidden by default, shown on larger screens */
}

.autoplay-toggle svg {
    width: 18px;
    height: 18px;
}

.autoplay-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
}

.autoplay-toggle:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}


/* ============================================
   RESPONSIVE DESIGN
   ============================================ */


/* Large Tablet (max-width: 1024px) */

@media (max-width: 1024px) {
    .hero-banner {
        min-height: 700px;
    }
    .content-grid {
        grid-template-columns: 1fr 1fr;
        /* Keep side-by-side on tablet */
        gap: 3rem;
        padding: 0 2rem;
    }
    .slide-title {
        font-size: var(--title-size-tablet);
    }
    .slide-description {
        font-size: 1.1rem;
    }
    .featured-image img {
        max-width: 380px;
    }
    .featured-image::before {
        max-width: 380px;
        right: -15px;
    }
    .nav-arrow {
        display: none;
    }
    .slide-indicators {
        gap: 0.4rem;
    }
    .indicator {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
}


/* Small Tablet (max-width: 768px) - Stack layout */

@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }
    .text-content {
        order: 1;
        padding-right: 0;
    }
    .featured-image {
        order: 2;
        justify-content: center;
    }
    .slide-description {
        margin-left: auto;
        margin-right: auto;
    }
    .featured-image::before {
        display: none;
        /* Hide decorative frame on mobile */
    }
}


/* Mobile (max-width: 640px) */

@media (max-width: 640px) {
    .hero-banner {
        min-height: 600px;
        max-height: none;
    }
    .slide-content {
        padding: 1.5rem;
        align-items: flex-start;
        padding-top: 4rem;
    }
    .content-grid {
        gap: 2rem;
        padding: 0;
    }
    .text-content::before {
        font-size: 0.7rem;
        padding: 0.3rem 0.8rem;
        margin-bottom: 1rem;
    }
    .slide-title {
        font-size: var(--title-size-mobile);
        margin-bottom: 1rem;
    }
    .slide-description {
        font-size: var(--desc-size-mobile);
        margin-bottom: 1.5rem;
    }
    .cta-button {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    .featured-image img {
        max-width: 280px;
        border-radius: 12px;
    }
    .hero-navigation {
        padding: 0rem 1rem 1.5rem;
    }
    .slide-indicators {
        gap: 0.3rem;
    }
    .indicator {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        border-width: 1.5px;
    }
    .indicator.active {
        width: auto !important;
    }
    .autoplay-toggle {
        bottom: 5.5rem;
        right: 1rem;
        width: 38px;
        height: 38px;
    }
}


/* Small Mobile (max-width: 400px) */

@media (max-width: 400px) {
    .slide-indicators {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    .indicator {
        width: 100%;
    }
    .indicator.active {
        width: auto !important;
    }
    .indicator-label {
        font-size: 0.75rem;
        white-space: wrap;
    }
}


/* ============================================
   ACCESSIBILITY - Reduced Motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .slide-background img {
        transform: scale(1);
    }
}


/* ============================================
   HIGH CONTRAST MODE
   ============================================ */

@media (prefers-contrast: high) {
    .slide-overlay {
        background: rgba(0, 0, 0, 0.7);
    }
    .cta-button {
        border: 2px solid #fff;
    }
    .indicator {
        border-width: 3px;
    }
}


/* ============================================
   KEYBOARD NAVIGATION INDICATOR
   ============================================ */

.keyboard-navigation .hero-slide:focus {
    outline: 3px solid #fff;
    outline-offset: -3px;
}