:root {
    --color-bg: #ffffff;
    --color-surface: #ffffff;
    --color-text: #000000;
    --color-text-muted: #555555;
    --color-primary: #003399;
    --color-banner: #eef8fd;

    /* Organisers */
    --color-eu: #003399;
    --color-irish-presidency: #f8d831; /* yellow, as Council of the EU in the design (client, 2026-10-17) */
    /* Locations */
    --color-blue-zone: #59c2ef;
    --color-green-zone: #7ac4a3;
    --color-tag-location: #cccccc;

    --font-poppins: "Poppins", sans-serif;
    --font-inter: "Inter", sans-serif;

    --transition-fast: 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-poppins);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ---- Skip link ---- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 9999;
    padding: 0.75rem 1.5rem;
    background: #0e47cb;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 6px 6px;
}

.skip-link:focus {
    top: 0;
}

/* Machine translation disclaimer (revealed by etrans-auto.js) */
.etrans-disclaimer {
    margin-top: 1rem;
    padding: 0.5rem 0.75rem;
    border-left: 4px solid var(--color-primary);
    background: #f2f6ff;
    font-family: var(--font-inter);
    font-size: 14px;
}

/* Hero banner */
.header-hero {
    background: var(--color-primary) url("../images/banner-cop31-web.jpg") center/cover no-repeat;
    aspect-ratio: 4 / 1; /* matches the artwork (3840x960) */
    margin-top: var(--ecl-spacing-3xl); /* 2rem gap below the page title */
}

@media (max-width: 768px) {
    .header-hero {
        aspect-ratio: 2 / 1; /* crops the side stars, keeps the "EU at COP31" lockup readable */
    }
}

/* ---- Page title ---- */
.page-title {
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem 1rem 0;
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-poppins);
}

/* ---- Program layout ---- */
.program-layout {
    max-width: 1440px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* ---- Filter sidebar ---- */
.filter-sidebar {
    width: 355px;
    flex-shrink: 0;
    position: sticky;
    top: 1rem;
    padding: 0 10px 30px;
    background: var(--color-surface);
}

.filter-sidebar__inner {
    padding-bottom: 30px;
    padding-top: 15px;
    border-bottom: 2px solid #000;
}

.filter-sidebar__section {
    margin-bottom: 30px;
}

.filter-sidebar__section:last-child {
    margin-bottom: 0;
}

.filter-sidebar__heading {
    font-family: var(--font-poppins);
    font-weight: 400;
    font-size: 16px;
    color: var(--color-text);
    margin-bottom: 10px;
}

.filter-sidebar__options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ---- Filter pills ---- */
.filter-pill {
    font-family: var(--font-inter);
    font-weight: 400;
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity var(--transition-fast);
    line-height: normal;
    background: var(--color-tag-location);
    color: #000;
}

.filter-pill:hover {
    opacity: 0.8;
}

/* Neutral pills (date, type): grey, black when selected */
.filter-pill:not(.swatch)[aria-pressed="true"] {
    background: #000;
    color: #fff;
}

/* Coloured pills (organiser, location): dim the unselected ones once a selection exists */
.has-selection > .swatch[aria-pressed="false"] {
    opacity: 0.4;
}

.filter-pill.swatch[aria-pressed="true"] {
    outline: 2px solid #000;
    outline-offset: 1px;
}

/* ---- Swatch colours (filter pills + item tags) ---- */
/* Long organiser names ("Irish Presidency of the Council of the European Union") wrap
   instead of overflowing the sidebar or squeezing the event titles */
.filter-pill.swatch,
.program-item__tags .tag {
    white-space: normal;
    max-width: 16rem;
}

.program-item__tags .tag {
    text-align: right;
}

.swatch[data-organiser="european-union"] { background: var(--color-eu); color: #fff; }
.swatch[data-organiser="irish-presidency-of-the-council-of-the-european-union"] { background: var(--color-irish-presidency); color: #000; }
.swatch[data-location="blue-zone"]          { background: var(--color-blue-zone); color: #000; }
.swatch[data-location="green-zone"]         { background: var(--color-green-zone); color: #000; }

/* ---- Thematic checkboxes ---- */
.filter-sidebar__options[data-options="thematic"] {
    flex-direction: column;
    row-gap: 12px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-checkbox[hidden] {
    display: none;
}

/* Square black box as in the design (native checkbox renders grey/rounded) */
.filter-checkbox input {
    appearance: none;
    flex-shrink: 0;
    width: 19px;
    height: 19px;
    margin: 0;
    border: 1.5px solid #000;
    background: #fff;
    display: grid;
    place-content: center;
    cursor: pointer;
}

.filter-checkbox input:checked {
    background: #000;
}

.filter-checkbox input:checked::after {
    content: "";
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: translateY(-1px) rotate(45deg);
}

.filter-checkbox input:focus-visible {
    outline: 2px solid #0e47cb;
    outline-offset: 2px;
}

.filter-checkbox label {
    font-family: var(--font-inter);
    font-size: 14px;
    line-height: 1.2;
    cursor: pointer;
}

.filter-sidebar__see-all {
    margin-top: 12px;
    padding: 0;
    border: none;
    background: none;
    font-family: var(--font-poppins);
    font-weight: 600;
    font-size: 14px;
    text-decoration: underline;
    cursor: pointer;
}

/* ---- Program content ---- */
.program-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ---- Day dropdown ---- */
.day-dropdown {
    background: var(--color-surface);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.day-header {
    background: #ebebeb;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    padding: 15px 10px;
    cursor: pointer;
    border: none;
    width: 100%;
    text-align: left;
    font-family: var(--font-poppins);
}

.day-header:hover {
    background: #e0e0e0;
}

.day-header__info {
    flex: 1;
    min-width: 0;
}

.day-header__title {
    font-family: var(--font-poppins);
    font-weight: 600;
    font-size: 20px;
    color: var(--color-text);
    line-height: normal;
}

.day-header__subtitle {
    font-family: var(--font-poppins);
    font-weight: 400;
    font-size: 20px;
    color: var(--color-text);
    line-height: 1.3;
}

.day-header__caret {
    width: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.day-header__caret svg {
    width: 30px;
    height: 30px;
    transition: transform var(--transition-fast);
    transform: rotate(180deg);
}

.day-dropdown.collapsed .day-header__caret svg {
    transform: rotate(0deg);
}

.day-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.day-dropdown.collapsed .day-items {
    display: none;
}

/* ---- Program item ---- */
.program-item {
    border-left: 5px solid var(--color-tag-location);
    padding-left: 10px;
}

.program-item[data-location="blue-zone"] {
    border-left-color: var(--color-blue-zone);
}
.program-item[data-location="green-zone"] {
    border-left-color: var(--color-green-zone);
}

.program-item__inner {
    display: grid;
    grid-template-columns: minmax(50px, auto) minmax(0, 1fr) auto; /* auto: translated "TBC" is wider */
    column-gap: 20px;
    align-items: start;
    padding: 20px 0;
    border-bottom: 1px solid #000;
}

/* ---- Item time ---- */
.program-item__time {
    font-family: var(--font-poppins);
    font-weight: 400;
    font-size: 18px;
    color: var(--color-text);
    line-height: normal;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ---- Item content ---- */
.program-item__content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.program-item__title {
    font-family: var(--font-poppins);
    font-weight: 600;
    font-size: 20px;
    color: var(--color-text);
    line-height: 1.3;
}

.program-item__description {
    font-family: var(--font-poppins);
    font-weight: 400;
    font-size: 16px;
    color: var(--color-text);
    line-height: 1.3;
}

.program-item__link {
    color: var(--color-primary);
    text-decoration: none;
}

.program-item__link:hover {
    text-decoration: underline;
}

.program-item__title .program-item__link {
    font-weight: 600;
}

.program-item__speakers-label {
    font-family: var(--font-poppins);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--color-text);
}

.program-item__speakers-text {
    font-family: var(--font-poppins);
    font-weight: 400;
    font-size: 16px;
    color: var(--color-text);
    line-height: 1.3;
}

/* ---- Item tags ---- */
.program-item__tags {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

.tag {
    font-family: var(--font-inter);
    font-weight: 400;
    font-size: 14px;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--color-tag-location);
    color: #000;
    white-space: nowrap;
    line-height: normal;
}

/* ---- Hidden elements ---- */
.program-item.hidden {
    display: none;
}

.day-dropdown.hidden {
    display: none;
}

/* ---- Focus indicators ---- */
.filter-pill:focus-visible,
.day-header:focus-visible,
.skip-link:focus-visible,
.mobile-filter-toggle:focus-visible,
.program-item__link:focus-visible,
.header-nav__mobile-close:focus-visible,
a:focus-visible {
    outline: 2px solid #0e47cb;
    outline-offset: 2px;
}

/* ---- Live region ---- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---- Mobile filter toggle ---- */
.mobile-filter-toggle {
    display: none;
}

/* ---- Time separator (mobile) ---- */
.program-item__time-separator {
    display: none;
}


/* ---- Responsive ---- */
@media (max-width: 768px) {
    .program-layout {
        flex-direction: column;
        padding: 15px;
        gap: 5px;
    }

    /* Hide desktop sidebar, show mobile toggle */
    .filter-sidebar {
        display: none;
    }

    .filter-sidebar.mobile-open {
        display: block;
        width: 100%;
        position: static;
    }

    .mobile-filter-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 15px 0;
        border: none;
        border-bottom: 2px solid #000;
        background: none;
        cursor: pointer;
        font-family: var(--font-poppins);
        font-weight: 600;
        font-size: 18px;
        color: var(--color-text);
    }

    .mobile-filter-toggle__icon {
        font-size: 28px;
        font-weight: 600;
    }

    /* Time: horizontal with > separator */
    .program-item__time {
        flex-direction: row;
        gap: 5px;
        width: auto;
    }

    .program-item__time-separator {
        display: inline;
    }

    /* Items: time + tags on one row, content below */
    .program-item__inner {
        grid-template-columns: auto 1fr;
        row-gap: 10px;
        padding: 20px 0;
    }

    .program-item__content {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .program-item__tags {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

   

    .program-item {
        width: 100%;
    }

    .day-dropdown {
        gap: 0;
    }

    .day-items {
        padding-bottom: 20px;
    }

    .program-content {
        gap: 5px;
    }
}

/* ---- CTA Registration Button (inside sidebar) ---- */
.cta-banner {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background-color: var(--color-banner);
    border-radius: 8px;
}

.cta-banner__title {
    margin: 0 0 0.75rem 0;
    font: 700 clamp(1.1rem, 1.5vw, 1.25rem)/1.3 var(--font-poppins);
    color: var(--color-primary, #000);
}

.cta-banner__note {
    margin: 0.75rem 0 0 0;
    font: 400 clamp(0.85rem, 1.1vw, 0.95rem)/1.5 var(--font-poppins);
    color: #555;
}

.cta-banner__btn {
    align-items: center;
    background-color: #fc0;
    border: 0 solid transparent;
    border-radius: 4px;
    box-sizing: border-box;
    color: #000000;
    display: inline-flex;
    font: 400 1rem/1.5 var(--font-poppins);
    min-height: 2.75rem;
    min-width: 2.75rem;
    padding: 4px 14px;
    text-decoration: none;
    gap: 0.5rem;
}

.cta-banner__btn:hover {
    opacity: 0.85;
}

.cta-banner__btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.cta-banner__icon {
    width: 12px;
    height: 12px;
    transform: rotate(90deg);
}

/* ---- Prefers reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}


