/* ==========================================================================
   Tunivisions ISSAT Kairouan — components.css
   Hero, cards, forms, gallery, tables, modal, CTA, journal feed, uploads.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Home hero
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    padding: 76px 0 84px;
    overflow: hidden;
    /* Transparent base, so the page gradient carries through the hero. */
    background:
        radial-gradient(ellipse at 88% 18%, rgba(237, 23, 76, .20) 0, transparent 42%),
        radial-gradient(ellipse at 6% 90%, rgba(237, 23, 76, .10) 0, transparent 45%),
        transparent;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 56px;
    align-items: center;
}
.hero h1 {
    margin: 20px 0 22px;
    font-size: clamp(40px, 5.2vw, 70px);
    line-height: 1.05;
    letter-spacing: -3px;
}
.hero h1 span { color: var(--red); }
.hero p { max-width: 580px; margin: 0 0 30px; color: var(--muted); font-size: 17px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-top: 30px;
    color: var(--faint);
    font-size: 13px;
}
.avatar-stack { display: flex; padding-inline-start: 6px; }
.avatar-stack span {
    width: 30px; height: 30px;
    display: grid;
    place-items: center;
    margin-inline-start: -6px;
    border-radius: 50%;
    background: var(--red);
    border: 2px solid #000;
    color: #fff;
    font-size: 12px;
}
/* Four different colours: brand red, orange, green, blue. */
.avatar-stack span:nth-child(1) { background: var(--red); }
.avatar-stack span:nth-child(2) { background: #f79009; }
.avatar-stack span:nth-child(3) { background: #12b76a; }
.avatar-stack span:nth-child(4) { background: #2e90fa; }

/* Hero art */
.hero-art { position: relative; display: grid; place-items: center; min-height: 420px; }
.art-panel {
    position: relative;
    width: min(100%, 440px);
    height: 380px;
    border-radius: var(--r-xl);
    background: #101010;
    border: 1px solid var(--line);
    box-shadow: 0 40px 80px rgba(0, 0, 0, .6);
    transform: rotate(1deg);
}

/* The club photo fills the whole panel. */
.art-photo {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

/* A soft scrim keeps the words on top of the photo readable. */
.art-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(0, 0, 0, .45) 0, rgba(0, 0, 0, .08) 36%, rgba(0, 0, 0, .62) 100%);
}

.art-title {
    position: absolute;
    z-index: 2;
    inset-inline-start: 32px; inset-block-end: 32px;
    color: #fff;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 36px;
    line-height: 1.05;
    letter-spacing: -1.4px;
}
.art-title span { display: block; color: var(--red-soft); }

/* The two message cards float just outside the panel, over its top corners. */
.floating-tag {
    position: absolute;
    z-index: 2;
    padding: 13px 17px;
    background: #fff;
    color: #000;
    border-radius: var(--r-md);
    box-shadow: 0 18px 36px rgba(0, 0, 0, .5);
    font-family: var(--font-head);
    font-size: 13px;
    font-weight: 700;
    animation: floatY 6s ease-in-out infinite;
}
.floating-tag small { display: block; margin-top: 2px; color: #555; font-size: 11px; font-weight: 500; }
.tag-one { inset-inline-start: -14px; inset-block-start: -78px; }
.tag-two { inset-inline-end: -14px; inset-block-end: -78px; animation-delay: 3s; }

/* --------------------------------------------------------------------------
   2. Page hero & breadcrumbs
   -------------------------------------------------------------------------- */
.page-hero {
    padding: 72px 0 60px;
    /* The band fades into the page instead of ending on a hard edge. */
    background:
        radial-gradient(ellipse at 82% 0%, rgba(237, 23, 76, .18) 0, transparent 42%),
        linear-gradient(180deg, rgba(19, 19, 24, .95) 0%, rgba(19, 19, 24, .5) 70%, rgba(19, 19, 24, 0) 100%);
    border-block-end: 1px solid rgba(255, 255, 255, .04);
}
.page-heading { max-width: 780px; }
.page-heading h1 {
    margin: 12px 0 0;
    font-size: clamp(29px, 3.8vw, 44px);
    letter-spacing: -1.6px;
    line-height: 1.13;
}
.page-heading p { max-width: 660px; margin: 18px 0 0; color: var(--muted); font-size: 17px; }
.breadcrumbs { margin-bottom: 24px; color: var(--muted); font-size: 12px; }
.breadcrumbs a { color: var(--red); font-weight: 600; }

/* --------------------------------------------------------------------------
   3. Cards
   -------------------------------------------------------------------------- */
.card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out), border-color var(--ease);
}
.card::before {
    content: '';
    position: absolute;
    inset-block-start: 0;
    inset-inline: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--red), var(--red-soft));
    transform: scaleX(0);
    transform-origin: inline-start center;
    transition: transform .35s var(--ease-out);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: rgba(237, 23, 76, .4); }
.card:hover::before { transform: scaleX(1); }
.card-body { padding: 24px; }
.card h3 { margin: 0 0 9px; font-size: 19px; letter-spacing: -.4px; }
.card p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }

.card-icon {
    width: 52px; height: 52px;
    display: grid;
    place-items: center;
    margin-bottom: 20px;
    border-radius: var(--r-md);
    background: linear-gradient(140deg, var(--red), var(--red-dark));
    color: #fff;
    font-size: 22px;
    transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
.card:hover .card-icon { transform: translateY(-3px) rotate(-6deg); box-shadow: 0 12px 26px rgba(237, 23, 76, .35); }

/* "More than a club" — an editorial number band, not cards.
   Each stat is just a hairline, an oversized number and a label. */
.club-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px 40px;
    margin-top: 52px;
}
.club-stat {
    --num-size: clamp(46px, 5.4vw, 74px);
    position: relative;
    padding-block-start: 26px;
    border-block-start: 1px solid var(--line);
    transition: border-color var(--ease);
}
.club-stat:nth-child(2) { --stagger: 1; }
.club-stat:nth-child(3) { --stagger: 2; }
.club-stat:nth-child(4) { --stagger: 3; }

.club-stat-n {
    display: block;
    font-family: var(--font-head);
    font-weight: 900;
    font-size: var(--num-size);
    line-height: .95;
    letter-spacing: -3px;
    background-image: linear-gradient(175deg, #fff 0%, rgba(255, 255, 255, .42) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transition: transform .35s var(--ease-out);
}
/* The infinity glyph draws smaller than the digits, so it gets a lift. */
.club-stat-n.is-inf { font-size: calc(var(--num-size) * 1.16); }
.club-stat-l {
    display: block;
    max-width: 22ch;
    margin-top: 16px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
    transition: color var(--ease);
}
.club-stat-l::before {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    margin-bottom: 13px;
    border-radius: 2px;
    background: var(--red);
    transition: width .35s var(--ease-out);
}

/* A soft red bloom behind the number, only while the stat is pointed at. */
.club-stat::after {
    content: '';
    position: absolute;
    inset-block-start: -34px;
    inset-inline-start: -22px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(237, 23, 76, .34), transparent 68%);
    opacity: 0;
    pointer-events: none;
    transition: opacity .4s var(--ease);
}
.club-stat:hover { border-block-start-color: rgba(237, 23, 76, .55); }
.club-stat:hover .club-stat-n {
    transform: translateY(-3px);
    background-image: linear-gradient(175deg, var(--red-soft), var(--red));
}
.club-stat:hover .club-stat-l { color: var(--ink); }
.club-stat:hover .club-stat-l::before { width: 46px; }
.club-stat:hover::after { opacity: 1; }

/* Event cards */
.event-cover {
    position: relative;
    height: 180px;
    padding: 20px;
    display: flex;
    align-items: end;
    background: linear-gradient(135deg, #221820, #8c163a);
    color: #fff;
    overflow: hidden;
}
.event-cover::after {
    content: '';
    position: absolute;
    width: 190px; height: 190px;
    inset-inline-end: -34px; inset-block-start: -74px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    transition: transform .5s var(--ease-out);
}
.card:hover .event-cover::after { transform: scale(1.12) translateY(6px); }
.event-cover .event-type {
    position: relative;
    z-index: 1;
    padding: 6px 11px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: var(--r-xs);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.event-date,
.news-date { margin-bottom: 8px; color: var(--red); font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.news-date { color: var(--muted); letter-spacing: .3px; text-transform: none; }

/* --------------------------------------------------------------------------
   4. Gallery tiles
   -------------------------------------------------------------------------- */
.gallery-tile {
    position: relative;
    min-height: 234px;
    padding: 22px;
    display: flex;
    align-items: end;
    border-radius: var(--r-lg);
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(140deg, #20151c, #8f1439);
    color: #fff;
    transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
.gallery-tile:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.gallery-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 82% 18%, rgba(237, 23, 76, .6), transparent 42%), linear-gradient(transparent, rgba(23, 21, 26, .82));
    transition: opacity .4s var(--ease-out);
}
.gallery-tile:hover::before { opacity: .82; }
.gallery-tile:nth-child(3n+2) { background: linear-gradient(140deg, #31202b, #db315d); }
.gallery-tile:nth-child(3n)   { background: linear-gradient(140deg, #16161d, #6f5364); }
.gallery-tile .shape {
    position: absolute;
    z-index: -1;
    width: 180px; height: 180px;
    inset-inline-end: -35px; inset-block-start: -45px;
    border: 1px solid rgba(255, 255, 255, .26);
    border-radius: 50%;
    transition: transform .5s var(--ease-out);
}
.gallery-tile:hover .shape { transform: scale(1.1) rotate(12deg); }
.gallery-tile h3 { margin: 0; font-size: 20px; }
.gallery-tile p { margin: 5px 0 0; color: #f2e8ed; font-size: 12px; }
.gallery-tile img.tile-photo {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .6s var(--ease-out);
}
.gallery-tile:hover img.tile-photo { transform: scale(1.06); }
.gallery-tile.has-photo::before { background: linear-gradient(transparent 18%, rgba(0, 0, 0, .85)); }

/* --------------------------------------------------------------------------
   5. Team rail (board.html) — one row per team, opening in place
   -------------------------------------------------------------------------- */
.team-rail { border-block-start: 1px solid var(--line); }
.team-row { border-block-end: 1px solid var(--line); transition: border-color var(--ease); }
.team-row.is-open { border-block-end-color: rgba(237, 23, 76, .45); }

.team-head {
    display: flex;
    align-items: center;
    gap: 22px;
    width: 100%;
    padding: 24px 4px;
    text-align: start;
}

/* The round crest: initials on a red disc, with a ring that arrives on open. */
.team-orb { position: relative; flex-shrink: 0; width: 76px; height: 76px; display: grid; place-items: center; }
.team-avatar {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: linear-gradient(140deg, var(--red), var(--red-dark));
    box-shadow: 0 14px 30px rgba(237, 23, 76, .26);
    color: #fff;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 23px;
    letter-spacing: -.5px;
    transition: transform .5s var(--ease-out), box-shadow .5s var(--ease);
}
.team-orb-ring {
    position: absolute;
    inset: -7px;
    border: 1px solid rgba(237, 23, 76, .55);
    border-radius: 50%;
    opacity: 0;
    transform: scale(.82);
    transition: opacity .45s var(--ease), transform .6s var(--ease-out);
}
.team-head:hover .team-avatar { transform: translateY(-3px) scale(1.03); }
.team-head:hover .team-orb-ring { opacity: .6; transform: scale(.94); }
.team-row.is-open .team-avatar { box-shadow: 0 18px 40px rgba(237, 23, 76, .5); }
.team-row.is-open .team-orb-ring { opacity: 1; transform: scale(1); }

.team-id { display: grid; gap: 5px; min-width: 0; }
.team-name { font-family: var(--font-head); font-weight: 800; font-size: clamp(19px, 2.1vw, 26px); letter-spacing: -.8px; }
.team-role { color: var(--red); font-size: 11.5px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }

.team-toggle {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    margin-inline-start: auto;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    transition: transform .45s var(--ease-out), background var(--ease), border-color var(--ease), color var(--ease);
}
.team-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.team-head:hover .team-toggle { border-color: var(--red); color: var(--red); }
.team-row.is-open .team-toggle { transform: rotate(135deg); background: var(--red); border-color: var(--red); }

/* The panel opens with the row: 0fr -> 1fr animates the real height. */
.team-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .58s var(--ease-out); }
.team-panel-inner {
    overflow: hidden;
    display: grid;
    grid-template-columns: 176px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity .5s var(--ease-out) .1s, transform .55s var(--ease-out) .1s;
}
.team-row.is-open .team-panel { grid-template-rows: 1fr; }
.team-row.is-open .team-panel-inner { opacity: 1; transform: none; }

/* The team's circles: they bloom outward as the panel opens. */
.team-circles { position: relative; display: grid; place-items: center; width: 176px; height: 176px; }
.team-circles > span { position: absolute; border-radius: 50%; }
.tc-1 { width: 84px; height: 84px; background: radial-gradient(circle at 32% 26%, rgba(237, 23, 76, .55), rgba(237, 23, 76, .08) 72%); }
.tc-2 { width: 126px; height: 126px; border: 1px solid rgba(237, 23, 76, .38); }
.tc-3 { width: 174px; height: 174px; border: 1px dashed rgba(255, 255, 255, .16); }
.tc-core {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    color: #fff;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -.5px;
}
.team-row .team-circles > span { opacity: 0; transform: scale(.62); transition: transform .75s var(--ease-out), opacity .6s var(--ease); }
.team-row.is-open .team-circles > span { opacity: 1; transform: none; }
.team-row.is-open .tc-1 { transition-delay: .04s; }
.team-row.is-open .tc-core { transition-delay: .08s; }
.team-row.is-open .tc-2 { transition-delay: .16s; }
.team-row.is-open .tc-3 { transition-delay: .24s; animation: spinSlow 30s linear infinite; }

.team-bio { max-width: 54ch; color: var(--muted-strong); font-size: 15px; line-height: 1.75; }

@media (max-width: 720px) {
    .team-head { gap: 15px; padding: 20px 0; }
    .team-orb,
    .team-avatar { width: 62px; height: 62px; }
    .team-avatar { font-size: 19px; }
    .team-toggle { width: 36px; height: 36px; }
    .team-panel-inner { grid-template-columns: 1fr; gap: 22px; justify-items: center; text-align: center; }
    .team-circles { width: 150px; height: 150px; }
    .tc-1,
    .tc-core { width: 72px; height: 72px; }
    .tc-core { font-size: 19px; }
    .tc-2 { width: 108px; height: 108px; }
    .tc-3 { width: 148px; height: 148px; }
}

/* --------------------------------------------------------------------------
   6. Feature panel & prose
   -------------------------------------------------------------------------- */
.feature-panel {
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: linear-gradient(150deg, var(--surface-2), var(--surface));
}
.feature-list { display: grid; gap: 16px; margin-top: 22px; }
.feature-list > div { display: flex; align-items: flex-start; gap: 12px; color: var(--muted-strong); font-size: 14px; }
.check {
    flex-shrink: 0;
    width: 26px; height: 26px;
    display: grid;
    place-items: center;
    border-radius: var(--r-xs);
    background: linear-gradient(140deg, var(--red), var(--red-dark));
    color: #fff;
    font-weight: 700;
    font-size: 13px;
}
.prose { max-width: 790px; color: var(--muted-strong); }
.prose h2,
.prose h3 { color: var(--ink); }
.prose-title { margin: 12px 0 16px; font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -1.2px; }
.prose-spaced { margin-top: 14px; }
.feature-title { margin: 12px 0 0; font-size: clamp(22px, 2.8vw, 29px); letter-spacing: -1px; }

/* --------------------------------------------------------------------------
   7. Forms
   -------------------------------------------------------------------------- */
.contact-panel {
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: linear-gradient(160deg, #171717, #000);
    color: #fff;
}
.contact-panel .eyebrow { color: var(--red-soft); }
.contact-panel h2 {
    margin: 12px 0 14px;
    font-size: clamp(23px, 2.7vw, 30px);
    line-height: 1.2;
    letter-spacing: -1.1px;
}
.contact-panel p { color: #c6c1ca; font-size: 14px; }
.contact-item { padding: 16px 0; border-block-end: 1px solid rgba(255, 255, 255, .12); }
.contact-item:last-child { border-block-end: 0; }
.contact-item small { display: block; color: #b7b0bb; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
.contact-item strong { font-size: 14px; color: #fff; }

.form-card {
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--surface);
}
.form-card > h2 { margin: 10px 0 24px; font-size: 25px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.modal-wide .form-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.field { display: grid; gap: 8px; align-content: start; }
.field.full { grid-column: 1 / -1; }
.field label { color: var(--ink); font-size: 12px; font-weight: 600; }
.field input,
.field textarea,
.field select {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-sm);
    background: var(--surface-2);
    color: var(--ink);
    outline: none;
    transition: border var(--ease), box-shadow var(--ease), background var(--ease);
}
.field textarea { min-height: 128px; resize: vertical; }
.field input:focus,
.field textarea:focus,
.field select:focus { border-color: var(--red); background: #1c1c1c; box-shadow: 0 0 0 4px rgba(237, 23, 76, .14); }
.field input::placeholder,
.field textarea::placeholder { color: #8f8f98; }
.field .hint { color: var(--faint); font-size: 11px; line-height: 1.6; }

.form-message { margin-top: 14px; font-size: 13px; display: none; }
.form-message.show { display: block; }
.form-message.error { color: var(--danger); }
.form-message.ok { color: var(--ok); }

/* Upload slot -------------------------------------------------------------
   The real file input is visually hidden; its label is the drop zone. */
.file-field { display: grid; gap: 8px; }
.file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
.file-drop {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 22px 16px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--r-md);
    background:
        radial-gradient(130% 120% at 50% 0%, rgba(237, 23, 76, .07), transparent 68%),
        rgba(255, 255, 255, .015);
    text-align: center;
    cursor: pointer;
    transition: border-color var(--ease), background var(--ease), transform var(--ease);
}
.file-drop:hover { border-color: var(--red); transform: translateY(-1px); }
.file-drop.is-over {
    border-style: solid;
    border-color: var(--red);
    background: rgba(237, 23, 76, .12);
    transform: scale(1.01);
}
.file-drop svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: var(--red);
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform var(--ease);
}
.file-drop:hover svg { transform: translateY(-2px); }
.file-drop.is-over svg { transform: scale(1.14); }
.file-drop-text { font-family: var(--font-head); font-size: 13px; font-weight: 600; }
.file-drop-hint { color: var(--faint); font-size: 11px; }
.file-field:has(.file-input:focus-visible) .file-drop {
    outline: 2px solid var(--red);
    outline-offset: 2px;
}

/* The file already chosen: a preview of the picture, or a short badge for a
   document or a recording. */
.file-now {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 7px 8px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-sm);
    background: var(--surface);
    font-size: 12px;
    animation: rise .3s var(--ease-out) both;
}
.file-now-thumb {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #0d0d0d;
    overflow: hidden;
}
.file-now-thumb:empty { display: none; }
.file-now-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-now-badge {
    color: var(--red);
    font-family: var(--font-head);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
}
.file-now-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.file-clear {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
    color: var(--muted);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    transition: background var(--ease), color var(--ease);
}
.file-clear:hover { background: var(--red); color: #fff; }

.file-bar {
    height: 3px;
    border-radius: 999px;
    background: var(--surface-2);
    overflow: hidden;
}
.file-bar span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--red);
    transition: width .25s var(--ease);
}

/* --------------------------------------------------------------------------
   8. Notice & CTA band
   -------------------------------------------------------------------------- */
.notice {
    padding: 16px 19px;
    border: 1px solid var(--red);
    border-radius: var(--r-md);
    background: #18070c;
    color: #fff;
    font-size: 13px;
}

/* --------------------------------------------------------------------------
   9. Data table
   -------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.data-table th,
.data-table td {
    padding: 14px 12px;
    text-align: start;
    border-block-end: 1px solid var(--line);
    font-size: 14px;
    vertical-align: middle;
}
.data-table th { color: var(--faint); font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.data-table td { color: var(--muted-strong); }
.data-table tbody tr { transition: background var(--ease); }
.data-table tbody tr:hover { background: rgba(255, 255, 255, .025); }
.data-table .row-actions { display: flex; gap: 8px; justify-content: flex-end; }
.data-table .cell-main { color: var(--ink); font-weight: 600; }

/* --------------------------------------------------------------------------
   10. Toolbar
   -------------------------------------------------------------------------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar h2 { font-size: 19px; }
.search {
    min-width: 220px;
    padding: 10px 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-sm);
    background: var(--surface-2);
    color: var(--ink);
    font-size: 13px;
    transition: border var(--ease), box-shadow var(--ease);
}
.search::placeholder { color: var(--faint); }
.search:focus { border-color: var(--red); outline: none; box-shadow: 0 0 0 4px rgba(237, 23, 76, .14); }

/* --------------------------------------------------------------------------
   11. Modal
   -------------------------------------------------------------------------- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(4, 4, 6, .72);
    backdrop-filter: blur(14px) saturate(125%);
    -webkit-backdrop-filter: blur(14px) saturate(125%);
    animation: fadeIn .22s var(--ease) both;
}
.modal {
    width: min(560px, 100%);
    max-height: 92vh;
    overflow-y: auto;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
    animation: modalIn .3s var(--ease-out) both;
}
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.modal-head h2 { font-size: 20px; }
.modal-head p { margin-top: 4px; color: var(--muted); font-size: 13px; }
.modal-close { color: var(--faint); font-size: 22px; line-height: 1; transition: color var(--ease), transform var(--ease); }
.modal-close:hover { color: var(--ink); transform: rotate(90deg); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* A long editor (the admin's "New" form): a wide card in the middle of the
   screen, with the heading and the actions pinned so the fields scroll
   between them. ----------------------------------------------------------- */
.modal-wide {
    display: flex;
    flex-direction: column;
    width: min(980px, 100%);
    max-height: min(90vh, 940px);
    padding: 0;
    overflow: hidden;
}
.modal-wide .modal-head {
    margin: 0;
    padding: 22px 28px 18px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(237, 23, 76, .075), transparent 92%);
}
.modal-wide .modal-head h2 { font-size: 24px; letter-spacing: -.4px; }
.modal-wide .modal-body {
    min-height: 0;
    padding: 22px 28px 8px;
    overflow-y: auto;
}
.modal-wide .modal-foot {
    margin: 0;
    padding: 16px 28px;
    border-top: 1px solid var(--line);
    background: var(--surface);
}
.modal-wide .modal-foot .btn { min-width: 128px; }

.form-section { animation: rise .34s var(--ease-out) both; }
.form-section + .form-section { margin-top: 26px; }
.form-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    color: var(--red);
    font-family: var(--font-head);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.form-section-title span { flex-shrink: 0; }
.form-section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(237, 23, 76, .4), transparent);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes sheetIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }

/* On a phone the card becomes a bottom sheet: the whole width, the whole
   usable height, and the actions always within reach of a thumb. */
@media (max-width: 720px) {
    .modal-backdrop { place-items: end stretch; padding: 0; }
    .modal,
    .modal-wide {
        width: 100%;
        max-width: 100%;
        max-height: 94vh;
        border-inline: 0;
        border-block-end: 0;
        border-radius: var(--r-lg) var(--r-lg) 0 0;
        animation: sheetIn .3s var(--ease-out) both;
    }
    .modal-wide .modal-head { padding: 18px 18px 15px; }
    .modal-wide .modal-head h2 { font-size: 21px; }
    .modal-wide .modal-body { padding: 18px 18px 6px; }
    .modal-wide .modal-foot {
        padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
        gap: 8px;
    }
    .modal-wide .modal-foot .btn { flex: 1; min-width: 0; }
    .form-section + .form-section { margin-top: 22px; }
}
@media (prefers-reduced-motion: reduce) {
    .modal, .modal-wide, .form-section, .file-now { animation: none; }
}

/* Membership application card (Admin -> Members -> Read) ------------------ */
.modal.is-wide { max-width: 620px; }
.applicant { display: grid; gap: 16px; }
.applicant-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.applicant-avatar {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(140deg, var(--red), var(--red-dark));
    color: #fff;
    font-family: var(--font-head);
    font-size: 15px;
    font-weight: 800;
}
.applicant-answer {
    padding: 16px 18px;
    border-inline-start: 3px solid var(--red);
    border-radius: var(--r-sm);
    background: rgba(255, 255, 255, .03);
}
.applicant-answer p {
    margin-top: 9px;
    color: var(--ink);
    font-family: var(--font-serif);
    font-size: 16px;
    line-height: 1.6;
}
.applicant-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}
.applicant-row span { color: var(--faint); }
.applicant-row strong { font-weight: 600; text-align: end; }

/* --------------------------------------------------------------------------
   12. Journal feed (news)
   --------------------------------------------------------------------------
   A log-style list: numbered entries, hairline rules and serif headlines, the
   way a printed club journal runs its stories.
   -------------------------------------------------------------------------- */
.journal { border-top: 3px double var(--line-strong); padding-top: 18px; }

.journal-bar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}
.journal-title h2 {
    font-family: var(--font-journal);
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -.5px;
}
.journal-count {
    display: block;
    margin-top: 3px;
    color: var(--faint);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.journal-search { position: relative; flex: 0 1 250px; }
.journal-search svg {
    position: absolute;
    inset-inline-start: 12px;
    inset-block-start: 50%;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    fill: none;
    stroke: var(--faint);
    stroke-width: 1.8;
    stroke-linecap: round;
    pointer-events: none;
}
.journal-search input {
    width: 100%;
    padding: 10px 14px 10px 36px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-sm);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 13px;
}
.journal-search input:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(237, 23, 76, .18);
}

.journal-filter {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 0 6px;
}
.journal-sort {
    display: inline-flex;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    overflow: hidden;
}
.journal-sort button {
    padding: 6px 15px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-family: var(--font-head);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--ease), color var(--ease);
}
.journal-sort button:hover { color: var(--ink); }
.journal-sort button.is-active { background: var(--red); color: #fff; }
.journal-cats { display: flex; flex-wrap: wrap; gap: 7px; }
.jchip {
    padding: 6px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    cursor: pointer;
    transition: border-color var(--ease), color var(--ease), background var(--ease);
}
.jchip:hover { border-color: var(--line-strong); color: var(--ink); }
.jchip.is-active { border-color: var(--red); background: rgba(237, 23, 76, .1); color: var(--ink); }

.journal-feed { margin-top: 6px; }

.jpost {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr) auto;
    gap: 20px;
    padding: 22px 4px;
    border-bottom: 1px solid var(--line);
    transition: background var(--ease);
}
.jpost:hover { background: rgba(255, 255, 255, .018); }
.jpost-rail { display: grid; justify-items: center; align-content: start; gap: 8px; }
.jpost-rank {
    font-family: var(--font-journal);
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    color: var(--red);
}
.jpost-line { width: 1px; min-height: 20px; background: var(--line); }
.jpost-main { min-width: 0; }
.jpost-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--faint);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}
.jpost-meta .is-cat { color: var(--red); }
.jpost-title {
    margin-top: 9px;
    font-family: var(--font-journal);
    font-size: 25px;
    font-weight: 700;
    line-height: 1.22;
    letter-spacing: -.4px;
}
.jpost-body {
    margin-top: 8px;
    color: var(--muted-strong);
    font-family: var(--font-serif);
    font-size: 16px;
    line-height: 1.62;
}
.jpost-thumb {
    width: 132px;
    height: 96px;
    border-radius: var(--r-sm);
    overflow: hidden;
    background: var(--surface-2);
    flex-shrink: 0;
}
.jpost-thumb img { width: 100%; height: 100%; object-fit: cover; }
.jpost-media { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.jattach {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 13px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-sm);
    color: var(--ink);
    font-size: 12px;
    font-weight: 600;
    transition: border-color var(--ease), transform var(--ease);
}
.jattach:hover { border-color: var(--red); transform: translateY(-1px); }
.jattach-icon {
    padding: 2px 6px;
    border-radius: 5px;
    background: var(--red);
    color: #fff;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: .6px;
}
.jattach.is-audio { padding: 6px 11px; }
.jattach audio { height: 32px; width: min(260px, 60vw); }

/* Loading state keeps the same grid as a real entry */
.jpost.is-loading { pointer-events: none; }
.jpost.is-loading .jpost-main { display: grid; gap: 10px; }
.jpost.is-loading .jpost-rail::before {
    content: '';
    width: 26px;
    height: 22px;
    border-radius: 6px;
    background: var(--surface-2);
}

/* --------------------------------------------------------------------------
   13. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
    .hero { padding: 56px 0 62px; }
    .hero-grid { grid-template-columns: 1fr; gap: 34px; }
    .hero-art { min-height: 350px; }
    .art-panel { max-width: 460px; }
    /* One column from here down: the text sits right above the panel, so the
       cards move back onto it instead of floating outside. */
    .tag-one { inset-inline-start: auto; inset-block-start: auto; inset-inline-end: 26px; inset-block-end: 26px; }
    .tag-two { inset-inline-start: auto; inset-block-end: auto; inset-inline-end: 26px; inset-block-start: 26px; }

    .club-stats { grid-template-columns: repeat(2, 1fr); gap: 28px 32px; }
    .club-stat { --num-size: clamp(42px, 7vw, 62px); }
}

@media (max-width: 560px) {
    .hero h1 { font-size: 40px; letter-spacing: -2px; }
    .hero p,
    .page-heading p { font-size: 15px; }

    .hero-art { min-height: 300px; }
    .art-panel { height: 288px; }
    .art-title { inset-inline-start: 22px; inset-block-end: 24px; font-size: 29px; }
    .floating-tag { max-width: 46%; padding: 9px 11px; font-size: 10.5px; }
    .floating-tag small { font-size: 9.5px; }
    .tag-one { inset-inline-end: 16px; inset-block-end: 16px; }
    .tag-two { inset-inline-end: 16px; inset-block-start: 16px; }

    .gallery-tile { min-height: 200px; }

    .form-grid { grid-template-columns: 1fr; }
    .field.full { grid-column: auto; }
    .form-card,
    .contact-panel { padding: 22px; }

    .page-hero { padding: 52px 0 44px; }

    .club-stats { gap: 24px 20px; margin-top: 34px; }
    .club-stat { --num-size: 40px; padding-block-start: 18px; }
    .club-stat-n { letter-spacing: -1.8px; }
    .club-stat-l { margin-top: 12px; font-size: 13px; }
}

/* Journal feed below the two-column width */
@media (max-width: 720px) {
    .journal-title h2 { font-size: 23px; }
    .journal-search { flex-basis: 100%; }
    .jpost { grid-template-columns: 34px minmax(0, 1fr); gap: 14px; padding: 20px 0; }
    .jpost-rank { font-size: 17px; }
    .jpost-title { font-size: 21px; margin-top: 7px; }
    .jpost-body { font-size: 15px; }
    .jpost-thumb { grid-column: 2; width: 100%; height: 168px; margin-top: 4px; }
    .jpost-media { margin-top: 12px; }
    .jattach audio { width: 100%; }
}

/* --------------------------------------------------------------------------
   16. Members-only gate (Events)
   --------------------------------------------------------------------------
   Visitors and members whose account is not approved yet see this panel in
   place of the diary, with a single button that leads somewhere useful.
   -------------------------------------------------------------------------- */
.locked {
    display: grid;
    justify-items: center;
    gap: 14px;
    max-width: 560px;
    margin: 0 auto;
    padding: 52px 34px;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background:
        radial-gradient(ellipse at 50% 0%, rgba(237, 23, 76, .16) 0, transparent 62%),
        var(--surface);
    text-align: center;
}
.locked-icon {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    border: 1px solid rgba(237, 23, 76, .34);
    background: rgba(237, 23, 76, .14);
    font-size: 26px;
}
.locked h2 { font-size: 24px; letter-spacing: -.6px; }
.locked p { max-width: 46ch; color: var(--muted); font-size: 14.5px; line-height: 1.7; }
.locked .btn { margin-top: 6px; }

/* --------------------------------------------------------------------------
   17. Event card cover + detail card
   -------------------------------------------------------------------------- */
.card.is-clickable { cursor: pointer; }
.event-cover { display: flex; align-items: end; gap: 10px; }
.event-cover-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .94;
    transition: transform .6s var(--ease-out);
}
.card:hover .event-cover-img { transform: scale(1.06); }
.event-shots {
    position: relative;
    z-index: 1;
    margin-inline-start: auto;
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: var(--r-xs);
    background: rgba(0, 0, 0, .52);
    font-size: 11px;
    font-weight: 700;
}

.ev-modal { width: min(760px, 100%); padding: 0; --ev-accent: var(--red); }
.ev-hero {
    position: relative;
    min-height: 210px;
    display: flex;
    align-items: flex-end;
    padding: 26px;
    background-color: #17121a;
    background-size: cover;
    background-position: center;
}
.ev-hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(6, 4, 8, .26), rgba(6, 4, 8, .9));
}
.ev-hero-text { position: relative; z-index: 1; }
.ev-hero-text h2 {
    margin: 10px 0 0;
    color: #fff;
    font-size: clamp(22px, 3.4vw, 32px);
    line-height: 1.1;
    letter-spacing: -1px;
}
.ev-hero .event-type { background: rgba(255, 255, 255, .16); }
.ev-close { position: absolute; inset-block-start: 14px; inset-inline-end: 18px; z-index: 2; color: #fff; font-size: 26px; }
.ev-close:hover { color: #fff; }
.ev-body { display: grid; gap: 18px; padding: 26px; }
.ev-meta { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 0; padding: 0; list-style: none; }
.ev-meta li { display: grid; gap: 3px; }
.ev-meta span { color: var(--faint); font-size: 10.5px; letter-spacing: 1.1px; text-transform: uppercase; }
.ev-meta strong { font-family: var(--font-head); font-size: 14px; font-weight: 600; }
.ev-lead { margin: 0; color: var(--ink); font-size: 15.5px; line-height: 1.7; }
.ev-details {
    padding-inline-start: 16px;
    border-inline-start: 2px solid var(--ev-accent);
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.8;
}
.ev-gallery-title { margin: 4px 0 0; color: var(--muted-strong); font-size: 13px; letter-spacing: 1.4px; text-transform: uppercase; }
.ev-gallery-title span { color: var(--faint); }
.ev-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.ev-photo {
    aspect-ratio: 4 / 3;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: #0d0d0d;
    overflow: hidden;
    cursor: zoom-in;
}
.ev-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease-out); }
.ev-photo:hover img { transform: scale(1.07); }
.ev-modal .modal-foot { margin: 0; padding: 0 26px 24px; }

/* Full-screen photo viewer */
.ev-lightbox {
    position: fixed;
    inset: 0;
    z-index: 140;
    display: grid;
    place-items: center;
    padding: 4vh 4vw;
    background: rgba(0, 0, 0, .92);
    animation: fadeIn .18s var(--ease) both;
    cursor: zoom-out;
}
.ev-lightbox img { max-width: 100%; max-height: 92vh; border-radius: var(--r-md); box-shadow: var(--shadow); }
.ev-lb-close { position: absolute; inset-block-start: 18px; inset-inline-end: 24px; color: #fff; font-size: 30px; line-height: 1; }
.ev-lb-nav {
    position: absolute;
    inset-block-start: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 50%;
    background: rgba(0, 0, 0, .42);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    transition: background var(--ease), border-color var(--ease);
}
.ev-lb-nav.is-prev { inset-inline-start: 2vw; }
.ev-lb-nav.is-next { inset-inline-end: 2vw; }
.ev-lb-nav:hover { background: var(--red); border-color: var(--red); }

/* --------------------------------------------------------------------------
   18. Multi-picture upload (event photo album)
   -------------------------------------------------------------------------- */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
    gap: 10px;
}
/* The album is only shown once there is an "add" tile in it, which is always
   there — so the old `:empty` rule is gone. */
.file-thumb,
.file-add {
    position: relative;
    aspect-ratio: 4 / 3;
    margin: 0;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-md);
    background: #0d0d0d;
    overflow: hidden;
    animation: rise .34s var(--ease-out) both;
    animation-delay: calc(var(--i, 0) * 35ms);
}
.file-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease-out); }
.file-thumb:hover img { transform: scale(1.07); }
.file-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04);
    pointer-events: none;
    transition: box-shadow var(--ease);
}
.file-thumb:hover::after { box-shadow: inset 0 0 0 1px rgba(237, 23, 76, .55); }

/* The "add" tile sits first in the album grid, so adding a picture is always
   one tap away from the pictures themselves. */
.file-add {
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 5px;
    border-style: dashed;
    background:
        radial-gradient(120% 120% at 50% 0%, rgba(237, 23, 76, .08), transparent 70%),
        #0d0d0d;
    color: var(--muted);
    cursor: pointer;
    transition: border-color var(--ease), color var(--ease), background var(--ease);
}
.file-add svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    transition: transform var(--ease);
}
.file-add span { font-size: 11px; font-weight: 600; }
.file-add:hover { border-color: var(--red); color: var(--red); }
.file-add:hover svg { transform: rotate(90deg); }

.file-remove {
    position: absolute;
    inset-block-start: 6px;
    inset-inline-end: 6px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .78);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    opacity: 0;
    transform: scale(.85);
    transition: background var(--ease), opacity var(--ease), transform var(--ease);
}
.file-thumb:hover .file-remove,
.file-remove:focus-visible { opacity: 1; transform: none; }
.file-remove:hover { background: var(--red); }
/* A touch screen has no hover, so the remove button stays out in the open. */
@media (hover: none) {
    .file-remove { opacity: 1; transform: none; }
}
.file-count { margin: 0; color: var(--faint); font-size: 11.5px; }
.file-count:empty { display: none; }

@media (max-width: 640px) {
    .locked { padding: 38px 22px; }
    .locked h2 { font-size: 21px; }
    .ev-body { padding: 20px; }
    .ev-hero { min-height: 170px; padding: 20px; }
    .ev-gallery { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
    .ev-lb-nav { width: 40px; height: 40px; font-size: 22px; }
}

/* --------------------------------------------------------------------------
   19. Motion for the new surfaces
   --------------------------------------------------------------------------
   Everything here animates on insertion, so it works for markup that is built
   in JavaScript (the members-only panel, the event card, the photo viewer).
   -------------------------------------------------------------------------- */
.locked { animation: lockedIn .6s var(--ease-out) both; }
@keyframes lockedIn {
    from { opacity: 0; transform: translateY(22px) scale(.98); }
    to   { opacity: 1; transform: none; }
}
.locked-icon { animation: floatY 5.5s var(--ease) infinite; }

/* A dark-to-light scrim keeps the type badge and the photo count readable
   when an event carries a cover picture. */
.event-cover:has(.event-cover-img)::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(6, 4, 8, .14), rgba(6, 4, 8, .66));
}
.event-cover:has(.event-cover-img) .event-type,
.event-cover:has(.event-cover-img) .event-shots { backdrop-filter: blur(7px); }

.card.is-clickable:hover {
    box-shadow: 0 26px 60px rgba(0, 0, 0, .55), 0 0 0 1px rgba(237, 23, 76, .34);
}

.ev-hero { animation: fadeIn .45s var(--ease) both; }
.ev-hero-text { animation: rise .62s var(--ease-out) .06s backwards; }
.ev-meta li,
.ev-photo { animation: rise .5s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 55ms); }
.ev-lead,
.ev-details,
.ev-gallery-title { animation: rise .6s var(--ease-out) .05s backwards; }
.ev-lightbox img { animation: lbIn .28s var(--ease-out) both; }
@keyframes lbIn {
    from { opacity: 0; transform: scale(.94); }
    to   { opacity: 1; transform: none; }
}
