/* ============================================================
   363 Fitness — Events Styles
   /css/events.css
   Loaded on: Events page template + single event posts only
   ============================================================ */

#events-page {
    flex: 1;
    min-width: 0;
}

/* ---- 1. Containers ----------------------------------------- */

/*
 * template-events.php is a page template and gets some of Astra's
 * global structure, but still needs its own spacing.
 * single-event.php is fully custom and needs a proper container.
 */

#single-event .container {
    max-width: 900px;
    margin: 0 auto 1.5rem auto;
    padding: 3rem 1.5rem;
}
 
#events-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 0 30px 0;
    text-align: center;
}


/* ---- 2. Event Type Colour Coding --------------------------- */

/*
 * Slug-based classes are output by PHP on both .event-card and .single-event.
 * All colour-dependent rules reference --event-accent and --event-accent-text.
 * Contrast ratios verified:
 *   competition: #051923 on #00A6FB  ~6.9:1  — passes AA
 *   gym-event:   #EDEEF1 on #051923  ~16:1   — passes AAA
 *   community:   #051923 on #EDEEF1  ~16:1   — passes AAA
 */

.event--community {
    --event-accent:      #00A6FB;
    --event-accent-text: #051923;
}

.event--competition {
    --event-accent:      #051923;
    --event-accent-text: #EDEEF1;
}


/* ---- 3. Events Page Section Title -------------------------- */

.events-section__title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--ast-global-color-0);
    margin-bottom: 2rem;
}


/* ---- 4. Events Grid ---------------------------------------- */

.events-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .events-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* ---- 5. Event Card ----------------------------------------- */

.single-event__header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.single-event__back {
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-decoration: none;
}

.single-event__back:hover {
    color: #00A6FB;
}

.event-card {
    background: #ffffff;
    border-left: 5px solid var(--event-accent, #00A6FB);
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(5, 25, 35, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
	justify-content: space-around;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.event-card:hover {
    box-shadow: 0 8px 24px rgba(5, 25, 35, 0.14);
    transform: translateY(-3px);
}


/* Featured image */

.event-card__image img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 1.25rem auto;
}


/* Card body */

.event-card__body {
    padding: 1.25rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
/*     flex: 1; */
}


/* Event type tag pill */

.event-card__tag {
    display: inline-block;
    align-self: center;
    background-color: var(--event-accent, #00A6FB);
    color: var(--event-accent-text, #051923);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.65rem;
    border-radius: 2px;
    margin-top: 1.25rem;
	margin-bottom: 1.25rem;
}

/*
 * If you move .event-card__tag inside .event-card__body in the PHP template
 * (recommended for cleaner markup), remove the margin above and replace with:
 *
 * .event-card__body .event-card__tag {
 *     margin: 0 0 0.875rem;
 * }
 */


/* Card title */

.event-card__title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 0.75rem;
}

.event-card__title a {
    color: #051923;
    text-decoration: none;
    transition: color 0.2s ease;
}

.event-card__title a:hover {
    color: #00A6FB;
}


/* Meta list — date, time, location */

.event-card__meta {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.875rem;
    color: #555;
}


/* "Find out more" button */

/*.event-card__link {*/
/*    display: inline-block;*/
/*    align-self: flex-start;*/
/*    margin-top: auto;*/
/*    background-color: #00A6FB;*/
/*    color: #051923;*/
/*    font-size: 0.875rem;*/
/*    font-weight: 700;*/
/*    text-decoration: none;*/
/*    padding: 0.6rem 1.25rem;*/
/*    border-radius: 3px;*/
/*    transition: background-color 0.2s ease, color 0.2s ease;*/
/*}*/

/*.event-card__link:hover {*/
/*    background-color: #051923;*/
/*    color: #EDEEF1;*/
/*}*/


/* ---- 6. Empty State ---------------------------------------- */

.events-empty {
    padding: 4rem 1.5rem;
    text-align: center;
    color: #051923;
}

.events-empty p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.events-empty p:last-child {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 0;
}


/* ---- 7. Single Event --------------------------------------- */

/*
 * Single centered column. Order: tag → title → meta → image → content → CTA.
 */

#single-event {
    width: 100%;
}

#single-event .container {
    max-width: 800px;
    margin: 0 auto 1.5rem auto;
    padding: 1.5rem;
    background-color: white;
    margin-top: 50px;
    border-radius: 8px;
}

.single-event {
    display: flex;
    flex-direction: column;
    text-align: center;
}


/* Tag — reuses .event-card__tag, reset card-specific margin */

.single-event .event-card__tag {
    margin: 0 0 1rem;
    align-self: flex-start;
    border-radius: 4px;
}


/* Title */

.single-event__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #051923;
    line-height: 1.2;
    margin: 0 0 1.25rem;
}


/* Meta — date, time, location as a clean horizontal strip */

.single-event__meta {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 1.5rem;
    font-size: 0.9rem;
    color: #555;
}

/*.single-event__meta li {*/
/*    border: 2px solid var(--event-accent, #00A6FB);*/
/*    border-radius: 100px;*/
/*    padding: 4px 18px;*/
/*    font-size: 0.75rem;*/
/*    letter-spacing: 0.3px;*/
/*    font-weight: 600;*/
/*    text-transform: uppercase;*/
/*}*/

/* Featured image */

.single-event__image {
    margin-bottom: 2rem;
}

.event-card__image img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 1.25rem auto;
}


/* Content body */

.single-event__content {
    font-size: 1rem;
    line-height: 1.75;
    color: #051923;
    margin-bottom: 2.5rem;
    padding: 0 1.5rem;
}


/* CTA */

.single-event__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    background-color: #EDEEF1;
    padding: 1.75rem 2rem;
    border-radius: 4px;
}

.single-event__cta p {
    margin: 0;
    font-weight: 600;
    color: #051923;
}

/*.single-event__cta a {*/
/*    display: inline-block;*/
/*    background-color: #00A6FB;*/
/*    color: #051923;*/
/*    font-weight: 700;*/
/*    font-size: 0.9rem;*/
/*    text-decoration: none;*/
/*    padding: 0.7rem 1.5rem;*/
/*    border-radius: 3px;*/
/*    white-space: nowrap;*/
/*    transition: background-color 0.2s ease, color 0.2s ease;*/
/*}*/

/*.single-event__cta a:hover {*/
/*    background-color: #051923;*/
/*    color: #EDEEF1;*/
}

@media (max-width: 480px) {
    .single-event__cta {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* ---- 8. Reduced Motion ------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .event-card,
    .event-card__link,
    .event-card__title a,
    .single-event__cta a {
        transition: none;
    }

    .event-card:hover {
        transform: none;
    }
}