/*
 * Theme Name:  EU4CR
 * Description: Custom theme based on the EU Civil Resilience Training & Support Hub design.
 * Version:     1.0.0
 */

/* =============================================================
   0. DESIGN TOKENS
   ============================================================= */
:root {
    /* Brand colours */
    --color-orange:        #E8632A;   /* announcement bar, primary CTA */
    --color-orange-hover:  #C9511E;
    --color-orange-light:  #FFF0E8;

    --color-navy:          #023B80;   /* footer main, selected states */
    --color-navy-dark:     #122852;
    --color-navy-text:     #FFFFFF;

    --color-teal:          #2E8B85;   /* secondary icon/accent */
    --color-teal-hover:    #236E69;

    --color-dark:          #1A1A2E;   /* body text */
    --color-mid:           #555566;   /* secondary text */
    --color-light:         #F5F7FA;   /* section backgrounds */
    --color-white:         #FFFFFF;
    --color-border:        #DDE3EE;
	--color-main-menu:	   #0d50a1;

    /* Typography */
    --font-display:  'Merriweather', Georgia, serif;
	--font-body:     'Manrope', system-ui, sans-serif;
	--font-ui:       'Manrope', system-ui, sans-serif;

    /* Scale */
    --text-xs:   0.75rem;
    --text-sm:   0.875rem;
    --text-base: 1rem;
    --text-lg:   1.125rem;
    --text-xl:   1.375rem;
    --text-2xl:  1.75rem;
    --text-3xl:  2.25rem;
    --text-4xl:  3rem;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Layout */
    --container-max:  1280px;
    --header-height:  180px;
    --topbar-height:  44px;
    --radius-sm:  4px;
    --radius-md:  8px;
    --radius-lg:  24px;
    --radius-pill: 999px;

    /* Shadows */
    --shadow-card: 0 2px 12px rgba(0,0,0,.07);
    --shadow-header: 0 2px 16px rgba(0,0,0,.09);

    /* Transitions */
    --transition-fast: 160ms ease;
    --transition-base: 260ms ease;
}

/* =============================================================
   1. RESET / BASE
   ============================================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.65;
    color: var(--color-dark);
    background: var(--color-white);
    -webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

ul, ol { list-style: none; }

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* =============================================================
   2. UTILITY CLASSES
   ============================================================= */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: 24px;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* =============================================================
   3. BUTTONS
   ============================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-ui);
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: var(--radius-pill);
    transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
    cursor: pointer;
    white-space: nowrap;
}

/* Primary orange CTA */
.btn-primary,
.btn-apply {
    background: var(--color-orange);
    color: var(--color-white);
    border: 2px solid transparent;
}

.btn-primary:hover,
.btn-apply:hover {
    background: var(--color-orange-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(232,99,42,.35);
    color: var(--color-white);
}

/* Teal / secondary */
.btn-secondary {
    background: var(--color-teal);
    color: var(--color-white);
    border: 2px solid transparent;
}

.btn-secondary:hover {
    background: var(--color-teal-hover);
    transform: translateY(-1px);
    color: var(--color-white);
}

/* Outlined */
.btn-outline {
    background: transparent;
    color: var(--color-navy);
    border: 2px solid var(--color-navy);
}

.btn-outline:hover {
    background: var(--color-navy);
    color: var(--color-white);
}

/* Newsletter submit */
.btn-newsletter {
    color: var(--color-white);
    padding: var(--space-2) var(--space-5);
    font-size: var(--text-s);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
	border: 2px solid #fff;
    border-radius: 18px;
	align-self: flex-start;
}



/* =============================================================
   4. ANNOUNCEMENT BAR (slide-down orange strip)
   ============================================================= */
.top-announcement-bar {
    position: relative;
    z-index: 1000;
    background: var(--color-orange);
    color: var(--color-white);
    overflow: hidden;

    /* Slide-down entrance */
    max-height: 0;
    opacity: 0;
    transition:
        max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
        opacity    0.35s ease;
}

.top-announcement-bar.is-visible {
    max-height: var(--topbar-height);
    opacity: 1;
}

.top-announcement-bar.is-hidden {
    max-height: 0 !important;
    opacity: 0 !important;
    pointer-events: none;
}

.top-bar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-6);
    height: var(--topbar-height);
    padding-inline: var(--space-6);
    max-width: var(--container-max);
    margin-inline: auto;
    position: relative;
}

.top-bar-text {
    font-size: var(--text-sm);
    font-weight: 500;
    text-align: center;
}

.top-bar-cta {
    background: rgba(255,255,255,0.18);
    color: var(--color-white);
    padding: var(--space-1) var(--space-4);
    border-radius: var(--radius-pill);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    border: 1.5px solid rgba(255,255,255,0.5);
    transition: background var(--transition-fast);
}

.top-bar-cta:hover {
    background: rgba(255,255,255,0.32);
    color: var(--color-white);
}

.top-bar-close {
    position: absolute;
    right: var(--space-6);
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.8);
    font-size: var(--text-lg);
    line-height: 1;
    padding: var(--space-2);
    border-radius: 50%;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.top-bar-close:hover {
    background: rgba(255,255,255,0.2);
    color: var(--color-white);
}

/* =============================================================
   5. SITE HEADER & NAVIGATION
   ============================================================= */
.site-header {
    position: static;
    z-index: auto;
    background: var(--color-white);
    box-shadow: var(--shadow-header);
    height: var(--header-height);
    border-bottom: 2px solid #0d50a1;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-8);
    height: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--space-6);
}

/* Logo */
.site-logo a,
.site-logo .custom-logo-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.site-logo a img.logo {
    height: 94px;
    width: auto;
}

.logo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-navy);
    color: var(--color-white);
    font-size: var(--text-xs);
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    min-width: 90px;
}

/* Nav menu */
.primary-navigation {
    flex: 1;
    display: flex;
    justify-content: center;
}

#primary-menu-list > li:first-child > a {
    position: relative;
    padding-right: 18px; /* space for arrow */
}

#primary-menu-list > li:first-child > a::after {
    content: "▼";
    margin-left: 6px;
    font-size: 0.7em;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.nav-menu li {
    position: relative;
}

.nav-menu > li > a {
    display: block;
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-main-menu);
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background var(--transition-fast);
}

.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a {
    color: var(--color-orange);
    background: var(--color-orange-light);
}

/* Dropdown */
.nav-menu .sub-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 200px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: var(--space-2) 0;
}

.nav-menu .sub-menu a {
    display: block;
    padding: var(--space-2) var(--space-5);
    font-size: var(--text-sm);
    color: var(--color-dark);
    transition: background var(--transition-fast), color var(--transition-fast);
}

.nav-menu .sub-menu a:hover {
    background: var(--color-light);
    color: var(--color-orange);
}

.nav-menu li:hover > .sub-menu {
    display: block;
}

/* Header actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.nav-toggle:hover { background: var(--color-light); }

.hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-dark);
    border-radius: 2px;
    transition: transform var(--transition-base), opacity var(--transition-fast);
}

#eu-values-panel {
    display: none;
}

#eu-values-panel.is-open {
    display: flex;
    justify-content: center;   /* centers the whole row */
    align-items: center;
    gap: 18px;
    flex-wrap: nowrap;
    padding: 20px;
    overflow-x: auto;
}

/* larger circles (double size) */
.eu-value-item {
    position: relative;
    width: 180px;
    height: 180px;
    min-width: 180px;
    border: 2px solid #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    background: #fff;
    overflow: hidden;
}

/* Color variations */
.eu-value-item:nth-child(1) { border-color: #791d72; color: #791d72; }
.eu-value-item:nth-child(1):hover { background: #fff; color: #791d72; }

.eu-value-item:nth-child(2) { border-color: #306c88; color: #306c88; }
.eu-value-item:nth-child(2):hover { background: #fff; color: #306c88; }

.eu-value-item:nth-child(3) { border-color: #e26e09; color: #e26e09; }
.eu-value-item:nth-child(3):hover { background: #fff; color: #e26e09; }

.eu-value-item:nth-child(4) { border-color: #e7a721; color: #e7a721; }
.eu-value-item:nth-child(4):hover { background: #fff; color: #e7a721; }

.eu-value-item:nth-child(5) { border-color: #809141; color: #809141; }
.eu-value-item:nth-child(5):hover { background: #fff; color: #809141; }

.eu-value-item:nth-child(6) { border-color: #e7366d; color: #e7366d; }
.eu-value-item:nth-child(6):hover { background: #fff; color: #e7366d; }

/* title */
.eu-value-item h3 {
    font-size: 16px;
    margin: 0;
    padding: 10px;
    text-transform: uppercase;
    transition: opacity 0.2s ease;
}

/* hover content */
.eu-value-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    font-size: 13px;
    text-align: center;

    opacity: 0;
    transform: scale(0.95);
    transition: 0.25s ease;
}

/* hover swap */
.eu-value-item:hover h3 {
    opacity: 0;
}

.eu-value-item:hover .eu-value-content {
    opacity: 1;
    transform: scale(1);
}


/* Remove list styling (Polylang usually outputs <li>) */
.lang-item,
.lang-item li,
.lang-item ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Make it inline */
.lang-item {
  display: inline-block;
}

.lang-item + .lang-item::before {
  content: " | ";
  color: #0d50a1;
  margin: 0;
}

/* Each language item */
.lang-item li {
  display: inline;
  margin: 0;
  padding: 0;
}

/* Language links */
.lang-item a {
  color: #0d50a1;
  text-transform: uppercase;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.5px;
}

/* Add separator AFTER each item except last */
.lang-item li:not(:last-child)::after {
  content: " | ";
  color: #0d50a1;
  margin: 0 6px;
}

/* Social media */
.header-social {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-left:25px;
}

/* Icons */
.header-social a {
  color: #0d50a1;
  font-size: 18px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Hover effect */
.header-social a:hover {
  opacity: 0.75;
}

/* =============================================================
   6. FOOTER — BLUE MAIN SECTION
   ============================================================= */
.site-footer {
    margin-top: auto;
}

.footer-main {
    background: var(--color-navy);
    color: var(--color-navy-text);
    padding-block: var(--space-16) var(--space-12);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12) var(--space-16);
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--space-6);
    align-items: start;
}

.footer-disclaimer {
    display: grid;
    max-width: var(--container-max);
    margin-inline: auto;
    margin-top: 20px;
    padding-inline: var(--space-3);
    align-items: start;
    text-align: center;
}

/* Footer logo */
.footer-logo {
	width:310px;
	height:100px;
	background:#fff;
    margin-bottom: var(--space-6);
	    border-radius: 8px;
}

.footer-logo img.logo {
   
    width: auto;
}

.footer-logo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.15);
    color: var(--color-white);
    font-size: var(--text-xs);
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-sm);
    border: 1.5px solid rgba(255,255,255,.25);
}

/* Newsletter */
.footer-newsletter-label {
    font-size: var(--text-sm);
    color: rgba(255,255,255,.8);
    margin-bottom: var(--space-4);
    line-height: 1.5;
}

.footer-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    max-width: 320px;
    align-items: flex-start;
}

.footer-newsletter-input {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    background: rgba(255,255,255,.1);
    color: var(--color-white);
    border: 1.5px solid rgba(255,255,255,.3);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color var(--transition-fast), background var(--transition-fast);
	border-radius:18px;
}

.footer-newsletter-input::placeholder {
    color: rgba(255,255,255,.5);
}

.footer-newsletter-input:focus {
    border-color: rgba(255,255,255,.7);
    background: rgba(255,255,255,.15);
}

/* Footer navigation links */
.footer-col--links {
    display: flex;
    justify-content: flex-end;
}

.footer-nav-menu {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.footer-nav-menu a {
    font-size: var(--text-sm);
    color: rgba(255,255,255,.8);
    font-weight: 500;
    transition: color var(--transition-fast);
    padding-block: var(--space-1);
}



/* =============================================================
   7. FOOTER — WHITE LEGAL / PARTNER STRIP
   ============================================================= */
.footer-legal {
    background: var(--color-white);
    border-top: 1px solid var(--color-border);
    padding-block: var(--space-6);
}

.footer-legal-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-partners {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-bottom: 20px;
}



.footer-partners img.partner-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.partner-logo-placeholder {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--color-mid);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    padding: var(--space-1) var(--space-3);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
}

.partner-eu {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.eu-flag-icon {
    color: var(--color-navy);
    font-size: var(--text-lg);
}

/* Legal text */
.footer-legal-text {
    max-width: 600px;
    font-size: var(--text-xs);
    color: var(--color-mid);
    line-height: 1.6;
    text-align: right;
}

/* =============================================================
   8. GENERAL CONTENT SECTIONS (reference styles for page templates)
   ============================================================= */

.site-content {
    max-width: var(--container-max);
    margin-inline: auto;
	padding:0 25px;
}

/* Section defaults */
.site-content section {
    padding-block: var(--space-20);
}

/* Section headings */
.section-eyebrow {
    display: block;
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-orange);
    margin-bottom: var(--space-3);
}

.section-title {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-dark);
    margin-bottom: var(--space-4);
}

.section-subtitle {
    font-size: var(--text-lg);
    color: var(--color-mid);
    max-width: 640px;
    margin-inline: auto;
    line-height: 1.6;
}


.subpage-heading {
    position: relative;
    display: block;
    margin-top: 100px;
}

.subpage-title {
    position: relative;
    z-index: 1;
    font-size: 50px;
	font-weight:700;
    font-family: var(--font-body);
    color: #033b80;
	margin-left:3px;
}

.subpage-heading img {
    position: absolute;
    top: -55px;
    left: 0;
    transform: none;
    z-index: 2;
    pointer-events: none;
    width: 283px !important;
    height: auto;
}






/* Card grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-6);
    margin-top: var(--space-10);
}

.card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-6);
    box-shadow: var(--shadow-card);
    transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,.10);
    transform: translateY(-3px);
}

.card-icon {
    width: 48px;
    height: 48px;
    background: var(--color-orange-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-4);
    color: var(--color-orange);
    font-size: var(--text-xl);
}

.card-title {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: var(--space-2);
}

.card-body {
    font-size: var(--text-sm);
    color: var(--color-mid);
    line-height: 1.6;
}

/* Carousel nav buttons */
.carousel-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    margin-top: var(--space-8);
}

.carousel-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    background: var(--color-white);
    color: var(--color-dark);
    font-size: var(--text-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.carousel-btn:hover,
.carousel-btn.is-active {
    border-color: var(--color-orange);
    background: var(--color-orange);
    color: var(--color-white);
}

/* "Who can apply?" rows */
.eligibility-section {
    background: var(--color-white);
}

.eligibility-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-8);
    margin-bottom: var(--space-10);
    flex-wrap: wrap;
}

.eligibility-header-text {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 700;
}

.eligibility-header-note {
    max-width: 400px;
    font-size: var(--text-sm);
    color: var(--color-mid);
    background: var(--color-light);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-lg);
    line-height: 1.6;
}

.eligibility-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.eligibility-item {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    padding: var(--space-6) var(--space-6);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-white);
    transition: box-shadow var(--transition-fast);
}

.eligibility-item:hover {
    box-shadow: var(--shadow-card);
}

.eligibility-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    background: var(--color-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-2xl);
    color: var(--color-navy);
}

.eligibility-number {
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--color-orange);
    min-width: 2ch;
}

.eligibility-label {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--color-dark);
}

/* Helpdesk CTA band */
.helpdesk-band {
    text-align: center;
    background: var(--color-light);
    padding-block: var(--space-16);
}

.helpdesk-band .section-title {
    margin-bottom: var(--space-3);
}

.helpdesk-band .section-subtitle {
    margin-bottom: var(--space-6);
}

/* =============================================================
   9. WORDPRESS BLOCK EDITOR COMPATIBILITY
   ============================================================= */
.wp-block-group.is-layout-constrained > *,
.entry-content > * {
    width: min(var(--container-max), calc(100% - 48px));
    margin-inline: auto;
}

.wp-block-image img {
    border-radius: var(--radius-md);
}

.wp-block-button__link {
    background: var(--color-orange);
    color: var(--color-white);
    border-radius: var(--radius-pill);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: var(--space-3) var(--space-6);
    transition: background var(--transition-fast);
}

.wp-block-button__link:hover {
    background: var(--color-orange-hover);
}

/* =============================================================
   10. RESPONSIVE
   ============================================================= */

/* Tablet */
@media (max-width: 1024px) {
    :root {
        --text-3xl: 1.875rem;
        --text-4xl: 2.5rem;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: var(--space-10);
    }

    .footer-col--links {
        justify-content: flex-start;
    }

    .footer-nav-menu {
        flex-direction: row;
        flex-wrap: wrap;
        gap: var(--space-2) var(--space-8);
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
        --topbar-height: auto;
        --text-3xl: 1.6rem;
        --text-2xl: 1.35rem;
    }

    .top-bar-inner {
        flex-wrap: wrap;
        height: auto;
        padding-block: var(--space-3);
        gap: var(--space-3);
        text-align: center;
    }

    .top-announcement-bar.is-visible {
        max-height: 200px; /* allow wrap on mobile */
    }

    .top-bar-close {
        position: static;
        transform: none;
    }

    /* Nav collapse */
    .primary-navigation {
        position: absolute;
        top: calc(var(--header-height));
        left: 0;
        right: 0;
        background: var(--color-white);
        box-shadow: var(--shadow-header);
        border-top: 1px solid var(--color-border);
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition-base);
        justify-content: flex-start;
    }

    .primary-navigation.nav-open {
        max-height: 600px;
    }

    .nav-menu {
        flex-direction: column;
        align-items: stretch;
        padding: var(--space-4) var(--space-6);
        gap: 0;
    }

    .nav-menu > li > a {
        padding-block: var(--space-3);
        border-radius: 0;
        border-bottom: 1px solid var(--color-border);
    }

    .nav-toggle {
        display: flex;
    }

    .btn-apply {
        font-size: var(--text-xs);
        padding: var(--space-2) var(--space-4);
    }

    .eligibility-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .footer-legal-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-5);
    }

    .footer-legal-text {
        text-align: left;
    }

    .site-content section {
        padding-block: var(--space-12);
    }
}

/* Print */
@media print {
    .top-announcement-bar,
    .site-header,
    .site-footer { display: none; }

    body { color: #000; background: #fff; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    .top-announcement-bar {
        transition: none;
    }
}


.connect-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0 40px;
}

.connect-filters a {
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 999px;
    text-decoration: none;
}

.connect-filters a.active {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.connect-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(300px,1fr));
    gap: 30px;
}