:root {
    --primary-color: #2c3e50;
    /* Dark Slate */
    --accent-color: #c0392b;
    /* Rust Red */
    --secondary-accent: #27ae60;
    /* Forest Green */
    --text-color: #ecf0f1;
    --bg-color: #1a1a1a;
    --card-bg: #2c2c2c;
    --font-heading: 'Cinzel', serif;
    --font-body: 'Lato', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Typography */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-subtitle {
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-desc {
    color: #bdc3c7;
    max-width: 600px;
    margin: 0 auto;
}

.btn-primary {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--accent-color);
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    font-weight: 700;
    border: 1px solid var(--accent-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--accent-color);
}

/* Navbar */
.navbar {
    background-color: rgba(26, 26, 26, 0.95);
    padding: 1.5rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #333;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: white;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* Hero */
.hero {
    height: 100vh;
    background: url('assets/images/hero_bear.png') no-repeat center center/cover;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 1rem;
}

.hero-subtitle {
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 1.2rem;
    color: #ddd;
    display: block;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-text {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    color: #eee;
}

/* Map Section */
.map-section {
    background-color: #222;
}

#bear-map {
    height: 600px;
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

/* Leaflet Customization */
.leaflet-popup-content-wrapper {
    background: var(--card-bg);
    color: var(--text-color);
    border-radius: 4px;
}

.leaflet-popup-tip {
    background: var(--card-bg);
}

.leaflet-container a {
    color: var(--accent-color);
}

/* Species Grid & Gallery */
.species-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.species-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.27), box-shadow 0.4s;
    border: 1px solid #333;
    position: relative;
    display: flex;
    flex-direction: column;
}

.species-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    border-color: var(--accent-color);
}

.card-image-wrapper {
    width: 100%;
    height: 250px;
    position: relative;
    overflow: hidden;
    background-color: #222;
    cursor: pointer;
}

.species-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    opacity: 0.8;
    /* Dim slightly until hover or load */
}

.species-card:hover .species-img {
    transform: scale(1.1);
    opacity: 1;
}

.card-icon-overlay {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid var(--card-bg);
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.card-icon-overlay i {
    color: white;
    font-size: 1.2rem;
}

.card-content {
    padding: 2.5rem 1.5rem 2rem;
    /* Top padding accounts for the overlay icon */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.species-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.6rem;
    color: var(--text-color);
}

.scientific-name {
    font-style: italic;
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-family: var(--font-heading);
}

.species-desc {
    font-size: 0.95rem;
    color: #bdc3c7;
    margin-bottom: 1.5rem;
}

.location-tag {
    margin-top: auto;
    padding: 0.4rem 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid #444;
    border-radius: 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #aaa;
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    position: relative;
}

.lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    border: 2px solid #333;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: var(--accent-color);
}

.lightbox-caption {
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    text-align: center;
    color: #ccc;
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

/* Footer */
.footer {
    background-color: #111;
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid #333;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: #95a5a6;
    margin: 0 1rem;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: white;
}

.copyright {
    margin-top: 2rem;
    color: #555;
    font-size: 0.8rem;
}

/* Privacy Page */
.privacy-body {
    padding-top: 100px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.privacy-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.privacy-content h1 {
    margin-bottom: 2rem;
    color: var(--accent-color);
}

.privacy-box {
    background: rgba(192, 57, 43, 0.1);
    border-left: 4px solid var(--accent-color);
    padding: 1.5rem;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
    }

    #bear-map {
        height: 400px;
    }
}

/* Conservation Badge */
.conservation-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.status-vulnerable {
    background-color: #f39c12;
    color: #fff;
}

.status-endangered {
    background-color: #c0392b;
    color: #fff;
}

.status-safe {
    background-color: #27ae60;
    color: #fff;
}