/* Event page (e.g. hydrogen-summit-2026.php) — sidebar layout, uses the theme's colours */

.event-page {
    padding: 60px 0 100px;
    --event-top: 20px;   /* updated by event-page.js to sit below the sticky header */
}

/* ---- Key facts strip ---- */
.event-page__facts {
    display: grid;
    grid-template-columns: 2fr repeat(4, 1fr);
    gap: 1px;
    background: #e5e5e5;
    border: 1px solid #e5e5e5;
    margin-bottom: 50px;
}

.event-fact {
    background: var(--govity-primary);
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
}

.event-fact:first-child {
    background: var(--govity-base);
}

.event-fact__value {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--govity-black);
}

.event-fact:first-child .event-fact__value {
    font-size: 22px;
    color: #fff;
}

.event-fact__label {
    font-size: 14px;
    color: var(--govity-gray);
}

.event-fact:first-child .event-fact__label {
    color: rgba(255, 255, 255, 0.85);
}

/* ---- Sidebar ---- */
.event-nav {
    position: sticky;
    top: calc(var(--event-top) + 10px);
    border-left: 3px solid var(--govity-base);
    background: var(--govity-primary);
    padding: 24px 0 24px;
    transition: top 200ms ease;
}

.event-nav__title {
    padding: 0 24px;
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--govity-gray);
}

.event-nav__link {
    display: block;
    padding: 9px 24px;
    color: var(--govity-black);
    font-weight: 500;
    border-left: 3px solid transparent;
    margin-left: -3px;
    transition: color 200ms ease, border-color 200ms ease, background-color 200ms ease;
}

.event-nav__link:hover {
    color: var(--govity-base);
}

.event-nav__link.is-active {
    color: var(--govity-base);
    border-left-color: var(--govity-black);
    background: #fff;
}

.event-nav__downloads {
    margin: 20px 24px 0;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.event-nav__btn {
    padding: 12px 18px;
    font-size: 15px;
    text-align: center;
}

.event-nav__btn-link,
.event-link {
    color: var(--govity-base);
    font-weight: 500;
}

.event-nav__btn-link:hover,
.event-link:hover {
    color: var(--govity-black);
}

/* ---- Sections ---- */
.event-section {
    scroll-margin-top: calc(var(--event-top) + 20px);
    padding-bottom: 50px;
    margin-bottom: 50px;
    border-bottom: 1px solid #e5e5e5;
}

.event-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.event-section p {
    margin-bottom: 14px;
}

.event-section__title {
    font-size: 32px;
    line-height: 1.25;
    margin: 6px 0 16px;
}

.event-section__lead {
    font-size: 18px;
    color: var(--govity-black);
}

.event-section__meta {
    color: var(--govity-gray);
    font-size: 15px;
}

.event-subtitle {
    font-size: 20px;
    margin: 40px 0 16px;
}

.event-organisers {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 28px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px dashed #d9d9d9;
    font-size: 15px;
}

/* ---- PDF viewer ---- */
.event-pdf {
    border: 1px solid #e0e0e0;
    background: #f7f7f7;
    margin: 20px 0 16px;
}

.event-pdf__frame {
    display: block;
    width: 100%;
    height: 80vh;
    min-height: 520px;
    max-height: 900px;
}

.event-pdf__fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 220px;
    padding: 30px;
    text-align: center;
    color: var(--govity-gray);
}

.event-pdf__fallback i {
    font-size: 48px;
    color: var(--govity-base);
    margin-bottom: 12px;
}

.event-pdf__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 28px;
}

/* ---- Photo gallery ---- */
.event-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.event-gallery--small {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.event-gallery__item {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #eee;
}

.event-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 400ms ease;
}

.event-gallery__item:hover img,
.event-gallery__item:focus-visible img {
    transform: scale(1.05);
}

.event-gallery__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 20px 10px 8px;
    font-size: 13px;
    line-height: 1.35;
    color: #fff;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-more-btn {
    border: none;
}

/* ---- Communiqué ---- */
.event-communique {
    position: relative;
    max-height: 560px;
    overflow: hidden;
    margin: 20px 0;
    padding: 30px 34px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-top: 4px solid var(--govity-base);
}

.event-communique::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 140px;
    background: linear-gradient(rgba(255, 255, 255, 0), #fff);
    pointer-events: none;
}

.event-communique.is-expanded {
    max-height: none;
}

.event-communique.is-expanded::after {
    display: none;
}

.event-communique h3 {
    font-size: 18px;
    margin: 28px 0 10px;
    color: var(--govity-base);
    letter-spacing: 0.02em;
}

.event-communique h4 {
    font-size: 16px;
    margin: 20px 0 8px;
}

.event-communique ol,
.event-communique ul {
    padding-left: 22px;
    margin-bottom: 16px;
}

.event-communique li {
    margin-bottom: 8px;
}

/* ---- Materials ---- */
.event-packs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.event-pack {
    display: flex;
    gap: 18px;
    padding: 16px;
    border: 1px solid #e5e5e5;
    background: #fff;
    transition: box-shadow 300ms ease;
}

.event-pack:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.event-pack__cover {
    flex: 0 0 140px;
}

.event-pack__cover img {
    width: 100%;
    border: 1px solid #eee;
}

.event-pack__no {
    font-size: 13px;
    font-weight: 700;
    color: var(--govity-base);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.event-pack__title {
    font-size: 17px;
    line-height: 1.35;
    margin: 4px 0 6px;
}

.event-pack__meta {
    display: block;
    font-size: 14px;
    color: var(--govity-gray);
}

.event-pack__actions {
    display: flex;
    gap: 18px;
    margin-top: 10px;
}

.event-pack__actions a {
    color: var(--govity-base);
    font-weight: 600;
}

/* ---- What's next ---- */
.event-steps {
    counter-reset: step;
    margin-top: 24px;
}

.event-step {
    position: relative;
    padding: 0 0 28px 64px;
    counter-increment: step;
}

.event-step::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--govity-base);
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-step:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 20px;
    top: 46px;
    bottom: 4px;
    width: 2px;
    background: #e0e0e0;
}

.event-step__when {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--govity-base);
}

.event-step h3 {
    font-size: 20px;
    margin: 4px 0 8px;
}

.event-step p {
    margin-bottom: 8px;
}

.event-step__contact a {
    color: var(--govity-base);
}

.event-callout {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: var(--govity-primary);
    border-left: 4px solid var(--govity-base);
}

.event-callout > i {
    font-size: 32px;
    color: var(--govity-base);
}

.event-callout h3 {
    font-size: 20px;
    margin-bottom: 6px;
}

/* ---- Home page feature (includes/featured-event.php) ---- */
.featured-event {
    padding: 90px 0;
    background: var(--govity-primary);
}

.featured-event__card {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    background: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
}

.featured-event__img {
    position: relative;
    min-height: 360px;
    background-size: cover;
    background-position: center;
}

.featured-event__badge {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 6px 14px;
    background: var(--govity-base);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.featured-event__body {
    padding: 44px 44px 40px;
}

.featured-event__title {
    font-size: 30px;
    line-height: 1.25;
    margin: 8px 0 14px;
}

.featured-event__title a {
    color: var(--govity-black);
    transition: color 300ms ease;
}

.featured-event__title a:hover {
    color: var(--govity-base);
}

.featured-event__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    font-size: 15px;
    color: var(--govity-gray);
    margin-bottom: 16px;
}

.featured-event__meta i {
    color: var(--govity-base);
    margin-right: 6px;
}

.featured-event__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 30px;
    margin: 20px 0 28px;
}

.featured-event__stats strong {
    display: block;
    font-size: 26px;
    line-height: 1.1;
    color: var(--govity-black);
}

.featured-event__stats span {
    font-size: 14px;
    color: var(--govity-gray);
}

.featured-event__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 26px;
}

.featured-event__actions .event-link i {
    margin-left: 6px;
}

/* ---- Tablet & phone ---- */
@media (max-width: 991px) {
    .event-page {
        padding-top: 40px;
    }

    .event-page__facts {
        grid-template-columns: repeat(2, 1fr);
    }

    .event-fact:first-child {
        grid-column: 1 / -1;
    }

    /* Sidebar becomes a sticky, swipeable tab bar */
    .event-page__sidebar-col {
        position: sticky;
        top: var(--event-top);
        z-index: 50;
        margin-bottom: 30px;
        transition: top 200ms ease;
    }

    .event-nav {
        position: static;
        border-left: none;
        border-bottom: 1px solid #e0e0e0;
        padding: 0;
        background: #fff;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    }

    .event-nav__title,
    .event-nav__downloads {
        display: none;
    }

    .event-nav__list {
        display: flex;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        margin: 0;
    }

    .event-nav__list::-webkit-scrollbar {
        display: none;
    }

    .event-nav__link {
        white-space: nowrap;
        padding: 14px 16px;
        margin: 0;
        border-left: none;
        border-bottom: 3px solid transparent;
    }

    .event-nav__link.is-active {
        border-bottom-color: var(--govity-base);
        background: transparent;
    }

    .event-section {
        scroll-margin-top: calc(var(--event-top) + 70px);
    }

    .featured-event__card {
        grid-template-columns: 1fr;
    }

    .featured-event__img {
        min-height: 240px;
    }
}

@media (max-width: 767px) {
    .event-section__title {
        font-size: 25px;
    }

    .event-packs {
        grid-template-columns: 1fr;
    }

    .event-pack__cover {
        flex-basis: 110px;
    }

    .event-pdf__frame {
        height: 70vh;
        min-height: 420px;
    }

    .event-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .event-gallery__caption {
        display: none;
    }

    .event-communique {
        padding: 22px 18px;
    }

    .featured-event {
        padding: 60px 0;
    }

    .featured-event__body {
        padding: 28px 22px;
    }

    .featured-event__title {
        font-size: 24px;
    }
}
