/* HOME.CSS - 1190 Agency Dark Theme */

:root {
    /* Light / Broken White Theme - GLOBAL OVERRIDE */
    --color-bg: #f4f4f0;
    /* Main Background: Broken White */
    --color-bg-alt: #e6e6e2;
    /* Secondary Background: Slightly Darker */
    --color-text: #1a1a1a;
    /* Main Text: Dark Gray/Black */
    --color-text-muted: #666666;
    /* Muted Text: Medium Gray */
    --color-accent: #000000;
    /* Accent: Black for professionalism */
    --border-color: #d1d1d1;
    /* Light border */

    --font-primary: 'Helvetica Neue', Helvetica, Arial, sans-serif;

    --header-height: 65px;
    --container-width: 1400px;

    /* New Palette for Light Sections */
    --color-off-white: #e8e8e3;
    /* A warm, paper-like off-white */
    --color-text-dark: #121212;
    --border-color-dark: rgba(0, 0, 0, 0.15);
}

/* Reset / Base */
body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-primary);
    margin: 0;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* REMOVED: Global Grain Overlay */

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 40px;
}

/* Typography Utils */
h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.section-title {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    margin-bottom: 60px;
    display: inline-block;
    width: 100%;
}

.text-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid transparent;
}

.text-link:hover {
    border-bottom-color: var(--color-accent);
}

/* BUTTONS - Solid & High Contrast */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    border: 1px solid transparent;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: var(--color-text);
    /* Black */
    color: #ffffff;
    border: 1px solid var(--color-text);
}

.btn-primary:hover {
    background: #333333;
    border-color: #333333;
    color: #ffffff;
}

.btn-secondary {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-text);
}

.btn-secondary:hover {
    background: var(--color-text);
    color: #ffffff;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--color-text);
    color: var(--color-text);
}

.btn-outline:hover {
    background: var(--color-text);
    color: #ffffff;
}

/* SOCIAL ICONS IN HEADER */
.header-cta {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-social-icons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.header-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--color-text);
    transition: all 0.3s ease;
    opacity: 0.7;
    margin: 0;
    padding: 0;
}

.header-social-link:hover {
    opacity: 1;
}

/* HEADER CUSTOM - Solid/Simple */
.site-header-custom {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    background: rgba(244, 244, 240, 0.95);
    /* High opacity match bg */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.site-header-custom.scrolled {
    background: rgba(244, 244, 240, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* Ensure logo is visible on light background if it's white */
.logo-image {
    filter: invert(1);
    /* Invert white logo to black */
    transition: filter 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: nowrap;
    /* Prevent wrapping on small screens */
}

.logo-text {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -2px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 40px;
    margin: 0;
    padding: 0;
}

.main-nav a {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
}

.main-nav a:hover {
    color: var(--color-text);
}

/* HERO SECTION */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 700px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    /* Bottom alignment for modern feel */
    padding-bottom: 120px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.2));
}

.hero-container {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-content {
    max-width: 900px;
    /* Optional: entry animation could go here */
}

.hero-title {
    font-size: 5vw;
    /* Responsive large text */
    line-height: 0.95;
    margin-bottom: 30px;
    text-transform: uppercase;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #ccc;
    font-weight: 300;
    max-width: 600px;
    margin-bottom: 50px;
}

/* Fix Hero Text Colors for Light Theme (Only force white on dark sections) */
.hero-section .hero-title,
.hero-section .hero-subtitle,
.work-hero-title,
.presentation-hero .hero-title,
.presentation-hero .hero-subtitle {
    color: #ffffff !important;
}

/* Ensure Elche Hero has a dark background for the white text */
.presentation-hero {
    background-color: #121212;
    padding-top: 150px;
    padding-bottom: 80px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

/* SECTION COMMONS */
.section-block {
    padding: 120px 0;
}

/* ABOUT */
.layout-2-col {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 100px;
    align-items: center;
}

/* --- ABOUT SECTION STYLES --- */

.about-main-text {
    color: var(--color-text);
    /* Set a base size for the container */
    font-size: 1rem;
}

/* SCENARIO A: New Split Fields (about_highlight + about_content) */
.about-highlight {
    font-size: 2.2rem;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 2rem;
    color: var(--color-text);
    display: block;
}

.about-highlight * {
    font-weight: 700 !important;
    font-size: inherit;
    margin: 0;
}

.about-content {
    font-size: 1.25rem;
    /* Target size: Small/Readable */
    line-height: 1.6;
    font-weight: 400 !important;
    color: var(--color-text-muted);
    margin-top: 1.5rem;
    display: block;
}

.about-content p {
    margin-bottom: 1.5rem;
    font-weight: 400 !important;
    font-size: 1.25rem;
}

/* Force override of any bold tags inside the content block */
.about-content strong,
.about-content b,
.about-content h1,
.about-content h2,
.about-content h3,
.about-content h4,
.about-content h5 {
    font-weight: 400 !important;
    font-size: 1.25rem !important;
    color: inherit;
}

/* SCENARIO B: Legacy Single Field Fallback */
/* If the user is somehow still using the old field, we use pseudo-selectors to mimic the look */

/* All paragraphs in the main text container default to "Body" style */
.about-main-text p {
    font-size: 1.25rem;
    line-height: 1.6;
    font-weight: 400 !important;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

/* BUT, the first element (likely the title) gets the "Highlight" style */
.about-main-text>*:first-child {
    font-size: 2.2rem !important;
    line-height: 1.15;
    font-weight: 700 !important;
    color: var(--color-text) !important;
    margin-bottom: 2rem;
}

/* Ensure strong tags inside that first element stay bold */
.about-main-text>*:first-child strong,
.about-main-text>*:first-child b {
    font-weight: 700 !important;
}

/* Ensure subsequent bold tags are stripped, matching Scenario A logic */
.about-main-text>*:not(:first-child) strong,
.about-main-text>*:not(:first-child) b {
    font-weight: 400 !important;
    /* Strip bold from body text */
}

.about-main-text h2 {
    font-size: 1.5em;
    font-weight: 700;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.about-main-text h3 {
    font-size: 1.25em;
    font-weight: 700;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.about-main-text h4 {
    font-size: 1.1em;
    font-weight: 700;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.about-main-text h2 {
    font-size: 1.5em;
}

.about-main-text h3 {
    font-size: 1.25em;
}

.about-main-text h4 {
    font-size: 1.1em;
}

.about-figure img {
    width: 100%;
    height: auto;
    filter: grayscale(100%) contrast(1.2);
    /* B&W Editorial look */
    transition: filter 0.5s ease;
}

.about-figure:hover img {
    filter: grayscale(0%) contrast(1);
}

.about-short-copy {
    margin-top: 30px;
    font-size: 1rem;
    color: var(--color-text-muted);
    border-left: 1px solid var(--border-color);
    padding-left: 20px;
    line-height: 1.6;
}

/* METHOD - Modern List */
.method-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.method-card {
    background: var(--color-bg-alt);
    padding: 40px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.method-card:hover {
    border-color: var(--color-text);
    transform: translateY(-5px);
}

.method-number {
    display: block;
    font-family: monospace;
    color: var(--color-text-muted);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.method-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.method-desc {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* SERVICES - High Contrast / Off-White Block */
.services-section {
    background-color: #e8e8e3 !important;
    /* Force off-white */
    color: #121212 !important;
    /* Force dark text */
}

.services-section .section-title {
    color: #121212 !important;
    border-top-color: rgba(0, 0, 0, 0.15) !important;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid rgba(0, 0, 0, 0.15);
    border-left: 1px solid rgba(0, 0, 0, 0.15);
}

.service-card {
    border-right: 1px solid rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    padding: 60px;
    background: transparent;
    transition: all 0.3s ease;
}

/* Force everything inside the card to be dark by default */
.service-card * {
    color: #121212;
}

.service-card:hover {
    background: #fafaf8 !important;
    /* "Otro blanco roto" - very light warm grey/white */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    /* Sophisticated diffuse shadow */
    transform: translateY(-4px);
    border-left: 3px solid #121212 !important;
    /* Differentiating editorial accent */
    border-color: rgba(0, 0, 0, 0.05);
    /* Make other borders subtle */
    z-index: 10;
    position: relative;
}

/* Explicitly force dark text on hover too */
.service-card:hover * {
    color: #121212 !important;
}

.service-title {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #121212 !important;
}

/* Target all potential text elements for the description */
.service-desc,
.service-desc p,
.service-desc div,
.service-desc span,
.service-desc h3,
.service-desc h4,
.service-desc h5,
.service-desc li {
    color: #4a4a4a !important;
    /* Dark gray for body text */
    max-width: 400px;
}

.service-desc ul,
.service-desc ol {
    margin: 10px 0 10px 10px;
    padding-left: 15px;
    color: #4a4a4a !important;
}

.service-desc ul {
    list-style-type: disc;
}

.service-desc ol {
    list-style-type: decimal;
}

.service-desc li {
    margin-bottom: 5px;
    padding-left: 5px;
}

.service-desc strong,
.service-desc b {
    color: #121212 !important;
    /* Pitch black for bold */
    font-weight: 700;
}

/* WORKS - Masonry / Grid */
.works-masonry {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px;
}

.work-item {
    display: block;
    position: relative;
    group: work;
}

.work-image-wrapper {
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
}

.work-image-wrapper img {
    width: 100%;
    display: block;
    transition: transform 0.7s cubic-bezier(0.165, 0.84, 0.44, 1);
    filter: brightness(0.8);
}

.work-item:hover .work-image-wrapper img {
    transform: scale(1.03);
    filter: brightness(1);
}

.work-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.work-name {
    font-size: 1.5rem;
    font-weight: 400;
}

.work-tag {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
}

/* MANIFESTO */
.manifesto-section {
    padding: 200px 0;
    text-align: center;
    background: var(--color-bg);
}

.manifesto-text {
    font-size: clamp(2rem, 5vw, 4rem);
    /* Responsive typography */
    font-weight: 700;
    line-height: 1.1;
    max-width: 1000px;
    margin: 0 auto;
    letter-spacing: -0.04em;
}

/* FOOTER */
.site-footer-custom {
    padding: 80px 0;
    border-top: 1px solid var(--border-color);
    background: var(--color-bg);
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.footer-logo {
    font-size: 5rem;
    font-weight: 900;
    letter-spacing: -4px;
    line-height: 1;
    color: var(--color-text-muted);
}

.footer-links {
    display: flex;
    gap: 30px;
}

/* Force dark links in footer for light theme */
.footer-links a,
.footer-contact a {
    color: var(--color-text-muted);
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--color-text);
}

/*RESPONSIVE & MOBILE MENU */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 1001;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--color-text);
    /* Black/Dark for light header */
    transition: all 0.3s ease;
}

body.no-scroll {
    overflow: hidden;
}

@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .layout-2-col {
        grid-template-columns: 1fr;
        gap: 60px;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 20px;
    }

    .header-cta {
        display: none;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .works-masonry {
        grid-template-columns: 1fr;
    }

    /* METHOD: 2 Columns (Keep as requested previously) */
    .method-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .method-card {
        padding: 15px;
    }

    .method-title {
        font-size: 1rem;
        margin-bottom: 5px;
    }

    .method-desc {
        font-size: 0.75rem;
        line-height: 1.3;
    }

    .method-number {
        font-size: 0.75rem;
        margin-bottom: 5px;
    }

    /* SERVICES: CREATIVE SOLUTION (Horizontal Carousel) */
    .services-grid {
        display: flex;
        overflow-x: auto;
        gap: 20px;
        scroll-snap-type: x mandatory;
        padding-bottom: 30px;
        /* Space for scroll / touch */
        border: none;
        /* Reset desktop grid borders */

        /* Bleed effect */
        width: 100vw;
        margin-left: -20px;
        /* Counteract container padding */
        padding-left: 20px;
        padding-right: 20px;
    }

    /* Hide Scrollbar */
    .services-grid::-webkit-scrollbar {
        display: none;
    }

    .services-grid {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .service-card {
        flex: 0 0 75vw;
        /* Better peek effect */
        width: 75vw;
        scroll-snap-align: center;
        background: #ffffff !important;
        /* Force White card on mobile */
        border: 1px solid rgba(0, 0, 0, 0.15);
        padding: 30px;
    }

    /* Force all text inside mobile service card to be dark */
    .service-card * {
        color: #121212 !important;
    }

    .service-title {
        font-size: 1.4rem;
        /* Big readable title */
        margin-bottom: 15px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.15);
        padding-bottom: 10px;
        color: #121212 !important;
    }

    .service-desc {
        font-size: 0.95rem;
        /* Comfortable reading size */
        line-height: 1.6;
        color: #4a4a4a !important;
    }

    .footer-grid {
        flex-direction: column;
        gap: 40px;
    }

    /* Mobile Menu Logic */
    .mobile-menu-toggle {
        display: flex;
    }

    .main-nav {
        display: block;
        /* Override default flow display */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: #000;
        display: flex;
        justify-content: center;
        align-items: center;
        visibility: hidden;
        /* Hide by default */
        opacity: 0;
        transition: all 0.4s ease;
        z-index: 999;
    }

    .main-nav.active {
        visibility: visible;
        opacity: 1;
    }

    .main-nav ul {
        flex-direction: column;
        display: flex;
        text-align: center;
        gap: 30px;
    }

    .main-nav a {
        font-size: 2rem;
        /* Big links for mobile */
        font-weight: 900;
        letter-spacing: -1px;
    }

    /* Burger Animation */
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        transform: rotate(-45deg) translate(5px, -5px);
        /* Adjusted for simple 2-bar or 3-bar toggles */
        margin-top: -7px;
        /* Fine-tune per design */
    }
}

/* MICRO-ANIMATIONS & SCROLL REVEAL */
.reveal-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: opacity, transform;
}

.reveal-element.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger Utilities - up to 5 items */
.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

.delay-400 {
    transition-delay: 0.4s;
}

.delay-500 {
    transition-delay: 0.5s;
}

/* --- NEW PAGE STYLES: Method & Works independent pages --- */

/* METHOD PAGE */
.method-hero {
    padding-top: 150px;
    padding-bottom: 80px;
}

.method-step-card {
    border-top: 1px solid var(--border-color);
    padding: 60px 0;
}

.step-grid {
    display: grid;
    grid-template-columns: 0.5fr 1.5fr 3fr;
    /* Number - Title - Content */
    gap: 40px;
}

.step-number {
    font-family: monospace;
    color: var(--color-text-muted);
    font-size: 1.2rem;
}

.step-header h3 {
    font-size: 1.5rem;
    margin: 0;
}

.step-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.step-content strong {
    display: block;
    color: var(--color-text);
    /* White */
    margin-bottom: 10px;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}

.step-content p {
    color: var(--color-text-muted);
    margin: 0;
}

@media (max-width: 1024px) {
    .step-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .step-details {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* SINGLE WORK PAGE */
.work-header {
    padding-top: 150px;
    padding-bottom: 80px;
    border-bottom: 1px solid var(--border-color);
}

.work-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.work-meta-item h4 {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.work-meta-item p {
    font-size: 1.1rem;
    margin: 0;
}

.work-content-block {
    padding: 100px 0;
    border-bottom: 1px solid var(--border-color);
}

.work-section-title {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-text-muted);
    margin-bottom: 40px;
    display: block;
}

.work-big-text {
    font-size: 2rem;
    line-height: 1.3;
    font-weight: 400;
    max-width: 900px;
}

.work-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 60px;
}

.work-gallery img {
    width: 100%;
    height: auto;
    display: block;
}

.work-gallery.full-width {
    grid-template-columns: 1fr;
}

@media (max-width: 768px) {
    .work-meta-grid {
        grid-template-columns: 1fr;
    }

    .work-gallery {
        grid-template-columns: 1fr;
    }

    .work-body-text {
        column-count: 1 !important;
    }
}

/* GALLERY GRID */
.work-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.gallery-item {
    width: 100%;
    position: relative;
    background: var(--color-bg-alt);
}

.gallery-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-height: 300px;
}

@media (max-width: 768px) {
    .work-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .gallery-media {
        min-height: 150px;
        /* Ensure images have some height even if loading */
    }
}

/* --- NEW CONDENSED LAYOUT: CHALLENGE & APPROACH --- */
.group-challenge-approach {
    padding: 100px 0;
    border-bottom: 1px solid var(--border-color);
}

/* Parent grid container */
.challenge-overall-grid {
    width: 100%;
}

/* Mobile Swipe Hint */
.mobile-swipe-hint {
    display: none;
    /* Hidden by default (desktop) */
}

/* Wrapper */
.challenge-approach-wrapper {
    display: flex;
    gap: 40px;
    align-items: start;
}

.ca-title {
    font-size: 2rem;
    margin-bottom: 20px;
}

.ca-content {
    margin-top: 20px;
}

.header-social-link svg {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px;
    min-height: 20px;
    fill: currentColor;
    display: block;
    /* Removes inline spacing issues */
}

/* Ensure text is dark in main content areas */
main h1,
main h2,
main h3,
main h4,
main h5,
main h6,
main p,
main li,
main span:not(.btn) {
    color: var(--color-text);
}

/* Fix specific Single Work issues if they rely on old classes */
.single-work-content,
.work-description,
.gallery-item {
    color: var(--color-text);
}

.gallery-caption,
.caption {
    color: var(--color-text-muted);
}

.ca-gallery img {
    width: 100%;
    height: auto;
    display: block;
}

/* DESKTOP GRID REFINEMENT (>= 769px) */
@media (min-width: 769px) {
    .challenge-overall-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        /* TWO COLUMNS */
        gap: 80px;
    }

    /* LEFT COLUMN: Texts Stacked Vertically */
    .challenge-approach-wrapper {
        grid-column: 1;
        grid-row: 1;
        flex-direction: column;
        /* Stacked */
        gap: 100px;
        /* Space between Challenge & Approach */
    }

    .ca-item {
        width: 100%;
        /* Full width of column */
    }

    /* RIGHT COLUMN: Image Only */
    .ca-gallery {
        grid-column: 2;
        grid-row: 1;
        margin-top: 0;
        /* Sticky Effect for image? Optional. */
        position: sticky;
        top: 120px;
    }

    .ca-gallery img {
        height: 100%;
        max-height: 80vh;
        object-fit: cover;
    }
}


/* MOBILE CAROUSEL STYLES (< 768px) */
@media (max-width: 768px) {

    /* Full width bleed for carousel */
    .group-challenge-approach {
        padding: 60px 0;
        overflow: hidden;
        /* Prevent horizontal scroll on body */
    }

    .challenge-overall-grid {
        display: block;
        /* Normal stacking */
    }

    /* Show Hint */
    .mobile-swipe-hint {
        display: flex;
        align-items: center;
        gap: 10px;
        color: var(--color-accent);
        font-size: 0.9rem;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        margin-bottom: 20px;
        justify-content: flex-end;
        /* Right align */
        padding-right: 20px;
        opacity: 0.8;
        animation: hintPulse 2s infinite;
    }

    @keyframes hintPulse {
        0% {
            transform: translateX(0);
            opacity: 0.8;
        }

        50% {
            transform: translateX(5px);
            opacity: 1;
        }

        100% {
            transform: translateX(0);
            opacity: 0.8;
        }
    }

    /* Wrapper becomes the flex carousel container */
    .challenge-approach-wrapper {
        display: flex;
        /* Switch to flex */
        flex-direction: row;
        /* Horizontal */
        gap: 20px;

        /* User Requirement: Carousel / Scroll */
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;

        /* Bleed logic to touch edges */
        width: 100vw;
        margin-left: -20px;
        /* Counteract container padding used often */
        padding-left: 20px;
        padding-right: 20px;
        padding-bottom: 40px;
        /* Space for scrollbar or touch area */
    }

    /* Hide Scrollbar */
    .challenge-approach-wrapper::-webkit-scrollbar {
        display: none;
    }

    .challenge-approach-wrapper {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .ca-item {
        flex: 0 0 75vw;
        /* Show 75% of each card (AGGRESSIVE peek effect) */
        width: 75vw;
        scroll-snap-align: center;
        background: var(--color-bg-alt);
        padding: 30px;
        border: 1px solid var(--border-color);
    }

    /* Ensure the LAST item has some margin-right so it doesn't stick to the edge */
    .ca-item:last-child {
        margin-right: 20px;
    }

    .ca-title {
        font-size: 1.5rem;
    }

    /* Image now outside wrapper, full width in container */
    .ca-gallery {
        margin-top: 40px;
        width: 100%;
    }

    /* GALLERY GRID - 2 COLUMNS ON MOBILE */
    .work-gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }

    .gallery-media {
        min-height: 150px;
    }

    /* MOBILE MENU & HEADER FIXES */
    /* MOBILE MENU & HEADER FIXES */
    .header-container {
        /* Ensure logo and burger don't overlap */
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        padding: 0 20px;
    }

    .logo {
        flex-shrink: 1;
        /* Allow logo text to shrink if absolutely needed */
        margin-right: auto;
        /* Push everything else right */
    }

    .mobile-menu-toggle {
        flex-shrink: 0;
        /* Never shrink the icon */
        margin-left: 20px;
    }

    /* Hide desktop nav elements by default */
    .main-nav {
        /* Hidden unless active */
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: #000;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 999;
        visibility: visible;
        /* Override previous visibility: hidden logic if any */
        opacity: 1;
    }

    .main-nav.active {
        display: flex !important;
        /* Force flex when active */
    }

    .header-cta {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: flex;
        z-index: 1001;
        /* Above the overlay menu */
    }
}

/* SERVICES CTA & MODAL */
.services-footer-cta {
    margin-top: 60px;
    text-align: center;
}

.btn-service {
    border-color: #121212 !important;
    color: #121212 !important;
}

.btn-service:hover {
    background: #121212 !important;
    color: #fff !important;
}

/* Modal Overlay */
.services-modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.services-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

/* Modal Content */
.modal-content {
    background-color: #fafaf8;
    margin: auto;
    padding: 40px;
    border: 1px solid #121212;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.services-modal.is-open .modal-content {
    transform: translateY(0);
}

/* Close Button */
.modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover,
.modal-close:focus {
    color: #000;
    text-decoration: none;
}

/* CF7 Form Styles inside Modal */
.modal-content {
    color: #121212 !important;
    /* Force all base text to be dark */
}

.modal-content label,
.modal-content p,
.modal-content h3,
.modal-content span {
    color: #121212 !important;
}

.modal-content input[type="text"],
.modal-content input[type="email"],
.modal-content textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    background: transparent;
    border: none;
    border-bottom: 1px solid #ccc;
    font-family: inherit;
    font-size: 0.95rem;
    color: #121212 !important;
    /* Input text color */
}

.modal-content input[type="text"]::placeholder,
.modal-content input[type="email"]::placeholder,
.modal-content textarea::placeholder {
    color: #888;
    /* Placeholder color */
}

.modal-content input[type="text"]:focus,
.modal-content input[type="email"]:focus,
.modal-content textarea:focus {
    outline: none;
    border-bottom-color: #121212;
}

.modal-content input[type="submit"] {
    background: #121212;
    color: #fff;
    border: none;
    padding: 15px 30px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    margin-top: 10px;
    transition: opacity 0.3s;
}

.modal-content input[type="submit"]:hover {
    opacity: 0.8;
}

/* FIX MOBILE HERO BUTTONS & TEXT SIZES */
@media (max-width: 768px) {
    .hero-buttons {
        width: 100%;
        display: flex;
        gap: 10px;
    }

    .hero-buttons .btn {
        flex: 1;
        /* Equal width */
        padding: 12px 5px !important;
        /* Smaller horizontal padding */
        font-size: 0.75rem !important;
        /* Smaller text */
        width: auto;
        /* Let flex handle width */
        min-width: 0;
        /* Allow shrinking if needed */
        white-space: nowrap;
        /* Prevent text wrapping */
    }

    .hero-title {
        font-size: 3rem !important;
        /* Reduced from 5vw (approx 20px on mobile) or desktop override */
        line-height: 1;
        margin-bottom: 20px;
    }

    .hero-subtitle {
        font-size: 1rem !important;
        margin-bottom: 30px;
        max-width: 100%;
    }
}