/* Event pages (list + detail).
   Palette and shapes follow the store pages: ink #0f172a, muted #64748b, gold accent #b49968/#d7c3a0,
   dark pills, 14px cards, 20px "sheet" radius with the same shadows. Shares the masthead from main.css
   and the CTA button from stores.css. */

.events-page {
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --gold: #b49968;
    --gold-light: #d7c3a0;
    --gold-tint: #f7f2e8;
    --sheet-radius: 20px;
    --shadow: 0 10px 32px rgba(2, 6, 23, 0.10);
    --shadow-strong: 0 16px 44px rgba(2, 6, 23, 0.18);

    min-height: 100vh;
    background-color: #ffffff;
    width: 100%;
    overflow-x: hidden;
    font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--ink);
}

.events-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 8px 50px 48px;
}

.events-page .page-masthead-inner {
    max-width: 1400px;
    padding: 0 50px;
}

/* ---------- List ---------- */

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.events-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform .3s cubic-bezier(.4, 0, .2, 1), box-shadow .3s, border-color .3s;
}

.events-card:hover,
.events-card:focus-visible {
    border-color: #000;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .14);
    transform: translateY(-3px);
    outline: none;
}

/* 4:3 crops a 16:9 cover far less than a square would; the subject is usually centered */
.events-card-media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #f1f5f9;
    overflow: hidden;
}

.events-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform .35s;
}

.events-card:hover .events-card-img {
    transform: scale(1.04);
}

.events-card-img--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 48px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.75)),
        url('/assets/img/bg-2-gold.svg') center / cover no-repeat;
}

/* Status pills: same dark pill as the store page badges */
.events-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    z-index: 1;
}

span.events-badge[data-key] {
    display: inline-flex;
    min-height: 0;
}

.events-badge--live::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold-light);
}

.events-badge--past {
    background: var(--muted);
}

.events-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px 18px;
}

.events-card-date,
.events-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
}

.events-card-date i,
.events-card-meta i {
    color: var(--gold);
    font-size: 14px;
    flex: 0 0 auto;
}

.events-card-title {
    margin: 2px 0 0;
    font-size: 17px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.events-card-cta {
    margin-top: 6px;
    font-size: 13px;
    color: #94a3b8;
}

.events-empty {
    text-align: center;
    padding: 80px 20px;
    color: #94a3b8;
}

.events-empty i {
    font-size: 56px;
    margin-bottom: 18px;
    display: block;
    color: var(--gold);
}

.events-empty p {
    margin: 0;
    font-size: 18px;
    color: var(--muted);
}

/* ---------- Detail ---------- */

.event-detail {
    padding-top: 8px;
}

/* Breadcrumb: items never break inside ("Ana Sayfa" stays on one line); the list wraps as a whole on
   narrow screens and the event title is cut with an ellipsis instead of overflowing. */
.events-page .page-masthead-breadcrumb {
    flex-wrap: wrap;
    row-gap: 6px;
}

.events-page .page-masthead-breadcrumb li {
    white-space: nowrap;
    min-width: 0;
    max-width: 100%;
}

.events-page .page-masthead-crumb-text {
    display: block;
    max-width: 48ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.events-page .page-masthead-title {
    overflow-wrap: anywhere;
}

.event-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr);
    gap: 28px;
    align-items: start;
}

.event-hero {
    position: relative;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: var(--sheet-radius);
    overflow: hidden;
    background: #0f172a;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

/* The uploaded image is shown whole (contain); a blurred copy of it fills the rest of the frame,
   so portrait or square uploads do not get cropped and do not leave flat bars either. */
.event-hero-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: blur(28px) saturate(1.1);
    transform: scale(1.15);
    opacity: .75;
    pointer-events: none;
}

.event-hero-img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.event-hero-img--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    color: var(--gold);
    background:
        linear-gradient(rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.75)),
        url('/assets/img/bg-2-gold.svg') center / cover no-repeat;
}

.event-hero .events-badge {
    top: 16px;
    left: 16px;
}

.event-main,
.event-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

/* Short description strip: the gold pattern used on the store info bar, with a solid gold edge */
.event-banner {
    margin: 0;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--gold);
    border-radius: 14px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.9)),
        url('/assets/img/bg-2-gold.svg') center top / cover no-repeat;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.55;
    font-weight: 500;
    overflow-wrap: anywhere;
}

.event-info {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--sheet-radius);
    box-shadow: var(--shadow);
    padding: 22px 24px;
}

.event-info-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.2px;
    color: var(--ink);
}

.event-info-title i {
    color: var(--gold);
    font-size: 18px;
}

.event-info-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.event-info-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
}

/* One icon style for every row: dark tile, gold glyph (the badge colors of the store page) */
.event-info-icon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #111827;
    color: var(--gold-light);
    font-size: 16px;
}

.event-info-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.event-info-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}

.event-info-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.event-info-sub {
    font-weight: 500;
    color: var(--muted);
}

/* Accordion panels */

.event-sections {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 32px;
}

.event-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.event-panel[open] {
    box-shadow: var(--shadow);
}

.event-panel-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 22px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background .15s ease;
}

.event-panel-summary::-webkit-details-marker {
    display: none;
}

.event-panel-summary:hover {
    background: #f8fafc;
}

.event-panel-summary:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: -2px;
}

.event-panel-icon {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #111827;
    color: var(--gold-light);
    font-size: 15px;
}

.event-panel-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.event-panel-caret {
    flex: 0 0 auto;
    color: var(--muted);
    transition: transform .2s ease;
}

.event-panel[open] > .event-panel-summary .event-panel-caret {
    transform: rotate(180deg);
    color: var(--gold);
}

.event-panel-body {
    padding: 4px 22px 22px;
}

/* Nested question/answer list inside a collapse block */

.event-faq {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.event-faq-item {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.event-faq-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    list-style: none;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    background: #f8fafc;
}

.event-faq-summary::-webkit-details-marker {
    display: none;
}

.event-faq-summary span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.event-faq-summary i {
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--muted);
    transition: transform .2s ease;
}

.event-faq-item[open] > .event-faq-summary i {
    transform: rotate(180deg);
    color: var(--gold);
}

.event-faq-body {
    padding: 12px 16px 16px;
}

/* Rich text coming from YYS (sanitized). Lists and indents are set explicitly: the global reset drops them. */

.event-rich {
    font-size: 15px;
    line-height: 1.7;
    color: #334155;
    overflow-wrap: anywhere;
}

.event-rich p {
    margin: 0 0 .75em;
}

.event-rich p:last-child {
    margin-bottom: 0;
}

.event-rich ul {
    list-style: disc;
    margin: 0 0 .75em;
    padding-left: 1.5em;
}

.event-rich ol {
    list-style: decimal;
    margin: 0 0 .75em;
    padding-left: 1.5em;
}

.event-rich li {
    margin-bottom: .3em;
}

.event-rich h2,
.event-rich h3 {
    margin: 1em 0 .4em;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.3;
}

.event-rich h2 {
    font-size: 18px;
}

.event-rich h3 {
    font-size: 16px;
}

.event-rich a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--gold);
    text-underline-offset: 2px;
}

.event-rich a:hover {
    color: var(--gold);
}

.event-rich blockquote {
    margin: 0 0 .75em;
    padding-left: 14px;
    border-left: 3px solid var(--gold-light);
    color: #475569;
}

.event-rich img,
.event-rich video,
.event-rich iframe {
    max-width: 100%;
    height: auto;
}

.event-rich table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

.event-rich .ql-align-center { text-align: center; }
.event-rich .ql-align-right { text-align: right; }
.event-rich .ql-align-justify { text-align: justify; }
.event-rich .ql-indent-1 { margin-left: 1.5em; }
.event-rich .ql-indent-2 { margin-left: 3em; }
.event-rich .ql-indent-3 { margin-left: 4.5em; }
.event-rich .ql-indent-4 { margin-left: 6em; }
.event-rich .ql-indent-5 { margin-left: 7.5em; }
.event-rich .ql-indent-6 { margin-left: 9em; }
.event-rich .ql-indent-7 { margin-left: 10.5em; }
.event-rich .ql-indent-8 { margin-left: 12em; }

/* "More images" gallery: section heading with the same fading rule as the store page sections */

.event-gallery {
    margin-top: 40px;
}

.event-gallery-title {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 20px;
    font-size: 24px;
    font-weight: 700;
    color: var(--ink);
    font-family: "Tiempos Headline", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.event-gallery-title::after {
    content: "";
    flex: 1 1 40px;
    height: 2px;
    background: linear-gradient(135deg, var(--line) 0%, transparent 100%);
}

.event-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.event-gallery-item {
    display: block;
    aspect-ratio: 4 / 3;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: #f1f5f9;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: transform .3s cubic-bezier(.4, 0, .2, 1), box-shadow .3s, border-color .3s;
}

.event-gallery-item:hover,
.event-gallery-item:focus-visible {
    border-color: #000;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .14);
    transform: translateY(-3px);
    outline: none;
}

.event-gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform .35s;
}

.event-gallery-item:hover .event-gallery-img {
    transform: scale(1.04);
}

.event-back {
    text-align: center;
    margin-top: 40px;
}

.event-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    font-size: 15px;
    text-decoration: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
    .events-container,
    .events-page .page-masthead-inner {
        padding-left: 30px;
        padding-right: 30px;
    }

    .events-grid {
        gap: 20px;
    }

    .event-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .events-container,
    .events-page .page-masthead-inner {
        padding-left: 16px;
        padding-right: 16px;
    }

    .events-container {
        padding-bottom: 32px;
    }

    .events-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 14px;
    }

    .events-card-body {
        padding: 12px 14px 14px;
    }

    .events-card-title {
        font-size: 15px;
    }

    .events-page .page-masthead-crumb-text {
        max-width: 100%;
    }

    .event-hero {
        border-radius: 14px;
    }

    .event-info {
        padding: 16px;
        border-radius: 14px;
    }

    .event-panel-summary {
        padding: 14px 16px;
    }

    .event-panel-body {
        padding: 4px 16px 16px;
    }
}

.events-badge--inline {
    position: static;
    width: max-content;
    height: 24px;
    padding: 0 10px;
    margin: 0 0 8px;
    font-size: 11px;
}

.event-info-text .events-badge--inline {
    margin: 6px 0 0;
}

.events-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-weight: 600;
}

.events-card-cta span[data-key] {
    min-height: 0;
}

.events-card-cta i {
    font-size: 12px;
    transition: transform .2s ease;
}

.events-card:hover .events-card-cta i {
    transform: translateX(3px);
}

@media (max-width: 480px) {
    .events-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
