/* ==========================================================================
   National Parks of India Explorer — Landing Styles
   Pure Vanilla CSS matching Incredible India Explorer guidelines.
   ========================================================================== */

:root {
    --np-bg: #08140f;
    --np-bg-alt: #0c1f16;
    --np-card: rgba(16, 34, 25, 0.85);
    --np-text: #f1f5f9;
    --np-text-muted: #a8c2b6;
    --np-border: rgba(16, 185, 129, 0.22);
    --np-emerald: #10b981;
    --np-gold: #fbbf24;
    --np-blue: #38bdf8;
    --np-saffron: #f97316;
}

[data-theme="light"] {
    --np-bg: #f3fbf6;
    --np-bg-alt: #e8f6ee;
    --np-card: rgba(255, 255, 255, 0.92);
    --np-text: #14532d;
    --np-text-muted: #4b7d66;
    --np-border: rgba(16, 185, 129, 0.3);
}

.np-root {
    background: linear-gradient(180deg, var(--np-bg), var(--np-bg-alt));
    color: var(--np-text);
    min-height: 100vh;
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
}

/* ---------- Hero ---------- */
.np-hero {
    position: relative;
    padding: 7.5rem 1.5rem 4rem;
    text-align: center;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(16, 185, 129, 0.25), transparent 60%),
        linear-gradient(180deg, rgba(8, 20, 15, 0.55), var(--np-bg) 100%);
}

.np-hero-badge {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid var(--np-border);
    color: var(--np-emerald);
    margin-bottom: 1.1rem;
}

.np-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.4rem, 6vw, 4rem);
    font-weight: 800;
    margin: 0 0 1rem;
}

.np-hero h1 span {
    color: var(--np-gold);
}

.np-hero p.np-intro {
    max-width: 720px;
    margin: 0 auto 2.4rem;
    color: var(--np-text-muted);
    font-size: 1.1rem;
    line-height: 1.7;
}

/* ---------- Stats ---------- */
.np-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1.2rem;
    max-width: 920px;
    margin: 0 auto;
}

.stat-card {
    background: var(--np-card);
    border: 1px solid var(--np-border);
    border-radius: 16px;
    padding: 1.5rem 1rem;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--np-emerald);
}

.stat-icon {
    font-size: 1.9rem;
    margin-bottom: 0.4rem;
}

.stat-value {
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--np-gold);
}

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

/* ---------- Section shell ---------- */
.np-section {
    padding: 4rem 1.5rem;
}

.np-container {
    width: min(1180px, 94%);
    margin: 0 auto;
}

.np-section-header {
    text-align: center;
    margin-bottom: 2.6rem;
}

.np-section-badge {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.3rem 0.9rem;
    border-radius: 50px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--np-emerald);
    margin-bottom: 0.7rem;
}

.np-section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    margin: 0 0 0.6rem;
}

.np-section-header p {
    max-width: 620px;
    margin: 0 auto;
    color: var(--np-text-muted);
    line-height: 1.6;
}

/* ---------- Map ---------- */
.map-shell {
    background: var(--np-card);
    border: 1px solid var(--np-border);
    border-radius: 18px;
    padding: 1.2rem;
}

.map-canvas {
    position: relative;
    width: 100%;
    aspect-ratio: 900 / 420;
    border-radius: 12px;
    background:
        radial-gradient(circle at 30% 40%, rgba(16, 185, 129, 0.08), transparent 45%),
        #06231a;
    overflow: hidden;
}

.map-dot {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.map-dot-tiger {
    background: var(--np-saffron);
}

.map-dot-unesco {
    background: var(--np-blue);
}

.map-dot-park {
    background: var(--np-emerald);
}

.map-dot:hover {
    transform: translate(-50%, -50%) scale(1.45);
    box-shadow: 0 0 12px var(--np-gold);
}

.map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.9rem;
    font-size: 0.85rem;
    color: var(--np-text-muted);
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.35rem;
}

/* ---------- Filters ---------- */
.filters-panel {
    background: var(--np-card);
    border: 1px solid var(--np-border);
    border-radius: 16px;
    padding: 1.3rem;
    backdrop-filter: blur(10px);
}

.filters-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--np-text-muted);
    margin-bottom: 0.4rem;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    border: 1px solid var(--np-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--np-text);
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
}

.filter-group select option {
    background: var(--np-bg-alt);
    color: var(--np-text);
}

.filter-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--np-text-muted);
}

.btn-reset {
    background: transparent;
    border: 1px solid var(--np-border);
    color: var(--np-emerald);
    border-radius: 30px;
    padding: 0.4rem 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-reset:hover {
    background: rgba(16, 185, 129, 0.12);
}

/* ---------- Park cards ---------- */
.parks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.6rem;
}

.park-card {
    background: var(--np-card);
    border: 1px solid var(--np-border);
    border-radius: 18px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    scroll-margin-top: 90px;
}

.park-card:hover {
    transform: translateY(-6px);
    border-color: var(--np-emerald);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.park-card-active {
    border-color: var(--np-gold);
    box-shadow: 0 0 0 2px var(--np-gold), 0 14px 30px rgba(0, 0, 0, 0.35);
}

.park-card-media {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.park-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.park-card:hover .park-card-media img {
    transform: scale(1.07);
}

.badge {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.3rem 0.6rem;
    border-radius: 30px;
    color: #fff;
}

.badge-tiger {
    right: auto;
    left: 0.7rem;
    background: rgba(249, 115, 22, 0.9);
}

.badge-unesco {
    background: rgba(56, 189, 248, 0.9);
}

.park-card-body {
    padding: 1.3rem;
}

.park-card-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    margin: 0 0 0.5rem;
}

.park-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 0.6rem;
}

.park-meta {
    font-size: 0.82rem;
    color: var(--np-gold);
    font-weight: 600;
}

.park-card-desc {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--np-text-muted);
    margin: 0 0 1.1rem;
}

.park-explore-btn {
    display: inline-block;
    padding: 0.55rem 1.1rem;
    border-radius: 30px;
    background: linear-gradient(135deg, var(--np-emerald), var(--np-teal, #0d9488));
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
}

.park-explore-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ---------- Empty state ---------- */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--np-text-muted);
}

.empty-icon {
    font-size: 2.6rem;
}

.empty-state h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--np-text);
    margin: 0.6rem 0;
}

/* ---------- Did You Know ---------- */
.facts-shell {
    position: relative;
    background: var(--np-card);
    border: 1px solid var(--np-border);
    border-radius: 18px;
    padding: 2rem 1.2rem 2.6rem;
    text-align: center;
    max-width: 820px;
    margin: 0 auto;
}

.fact-slide {
    padding: 0 1rem;
}

.fact-icon {
    font-size: 2.6rem;
    margin-bottom: 0.5rem;
}

.fact-slide h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--np-gold);
    margin: 0 0 0.5rem;
}

.fact-slide p {
    color: var(--np-text-muted);
    line-height: 1.7;
    max-width: 620px;
    margin: 0 auto;
}

.fact-nav {
    position: absolute;
    bottom: 0.6rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 0.8rem;
}

.fact-nav button {
    background: transparent;
    border: 1px solid var(--np-border);
    color: var(--np-emerald);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.2s;
}

.fact-nav button:hover {
    background: rgba(16, 185, 129, 0.12);
}

/* ---------- Footer ---------- */
.np-footer {
    padding: 2.4rem 1.5rem;
    text-align: center;
    color: var(--np-text-muted);
    border-top: 1px solid var(--np-border);
    font-size: 0.92rem;
}

.np-footer a {
    color: var(--np-emerald);
    text-decoration: none;
    font-weight: 600;
}

/* ---------- Animations ---------- */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-visible {
    opacity: 1;
    transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
    .filters-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .np-hero {
        padding-top: 6rem;
    }
    .np-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .parks-grid {
        grid-template-columns: 1fr;
    }
    .np-section {
        padding: 3rem 1rem;
    }
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
    }
    .tiger-parks-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .wildlife-grid {
        grid-template-columns: 1fr;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .hero-quick-stats {
        gap: 24px;
    }
    .tiger-parks-list {
        grid-template-columns: 1fr;
    }
    .lightbox-prev {
        left: 5px;
    }
    .lightbox-next {
        right: 5px;
    }
}

/* ==========================================================================
   State Map Paths
   ========================================================================== */
.india-map-container svg .state-path {
    fill: rgba(34, 197, 94, 0.22);
    stroke: rgba(255, 255, 255, 0.35);
    stroke-width: 0.8;
    cursor: pointer;
    transition:
        fill 0.25s ease,
        stroke 0.25s ease,
        filter 0.25s ease;
}

.india-map-container svg .state-path:hover {
    fill: rgba(34, 197, 94, 0.45);
    stroke: rgba(34, 197, 94, 0.8);
    filter: drop-shadow(0 0 6px rgba(34, 197, 94, 0.3));
}

.light-theme .india-map-container svg .state-path {
    fill: rgba(21, 128, 61, 0.15);
    stroke: rgba(21, 128, 61, 0.3);
}

.light-theme .india-map-container svg .state-path:hover {
    fill: rgba(34, 197, 94, 0.3);
    stroke: rgba(21, 128, 61, 0.6);
}

/* ==========================================================================
   Park Card Images
   ========================================================================== */
.park-card-img-wrap {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: 14px 14px 0 0;
}

.park-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.park-card:hover .park-card-img {
    transform: scale(1.08);
}

.park-card-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(10, 15, 24, 0.65));
    pointer-events: none;
}

.park-card-img-wrap.img-failed {
    background: linear-gradient(135deg, #1a472a, #0f2918);
    display: flex;
    align-items: center;
    justify-content: center;
}

.park-card-img-wrap.img-failed::after {
    content: '🌿';
    font-size: 2.4rem;
    opacity: 0.4;
}

/* ==========================================================================
   Wildlife Card Images
   ========================================================================== */
.wildlife-card-img-wrap {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
}

.wildlife-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.wildlife-card:hover .wildlife-card-img {
    transform: scale(1.06);
}

.wildlife-card-status-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
}

.wildlife-card-img-wrap.img-failed {
    background: linear-gradient(135deg, #1a3a4a, #0f2029);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wildlife-card-img-wrap.img-failed::after {
    content: '🦁';
    font-size: 2.4rem;
    opacity: 0.4;
}

.wildlife-card-parks {
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--text-sub);
}

/* ==========================================================================
   Tiger Reserve Card Images
   ========================================================================== */
.tiger-park-card {
    background: var(--card-bg-glass);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.tiger-park-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.tiger-card-img-wrap {
    position: relative;
    width: 100%;
    height: 150px;
    overflow: hidden;
}

.tiger-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.tiger-park-card:hover .tiger-card-img {
    transform: scale(1.06);
}

.tiger-card-number {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 28px;
    height: 28px;
    background: var(--tiger-orange);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.tiger-card-body {
    padding: 14px;
}

.tiger-card-body h4 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.tiger-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 0.78rem;
    color: var(--text-sub);
    margin-bottom: 8px;
}

.tiger-card-desc {
    font-size: 0.82rem;
    color: var(--text-sub);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tiger-card-img-wrap.img-failed {
    background: linear-gradient(135deg, #4a2a1a, #291f0f);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tiger-card-img-wrap.img-failed::after {
    content: '🐅';
    font-size: 2.4rem;
    opacity: 0.4;
}

/* ==========================================================================
   Scroll Animations
   ========================================================================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 0.5s ease,
        transform 0.5s ease;
}

.animate-on-scroll.animate-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Focus Indicators for Keyboard Navigation
   ========================================================================== */
*:focus-visible {
    outline: 2px solid var(--forest-light);
    outline-offset: 2px;
}

.map-marker:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
    transform: translate(-50%, -50%) scale(1.6);
    z-index: 5;
}

.park-card:focus-visible,
.tiger-park-card:focus-visible,
.gallery-item:focus-visible {
    outline: 2px solid var(--forest-light);
    outline-offset: 3px;
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(34, 197, 94, 0.2);
}

.park-modal.hidden,
.lightbox.hidden {
    display: none;
}

/* Search Input */
.parks-search-container {
    max-width: 600px;
    margin: 0 auto 30px;
    text-align: center;
}
.parks-search-input {
    width: 100%;
    padding: 12px 20px;
    border-radius: 24px;
    background: var(--card-bg-glass);
    color: var(--text-main);
    border: 1px solid var(--card-border);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}
.parks-search-input:focus {
    border-color: var(--forest-light);
}
.parks-search-status:not(.sr-only) {
    margin-top: 10px;
    color: var(--text-sub);
    font-size: 0.9rem;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
}
