/* ============================================
   SHARED DESIGN VALUES
   One set used by the home page dashboard, the publications search
   page and the rest of the site, so they stay consistent.
   ============================================ */
:root {
    --nso-font:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --nso-teal:        #26a69a;   /* brand / primary */
    --nso-teal-dark:   #00897b;
    --nso-teal-tint:   rgba(38, 166, 154, 0.09);
    --nso-teal-line:   rgba(38, 166, 154, 0.22);
    --nso-link:        #1a56a0;   /* titles and links */
    --nso-link-hover:  #12407a;
    --nso-text:        #1a1a1a;
    --nso-text-muted:  #718096;
    --nso-border:      #e0e0e0;
    --nso-radius:      10px;
    --nso-radius-pill: 20px;
    --nso-shadow:      0 2px 8px rgba(0, 0, 0, 0.07);
    --nso-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Forms in the site font. Elementor's global kit sets labels and inputs to
   "Quicksand", which showed up in the feedback form, filters and job forms. */
body[class*="elementor-kit-"] label,
body[class*="elementor-kit-"] input:not([type="button"]):not([type="submit"]),
body[class*="elementor-kit-"] textarea,
body[class*="elementor-kit-"] select,
body[class*="elementor-kit-"] .elementor-field-textual {
    font-family: var(--nso-font);
}

/* Type label used on cards everywhere (Report, Bulletin, Publication, Dataset, News). */
.nso-type-pill {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    background: var(--nso-teal-tint);
    color: var(--nso-teal-dark);
    border: 1px solid var(--nso-teal-line);
    border-radius: var(--nso-radius-pill);
    padding: 2px 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

/* ============================================
   WHITE THEME - HEADER & FOOTER
   ============================================ */

/* ── Inter 700 font across the entire header ── */
.abp-custom-header,
.abp-custom-header .abp-nav-menu > li > a,
.abp-custom-header .abp-site-title,
.abp-custom-header .abp-search-submit,
.abp-custom-header .abp-social-btn,
.abp-custom-header .abp-mobile-nav a,
.abp-custom-header .abp-mega-mobile-list a,
.abp-custom-header .abp-mobile-section-head,
.abp-custom-header .abp-drawer-social-btn {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-weight: 700 !important;
    font-style: normal !important;
    line-height: 24px !important;
}

/* Search input: Inter but 400 weight for readability */
.abp-custom-header .abp-search-input {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-weight: 400 !important;
    font-size: 16px !important;
    line-height: 24px !important;
}



/* ── Header - STICKY FIX for ALL browsers ── */
.abp-custom-header.abp-white-header {
    background: #ffffff;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-shadow: 0 1px 0 rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    transition: none !important;
}

/* Edge-specific fix */
@supports (-ms-ime-align: auto) {
    .abp-custom-header.abp-white-header {
        -webkit-transform: none !important;
        transform: none !important;
        top: 0 !important;
    }
}

/* Admin bar adjustment */
.admin-bar .abp-custom-header.abp-white-header {
    top: 0 !important;
}

#wpadminbar {
    position: fixed !important;
    top: 0 !important;
    z-index: 99999 !important;
}

body {
    margin: 0 !important;
    /* Site-wide body font. Without this, content outside the header (report and
       bulletin text, hero titles, sidebars) fell back to the browser's default serif,
       because style.css (which set it) is never enqueued. Inter is already loaded. */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Visually hidden but read by screen readers and search engines (WordPress convention). */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.site-main {
    padding-top: 0 !important;
    /* No forced min-height: the footer follows the content, so short pages leave no gap */
    min-height: 0;
}

html {
    margin: 0 !important;
    padding: 0 !important;
}

@media (max-width: 782px) {
    .admin-bar .abp-custom-header.abp-white-header {
        top: 0 !important;
    }
}

.abp-header-container {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0 2.5rem;
    box-sizing: border-box;
}

/* ── Row 1: Logo + Inline Search + Social ── */
.abp-topbar.abp-topbar-row1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    padding: 0.4rem 0;
    gap: 1rem;
    flex-wrap: nowrap;
    border-bottom: none;
}

@media (max-width: 1280px) {
    .abp-topbar.abp-topbar-row1 {
        gap: 0.5rem;
    }
}

/* ── Inline search (row 1, desktop only) ── */
.abp-inline-search {
    flex: 0 0 480px;
    max-width: 480px;
    margin-left: auto;
    margin-right: 0;
}

.abp-search-form-inline {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 6px;
    /* Browsers in "quirks mode" (which happens whenever anything is printed before the
       <!DOCTYPE>, e.g. a PHP notice) give every <form> a 1em bottom margin. That extra
       16px made the search pill sit 8px above the logo and social icons. Reset it. */
    margin: 0;
    padding: 0;
}

/* Header row 1: every item shares the same centre line, whatever the rendering mode */
.abp-topbar.abp-topbar-row1 > * {
    align-self: center;
}
.abp-custom-header form {
    margin: 0;
}
.abp-inline-search {
    display: flex;
    align-items: center;
}

.abp-search-form-inline .abp-search-inner {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid #26a69a;
    border-radius: 50px;
    padding: 0 0.75rem 0 0.9rem;
    height: 32px;
    gap: 0.5rem;
    flex: 1;
    transition: border-color 0.2s ease;
}

.abp-search-form-inline .abp-search-inner:focus-within {
    border-color: #26a69a;
}

.abp-search-form-inline .abp-search-inner svg {
    color: #999;
    flex-shrink: 0;
}

.abp-search-form-inline .abp-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    color: #1a1a1a;
    outline: none;
    min-width: 0;
}

/* Header pill input: explicit box so no page/plugin stylesheet (e.g. a global
   .abp-search-input with padding/border/radius) can change the header's height. */
.abp-custom-header .abp-search-form-inline .abp-search-input {
    box-sizing: border-box;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
.abp-custom-header .abp-search-form-inline .abp-search-input:focus {
    border: 0;
    box-shadow: none;
}

.abp-search-form-inline .abp-search-input::placeholder {
    color: #aaa;
}

.abp-search-form-inline .abp-search-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #26a69a;
    border: none;
    border-radius: 50px;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    height: 26px;
    padding: 0 0.75rem;
    flex-shrink: 0;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.abp-search-form-inline .abp-search-submit svg { display: none; }
.abp-search-form-inline .abp-search-submit::after { content: 'Search'; }
.abp-search-form-inline .abp-search-submit:hover { background: #1e8f85; }

/* ── Row 2: Navigation bar ── */
.abp-navbar-row2 {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 40px;
    background: #ffffff;
    border-top: none;
    margin-top: 0;
}

.abp-navbar-row2 .abp-desktop-nav {
    flex: unset;
    justify-content: flex-start;
}

/* Body padding = real header height, measured by the script in header.php
   (--abp-header-h). The px values are only no-JS fallbacks. */
body {
    padding-top: var(--abp-header-h, 100px) !important;
}

@media (max-width: 991px) {
    /* On mobile, row2 nav is hidden; only row1 shows */
    .abp-navbar-row2 {
        display: none;
    }
    body {
        padding-top: var(--abp-header-h, 65px) !important;
    }
    /* Hide inline search on mobile (toggle button handles it) */
    .abp-inline-search {
        display: none;
    }
}

@media (max-width: 600px) {
    body {
        padding-top: var(--abp-header-h, 60px) !important;
    }
}

/* ── Logo ── */
.abp-header-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    height: 100%;
}

.abp-header-logo img,
.abp-header-logo .custom-logo {
    max-height: 72px;
    max-width: 280px;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Only shrink logo at genuinely tight widths */
@media (max-width: 1050px) {
    .abp-header-logo img,
    .abp-header-logo .custom-logo {
        max-height: 50px;
        max-width: 185px;
    }
}

.abp-site-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #1a1a1a;
    text-decoration: none;
    letter-spacing: 1px;
    white-space: nowrap;
}

.abp-site-title:hover { color: #26a69a; }

/* ── Desktop Navigation ── */
.abp-desktop-nav {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    min-width: 0;
}

.abp-nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: 0;
}

.abp-nav-menu > li {
    position: relative;
    flex-shrink: 1;             /* allow items to compress when space is tight */
    min-width: 0;
}

.abp-nav-menu > li > a {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0.5rem 0.85rem;
    color: #000000 !important;
    font-weight: 700 !important;
    text-decoration: none;
    font-size: 1.05rem;        /* bumped up, padding trimmed to keep row height */
    letter-spacing: 0.2px;
    padding: 0.35rem 0.85rem;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

/* Only compress padding at genuine projector/tablet widths.
   Font stays readable; only padding shrinks first. */
@media (max-width: 1200px) {
    .abp-nav-menu > li > a {
        padding: 0.35rem 0.55rem;
        font-size: 1.0rem;
    }
}

@media (max-width: 1050px) {
    .abp-nav-menu > li > a {
        padding: 0.35rem 0.35rem;
        font-size: 0.95rem;
        letter-spacing: 0;
    }
}

.abp-nav-menu > li > a:hover { 
    color: #26a69a !important; 
}

/* Chevron arrow */
.abp-nav-menu > li > a[data-dropdown]::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    margin-top: 1px;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.abp-nav-menu > li:hover > a[data-dropdown]::after {
    transform: rotate(180deg);
}

/* Show standard dropdown on both hover and JS-toggled click */
.abp-desktop-nav .abp-nav-menu > li:hover > .abp-sub-menu,
.abp-desktop-nav .abp-nav-menu > li.abp-dropdown-open > .abp-sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}
.abp-sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    min-width: 220px;
    padding: 0.5rem 0;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.22s ease;
    z-index: 10000;
    border: 1px solid rgba(0,0,0,0.07);
    border-top: none;
    list-style: none;
}

/* Only apply hover-open to NON-mega dropdowns */
.abp-menu-item:not(.abp-mega-parent):hover > .abp-sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.abp-sub-menu li { list-style: none; }

.abp-sub-menu a {
    display: block;
    padding: 0.5rem 1.25rem;
    color: #1a56a0;
    font-weight: 500;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.18s ease;
}

.abp-sub-menu a:hover {
    background: #e8f5f4;
    color: #26a69a;
    padding-left: 1.5rem;
}

/* ── Social buttons ── */
.abp-social-links {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.abp-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    text-decoration: none;
    transition: opacity 0.2s ease, transform 0.15s ease;
}

.abp-social-btn:hover {
    background: #1e8f85 !important;
    opacity: 1;
    transform: translateY(-1px);
}

.abp-social-btn.abp-facebook { background: #26a69a; color: #ffffff; }
.abp-social-btn.abp-youtube  { background: #26a69a; color: #ffffff; }
.abp-social-btn.abp-twitter  { background: #26a69a; color: #ffffff; }
.abp-social-btn.abp-linkedin { background: #26a69a; color: #ffffff; }

.abp-social-btn svg {
    width: 16px;
    height: 16px;
}

/* Search button */
.abp-search {
    background: #f0f0f0;
    color: #1a1a1a;
    border: 1.5px solid #d0d0d0;
    cursor: pointer;
    font: inherit;
    padding: 0;
    width: 32px;
    height: 32px;
}

.abp-search:hover,
.abp-search[aria-expanded="true"] {
    background: #26a69a;
    color: #ffffff;
    border-color: #26a69a;
}

.abp-search[aria-expanded="true"] {
    background: #1e8f85;
    border-color: #1e8f85;
}

.abp-search svg {
    width: 14px;
    height: 14px;
}

/* ── Mobile search button - FIXED POSITION ── */
.abp-mobile-search-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    color: #1a1a1a;
    margin-right: 0.3rem;
}

.abp-mobile-search-btn:hover { color: #26a69a; }

.abp-mobile-search-btn svg {
    width: 18px;
    height: 18px;
}

/* ── Hamburger - FIXED POSITION ── */
.abp-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    flex-shrink: 0;
    margin-left: 0;
}

.abp-nav-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: #1a1a1a;
    border-radius: 3px;
    transition: transform 0.25s ease, opacity 0.25s ease;
    transform-origin: center;
}

.abp-nav-toggle.abp-toggle-active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.abp-nav-toggle.abp-toggle-active span:nth-child(2) { opacity: 0; }
.abp-nav-toggle.abp-toggle-active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ── Search bar panel ── */
.abp-search-bar {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.28s ease, padding 0.28s ease;
    background: #ffffff;
    border-top: 1px solid transparent;
}

.abp-search-bar.abp-search-open {
    max-height: 80px;
    padding: 0.6rem 0;
    border-top-color: #e8e8e8;
}

.abp-search-inner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #f7f7f7;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.4rem 0.8rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.abp-search-inner:focus-within {
    border-color: #26a69a;
    box-shadow: 0 0 0 3px rgba(38,166,154,0.12);
    background: #ffffff;
}

.abp-search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.95rem;
    color: #1a1a1a;
    min-width: 0;
    padding: 0;
}

.abp-search-input::placeholder { color: #aaa; }

.abp-search-submit {
    flex-shrink: 0;
    background: #26a69a;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 0.35rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.abp-search-submit:hover { background: #1e8f85; }

/* ── Mobile drawer — slides in from top, full-width ── */
.abp-mobile-drawer {
    display: none;           /* hidden by default on all sizes */
    position: fixed;
    top: var(--abp-header-h, 64px); /* sits flush below the header rows */
    left: 0;
    right: 0;
    width: 100%;
    max-height: calc(100vh - var(--abp-header-h, 64px));
    overflow-y: auto;
    background: #ffffff;
    border-top: 3px solid #26a69a;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 9998;
    transform: translateY(-8px);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.abp-mobile-drawer.abp-drawer-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ── Mobile nav list ── */
.abp-mobile-nav {
    display: none;
    width: 100%;
}

.abp-mobile-nav .abp-nav-menu {
    flex-direction: column;
    width: 100%;
    padding: 0;
    margin: 0;
}

/* Top-level items */
.abp-mobile-nav .abp-nav-menu > li {
    border-bottom: 1px solid #f0f0f0;
}

.abp-mobile-nav .abp-nav-menu > li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.abp-mobile-nav .abp-nav-menu > li > a:hover,
.abp-mobile-nav .abp-nav-menu > li.abp-sub-open > a {
    background: #f5f7f7;
    color: #26a69a;
}

/* Chevron handled in the responsive block below */

/* Sub-menu panel — accordion style */
.abp-mobile-nav .abp-sub-menu,
.abp-mobile-nav .abp-mega-panel {
    display: none !important;
}

/* Flat mobile child list replaces mega panel */
.abp-mobile-nav .abp-mega-mobile-list {
    display: none;
    background: #f9fbfb;
    border-top: 1px solid #e8e8e8;
    padding: 0.35rem 0;
}

.abp-mobile-nav .abp-menu-item.abp-sub-open > .abp-mega-mobile-list {
    display: block;
}

/* Mobile child links */
.abp-mobile-nav .abp-mega-mobile-list a {
    display: block;
    padding: 0.6rem 1.5rem 0.6rem 2rem;
    font-size: 0.93rem;
    font-weight: 500;
    color: #1a56a0;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.12s ease, color 0.12s ease;
}

.abp-mobile-nav .abp-mega-mobile-list a:last-child {
    border-bottom: none;
}

.abp-mobile-nav .abp-mega-mobile-list a:hover {
    background: #e8f5f4;
    color: #26a69a;
    padding-left: 2.35rem;
}

/* Section headings inside mobile list */
.abp-mobile-nav .abp-mega-mobile-list .abp-mobile-section-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.5rem 0.3rem;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #26a69a;
    background: transparent;
    border-bottom: none;
    pointer-events: none;
}

/* Social strip at bottom of drawer */
.abp-drawer-social {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    border-top: 1px solid #e8e8e8;
    background: #fafafa;
    flex-wrap: wrap;
}

.abp-drawer-social-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s ease;
    color: #ffffff;
    background: #26a69a;
}

.abp-drawer-social-btn:hover { opacity: 0.85; }

.abp-drawer-social-btn svg {
    width: 16px;
    height: 16px;
}

/* ── Hamburger button ── */
.abp-nav-toggle {
    display: none;       /* hidden on desktop */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    flex-shrink: 0;
    transition: background 0.15s ease;
}

.abp-nav-toggle:hover { background: #f0f0f0; }

.abp-nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #1a1a1a;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
    transform-origin: center;
}

/* Animate to × when active */
.abp-nav-toggle.abp-toggle-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.abp-nav-toggle.abp-toggle-active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.abp-nav-toggle.abp-toggle-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile search button ── */
.abp-mobile-search-btn {
    display: none;       /* hidden on desktop */
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    flex-shrink: 0;
    padding: 4px;
    transition: background 0.15s ease;
}

.abp-mobile-search-btn:hover { background: #f0f0f0; }

/* ── RESPONSIVE BREAKPOINTS ── */

@media (max-width: 991px) {
    /* Show hamburger + mobile search, hide desktop search + social */
    .abp-nav-toggle        { display: flex; }
    .abp-mobile-search-btn { display: flex; }
    .abp-inline-search     { display: none; }
    .abp-social-links      { display: none; }

    /* Show drawer when open */
    .abp-mobile-drawer { display: block; }
    .abp-mobile-nav    { display: block; }

    /* Hide desktop nav row entirely */
    .abp-navbar-row2 { display: none; }

    /* Row 1: logo expands to fill space, icons group flush right */
    .abp-topbar.abp-topbar-row1 {
        height: 60px;
        padding: 0.3rem 0;
        gap: 0.25rem;
    }

    /* Logo takes all remaining space so icons naturally push right */
    .abp-topbar.abp-topbar-row1 .abp-header-logo {
        flex: 1;
        min-width: 0;
    }

    /* Search + hamburger sit flush next to each other */
    .abp-mobile-search-btn,
    .abp-nav-toggle {
        flex-shrink: 0;
        margin-left: 0;
    }

    /* Suppress standard dropdown <ul> on mobile — mobile list handles it */
    .abp-mobile-nav .abp-sub-menu {
        display: none !important;
    }

    /* Suppress all mega panels on mobile */
    .abp-mega-panel { display: none !important; }

    body { padding-top: var(--abp-header-h, 60px) !important; }

    /* ── Fix mobile menu chevron ──
       Desktop nav ::after is a border-triangle (no content), so
       content:none alone won't hide it — must zero the borders too. */
    .abp-mobile-nav .abp-nav-menu > li > a::after {
        display: none !important;
        border: none !important;
        width: 0 !important;
        height: 0 !important;
    }

    .abp-mobile-nav .abp-nav-menu > li > a[data-dropdown]::after {
        content: ''  !important;
        display: inline-block !important;
        width: 8px   !important;
        height: 8px  !important;
        border-right: 2px solid #26a69a !important;
        border-bottom: 2px solid #26a69a !important;
        border-left: none !important;
        border-top: none  !important;
        background: none  !important;
        transform: rotate(45deg) !important;
        margin-left: auto !important;
        flex-shrink: 0    !important;
        transition: transform 0.2s ease !important;
    }

    .abp-mobile-nav .abp-nav-menu > li.abp-sub-open > a[data-dropdown]::after {
        transform: rotate(-135deg) !important;
    }

    /* Left-align top-level links */
    .abp-mobile-nav .abp-nav-menu > li > a {
        justify-content: flex-start;
        text-align: left;
    }
}

@media (max-width: 600px) {
    .abp-topbar.abp-topbar-row1 {
        height: 56px;
        padding: 0.25rem 0;
    }
    .abp-header-container { padding: 0 1rem; }
    .abp-header-logo img,
    .abp-header-logo .custom-logo {
        max-height: 40px !important;
        max-width: 160px !important;
    }
    body { padding-top: var(--abp-header-h, 56px) !important; }
    .abp-mobile-drawer { top: var(--abp-header-h, 56px); max-height: calc(100vh - var(--abp-header-h, 56px)); }
}


/* ============================================
   MEGA MENU
   ============================================ */

/*
 * The panel anchors to the <li> like a normal dropdown — position:absolute
 * relative to the <li> (which is position:relative via .abp-nav-menu > li).
 * Width is content-driven: min 180px per column, grows with content, never
 * wider than the viewport. This mirrors the Eurostat compact-panel style.
 */
.abp-menu-item.abp-mega-parent {
    position: relative; /* panel positions relative to this <li> */
}

/* ── Mega panel wrapper ── */
.abp-mega-panel {
    position: absolute;
    top: calc(100% + 2px);  /* flush below the nav link + tiny gap */
    left: 0;
    right: auto;            /* width driven by content, not stretched */
    min-width: 520px;       /* enough for 2 columns before growing */
    width: max-content;     /* shrink/grow to fit columns */
    max-width: 90vw;        /* never overflow viewport */
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-top: 3px solid #26a69a;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.12);
    z-index: 9997;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, visibility 0.18s ease;
    pointer-events: none;
}

/* If the panel would overflow the right edge, anchor it to the right instead */
.abp-mega-parent.abp-mega-flip > .abp-mega-panel {
    left: auto;
    right: 0;
}

/* Panel shown via JS (.abp-mega-open added to <li>) */
.abp-mega-parent.abp-mega-open > .abp-mega-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Keyboard users */
.abp-mega-parent:focus-within > .abp-mega-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Invisible hover bridge — covers the 2px gap above the panel */
.abp-mega-panel::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
}

/* ── Inner layout — clips columns to panel shape ── */
.abp-mega-inner {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    padding: 0;
    overflow: hidden;               /* clips columns to panel border-radius */
    border-radius: 0 0 6px 6px;    /* matches panel */
    background: #ffffff;            /* single shared background */
}

/* ── Individual column — transparent bg, only a right divider line ── */
.abp-mega-col {
    flex: 1 1 180px;
    min-width: 160px;
    max-width: 260px;
    padding: 1.1rem 1.25rem 1.25rem;
    background: transparent;        /* no individual background */
    box-shadow: none;               /* no individual shadow */
    border-right: 1px solid #e8e8e8;
    box-sizing: border-box;
}

.abp-mega-col:last-child {
    border-right: none;
}

/* ── Column heading — bold dark, like Eurostat ── */
.abp-mega-col-heading {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: none;
    letter-spacing: 0;
    color: #1a1a1a;              /* dark, not coloured */
    padding-bottom: 0.55rem;
    margin-bottom: 0.4rem;
    border-bottom: 2px solid #26a69a;  /* single teal underline */
    white-space: nowrap;
}

.abp-mega-col-heading i {
    font-size: 0.8rem;
    color: #26a69a;
    flex-shrink: 0;
}

/* ── Mega list ── */
.abp-mega-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Individual item ── */
.abp-mega-item {
    list-style: none;
}

.abp-mega-item a {
    display: block;
    padding: 0.42rem 0.1rem;
    color: #1a56a0;              /* blue links */
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    line-height: 1.4;
    transition: color 0.14s ease, padding-left 0.14s ease;
}

.abp-mega-item a:hover {
    color: #26a69a;
    padding-left: 0.4rem;
    text-decoration: underline;
}

/* ── Icon colour stays teal across all types ── */
.abp-mega-col-heading i { color: #26a69a; }

/* Type-specific heading underline colours (subtle) */
.abp-mega-type-abp_report_type      .abp-mega-col-heading { border-bottom-color: #26a69a; }
.abp-mega-type-abp_report_type      .abp-mega-col-heading i { color: #26a69a; }
.abp-mega-type-abp_bulletin_type    .abp-mega-col-heading { border-bottom-color: #26a69a; }
.abp-mega-type-abp_bulletin_type    .abp-mega-col-heading i { color: #26a69a; }
.abp-mega-type-abp_publication_type .abp-mega-col-heading { border-bottom-color: #26a69a; }
.abp-mega-type-abp_publication_type .abp-mega-col-heading i { color: #26a69a; }
.abp-mega-type-abp_data_type        .abp-mega-col-heading { border-bottom-color: #26a69a; }
.abp-mega-type-abp_data_type        .abp-mega-col-heading i { color: #26a69a; }
.abp-mega-type-abp_news_type        .abp-mega-col-heading { border-bottom-color: #26a69a; }
.abp-mega-type-abp_news_type        .abp-mega-col-heading i { color: #26a69a; }

/*
 * .abp-mega-mobile-list — hidden on desktop inside the desktop nav,
 * shown only inside .abp-mobile-nav via the accordion toggle.
 * Reset ALL sub-menu card styles so it never looks like a floating tile.
 */
.abp-desktop-nav .abp-mega-mobile-list,
.abp-mega-parent > .abp-sub-menu {
    display: none !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    position: static !important;
}

/* ── Mobile: mega panels suppressed — handled in responsive block above ── */



/* ============================================
   FOOTER STYLES - FIXED COLUMN LAYOUT
   ============================================ */

/* ── Inter 700 font across the entire footer ── */
.abp-custom-footer,
.abp-custom-footer h4,
.abp-custom-footer p,
.abp-custom-footer a,
.abp-custom-footer .abp-footer-menu li a,
.abp-custom-footer .abp-footer-copyright p {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-weight: 700 !important;
    font-style: normal !important;
    line-height: 24px !important;
}

/* Body/paragraph text in footer: 400 weight for readability */
.abp-custom-footer .abp-contact-info p,
.abp-custom-footer .abp-contact-info p a,
.abp-custom-footer .abp-footer-copyright p {
    font-weight: 400 !important;
}

.abp-custom-footer.abp-white-footer {
    background: #ffffff;
    color: #333333;
    padding: 3rem 0 1.5rem;
    border-top: 1px solid #e0e0e0;
    margin-top: 2rem;
    clear: both;
}

.abp-footer-container {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0 2.5rem;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

/* ── All Footer Column Headings ── */
.abp-footer-col h4 {
    color: #1a1a1a;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.8rem 0;
    padding-bottom: 0.5rem;
    display: inline-block;
}

/* ── Contact Column (STATIC) - HAS UNDERLINE ── */
.abp-footer-contact h4 {
    border-bottom: 2px solid #26a69a;
}

.abp-footer-contact .abp-contact-info p {
    margin: 0.25rem 0;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #333333;
}

.abp-footer-contact .abp-contact-info p strong {
    color: #1a1a1a;
    font-weight: 700;
}

.abp-footer-contact .abp-contact-info p a {
    color: #26a69a;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.abp-footer-contact .abp-contact-info p a:hover {
    color: #00897b;
}

/* ── Footer Menu Column (FROM MENU BUILDER) - NO UNDERLINE ── */
.abp-footer-menu-col {
    display: flex;
    flex-direction: column;
    grid-column: 2 / -1;
}

/* 
 * The menu uses display: flex with row direction
 * so each top-level item becomes a column in a row
 */
.abp-footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 2rem !important;
}

/* Each top-level menu item becomes a column */
.abp-footer-menu .abp-footer-column {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 140px;
}

/* ── PARENT MENU ITEMS (Column Headings) ── */
.abp-footer-menu .abp-footer-heading {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 0.75rem 0;
    padding: 0 0 0.5rem 0;
    border-bottom: 2px solid #26a69a;   /* teal underline separates heading */
    display: block;
    text-decoration: none;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── SUB-MENU ITEMS (Children) - NO UNDERLINE ── */
.abp-footer-sub-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

/* Individual child items - NO underline */
.abp-footer-sub-menu .abp-footer-item {
    margin-bottom: 0;
}

.abp-footer-sub-menu .abp-footer-item a {
    font-size: 0.85rem;
    font-weight: 400;
    color: #555555;
    padding: 0.2rem 0;
    display: inline-block;
    text-decoration: none;
    transition: color 0.2s ease, padding-left 0.15s ease;
}

/* Hover effect for child items */
.abp-footer-sub-menu .abp-footer-item a:hover {
    color: #26a69a;
    padding-left: 0.4rem;
    text-decoration: none;
}

/* ── Copyright ── */
.abp-footer-copyright {
    grid-column: 1 / -1;
    text-align: center;
    padding-top: 2rem;
    margin-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.abp-footer-copyright p {
    margin: 0;
    font-size: 0.95rem;
    color: #888888;
}

/* ============================================
   FOOTER RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .abp-footer-container {
        grid-template-columns: 1.2fr 1fr;
        gap: 1.5rem;
    }
    
    .abp-footer-menu {
        gap: 1.5rem !important;
    }
}

@media (max-width: 768px) {
    .abp-footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    /* Contact takes full width on small screens */
    .abp-footer-contact {
        grid-column: 1 / -1;
    }
    
    .abp-footer-menu-col {
        grid-column: 1 / -1;
    }
    
    .abp-footer-menu {
        gap: 1.5rem !important;
    }
    
    .abp-footer-menu .abp-footer-column {
        min-width: 120px;
    }
    
    .abp-footer-col h4 {
        display: inline-block;
    }
    
    .abp-footer-sub-menu {
        padding-left: 0;
        align-items: flex-start;
    }
    
    .abp-footer-contact .abp-contact-info {
        text-align: left;
    }
    
    .abp-footer-menu .abp-footer-column {
        align-items: flex-start;
    }
    
    .abp-footer-copyright {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .abp-footer-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
    
    .abp-footer-contact {
        grid-column: 1 / -1;
        text-align: center;
    }
    
    .abp-footer-menu-col {
        grid-column: 1 / -1;
    }
    
    .abp-footer-menu {
        flex-direction: column !important;
        align-items: center !important;
        gap: 1.5rem !important;
    }
    
    .abp-footer-menu .abp-footer-column {
        align-items: center;
        min-width: 0;
        width: 100%;
        max-width: 280px;
    }
    
    .abp-footer-sub-menu {
        align-items: center;
    }
    
    .abp-footer-contact .abp-contact-info {
        text-align: center;
    }
    
    .abp-footer-copyright {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .abp-footer-contact .abp-contact-info p {
        font-size: 0.85rem;
    }
    
    .abp-footer-sub-menu .abp-footer-item a {
        font-size: 0.85rem;
    }
    
    .abp-footer-copyright p {
        font-size: 0.8rem;
    }
    
    .abp-footer-container {
        padding: 0 0.75rem;
        gap: 1.2rem;
    }
}

/* =============================================================================
   LARGE-SCREEN REFINEMENTS (≥ 1600px)
   Header and footer containers are now full-width; these rules ensure
   content has comfortable breathing room on wide/ultrawide displays.
   ============================================================================= */

@media (min-width: 1600px) {
    .abp-header-container {
        padding: 0 3rem;
    }

    .abp-footer-container {
        padding: 0 3rem;
        grid-template-columns: 1.2fr 1fr 1fr 1fr; /* allow a 4th column if content warrants */
        gap: 3rem;
    }
}

@media (min-width: 1920px) {
    .abp-header-container {
        padding: 0 4rem;
    }

    .abp-footer-container {
        padding: 0 4rem;
        gap: 4rem;
    }
}
/* ── Generic fallback template (index.php): lists, 404, empty results ── */
.abp-index-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}
.abp-index-item {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 16px;
}
.abp-index-item h2 { font-size: 1.25rem; margin-bottom: 6px; }
.abp-index-item a { color: #1a3c8f; text-decoration: none; }
.abp-index-item a:hover { text-decoration: underline; }
.abp-not-found { text-align: center; padding: 60px 20px; }
.abp-not-found h1 { font-size: 1.75rem; margin-bottom: 12px; }
.abp-not-found p { color: #555; margin-bottom: 20px; }
.abp-not-found .abp-btn-home {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 6px;
    background: #26a69a;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}


/* ============================================
   MOBILE HEADER – never clip, bigger site name
   (kept last so it wins over the earlier duplicate rules)
   ============================================ */

/* Full-width page sections (e.g. the dashboard's 100vw breakout) can make the page a few
   pixels wider than the screen. 'clip' hides that overflow without creating a scroll
   container, so position: sticky (the plugin's sidebar) keeps working. */
html, body {
    max-width: 100%;
    overflow-x: clip;
}
@supports not (overflow: clip) {
    html { overflow-x: hidden; }
}

@media (max-width: 991px) {
    .abp-header-container {
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    /* Grid instead of flex: the logo column can shrink (minmax(0,1fr)) but the search
       and menu buttons always keep their own space, so the hamburger can't be pushed
       off the right edge by a wide logo. */
    .abp-topbar.abp-topbar-row1 {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        align-items: center;
        column-gap: 0.25rem;
        width: 100%;
        box-sizing: border-box;
    }
    .abp-topbar.abp-topbar-row1 .abp-header-logo {
        min-width: 0;
    }
    .abp-mobile-search-btn,
    .abp-nav-toggle {
        margin: 0;
    }

    /* Larger site name: the logo may use all the room the two buttons leave free */
    .abp-header-logo img,
    .abp-header-logo .custom-logo {
        max-height: 48px !important;
        max-width: min(300px, calc(100vw - 140px)) !important;
        width: auto;
        height: auto;
    }
}

@media (max-width: 600px) {
    .abp-header-logo img,
    .abp-header-logo .custom-logo {
        max-height: 44px !important;
        max-width: calc(100vw - 140px) !important;
    }
}


/* ============================================
   FULL-WIDTH DASHBOARD WITHOUT SIDEWAYS OVERFLOW
   The dashboard plugin breaks its sections out of any narrower parent with
   width:100vw. 100vw includes the scrollbar, so the sections were a few pixels wider
   than the visible page, which widened the page and pushed the header's hamburger
   past the edge. --abp-vw (set by a small script in header.php) is the real visible
   width, so the breakout still works for any parent but never overflows.
   ============================================ */
html body .unified-dashboard,
html body .unified-all-reports {
    width: var(--abp-vw, 100vw) !important;
    max-width: var(--abp-vw, 100vw) !important;
    margin-left: calc(var(--abp-vw, 100vw) / -2) !important;
    margin-right: calc(var(--abp-vw, 100vw) / -2) !important;
}

/* ── Mega menu: ONE unified panel (no per-column cards) ──────────────
   Hardened reset so no dropdown/card rule (theme or plugin) can style
   the column lists or items as separate floating tiles. */
html body .abp-desktop-nav .abp-mega-panel .abp-mega-inner{display:flex!important;flex-direction:row!important;align-items:stretch!important;gap:0!important;padding:0!important;margin:0!important;background:#fff!important;box-shadow:none!important;border:0!important}
html body .abp-desktop-nav .abp-mega-panel .abp-mega-col{display:flex!important;flex-direction:column!important;background:transparent!important;box-shadow:none!important;border-top:0!important;border-bottom:0!important;border-left:0!important;border-radius:0!important;margin:0!important;border-right:1px solid #e8e8e8!important;padding:1.1rem 1.25rem 1.25rem!important}
html body .abp-desktop-nav .abp-mega-panel .abp-mega-col:last-child{border-right:0!important}
html body .abp-desktop-nav .abp-mega-panel ul.abp-mega-list,
html body .abp-desktop-nav .abp-mega-panel ul.abp-mega-list li,
html body .abp-desktop-nav .abp-mega-panel li.abp-mega-item{position:static!important;background:transparent!important;box-shadow:none!important;border:0!important;border-radius:0!important;margin:0!important;min-width:0!important;width:auto!important;opacity:1!important;visibility:visible!important;transform:none!important;transition:none!important;list-style:none!important;float:none!important;display:block!important}
html body .abp-desktop-nav .abp-mega-panel ul.abp-mega-list{padding:0!important}
html body .abp-desktop-nav .abp-mega-panel li.abp-mega-item{padding:0!important}
html body .abp-desktop-nav .abp-mega-panel li.abp-mega-item::before,
html body .abp-desktop-nav .abp-mega-panel li.abp-mega-item::after{content:none!important}
html body .abp-desktop-nav .abp-mega-panel li.abp-mega-item > a{display:block!important;background:transparent!important;box-shadow:none!important;border:0!important;padding:.42rem .1rem!important}
html body .abp-desktop-nav .abp-mega-panel li.abp-mega-item > a:hover{background:transparent!important;padding-left:.4rem!important}

/* ── Desktop submenu links: blue, same as mobile ── */
html body .abp-desktop-nav .abp-sub-menu a,
html body .abp-desktop-nav .abp-mega-panel li.abp-mega-item > a{color:#1a56a0!important}
html body .abp-desktop-nav .abp-sub-menu a:hover,
html body .abp-desktop-nav .abp-mega-panel li.abp-mega-item > a:hover{color:#26a69a!important}