/* ===== EVENT DETAIL PAGE ===== */

.event-detail{
    background: var(--color-surface);
    font-family: 'Manrope', var(--font-main);
}

.event-detail-container{
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.event-detail-heading{
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.01em;
}

.event-detail-subheading {
    font-size:var(--font-size-lg);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--spacing-md);
}

.event-detail-sub{
    font-size: var(--font-size-base);
    color: var(--color-accent);
    margin-top: var(--spacing-sm);
    max-width: 620px;
}

/* ===== HERO ===== */
.event-detail-hero{
    position: relative;
    width: 100%;
    min-height: 600px;
    height: 80vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

/* ===== MOBILE: EVENT DETAIL HERO =====
   min-height: 600px and height: 80vh contradict each other on a phone and
   min-height wins, because it is a floor applied after height resolves. On a
   375x667 device 80vh is 534px but the floor forces 600px — 90% of the
   viewport spent on one image before any content appears. Rotate to landscape
   and it is worse: 80vh becomes ~300px, the floor still says 600px, so the
   reader scrolls two full screens of photograph to reach the article.

   Lowering the floor lets height:80vh actually govern, which is what the
   original rule intended. */
@media (max-width: 768px) {
    .event-detail-hero {
        min-height: 320px;
        height: 60vh;
    }
}

.event-detail-hero-bg{
    position: absolute;
    inset:0;
    z-index: 0;
}

.event-detail-hero-bg img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-detail-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 55%, transparent 100%);
}
 
.event-detail-hero-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg) var(--spacing-xl);
}
 
.event-detail-hero-content {
    max-width: 720px;
}
 
.event-detail-badge-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}
 
.event-detail-badge {
    background: rgba(196, 139, 132, 0.25);
    backdrop-filter: blur(8px);
    color: var(--color-primary-light);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(196, 139, 132, 0.4);
}
 
.event-detail-hero-location {
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
}
 
.event-detail-hero-title {
    color: var(--color-white);
    font-size: 44px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin-bottom: var(--spacing-md);
}
 
.event-detail-hero-desc {
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--font-size-lg);
    max-width: 560px;
    line-height: 1.6;
}
 
/* ===== IMPACT STATS ===== */
.event-detail-stats {
    background: var(--color-surface-alt);
    padding: var(--spacing-lg) 0;
    border-bottom: 1px solid rgba(196, 139, 132, 0.15);
}
 
.event-detail-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
    text-align: center;
}
 
.event-detail-stat-value {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-primary-dark);
}
 
.event-detail-stat-label {
    font-size: 13px;
    color: var(--color-accent);
    margin-top: 4px;
}
 
/* ===== STORY + QUICK FACTS ===== */
.event-detail-story-section {
    padding: var(--spacing-xl) 0;
}
 
.event-detail-story-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: var(--spacing-xl);
}
 
.event-detail-story-body {
    color: var(--color-accent);
    font-size: var(--font-size-base);
    line-height: 1.75;
    margin-top: var(--spacing-md);
}
 
.event-detail-story-body p {
    margin-bottom: var(--spacing-md);
}
 
.event-detail-facts-card {
    background: var(--color-surface-alt);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    border: 1px solid rgba(196, 139, 132, 0.15);
}
 
.event-detail-facts-list {
    list-style: none;
}
 
.event-detail-facts-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}
 
.event-detail-facts-item:last-child {
    margin-bottom: 0;
}
 
.event-detail-facts-icon {
    color: var(--color-primary-dark);
    background: rgba(196, 139, 132, 0.12);
    padding: 8px;
    border-radius: var(--radius-md);
    font-size: 22px !important;
    flex-shrink: 0;
}
 
.event-detail-facts-label {
    font-weight: 700;
    color: var(--color-text);
    font-size: var(--font-size-sm);
}
 
.event-detail-facts-desc {
    color: var(--color-accent);
    font-size: var(--font-size-sm);
    margin-top: 2px;
}
 
/* ===== EVENT HIGHLIGHTS ===== */
.event-detail-highlights-section {
    background: var(--color-surface-alt);
    padding: var(--spacing-xl) 0;
}
 
.event-detail-highlights-head {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}
 
.event-detail-highlights-head .event-detail-sub {
    margin-left: auto;
    margin-right: auto;
}
 
.event-detail-highlights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}
 
.event-detail-highlight-card {
    background: var(--color-white);
    border: 1px solid rgba(196, 139, 132, 0.15);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    text-align: center;
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
 
.event-detail-highlight-card:hover {
    transform: translateY(-6px);
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    font-variation-settings:
        'FILL' 0,
        'wght' 400,
        'GRAD' 0,
        'opsz' 24;
}

.event-detail-highlight-icon {
    color: var(--color-primary-dark);
    font-size: 42px !important;
    margin-bottom: var(--spacing-md);
    display: inline-block;
}
 
.event-detail-highlight-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--spacing-sm);
}
 
.event-detail-highlight-desc {
    color: var(--color-accent);
    font-size: var(--font-size-sm);
    line-height: 1.6;
}
 
/* ===== GALLERY ===== */
.event-detail-gallery-section {
    padding: var(--spacing-xl) 0;
}
 
.event-detail-gallery-head {
    margin-bottom: var(--spacing-lg);
}
 
.event-detail-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: var(--spacing-md);
    height: 560px;
}
 
.event-detail-gallery-item {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.event-detail-gallery-more {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-lg);
    font-weight: 700;
}
 
.event-detail-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
 
.event-detail-gallery-item:hover img {
    transform: scale(1.08);
}
 
.event-detail-gallery-item:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
}
 
.event-detail-gallery-item:nth-child(2) {
    grid-column: span 1;
    grid-row: span 2;
}
 
.event-detail-gallery-item:nth-child(3),
.event-detail-gallery-item:nth-child(4) {
    grid-column: span 1;
    grid-row: span 1;
}
 
/* ===== TESTIMONIAL ===== */
.event-detail-testimonial-section {
    background: rgba(196, 139, 132, 0.12);
    padding: var(--spacing-xl) 0;
}
 
.event-detail-testimonial-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl) var(--spacing-lg);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
 
.event-detail-quote-mark {
    position: absolute;
    top: -20px;
    left: 10px;
    font-size: 140px !important;
    color: rgba(196, 139, 132, 0.08);
    pointer-events: none;
}
 
.event-detail-testimonial-inner {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}
 
.event-detail-quote-text {
    font-size: var(--font-size-lg);
    font-style: italic;
    color: var(--color-text);
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
}
 
.event-detail-quote-name {
    font-weight: 700;
    color: var(--color-text);
}
 
.event-detail-quote-role {
    font-size: var(--font-size-sm);
    color: var(--color-accent);
    margin-top: 2px;
}
 
/* ===== CTA ===== */
.event-detail-cta-section {
    padding: var(--spacing-xl) 0;
}
 
.event-detail-cta-inner {
    text-align: center;
}
 
.event-detail-cta-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--spacing-md);
}
 
.event-detail-cta-desc {
    color: var(--color-accent);
    font-size: var(--font-size-base);
    max-width: 560px;
    margin: 0 auto var(--spacing-lg);
    line-height: 1.7;
}
 
.event-detail-cta-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}
 
.event-detail-cta-btn-primary {
    background: var(--color-primary-dark);
    color: var(--color-white);
    padding: 14px 32px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: var(--font-size-sm);
    transition: var(--transition);
}
 
.event-detail-cta-btn-primary:hover {
    transform: scale(1.05);
}
 
.event-detail-cta-btn-secondary {
    border: 1px solid var(--color-primary-dark);
    color: var(--color-primary-dark);
    padding: 14px 32px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: var(--font-size-sm);
    transition: var(--transition);
}
 
.event-detail-cta-btn-secondary:hover {
    background: rgba(196, 139, 132, 0.08);
}
 
/* ===== MOBILE ===== */
@media (max-width: 900px) {
    .event-detail-hero-title {
        font-size: 30px;
    }
 
    .event-detail-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
 
    .event-detail-story-grid {
        grid-template-columns: 1fr;
    }
 
    .event-detail-highlights-grid {
        grid-template-columns: 1fr;
    }
 
    .event-detail-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 200px);
        height: auto;
    }
 
    .event-detail-gallery-item:nth-child(1) {
        grid-column: span 2;
        grid-row: span 1;
    }
 
    .event-detail-gallery-item:nth-child(2) {
        grid-column: span 1;
        grid-row: span 1;
    }
}

/* ===== MOBILE: EVENT DETAIL PHASE 2 (767.98px tier) =====
   Appended after the 900px block above, same convention as every prior
   pass -- this only adds rules, nothing above is edited.

   HERO: previously a single 60vh flex box with badge+title+full description
   all overlaid on the photo, badge invisible (bagde/badge typo -- see
   FIXED_BUGS.md), and the description duplicating "The Story Behind the
   Session" word-for-word (same event.description field, just truncated).
   Restructured so the image is a fixed-height band carrying only the
   badge (top-left) and location (bottom-left, over a short scrim), and the
   title flows in normal document flow on solid white background below it.
   .event-detail-hero-bg is a DOM sibling of the badge/location spans, not
   an ancestor, so it can't be their positioning context directly -- both
   anchor to .event-detail-hero itself and use `top`, computed off the
   shared --hero-img-h custom property, rather than `bottom` (which would
   resolve against the now much-taller full hero box, not the image). */
@media (max-width: 767.98px) {
    .event-detail-hero {
        --hero-img-h: 260px;
        display: block;
        height: auto;
        min-height: 0;
        background: var(--color-white);
    }

    .event-detail-hero-bg {
        top: 0;
        left: 0;
        right: 0;
        bottom: auto;
        height: var(--hero-img-h);
        overflow: hidden;
    }

    .event-detail-hero-overlay {
        /* shorter/subtler scrim -- only the location text at the bottom
           of the (now much shorter) image needs contrast; the badge
           carries its own background. */
        background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, transparent 45%);
    }

    .event-detail-badge {
        position: absolute;
        top: 14px;
        left: 14px;
    }

    .event-detail-hero-location {
        position: absolute;
        top: calc(var(--hero-img-h) - 34px);
        left: 14px;
    }

    .event-detail-hero-title {
        /* base color is white, for text that used to sit on the photo --
           it now sits on the white background below the image. */
        color: var(--color-text);
    }

    .event-detail-hero-desc {
        /* duplicates event.description, already rendered in full in
           "The Story Behind the Session" below -- removed rather than
           clamped. Hidden, not deleted: stays in the DOM for the desktop
           view, which is unchanged by this mobile-scoped rule. */
        display: none;
    }

    .event-detail-hero-inner {
        padding: calc(var(--hero-img-h) + var(--spacing-md)) var(--spacing-lg) var(--spacing-lg);
    }

    /* EVENT HIGHLIGHTS: already single-column since the 900px block above,
       but each card stacked icon-above-title-above-description, centered --
       still "3 squeezed narrow columns" turned sideways. Same icon-left
       shape Quick Facts already uses, built with CSS Grid auto-placement
       instead of Quick Facts' wrapper div, since the title/description
       here aren't already wrapped in one and adding one would be a
       template change for a CSS-scoped pass. */
    .event-detail-highlight-card {
        display: grid;
        grid-template-columns: auto 1fr;
        column-gap: var(--spacing-md);
        align-items: start;
        text-align: left;
        padding: var(--spacing-md);
    }

    .event-detail-highlight-icon {
        grid-row: 1 / 3;
        grid-column: 1;
        width: 38px;
        height: 38px;
        margin-bottom: 0;
        background: var(--color-surface-alt);
        border-radius: var(--radius-md);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px !important;
    }

    .event-detail-highlight-title {
        margin-bottom: 2px;
    }

    /* GALLERY: the old rule hardcoded 3 fixed 200px rows plus manual
       nth-child(1)/(2) spans sized for the desktop masonry shape --
       verified against real data to leave a blank 200px row for a
       3-photo session and an empty cell *and* row for a 2-photo one
       (screenshotted before writing this fix). The view now caps
       gallery_preview at 4 images, so a plain 2-column auto-flowing
       square grid is enough to fit 1-4 images with no dead space,
       regardless of which count actually renders. */
    .event-detail-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: none;
        grid-auto-rows: auto;
        height: auto;
        gap: var(--spacing-sm);
    }

    .event-detail-gallery-item {
        aspect-ratio: 1;
    }

    .event-detail-gallery-item:nth-child(1),
    .event-detail-gallery-item:nth-child(2),
    .event-detail-gallery-item:nth-child(3),
    .event-detail-gallery-item:nth-child(4) {
        grid-column: span 1;
        grid-row: span 1;
    }

    /* CTA: text length already forced these to wrap onto two rows by
       accident, but centered at intrinsic width (230px/200px) rather than
       deliberately stacked. Flat 48px on both -- box-sizing so the
       secondary button's 1px border doesn't push it to 50px. */
    .event-detail-cta-buttons {
        flex-direction: column;
    }

    .event-detail-cta-btn-primary,
    .event-detail-cta-btn-secondary {
        width: 100%;
        height: 48px;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 var(--spacing-lg);
    }
}