/* ---------------------------------------------------------------------------
   Layout: navbar, skip link
   --------------------------------------------------------------------------- */
.site-navbar {
    transition: background-color 0.5s ease-in-out, box-shadow 0.5s ease-in-out;
}

.site-navbar .nav-link {
    color: #f8f9fa;
}

.site-navbar .nav-link:hover,
.site-navbar .nav-link:focus-visible {
    color: #ff8a8a;
}

.site-navbar .nav-link.active {
    color: #ff7a7a;
    font-weight: 600;
}

.skip-link:focus {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 2000;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: #dc3545;
    color: #fff;
    text-decoration: none;
}

/* ---------------------------------------------------------------------------
   Home page hero
   --------------------------------------------------------------------------- */
.hero__bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background: url('/img/urban-kiz-dancefloor.webp') center / cover no-repeat;
    will-change: transform;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(0, 0, 0, 0.6);
}

.hero-lead {
    max-width: 40rem;
}

.hero-event-wrap {
    max-width: 56rem;
}

.about-img {
    max-height: 700px;
}

/* Hero event callout */
.hero-event__status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 0.08em;
}

.hero-event__pulse {
    display: inline-block;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 999px;
    background: #ff7a7a;
    box-shadow: 0 0 0 0 rgba(255, 122, 122, 0.85);
    animation: hero-pulse 1.6s ease-out infinite;
}

.hero-event--live::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 1.25rem;
    border: 2px solid rgba(255, 122, 122, 0.75);
    box-shadow: 0 0 18px rgba(255, 122, 122, 0.45), 0 0 36px rgba(255, 122, 122, 0.25);
    animation: hero-ring 2.4s ease-in-out infinite;
    pointer-events: none;
}

.hero-event-img {
    width: 100%;
    max-width: 400px;
    height: 250px;
}

@media (min-width: 768px) {
    .hero-event-img {
        width: 320px;
    }
}

@keyframes hero-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 122, 122, 0.85);
    }
    70% {
        transform: scale(1.15);
        box-shadow: 0 0 0 16px rgba(255, 122, 122, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 122, 122, 0);
    }
}

@keyframes hero-ring {
    0% {
        opacity: 0.4;
        transform: scale(0.97);
    }
    50% {
        opacity: 0.95;
        transform: scale(1.02);
    }
    100% {
        opacity: 0.4;
        transform: scale(0.97);
    }
}

/* ---------------------------------------------------------------------------
   Sub-page header
   --------------------------------------------------------------------------- */
.page-header {
    padding: 8rem 0 4rem 0;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('/img/urban-kiz-dancefloor.webp');
    background-size: cover;
    background-position: center;
}

/* ---------------------------------------------------------------------------
   Event cards (home page + events page)
   --------------------------------------------------------------------------- */
.event-image {
    width: 100%;
    height: 300px; /* fixed height keeps the grid tidy and avoids layout shift */
    object-fit: cover;
    object-position: center center;
}

@media (min-width: 1200px) {
    .event-image {
        height: 230px;
    }
}

.event-card {
    transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.event-card:hover,
.event-card:focus-within {
    transform: translateY(-0.3rem);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.35);
}

.event-card--past {
    opacity: 0.75;
}

.event-card--past .event-image {
    filter: grayscale(100%);
    transition: filter 180ms ease;
}

.event-card--past:hover,
.event-card--past:focus-within {
    opacity: 1;
}

.event-card--past:hover .event-image,
.event-card--past:focus-within .event-image {
    filter: none;
}

/* ---------------------------------------------------------------------------
   Event detail page
   --------------------------------------------------------------------------- */
.event-detail-img {
    max-height: 600px;
    object-fit: cover;
}

.event-detail-img--past {
    filter: grayscale(60%);
}

/* ---------------------------------------------------------------------------
   Shared empty state (no events / no classes)
   --------------------------------------------------------------------------- */
.empty-state {
    max-width: 38rem;
    margin: 0 auto;
    padding: 3.5rem 2rem;
    border: 1px dashed rgba(255, 255, 255, 0.25);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.025);
}

.empty-state__icon {
    display: inline-grid;
    width: 3.75rem;
    height: 3.75rem;
    place-items: center;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.16);
    color: #ff7a7a;
    font-size: 1.5rem;
}

/* ---------------------------------------------------------------------------
   Forms (contact, admin)
   --------------------------------------------------------------------------- */
/* Honeypot field: off-screen for people, present for bots. */
.contact-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Empty validation summary rendered while the form is valid. */
.validation-summary-valid {
    display: none;
}

.import-preview {
    height: 200px;
    width: auto;
    object-fit: contain;
    background: #111;
}

/* Contact messages in the admin: keep the sender's line breaks, never overflow the card. */
.message-body {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* Thumbnail of a submitted event in the admin queue. */
.submission-thumb {
    width: 100%;
    height: 140px;
    object-fit: cover;
    background: #111;
}

/* ---------------------------------------------------------------------------
   Event comments
   --------------------------------------------------------------------------- */
/* Name/comment forms sit directly under the heading; a rule separates them from the thread. */
.comment-compose {
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.comment-compose details summary {
    cursor: pointer;
}

.comment-rename {
    max-width: 22rem;
}

.comment {
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.comment:first-child {
    padding-top: 0;
    border-top: 0;
}

.comment:target {
    background: rgba(220, 53, 69, 0.08);
    box-shadow: 0 0 0 0.75rem rgba(220, 53, 69, 0.08);
    border-radius: 0.25rem;
}

/* ---------------------------------------------------------------------------
   Error page
   --------------------------------------------------------------------------- */
.error-code {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    color: rgba(255, 122, 122, 0.35);
}

/* ---------------------------------------------------------------------------
   Dance classes page
   --------------------------------------------------------------------------- */
.classes-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 9.5rem 0 5rem;
    background:
        radial-gradient(circle at 12% 15%, rgba(220, 53, 69, 0.38), transparent 31rem),
        radial-gradient(circle at 85% 25%, rgba(255, 255, 255, 0.1), transparent 22rem),
        #17191d;
}

.classes-hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    right: -7rem;
    bottom: -9rem;
    width: 28rem;
    height: 28rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    box-shadow: 0 0 0 3.5rem rgba(255, 255, 255, 0.035), 0 0 0 7rem rgba(255, 255, 255, 0.02);
}

.classes-hero__eyebrow {
    color: #ff7a7a;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
}

.classes-hero .lead {
    max-width: 37rem;
}

.classes-section {
    min-height: 28rem;
    background: #101114;
}

.classes-section__heading {
    padding-bottom: 1.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.letter-spacing {
    letter-spacing: 0.1em;
}

.classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
    gap: 1.25rem;
}

.class-card {
    position: relative; /* anchors the stretched card link */
    display: flex;
    flex-direction: column;
    padding: 1.75rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1rem;
    background: linear-gradient(145deg, rgba(42, 45, 51, 0.98), rgba(25, 27, 31, 0.98));
    box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.16);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.class-card:hover,
.class-card:focus-within {
    transform: translateY(-0.3rem);
    border-color: rgba(255, 122, 122, 0.72);
    box-shadow: 0 1.25rem 3rem rgba(0, 0, 0, 0.3);
}

.class-card__title {
    color: #fff;
}

.class-card:hover .class-card__title,
.class-card:focus-within .class-card__title {
    color: #ff8a8a;
}

.class-card__details {
    display: grid;
    gap: 1.25rem;
}

.class-card__details div {
    display: grid;
    grid-template-columns: 1.35rem 1fr;
    column-gap: 0.75rem;
}

.class-card__details dt {
    display: contents;
}

.class-card__details dt i {
    color: #ff7a7a;
    font-size: 1.1rem;
}

.class-card__details dd {
    grid-column: 2;
    margin: 0;
    color: #f8f9fa;
    font-size: 1rem;
}

.class-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    width: fit-content;
    margin-top: 1.25rem;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

/* Makes the whole card clickable. */
.class-card__link::after {
    content: "";
    position: absolute;
    inset: 0;
}

.class-card__link:hover,
.class-card__link:focus-visible {
    color: #ff8a8a;
}

.class-card__link i {
    transition: transform 180ms ease;
}

.class-card__link:hover i,
.class-card__link:focus-visible i {
    transform: translate(0.2rem, -0.2rem);
}

@media (max-width: 575.98px) {
    .classes-hero {
        padding-top: 8rem;
    }

    .class-card,
    .empty-state {
        padding: 1.5rem;
    }
}

/* ---------------------------------------------------------------------------
   Reduced motion
   --------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .site-navbar,
    .event-card,
    .event-card--past .event-image,
    .class-card,
    .class-card__link i {
        transition: none;
    }

    .hero-event__pulse,
    .hero-event--live::after {
        animation: none;
    }
}
