/* ==========================================================================
   Event detail page (event_preview.php) — builds on home.css + about.css
   ========================================================================== */

/* ---------- Hero ---------- */
.ev-hero { min-height: 62vh; padding: 5rem 0 7rem; align-items: flex-end; }
.ev-hero .ab-hero-bg { filter: saturate(1.1); }
.ev-hero-overlay {
    background:
        radial-gradient(ellipse at 10% 90%, rgba(247, 151, 63, .45) 0%, transparent 55%),
        linear-gradient(180deg, rgba(15, 18, 12, .55) 0%, rgba(15, 18, 12, .75) 60%, rgba(15, 18, 12, .92) 100%);
}
.ev-hero-row {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    margin-bottom: 1.5rem;
}
.ev-date-tile {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 112px;
    padding: 1rem .5rem;
    border-radius: 22px;
    background: linear-gradient(160deg, var(--brand), var(--brand-dark));
    box-shadow: 0 20px 40px rgba(247, 151, 63, .45), inset 0 1px 0 rgba(255, 255, 255, .35);
    line-height: 1;
    animation: popIn .9s var(--ease-spring) .3s both;
}
.ev-date-day { font-size: 2.9rem; font-weight: 900; }
.ev-date-month { font-size: 1rem; font-weight: 800; letter-spacing: .15em; margin-top: .3rem; }
.ev-date-year { font-size: .8rem; opacity: .85; margin-top: .35rem; letter-spacing: .1em; }
.ev-title { font-size: clamp(2rem, 4.5vw, 3.6rem); margin: .6rem 0 0; }
.ev-title .ab-word:last-child { background: none; color: inherit; -webkit-background-clip: initial; background-clip: initial; }
.ev-status {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .9rem;
    border-radius: 50px;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
    animation: heroRise .8s var(--ease-out) .4s both;
}
.ev-status i { width: 8px; height: 8px; border-radius: 50%; }
.ev-status.upcoming { background: rgba(74, 222, 128, .18); border: 1px solid rgba(74, 222, 128, .5); color: #bbf7d0; }
.ev-status.upcoming i { background: #4ade80; animation: livePulse 1.4s ease-in-out infinite; }
.ev-status.past { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .3); color: rgba(255, 255, 255, .85); }
.ev-status.past i { background: rgba(255, 255, 255, .7); }
@keyframes livePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .7); }
    50% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
}
.ev-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    animation: heroRise 1s var(--ease-out) .9s both;
}
.ev-meta span {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    backdrop-filter: blur(8px);
    font-size: .9rem;
    color: rgba(255, 255, 255, .9);
}
.ev-meta i { color: #ffc46b; }
@media (max-width: 575.98px) {
    .ev-hero-row { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .ev-date-tile { flex-direction: row; gap: .5rem; width: auto; padding: .7rem 1rem; border-radius: 14px; }
    .ev-date-day { font-size: 1.6rem; }
    .ev-date-month, .ev-date-year { margin-top: 0; }
}

/* ---------- Body ---------- */
.ev-body { padding: 3rem 0 6rem; background: linear-gradient(180deg, #fff 0%, #fffaf4 100%); }
.ev-article {
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 25px 60px rgba(0, 0, 0, .07);
    overflow: hidden;
    border: 1px solid rgba(17, 24, 39, .05);
}
.ev-cover {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: #f4efe9;
    overflow: hidden;
    cursor: zoom-in;
}
.ev-cover img {
    display: block;
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    transition: transform 1.2s var(--ease-out);
}
.ev-cover:hover img { transform: scale(1.05); }
.ev-zoom {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(6px);
    opacity: 0;
    transform: scale(.7);
    transition: opacity .35s, transform .4s var(--ease-spring), background-color .3s;
}
.ev-cover:hover .ev-zoom,
.ev-thumb:hover .ev-zoom,
.ev-cover:focus-visible .ev-zoom,
.ev-thumb:focus-visible .ev-zoom { opacity: 1; transform: scale(1); background: var(--brand); }
.ev-content { padding: 2.5rem 2.75rem 2.75rem; }
.ev-description {
    font-size: 1.08rem;
    line-height: 1.85;
    color: #444;
}
.ev-description::first-letter {
    float: left;
    font-size: 3.6rem;
    line-height: .9;
    font-weight: 800;
    color: var(--brand);
    margin: .35rem .6rem 0 0;
}
@media (max-width: 575.98px) { .ev-content { padding: 1.6rem 1.4rem 1.8rem; } }

/* ---------- Gallery ---------- */
.ev-gallery-block { margin-top: 3rem; }
.ev-h2 { font-size: 1.7rem; font-weight: 800; margin: 0; color: var(--ink); }
.ev-count-pill {
    padding: .35rem .9rem;
    border-radius: 50px;
    background: rgba(247, 151, 63, .12);
    color: var(--brand-deep);
    font-weight: 700;
    font-size: .85rem;
}
.ev-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    grid-auto-rows: 160px;
    gap: 1rem;
}
.ev-gallery .ev-thumb:nth-child(5n + 1) { grid-row: span 2; }
.ev-thumb {
    position: relative;
    padding: 0;
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    background: #f4efe9;
    cursor: zoom-in;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .08);
    opacity: 0;
    transform: translateY(24px) scale(.95);
    transition: opacity .7s var(--ease-out), transform .7s var(--ease-out), box-shadow .4s;
    transition-delay: var(--d, 0s), var(--d, 0s), 0s;
}
.is-in .ev-thumb { opacity: 1; transform: none; }
.ev-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease-out); }
.ev-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(200, 98, 26, .6));
    opacity: 0;
    transition: opacity .4s;
}
.ev-thumb:hover { box-shadow: 0 20px 40px rgba(247, 151, 63, .3); }
.ev-thumb:hover img { transform: scale(1.12); }
.ev-thumb:hover::after { opacity: 1; }
.ev-thumb .ev-zoom { z-index: 1; width: 40px; height: 40px; }

/* ---------- Share ---------- */
.ev-share-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2.5rem;
    padding: 1.2rem 1.5rem;
    border-radius: 20px;
    background: #fff;
    border: 1px solid rgba(247, 151, 63, .18);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .04);
}
.ev-share { display: flex; gap: .55rem; }
.ev-share a,
.ev-share button {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 0;
    color: #fff;
    font-size: 1.1rem;
    text-decoration: none;
    transition: transform .35s var(--ease-spring), box-shadow .3s;
}
.ev-share a:hover,
.ev-share button:hover { transform: translateY(-4px) rotate(-6deg); box-shadow: 0 10px 20px rgba(0, 0, 0, .18); color: #fff; }
.ev-share .fb { background: #1877f2; }
.ev-share .wa { background: #25d366; }
.ev-share .li { background: #0a66c2; }
.ev-share .tw { background: #111; }
.ev-share .cp { background: var(--brand); }
.ev-back {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-top: 2rem;
    font-weight: 700;
    color: var(--brand-deep);
    text-decoration: none;
}
.ev-back i { transition: transform .35s var(--ease-out); }
.ev-back:hover { color: var(--brand); }
.ev-back:hover i { transform: translateX(-6px); }

/* ---------- Sidebar ---------- */
.ev-sidebar { position: sticky; top: 110px; display: grid; gap: 1.5rem; }
.ev-card {
    padding: 1.75rem;
    border-radius: 24px;
    background: #fff;
    border: 1px solid rgba(17, 24, 39, .06);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .06);
}
.ev-card-title {
    position: relative;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--ink);
    padding-bottom: .8rem;
    margin-bottom: 1.2rem;
}
.ev-card-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--brand), #ffc46b);
}
.ev-info { border-top: 5px solid var(--brand); }
.ev-info-list { list-style: none; padding: 0; margin: 0 0 1.4rem; display: grid; gap: 1rem; }
.ev-info-list li { display: flex; align-items: center; gap: .9rem; }
.ev-info-list i {
    flex: 0 0 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 1.15rem;
    color: var(--brand);
    background: rgba(247, 151, 63, .12);
}
.ev-info-list small { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: #999; }
.ev-info-list strong { color: var(--ink); font-size: .95rem; }
.ev-countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .5rem;
    margin-bottom: 1.2rem;
}
.ev-countdown div {
    text-align: center;
    padding: .7rem .2rem;
    border-radius: 14px;
    background: linear-gradient(160deg, #2b351f, #1b1f17);
    color: #fff;
}
.ev-countdown span { display: block; font-size: 1.5rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ev-countdown span.tick { animation: tick .4s var(--ease-out); }
.ev-countdown small { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #ffc46b; }
@keyframes tick {
    from { transform: translateY(-6px); opacity: .3; }
    to { transform: none; opacity: 1; }
}
.ev-btn { border-radius: 14px !important; padding: .8rem 1rem !important; font-weight: 700; }

.ev-others { display: grid; gap: .4rem; }
.ev-other {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: .55rem;
    margin: 0 -.55rem;
    border-radius: 16px;
    text-decoration: none;
    color: var(--ink);
    transition: background-color .3s, transform .35s var(--ease-out);
}
.ev-other:hover { background: #fff6ec; transform: translateX(4px); color: var(--ink); }
.ev-other-img {
    position: relative;
    flex: 0 0 72px;
    height: 72px;
    border-radius: 14px;
    overflow: hidden;
}
.ev-other-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.ev-other:hover .ev-other-img img { transform: scale(1.12); }
.ev-other-img span {
    position: absolute;
    left: 4px;
    top: 4px;
    padding: .15rem .35rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, .92);
    color: var(--brand-deep);
    font-size: .8rem;
    font-weight: 800;
    line-height: 1;
    text-align: center;
}
.ev-other-img span small { display: block; font-size: .55rem; letter-spacing: .05em; }
.ev-other-text { flex: 1; min-width: 0; }
.ev-other-text strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: .95rem;
    line-height: 1.35;
}
.ev-other-text small { color: #888; font-size: .8rem; }
.ev-other-arrow { font-size: 1.5rem; color: var(--brand); opacity: 0; transform: translateX(-6px); transition: opacity .3s, transform .35s var(--ease-out); }
.ev-other:hover .ev-other-arrow { opacity: 1; transform: none; }

.ev-cta {
    position: relative;
    overflow: hidden;
    color: #fff;
    border: 0;
    background: linear-gradient(140deg, var(--brand), var(--brand-dark));
}
.ev-cta::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    right: -70px;
    top: -70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    animation: blob 12s ease-in-out infinite;
}
.ev-cta-icon { font-size: 2.2rem; display: inline-block; animation: floatY 4s ease-in-out infinite; }
.ev-cta h3 { font-weight: 800; font-size: 1.3rem; margin: .6rem 0 .4rem; }
.ev-cta p { color: rgba(255, 255, 255, .88); font-size: .95rem; }
.ev-cta .btn-light { color: var(--brand-deep); position: relative; }
@media (max-width: 991.98px) { .ev-sidebar { position: static; } }

/* ---------- Lightbox ---------- */
.ev-lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    grid-template-columns: 72px 1fr 72px;
    grid-template-rows: 1fr auto;
    align-items: center;
    background: rgba(10, 12, 8, .94);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity .35s ease;
}
.ev-lightbox[hidden] { display: none; }
.ev-lightbox.open { opacity: 1; }
.ev-lb-figure { grid-column: 2; margin: 0; text-align: center; padding: 4rem 0 1rem; }
.ev-lb-figure img {
    max-width: 100%;
    max-height: calc(100vh - 220px);
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
    animation: lbIn .45s var(--ease-out);
}
@keyframes lbIn {
    from { opacity: 0; transform: scale(.94); }
    to { opacity: 1; transform: none; }
}
.ev-lb-figure figcaption { color: rgba(255, 255, 255, .7); margin-top: 1rem; font-size: .9rem; letter-spacing: .1em; }
.ev-lb-close,
.ev-lb-nav {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .25);
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-size: 1.3rem;
    display: grid;
    place-items: center;
    justify-self: center;
    transition: background-color .3s, transform .35s var(--ease-spring);
}
.ev-lb-close:hover,
.ev-lb-nav:hover { background: var(--brand); transform: scale(1.1); }
.ev-lb-close { position: absolute; top: 1.2rem; right: 1.2rem; }
.ev-lb-nav.prev { grid-column: 1; grid-row: 1; }
.ev-lb-nav.next { grid-column: 3; grid-row: 1; }
.ev-lb-strip {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    gap: .5rem;
    padding: 0 1rem 1.5rem;
    overflow-x: auto;
}
.ev-lb-strip button {
    flex: 0 0 64px;
    height: 48px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    opacity: .5;
    background: none;
    transition: opacity .3s, border-color .3s, transform .3s var(--ease-out);
}
.ev-lb-strip button:hover { opacity: .85; }
.ev-lb-strip button.active { opacity: 1; border-color: var(--brand); transform: translateY(-3px); }
.ev-lb-strip img { width: 100%; height: 100%; object-fit: cover; }
.ev-lightbox.single .ev-lb-nav,
.ev-lightbox.single .ev-lb-strip { visibility: hidden; }
@media (max-width: 575.98px) {
    .ev-lightbox { grid-template-columns: 0 1fr 0; }
    .ev-lb-nav { position: absolute; bottom: 90px; }
    .ev-lb-nav.prev { left: 1rem; }
    .ev-lb-nav.next { right: 1rem; }
    .ev-lb-figure { padding: 4rem .75rem 1rem; }
}

/* ---------- Toast ---------- */
.ev-toast {
    position: fixed;
    left: 50%;
    bottom: 30px;
    z-index: 3100;
    padding: .8rem 1.4rem;
    border-radius: 50px;
    background: var(--ink);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 15px 35px rgba(0, 0, 0, .25);
    transform: translate(-50%, 30px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s, transform .45s var(--ease-spring);
}
.ev-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Not found ---------- */
.ev-notfound { padding: 8rem 0; background: linear-gradient(180deg, #fff 0%, #fff4e8 100%); }
.ev-notfound-icon {
    width: 110px;
    height: 110px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 3rem;
    color: var(--brand);
    background: rgba(247, 151, 63, .12);
    animation: floatY 4s ease-in-out infinite;
}
.ev-notfound h1 { font-weight: 800; }

@media (prefers-reduced-motion: reduce) {
    .ev-thumb { opacity: 1 !important; transform: none !important; }
}
