/* Modern Compact Premium Design System */
:root {
    /* Palette */
    --primary-dark: #0f172a;
    --primary-light: #1e293b;
    --accent-gold: #fbbf24;
    --accent-gold-hover: #d97706;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --bg-body: #020617;
    --bg-card: #1e293b;
    --border-color: #334155;

    /* Effects */
    --glass-bg: rgba(15, 23, 42, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(251, 191, 36, 0.15);

    /* Spacing & Layout */
    --header-height: 60px;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 24px;
}

/* Utility Classes */
.mt-md { margin-top: 1.5rem; }
.mt-lg { margin-top: 2rem; }
.text-sm-muted {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Focus Accessibility */
:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    font-size: 14px;
    /* Compact base size */
}

h1,
h2,
h3,
h4 {
    font-family: 'Playfair Display', serif;
    color: var(--text-main);
    line-height: 1.2;
}

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

ul {
    list-style: none;
}

/* --- Header --- */
.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    display: flex;
    align-items: center;
    /* justify-content: space-between; Removed to center search bar */
    padding: 0 5%;
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.logo span {
    color: var(--accent-gold);
}

/* .nav-links removed */

/* --- Hero (Compact) --- */
.hero {
    margin-top: var(--header-height);
    height: 25vh;
    /* Compact height */
    min-height: 200px;
    background: linear-gradient(to bottom, rgba(2, 6, 23, 0.5), rgba(2, 6, 23, 0.8)),
        url('https://images.unsplash.com/photo-1623686769343-c6e43649e957?q=80&w=1920&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    position: relative;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    max-width: 600px;
}

/* --- Sticky Search (Moved to Header) --- */
.search-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto; /* Center the search bar */
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 0.9rem;
}

.search-input {
    width: 100%;
    padding: 10px 16px 10px 40px; /* Added left padding for icon */
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    font-size: 0.9rem;
    transition: all 0.2s;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.2);
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* Share Button */
.share-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1rem;
}

.share-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-gold);
}

/* --- Main Layout --- */
.main-container {
    max-width: 1400px;
    margin: var(--header-height) auto 0;
    padding: 2rem 5%;
    display: grid;
    grid-template-columns: 280px 1fr;
    /* Sidebar + Content */
    gap: 2rem;
}

/* Sidebar (Quick Stats/History) */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.info-card h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--accent-gold);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.info-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

/* Quick Zip List */
.quick-zip-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.quick-zip-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
}

.quick-zip-list li:last-child {
    border-bottom: none;
}

.quick-zip-list .code {
    color: var(--accent-gold);
    font-weight: 700;
    font-family: monospace;
    background: rgba(251, 191, 36, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Weather Widget */
.weather-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.5rem 0;
}

.weather-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.weather-temp {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.weather-icon {
    font-size: 2.5rem;
}

.weather-desc {
    color: var(--accent-gold);
    font-weight: 500;
    text-transform: capitalize;
    margin-bottom: 0.5rem;
}

.weather-details {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.weather-loading {
    color: var(--text-muted);
    font-style: italic;
}

/* Content Grid (Locations) */
.content-area {
    width: 100%;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    /* Compact cards */
    gap: 1rem;
}

/* Compact Location Card */
.loc-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.loc-card:hover {
    border-color: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.loc-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.loc-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-main);
    line-height: 1.3;
}

.loc-type {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
}

.loc-zip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--accent-gold), #f59e0b);
    color: #0f172a;
    padding: 10px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    -webkit-user-select: none;
    user-select: none;
}

.loc-zip:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(251, 191, 36, 0.3), 0 4px 6px -2px rgba(251, 191, 36, 0.1);
}

.loc-zip:active {
    transform: translateY(0);
}

.loc-zip svg {
    width: 18px;
    height: 18px;
    opacity: 0.8;
}

.loc-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.loc-card.active .loc-details {
    max-height: 500px;
    margin-top: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

.detail-row {
    margin-bottom: 0.5rem;
}

.detail-label {
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.8rem;
}

/* Tourism Section */
.tourism-section {
    margin-top: 3rem;
}

.tourism-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.tour-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.tour-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.tour-content {
    padding: 1rem;
}

.tour-content h4 {
    margin-bottom: 0.5rem;
    color: var(--accent-gold);
}

.tour-content ul {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-left: 1rem;
    list-style: disc;
}

.ad-link-wrapper {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Ad Card */
.ad-card {
    position: relative;
    border: 1px solid var(--accent-gold);
    box-shadow: var(--shadow-glow);
}

.ad-label {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--accent-gold);
    color: #000;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 6px;
    border-bottom-left-radius: 4px;
}

.ad-link {
    display: block;
    height: 100%;
}

.ad-link:hover .ad-img {
    opacity: 0.9;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--accent-gold);
    color: #000;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* --- Footer --- */
.site-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 2rem 5%;
    text-align: center;
    margin-top: 4rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-credit {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.footer-credit span {
    color: var(--accent-gold);
    font-weight: 600;
}

/* Mobile Optimization */
@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

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

    .hero {
        height: 35vh;
        padding: 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }
    
    .glass-header {
        padding: 0 1rem;
        gap: 0.5rem;
    }

    .logo {
        font-size: 1rem;
    }
    
    .logo span {
        display: none; /* Hide "ZIP Code" text on small mobile to save space */
    }

    .search-container {
        margin: 0 0.5rem;
        max-width: 100%;
    }

    .nav-links {
        display: none;
    }

    /* Simplified for mobile */
    .locations-grid {
        grid-template-columns: 1fr;
    }
    
    .search-wrapper {
        padding: 0 1rem;
    }
    
    .main-container {
        padding: 1.5rem 1rem;
        gap: 1.5rem;
    }

    /* Mobile Bottom Nav Placeholder (Optional) */
    .mobile-nav-spacer {
        height: 60px;
    }
}