/* =========================================================================
   Totana a la Carta - Desktop layout for the EVENT DETAIL view
   -------------------------------------------------------------------------
   Page-specific only. The shared chrome (top bar, footer) lives in
   desktop_shared.css, which must be loaded first. Everything here sits
   inside @media (min-width: 1024px), so the mobile rendering is untouched.
   ========================================================================= */

@media (min-width: 1024px) {

    :root {
        --evd-max: 1180px;
        --evd-gutter: max(32px, calc((100% - 1180px) / 2));
    }

    /* The floating back-arrow header is replaced by the shared top bar. */
    .header {
        display: none !important;
    }

    /* ---------------------------------------------------------------------
       1. Banner joins the document flow instead of sitting under the header
       --------------------------------------------------------------------- */
    .event-banner {
        position: relative;
        height: 400px;
        z-index: 1;
    }

    .banner-overlay {
        background: linear-gradient(180deg, rgba(0, 0, 0, .18) 0%, rgba(0, 0, 0, 0) 45%);
    }

    .main-container {
        padding-top: 0 !important;
    }

    .main-container-no-banner {
        margin-top: 0;
    }

    /* ---------------------------------------------------------------------
       2. Breadcrumb
       --------------------------------------------------------------------- */
    .breadcrumbs {
        display: none !important;
    }

    /* ---------------------------------------------------------------------
       3. Title block: full-width category-colour band
       --------------------------------------------------------------------- */
    .event-section {
        max-width: none !important;
        width: 100%;
        margin: 0;
        top: 0 !important;
        margin-bottom: 0 !important;
        padding: 1.75rem var(--evd-gutter);
        border-radius: 0;
    }

    .event-header {
        align-items: flex-start;
        gap: 1.75rem;
        margin-bottom: 0;
    }

    .event-section .event-title {
        font-family: inherit;
        font-size: clamp(2.2rem, 3vw, 3rem);
        line-height: 1.08;
        letter-spacing: -0.02em;
        color: white !important;
    }

    .event-section .event-date-badge {
        flex-shrink: 0;
    }

    /* ---------------------------------------------------------------------
       4. Content card and sidebar
       --------------------------------------------------------------------- */
    .event-content-section {
        max-width: var(--evd-max) !important;
        width: calc(100% - 64px);
        margin: 0 auto 3rem;
        top: 0;
        padding: 2.5rem;
        border-radius: 22px;
        box-shadow: var(--dsk-shadow-sm);
    }

    .event-details-container {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
        gap: 2.5rem;
    }

    /* The sidebar only holds an action button and a map, both optional.
       With neither, the content takes the full width instead of leaving a
       third of the card empty. */
    .event-details-container:not(:has(.event-sidebar > *)) {
        grid-template-columns: minmax(0, 1fr);
    }

    .event-details-container:not(:has(.event-sidebar > *)) .event-sidebar {
        display: none;
    }

    .sticky-sidebar {
        top: 96px;
    }

    .info-item {
        margin-bottom: 1.75rem;
    }

    .info-icon {
        width: 44px;
        height: 44px;
    }

    .info-title {
        font-size: 1.05rem;
    }

    .info-text,
    .description-text {
        font-size: 1.02rem;
        line-height: 1.7;
    }

    /* Event photos sit side by side rather than stacking full width. */
    .event-main-content .event-image-container {
        max-width: 560px;
        margin-bottom: 1.5rem;
    }

    .action-button {
        border-radius: 999px;
        padding: .9rem 1.75rem;
    }

    .map-container {
        border-radius: 16px;
        overflow: hidden;
    }

    /* ---------------------------------------------------------------------
       5. Related events
       --------------------------------------------------------------------- */
    .related-events {
        max-width: var(--evd-max) !important;
        width: calc(100% - 64px);
        margin: 0 auto 4rem;
        padding: 2.5rem;
        border-radius: 22px;
        box-shadow: var(--dsk-shadow-sm);
    }

    .related-events h2 {
        font-family: inherit;
        font-size: 1.9rem;
        letter-spacing: -0.01em;
        color: #333;
        margin-bottom: 1.75rem;
    }

    .related-events .events-list {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 24px;
        align-items: stretch;
    }

    /* This page's own .event-image rule (height: auto) also matches the card
       images, which leaves the related cards hundreds of pixels tall. Put the
       card images back on a fixed height here. */
    .related-events .event-image {
        height: 200px;
    }

    .related-events .event-card {
        display: flex;
        flex-direction: column;
        border-radius: 18px;
        box-shadow: var(--dsk-shadow-sm);
    }

    .related-events .event-card:hover {
        transform: translateY(-6px);
        box-shadow: var(--dsk-shadow-md);
    }

    .related-events .event-content {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .related-events .event-button {
        margin-top: auto;
        align-self: flex-start;
        border-radius: 999px;
        padding: .6rem 1.4rem;
    }
}

@media (min-width: 1024px) and (max-width: 1279px) {
    .event-banner {
        height: 340px;
    }

    .event-content-section,
    .related-events {
        padding: 2rem;
    }
}
