/* Copyright (c) Microsoft Corporation. All rights reserved.
   Licensed under the MIT License. */

/* ============================================================
   VARIABLES & RESET
   ============================================================ */
:root {
    --ms-blue: #0072c9;
    --ms-blue-dark: #005a9e;
    --ms-blue-light: #c7e0f4;
    --ms-navy: #06122a;
    --ms-cyan: #50e6ff;
    --ms-cyan-dim: #1ca9c9;
    --ms-white: #ffffff;
    --ms-gray-10: #f9f9f9;
    --ms-gray-20: #f3f2f1;
    --ms-gray-50: #e1dfdd;
    /* --ms-gray-100: #8a8886; */
    --ms-gray-100: #6f6d6c;
    --ms-gray-900: #1b1a19;

    /* Uruguay accent: celeste */
    --uy-celeste: #74acdf;
    --uy-celeste-dim: #4a8ec7;

    --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --radius-sm: 0px;
    --radius-md: 0px;
    --radius-lg: 0px;
    --shadow-2:  0 1px 2px rgba(0,0,0,.14);
    --shadow-8:  0 4px 8px rgba(0,0,0,.14);
    --shadow-16: 0 8px 32px rgba(0,0,0,.18);
    --shadow-28: 0 14px 50px rgba(0,0,0,.22);

    --transition: 0.25s cubic-bezier(.22,.61,.36,1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    background: var(--ms-white);
    color: var(--ms-gray-900);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ============================================================
   COOKIE BANNER PLACEHOLDER
   ============================================================ */
#cookie-banner { position: relative; z-index: 9999; }

/* ============================================================
   SITE HEADER
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--ms-white);
    border-bottom: 1px solid var(--ms-gray-50);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    height: 48px;
    gap: 1rem;
}

.site-header .ms-logo {
    height: 23px;
    flex-shrink: 0;
    position: relative;
    top: -1px;
}

.site-header > a:first-child {
    display: flex;
    align-items: center;
}

.header-sep {
    width: 1px;
    height: 20px;
    background: var(--ms-gray-50);
    flex-shrink: 0;
}

.header-title {
    color: var(--ms-gray-900);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
}

.header-nav {
    display: flex;
    gap: 0.25rem;
    margin-left: auto;
    align-items: center;
}

.header-nav a {
    color: var(--ms-gray-900);
    font-size: 0.8125rem;
    text-decoration: none;
    padding: 0.4rem 0.75rem;
    border-bottom: 2px solid transparent;
    transition: border-color var(--transition), color var(--transition);
}

.header-nav a:hover {
    border-bottom-color: var(--ms-blue);
    color: var(--ms-blue);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    min-height: min(calc(100svh - 48px), 950px);
    display: flex;
    align-items: flex-start;
    overflow: hidden;
    background: #0f1f3d;
    padding-top: 1.5rem;
    padding-bottom: 0;
}

/* Gradient mesh background */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 50%, rgba(0,120,212,.3) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 80% 20%, rgba(80,230,255,.12) 0%, transparent 55%),
        radial-gradient(ellipse 50% 70% at 70% 80%, rgba(116,172,223,.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Grid lines overlay */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 64px 64px;
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0rem 2rem 6rem;
    width: 100%;
}

.hero-title {
    font-size: clamp(2.8rem, 7vw, 6rem);
    font-weight: 500;
    line-height: 1.05;
    color: var(--ms-white);
    margin-top: 3rem;
    margin-bottom: 1.75rem;
    letter-spacing: -0.02em;
}

.hero-title .accent {
    background: linear-gradient(135deg, var(--ms-cyan) 0%, var(--uy-celeste) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    color: rgba(255,255,255,.7);
    max-width: 600px;
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--ms-blue);
    color: var(--ms-white);
    font-family: var(--font-main);
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 0.8rem 1.75rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
    box-shadow: 0 0 0 0 rgba(0,120,212,0);
}

.btn-primary:hover {
    background: var(--ms-blue-dark);
    box-shadow: 0 0 0 4px rgba(0,120,212,.25);
    transform: translateY(-1px);
}

.btn-primary:focus-visible {
    outline: 2px solid var(--ms-blue);
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(0,120,212,.35);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: rgba(255,255,255,.85);
    font-family: var(--font-main);
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 0.8rem 1.75rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    border: 1.5px solid rgba(255,255,255,.3);
    cursor: pointer;
    transition: all var(--transition);
}

.btn-secondary:hover {
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.6);
    color: var(--ms-white);
}

/* Scroll indicator */
.hero-scroll {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    transition: opacity 0.3s ease;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,.4);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    animation: float 3s ease-in-out infinite;
}

.hero-scroll svg { opacity: .5; }

@keyframes float {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(6px); }
}

/* ============================================================
   SECTION SHARED
   ============================================================ */
section {
    padding: 6rem 2rem;
    box-sizing: border-box;
}

.section-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.section-eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--ms-blue);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.75rem);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--ms-gray-900);
    margin-bottom: 1.25rem;
}

.section-title--light { color: var(--ms-white); }
.section-eyebrow--light { color: var(--ms-cyan); }

.section-desc {
    font-size: 1.0625rem;
    color: var(--ms-gray-100);
    max-width: 600px;
    line-height: 1.75;
}

.section-desc--light { color: rgba(255,255,255,.7); }

/* ============================================================
   MISSION SECTION
   ============================================================ */
#mission {
    background: var(--ms-gray-10);
}

.mission-grid {
    max-width: 720px;
}

.mission-text .section-desc { max-width: 100%; }

.mission-text .section-desc + .section-desc {
    margin-top: 1rem;
}

/* ============================================================
   FOCUS AREAS
   ============================================================ */
#focus {
    background: var(--ms-white);
}

.focus-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3.5rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin-inline: auto;
    justify-content: center;
}

@media (min-width: 769px) {
    .cards-grid {
        grid-template-columns: repeat(3, minmax(200px, 320px));
        gap: clamp(1.5rem, 5vw, 320px);
    }
}

.focus-card {
    background: var(--ms-white);
    border: none;
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    cursor: default;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.08);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-icon--blue   { background: rgba(0,120,212,.1);   color: #0078D4; }
.card-icon--cyan   { background: rgba(80,230,255,.1);  color: #00B7C3; }
.card-icon--green  { background: rgba(16,137,62,.1);   color: #10893E; }
.card-icon--purple { background: rgba(135,100,184,.1); color: #8764B8; }
.card-icon--orange { background: rgba(255,140,0,.1);   color: #FF8C00; }
.card-icon--red    { background: rgba(196,49,75,.1);   color: #C4314B; }

.card-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--ms-gray-900);
    line-height: 1.3;
}

.card-desc {
    font-size: 0.9rem;
    color: var(--ms-gray-100);
    line-height: 1.65;
    flex: 1;
}

/* ============================================================
   PIPELINE CARDS (How we work — PDF-based)
   ============================================================ */
.pipeline-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3.5rem;
    align-items: start;
    position: relative;
}

.pipeline-card {
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: background var(--transition), border-color var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.pipeline-card:hover,
.pipeline-card:focus-within {
    background: rgba(255,255,255,.08);
    border-color: rgba(80,230,255,.3);
    outline: none;
}

.pipeline-card__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.pipeline-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ms-cyan);
    background: rgba(80,230,255,.12);
    border: 1px solid rgba(80,230,255,.25);
    border-radius: 100px;
    padding: 0.2rem 0.65rem;
}

.step-num {
    font-size: 2.5rem;
    font-weight: 800;
    color: rgba(80,230,255,.15);
    line-height: 1;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
}

.pipeline-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ms-white);
    line-height: 1.25;
}

.pipeline-card__desc {
    font-size: 0.9rem;
    color: rgba(255,255,255,.65);
    line-height: 1.65;
    flex: 1;
}

.pipeline-card__details-wrap {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s ease;
}

.pipeline-card__details-wrap > ul {
    overflow: hidden;
}

.pipeline-card:hover .pipeline-card__details-wrap,
.pipeline-card:focus-within .pipeline-card__details-wrap {
    grid-template-rows: 1fr;
}

.pipeline-card__details {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,.08);
}

.pipeline-card__details li {
    font-size: 0.825rem;
    color: rgba(255,255,255,.55);
    padding-left: 1.1rem;
    position: relative;
    line-height: 1.5;
}

.pipeline-card__details li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.52em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--ms-cyan);
    opacity: .5;
}

/* ============================================================
   PROJECTS SECTION
   ============================================================ */
#projects {
    background: var(--ms-white);
    padding-bottom: 3rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
    align-items: start;
}

.projects-reqs,
.projects-ip {
    background: var(--ms-gray-10);
    border: 1.5px solid var(--ms-gray-50);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

/* ============================================================
   FAQ SECTION
   ============================================================ */
#faq {
    background: var(--ms-white);
    padding-top: 3rem;
}

/* ============================================================
   APPLY SECTION
   ============================================================ */
#apply {
    background: var(--ms-gray-10);
    padding-bottom: 2rem;
}

.apply-header {
    text-align: center;
    margin-bottom: 2rem;
}

.apply-header .section-desc {
    max-width: 720px;
    margin: 0 auto;
}

.apply-details-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.apply-block__desc {
    font-size: 0.9375rem;
    color: var(--ms-gray-900);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.apply-block__subtitle {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--ms-gray-900);
    margin-top: 1rem;
    margin-bottom: 0.75rem;
}

.apply-block__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.apply-block__list li {
    font-size: 0.9375rem;
    color: var(--ms-gray-900);
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.5;
}

.apply-block__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ms-blue);
}

.apply-block__warning {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--ms-gray-100);
    font-style: italic;
    line-height: 1.5;
}

.apply-block__note {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--ms-gray-100);
    line-height: 1.5;
}

/* Accordion (details/summary) */
.apply-accordion {
    background: var(--ms-white);
    border: 1.5px solid var(--ms-gray-50);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2);
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.apply-accordion:hover {
    box-shadow: var(--shadow-8);
    border-color: var(--ms-blue-light);
}

.apply-accordion[open] {
    border-color: var(--ms-blue-light);
}

.apply-accordion__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 1.25rem 2rem;
    list-style: none;
    user-select: none;
}

.apply-accordion__trigger::-webkit-details-marker,
.apply-accordion__trigger::marker {
    display: none;
}

.apply-accordion__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ms-blue);
}

.apply-accordion__chevron {
    flex-shrink: 0;
    color: var(--ms-blue);
    transition: transform 0.3s ease;
}

.apply-accordion[open] .apply-accordion__chevron {
    transform: rotate(180deg);
}

.apply-accordion__body {
    overflow: hidden;
    transition: height 0.3s ease, opacity 0.3s ease;
    padding: 0 2rem;
}

.apply-accordion__body.acc-open {
    padding-bottom: 1.5rem;
    opacity: 1;
}

.apply-accordion__body.acc-closed {
    opacity: 0;
    height: 0 !important;
    padding-bottom: 0;
}

.apply-cta {
    text-align: center;
    margin-top: 1rem;
}

.apply-cta .apply-note {
    margin-left: auto;
    margin-right: auto;
}

.apply-btn {
    margin-top: 1.75rem;
    width: fit-content;
}

.apply-note {
    margin-top: 0.85rem;
    font-size: 0.8rem;
    color: var(--ms-gray-100);
    line-height: 1.5;
    max-width: 420px;
}

.apply-reqs__title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ms-blue);
    margin-bottom: 1.25rem;
}

.apply-reqs__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.apply-reqs__list li {
    font-size: 0.9375rem;
    color: var(--ms-gray-900);
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.5;
}

.apply-reqs__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ms-blue);
}

/* ============================================================
   NAV APPLY HIGHLIGHT
   ============================================================ */
.nav-apply-link {
    font-weight: 700 !important;
    color: var(--ms-blue) !important;
}

.nav-apply-link:hover {
    color: var(--ms-blue-dark) !important;
}

/* ============================================================
   HOW WE WORK
   ============================================================ */
#how {
    background: #0f1f3d;
    position: relative;
    overflow: hidden;
}

#how::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 60% at 85% 50%, rgba(0,120,212,.18) 0%, transparent 60%),
        radial-gradient(ellipse 50% 80% at 15% 30%, rgba(80,230,255,.07) 0%, transparent 50%);
    pointer-events: none;
}

/* ============================================================
   CALL TO ACTION
   ============================================================ */
#cta {
    background: linear-gradient(135deg, var(--ms-blue) 0%, var(--ms-blue-dark) 50%, #003a70 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 7rem 2rem;
}

#cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

#cta .section-inner { position: relative; z-index: 1; }

#cta .section-title--light { margin-bottom: 1rem; }

.cta-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2.5rem;
}

/* ============================================================
   PARTNERS STRIP
   ============================================================ */
#partners {
    background: var(--ms-gray-10);
    padding: 1.5rem 2rem 4rem;
    text-align: center;
}

.partners-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ms-gray-100);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.partners-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
}

.partner-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: var(--ms-white);
    border: 1px solid var(--ms-gray-50);
    border-radius: var(--radius-md);
    padding: 1.25rem 2rem;
    box-shadow: var(--shadow-2);
    transition: box-shadow var(--transition), transform var(--transition);
    min-width: 160px;
    height: 80px;
}

.partner-link:hover {
    box-shadow: var(--shadow-8);
    transform: translateY(-2px);
}

.partner-logo {
    max-height: 40px;
    max-width: 140px;
    width: auto;
    object-fit: contain;
}

.partner-logo--latu {
    transform: scale(1.3);
}

.partner-logo--agesic {
    transform: scale(1.5);
}

.partner-logo--antel {
    transform: scale(1.2);
}

.partner-logo--ministerio {
    transform: scale(1.5);
}

.partner-logo--uyinnova {
    transform: scale(1.4);
}

/* ============================================================
   FOOTER WRAPPER
   ============================================================ */
#customFooter {
    border-top: 1px solid var(--ms-gray-50);
    margin-top: 0;
}

#customFooter > *:first-child {
    margin-top: 0!important;
    padding-top: 0;
}

.c-uhff {
    margin-top: 0px !important;
}

/* ============================================================
   LANGUAGE SWITCHER (dropdown)
   ============================================================ */
.lang-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: 1rem;
    background: transparent;
    border: 1px solid var(--ms-gray-50);
    border-radius: var(--radius-sm);
    padding: 0 0.6rem 0 0.55rem;
    height: 34px;
    flex-shrink: 0;
    transition: background var(--transition), border-color var(--transition);
    cursor: pointer;
}

.lang-switcher:hover,
.lang-switcher:focus-within {
    background: var(--ms-gray-10);
    border-color: var(--ms-gray-100);
}

.lang-switcher:focus-within {
    outline: 2px solid var(--ms-blue);
    outline-offset: 2px;
}

.lang-globe {
    color: var(--ms-gray-100);
    display: flex;
    align-items: center;
    flex-shrink: 0;
    pointer-events: none;
}

.lang-select {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    color: transparent;
    font-family: var(--font-main);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    outline: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.lang-select option {
    background: var(--ms-white);
    color: var(--ms-gray-900);
    font-weight: 500;
}

.lang-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ms-gray-900);
    pointer-events: none;
}

.lang-chevron {
    color: var(--ms-gray-100);
    display: flex;
    align-items: center;
    pointer-events: none;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .lang-switcher--desktop .lang-select { font-size: 0; width: 1.4rem; }
    .lang-globe  { display: flex; }
}

/* ============================================================
   ANIMATIONS (entrance)
   ============================================================ */
.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-up:nth-child(2) { transition-delay: 0.08s; }
.fade-up:nth-child(3) { transition-delay: 0.16s; }
.fade-up:nth-child(4) { transition-delay: 0.24s; }
.fade-up:nth-child(5) { transition-delay: 0.32s; }
.fade-up:nth-child(6) { transition-delay: 0.40s; }

/* Mobile-only brand title inside nav — hidden on desktop */
.header-title-mobile {
    display: none;
}

/* Mobile lang switcher inside nav — hidden on desktop */
.lang-switcher--mobile {
    display: none;
}

/* ============================================================
   HAMBURGER BUTTON (hidden on desktop)
   ============================================================ */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    margin-left: auto;
    z-index: 301;
}
.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ms-gray-900);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
/* Animate to X when open */
.nav-open .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .hamburger span:nth-child(2) { opacity: 0; }
.nav-open .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

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

/* ---------- Tablet (≤ 1024px) ---------- */
@media (max-width: 1024px) {
    .site-header { padding: 0 1.25rem; }

    .header-nav a { font-size: 0.8rem; padding: 0.35rem 0.5rem; }

    .mission-grid { gap: 3rem; }
}

/* ---------- Mobile (≤ 768px) ---------- */
@media (max-width: 768px) {
    /* Header: hamburger left, logo center */
    .site-header {
        flex-wrap: wrap;
        height: auto;
        min-height: 56px;
        padding: 0.6rem 1rem;
        position: relative;
    }

    .header-title { display: none; }
    .header-sep { display: none; }
    .lang-switcher--desktop { display: none; }

    .site-header > a:first-child {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        top: 1rem;
        z-index: 10;
    }

    .hamburger { display: flex; order: -1; margin-left: 0; margin-right: auto; z-index: 11; }

    /* Mobile nav: hidden by default, slide down when .nav-open */
    .header-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        order: 10;
        padding: 0.5rem 0 0.75rem;
        gap: 0;
    }
    .nav-open .header-nav { display: flex; }

    /* Show brand title inside nav on mobile */
    .header-title-mobile {
        display: block;
        color: var(--ms-gray-900);
        font-size: 0.85rem;
        font-weight: 600;
        text-decoration: none;
        padding: 0.6rem 0.5rem 0.75rem;
        border-bottom: 1px solid var(--ms-gray-50);
        margin-bottom: 0.25rem;
        letter-spacing: 0.02em;
    }

    .header-nav a {
        padding: 0.7rem 0.5rem;
        font-size: 0.95rem;
        border-bottom: none;
    }

    .header-nav a:hover {
        border-bottom: none;
        color: var(--ms-blue);
    }

    .nav-apply-link {
        text-align: center;
        margin-top: 0.5rem;
    }

    /* Show lang switcher inside nav on mobile — mirrors desktop pattern */
    .lang-switcher--mobile {
        display: inline-flex;
        margin: 0.75rem auto 0.25rem;
        align-self: center;
    }

    /* Hero */
    .hero { min-height: calc(100vh - 56px); min-height: calc(100svh - 56px); }
    .hero-inner { padding: 0rem 1.25rem 4rem; }
    .hero-eyebrow { margin-bottom: 1.25rem; font-size: 0.65rem; }
    .hero-title { margin-bottom: 1.25rem; }
    .hero-subtitle { margin-bottom: 1.75rem; }
    .hero-scroll { bottom: 1.5rem; }

    /* Sections */
    section { padding: 3.5rem 1.25rem; }

    .section-title { font-size: clamp(1.5rem, 5vw, 2.2rem); }

    /* Focus */
    .focus-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .focus-header .section-desc { max-width: 100% !important; }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    /* Pipeline */
    .pipeline-grid { grid-template-columns: 1fr; }

    /* Apply */
    .projects-grid {
        grid-template-columns: 1fr;
    }

    /* CTA */
    #cta { padding: 4rem 1.25rem; }

    /* Partners */
    .partners-logos { gap: 1rem; }
}

/* ---------- Small mobile (≤ 480px) ---------- */
@media (max-width: 480px) {
    .site-header { padding: 0.5rem 0.75rem; gap: 0.5rem; }

    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn-primary,
    .hero-actions .btn-secondary { justify-content: center; }

    .pipeline-card { padding: 1.5rem; }
    .step-num { font-size: 2rem; }

    .cta-actions { flex-direction: column; align-items: stretch; }
    .cta-actions .btn-primary,
    .cta-actions .btn-secondary { justify-content: center; }
}
