/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2d5016;
    --secondary-color: #6b9b37;
    --accent-color: #ffc107;
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --border-color: #ddd;
    --white: #fff;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

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

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 1.5rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo h1 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.tagline {
    font-size: 0.9rem;
    opacity: 0.9;
}

nav {
    display: flex;
    gap: 2rem;
}

nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

nav a:hover,
nav a.active {
    background-color: rgba(255,255,255,0.2);
}

/* Content Layout */
.content-wrapper {
    margin-top: 2rem;
}

.main-content {
    flex: 1;
    min-width: 0;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: var(--white);
    padding: 3rem 2rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.95;
}

/* Filters Section */
.filters-section {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.filters-section h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.filter-group select {
    padding: 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    min-width: 180px;
    background: var(--white);
    cursor: pointer;
}

.btn-secondary {
    padding: 0.6rem 1.5rem;
    background: var(--text-light);
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.btn-secondary:hover {
    background: var(--text-dark);
}

/* Map */
.map-container {
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 2rem;
}

#map {
    height: 500px;
    width: 100%;
}

/* Directory Section */
.directory-section {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.section-header h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.result-count {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
}

/* County Groups */
.county-group {
    margin-bottom: 2.5rem;
}

.county-header {
    background: var(--secondary-color);
    color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.county-count {
    font-size: 1rem;
    opacity: 0.9;
}

/* Court Cards */
.courts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.court-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s;
    cursor: pointer;
}

.court-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
    border-color: var(--secondary-color);
}

.court-card h4 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.court-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.info-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.info-label {
    font-weight: 600;
    color: var(--text-dark);
    min-width: 80px;
}

.info-value {
    color: var(--text-light);
    flex: 1;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-indoor {
    background: #e3f2fd;
    color: #1565c0;
}

.badge-outdoor {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-both {
    background: #fff3e0;
    color: #ef6c00;
}

.badge-free {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-paid {
    background: #fce4ec;
    color: #c2185b;
}

.badge-company {
    background: #e8eaf6;
    color: #3f51b5;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: var(--text-light);
    float: right;
    font-size: 2rem;
    font-weight: bold;
    padding: 1rem;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: var(--text-dark);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 2rem;
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.modal-body {
    padding: 2rem;
}

.detail-section {
    margin-bottom: 1.5rem;
}

.detail-section h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.detail-grid {
    display: grid;
    gap: 1rem;
}

.detail-item {
    display: flex;
    gap: 1rem;
}

.detail-item strong {
    min-width: 140px;
    color: var(--text-dark);
}

.address-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.address-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.website-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--secondary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 6px;
    margin-top: 1rem;
    transition: background-color 0.3s;
}

.website-link:hover {
    background: var(--primary-color);
}

/* News Section Styles */
.news-section {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.news-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s;
}

.news-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.news-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.news-date {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
}

.news-card h3 {
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.news-card h3 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.news-card h3 a:hover {
    color: var(--secondary-color);
}

.news-excerpt {
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.read-more {
    display: inline-block;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s;
}

.read-more:hover {
    color: var(--primary-color);
}

.coming-soon-section {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
}

.coming-soon-text {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Article Content Styles */
.article-content {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.article-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.back-link {
    display: inline-block;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 1.5rem;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--primary-color);
}

.article-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.article-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.article-date {
    color: var(--text-light);
    font-size: 1rem;
}

.article-category {
    background: #e8eaf6;
    color: #3f51b5;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.article-body .lead {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.article-body a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.article-body a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.article-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

/* Legal Content Styles */
.legal-content {
    background: var(--white);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    max-width: 900px;
    margin: 0 auto;
}

.legal-content h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.last-updated {
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.legal-content h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.legal-content h3 {
    font-size: 1.4rem;
    color: var(--secondary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.legal-content p {
    margin-bottom: 1.25rem;
    line-height: 1.8;
}

.legal-content ul {
    margin-left: 2rem;
    margin-bottom: 1.25rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.legal-content a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
}

.legal-content a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

footer p {
    margin: 0.25rem 0;
}

.footer-links {
    margin-top: 1rem;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.9;
    padding: 0 0.5rem;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Coming Soon Page */
.coming-soon-container {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 3rem 1rem;
}

.coming-soon-container h2 {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.coming-soon-container p {
    font-size: 1.3rem;
    color: var(--text-light);
    max-width: 600px;
}

.coming-soon-emoji {
    font-size: 5rem;
    margin-bottom: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .filters {
        flex-direction: column;
    }

    .filter-group select {
        width: 100%;
    }

    .courts-grid {
        grid-template-columns: 1fr;
    }

    header .container {
        flex-direction: column;
        gap: 1rem;
    }

    nav {
        width: 100%;
        justify-content: center;
    }

    .county-header {
        font-size: 1.2rem;
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .article-header h1 {
        font-size: 1.8rem;
    }

    .article-body {
        font-size: 1rem;
    }

    .article-body .lead {
        font-size: 1.15rem;
    }

    .article-body h2 {
        font-size: 1.5rem;
    }

    .news-card h3 {
        font-size: 1.4rem;
    }

    .legal-content {
        padding: 2rem 1rem;
    }

    .legal-content h1 {
        font-size: 2rem;
    }

    .legal-content h2 {
        font-size: 1.5rem;
    }

    .legal-content h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.5rem;
    }

    nav {
        flex-direction: column;
        gap: 0.5rem;
    }

    nav a {
        text-align: center;
    }

    .article-content {
        padding: 1rem;
    }
}
