/* ========================================
   1. RESET & GLOBAL VARIABLES
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brand Colors */
    --red: #D4272B;
    --black: #000000;
    --white: #FFFFFF;
    --cream: #FFEDD5;
    
    /* Grays */
    --grey-light: rgba(255, 255, 255, 0.7);
    --grey-1: #8D8D8D;
    --grey-2: #666666;
    --grey-3: #4C4C4C;
    --grey-text: #4E4E4E;
    --grey-line: #8D8D8D;

    /* Layout Config */
    --max-width: 1240px;
    --gutter: 24px; /* Mobile Padding */
}

@media (min-width: 768px) {
    :root { --gutter: 40px; }
}
@media (min-width: 1200px) {
    :root { --gutter: 60px; }
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--white);
    color: var(--black);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ========================================
   2. GLOBAL UTILITIES
======================================== */
.container {
    width: 100%;
    max-width: calc(var(--max-width) + (var(--gutter) * 2));
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
    position: relative;
}

/* Indentation Utility (Used in About Page) */
.offset-content {
    padding-left: 0;
}
@media (min-width: 1024px) {
    .offset-content { padding-left: 33%; }
}

/* Flex Helpers */
.row { display: flex; flex-wrap: wrap; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

/* Text Utilities */
.dot { color: var(--red); }


/* ========================================
   3. HEADER / NAV (Shared)
======================================== */
.hero-header {
    position: relative;
    z-index: 50;
    width: 100%;
    padding-top: 46px;
    padding-bottom: 20px;
}

.hero-header .container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.logo {
    height: 41px;
    width: auto;
}

.menu-toggle {
    position: absolute;
    right: var(--gutter);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    width: 28px;
    height: 2px;
    background-color: var(--black); /* Default to black for general pages */
    transition: all 0.3s ease;
}

.menu-toggle:hover span { background-color: var(--red); }

/* On the Home Hero (dark background), nav needs white lines */
.hero .menu-toggle span { background-color: var(--white); }

/* ========================================
   GLOBAL LAYOUT UTILITY: HERO OVERLAP
   Use this on ANY page to get the layout consistency.
======================================== */

/* 1. The Image Container (Aligns Right + Pulls content up) */
.hero-overlap-img {
    position: relative;
    z-index: 10; /* Keeps image on top */
    
    /* Alignment Logic */
    width: auto;
    max-width: none;
    margin-right: calc(50% - 50vw); /* Break out to right edge */
    margin-left: 0;
    margin-top: 40px;

    /* THE OVERLAP MATH: -350px */
    margin-bottom: -350px; 
}

.hero-overlap-img img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

/* 2. The Section Below (Padded to respect the overlap) */
.hero-overlap-section {
    position: relative;
    z-index: 1; /* Sits behind image */
    
    /* PADDING UPDATE: Increased from 450px to 600px */
    /* This pushes the "Branding" title down so it's not covered by the image */
    padding-top: 600px; 
    
    padding-bottom: 100px;
}

/* Mobile Reset remains the same */
@media (max-width: 768px) {
    .hero-overlap-section {
        padding-top: 60px;
    }
}

/* ========================================
   4. HOME PAGE STYLES
======================================== */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('https://fmmedia.syaf.org/images/impact-bg.png'); /* HTTPS Fixed */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.hero-body {
    position: relative;
    z-index: 10;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 200px;
}

/* Home Page Label */
.hero-label {
    /* CHANGED: Scales between 24px and 32px */
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800;
    line-height: 110%;
    margin-bottom: 8px;
}

/* About Page Label */
.label-about {
    font-weight: 800;
    /* CHANGED: Scales between 20px and 25px */
    font-size: clamp(20px, 2.5vw, 25px);
    text-decoration: underline;
    margin-bottom: 24px;
    display: block;
}
.hero-label .fm { color: var(--red); }
.hero-label .media { color: var(--white); }

.hero-headline {
    font-weight: 800;
    /* CHANGED: From fixed 80px to clamp (Max 70px) */
    font-size: clamp(40px, 5.5vw, 70px);
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--white);
}

.hero-subtext {
    font-size: 18px;
    font-weight: 400;
    line-height: 110%;
    color: var(--grey-light);
    max-width: 380px;
}

/* Home Interactive Elements */
.scroll-arrow {
    position: absolute;
    bottom: 220px;
    left: max(var(--gutter), calc((100vw - var(--max-width)) / 2 + var(--gutter)));
    z-index: 10;
    animation: bounce 2s infinite;
}
.scroll-arrow svg { width: 20px; height: 40px; stroke: var(--white); stroke-width: 2; fill: none; }

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(10px); }
    60% { transform: translateY(5px); }
}

.watch-video {
    position: absolute;
    bottom: 200px;
    right: max(var(--gutter), calc((100vw - var(--max-width)) / 2 + var(--gutter)));
    z-index: 10;
    width: 100px; height: 100px;
    cursor: pointer;
}
.watch-video-circle { position: relative; width: 100%; height: 100%; }
.watch-video-text { position: absolute; width: 100%; height: 100%; animation: rotate 10s linear infinite; }
.watch-video-text svg { width: 100%; height: 100%; }
.watch-video-text text { fill: var(--white); font-size: 11px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; }

@keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.play-button {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 50px; height: 50px; border: 2px solid var(--white); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; transition: all 0.3s ease;
}
.play-button svg { width: 16px; height: 16px; fill: var(--white); margin-left: 3px; }
.watch-video:hover .play-button { background-color: var(--red); border-color: var(--red); }

/* Service Cards */
.services-section { position: absolute; bottom: -100px; left: 0; right: 0; z-index: 20; }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-card {
    background-color: var(--grey-1); border-radius: 30px; padding: 32px;
    min-height: 200px; display: flex; flex-direction: column; transition: transform 0.3s ease;
}
.service-card:nth-child(2) { background-color: var(--grey-2); }
.service-card:nth-child(3) { background-color: var(--grey-3); }
.service-card:hover { transform: translateY(-5px); }
.service-card-title { font-size: 20px; font-weight: 800; line-height: 110%; color: var(--white); text-transform: uppercase; margin-bottom: 16px; }
.service-card-divider { width: 40px; height: 2px; background-color: var(--white); margin-bottom: 16px; }
.service-card-desc { font-size: 18px; font-weight: 400; line-height: 110%; color: var(--white); opacity: 0.8; }

/* White Section & Portfolio */
.white-section { background-color: var(--white); padding-top: 160px; padding-bottom: 60px; }
.discover-link-wrapper { text-align: center; padding: 60px 0; }
.discover-link {
    display: inline-flex; align-items: center; gap: 8px; color: var(--red);
    font-size: 18px; font-weight: 600; text-decoration: none; padding-bottom: 8px;
    border-bottom: 2px solid var(--red); transition: all 0.3s ease;
}
.discover-link:hover { gap: 12px; }
.discover-link svg { width: 20px; height: 20px; stroke: var(--red); stroke-width: 2; fill: none; }
.portfolio-title { font-size: 40px; font-weight: 800; line-height: 110%; color: var(--black); text-transform: uppercase; margin-bottom: 40px; }

.portfolio-cream-section { position: relative; background: linear-gradient(to bottom, var(--white) 225px, var(--cream) 225px); padding-bottom: 100px; }
.portfolio-carousel {
    display: flex; gap: 24px; overflow-x: auto;
    padding-left: max(var(--gutter), calc((100vw - var(--max-width)) / 2 + var(--gutter)));
    padding-right: var(--gutter); padding-bottom: 20px;
    scroll-snap-type: x mandatory; scrollbar-width: none; -ms-overflow-style: none;
}
.portfolio-carousel::-webkit-scrollbar { display: none; }
.portfolio-card { flex: 0 0 600px; height: 450px; overflow: hidden; position: relative; scroll-snap-align: start; cursor: pointer; }
.portfolio-card:last-child { margin-right: 100px; }
.portfolio-card-inner { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 24px 28px; }
.portfolio-card.yellow { background: linear-gradient(180deg, #F5A623 0%, #D4872B 100%); }
.portfolio-card.black { background-color: #000000; }
.portfolio-card.blue { background: linear-gradient(180deg, #2E7DD1 0%, #1A5FA8 100%); }
.portfolio-card-label, .portfolio-card-company { font-size: 20px; font-weight: 700; line-height: 110%; color: var(--white); text-transform: uppercase; }
.portfolio-card-image { flex: 1; display: flex; align-items: center; justify-content: center; padding: 20px 0; }
.portfolio-card-image .placeholder-logo { font-size: 48px; font-weight: 800; color: var(--white); text-align: center; line-height: 1.2; }
.portfolio-card-footer { display: flex; justify-content: space-between; align-items: flex-end; }
.portfolio-card-info { text-align: right; }
.portfolio-card-desc { font-size: 18px; font-weight: 400; line-height: 24px; color: var(--white); opacity: 0.8; margin-bottom: 8px; }
.portfolio-card-link { display: inline-flex; align-items: center; gap: 6px; color: var(--red); font-size: 16px; font-weight: 700; text-decoration: none; text-transform: uppercase; transition: gap 0.3s ease; }
.portfolio-card-link:hover { gap: 10px; }
.portfolio-card-link svg { width: 16px; height: 16px; stroke: var(--red); stroke-width: 2; fill: none; }
.portfolio-card.black .portfolio-card-link, .portfolio-card.blue .portfolio-card-link { color: var(--white); }
.portfolio-card.black .portfolio-card-link svg, .portfolio-card.blue .portfolio-card-link svg { stroke: var(--white); }

.cta-content { text-align: center; padding-top: 80px; }
.cta-headline { font-size: 64px; font-weight: 800; line-height: 110%; color: var(--black); margin-bottom: 40px; }
.cta-button { display: inline-block; background-color: var(--red); color: var(--white); font-size: 18px; font-weight: 600; text-decoration: none; padding: 16px 40px; border-radius: 50px; transition: all 0.3s ease; }
.cta-button:hover { background-color: #b81f23; transform: translateY(-2px); }


/* ========================================
   5. ABOUT PAGE STYLES
======================================== */
.hero-section {
    padding-bottom: 60px;
    position: relative;
    z-index: 2;
    margin-top: 100px; /* Added top margin */
}

.label-about {
    font-weight: 800; font-size: 25px; text-decoration: underline;
    margin-bottom: 24px; display: block;
}

.headline-hero {
    font-weight: 700;
    font-size: clamp(40px, 5.5vw, 70px); /* FIXED */
    line-height: 1.1;
    margin-bottom: 60px;
    max-width: 1070px;
}

/* Purpose Section */
.purpose-wrapper { position: relative; }
.bg-yellow-layer {
    position: absolute; top: 150px; bottom: 200px;
    left: 50%; transform: translateX(-50%); width: 100vw;
    background-color: var(--cream); z-index: 0;
}
.team-image-container {
    position: relative;
    z-index: 2;
    
    /* 1. Let the image grow beyond the old 1340px limit */
    max-width: none;
    width: auto;

    /* 2. The Magic Calculation:
       This calculates the distance from the container's edge to the 
       screen's edge and pulls the image all the way to the right. */
    margin-right: calc(50% - 50vw);

    /* 3. Ensure it aligns with the left side of the container */
    margin-left: 0;
}
.img-team { width: 100%; height: auto; aspect-ratio: 1340/509; object-fit: cover; display: block; }
.purpose-content { position: relative; z-index: 2; padding-top: 80px; }
.label-purpose { font-weight: 700; font-size: 25px; margin-bottom: 20px; }

/* Marquee */
.marquee-fullwidth {
    position: relative; width: 100vw; left: 50%; right: 50%;
    margin-left: -50vw; margin-right: -50vw; overflow: hidden;
    padding: 40px 0; z-index: 2;
}
.marquee-track { display: flex; width: max-content; animation: marquee 50s linear infinite; }
.marquee-item {
    font-weight: 800;
    /* CHANGED: Reduced max from 200px to 150px for better laptop viewing */
    font-size: clamp(60px, 12vw, 150px);
    line-height: 1.1;
    padding-right: 50px;
    white-space: nowrap;
}
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.desc-text {
    font-size: 18px; line-height: 1.5; max-width: 670px;
    margin-bottom: 80px; position: relative; z-index: 2;
}

/* Mosaic Grid */
.mosaic-grid {
    display: grid; grid-template-columns: 1fr;
    max-width: 1030px; margin: 0 auto 100px auto;
    position: relative; z-index: 3;
}
@media (min-width: 992px) { .mosaic-grid { grid-template-columns: 1fr 1fr; } }
.grid-left { background-color: var(--red); aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; }
.grid-right { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 1/1; }
.grid-box { display: flex; align-items: center; justify-content: center; font-size: clamp(16px, 1.5vw, 20px); font-weight: 500; }
.box-clarity { background: #D9D9D9; }
.box-collab { background: #111111; color: white; }
.box-purpose { background: #545454; color: white; }
.box-conn { background: #E6E6E6; }

/* Bottom Section */
.bottom-section { padding-bottom: 100px; }
.headline-homegrown {
    font-weight: 700;
    /* CHANGED: Max 70px to match the Hero */
    font-size: clamp(40px, 5.5vw, 70px);
    line-height: 1.1;
    margin-bottom: 40px;
    max-width: 1070px;
    margin-left: auto; 
    margin-right: auto;
}
.text-story {
    font-size: 18px; line-height: 1.5; max-width: 1030px;
    margin-bottom: 60px; padding-left: 0;
}
@media (min-width: 1024px) { .text-story { padding-left: 14%; } }

.btn-center-wrapper { display: flex; justify-content: center; margin-bottom: 80px; }
.btn-read {
    padding: 12px 30px; border: 1px solid #ccc; text-decoration: none;
    color: var(--grey-text); font-weight: 500; font-size: 20px;
    transition: all 0.3s; border-radius: 50px;
}
.btn-read:hover { border-color: #000; color: #000; }

/* Timeline */
/* ========================================
   UPDATED TIMELINE CAROUSEL
======================================== */
.timeline-wrapper {
    max-width: 1030px;
    margin: 0 auto 60px;
    padding-top: 40px;
    position: relative;
}

.label-milestone {
    font-weight: 700;
    font-size: 25px;
    margin-bottom: 40px;
    padding-left: 0;
}
@media (min-width: 1024px) { .label-milestone { padding-left: 10%; } }

/* Carousel Container */
.timeline-carousel {
    display: flex;
    align-items: center;
    position: relative;
    gap: 10px;
}

/* The Window (Hides the overflow) */
.timeline-window {
    width: 100%;
    overflow: hidden;
    padding-bottom: 20px; /* Space for the active line */
}

/* The Moving Track */
.timeline-track {
    display: flex;
    transition: transform 0.4s ease-in-out;
    width: 100%; 
    /* Gap is handled via padding inside items to ensure perfect math */
}

/* Individual Item (Strictly 5 items visible = 20% width) */
.timeline-item {
    flex: 0 0 20%; /* 100% / 5 = 20% */
    max-width: 20%;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.t-year {
    font-size: 20px;
    color: var(--grey-line);
    margin-bottom: 15px;
    transition: 0.3s;
}

/* The Line segments */
.t-line {
    width: 100%;
    height: 3px;
    background: var(--grey-line);
    transition: 0.3s;
    position: relative;
}

/* Active State */
.timeline-item.active .t-year {
    color: var(--red);
    font-weight: 800;
    transform: scale(1.1);
}
.timeline-item.active .t-line {
    background: #000;
    height: 4px;
}

/* Navigation Arrows */
.timeline-arrow {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}
.timeline-arrow:hover {
    transform: scale(1.2);
}
.timeline-arrow svg {
    width: 24px;
    height: 24px;
    stroke: var(--black);
    stroke-width: 3;
    fill: none;
}
/* Disable arrow state */
.timeline-arrow.disabled {
    opacity: 0.2;
    cursor: default;
    pointer-events: none;
}

/* Milestone Display Card */
.milestone-card {
    max-width: 1030px;
    margin: 0 auto;
    animation: fadeUp 0.5s ease;
}
.milestone-img {
    width: 100%;
    height: auto;
    aspect-ratio: 2/1;
    background-color: #ddd; /* Fallback */
    background-size: cover;
    background-position: center;
    margin-bottom: 40px;
    border-radius: 20px;
    transition: background-image 0.3s ease-in-out;
}
.milestone-desc {
    font-weight: 700;
    font-size: 18px;
    line-height: 1.5;
    max-width: 100%;
}

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

/* Responsive: Show fewer items on mobile? */
@media (max-width: 768px) {
    .timeline-item { flex: 0 0 33.333%; max-width: 33.333%; } /* Show 3 on tablet */
}
@media (max-width: 480px) {
    .timeline-item { flex: 0 0 33.333%; max-width: 33.333%; } /* Keep 3 for context */
}

/* ========================================
   8. PORTFOLIO PAGE STYLES
======================================== */
.portfolio-header-section {
    padding-bottom: 60px;
    position: relative;
    z-index: 2;
}

.label-portfolio {
    font-weight: 800;
    font-size: clamp(20px, 2.5vw, 25px);
    text-decoration: underline;
    margin-bottom: 24px;
    display: block;
    /* Uses inherited font-family */
}

/* 2-Column Staggered Layout */
.portfolio-grid-wrapper {
    display: flex;
    justify-content: space-between;
    gap: 40px; /* Space between the two big columns */
    margin-top: 80px;
    margin-bottom: 100px;
}

.portfolio-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 100px; /* Vertical space between cards */
}

/* The Stagger Magic: Push the Left Column down */
.portfolio-col.left {
    padding-top: 188px; /* Matches Figma offset (797px - 609px) */
}

.portfolio-col.right {
    padding-top: 0;
}

/* Individual Project Card */
.project-card {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.project-info {
    background-color: #D9D9D9;
    padding: 24px;
}

.project-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    /* Figma doesn't show border-radius, keeping it sharp */
}

.project-title {
    font-weight: 700;
    font-size: 20px;
    line-height: 110%;
    text-transform: uppercase;
    margin-bottom: 12px;
    color: var(--black);
}

.project-desc {
    font-weight: 400;
    font-size: 18px;
    line-height: 110%;
    color: var(--black);
    opacity: 0.9;
}

/* Responsive: Stack on Mobile */
@media (max-width: 768px) {
    .portfolio-grid-wrapper {
        flex-direction: column;
        gap: 60px;
    }
    
    .portfolio-col.left {
        padding-top: 0; /* Remove stagger on mobile */
        gap: 60px;
    }
    
    .portfolio-col.right {
        gap: 60px;
    }
}

/* ========================================
   9. TEAM PAGE STYLES
======================================== */

/* Full Width Section Wrappers */
.section-full {
    width: 100%;
    padding: 100px 0;
}

.bg-black {
    background-color: var(--black);
    color: var(--white);
}

.bg-cream {
    background-color: var(--cream);
    color: var(--black);
}

.section-title-center {
    font-weight: 700;
    font-size: 20px;
    text-align: center;
    margin-bottom: 60px;
    text-transform: capitalize;
}

/* Avatar Grids */
.team-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    row-gap: 60px;
    text-align: center;
}

.team-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    row-gap: 60px;
    text-align: center;
}

/* ========================================
   UPDATED TEAM FLIP LOGIC (Fixing the Stacking Issue)
======================================== */

.person-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.person-name {
    font-weight: 700;
    font-size: 16px;
    margin-top: 0;
    margin-bottom: 4px;
    text-align: center;
}
.person-role {
    font-weight: 400;
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 16px;
    line-height: 1.4;
    text-align: center;
}

.person-quote {
    font-size: 13px;
    font-style: italic;
    line-height: 1.6;
    opacity: 0.75;
    text-align: center;
    max-width: 240px;
}
/* 1. The Container */
.flip-card {
    background-color: transparent;
    width: 180px;
    height: 180px;
    perspective: 1000px;
    margin-bottom: 24px;
    border-radius: 50%;
    position: relative; /* Ensure context for children */
}

/* 2. The Inner Wrapper */
.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    border-radius: 50%;
}

/* Trigger Flip */
.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

/* 3. Front and Back Faces - FORCE OVERLAP FIX */
.flip-card-front, .flip-card-back {
    position: absolute;
    top: 0;          /* Essential to force overlap */
    left: 0;         /* Essential to force overlap */
    width: 100%;
    height: 100%;
    margin: 0;       /* Remove any accidental margins */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 50%;
    overflow: hidden;
}

/* Back Face Rotation */
.flip-card-back {
    transform: rotateY(180deg);
    background-color: var(--grey-1);
}

/* 4. The Image Itself */
.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%; /* Double safety */
}

/* Mobile Responsive */
@media (max-width: 576px) {
    .flip-card {
        width: 150px;
        height: 150px;
    }
}

/* Partners Section */
.partners-wrapper {
    text-align: center;
    padding: 100px 0;
}

.partner-logo {
    max-width: 300px;
    height: auto;
    margin: 40px auto 20px;
    display: block;
}

.partner-desc {
    font-size: 14px;
    opacity: 0.7;
    max-width: 400px;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 992px) {
    .team-grid-3, .team-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .team-grid-3, .team-grid-4 {
        grid-template-columns: 1fr;
    }
    .avatar-img {
        width: 150px;
        height: 150px;
    }
}

/* Ensure Titles are always left-aligned */
.section-title {
    font-weight: 700;
    font-size: 20px;
    text-align: left;
    margin-bottom: 60px;
    text-transform: capitalize;
}

/* Update Partners Section */
.partners-wrapper {
    text-align: center; /* Center everything by default (logo, text) */
    padding: 100px 0;
}

.partner-logo {
    max-width: 300px;
    height: auto;
    margin: 40px auto 20px; /* 'auto' forces horizontal centering */
    display: block;
}

.partner-desc {
    font-size: 14px;
    opacity: 0.7;
    max-width: 400px;
    margin: 0 auto; /* Center the text block */
}

/* ========================================
   10. SERVICES PAGE STYLES
======================================== */

/* Hero Image Specifics */
.services-hero-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    margin-bottom: 60px;
}

/* Accordion Section */
/* Update the Accordion Wrapper to add space for the overlapping image */
.accordion-wrapper {
    background-color: var(--cream);
    /* Add extra top padding so the image doesn't cover the text */
    padding-top: 400px; 
    padding-bottom: 100px;
    position: relative;
    z-index: 1;
}

/* Mobile Reset */
@media (max-width: 768px) {
    .services-image-right {
        margin-right: -24px; /* Small breakout for mobile */
        margin-bottom: 0; /* Remove overlap on mobile */
    }
    .accordion-wrapper {
        padding-top: 80px; /* Reset padding */
    }
}


.accordion-list {
    max-width: 100%;
}

.accordion-item {
    border-bottom: 1px solid rgba(0,0,0,0.1);
}
.accordion-item:first-child {
    border-top: 1px solid rgba(0,0,0,0.1);
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.accordion-title {
    /* Updated size: Min 24px, Scalable 3vw, Max 45px */
    font-size: clamp(24px, 3vw, 45px);
    font-weight: 700;
    color: var(--black);
    transition: color 0.3s ease;
}

.accordion-icon {
    font-size: 40px;
    font-weight: 400;
    color: var(--black);
    transition: transform 0.3s ease;
}

/* Active State */
.accordion-item.active .accordion-title {
    color: var(--red);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
}

.accordion-body {
    padding-bottom: 40px;
    font-size: 18px;
    line-height: 1.6;
    max-width: 800px;
    color: var(--grey-text);
}

/* Client Logo Loops */
.client-loop-section {
    padding: 100px 0;
    background-color: var(--white);
    overflow: hidden; /* Hide scrollbars */
}

.loop-row {
    display: flex;
    width: 100%;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.loop-track {
    display: flex;
    width: max-content; /* Allows track to be as wide as needed */
    gap: 60px;
}

.client-logo-img {
    height: 60px; /* Uniform height for logos */
    width: auto;
    object-fit: contain;
    filter: grayscale(100%); /* Optional: Make logos B&W */
    opacity: 0.7;
    transition: opacity 0.3s;
}
.client-logo-img:hover { opacity: 1; filter: none; }

/* Animations */
.scroll-left {
    animation: scrollLeft 30s linear infinite;
}

.scroll-right {
    animation: scrollRight 30s linear infinite;
}

@keyframes scrollLeft {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } /* Moves half way (since we duplicate content) */
}

@keyframes scrollRight {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* Bottom CTA */
.cta-box-grey {
    background-color: #E6E6E6;
    border-radius: 20px;
    text-align: center;
    padding: 80px 20px;
    margin-bottom: 100px;
}

/* ========================================
   FIX FOR ABOUT US PAGE
======================================== */

/* 1. Add padding to the wrapper so the image has space to sit */
.purpose-wrapper {
    padding-top: 250px !important; /* Matches the logic of the Services page */
    position: relative;
    z-index: 10;
}

/* 2. Target the image specifically inside the About Us wrapper */
.purpose-wrapper .img-pull-up {
    /* Reset the vertical pull to be proportionate */
    margin-top: -400px; 
    
    /* Force the Right Edge Breakout */
    width: auto;
    max-width: none;
    margin-right: calc(50% - 50vw);
    margin-left: 0;
    
    /* Ensure image fills the new width */
    display: block;
}

/* 3. Ensure the image inside fills the container */
.purpose-wrapper .img-pull-up img {
    width: 100%;
    height: auto;
}

/* 4. Mobile Reset for About Us */
@media (max-width: 768px) {
    .purpose-wrapper {
        padding-top: 60px !important;
    }
    .purpose-wrapper .img-pull-up {
        margin-top: -50px;
        margin-right: -24px; /* Small breakout for mobile */
        margin-bottom: 40px;
    }
}

/* ========================================
   UPDATE: SERVICES IMAGE (RIGHT ALIGN + OVERLAP)
======================================== */

.services-image-right {
    position: relative;
    z-index: 10; /* Ensures it sits ON TOP of the cream section */
    
    /* 1. RIGHT ALIGNMENT (Breakout to screen edge) */
    width: auto;
    max-width: none;
    margin-right: calc(50% - 50vw);
    margin-left: 0;

    /* 2. OVERLAP LOGIC (Push down over the next section) */
    margin-bottom: -150px; 
    margin-top: 40px;
}

.services-hero-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}



/* ========================================
   11. FULL SCREEN MENU OVERLAY
======================================== */
.fullscreen-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--red);
    color: var(--white);
    z-index: 9999;
    
    /* Hidden by default */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
    
    /* Layout */
    display: flex;
    flex-direction: column;
}

/* Active State (Triggered by JS) */
.fullscreen-menu.is-active {
    opacity: 1;
    pointer-events: auto;
}

/* Menu Header (Logo + Close) */
.menu-header {
    display: flex;
    justify-content: center; /* Center the logo */
    align-items: center;
    padding: 46px var(--gutter) 20px;
    position: relative;
    width: 100%;
    max-width: calc(var(--max-width) + (var(--gutter) * 2));
    margin: 0 auto;
}

.menu-logo {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1); /* Forces logo to be white */
}

.menu-close {
    position: absolute;
    right: var(--gutter);
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Drawing the X icon */
.menu-close::before, .menu-close::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: var(--white);
    transition: transform 0.3s;
}
.menu-close::before { transform: rotate(45deg); }
.menu-close::after { transform: rotate(-45deg); }
.menu-close:hover::before { transform: rotate(135deg); }
.menu-close:hover::after { transform: rotate(45deg); }


/* Menu Content Grid */
.menu-content {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 Columns: Info | Links */
    align-items: center; /* Vertically center content */
    max-width: calc(var(--max-width) + (var(--gutter) * 2));
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--gutter) 60px;
}

/* Left Column: Contact Info */
.menu-info {
    padding-right: 40px;
}

.menu-company-name {
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.menu-reg-no {
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 24px;
    opacity: 0.8;
}
.menu-address {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 30px;
    max-width: 300px;
}
.menu-contact-link {
    display: block;
    color: var(--white);
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.menu-socials {
    margin-top: 40px;
    display: flex;
    gap: 16px;
}
.menu-socials a svg {
    width: 24px;
    height: 24px;
    fill: var(--white);
}

/* Right Column: Navigation Links */
.menu-nav {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: right; /* Align links to right as per design might vary, but screenshot looks left-aligned in column 2. Let's stick to left alignment within the column for cleaner look, or align-self start. */
}

.menu-nav a {
    color: var(--white);
    text-decoration: none;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(32px, 4vw, 50px); /* Responsive large font */
    font-weight: 400;
    text-transform: uppercase;
    line-height: 1.1;
    transition: opacity 0.3s;
}

.menu-nav a:hover {
    opacity: 0.7;
}

/* Responsive Stack */
@media (max-width: 768px) {
    .menu-content {
        grid-template-columns: 1fr;
        align-content: start;
        gap: 40px;
        overflow-y: auto; /* Allow scroll if screen is short */
    }
    .menu-nav {
        order: -1; /* Move links to top on mobile */
        gap: 16px;
    }
    .menu-nav a {
        font-size: 32px;
    }
}

/* ========================================
   6. FOOTER (Shared)
======================================== */
.footer { background-color: var(--black); color: var(--white); padding: 60px 0; }
.footer-grid { display: grid; grid-template-columns: 200px 1fr; gap: 80px; }
.footer-nav { display: flex; flex-direction: column; gap: 16px; }
.footer-nav a { color: var(--white); text-decoration: none; font-size: 14px; font-weight: 500; transition: color 0.3s ease; }
.footer-nav a:hover { color: var(--red); }
.footer-social { display: flex; gap: 16px; margin-top: 24px; }
.footer-social a { color: var(--white); transition: color 0.3s ease; }
.footer-social a:hover { color: var(--red); }
.footer-social svg { width: 20px; height: 20px; fill: currentColor; }
.footer-contact h3 { font-size: 20px; font-weight: 700; margin-bottom: 24px; }
.footer-contact-company { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.footer-contact-company span { font-weight: 400; opacity: 0.7; }
.footer-contact-address { font-size: 14px; font-weight: 400; opacity: 0.8; margin-bottom: 16px; line-height: 1.5; }
.footer-contact-info { font-size: 14px; margin-bottom: 4px; }
.footer-contact-info a { color: var(--white); text-decoration: none; }
.footer-contact-info a:hover { color: var(--red); }
.footer-tagline { font-size: 14px; margin-top: 24px; margin-bottom: 16px; }
.footer-cta-button {
    display: inline-block; background-color: var(--red); color: var(--white);
    font-size: 14px; font-weight: 600; text-decoration: none;
    padding: 12px 28px; border-radius: 50px; transition: all 0.3s ease;
}
.footer-cta-button:hover { background-color: #b81f23; }
.footer-bottom {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 40px; padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px; opacity: 0.7;
}
.footer-bottom a { color: var(--white); text-decoration: none; }
.footer-bottom a:hover { color: var(--red); }

/* ========================================
   7. RESPONSIVE (Shared & Specific)
======================================== */
@media (max-width: 1200px) {
    .hero-body { padding-bottom: 200px; }
    .hero-headline { font-size: 64px; }
    .portfolio-card { flex: 0 0 500px; height: 380px; }
    .cta-headline { font-size: 52px; }
}

@media (max-width: 992px) {
    .hero-body { padding-bottom: 320px; }
    .hero-label { font-size: 26px; }
    .hero-headline { font-size: 52px; }
    .hero-subtext { font-size: 16px; }

    .watch-video { width: 85px; height: 85px; }
    .play-button { width: 42px; height: 42px; }

    .services-section { bottom: -280px; }
    .services-grid { grid-template-columns: 1fr; gap: 16px; }
    .service-card { min-height: 160px; }

    .white-section { padding-top: 320px; }
    .portfolio-title { font-size: 32px; }
    .portfolio-card { flex: 0 0 85vw; height: 350px; }

    .portfolio-cream-section { background: linear-gradient(to bottom, var(--white) 175px, var(--cream) 175px); }
    .cta-headline { font-size: 40px; }
    .footer-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
    .logo { height: 32px; }
    .menu-toggle span { width: 24px; }

    .hero-body { padding-bottom: 340px; }
    .hero-label { font-size: 20px; }
    .hero-headline { font-size: 40px; }
    .hero-subtext { font-size: 15px; }

    .watch-video { width: 75px; height: 75px; }
    .play-button { width: 36px; height: 36px; }
    .watch-video-text text { font-size: 9px; }

    .services-section { bottom: -300px; }
    .service-card { padding: 24px; border-radius: 20px; }
    .service-card-title { font-size: 18px; }
    .service-card-desc { font-size: 16px; }

    .white-section { padding-top: 340px; }
    .discover-link-wrapper { padding: 40px 0; }
    .portfolio-title { font-size: 28px; }

    .portfolio-card { flex: 0 0 90vw; height: 320px; }
    .portfolio-card:last-child { margin-right: 24px; }
    .portfolio-card-label, .portfolio-card-company { font-size: 16px; }
    .portfolio-card-desc { font-size: 14px; line-height: 20px; }

    .portfolio-cream-section { background: linear-gradient(to bottom, var(--white) 160px, var(--cream) 160px); }
    .cta-content { padding-top: 60px; }
    .cta-headline { font-size: 32px; }
    .cta-button { font-size: 16px; padding: 14px 32px; }

    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}

@media (max-width: 480px) {
    .hero-headline { font-size: 32px; }
    .hero-label { font-size: 18px; }
    .portfolio-card { height: 280px; }
    .portfolio-card-inner { padding: 20px; }
    .cta-headline { font-size: 28px; }
}

/* ========================================
   HERO VIDEO BACKGROUND UPDATE
======================================== */

/* 1. Style the video to cover the screen */
.hero-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures video covers screen without stretching */
    z-index: 0;        /* Sits at the very bottom */
}

/* 2. Hide the old static image (::before) */
.hero::before {
    display: none !important;
}

/* 3. Ensure the dark overlay (::after) stays on top of the video */
.hero::after {
    z-index: 1; /* Sits on top of video (z-index 0) but below text (z-index 10) */
    pointer-events: none; /* Ensures clicks pass through to video/buttons if needed */
}

/* ========================================
   VIDEO LIGHTBOX STYLES
======================================== */
.video-modal-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Dark background */
    z-index: 10000; /* Must be higher than the menu (9999) */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-modal-overlay.is-visible {
    opacity: 1;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px; /* Limits width on big screens */
    aspect-ratio: 16 / 9; /* Enforces Video Aspect Ratio */
}

.video-container {
    width: 100%;
    height: 100%;
}

.video-container iframe {
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

.video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #FFF;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.video-modal-close:hover {
    color: var(--red);
}

/* ========================================
   CTA BANNER (Team Page)
======================================== */
.cta-banner {
    padding: 100px 0;
}

.cta-banner-box {
    width: 100%;
    background-image: url('images/fmm-cta.png');
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    padding: 80px 40px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    text-align: center;
}

.cta-banner-headline {
    font-size: 48px;
    font-weight: 700;
    color: var(--white);
    line-height: 110%;
    margin: 0;
    text-align: center;
}

.cta-banner-headline-large {
    font-size: 80px;
    font-weight: 800;
    color: var(--white);
    display: block;
    line-height: 110%;
}

.cta-dot {
    color: var(--red);
}

.cta-speak-btn {
    display: inline-block;
    background-color: var(--red);
    color: var(--white);
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    padding: 16px 40px;
    border-radius: 50px;
    white-space: nowrap;
    transition: background-color 0.3s ease;
}

.cta-speak-btn:hover {
    background-color: #b81f23;
}

@media (max-width: 768px) {
    .cta-banner {
        padding: 60px 0;
    }
    .cta-banner-box {
        padding: 60px 40px;
        border-radius: 12px;
    }
    .cta-banner-headline {
        font-size: 28px;
    }
}

/* ========================================
   PORTFOLIO SINGLE POST
======================================== */

.case-study-brief {
    margin-top: 80px;
}

.case-study-brief .desc-text {
    max-width: 100%;
}

.case-study-brief-label {
    display: block;
    font-size: 80px;
    font-weight: 800;
    text-decoration: none;
    margin-bottom: 40px;
    color: var(--black);
}

.case-study-stats {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 40px;
    margin-top: 80px;
    margin-bottom: 80px;
}

.stat-circle {
    width: 213px;
    height: 213px;
    border-radius: 50%;
    background-color: transparent;
    border: 8px solid var(--red);
    color: var(--red);
    font-size: 50px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
    box-sizing: border-box;
}

.case-study-outcome-section {
    position: relative;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
    overflow: hidden;
}

/* Full-width grey bg — covers the entire section from top to bottom */
.case-study-grey-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 80%;
    background-color: #d9d9d9;
    z-index: 0;
}

.case-study-outcome-grid {
    display: flex;
    align-items: flex-start;
    gap: 0;
    position: relative;
    z-index: 1;
}

.case-study-outcome-left {
    flex: 1;
    padding-top: 0;
    padding-bottom: 100px;
}

/* Image column — flush right edge, no padding, aligned top with paragraph */
.case-study-outcome-right {
    flex: 0 0 650px;
    display: flex;
    align-items: flex-start;
    margin-right: calc(50% - 50vw);
    padding-top: 0;
}

.case-study-outcome-img {
    width: 650px;
    height: 650px;
    object-fit: cover;
    display: block;
    margin: 0;
    padding: 0;
}

.offset-brief {
    padding-left: 6%;
}

.offset-outcome {
    padding-left: 33%;
}
