/* Base & Variables */
:root {
    --bg-sand: #fdfbf7;
    --text-main: #202c39;
    --text-muted: #5c6b73;
    --primary-blue: #0077b6;
    --secondary-blue: #00b4d8;
    --accent-teal: #90e0ef;
    --premium-gold: #ffbe0b;
    --border-color: #e0e6ed;
    --bg-white: #ffffff;

    --status-green: #2ecc71;
    --status-yellow: #f1c40f;
    --status-purple: #9b59b6; /* Changed from blue so it doesn't conflict with Ocean Cyan */
    --status-ocean: #00b4d8; 
    --status-red: #e74c3c;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-sand);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

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

/* Utilities */
.hidden { display: none !important; }

.btn {
    display: inline-block;
    padding: 14px 28px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.premium-section h3 { margin-bottom: 20px; font-size: 1.5rem; text-align: center; color: var(--text-main); }
.premium-section p { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 25px; max-width: 700px; margin-left: auto; margin-right: auto; text-align: center; }

/* Enhanced $9 Premium Button */
.btn-premium {
    background-color: var(--premium-gold);
    color: #000;
    box-shadow: 0 4px 15px rgba(255, 190, 11, 0.4);
    font-size: 1.3rem;
    padding: 18px 40px;
    text-shadow: 0px 1px 2px rgba(255,255,255,0.8);
    display: block;
    margin: 0 auto;
    max-width: max-content;
}

.btn-premium:hover {
    background-color: #ffca28;
    box-shadow: 0 6px 20px rgba(255, 190, 11, 0.6);
    transform: scale(1.02);
}

.btn-primary {
    background-color: var(--primary-blue);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 119, 182, 0.3);
}

.btn-primary:hover {
    background-color: var(--secondary-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 180, 216, 0.4);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #03045e 0%, var(--primary-blue) 100%);
    color: #fff;
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Subtle wave effect at the bottom of hero */
.hero::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 100%;
    height: 40px;
    background: var(--bg-sand);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.headline {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.subheadline {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--accent-teal);
    margin-bottom: 40px;
    font-weight: 300;
}

.search-container {
    max-width: 700px;
    margin: 0 auto 30px;
    position: relative;
}

#globalSearch {
    width: 100%;
    padding: 20px 25px;
    font-size: 1.1rem;
    font-family: 'Inter', sans-serif;
    border: none;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    outline: none;
    transition: box-shadow 0.3s;
}

#globalSearch:focus {
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}

/* AdSense Placeholders */
.adsense-placeholder {
    max-width: 728px;
    height: 90px;
    background-color: #e9ecef;
    border: 2px dashed #ced4da;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px auto;
    color: #6c757d;
    font-weight: 600;
    text-align: center;
}

@media (max-width: 768px) {
    .adsense-placeholder {
        width: 100%;
        height: auto;
        min-height: 50px;
        padding: 20px;
    }
}

/* Map Section */
.map-section {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto 40px;
    padding: 0 20px;
    position: relative;
}

#map {
    height: 500px;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 2px solid var(--border-color);
    z-index: 1;
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0; left: 20px; right: 20px; bottom: 0;
    background: rgba(253, 251, 247, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--primary-blue);
    transition: opacity 0.5s;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

/* Email Signup Section */
.email-signup-section {
    margin-bottom: 40px;
}

.email-signup-box {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.email-signup-box h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: var(--text-main);
    font-family: 'Inter', sans-serif; /* Simpler than heading font */
    font-weight: 600;
}

.signup-form {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.signup-form input[type="email"] {
    padding: 12px 20px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    flex: 1;
    min-width: 200px;
    max-width: 350px;
    outline: none;
    transition: border-color 0.3s;
}

.signup-form input[type="email"]:focus {
    border-color: var(--primary-blue);
}

.btn-subscribe {
    background-color: var(--primary-blue);
    color: white;
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 6px;
}

.btn-subscribe:hover {
    background-color: var(--secondary-blue);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 180, 216, 0.2);
}

/* Footer */

/* Filters & Table Section */
.table-section {
    padding: 20px 0 60px;
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: 600;
}

#countyFilter {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    background-color: #fafbfc;
}

.checkboxes {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    user-select: none;
}

.icon-square {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
}

/* Status colors used for markers and legends */
.icon-square.green { background-color: var(--status-green); }
.icon-square.yellow { background-color: var(--status-yellow); }
.icon-square.purple { background-color: var(--status-purple); }
.gray { background-color: var(--status-gray); }

/* Custom Leaflet Marker HTML styles */
.custom-marker {
    width: 20px;
    height: 20px;
    border: 2px solid white;
    border-radius: 4px; /* Square with slightly rounded corners */
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
    transition: transform 0.2s;
    background-color: var(--status-gray);
}

.custom-marker:hover {
    transform: scale(1.2);
    z-index: 1000 !important;
}

.custom-marker.marker-green { background-color: var(--status-green) !important; }
.custom-marker.marker-yellow { background-color: var(--status-yellow) !important; }
.custom-marker.marker-blue { background-color: var(--status-blue) !important; }
.custom-marker.marker-gray { background-color: var(--status-gray) !important; }

/* Footer */
footer {
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-white);
}

.footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-nav a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
}

.footer-nav a:hover {
    text-decoration: underline;
}

.footer-content p {
    margin-bottom: 5px;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background-color: #fff;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 15px rgba(0,0,0,0.05);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: center; /* Center content across entire bottom */
    gap: 20px;
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-text {
    font-size: 0.95rem;
    color: var(--text-main);
}

.cookie-btn {
    padding: 10px 24px;
    background-color: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    min-width: 120px;
}

/* Standard Page Layout (Privacy, Terms, About) */
.page-container {
    max-width: 800px;
    margin: 60px auto;
    padding: 40px;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid var(--border-color);
}

.page-container h1 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: var(--primary-blue);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.page-container h2 { margin: 25px 0 15px; font-size: 1.5rem; }
.page-container p, .page-container ul { margin-bottom: 15px; }
.page-container ul { padding-left: 20px; }

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
}
.back-link:hover { color: var(--primary-blue); text-decoration: underline; }

/* Social Share Links */
.social-share-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}
.social-share-bar a {
    display: inline-block;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: opacity 0.2s;
}
.social-share-bar a:hover { opacity: 0.8; }
.share-fb { background-color: #1877F2; }
.share-tw { background-color: #1DA1F2; }

/* Responsive */
@media (max-width: 768px) {
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .checkboxes {
        flex-direction: column;
        gap: 10px;
    }

    #map {
        height: 350px;
    }

    .hero {
        padding: 60px 0 40px;
    }
}
