/* ================================================================
   Ateneu Events – Frontend Styles
   Matches the dark-navy / white design from the mockup
================================================================ */

:root {
    --ae-dark: #0e1624;
    --ae-dark-mid: #162033;
    --ae-accent: #1a6ef5;
    --ae-accent-h: #155ed4;
    --ae-text: #1a1a2e;
    --ae-muted: #6b7280;
    --ae-border: #e5e7eb;
    --ae-radius: 10px;
    --ae-font: inherit;
}


/* ── Container ─────────────────────────────────── */

.ae-container {
    max-width: 1100px;
    margin-inline: auto;
    padding-inline: 24px;
}

.ae-event-page {
    padding-top: 102px;
}


/* ── Buttons ───────────────────────────────────── */

.ae-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: background 0.2s, transform 0.1s;
}

.ae-btn:active {
    transform: scale(0.97);
}

.ae-btn--primary {
    background: var(--ae-accent);
    color: #fff;
}

.ae-btn--primary:hover {
    background: var(--ae-accent-h);
    color: #fff;
}

.ae-btn--block {
    width: 100%;
    margin-top: 18px;
}


/* ── Hero ──────────────────────────────────────── */

.ae-hero {
    min-height: 500px;
    display: flex;
    align-items: center;
    background: #1A1D29;
    color: #fff;
}

.ae-hero__inner {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 520px) minmax(0, 560px);
    align-items: center;
    justify-content: space-between;
    gap: 44px;
    padding-block: 48px;
}

.ae-hero__content {
    max-width: 520px;
}

.ae-hero__location {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #a0aec0;
    margin-bottom: 10px;
}

.ae-hero__location-icon {
    width: 14px;
    height: 14px;
    background-color: #fff;
    -webkit-mask-image: url('../images/location_pin.svg');
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    mask-image: url('../images/location_pin.svg');
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    flex-shrink: 0;
}

.ae-hero__title {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 800;
    line-height: 1.1;
    color: #fff;
    margin: 0 0 18px;
}

.ae-hero__excerpt {
    font-size: 16px;
    line-height: 1.65;
    color: #cbd5e0;
    margin-bottom: 28px;
}


/* Gallery mosaic (right side of hero) */

.ae-hero__gallery {
    display: grid;
    grid-template-columns: 1.65fr 0.85fr;
    gap: 12px;
    width: 100%;
    max-width: 560px;
    justify-self: end;
}

.ae-hero__gallery-item {
    overflow: hidden;
    border-radius: 14px;
    position: relative;
    min-height: 170px;
}

.ae-hero__gallery-main {
    min-height: 380px;
}

.ae-hero__gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ae-hero__gallery-side {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 12px;
}

.ae-hero__gallery-item--more::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.ae-hero__gallery-more {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    gap: 8px;
    border: 0;
    width: 100%;
    background: transparent;
    cursor: pointer;
}

.ae-hero__gallery-more svg {
    width: 18px;
    height: 18px;
}

.ae-hero__gallery-more:hover {
    background: #0051E5 !important;
}

.ae-hero__gallery-item--placeholder {
    background: rgba(14, 22, 36, 0.22);
}


/* ── Stats bar ─────────────────────────────────── */

.ae-stats-bar {
    background: #fff;
    border-bottom: 1px solid var(--ae-border);
    padding-block: 14px;
}

.ae-stats-bar__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
}

.ae-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--ae-text);
}

.ae-stat__icon {
    width: 18px;
    height: 18px;
    color: var(--ae-accent);
    flex-shrink: 0;
}

.ae-stat a {
    color: inherit;
    text-decoration: none;
}

.ae-stat a:hover {
    text-decoration: underline;
}


/* ── Layout ────────────────────────────────────── */

.ae-layout {
    display: grid;
    grid-template-columns: 1fr 390px;
    gap: 40px;
    padding-block: 48px;
    align-items: start;
}


/* ── About section ─────────────────────────────── */

.ae-about {
    display: flex;
    gap: 20px;
    margin-bottom: 36px;
}

.ae-about__thumbnail img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: var(--ae-radius);
}

.ae-about__body h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px;
}

.ae-about__text {
    font-size: 16px;
    line-height: 1.7;
    color: #374151;
}


/* ── Meta grid ─────────────────────────────────── */

.ae-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 32px;
    margin-bottom: 32px;
}

.ae-meta-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.ae-meta-item svg {
    width: 20px;
    height: 20px;
    color: var(--ae-muted);
    flex-shrink: 0;
    margin-top: 2px;
}

.ae-meta-item strong {
    display: block;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ae-muted);
    margin-bottom: 4px;
}

.ae-meta-item p {
    margin: 0;
    font-size: 15px;
}

.ae-meta-item a {
    color: var(--ae-accent);
    text-decoration: none;
}

.ae-meta-item a:hover {
    text-decoration: underline;
}


/* Tags */

.ae-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
}

.ae-tag {
    background: #f0f4ff;
    color: var(--ae-accent);
    border-radius: 50px;
    padding: 3px 12px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.ae-tag:hover {
    background: #dbeafe;
}


/* ── Production note ───────────────────────────── */

.ae-production-note {
    display: flex;
    gap: 12px;
    background: #fff8f0;
    border: 1px solid #fed7aa;
    border-radius: var(--ae-radius);
    padding: 16px 18px;
    font-size: 15px;
    color: #92400e;
}

.ae-production-note svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
    color: #f59e0b;
}

.ae-production-note strong {
    display: block;
    margin-bottom: 4px;
}

.ae-production-note p {
    margin: 0;
    line-height: 1.6;
}


/* ── Ticket widget ─────────────────────────────── */

.ae-ticket-widget {
    background: #fff;
    border: 1px solid var(--ae-border);
    border-radius: var(--ae-radius);
    padding: 28px;
    font-size: 16px;
    position: sticky;
    top: 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
}

.ae-ticket-widget__header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 20px;
}

.ae-ticket-widget__header h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}


/* Date list */

.ae-date-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ae-date-option {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1.5px solid var(--ae-border);
    border-radius: var(--ae-radius);
    padding: 12px 14px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.ae-date-option input[type="radio"] {
    display: none;
}

.ae-date-option:hover,
.ae-date-option--selected {
    border-color: var(--ae-accent);
    background: #f0f7ff;
}

.ae-date-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--ae-dark-mid);
    color: #fff;
    border-radius: 6px;
    padding: 6px 10px;
    min-width: 44px;
    text-align: center;
}

.ae-date-card__month {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #90b3f8;
}

.ae-date-card__day {
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
}

.ae-date-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ae-date-info__label {
    font-size: 14px;
    font-weight: 600;
}

.ae-date-info__sala {
    font-size: 13px;
    color: var(--ae-muted);
}

.ae-date-price {
    font-weight: 700;
    font-size: 16px;
    white-space: nowrap;
    margin-left: auto;
}


/* Guarantees */

.ae-ticket-widget__guarantees {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ae-guarantee {
    display: flex;
    gap: 12px;
    font-size: 13px;
    line-height: 1.5;
    color: #374151;
}

.ae-guarantee svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--ae-accent);
    margin-top: 2px;
}

.ae-guarantee strong {
    display: block;
}

.ae-guarantee p {
    margin: 0;
    color: var(--ae-muted);
}


/* ── Gallery modal ────────────────────────────── */

.ae-gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.ae-gallery-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 13, 20, 0.82);
}

.ae-gallery-modal__dialog {
    position: relative;
    width: min(92vw, 980px);
    height: min(86vh, 700px);
    margin: 7vh auto;
    display: grid;
    grid-template-columns: 56px 1fr 56px;
    align-items: center;
    background: #111827;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

.ae-gallery-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    z-index: 5;
}

.ae-gallery-modal__close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.ae-gallery-modal__slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.ae-gallery-modal__slide {
    display: none;
    width: 100%;
    height: 100%;
    margin: 0;
}

.ae-gallery-modal__slide.is-active {
    display: block;
}

.ae-gallery-modal__slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #111827;
}

.ae-gallery-modal__nav {
    height: 100%;
    border: 0;
    color: #fff;
    font-size: 34px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.06);
}

.ae-gallery-modal__nav:hover {
    background: rgba(255, 255, 255, 0.15);
}


/* ── Events calendar shortcode ─────────────────── */

.ae-calendar {
    max-width: 1240px;
    margin: 0 auto;
    padding: 26px 24px 34px;
}

.ae-calendar__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.ae-calendar__intro h2 {
    margin: 0;
    font-size: clamp(34px, 3.8vw, 52px);
    line-height: 1.05;
    color: #1f2937;
}

.ae-calendar__intro p {
    margin: 8px 0 0;
    color: #6b7280;
    font-size: 16px;
}

.ae-calendar__filters {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ae-calendar__month-wrap {
    position: relative;
}

.ae-calendar__month-select {
    appearance: none;
    border: 1px solid #e5e7eb;
    background: #f5f6fb;
    color: #111827;
    border-radius: 999px;
    min-width: 160px;
    padding: 11px 36px 11px 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.ae-calendar__month-wrap::after {
    content: '\25BE';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #6b7280;
    pointer-events: none;
}

.ae-calendar__cats {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ae-calendar__cat-btn {
    border: 0;
    background: transparent;
    border-radius: 999px;
    padding: 10px 12px;
    font-size: 14px;
    color: #6b7280;
    cursor: pointer;
    font-weight: 600;
}

.ae-calendar__cat-btn:hover {
    color: #1f2937;
    background: #f3f4f6;
}

.ae-calendar__cat-btn.is-active {
    background: #111827;
    color: #fff;
}

.ae-calendar__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.ae-cal-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ae-cal-card__media {
    position: relative;
    display: block;
    min-height: 190px;
    background: #111827;
}

.ae-cal-card__media img,
.ae-cal-card__media-fallback {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    object-fit: cover;
    display: block;
}

.ae-cal-card__media-fallback {
    background: linear-gradient(135deg, #1f2937, #374151);
}

.ae-cal-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #eef4ff;
    color: #1e40af;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.ae-cal-card__datetime {
    position: absolute;
    left: 10px;
    bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.ae-cal-card__date {
    background: #0051e5;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
}

.ae-cal-card__time {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.ae-cal-card__content {
    padding: 14px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.ae-cal-card__content h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
    color: #111827;
}

.ae-cal-card__content h3 a {
    color: inherit;
    text-decoration: none;
}

.ae-cal-card__content h3 a:hover {
    text-decoration: underline;
}

.ae-cal-card__location {
    margin: 0;
    color: #9ca3af;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ae-cal-card__location-icon {
    width: 12px;
    height: 12px;
    background-color: #9ca3af;
    -webkit-mask-image: url('../images/location_pin.svg');
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    mask-image: url('../images/location_pin.svg');
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    flex-shrink: 0;
}

.ae-cal-card__footer {
    margin-top: auto;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
}

.ae-cal-card__price-label {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 10px;
    color: #9ca3af;
    font-weight: 700;
    margin-bottom: 3px;
}

.ae-cal-card__footer strong {
    color: #111827;
    font-size: 30px;
}

.ae-cal-card__arrow {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 0;
    background: #edf2ff;
    color: #0051e5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 700;
}

.ae-cal-card__arrow:hover {
    background: #dbe8ff;
}

.ae-calendar__empty {
    margin: 16px 0 0;
    color: #6b7280;
}

.ae-calendar__bottom {
    display: flex;
    justify-content: center;
    margin-top: 34px;
}

.ae-calendar__cta {
    border: 2px solid #1f2937;
    color: #1f2937;
    text-decoration: none;
    border-radius: 12px;
    padding: 12px 22px;
    font-weight: 700;
    font-size: 14px;
}

.ae-calendar__cta:hover {
    background: #f3f4f6;
}


/* Strict scope overrides for shortcode pages */

.ae-calendar[data-ae-calendar],
.ae-calendar[data-ae-calendar] * {
    box-sizing: border-box;
}

.ae-calendar[data-ae-calendar] {
    color: #111827;
}

.ae-calendar[data-ae-calendar] .ae-calendar__intro h2 {
    font-size: clamp(34px, 3.8vw, 52px) !important;
    line-height: 1.05 !important;
    margin: 0 !important;
    color: #1f2937 !important;
}

.ae-calendar[data-ae-calendar] .ae-calendar__intro p {
    margin: 8px 0 0 !important;
    font-size: 16px !important;
    color: #6b7280 !important;
}

.ae-calendar[data-ae-calendar] .ae-cal-card {
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.ae-calendar[data-ae-calendar] .ae-cal-card__media {
    position: relative !important;
    display: block !important;
    min-height: 190px !important;
    height: 190px !important;
    overflow: hidden !important;
}

.ae-calendar[data-ae-calendar] .ae-cal-card__media img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    max-width: none !important;
    max-height: none !important;
}

.ae-calendar[data-ae-calendar] .ae-cal-card__content {
    position: relative !important;
    z-index: 1 !important;
    flex: 1 !important;
}

.ae-calendar[data-ae-calendar] .ae-cal-card__content h3 {
    margin: 0 !important;
    font-size: 18px !important;
    line-height: 1.2 !important;
    color: #111827 !important;
}

.ae-calendar[data-ae-calendar] .ae-cal-card__content h3 a {
    color: #111827 !important;
    text-decoration: none !important;
}

.ae-calendar[data-ae-calendar] .ae-cal-card__location {
    margin: 0 !important;
    font-size: 13px !important;
    color: #9ca3af !important;
}

.ae-calendar[data-ae-calendar] .ae-cal-card__price-label {
    font-size: 10px !important;
    color: #9ca3af !important;
}

.ae-calendar[data-ae-calendar] .ae-cal-card__footer strong {
    font-size: 30px !important;
    color: #111827 !important;
}

.ae-calendar[data-ae-calendar] .ae-cal-card__arrow {
    color: #0051e5 !important;
}


/* ── Responsive ────────────────────────────────── */

@media (max-width: 900px) {
    .ae-calendar__head {
        flex-direction: column;
    }
    .ae-calendar__filters {
        justify-content: flex-start;
    }
    .ae-calendar__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .ae-hero {
        min-height: auto;
    }
    .ae-hero__inner {
        grid-template-columns: 1fr;
        gap: 24px;
        padding-block: 36px;
    }
    .ae-hero__gallery {
        justify-self: stretch;
        max-width: none;
    }
    .ae-hero__gallery-main {
        min-height: 320px;
    }
    .ae-layout {
        grid-template-columns: 1fr;
    }
    .ae-ticket-widget {
        position: static;
    }
    .ae-hero__gallery {
        display: none;
    }
    .ae-meta-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .ae-calendar {
        padding-inline: 14px;
    }
    .ae-calendar__intro h2 {
        font-size: clamp(28px, 9vw, 40px);
    }
    .ae-calendar__grid {
        grid-template-columns: 1fr;
    }
    .ae-hero {
        min-height: auto;
    }
    .ae-hero__content {
        padding-block: 0;
    }
    .ae-hero__gallery {
        grid-template-columns: 1fr;
    }
    .ae-hero__gallery-main {
        min-height: 220px;
    }
    .ae-hero__gallery-side {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr;
    }
    .ae-hero__gallery-item {
        min-height: 130px;
    }
    .ae-gallery-modal__dialog {
        width: 96vw;
        height: 82vh;
        margin: 9vh auto;
        grid-template-columns: 44px 1fr 44px;
    }
    .ae-gallery-modal__nav {
        font-size: 28px;
    }
    .ae-about {
        flex-direction: column;
    }
    .ae-about__thumbnail img {
        width: 100%;
        height: 160px;
    }
}