/* HERO SLIDER STYLES */
.hero-slider {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

/* 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;
    transition: opacity 1s ease-in-out;
}

.hero-slide--active {
    opacity: 1;
}

/* Media (Video/Image) */
.hero-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.7); /* Darkens the media */
}

/* Slide Overlay - Positioned above pagination */
.hero-overlay {
    position: absolute;
    bottom: 100px; /* Position above pagination bar */
    left: 0;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0 2rem;
    z-index: 5;
}

.hero-content {
    text-align: center;
    color: white;
    max-width: 950px;
    height: 300px;
    width: 100%;
    background-color: var(--color-overlay);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 2rem 3rem;
    border: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.8s ease-out 0.2s both;
}

/* Updated CTA - Normal text with arrow */
.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    animation: slideUp 0.8s ease-out 0.4s both;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    position: relative;
}

.hero-cta:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

/* Arrow icon */
.hero-cta::after {
    content: '→';
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.hero-cta:hover::after {
    transform: translateX(3px);
}


/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-overlay {
        bottom: 10px;
        padding: 0 1rem;
    }
    
    .hero-content {
        padding: 1.5rem 2rem;
    }
    
    .hero-title {
        margin-top: 2rem;
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-cta {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-overlay {
        bottom: 90px;
    }
    
    .hero-content {
        padding: 1rem 1.5rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
}

/* Controls Container */
.hero-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 10;
}

/* Pagination Container - No background */
.hero-pagination-container {
    position: relative;
    z-index: 4;
    padding: 2rem 0;
}

.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 450px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 0.5rem 1.5rem;
}

/* Progress Bars Pagination */
.pagination-bars {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    margin-right: 2rem;
    max-width: 350px;
}

.pagination-bar {
    flex: 1;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.pagination-bar:hover {
    background: rgba(255, 255, 255, 0.5);
}

.pagination-bar.active {
    background: rgba(255, 255, 255, 0.6);
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: white;
    border-radius: 2px;
    transition: width 0.1s linear;
}

.pagination-bar.active .progress-fill {
    width: 100%;
    animation: progressFill 5s linear forwards;
}

/* Play/Pause Toggle */
.play-pause-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.play-pause-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
    transform: scale(1.1);
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes progressFill {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}

/* WHO WE ARE GSAP SCROLL SECTION - FIXED */
.who-we-are-gsap { 
    background: var(--color-primary); 
    color: var(--color-text-inverse); 
    position: relative;
    overflow: hidden;
    text-align: center;
}

.who-we-are-title{
    font-size: var(--font-size-xl);
    color: var(--color-secondary);
    /* margin-top: 13rem; */
    margin-bottom: 2rem;
}

.scroll-part {
    display: flex;
    align-items: center;
    position: relative;
}

/* Text Trio - START VISIBLE */
.text-trio {
    padding: var(--spacing-xl) 0;
    height: 100vh;
    position: relative;
    z-index: 10;
}

.text-item {
    text-align: center;
}

.text-item h2 {
    font-size: 8rem;
    font-weight:800;
    color: var(--color-secondary);
    margin-bottom: -3rem;
}

/* Initial positions for text */
.text-top { transform: translateX(800px); }
.text-middle { transform: translateX(-800px); }
.text-bottom { transform: translateX(800px); }

/* CONTAINER FOR THE PINNED SEQUENCE - FIXED OVERLAP */
.picture-sequence {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  height: 100vh;
  margin-top: -90vh; /* This makes it overlap the text trio */
  pointer-events: none;
}

/* Picture stack - NATURAL FLOW */
.picture-stack {
  width: 100%;
  position: relative;
}

/* each slide fills one viewport height - NATURAL POSITIONING */
.picture-item {
  height: 10vh;
  display: flex;
  align-items: center;
  position: relative;
  box-sizing: border-box;
  /* Start all pictures BELOW the viewport */
  transform: translateY(60vh);
}

/* Lanes: left or right alignment */
.lane-left {
  justify-content: flex-start;
  padding-left: 10rem;
}

.lane-right {
  justify-content: flex-end;
  padding-right: 20rem;
}

.lane-left .picture-card,
.lane-right .picture-card {
  margin: 0;
}

/* Card look and sizing */
.picture-card {
  display: block;
  width: auto;
  height: auto;
  overflow: hidden;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* image styling */
.picture-img {
  width: 400px;
  height: 230px;
  object-fit: cover;
  display: block;
  transform: translateY(0);
  will-change: transform, opacity;
  border-radius: 15px;
}

/* Final content styles */

.final-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  opacity: 0; /* Start hidden */
  position: relative;
  margin-top: -20rem;
  pointer-events: auto;
}

.final-content {
  text-align: center;
  max-width: 800px;
  padding: 2rem;
  pointer-events: auto;
}

/* Line-by-line animation */
.line-by-line {
  font-size: var(--font-size-4xl);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 3rem;
}

.line {
  display: block;
  color: var(--color-text-muted); /* Start gray */
  position: relative;
  overflow: hidden;
}

.line::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  color: var(--color-text-inverse); /* End white */
  overflow: hidden;
  white-space: nowrap;
  transition: width 1.2s cubic-bezier(0.65, 0, 0.35, 1);
}

/* Border-only CTA */
.final-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  border: 2px solid var(--color-secondary);
  background: transparent;
  color: var(--color-secondary);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: var(--font-size-lg);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 3000;
  pointer-events: auto; 
}

.final-cta:hover {
  background: var(--color-secondary);
  color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.final-cta svg {
  transition: transform 0.3s ease;
}

.final-cta:hover svg {
  transform: translateX(4px);
}

/* Mobile */
/* Mobile - Who We Are Section */
@media (max-width: 768px) {
    .who-we-are-title {
        font-size: var(--font-size-lg);
        margin-bottom: 3rem;
        margin-top: -20rem; /* Add top spacing */
    }
    
    .text-trio {
        padding: var(--spacing-md) 0;
        height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .text-item {
        margin-bottom: var(--spacing-sm); /* Add space between text items */
    }
    
    .text-item h2 {
        font-size: 2rem; /* Much smaller for mobile */
        font-weight: 800;
        color: var(--color-secondary);
        margin-bottom: 0; /* Remove negative margin */
        line-height: 1;
    }
    
    /* Reduce slide distances for mobile */
    .text-top { transform: translateX(200px); }
    .text-middle { transform: translateX(-200px); }
    .text-bottom { transform: translateX(200px); }
    
    .picture-sequence {
        margin-top: -100vh;
        height: 100vh;
    }
    
    .picture-item {
        height: 15vh; /* Taller for mobile */
        transform: translateY(50vh); /* Start higher */
    }
    
    .lane-left {
        justify-content: center;
        padding-left: 1rem;
    }
    
    .lane-right {
        justify-content: center;
        padding-right: 1rem;
    }
    
    .picture-img {
        width: 300px; /* Smaller images for mobile */
        height: 180px;
    }
    
    .final-slide {
        margin-top: -10rem; /* Less negative margin */
    }
    
    .final-content {
        padding: 1rem;
        max-width: 90%;
    }
    
    .line-by-line {
        font-size: var(--font-size-2xl);
        margin-bottom: 2rem;
    }
    
    .final-cta {
        padding: 0.75rem 1.5rem;
        font-size: var(--font-size-base);
    }
}


/* Features Section */
.home-features {
    background: var(--color-surface);
    padding: var(--spacing-2xl) 0;
}

.features-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--spacing-2xl);
}

.features-subtitle {
    display: block;
    font-size: var(--font-size-lg);
    color: var(--color-text-light);
    font-weight: 800;
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
    letter-spacing: 0.1em;
}

.features-title {
    font-size: var(--font-size-4xl);
    font-weight: 900;
    color: var(--color-text);
    margin-top: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    line-height: 1.5;
}

.features-description {
    font-size: var(--font-size-xl);
    color: var(--color-text-light);
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
}

.features-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    border: 2px solid var(--color-accent);
    background: transparent;
    color: var(--color-accent);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: var(--font-size-lg);
    transition: var(--transition-normal);
}

.features-cta:hover {
    background: var(--color-accent);
    color: var(--color-background);
    transform: translateY(-2px);
}

/* Masonry Grid */
.features-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-auto-rows: 200px;
    grid-gap: var(--spacing-lg);
    grid-auto-flow: dense;
}

.masonry-item {
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

.masonry-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.masonry-item--wide {
    grid-column: span 2;
}

.masonry-item--tall {
    grid-row: span 2;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .features-title {
        font-size: var(--font-size-3xl);
    }
    
    .features-masonry {
        grid-template-columns: 1fr;
        grid-auto-rows: 250px;
    }
    
    .masonry-item--wide,
    .masonry-item--tall {
        grid-column: span 1;
        grid-row: span 1;
    }
}

/* Impact Section */
.impact-section {
    background: var(--color-surface);
    padding: var(--spacing-2xl) 0;
    position: relative;
    overflow: hidden;
}

.impact-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* Massive Title */
.impact-title {
    font-size: 7rem;
    font-weight: 900;
    color: var(--color-text-light);
    text-align: center;
    line-height: 1;
    margin: 0;
    padding: var(--spacing-2xl) 0;
    position: relative;
    z-index: 1;
}

/* Huge Card */
.impact-card {
    background: var(--color-text-light);
    border-top-right-radius: var(--radius-xl);
    border-top-left-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 7rem;
    height: 100vh;
    margin: 0 auto; /* Remove the negative margin */
    margin-bottom: -15rem;
    position: relative;
    z-index: 2;
    y: 100vh; /* Start much lower - 1.5 viewports down */
}

.card-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: var(--spacing-2xl);
    align-items: center;
    margin-right: 3rem;
    margin-left: -2rem;
}

.card-text {
    padding-right: var(--spacing-xl);
    margin-bottom: 7rem;
}

.card-large-text {
    font-size: 4rem;
    color: var(--color-light);
    margin-bottom: var(--spacing-lg);
    line-height: 1.2;
    font-weight: 800;
}

.card-small-text {
    font-size: var(--font-size-lg);
    color: var(--color-background);
    margin-bottom: var(--spacing-xl);
    line-height: 1.6;
}

.card-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    border: 2px solid var(--color-light);
    background: transparent;
    color: var(--color-background);
    text-decoration: none;
    border-radius: 20px;
    font-weight: 600;
    font-size: var(--font-size-lg);
    transition: var(--transition-normal);
}

.card-cta:hover {
    background: var(--color-accent);
    color: var(--color-background);
    transform: translateY(-2px);
}

.card-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 75vh;
    width: 500px;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mobile Responsive */
/* Mobile - Impact Section */
@media (max-width: 768px) {
    .impact-section {
        padding: var(--spacing-xl) 0;
        overflow: hidden;
    }
    
    .impact-container {
        padding: 0;
        max-width: none;
    }
    
    .impact-title {
        font-size: 3rem; /* Much smaller */
        font-weight: 900;
        line-height: 1.1;
        padding: var(--spacing-xl) 0 var(--spacing-lg);
    }
    
    .impact-card {
        width: 100vw; /* Full viewport width */
        margin-left: calc(-50vw + 50%); /* Center it properly */
        border-top-left-radius: 1rem; /* Remove rounded corners for full width */
        border-top-right-radius: 1rem;
        padding: var(--spacing-lg);
    }
    
    .card-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        margin: 0; /* Remove negative margins */
        text-align: center;
    }
    
    .card-text {
        padding-right: 0;
        margin-bottom: var(--spacing-lg);
        order: 2; /* Move text below image on mobile */
    }
    
    .card-large-text {
        color: var(--color-light);
        line-height: 1.3;
        margin-bottom: var(--spacing-sm);
        font-weight: 800;
    }
    
    .card-small-text {
        font-size: 0.8rem;
        color: var(--color-background);
        margin-bottom: var(--spacing-lg);
    }
    
    .card-image {
        order: 1; /* Move image above text on mobile */
        height: 450px;
        width: 100%; /* Full width */
        margin: 0 auto;
    }
    
    .card-cta {
        padding: var(--spacing-sm) var(--spacing-lg);
        font-size: 1rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .text-item h2 {
        font-size: 2.5rem;
    }
    
    .impact-title {
        font-size: 2.5rem;
    }
    
    .card-large-text {
        font-size: var(--font-size-xl);
    }
    
    .picture-img {
        width: 250px;
        height: 150px;
    }
}