:root {
    --ghats-green-dark: #1a3c27;
    --ghats-green-light: #2d5a3f;
    --ghats-earth: #8B5A2B;
    --ghats-gold: #d4af37;
    --ghats-bg: #f4f7f5;
    --ghats-text: #2c3e2d;
    --ghats-glass: rgba(255, 255, 255, 0.85);
    --ghats-glass-border: rgba(255, 255, 255, 0.5);
    --danger-red: #c0392b;
    --warning-orange: #d35400;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--ghats-bg);
    color: var(--ghats-text);
    margin: 0;
    line-height: 1.7;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    color: var(--ghats-green-dark);
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 85vh;
    min-height: 500px;
    display: flex;
    align-items: flex-end;
    color: white;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26, 60, 39, 0.95) 0%, rgba(26, 60, 39, 0.4) 50%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 40px;
    margin: 0 auto;
    text-align: center;
}

.badge {
    display: inline-block;
    background: rgba(212, 175, 55, 0.2);
    border: 1px solid var(--ghats-gold);
    color: var(--ghats-gold);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.title {
    font-size: 3.5rem;
    color: white;
    margin: 0 0 15px 0;
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 25px;
    font-style: italic;
}

.hero-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.meta-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    padding: 10px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.meta-item.critical {
    background: rgba(192, 57, 43, 0.3);
    border: 1px solid var(--danger-red);
}

.btn-explore {
    display: inline-block;
    background: var(--ghats-gold);
    color: var(--ghats-green-dark);
    padding: 12px 30px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 5px;
    transition: transform 0.3s;
}

.btn-explore:hover {
    transform: translateY(-3px);
    background: #e5c150;
}

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

.main-content-wrapper {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
    margin-top: -60px;
    position: relative;
    z-index: 10;
    padding-bottom: 60px;
}

/* Sidebar Navigation (ScrollSpy) */
.sidebar-nav {
    position: relative;
}

.sticky-nav {
    position: sticky;
    top: 100px;
    background: var(--ghats-glass);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--ghats-glass-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.sticky-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sticky-nav li {
    margin-bottom: 8px;
}

.nav-link-item {
    text-decoration: none;
    color: var(--ghats-text);
    font-size: 0.9rem;
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-link-item:hover {
    background: rgba(45, 90, 63, 0.1);
    color: var(--ghats-green-dark);
}

.nav-link-item.active {
    background: rgba(45, 90, 63, 0.15);
    color: var(--ghats-green-dark);
    font-weight: 600;
    border-left-color: var(--ghats-green-dark);
}

/* Content Sections */
.content-section {
    margin-bottom: 30px;
}

.glass-panel {
    background: var(--ghats-glass);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--ghats-glass-border);
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
}

.highlight-panel {
    border-left: 5px solid var(--ghats-green-dark);
}

/* Taxonomy Table */
.taxonomy-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.taxonomy-table th, .taxonomy-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.taxonomy-table th {
    width: 30%;
    color: var(--ghats-green-dark);
    font-weight: 600;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.info-card {
    background: rgba(255,255,255,0.5);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.05);
}

.info-card h3 {
    margin-top: 0;
    font-size: 1.1rem;
    color: var(--ghats-earth);
}

/* Threat Meter */
.threat-meter {
    margin-top: 20px;
}

.threat-item {
    margin-bottom: 20px;
}

.threat-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 600;
}

.severity.high { color: var(--danger-red); }
.severity.medium { color: var(--warning-orange); }

.threat-bar {
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.threat-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--warning-orange), var(--danger-red));
    border-radius: 5px;
    transition: width 1.5s ease-out;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 60, 39, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

#lightbox-caption {
    color: white;
    margin-top: 15px;
    font-size: 1.1rem;
}

/* Scroll Animations */
.fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

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

/* Responsive */
@media (max-width: 900px) {
    .main-content-wrapper {
        grid-template-columns: 1fr;
        margin-top: 20px;
    }
    .sidebar-nav {
        display: none; /* Hide sidebar on mobile, could be replaced with a top dropdown */
    }
    .title { font-size: 2.5rem; }
    .info-grid { grid-template-columns: 1fr; }
}