/* CSS Reset & Base Styles */
:root {
    --bg-color: #fffaf0;
    --text-color: #333;
    --heading-color: #2c3e50;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --card-bg: white;
    --accent-color: #d35400;
    --border-color: #eee;
    --table-hover: #fffaf0;
    --footer-bg: #2c3e50;
    --footer-text: #bdc3c7;
    --shadow-color: rgba(0,0,0,0.05);
}

body.dark-mode {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --heading-color: #f1c40f;
    --nav-bg: rgba(25, 25, 25, 0.98);
    --card-bg: #2d2d2d;
    --border-color: #444;
    --table-hover: #333;
    --footer-bg: #111;
    --shadow-color: rgba(0,0,0,0.5);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    color: var(--heading-color);
}

a {
    text-decoration: none;
    color: inherit;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 5%;
    background: var(--nav-bg);
    box-shadow: 0 2px 10px var(--shadow-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: all 0.3s ease;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #d35400;
    font-family: 'Playfair Display', serif;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #d35400;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 101;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background-color: #2c3e50;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.4)), 
                url('assets/hero_bg.png') center/cover no-repeat fixed;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 0 20px;
}

.hero h1 {
    color: #f1c40f;
    font-size: 4.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    animation: fadeInDown 1s ease;
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease 0.5s both;
}

.btn {
    padding: 15px 35px;
    font-size: 1.1rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
    transition: transform 0.3s, background 0.3s;
    animation: fadeInUp 1s ease 0.8s both;
}

.btn:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
}

.btn.btn-success {
    background-color: #27ae60 !important;
}

/* Main Content Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px;
}

/* Section Titles */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #d35400;
    position: relative;
    clear: both;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #27ae60;
    margin: 15px auto 0;
    border-radius: 2px;
}

/* Editorial / Report Content Styles */
.content-block {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow-color);
    margin-bottom: 40px;
}

.content-block h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.article-text {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 20px;
    line-height: 1.8;
}

/* Images */
.feature-image {
    max-width: 800px;
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin: 40px auto;
    display: block;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    margin: 30px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    box-shadow: 0 5px 15px var(--shadow-color);
    border-radius: 10px;
    overflow: hidden;
    min-width: 600px;
}

table th, table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table th {
    background-color: var(--accent-color);
    color: white;
    font-weight: 600;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
}

table tr:last-child td {
    border-bottom: none;
}

table tbody tr:hover {
    background-color: var(--table-hover);
}

/* Data Caption */
.data-caption {
    font-size: 0.9rem;
    color: #7f8c8d;
    text-align: right;
    margin-top: -20px;
    margin-bottom: 20px;
    font-style: italic;
}

/* Greetings Section */
.greetings {
    background: linear-gradient(135deg, #fffaf0 0%, #ffeaa7 100%);
    padding: 80px 20px;
    text-align: center;
    border-radius: 20px;
    margin: 60px 0;
}

.greetings h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: #d35400;
}

/* Footer */
footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    text-align: center;
    padding: 30px 20px;
    line-height: 1.8;
}

footer a {
    color: #f1c40f;
    font-weight: 600;
}

footer a:hover {
    text-decoration: underline;
}

/* Water Drop Animation Elements */
.water-drop {
    position: fixed;
    top: -20px;
    width: 12px;
    height: 18px;
    background: rgba(116, 185, 255, 0.7);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    pointer-events: none;
    z-index: 1000;
    animation: fall linear forwards;
}

/* Keyframes */
@keyframes fall {
    to {
        transform: translateY(105vh);
        opacity: 0.2;
    }
}

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

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

/* Nav Controls */
.nav-controls {
    display: flex;
    gap: 15px;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s;
    color: var(--text-color);
}

.icon-btn:hover {
    transform: scale(1.1);
}

/* Utilities */
.mt-2 { margin-top: 10px; }
.mt-4 { margin-top: 20px; }
.text-center { text-align: center; }

/* Checklist Component */
.checklist-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    background: var(--bg-color);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.check-item:hover {
    transform: translateX(5px);
    border-color: var(--accent-color);
}

.check-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--accent-color);
}

.progress-container {
    width: 100%;
    height: 10px;
    background-color: var(--bg-color);
    border-radius: 5px;
    margin-top: 20px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: #27ae60;
    width: 0%;
    transition: width 0.5s ease;
}

/* Map Component */
.map-placeholder {
    width: 100%;
    height: 440px;
    background: var(--bg-color);
    border-radius: 15px;
    position: relative;
    margin-top: 30px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.03);
}

#live-map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

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

.gallery-item {
    height: 200px;
    background-color: var(--bg-color);
    border-radius: 15px;
    display: flex;
    align-items: flex-end;
    padding: 20px;
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    background-size: cover;
    background-position: center;
    transition: transform 0.3s;
    box-shadow: inset 0 -50px 50px -20px rgba(0,0,0,0.7);
}

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

.visual-1 { background-image: url('assets/ritual_bath.png'); background-color: #3498db; }
.visual-2 { background-image: url('assets/thal_kado.png'); background-color: #e67e22; }
.visual-3 { background-image: url('assets/chulha_veneration.png'); background-color: #2ecc71; }

.audio-player {
    margin: 20px 0;
    width: 100%;
}
.audio-player audio {
    width: 100%;
}

/* Memory Wall Component */
.memory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.memory-card {
    background: var(--bg-color);
    padding: 25px;
    border-radius: 15px;
    border-left: 5px solid var(--accent-color);
    box-shadow: 0 4px 10px var(--shadow-color);
}

.memory-card p {
    font-style: italic;
    margin-bottom: 15px;
}

.memory-card cite {
    font-weight: bold;
    color: var(--accent-color);
}

.memory-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: var(--bg-color);
    padding: 25px;
    border-radius: 15px;
}

.form-input {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    background: var(--card-bg);
    color: var(--text-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        width: 100%;
        height: 100vh;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    }
    
    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    .hero h1 {
        font-size: 3rem;
    }
    .section-title {
        font-size: 2rem;
    }
    .content-block {
        padding: 20px;
    }

    .map-placeholder {
        height: 320px;
    }
}
