/* ===================================
   Hero Slider Styles
   =================================== */

   :root {
    /* Carousel content width variables (inspired by NVIDIA) */
    --carousel-item-fixed-width-desktop: 500px;
    --carousel-item-fixed-width-firstitem-desktop: 500px;
    --carousel-item-fixed-width-mobile: calc(100vw - 90px);
    --carousel-fixed-width-spacer: calc(50vw - 645px);
    
    /* Hero slider max dimensions */
    --hero-max-height: 650px; /* Adjustable max height for large screens */
    --hero-max-width: 1800px; /* Match image width */
}

/* Scoped to hero slider only - no global resets */

/* ===================================
   Hero Slider Container
   =================================== */

.hero-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    max-height: var(--hero-max-height); /* Constrain height on large screens */
    min-height: 500px;
    overflow: hidden;
    background: #000;
    margin: 0 auto;
}

/* ===================================
   Slider Wrapper
   =================================== */

.slider-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

/* ===================================
   Individual Slide
   =================================== */

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
    z-index: 1;
}

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

/* ===================================
   Slide Background
   =================================== */

   .slide-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: #000; /* Black background for large screens */
}

.slide-image {
    max-width: 1800px;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    margin: 0 auto; /* Add this to center the image */
    display: block; /* Add this to ensure margin auto works */
}

.slide-overlay {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.0) 50%
    );
    z-index: 2;
}

/* Hide mobile image on desktop */
.slide-image-mobile {
    display: none;
}



/* ===================================
   Slide Content
   =================================== */

   .slide-content {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    padding-bottom: 60px; /* breathing room above pagination */
    height: 100%;
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding-inline: 120px;
}

.content-container {
    max-width: var(--carousel-item-fixed-width-desktop);
    width: 50%;
    margin-left: 0;
    animation: slideInUp 0.8s ease-out;

    /* Add these */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
 Content Elements
 =================================== */
 .slide-category {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: clamp(.9rem, 0.57rem + 1.81vw, 1.7rem); /* 16px → 30px */
  line-height: 1.3;
  color: var(--color-white);
}

.slide-title {
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: clamp(1.5rem, 0.68rem + 3.44vw, 2.7rem); /* 24px → 45px */
  line-height: 1.15;
  color: var(--color-white);
}

.slide-text {
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: clamp(0.938rem, 0.64rem + 1.25vw, 1.1rem); /* 15px → 20px */
  line-height: 1.6;
  color: var(--color-white);
}
  
  


.desktop-lang-icons {
    margin-left: 0;
    margin-bottom: 2rem;
}
.mobile-lang-icons {
    display: none;
    margin-left: 0;
    margin-bottom: 2rem;
}
.inline-links {
    display: inline-flex;
}
.inline-links a {
    margin-right: 50px;
}
.slide-cta {
    display: inline-block;
    font-family: "Inter", sans-serif;
    font-weight: 600;
    font-size: clamp(0.875rem, 0.63rem + 1.03vw, 1rem); /* 14px → 18px */
    line-height: 1.4;
    text-decoration: underline;
    color: var(--color-white);
    border-radius: 0.25rem;
    transition: background 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
}


/* 
.slide-cta:active {
    transform: translateY(0);
} */

/* ===================================
   Enhanced Pagination with Preview Cards
   =================================== */

   .slider-pagination-enhanced {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    display: flex;
    flex-direction: column; /* stack progress bars above cards */
    gap: 0;
    z-index: 10;
    background: transparent;
}
/* THIS is your overlay */
.slider-pagination-enhanced::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.8),   /* test red first */
        rgba(0, 0, 0, 0)
    );
    pointer-events: none;
    z-index: 1;
}
.pagination-cards-wrapper {
    max-width: 1500px;
    padding-inline: 120px;
    margin: 0 auto;
    display: flex;
    gap: 0;
    position: relative;
    z-index: 2;
}

.pagination-card {
    flex: 1;
    min-width: 0; /* Allow flex items to shrink below content size */
    padding: 1.5rem 1.5rem .75rem 0;
    transition: background 0.3s ease;
    position: relative;
    cursor: pointer;
}



.pagination-card:first-child {
    padding-left: 0;
}

.pagination-card:last-child {
    border-right: none;
    padding-right: 0
}

/* Progress Bar */
.progress-bars-wrapper {
    display: flex;
    width: 100%;
    max-width: 1500px;
    padding-inline: 120px; /* match pagination-cards-wrapper */
    margin: 0 auto;
    gap: 8px;
    position: relative;
    z-index: 5;
}

.progress-bars-wrapper .progress-bar {
    flex: 1;
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    overflow: hidden;
    position: relative; /* override the absolute positioning */
    top: auto;
    left: auto;
    right: auto;
}
.progress-fill {
    height: 100%;
    background: var(--color-underline-cta);
    width: 0%;
    transform-origin: left;
    transition: width 0.1s linear;
    margin-left: 0; /* Add this */
    float: left; /* Add this */
}


.pagination-card.active .progress-fill {
    animation: progressAnimation 9s linear forwards;
}

@keyframes progressAnimation {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}


.card-content {
    position: relative;
    z-index: 2;
}

.card-category {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #fff;
    margin-bottom: 0.5rem;
    text-transform: none;
}

.card-description {
    font-size: 0.875rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}



@media (max-width: 1440px) {
    :root {
        --hero-max-height: 800px;
    }
}


@media (max-width: 1024px) {
    :root {
        --hero-max-height: 70vh;
    }
    /* ===================================
       Slide Content
       =================================== */
       .slide-content {
        padding-inline: 20px;
    }
        /* Progress Bar */
    .progress-bars-wrapper {
        padding-inline: 20px;
    }
    /* ===================================
       Enhanced Pagination with Preview Cards
       =================================== */
       .pagination-cards-wrapper {
        padding-inline: 20px;
    }
}



@media (max-width: 768px) {
    .content-container {
        /* Use CSS custom properties for flexible width control */
        max-width: var(--carousel-item-fixed-width-desktop);
        width: 50%;
        /* Position in left half */
        margin-left: 0;
        animation: slideInUp 0.8s ease-out;
    }

    .desktop-lang-icons {
        display: none;
        margin-left: 0;
        margin-bottom: 2rem;
    }
    .mobile-lang-icons {
        display: block;
        margin-left: 0;
        margin-bottom: 2rem;
    }
    .card-description {
        display: none;
    }
}

@media (max-width: 576px) {
    :root {
        --hero-max-height: 80vh;
    }
    .slide-overlay {
        background: linear-gradient(
            to top,
            rgba(0, 0, 0, 1) 0%,
            rgba(0, 0, 0, 0.0) 60%
        );
    }
    /* .slide:nth-child(2) .slide-overlay {
        background: linear-gradient(5
            to top,
            rgba(0, 0, 0, 0.5) 0%,
            rgba(0, 0, 0, 0.2) 100%
        );
    } */
    .slide-content {
        align-items: flex-end;
    }
    .slide-video {
        display: none;
    }

    .slide-image-mobile {
        display: block;
    }

    .content-container {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }
    .slide-title {
        text-align: center;
    }
    .inline-links a:last-child {
        margin-right: 0px;
    }
      .slide-text {
        text-align: center;
      }
    .slide-cta {
        display: inline-block;
        font-family: "Inter", sans-serif;
        font-weight: 600;
        font-size: clamp(0.875rem, 0.63rem + 1.03vw, 1rem);
        line-height: 1.4;
        text-decoration: underline;
        color: var(--color-framed-cta);
        border-radius: 0.25rem;
        transition: background 0.3s ease, transform 0.2s ease;
        border: none;
        cursor: pointer;
    }

   /* Cards completely hidden on mobile */
   .pagination-cards-wrapper {
    display: none;
    }
    /* Progress bars always visible */
    .progress-bars-wrapper {
        padding: 30px 20px;
    }
}