/* Base */
body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1f2937;
    background: #fcfaff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.site-header {
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--header-bg, #ffffff);
    box-shadow: none;
    transition: box-shadow 0.2s ease;
}

body.scrolled .site-header {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img {
    height: var(--logo-size, 30px);
}

/* Menu */
.main-nav ul {
    display: flex;
    gap: 32px;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 24px;
}

.main-nav a {
    text-decoration: none;
    color: #111827;
    font-weight: 500;
    position: relative;
    padding-bottom: 4px;
}

/* Fake underline */
.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background-color: currentColor;

    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

/* Hover / focus */
.main-nav a:hover::after,
.main-nav a:focus-visible::after {
    opacity: 1;
    transform: scaleX(1);
}

/* Main */
.site-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
    flex: 1;
    width: 100%;
    box-sizing: border-box;
}

.site-footer {
    background-color: var(--header-bg, '#ffffff');
    padding: 15px 20px;
    text-align: center;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1); /* Upward shadow */
    flex-shrink: 0;
}

.site-footer a {
    font-size: 12px;
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-footer a:hover {
    color: #333;
}

/* Mobile */
@media (max-width: 980px) {
    .header-inner {
        flex-direction: row;
    }

    .main-nav ul {
        gap: 20px;
        font-size: 24px;
    }

    .site-main {
        padding: 24px 16px;
    }
}

/* ========== EVENT CARDS ========== */

/* Make whole card clickable */
.event-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Ensure text inside stays clean */
.event-link * {
    text-decoration: none;
    color: inherit;
}

/* Optional hover feedback */
.event-link:hover .event-card {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.08);
    transition: all 0.2s ease;
}

.event-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.event-card {
    display: grid;
    grid-template-columns: 80px 160px 220px 1fr 380px;
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.event-cell {
    padding: 24px;
    border-right: 1px solid #e5e7eb;
}

.event-cell:last-child {
    border-right: none;
}

.event-index {
    font-size: 40px;
    font-weight: 500;
    color: #9ca3af;
}

.event-date,
.event-location {
    font-weight: 500;
}

.event-description {
    line-height: 1.5;
}

.event-image {
    width: 100%;
    overflow: hidden;
}

.event-image img {
    display: block;
    width: 100%;
    height: auto;
}


/* Mobile */
@media (max-width: 980px) {
    .event-card {
        grid-template-columns: 1fr;
    }
    .event-image {
        max-height: 400px;
    }
}

/* Event cards: remove all link styling */
a.event-link,
a.event-link:link,
a.event-link:visited,
a.event-link:hover,
a.event-link:active {
    text-decoration: none;
    color: inherit;
}

/* Ensure nothing inside gets underlined */
a.event-link * {
    text-decoration: none;
    color: inherit;
}

/* Event Detail Page */
.event-detail {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b7280;
    text-decoration: none;
    margin-bottom: 32px;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: #111827;
}

.event-title {
    font-size: 48px;
    font-weight: 600;
    margin: 0 0 32px 0;
    line-height: 1.2;
}

.event-meta {
    display: flex;
    gap: 48px;
    margin-bottom: 24px;
}

.meta-item {
    display: flex;
    gap: 12px;
}

.meta-label {
    color: #6b7280;
    font-weight: 400;
}

.meta-value {
    color: #111827;
    font-weight: 500;
}

.event-intro {
    font-size: 16px;
    line-height: 1.6;
    color: #4b5563;
    margin-bottom: 48px;
    max-width: 800px;
}

/* Image Gallery Grid */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.image-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

/* Grid positioning */
.gallery-large {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    aspect-ratio: 1;
}

.gallery-small {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    aspect-ratio: 1.2;
}

.gallery-tall {
    grid-column: 3 / 4;
    grid-row: 1 / 3;
    aspect-ratio: 0.75;
}

.gallery-wide {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
    aspect-ratio: 1;
}

.gallery-medium {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    aspect-ratio: 1.2;
}

.gallery-small-bottom {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
    /* This one is hidden on desktop or you can adjust the grid */
    display: none;
}

/* Mobile Responsive */
@media (max-width: 980px) {
    .event-title {
        font-size: 32px;
    }
    
    .event-meta {
        flex-direction: column;
        gap: 12px;
    }
    
    .image-gallery {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    
    .gallery-large,
    .gallery-small,
    .gallery-tall,
    .gallery-wide,
    .gallery-medium,
    .gallery-small-bottom {
        grid-column: 1;
        grid-row: auto;
        aspect-ratio: 16/9;
    }
    
    .gallery-small-bottom {
        display: block;
    }
}

