/* ---
Root Variables & Basic Setup
--- */
:root {
    --font-family-body: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-family-heading: 'Poppins', serif;
    
    /* Light Mode Palette */
    --color-background: #f8f9fa;
    --color-text-primary: #212529;
    --color-text-secondary: #6c757d;
    --color-border: #dee2e6;
    --color-accent: #c0392b; /* Nepali Red */
    --color-primary: #2980b9; /* Nepali Blue */
    --color-card-bg: #ffffff;
    --color-header-bg: rgba(255, 255, 255, 0.85);
    --color-footer-bg: #212529;

    /* Dark Mode Palette */
    --dark-color-background: #121212;
    --dark-color-text-primary: #e0e0e0;
    --dark-color-text-secondary: #adb5bd;
    --dark-color-border: #343a40;
    --dark-color-accent: #e74c3c;
    --dark-color-primary: #3498db;
    --dark-color-card-bg: #1e1e1e;
    --dark-color-header-bg: rgba(20, 20, 20, 0.85);
    --dark-color-footer-bg: #181818;
}

html { scroll-behavior: smooth; box-sizing: border-box; }
*, *:before, *:after { box-sizing: inherit; }

body {
    font-family: var(--font-family-body);
    line-height: 1.7;
    background-color: var(--color-background);
    color: var(--color-text-primary);
    margin: 0; padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- Dark Mode --- */
body.dark-mode {
    --color-background: var(--dark-color-background);
    --color-text-primary: var(--dark-color-text-primary);
    --color-text-secondary: var(--dark-color-text-secondary);
    --color-border: var(--dark-color-border);
    --color-accent: var(--dark-color-accent);
    --color-primary: var(--dark-color-primary);
    --color-card-bg: var(--dark-color-card-bg);
    --color-header-bg: var(--dark-color-header-bg);
    --color-footer-bg: var(--dark-color-footer-bg);
}

/* --- Typography --- */
h1, h2, h3, h4 { font-family: var(--font-family-heading); font-weight: 700; line-height: 1.2; color: var(--color-text-primary); }
p { margin-bottom: 1.5rem; color: var(--color-text-secondary); }
a { color: var(--color-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-accent); }
hr { border: 0; border-top: 1px solid var(--color-border); margin: 3rem 0; }

/* --- Buttons --- */
.btn { display: inline-block; font-weight: 500; padding: 0.8rem 1.8rem; border-radius: 5px; text-decoration: none; transition: all 0.3s ease; border: 2px solid transparent; cursor: pointer; text-align: center; }
.btn-primary { background-color: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.btn-primary:hover { background-color: transparent; color: var(--color-accent); }
.btn-secondary { background-color: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn-secondary:hover { background-color: var(--color-primary); color: #fff; }

/* --- Language Selection Page --- */
.lang-selector-body {
    background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('/assets/images/hero-cover.jpg');
    background-size: cover; background-position: center;
    display: flex; justify-content: center; align-items: center; min-height: 100vh;
}
.language-selection-container {
    text-align: center; color: #fff;
    padding: 3rem; background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px; backdrop-filter: blur(10px);
}
.language-selection-container h1 { font-size: 2rem; color: #fff; margin-bottom: 1rem; }
.language-buttons-wrapper { margin-top: 2rem; display: flex; gap: 1.5rem; justify-content: center; }
.btn-language { font-size: 1.1rem; padding: 0.8rem 1.8rem; border: 2px solid #fff; background: transparent; color: #fff; }
.btn-language:hover { background: #fff; color: #000; }

/* --- Header & Navigation --- */
.site-header { background-color: var(--color-header-bg); backdrop-filter: blur(10px); border-bottom: 1px solid var(--color-border); position: sticky; top: 0; z-index: 1000; }
.header-container { max-width: 1400px; margin: 0 auto; padding: 1rem 1.5rem; display: flex; justify-content: space-between; align-items: center; }
.logo a { font-size: 1.5rem; font-weight: 700; color: var(--color-text-primary); text-decoration: none; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.5rem; }
.main-nav a { font-weight: 500; color: var(--color-text-secondary); padding-bottom: 5px; border-bottom: 2px solid transparent; transition: all 0.2s ease; }
.main-nav a.active, .main-nav a:hover { color: var(--color-text-primary); border-bottom-color: var(--color-accent); text-decoration: none; }
.main-nav a.highlighted-link { color: var(--color-accent); }
.header-toggles { display: flex; align-items: center; gap: 1rem; }
#dark-mode-toggle { background: none; border: none; cursor: pointer; padding: 0; color: var(--color-text-primary); }
#dark-mode-toggle svg { width: 24px; height: 24px; }
.sun-icon { display: block; } .moon-icon { display: none; }
body.dark-mode .sun-icon { display: none; } body.dark-mode .moon-icon { display: block; }
.language-switch { font-weight: 500; }

/* --- Mobile Menu --- */
.mobile-menu-toggle { display: none; background: none; border: none; z-index: 1001; }
.mobile-nav-panel { display: none; /* Controlled by JS */ }

/* --- Page Layout --- */
.page-wrapper { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem; }
.page-header { text-align: center; margin-bottom: 3rem; }
.page-header h1 { font-size: 3rem; margin-bottom: 0.5rem; }
.page-header .page-subtitle { font-size: 1.2rem; max-width: 700px; margin: 0 auto; color: var(--color-text-secondary); }
.content-box { background-color: var(--color-card-bg); border: 1px solid var(--color-border); border-radius: 8px; padding: 2rem; margin-bottom: 2rem; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.section-title { font-size: 2rem; border-bottom: 2px solid var(--color-accent); padding-bottom: 0.5rem; margin-top: 0; margin-bottom: 1.5rem; }
.section-title-center { text-align: center; border-bottom: none; }
.intro-paragraph { font-size: 1.1rem; text-align: center; max-width: 800px; margin: 0 auto 2rem auto; }
.cta-container-center { text-align: center; margin: 2rem 0; }

/* --- Homepage Specific --- */
.hero-section { position: relative; color: #fff; height: 80vh; display: flex; align-items: center; justify-content: center; text-align: center; background-size: cover; background-position: center; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); }
.hero-content { position: relative; z-index: 2; max-width: 800px; padding: 2rem; }
.hero-title { font-size: 3.5rem; color: #fff; line-height: 1.1; margin-bottom: 1rem; }
.hero-title span { display: block; }
.hero-subtitle { font-size: 1.2rem; }
.hero-cta-buttons { display: flex; gap: 1rem; justify-content: center; margin-top: 2rem; }
.front-page-container { max-width: 1400px; margin: 0 auto; padding: 4rem 1.5rem; }
.front-page-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.fp-card { background-color: var(--color-card-bg); border: 1px solid var(--color-border); border-radius: 8px; padding: 2rem; display: flex; flex-direction: column; }
.fp-card h3 { margin-top: 0; font-size: 1.5rem; }
.fp-card .btn { margin-top: auto; }
.fp-card-large { grid-column: span 2; }
.fp-card-highlight { background-color: var(--color-primary); color: #fff; }
.fp-card-highlight h3, .fp-card-highlight p { color: #fff; }
.fp-card-highlight .btn { background: #fff; color: var(--color-primary); border-color: #fff; }

/* --- Life (About) Page Specific --- */
.life-content-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; } /* Simplified to single column as image is removed */
.life-story-main { max-width: 800px; margin: 0 auto; /* Center the text content */ }
.timeline-chapter { margin-bottom: 2rem; }
.chapter-header { border-bottom: 1px solid var(--color-border); padding-bottom: 1rem; margin-bottom: 1rem; }
.chapter-header h2 { margin-top: 0; }
.expandable-content summary { cursor: pointer; font-weight: 500; color: var(--color-primary); }

/* --- Project Page Specific --- */
.mv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.mv-card { border-left: 4px solid var(--color-accent); padding-left: 1.5rem; }

/* --- Movement Page Specific --- */
.initiative-section-box { display: grid; grid-template-columns: 1fr 2fr; gap: 2rem; align-items: center; }
.initiative-image-container img { width: 100%; border-radius: 8px; }
.roles-grid-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.role-card-detailed { background: var(--color-card-bg); border: 1px solid var(--color-border); border-radius: 8px; padding: 1.5rem; display: flex; flex-direction: column; }
.role-card-detailed .btn { margin-top: auto; }
.collaboration-options { display: flex; gap: 2rem; justify-content: center; margin-top: 2rem; }

/* --- Collaborate (Support) Page Specific --- */
.donation-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; margin-bottom: 2rem; }
.qr-codes-container-support { display: flex; gap: 1rem; justify-content: center; text-align: center; }
.qr-code img { max-width: 150px; }
.transparency-notice { background: var(--color-background); padding: 1.5rem; border-radius: 8px; text-align: center; margin-top: 2rem; }
.book-list ul { columns: 2; }

/* --- Connect (Contact) Page Specific --- */
.connect-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.social-icons-list { display: flex; flex-wrap: wrap; gap: 1rem; }

/* --- Press Page --- */
.press-archive-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.news-card { background: var(--color-card-bg); border: 1px solid var(--color-border); border-radius: 8px; padding: 1.5rem; }
.news-card-featured { grid-column: 1 / -1; }

/* --- Footer --- */
.site-footer { background-color: var(--color-footer-bg); color: #fff; padding: 3rem 1.5rem; margin-top: 4rem; }
.footer-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.footer-logo { font-size: 1.5rem; margin: 0 0 0.5rem 0; color: #fff; }
.footer-about p, .footer-links-col p { color: var(--color-text-secondary); margin: 0; }
.footer-links-col ul { list-style: none; padding: 0; margin: 0; }
.footer-links-col li { margin-bottom: 0.5rem; }
.footer-links-col a { color: #fff; }
.footer-social h4 { margin: 0 0 1rem 0; color: #fff; }
.social-icons-svg { display: flex; gap: 1rem; }
.social-icons-svg a { color: #fff; }
.social-icons-svg a svg { width: 24px; height: 24px; transition: all 0.2s ease; }
.social-icons-svg a:hover svg { fill: var(--color-accent); }
.footer-bottom { text-align: center; border-top: 1px solid var(--color-border); padding-top: 1.5rem; margin-top: 2rem; font-size: 0.9rem; color: var(--color-text-secondary); }

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .main-nav { display: none; }
    .mobile-menu-toggle { display: block; z-index: 1001; width: 28px; height: 22px; position: relative; cursor: pointer; }
    .mobile-menu-toggle span { display: block; position: absolute; height: 3px; width: 100%; background: var(--color-text-primary); border-radius: 3px; opacity: 1; left: 0; transition: .25s ease-in-out; }
    .mobile-menu-toggle span:nth-child(1) { top: 0px; }
    .mobile-menu-toggle span:nth-child(2) { top: 9px; }
    .mobile-menu-toggle span:nth-child(3) { top: 18px; }
    .mobile-nav-open .mobile-menu-toggle span:nth-child(1) { top: 9px; transform: rotate(135deg); }
    .mobile-nav-open .mobile-menu-toggle span:nth-child(2) { opacity: 0; left: -28px; }
    .mobile-nav-open .mobile-menu-toggle span:nth-child(3) { top: 9px; transform: rotate(-135deg); }
    .mobile-nav-panel { display: block; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--color-background); z-index: 1000; transform: translateX(100%); transition: transform .3s ease-in-out; display: flex; justify-content: center; align-items: center; text-align: center; }
    .mobile-nav-open .mobile-nav-panel { transform: translateX(0); }
    .mobile-nav-panel ul { list-style: none; padding: 0; }
    .mobile-nav-panel li { margin-bottom: 2rem; }
    .mobile-nav-panel a { font-size: 2rem; font-weight: 700; color: var(--color-text-primary); }
    
    .front-page-grid { grid-template-columns: 1fr; }
    .fp-card-large { grid-column: span 1; }
    .life-content-grid, .initiative-section-box, .donation-grid, .connect-grid { grid-template-columns: 1fr; }
    .collaboration-options, .footer-container { flex-direction: column; grid-template-columns: 1fr; text-align: center; }
    .social-icons-svg { justify-content: center; }
}
