/* 
 * Elevated Singles - Main Stylesheet
 * 
 * Uses a simplified reset and custom variables for theming.
 * No preprocessors required.
 */

:root {
    /* Colors - Upscale Palette */
    --es-midnight: #1D2D50;
    --es-midnight-hover: #16213A;
    --es-header-tan: #CBB994;
    --es-header-tan-hover: #BDAA83;
    --es-cream: #F2EDE2;
    --es-soft-gold: #C8B281;
    --es-text: #2F2F2F;

    /* Base Color Mappings */
    --color-primary: var(--es-midnight);
    --color-primary-dark: var(--es-midnight-hover);
    --color-secondary: var(--es-soft-gold);
    --color-secondary-dark: #b8a070;
    --color-bg-light: var(--es-cream);
    --color-text-main: var(--es-text);
    --color-text-muted: #6b7280;
    --color-border: #e5e7eb;
    
    /* Button Specifics */
    --es-btn-primary-bg: var(--es-midnight);
    --es-btn-primary-text: #FFFFFF;
    --es-btn-primary-hover: var(--es-midnight-hover);
    
    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    
    /* Spacing */
    --container-width: 1200px;
    --spacing-section: 4rem;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-main);
    line-height: 1.6;
    background-color: var(--es-cream);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul { list-style: none; }

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utilities */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-center { text-align: center; }
.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.bg-light { background-color: var(--color-bg-light); }

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-4 { gap: 1rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: 1fr; }
@media (min-width: 768px) {
    .md-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .md-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
}

.hidden { display: none !important; }
@media (min-width: 768px) {
    .md-flex { display: flex !important; }
    .md-hidden { display: none !important; }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--es-btn-primary-bg);
    color: var(--es-btn-primary-text);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border: 1px solid var(--es-soft-gold);
}
.btn-primary:hover {
    background-color: var(--es-btn-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}
.btn-primary:focus {
    outline: 2px solid var(--es-navy);
    outline-offset: 2px;
}

.btn-outline {
    background-color: transparent;
    border-color: white;
    color: white;
}
.btn-outline:hover {
    background-color: white;
    color: var(--color-primary);
}

.btn-secondary {
    background-color: var(--color-primary);
    color: white;
}
.btn-secondary:hover {
    background-color: var(--color-primary-dark);
}

/* Navigation */
.site-header {
    background-color: var(--es-cream);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: auto;
    min-height: 125px;
    padding: 1rem 1.5rem;
}

/* Mobile Header Adjustments */
@media (max-width: 768px) {
    .nav-container {
        min-height: 145px;
        padding: 1rem;
        flex-wrap: wrap; /* Allow wrapping if needed */
    }
}

.logo {
    display: flex;
    align-items: center;
    height: 100%;
    margin-right: auto; /* Push nav to right */
}

.logo img {
    height: auto;
    max-height: 72px; /* Desktop target: 64-72px */
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    display: block;
}

@media (max-width: 768px) {
    .logo img {
        max-height: 100px; /* Mobile target: 90-110px */
        /* Ensure it doesn't overflow screen width */
        max-width: 100%;
    }
}
/* Removed text-based logo styles as we now use an image */
/*.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary);
    letter-spacing: -0.5px;
}
.logo span { color: var(--color-secondary); }*/

/* Nav Links - Desktop only via media query utility classes */
.nav-links {
    gap: 2rem;
    align-items: center;
}

.nav-links a.nav-item {
    font-weight: 600;
    color: var(--es-midnight);
    font-size: 0.95rem;
}
.nav-links a.nav-item:hover { color: var(--es-midnight-hover); text-decoration: underline; }

.mobile-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--color-text-main);
}

.mobile-menu {
    background-color: white;
    border-top: 1px solid var(--color-border);
    padding: 1rem 0;
}
.mobile-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-bottom: 1px solid #f3f4f6;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(30, 58, 138, 0.8), rgba(30, 58, 138, 0.7)), url('../assets/hero.png');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 8rem 0 6rem;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
@media (min-width: 768px) {
    .hero h1 { font-size: 3.5rem; }
}

.hero p {
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

.hero-btns {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}
@media (min-width: 640px) {
    .hero-btns { flex-direction: row; }
}

/* Sections */
section { padding: var(--spacing-section) 0; }

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}
.section-title h2 {
    color: var(--color-primary);
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
}
.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--color-secondary);
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    border: 1px solid var(--color-border);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 10px 15px rgba(0,0,0,0.1); }

.card-img { height: 320px; overflow: hidden; }
.card-img img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    object-position: center 20%; /* Focus on upper body/faces */
    display: block;
}

@media (max-width: 768px) {
    .card-img { height: 260px; }
    .card-img img { object-position: center 18%; }
}

@media (max-width: 420px) {
    .card-img { height: 240px; }
    .card-img img { object-position: center 15%; }
}

/* Specific Override for Second Chance Image */
.second-chance-img {
    object-position: center 5% !important;
}

@media (max-width: 768px) {
    .second-chance-img {
        object-position: center 0% !important;
    }
}

.card-body { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.card-title { font-size: 1.25rem; color: var(--color-text-main); margin-bottom: 0.5rem; }
.card-text { color: var(--color-text-muted); font-size: 0.95rem; margin-bottom: 1.5rem; flex-grow: 1; }

/* Timeline Styling */
.timeline-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding-left: 20px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--color-border);
}

.timeline-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    position: relative;
    padding-left: 2rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: 0; /* Align with padding-left of container */
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background-color: var(--color-secondary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    border: 4px solid white; /* Creates spacing from line */
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.timeline-content {
    flex: 1;
}

.timeline-title {
    font-size: 1.5rem;
    color: var(--color-text-main);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.timeline-text {
    color: var(--color-text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

/* FAQ */
.faq-grid {
    display: grid;
    gap: 2rem;
}
@media (min-width: 768px) {
    .faq-grid { grid-template-columns: 1fr 1fr; }
}
.faq-item h3 { font-size: 1.1rem; color: var(--color-primary); margin-bottom: 0.5rem; }
.faq-item p { color: var(--color-text-muted); font-size: 0.95rem; }

/* Footer */
.site-footer {
    background-color: #111827;
    color: #9ca3af;
    padding: 4rem 0 2rem;
}
.footer-grid {
    display: grid;
    gap: 3rem;
    margin-bottom: 3rem;
}
@media (min-width: 768px) {
    .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.footer-col h4 { color: white; margin-bottom: 1.25rem; }
.footer-links li { margin-bottom: 0.75rem; }
.footer-links a:hover { color: white; }
.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
}

/* Forms */
.form-group { margin-bottom: 1.5rem; }
.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-text-main);
}
.form-input, .form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
}
.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}
.form-check input { margin-top: 0.25rem; }

/* Sticky Mobile CTA */
.mobile-sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    padding: 1rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    display: flex;
    gap: 1rem;
    z-index: 999;
}
@media (min-width: 768px) {
    .mobile-sticky-cta { display: none; }
}

/* Event Filter */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 3rem;
}
.filter-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    border: 1px solid var(--color-border);
    background: white;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}
.filter-btn:hover { background-color: #f3f4f6; }
.filter-btn.active {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.bg-white { background-color: white; }
.rounded-lg { border-radius: 0.5rem; }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); }
.overflow-hidden { overflow: hidden; }
.relative { position: relative; }
.h-4 { height: 1rem; }
.w-4 { width: 1rem; }
.h-48 { height: 12rem; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.object-cover { object-fit: cover; }
.absolute { position: absolute; }
.top-4 { top: 1rem; }
.right-4 { right: 1rem; }
.bg-primary { background-color: var(--color-primary); }
.bg-secondary { background-color: var(--color-secondary); }
.text-white { color: white; }
.text-xs { font-size: 0.75rem; }
.font-bold { font-weight: 700; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.rounded-full { border-radius: 9999px; }
.p-6 { padding: 1.5rem; }
.flex-grow { flex-grow: 1; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.text-xl { font-size: 1.25rem; }
.text-sm { font-size: 0.875rem; }
.mr-1 { margin-right: 0.25rem; }
.mt-auto { margin-top: auto; }
.border-gray-300 { border-color: #d1d5db; }
.hover\:bg-gray-50:hover { background-color: #f9fafb; }
.hover\:bg-red-600:hover { background-color: #dc2626; }
.transition-colors { transition-property: background-color, border-color, color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.bg-green-50 { background-color: #f0fdf4; }
.border-green-200 { border-color: #bbf7d0; }
.p-8 { padding: 2rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.text-green-500 { color: #22c55e; }
.text-2xl { font-size: 1.5rem; }
.inline-block { display: inline-block; }
.hover\:bg-blue-900:hover { background-color: #1e3a8a; }
.transform { transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); }
.hover\:-translate-y-1:hover { --tw-translate-y: -0.25rem; transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); }

/* New Utilities for Event Cards */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.backdrop-blur-sm { backdrop-filter: blur(4px); }
.bg-white\/90 { background-color: rgba(255, 255, 255, 0.9); }
.border-gray-200 { border-color: #e5e7eb; }
.border-gray-100 { border-color: #f3f4f6; }
.text-gray-400 { color: #9ca3af; }
.hover\:underline:hover { text-decoration: underline; }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.025em; }
.font-semibold { font-weight: 600; }
.pt-4 { padding-top: 1rem; }
.ml-1 { margin-left: 0.25rem; }
.group:hover .group-hover\:translate-x-1 { --tw-translate-x: 0.25rem; transform: translate(var(--tw-translate-x), var(--tw-translate-y)); }

/* Upcoming Events image - show more of the photo */
.event-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    object-position: center 15%;
    display: block;
    /* JS sets rounded-lg on card and overflow-hidden, but we can enforce here too */
}

/* Override JS-injected tailwind height classes on the container so image height wins */
.event-card > div:first-child {
    height: auto !important;
}

@media (max-width: 768px) {
    .event-card img {
        height: 240px;
        object-position: center 12%;
    }
}

@media (max-width: 420px) {
    .event-card img {
        height: 220px;
        object-position: center 10%;
    }
}
.events-spacing {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem; /* Mobile: 24px */
}

@media (min-width: 768px) {
    .events-spacing {
        gap: 2.5rem; /* Desktop: 40px */
    }
}

@media (min-width: 768px) {
    .md\:flex-row { flex-direction: row; }
    .md\:w-1\/3 { width: 33.333333%; }
    .md\:w-2\/3 { width: 66.666667%; }
    .md\:h-auto { height: auto; }
}
