/**
 * Showcase dashboard — event tiles rebuilt to match the client-provided
 * "eTile" mockup (viet-html/) as closely as possible: blue card border,
 * yellow title banner, centered flip toggle straddling the photo/countdown
 * boundary, outline-style back-panel icons, and the "Live Event / Click to
 * Join the Fun!" graphic (rebuilt in real markup instead of the baked-English
 * Image/liveEvent.jpg, so it stays translatable). The countdown itself and
 * its moving background are real (ported z-counter script + particles.js)
 * rather than the mockup's static placeholder image.
 */

.sc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}

.sc-tile {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 400 / 615;
    margin: 0 auto;
    border: 2px solid #4B83D1;
    border-radius: 24px;
    background-color: #F0F8FF;
    box-shadow: 0 20px 45px rgba(15, 23, 42, .18);
    font-family: 'Outfit', ui-sans-serif, system-ui, sans-serif;
}

/* ── Cover / header zone (71% of the card, 29% once open) ───────────────── */

.sc-tile__up {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 71%;
    overflow: hidden;
    background-position: 50%;
    background-size: cover;
    transition: height .4s ease-in-out;
}

.sc-tile--live .sc-tile__up { height: 71%; }
.sc-tile--open .sc-tile__up { height: 16%; }

.sc-tile__text {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 20%;
    z-index: 1;
    text-align: center;
    background: rgba(79, 131, 209, .75);
    padding: 8px 10px;
    transition: bottom .4s ease-in-out, padding .4s ease-in-out;
}

.sc-tile--open .sc-tile__text { bottom: 0; padding: 4px 8px; }
.sc-tile--open .sc-tile__text p { display: none; }

.sc-tile__text h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
    color: #ffff00;
}

.sc-tile__text p {
    margin: 2px 0 0;
    font-size: 12px;
    color: #E3F1F5;
}

.sc-tile__toggle {
    position: absolute;
    left: 50%;
    top: 71%;
    z-index: 2;
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background-color: #ED145B;
    color: #fff;
    font-size: 20px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, .35);
    transform: translate(-50%, -50%);
    transition: top .4s ease-in-out, transform .4s ease-in-out;
}

.sc-tile--open .sc-tile__toggle {
    top: 16%;
    transform: translate(-50%, -50%) rotate(135deg) scale(.65);
}

/* ── Countdown / live zone (29% of the card, or 16% once open) ──────────── */

.sc-tile__down {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 29%;
    overflow: hidden;
    border-top: 2px solid #4B83D1;
    transition: height .4s ease-in-out;
    background: linear-gradient(155deg, #3a2150, #1c1030);
}

.sc-tile--live .sc-tile__down { height: 29%; border-top: none; }
.sc-tile--open .sc-tile__down { height: 16%; }

.sc-tile__particles { position: absolute; inset: 0; }

.sc-tile__countdown {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding-top: 14%;
}

.sc-cd-box {
    width: 18%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(216, 190, 255, .55);
    color: #fff;
}

.sc-cd-box h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}

.sc-cd-box span {
    margin-top: 2px;
    font-size: 7px;
    text-transform: uppercase;
    letter-spacing: .04em;
    opacity: .85;
}

.sc-tile__caption {
    position: relative;
    z-index: 1;
    margin: 6% 0 0;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #ffff00;
}

/* "Live Event / Click to Join the Fun!" — matches Image/liveEvent.jpg */

.sc-tile__live-cta {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 6%;
    text-decoration: none;
    background: linear-gradient(135deg, #e4e4e4 0%, #d6d6d6 40%, #eaeaea 70%, #d9d9d9 100%);
}

.sc-tile__live-cta i {
    flex: none;
    font-size: 26px;
    color: #ED145B;
}

.sc-tile__live-cta span {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.sc-tile__live-cta strong {
    font-size: 17px;
    font-weight: 800;
    color: #1a2540;
}

.sc-tile__live-cta em {
    font-style: normal;
    font-size: 11px;
    font-weight: 700;
    color: #1a2540;
}

/* ── Back panel (flip-open action menu, revealed over the card's own bg) ── */

.sc-tile__back {
    position: absolute;
    inset: 16% 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5%;
    padding: 12% 8% 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease-in-out .1s;
}

.sc-tile--open .sc-tile__back {
    opacity: 1;
    pointer-events: auto;
}

.sc-tile__back-row {
    margin: 0;
    display: flex;
    gap: 10px;
}

.sc-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 2px solid #4B83D1;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    background: #fff;
}

.sc-icon-label {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
}

.sc-icon-label i {
    flex: none;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 2px solid currentColor;
    font-size: 15px;
}

.sc-icon-label--map,
.sc-icon-label--timeline,
.sc-icon-label--menu { color: #3457a6; }

.sc-icon-label--audio { color: #111827; }
.sc-icon-label--audio i { font-size: 17px; }

.sc-icon-label--video { color: #EB5E95; }
