/* Event overview, comparison and calendar. Shared typography comes from main.css. */

.events-section {
    color: var(--navy);
    background: var(--canvas);
}

.events-section p, .events-section h2 {
    margin: 0;
}

.events-section a, .comparison-dialog a, .calendar-dialog a {
    text-decoration: none;
}

.events-section .events-eyebrow {
    margin-bottom: var(--space-sm);
    color: #606875;
    font-size: var(--type-label);
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.events-section .soft-ink {
    color: #747b88;
}

.events-section .text-button, .comparison-dialog .text-button {
    display: inline-flex;
    gap: 12px;
    align-items: center;
    width: fit-content;
    height: auto;
    padding: 10px 0;
    font-size: .9375rem;
    font-weight: 800;
    background: transparent;
    color: inherit;
    border: 0;
    border-radius: 0;
    white-space: normal;
    text-align: left;
}

.events-section .text-button:hover, .comparison-dialog .text-button:hover {
    color: #8b6900;
}

.events-section .text-button svg, .comparison-dialog .text-button svg {
    width: 18px;
    height: 18px;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: var(--heading-gap);
}

.section-heading-aside {
    max-width: 340px;
    padding-bottom: 0;
}

.section-heading-aside > p {
    color: #646b78;
    font-size: var(--type-body);
    line-height: var(--leading-body);
}

.section-heading.events-heading {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: end;
    gap: var(--layout-gap);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid #dfe2e8;
}

.events-heading .section-heading-aside {
    width: max-content;
    max-width: 100%;
    justify-self: end;
}

.events-heading-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px var(--space-md);
    margin-top: var(--space-xs);
}

.events-heading-actions .text-button {
    margin-top: 0;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-md);
    align-items: stretch;
}

.event-card {
    border: 1px solid #e0e3e9;
    display: flex;
    flex-direction: column;
    transition: transform .22s, box-shadow .22s;
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 26px #161b2510;
}

.event-visual {
    display: block;
    position: relative;
    width: 100%;
    height: 210px;
    overflow: hidden;
    border: 0;
    background: #222b40;
    color: #fff;
}

.event-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}

.event-visual:hover img {
    transform: scale(1.05);
}

.event-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #151b25c0, transparent 58%);
}

.event-label {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    background: var(--canvas);
    color: #191c27;
    padding: 6px 9px;
    font-weight: 800;
    letter-spacing: .015em;
    font-size: var(--type-label);
}

.event-champions .event-label {
    background: var(--yellow);
}

.event-visual-arrow {
    position: absolute;
    bottom: 14px;
    right: 14px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 33px;
    height: 33px;
    background: #ffffff22;
    color: #fff;
}

.event-visual-arrow svg {
    width: 20px;
}

.event-card-body {
    padding: var(--card-padding) var(--card-padding) 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.event-date {
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 700;
    color: #626b79;
    line-height: 1.5;
    min-height: 36px;
    font-size: var(--type-label);
}

.event-date svg {
    width: 14px;
    height: 14px;
}

.event-card h3 {
    margin: var(--space-sm) 0 var(--space-xs);
}

.event-format {
    color: #666f7c;
    font-size: var(--type-body);
    line-height: var(--leading-body);
}

.card-facts {
    display: grid;
    align-content: start;
    gap: var(--space-xs);
    padding: var(--space-md) 0;
    color: #555e6d;
    flex: 1;
    font-size: var(--type-body);
    line-height: var(--leading-body);
}

.card-facts > span {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.card-facts svg {
    width: 15px;
    height: 15px;
    margin-top: 2px;
}

.card-details {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: var(--space-sm) 0;
    height: auto;
    font-weight: 800;
    font-size: .875rem;
    border-top: 1px solid #e6e8ec;
    color: var(--navy);
    background: transparent;
    border-radius: 0;
}

.card-details:hover {
    background: transparent;
    color: #95730c;
}

.card-details svg {
    width: 18px;
}

.finder-strip {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    padding: var(--card-padding);
    border: 1px solid #e4e6ec;
    background: #f7f8fa;
}

.finder-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    background: var(--yellow);
}

.finder-strip strong {
    font-size: 1rem;
    font-weight: 800;
}

.finder-strip p {
    color: #67707d;
    font-size: var(--type-body);
    line-height: var(--leading-body);
}

.finder-strip > .text-button {
    margin-left: auto;
}

/* Dialog content uses the existing native dialog shell from home.css. */

.comparison-dialog {
    width: min(1100px, calc(100% - 32px));
}

.comparison-scroll {
    width: 100%;
    overflow-x: auto;
    margin-block: var(--space-md);
}

.comparison-table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
    font-size: var(--type-label);
    text-align: left;
}

.comparison-table th, .comparison-table td {
    min-width: 155px;
    padding: 18px 15px;
    vertical-align: top;
    line-height: 1.5;
    white-space: normal;
    border-bottom: 1px solid var(--border);
}

.comparison-table thead th {
    color: var(--canvas);
    background: var(--navy);
    font-size: var(--type-body);
    font-weight: 800;
}

.comparison-table tbody th {
    background: #f3f4f7;
    font-weight: 800;
}

.comparison-table .text-button {
    padding: 0;
    font-size: .8125rem;
}

.calendar-list {
    margin-block: var(--space-md);
}

.calendar-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid #e2e5eb;
}

.calendar-item > svg {
    width: 21px;
    color: #868d99;
}

.calendar-item > div {
    min-width: 0;
}

.calendar-item strong {
    font-size: var(--type-body);
    font-weight: 800;
}

.calendar-item p {
    margin-top: 2px;
    color: #66707e;
    font-size: var(--type-body);
    line-height: var(--leading-body);
}

.calendar-action {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 0;
    color: var(--navy);
    background: #eceef1;
    border: 0;
    border-radius: 0;
}

.calendar-action:hover {
    background: var(--yellow);
}

.ifr-dialog .event-dialog-note {
    font-size: var(--type-label);
    line-height: 1.6;
    color: var(--muted);
}

.finder-icon {
    flex-shrink: 0;
}

.card-details {
    align-items: center;
    gap: 8px;
}

.event-card-body {
    min-width: 0;
}

@media (max-width: 1150px) {
    .events-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .event-visual {
        height: 240px;
    }

    .event-date {
        min-height: 0;
    }

    .card-facts {
        min-height: 90px;
    }
}

@media (max-width: 900px) {
    .section-heading.events-heading {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--space-md);
    }

    .events-heading .section-heading-aside {
        width: auto;
        justify-self: start;
    }
}

@media (max-width: 640px) {
    .events-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .event-visual {
        height: 225px;
    }

    .card-facts {
        min-height: 0;
    }

    .card-details {
        font-size: .9375rem;
        padding-block: 16px;
    }

    .finder-strip {
        flex-wrap: wrap;
    }

    .finder-icon {
        display: none;
    }

    .finder-strip > .text-button {
        margin-left: 0;
    }

    .calendar-item {
        gap: 11px;
    }

    .calendar-item > svg {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .event-card, .event-visual img {
        transition: none;
    }

    .event-card:hover, .event-visual:hover img {
        transform: none;
    }
}

/* Horizontal scrolling hint for the mobile comparison table. */
.comparison-scroll-hint {
    display: none;
}

@media (max-width: 640px) {
    .ifr-dialog .comparison-scroll-hint {
        display: block;
        margin: var(--space-sm) 0 var(--space-xs);
        color: var(--muted);
        font-size: var(--type-label);
        font-weight: 600;
        line-height: var(--leading-body);
    }

    .comparison-scroll-hint + .comparison-scroll {
        margin-top: 0;
    }
}
