/* ===== Variables (Updated for Dark Mode) ===== */
:root {
    --primary-wine: #8E1628;       
    --primary-wine-dark: #660E1C;  
    --accent-gold: #D4AF37;        
    --text-dark: #1F2937;
    --text-light: #6B7280;
    --bg-light: #FDFBFB;           
    --white: #FFFFFF;
    --border-color: #E5E7EB;
    --header-bg: rgba(255, 255, 255, 0.95);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease-in-out;
}

/* ===== Dark Mode Color Inversions ===== */
body.dark-mode {
    --bg-light: #121212;       /* Deep dark canvas background */
    --white: #1E1E1E;          /* Dark gray for cards and sections */
    --text-dark: #F3F4F6;      /* Off-white for crisp, readable headers */
    --text-light: #9CA3AF;     /* Soft gray for captions and paragraph notes */
    --border-color: #374151;   /* Subtle boundary lines for dark elements */
    --header-bg: rgba(30, 30, 30, 0.95);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.6);
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

img, video {
    max-width: 100%;
    height: auto;
}

/* ===== Typography & Utilities ===== */
.section-title {
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 2.2rem;
    color: var(--primary-wine);
    margin-bottom: 10px;
}

.underline {
    height: 4px;
    width: 60px;
    background: var(--accent-gold);
    border-radius: 2px;
}

.mx-auto { margin-left: auto; margin-right: auto; }
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary-wine);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-wine-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-wine);
}

.btn-gold {
    background: var(--accent-gold);
    color: var(--white);
}

.btn-gold:hover {
    background: #B8922F;
}

/* ===== Preloader ===== */
#preloader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--white);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 50px; height: 50px;
    border: 5px solid var(--bg-light);
    border-top-color: var(--primary-wine);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

/* ===== Header & Navigation ===== */
header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.logo:hover .logo-img {
    transform: scale(1.05);
}

.logo h2 {
    color: var(--primary-wine);
    font-size: 1.5rem;
}

.logo span {
    color: var(--accent-gold);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-link {
    font-weight: 600;
    color: var(--text-dark);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-wine);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

#theme-toggle {
    background: transparent;
    border: none;
    color: var(--primary-wine);
    font-size: 1.3rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

#theme-toggle:hover {
    transform: scale(1.15);
}

.btn-donate-nav {
    background: var(--accent-gold);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 20px;
}

.btn-donate-nav:hover {
    color: var(--white);
    background: #B8922F;
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-wine);
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active { opacity: 1; }

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    max-width: 800px;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* ===== Stats Section ===== */
.stats {
    padding: 60px 0;
    background: var(--bg-light);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.stat-card i {
    font-size: 2.5rem;
    color: var(--accent-gold);
    margin-bottom: 15px;
}

.stat-card h3 {
    font-size: 2.5rem;
    color: var(--primary-wine);
    margin-bottom: 5px;
}

/* ===== About Section ===== */
.about {
    padding: 100px 0;
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-image img {
    border-radius: 15px;
    box-shadow: var(--shadow-md);
}

.about-subheading {
    color: var(--primary-wine);
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.about-content p {
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 1.05rem;
    line-height: 1.7;
}

.about-list {
    margin: 20px 0;
    padding-left: 0;
}

.about-list li {
    margin-bottom: 15px;
    color: var(--text-dark);
    display: flex;
    align-items: flex-start;
    line-height: 1.6;
}

.about-list li i {
    color: var(--accent-gold);
    margin-top: 5px;
    margin-right: 15px;
    font-size: 1.2rem;
}

.about-list li strong {
    color: var(--primary-wine);
}

.about-quote {
    background: var(--bg-light);
    border-left: 4px solid var(--accent-gold);
    padding: 20px;
    margin: 30px 0;
    font-style: italic;
    color: var(--text-dark);
    font-size: 1.1rem;
    border-radius: 0 10px 10px 0;
}

@media(min-width: 992px) {
    .about-container {
        align-items: flex-start;
    }
}

/* ===== Mission/Vision (Glassmorphism) ===== */
.mission-vision {
    position: relative;
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary-wine), var(--primary-wine-dark));
    color: var(--white);
}

.mv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.mv-card.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
}

.mv-card .icon-wrap {
    width: 60px; height: 60px;
    background: var(--accent-gold);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 20px auto;
}

/* ===== Programs & Projects Cards ===== */
.programs, .featured-projects {
    padding: 100px 0;
    background: var(--bg-light);
}

.programs-grid, .projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.program-card, .project-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.program-card:hover, .project-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.program-card img, .project-card img, .video-container video {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.program-content, .project-body {
    padding: 25px;
}

.program-content i {
    font-size: 2rem;
    color: var(--primary-wine);
    margin-bottom: 15px;
}

.project-body h3 {
    color: var(--primary-wine);
    margin-bottom: 10px;
}

.read-more {
    color: var(--accent-gold);
    font-weight: 600;
    display: inline-block;
    margin-top: 15px;
}

/* ===== Leadership ===== */
.leadership { padding: 100px 0; }

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.team-card {
    text-align: center;
    padding: 20px;
    border-radius: 15px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.team-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }

.team-card img {
    width: 150px; height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 4px solid var(--bg-light);
}

.team-info h3 { color: var(--primary-wine); }
.team-info span { color: var(--accent-gold); font-size: 0.9rem; font-weight: 600; display: block; margin-bottom: 10px;}

/* ===== Video Section ===== */
.video-section {
    padding: 100px 0;
    background: var(--white);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.video-card {
    background: var(--bg-light);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.video-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.video-card video {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: #000;
    display: block;
}

.video-info {
    padding: 20px;
    text-align: center;
}

.video-info h4 {
    color: var(--primary-wine);
    font-size: 1.1rem;
}

/* ===== Gallery ===== */
.gallery { 
    padding: 100px 0; 
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.gallery-item {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.gallery-image-wrap {
    overflow: hidden;
    height: 220px;
    width: 100%;
}

.gallery-image-wrap img {
    width: 100%; 
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.gallery-item:hover .gallery-image-wrap img {
    transform: scale(1.08);
}

.gallery-caption {
    padding: 18px;
    background: var(--white);
    flex-grow: 1;
}

.gallery-caption h4 {
    color: var(--primary-wine);
    font-size: 1.1rem;
    margin-bottom: 6px;
    font-weight: 600;
}

.gallery-caption p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* ===== Donate Section & Bank Cards ===== */
.donate { padding: 100px 0; background: var(--bg-light); }

.donate-container {
    display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center;
}

.donate-image img { border-radius: 15px; }

.bank-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--accent-gold);
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.bank-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.bank-icon {
    font-size: 1.8rem;
    color: var(--primary-wine);
    margin-top: 3px;
    min-width: 30px;
    text-align: center;
}

.bank-details h4 {
    color: var(--primary-wine);
    font-size: 1.1rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.bank-details p {
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.bank-details .acc-num {
    font-weight: 700;
    color: var(--primary-wine);
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.btn-copy {
    margin-top: 10px;
    background: var(--bg-light);
    color: var(--primary-wine);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-copy:hover {
    background: var(--primary-wine);
    color: var(--white);
    border-color: var(--primary-wine);
}

.btn-copy.copied {
    background: #25D366;
    color: var(--white);
    border-color: #25D366;
}

/* ===== Contact Section ===== */
.contact { padding: 100px 0; }

.contact-wrapper {
    display: grid; grid-template-columns: 1fr 2fr; gap: 40px; margin-bottom: 40px;
}

.info-box {
    background: var(--bg-light);
    padding: 20px; border-radius: 10px; margin-bottom: 20px;
    text-align: center;
}

.info-box i { color: var(--primary-wine); font-size: 1.5rem; margin-bottom: 10px; }

.contact-form { display: flex; flex-direction: column; gap: 15px; }

.contact-form input, .contact-form textarea {
    width: 100%; 
    padding: 15px; 
    border: 1px solid var(--border-color); 
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    background: var(--white);
    color: var(--text-dark);
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none; border-color: var(--primary-wine);
}

.map-container iframe { border-radius: 15px; }

.form-status {
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
}

/* ===== Footer ===== */
footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 60px 0 20px 0;
}

.footer-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 { color: var(--accent-gold); margin-bottom: 20px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a:hover { color: var(--accent-gold); }

.social-links a {
    display: inline-block; width: 35px; height: 35px;
    background: rgba(255,255,255,0.1); border-radius: 50%;
    text-align: center; line-height: 35px; margin-right: 10px; transition: var(--transition);
}

.social-links a:hover { background: var(--primary-wine); }

.footer-bottom {
    text-align: center; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1);
}

/* ===== Floating Buttons ===== */
.float-whatsapp {
    position: fixed; 
    bottom: 20px; 
    right: 20px;
    background: #25D366; 
    color: #ffffff;
    width: 50px; 
    height: 50px; 
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 26px; 
    box-shadow: var(--shadow-md); 
    z-index: 9999;
}

#scrollTopBtn {
    position: fixed; 
    bottom: 80px; 
    right: 20px;
    background: var(--primary-wine); 
    color: var(--white);
    width: 50px; 
    height: 50px; 
    border-radius: 50%;
    border: none; 
    font-size: 20px; 
    cursor: pointer;
    box-shadow: var(--shadow-md); 
    z-index: 9999; 
    display: none;
}

/* ===== Dark Mode Specific Overrides ===== */
body.dark-mode #theme-toggle {
    color: var(--accent-gold);
}

body.dark-mode .mv-card.glass p {
    color: rgba(255, 255, 255, 0.9);
}

body.dark-mode .hamburger {
    color: var(--text-dark);
}

/* ===== Unified Mobile & Tablet Responsiveness (Up to 1024px) ===== */
@media(max-width: 1024px) {
    .container {
        padding: 0 15px;
    }

    /* Scale Header Elements */
    .logo { gap: 8px; }
    .logo-img { height: 38px; }
    .logo h2 { font-size: 1.1rem; }
    .header-actions { gap: 12px; }

    /* Mobile Side Navigation Drawer */
    .nav-links {
        position: fixed; 
        top: 80px; 
        right: -100%;
        width: 100%; 
        height: calc(100vh - 80px);
        background: var(--white);
        flex-direction: column; 
        justify-content: flex-start;
        padding-top: 40px;
        gap: 25px;
        transition: right 0.4s ease-in-out;
        box-shadow: var(--shadow-md);
        z-index: 999;
    }

    .nav-links.active { right: 0; }
    .hamburger { display: block; font-size: 1.4rem; }

    /* Hero Section Mobile Scaling */
    .hero {
        height: 60vh;
        min-height: 450px;
    }

    .hero .slide {
        background-position: center;
    }

    .hero-content h1 {
        font-size: 2.2rem;
        margin-bottom: 15px;
    }

    .hero-content p {
        font-size: 1rem;
        margin-bottom: 25px;
    }

    /* Single Column Grid Layouts */
    .about-container, 
    .mv-grid, 
    .donate-container, 
    .contact-wrapper,
    .video-grid {
        grid-template-columns: 1fr;
    }

    .video-card video {
        height: auto;
    }

    .contact {
        padding-bottom: 80px;
    }
}