/* Scenic Overlooks Close-To-Me - Design System */

:root {
    /* Colors - Vista/Nature palette */
    --color-bg: #f5f7f5;
    --color-bg-alt: #e8ede8;
    --color-surface: #ffffff;
    --color-text: #1a2e1a;
    --color-text-muted: #4a5d4a;
    --color-accent: #2d7a4f;
    --color-accent-hover: #236840;
    --color-link: #2d7a4f;
    --color-border: #c5d5c5;

    /* Accessibility colors */
    --color-paved: #27ae60;
    --color-gravel: #f39c12;
    --color-hike: #e74c3c;
    --color-4wd: #8e44ad;

    /* Quality tier colors */
    --color-featured: #f1c40f;
    --color-quality: #3498db;
    --color-valued: #9b59b6;

    /* Typography */
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-xxl: 5rem;

    /* Layout */
    --max-width: 1200px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
}

h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: var(--space-md);
}

h2 {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
}

a {
    color: var(--color-link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header */
.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-md) var(--space-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header nav {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-text);
}

/* Hero */
.hero-home {
    background: linear-gradient(135deg, #2d7a4f 0%, #51a873 100%);
    color: white;
    padding: var(--space-xxl) var(--space-lg);
    text-align: center;
}

.hero-home h1 {
    color: white;
    font-size: clamp(2rem, 6vw, 3.5rem);
}

.hero-home p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: var(--space-lg);
}

.btn {
    display: inline-block;
    padding: var(--space-sm) var(--space-lg);
    background: white;
    color: var(--color-accent);
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: transform 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

/* Stats bar */
.stats-bar {
    background: var(--color-surface);
    padding: var(--space-lg);
    display: flex;
    justify-content: center;
    gap: var(--space-xxl);
    flex-wrap: wrap;
    box-shadow: var(--shadow-sm);
}

.stats-bar .stat {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-accent);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* Accessibility badges */
.accessibility-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    margin-right: 0.25rem;
}

.mini-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 100px;
    font-size: 0.625rem;
    font-weight: 600;
    margin-right: 0.25rem;
}

.mini-badge.paved {
    background: var(--color-paved);
    color: white;
}

/* Image quality badges */
.image-quality-badge {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.image-quality-badge.featured {
    background: var(--color-featured);
    color: #1a1a1a;
}

.image-quality-badge.quality {
    background: var(--color-quality);
}

.image-quality-badge.valued {
    background: var(--color-valued);
}

/* Featured overlooks */
.featured-overlooks {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-xl) var(--space-lg);
}

.featured-overlooks h2 {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.featured-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 16/10;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s;
}

.featured-card:hover {
    transform: translateY(-4px);
    text-decoration: none;
}

.featured-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-lg);
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
}

.card-overlay h3 {
    margin: 0 0 0.25rem;
    font-size: 1.25rem;
}

.card-overlay p {
    margin: 0 0 0.5rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Overlook cards for state pages */
.overlook-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.overlook-card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
}

.overlook-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

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

.overlook-card .no-image {
    height: 160px;
    background: var(--color-bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
}

.overlook-card .card-content {
    padding: var(--space-md);
}

.overlook-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.overlook-card .card-stats {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}

.overlook-card .card-stats span {
    margin-right: 1rem;
}

/* State pages */
.state-page {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-lg);
}

.state-page h1 {
    text-align: center;
}

.state-count {
    text-align: center;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
}

.state-map-section {
    margin-bottom: var(--space-xl);
}

.state-map-section h2 {
    margin-bottom: var(--space-md);
}

/* States index */
.states-index {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-xl) var(--space-lg);
}

.states-index h1 {
    text-align: center;
}

.states-index>p {
    text-align: center;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
}

.states-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-md);
}

.state-card {
    background: var(--color-surface);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
    text-decoration: none;
    color: inherit;
}

.state-card:hover {
    transform: translateY(-2px);
}

.state-card h3 {
    margin-bottom: 0.25rem;
    font-size: 1.125rem;
}

.state-card .count {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.state-card .accessibility-summary {
    margin-top: 0.5rem;
}

/* Overlook page */
.overlook-page {
    max-width: var(--max-width);
    margin: 0 auto;
}

.overlook-page .hero {
    position: relative;
    height: 400px;
}

.overlook-page .hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-xl);
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
}

.hero-overlay h1 {
    color: white;
    margin-bottom: 0.25rem;
}

.hero-overlay .location {
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.overlook-page .content {
    padding: var(--space-xl) var(--space-lg);
}

/* Tagline */
.tagline {
    font-size: 1.25rem;
    font-style: italic;
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: var(--space-xl);
}

/* Quick stats */
.quick-stats {
    margin-bottom: var(--space-xl);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: var(--space-md);
    background: var(--color-bg-alt);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    text-align: center;
}

.stat-grid .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-accent);
}

.stat-grid .stat-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
}

/* Sections */
.views-section,
.history,
.facilities,
.location-map,
.attribution {
    margin-bottom: var(--space-xl);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.tag {
    background: var(--color-bg-alt);
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.875rem;
}

.tag.facility {
    background: var(--color-accent);
    color: white;
}

.history p {
    line-height: 1.8;
}

.map-link {
    margin-top: var(--space-md);
}

.image-credit {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    font-style: italic;
}

/* Leaflet z-index fixes */
.leaflet-tooltip {
    z-index: 650 !important;
}

.leaflet-popup {
    z-index: 700 !important;
}

/* Footer */
.site-footer {
    background: var(--color-text);
    color: white;
    padding: var(--space-xl);
    text-align: center;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-links {
    margin-bottom: var(--space-md);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    margin: 0 var(--space-sm);
}

.site-footer a {
    color: rgba(255, 255, 255, 0.8);
}

.site-footer a:hover {
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-bar {
        gap: var(--space-lg);
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .overlook-page .hero {
        height: 300px;
    }
}