/* =========================================================================
   Totana a la Carta - Desktop layout for the EVENT LIST view
   -------------------------------------------------------------------------
   Page-specific only. The shared chrome (top bar, footer) lives in
   desktop_shared.css, which must be loaded first. Visual overrides sit
   inside @media (min-width: 1024px); the base rules only flatten the new
   semantic wrappers so the mobile rendering remains unchanged.
   ========================================================================= */

/* Structural wrappers render as the original linear SEO content below the
   desktop breakpoint. */
.events-guide-intro,
.events-guide-grid,
.events-guide-card,
.events-guide-faq,
.events-guide-faq-header,
.events-guide-faq-list,
.events-guide-faq-question,
.events-guide-faq-answer {
    display: contents;
}

.events-guide-eyebrow,
.events-guide-icon,
.events-guide-faq-icon {
    display: none;
}

.events-guide-intro > h2:first-of-type {
    margin-top: 0;
}

@media (min-width: 1024px) {

    /* The compact mobile header is replaced by the shared top bar. */
    .header {
        display: none !important;
    }

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

    body > main {
        display: flex;
        flex-direction: column;
        padding-top: 0;
    }

    #upcoming-promoted-events-section {
        order: 1;
    }

    .events-guide {
        order: 2;
    }

    /* ---------------------------------------------------------------------
       2. Header band
       --------------------------------------------------------------------- */
    .category-section {
        max-width: none !important;
        margin: 0;
        border-radius: 0;
        overflow: visible;
        min-height: 0;
        padding: 56px var(--dsk-gutter) 40px;
    }

    .category-content {
        max-width: 760px;
    }

    .category-title {
        font-family: inherit;
        font-size: 2.9rem !important;
        line-height: 1.08;
        letter-spacing: -0.02em;
        color: white !important;
        text-shadow: 0 2px 4px rgba(0, 0, 0, .1) !important;
        margin-bottom: .75rem !important;
    }

    .category-description {
        font-size: 1.08rem;
        line-height: 1.55;
        color: white !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, .1) !important;
    }

    /* Category illustration, matching the mobile treatment. */
    .category-image-container {
        top: 16px;
        right: 0;
        width: 320px;
        height: 230px;
        display: flex;
        align-items: flex-start;
        justify-content: flex-end;
        z-index: 0;
        opacity: 1;
    }

    .category-image {
        width: auto;
        height: auto;
        max-height: 220px;
        filter: none;
    }

    /* ---------------------------------------------------------------------
       3. Filter toolbar
       --------------------------------------------------------------------- */
    .filter-sections-wrapper {
        position: relative;
        z-index: 3;
        margin-top: 2.25rem;
        border-radius: 18px;
        box-shadow: var(--dsk-shadow-sm);
    }

    .filter-section {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1.5rem;
        padding: 1.1rem 1.5rem;
        border-bottom: 1px solid var(--dsk-line);
    }

    .filter-group {
        display: flex;
        flex-wrap: wrap;
        gap: .6rem;
        width: auto;
    }

    .filter-label {
        flex: 0 0 auto;
        padding: .55rem 1.1rem .55rem .55rem;
        border-radius: 999px;
        background: #faf7f3;
        border: 2px solid transparent;
        box-shadow: none;
        font-size: .95rem;
        font-weight: 500;
    }

    .filter-label:hover {
        transform: none;
        box-shadow: var(--dsk-shadow-sm);
        background: #fff;
    }

    .filter-label.active,
    .filter-option:checked + .filter-label {
        transform: none;
        background: #fff;
        border-color: rgba(31, 27, 22, .85);
        box-shadow: var(--dsk-shadow-sm);
        color: var(--dsk-ink);
    }

    .filter-icon {
        width: 30px;
        height: 30px;
        margin-right: 8px;
        box-shadow: none;
        background: #fff;
    }

    .filter-explanation,
    .category-explanation {
        flex-shrink: 0;
        margin: 0 !important;
        text-align: right !important;
        font-size: .9rem;
        color: var(--dsk-ink-soft) !important;
        min-height: 0;
    }

    .filter-explanation em,
    .category-explanation em {
        color: var(--dsk-ink);
        font-weight: 600;
    }

    .category-filters-section {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 1rem 1.5rem;
        padding: 1.1rem 1.5rem;
    }

    .category-filters {
        flex: 1 1 100%;
        justify-content: flex-start;
        margin-bottom: 0;
        gap: .6rem;
    }

    .category-filters .category-btn {
        transition: transform .18s ease, box-shadow .18s ease;
    }

    .category-filters .category-btn:hover {
        transform: translateY(-2px);
        box-shadow: var(--dsk-shadow-sm);
    }

    #reset-category-filters-wrapper {
        flex-shrink: 0;
        margin-top: 0 !important;
    }

    /* ---------------------------------------------------------------------
       4. Event grids
       --------------------------------------------------------------------- */
    .events-list-section,
    .featured-events-section {
        max-width: none !important;
        margin: 0;
        padding: 48px var(--dsk-gutter) 56px;
    }

    .section-title {
        font-family: inherit;
        font-size: 2rem;
        letter-spacing: -0.01em;
        color: white;
    }

    .regular-events-title {
        margin-bottom: 2rem;
    }

    .events-list,
    .featured-events-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 26px;
    }

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

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

    .events-list .event-content,
    .featured-events-list .event-content {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

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

    /* ---------------------------------------------------------------------
       5. Editorial guide
       --------------------------------------------------------------------- */
    .seo-content.events-guide {
        max-width: none;
        margin: 0;
        padding: 72px var(--dsk-gutter) 80px;
        border-radius: 0;
        background: #f9f3ee;
        box-shadow: none;
        color: #4a423b;
        font-size: 1rem;
        line-height: 1.65;
    }

    .events-guide-intro {
        display: block;
        max-width: 780px;
        margin-bottom: 2rem;
    }

    .events-guide-eyebrow {
        display: block;
        margin-bottom: .55rem;
        color: #7564bf;
        font-size: .78rem;
        font-weight: 700;
        letter-spacing: .12em;
        text-transform: uppercase;
    }

    .seo-content.events-guide h2 {
        margin: 0 0 .8rem;
        color: #332d28;
        font-family: inherit;
        font-size: 1.45rem;
        line-height: 1.25;
    }

    .events-guide-intro h2 {
        font-size: 2.25rem;
        letter-spacing: -.02em;
    }

    .events-guide-intro p {
        margin: 0;
        color: #665d55;
        font-size: 1.05rem;
    }

    .events-guide-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
        max-width: var(--dsk-max);
        margin: 0 auto;
    }

    .events-guide-card {
        display: block;
        min-width: 0;
        padding: 26px;
        border: 1px solid var(--dsk-line);
        border-radius: 18px;
        background: #fff;
        box-shadow: var(--dsk-shadow-sm);
    }

    .events-guide-card-wide {
        grid-column: span 2;
    }

    .events-guide-icon,
    .events-guide-faq-icon {
        display: inline-flex;
        width: 42px;
        height: 42px;
        margin-bottom: 1.1rem;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        background: rgba(117, 100, 191, .11);
        color: #7564bf;
        font-size: 1rem;
    }

    .events-guide-card p,
    .events-guide-card ul {
        margin: 0;
        color: #665d55;
    }

    .events-guide-card ul {
        display: grid;
        gap: .55rem;
        padding-left: 1.15rem;
    }

    .events-guide-faq {
        display: block;
        max-width: var(--dsk-max);
        margin: 24px auto 0;
        padding: 28px;
        border: 1px solid var(--dsk-line);
        border-radius: 18px;
        background: #fff;
        box-shadow: var(--dsk-shadow-sm);
    }

    .events-guide-faq-header {
        display: flex;
        align-items: center;
        gap: 14px;
        margin-bottom: .5rem;
    }

    .events-guide-faq-header .events-guide-faq-icon {
        flex: 0 0 auto;
        margin: 0;
    }

    .events-guide-faq-header h2 {
        margin: 0;
    }

    .events-guide-faq-list {
        display: block;
    }

    .seo-content.events-guide .faq-item {
        margin: 0;
        border-bottom: 1px solid var(--dsk-line);
    }

    .seo-content.events-guide .faq-item:last-child {
        border-bottom: 0;
    }

    .events-guide-faq-question {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        min-height: 58px;
        padding: .75rem 0;
    }

    .seo-content.events-guide .events-guide-faq-question h3 {
        margin: 0;
        color: #3d3630;
        font-size: 1rem;
        font-weight: 600;
    }

    .events-guide-faq-toggle.desktop-only {
        display: inline-flex !important;
        width: 36px;
        height: 36px;
        flex: 0 0 auto;
        align-items: center;
        justify-content: center;
        border: 0;
        border-radius: 10px;
        background: #f5f1ed;
        color: #7564bf;
        cursor: pointer;
    }

    .events-guide-faq-toggle:focus-visible {
        outline: 3px solid rgba(117, 100, 191, .32);
        outline-offset: 2px;
    }

    .events-guide-faq-toggle i {
        transition: transform .2s ease;
    }

    .faq-item.is-open .events-guide-faq-toggle i {
        transform: rotate(180deg);
    }

    .events-guide-faq-answer {
        display: grid;
        grid-template-rows: 0fr;
        transition: grid-template-rows .24s ease;
    }

    .events-guide-faq-answer > p {
        min-height: 0;
        margin: 0;
        overflow: hidden;
        color: #665d55;
    }

    .faq-item.is-open .events-guide-faq-answer {
        grid-template-rows: 1fr;
    }

    .faq-item.is-open .events-guide-faq-answer > p {
        padding-bottom: 1.1rem;
    }
}

@media (min-width: 1024px) and (max-width: 1279px) {
    .category-title {
        font-size: 2.4rem !important;
    }

    .filter-section,
    .category-filters-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-explanation,
    .category-explanation {
        text-align: left !important;
    }

    .category-image-container {
        top: 20px;
        width: 270px;
        height: 205px;
    }

    .category-image {
        max-height: 195px;
    }

    .category-content {
        max-width: calc(100% - 280px);
    }

    .events-guide-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .events-guide-card-wide {
        grid-column: 1 / -1;
    }

    .events-guide-card:first-child,
    .events-guide-card:last-child {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1024px) and (prefers-reduced-motion: reduce) {
    .events-guide-faq-answer,
    .events-guide-faq-toggle i {
        transition: none;
    }
}
