@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&family=Lato:wght@300;400;700&display=swap');

:root {
    /* Branding Colors extracted from image */
    /* Dark Green for headers and primary actions */
    --brand-green: #1a4d3e;
    /* Beige/Gold accent from logo mark for subtle highlights (optional) */
    --brand-gold: #b0a78f;

    --text-primary: #111;
    --text-secondary: #555;
    --bg-date: #f9f9f9;

    /* Fonts */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Lato', sans-serif;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Changed to better space items */
    margin-bottom: 60px;
    padding-bottom: 20px;
    position: relative;
    border-bottom: 2px solid #f0f0f0;
    /* Lighter, cleaner border */
}

header.detail-mode {
    margin-bottom: 20px;
    padding-bottom: 0;
}

/* Page Title */
.page-title {
    display: none;
    font-family: var(--font-heading);
    font-size: 3rem;
    /* Slightly smaller but bolder */
    font-weight: 700;
    font-style: normal;
    /* Removed italic */
    color: var(--brand-green);
    /* Updated color */
    margin: 0;
    line-height: 1;
    text-transform: uppercase;
    /* Match image style */
    letter-spacing: -0.02em;
}

/* Filter Section */
#list-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: var(--text-secondary);
    font-family: var(--font-heading);
}

#category-filter {
    padding: 10px 16px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    border: 1px solid #ddd;
    border-radius: 0;
    /* Boxy */
    cursor: pointer;
    background-color: #fff;
    color: var(--brand-green);
    font-weight: 600;
}

/* List Layout */
#events-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.event-row {
    display: flex;
    align-items: flex-start;
    /* Align top for better multi-line handling */
    padding: 30px 0;
    border-bottom: 1px solid #e5e5e5;
    transition: background-color 0.2s ease;
}

.event-row:hover {
    background-color: #fcfcfc;
    /* Subtle hover effect */
}

.event-row:last-child {
    border-bottom: none;
}

/* Date Box */
.event-date-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* Align top */
    width: 70px;
    margin-right: 30px;
    flex-shrink: 0;
    line-height: 1;
    padding-top: 5px;
    /* Visual alignment */
}

.date-month {
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-secondary);
    /* Neutral gray */
    margin-bottom: 8px;
    font-family: var(--font-heading);
    letter-spacing: 0.1em;
}

.date-day {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--brand-green);
    /* Updated to Brand Green */
}

/* Event Content */
.event-content {
    flex-grow: 1;
    padding-right: 20px;
}

.event-tags {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--brand-gold);
    /* Use gold accent for tags */
    margin-bottom: 8px;
    font-family: var(--font-heading);
}

.event-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    /* Keep title black/dark for contrast */
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.event-meta {
    font-family: var(--font-body);
    font-style: normal;
    color: var(--text-secondary);
    font-size: 1rem;
    display: flex;
    gap: 10px;
    align-items: center;
}

.event-meta-location {
    color: var(--text-secondary);
    border-left: 1px solid #ddd;
    padding-left: 10px;
}

/* Action Button */
.event-action {
    margin-left: auto;
    flex-shrink: 0;
    align-self: center;
}

.btn-details {
    display: inline-block;
    padding: 12px 28px;
    border: 2px solid var(--brand-green);
    /* Green border */
    background: transparent;
    color: var(--brand-green);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-details:hover {
    background: var(--brand-green);
    color: #fff;
}

.loading {
    padding: 60px;
    text-align: center;
    font-style: italic;
    color: var(--text-secondary);
    font-family: var(--font-body);
}

/* Detail View Styles */
.detail-view {
    display: none;
}

.back-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--brand-green);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 30px;
    cursor: pointer;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.back-link:hover {
    text-decoration: underline;
}

.back-arrow {
    margin-right: 8px;
}

/* Detail Grid */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    margin-top: 20px;
}

.detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-main {
    display: flex;
    flex-direction: column;
}

.detail-title {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--brand-green);
    margin: 0 0 20px 0;
    line-height: 1.1;
    text-transform: uppercase;
}

.detail-date-time {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 8px;
    border-left: 4px solid var(--brand-green);
    padding-left: 15px;
}

.detail-location {
    font-family: var(--font-body);
    font-style: normal;
    color: var(--text-secondary);
    font-size: 1rem;
    padding-left: 19px;
    /* Align with text above (border + padding) */
}

.detail-image {
    width: 100%;
    height: auto;
    border-radius: 0;
    /* Keep sharp edges for this modern look */
    margin-bottom: 40px;
    object-fit: cover;
}

.btn-register {
    display: inline-block;
    background-color: var(--brand-green);
    color: white;
    padding: 18px 40px;
    text-decoration: none;
    text-transform: uppercase;
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-align: center;
    align-self: flex-start;
    margin-top: 30px;
    transition: background 0.2s;
    border: none;
}

.btn-register:hover {
    background-color: #12362b;
    /* Darker shade */
}

.detail-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
    font-family: var(--font-body);
}

.detail-description p {
    margin-bottom: 1.5em;
}

/* Responsive */
@media (max-width: 600px) {
    .event-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .event-date-box {
        margin-bottom: 16px;
        flex-direction: row;
        justify-content: flex-start;
        align-items: baseline;
        height: auto;
        background: none;
        width: 100%;
        gap: 8px;
    }

    .event-date-box .date-month {
        margin-bottom: 0;
    }

    .date-day {
        font-size: 1.5rem;
    }

    .event-action {
        margin-left: 0;
        margin-top: 20px;
        width: 100%;
    }

    .btn-details {
        display: block;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }

    /* Header Responsive */
    #list-header {
        position: relative;
        /* Not needed to override since we removed absolute positioning in desktop */
        width: auto;
    }

    header {
        flex-direction: column-reverse;
        /* Put filter on top/bottom? Or just Column */
        align-items: flex-start;
        gap: 20px;
    }

    .page-title {
        font-size: 2.5rem;
    }

    /* Mobile Improvements */
    .event-title {
        font-size: 1.4rem;
    }

    .event-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .event-meta-location {
        border-left: none;
        padding-left: 0;
    }

    .btn-details {
        display: block;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
        font-size: 0.75rem;
        padding: 12px 0;
    }
}

@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .btn-register {
        width: 100%;
        box-sizing: border-box;
    }
}