/*
Theme Name: Sabka Sahara
Theme URI: https://example.com/sabka-sahara
Author: Gemini
Description: A custom theme for Sabka Sahara Trust.
Version: 1.1
License: GNU General Public License v2 or later
*/

:root {
    --primary: #ea580c; /* Orange 600 */
    --primary-hover: #c2410c; /* Orange 700 */
    --primary-light: #ffedd5; /* Orange 100 */
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --white: #ffffff;
    /* Using Inter font as per the original design */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --container-width: 1200px; /* Slightly reduced for better standard containment */
    --radius-lg: 1rem;
    --radius-full: 9999px;
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --section-spacing: 5rem; /* Reduced from 6rem for better tightness */
}

/* Reset & Base */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    color: var(--slate-600);
    line-height: 1.7;
    background-color: var(--white);
    overflow-x: hidden;
    font-size: 16px;
}

/* Utilities */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem; /* px-6 equivalent */
}
@media (max-width: 640px) {
    .container { padding: 0 1rem; }
}

a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, h5, h6 { color: var(--slate-900); font-weight: 700; line-height: 1.2; }
p { margin-bottom: 1rem; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: var(--shadow-md);
}
.btn-primary:hover { background-color: var(--primary-hover); transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.btn-outline {
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.5);
    color: var(--white);
    backdrop-filter: blur(4px);
}
.btn-outline:hover { background: rgba(255,255,255,0.2); border-color: var(--white); transform: translateY(-2px); }

/* Section Headers */
.section-header { text-align: center; max-width: 42rem; margin: 0 auto 3.5rem; }
.tag {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    padding: 0.35rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}
.section-title { font-size: 2.25rem; font-weight: 800; color: var(--slate-900); margin-bottom: 1rem; letter-spacing: -0.025em; }
.section-desc { font-size: 1.125rem; color: var(--slate-500); max-width: 36rem; margin: 0 auto; }

@media (max-width: 768px) {
    .section-title { font-size: 1.875rem; }
    .section-desc { font-size: 1rem; }
    .section-header { margin-bottom: 2.5rem; }
}

/* Navigation */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    transition: all 0.3s ease;
    padding: 1.25rem 0;
    background: transparent;
}
.site-header.scrolled { background-color: rgba(255, 255, 255, 0.95); backdrop-filter: blur(8px); box-shadow: var(--shadow-md); padding: 0.75rem 0; }
.nav-container { display: flex; justify-content: space-between; align-items: center; }

.brand { display: flex; align-items: center; gap: 0.75rem; font-weight: 700; font-size: 1.35rem; color: var(--white); letter-spacing: -0.025em; }
.brand-icon { background: var(--primary); padding: 6px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.site-header.scrolled .brand { color: var(--slate-900); }

.main-menu { display: none; gap: 2rem; align-items: center; }
.main-menu a { color: var(--slate-100); font-weight: 500; font-size: 0.95rem; }
.main-menu a:hover { color: var(--primary); }
.site-header.scrolled .main-menu a { color: var(--slate-600); }
.site-header.scrolled .main-menu a:hover { color: var(--primary); }
.site-header.scrolled .main-menu .btn-primary { padding: 0.6rem 1.25rem; font-size: 0.9rem; }

.mobile-toggle { display: block; background: none; border: none; color: var(--white); font-size: 1.5rem; cursor: pointer; padding: 0.5rem; }
.site-header.scrolled .mobile-toggle { color: var(--slate-900); }

@media (min-width: 992px) {
    .main-menu { display: flex; }
    .mobile-toggle { display: none; }
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 60px; /* Offset for header */
    left: 0;
    width: 100%;
    background: var(--white);
    padding: 1rem;
    border-bottom: 1px solid var(--slate-200);
    box-shadow: var(--shadow-md);
    z-index: 49;
}
.mobile-menu-overlay.active { display: block; }
.mobile-menu-overlay a { display: block; padding: 0.75rem 1rem; color: var(--slate-800); font-weight: 500; border-radius: 0.5rem; }
.mobile-menu-overlay a:hover { background: var(--slate-50); color: var(--primary); }

/* Hero */
.hero {
    position: relative;
    min-height: 100vh;
    /* Ensure height doesn't break on mobile */
    height: auto;
    padding-top: 8rem; /* Spacing for fixed header */
    padding-bottom: 4rem;
    display: flex;
    align-items: center;
    color: var(--white);
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax effect */
}
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.7) 50%, rgba(15, 23, 42, 0.4) 100%); z-index: 1; }
.hero-content { position: relative; z-index: 10; max-width: 48rem; }
.hero-title { font-size: 3.5rem; line-height: 1.1; font-weight: 800; margin-bottom: 1.5rem; letter-spacing: -0.025em; color: var(--white); }
.hero-title span { color: var(--primary); }
.hero-text { font-size: 1.25rem; color: var(--slate-200); margin-bottom: 2.5rem; max-width: 40rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }

@media (max-width: 768px) {
    .hero { min-height: auto; padding-top: 7rem; padding-bottom: 3rem; }
    .hero-title { font-size: 2.5rem; }
    .hero-text { font-size: 1.125rem; }
    .hero-actions .btn { width: 100%; }
}

/* Impact Stats */
.impact-stats { padding: 3rem 0; background: var(--white); position: relative; z-index: 20; margin-top: -2rem; }
.stats-container { background: var(--white); border-radius: 1.5rem; box-shadow: var(--shadow-lg); padding: 2rem; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
@media (min-width: 1024px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }

.stat-card { text-align: center; padding: 1.5rem; border-radius: 1rem; transition: all 0.3s; border: 1px solid transparent; }
.stat-card:hover { background: var(--slate-50); border-color: var(--slate-200); transform: translateY(-5px); }
.stat-icon { width: 3.5rem; height: 3.5rem; background: var(--primary-light); color: var(--primary); border-radius: 1rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; }
.stat-value { font-size: 2.5rem; font-weight: 800; color: var(--slate-900); line-height: 1; margin-bottom: 0.5rem; }
.stat-label { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; color: var(--slate-500); }
@media (max-width: 640px) {
     .stats-grid { gap: 1rem; }
     .stat-card { padding: 1rem; }
     .stat-value { font-size: 1.75rem; }
}

/* About */
.about-section { padding: var(--section-spacing) 0; overflow: hidden; }
.about-grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 1024px) {
    .about-grid { grid-template-columns: 1fr 1fr; gap: 5rem; }
}
.about-img-wrapper { position: relative; }
.about-img { border-radius: 1.5rem; box-shadow: var(--shadow-lg); position: relative; z-index: 2; width: 100%; object-fit: cover; aspect-ratio: 4/3; }
.about-img-bg { position: absolute; bottom: -2rem; right: -2rem; width: 60%; height: 60%; background: var(--primary-light); border-radius: 1.5rem; z-index: 1; opacity: 0.5; }
.about-content { padding-right: 1rem; }
.about-content p { margin-bottom: 1.5rem; font-size: 1.125rem; color: var(--slate-600); }

/* Pillars */
.pillars-section { padding: var(--section-spacing) 0; background: var(--slate-50); }
.pillars-grid { display: grid; gap: 2rem; }
@media (min-width: 768px) { .pillars-grid { grid-template-columns: 1fr 1fr; gap: 3rem; } }
.pillar-card { background: var(--white); border-radius: 1.5rem; padding: 2.5rem; box-shadow: var(--shadow-md); border: 1px solid var(--slate-200); display: flex; flex-direction: column; transition: all 0.3s; }
.pillar-card:hover { box-shadow: var(--shadow-lg); border-color: var(--primary-light); transform: translateY(-5px); }
.pillar-icon { width: 4.5rem; height: 4.5rem; border-radius: 1rem; display: flex; align-items: center; justify-content: center; color: white; margin-bottom: 1.5rem; }
.pillar-card h3 { font-size: 1.75rem; font-weight: 800; margin-bottom: 1rem; color: var(--slate-900); }
.pillar-list { margin-bottom: 2rem; flex-grow: 1; }
.pillar-list li { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 1rem; font-weight: 500; }
.pillar-list svg { color: #22c55e; width: 1.25rem; height: 1.25rem; margin-top: 0.25rem; flex-shrink: 0; }
.pillar-image { margin-top: auto; border-radius: 1rem; height: 14rem; object-fit: cover; width: 100%; }

/* Gallery */
.gallery-section { padding: var(--section-spacing) 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(1, 1fr); gap: 1.5rem; }
@media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
.gallery-item { position: relative; border-radius: 1.25rem; overflow: hidden; aspect-ratio: 4/3; cursor: pointer; box-shadow: var(--shadow-md); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(15,23,42,0.85) 0%, transparent 60%); opacity: 0; transition: all 0.3s ease; display: flex; align-items: flex-end; padding: 1.5rem; }
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-title { color: white; font-weight: 700; font-size: 1.125rem; transform: translateY(10px); transition: all 0.3s ease; }
.gallery-item:hover .gallery-title { transform: translateY(0); }

/* CTA Section */
.section-cta { padding: var(--section-spacing) 0; text-align: center; }
.section-cta h2 { font-size: 2.5rem; }
@media (max-width: 768px) { .section-cta h2 { font-size: 2rem; } }

/* Footer */
.site-footer { background: var(--slate-900); color: var(--slate-300); padding: 4rem 0 2rem; }
.footer-grid { display: grid; gap: 3rem; margin-bottom: 3rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1.5fr; } }
.footer-heading { color: var(--white); font-weight: 700; text-transform: uppercase; margin-bottom: 1.25rem; letter-spacing: 0.05em; font-size: 0.9rem; }
.footer-links a { display: block; margin-bottom: 0.75rem; transition: all 0.3s; }
.footer-links a:hover { color: var(--primary); padding-left: 5px; }
.footer-contact { display: grid; gap: 1rem; }
.contact-item { display: flex; gap: 1rem; align-items: flex-start; }
.contact-item span { font-size: 1.25rem; }
.footer-bottom { border-top: 1px solid var(--slate-800); padding-top: 2rem; display: flex; flex-direction: column; justify-content: space-between; gap: 1rem; font-size: 0.875rem; color: var(--slate-500); }
@media (min-width: 768px) { .footer-bottom { flex-direction: row; } }
.footer-bottom-links { display: flex; gap: 1.5rem; }
.footer-bottom-links a:hover { color: var(--primary); }

/* Modal */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(5px);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-backdrop.open { display: flex; }
.modal-content {
    background: var(--white);
    width: 100%;
    max-width: 30rem;
    border-radius: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: modalPop 0.3s ease-out;
}
@keyframes modalPop {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close { position: absolute; top: 1rem; right: 1rem; background: var(--slate-100); border: none; font-size: 1.5rem; height: 2.5rem; width: 2.5rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--slate-500); transition: all 0.2s; }
.modal-close:hover { background: var(--slate-200); color: var(--slate-900); }
.modal-body { padding: 2.5rem 2rem; }
.amount-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.amount-btn { padding: 0.75rem; border: 2px solid var(--slate-200); border-radius: 0.75rem; background: var(--white); font-weight: 700; cursor: pointer; transition: all 0.2s; font-size: 1.1rem; color: var(--slate-700); }
.amount-btn:hover { border-color: var(--primary-light); background: var(--primary-light); color: var(--primary); }
.amount-btn.selected { border-color: var(--primary); background: var(--primary); color: white; box-shadow: var(--shadow-md); }
.custom-amount { width: 100%; padding: 1rem; border: 2px solid var(--slate-200); border-radius: 0.75rem; font-size: 1.125rem; font-weight: 700; margin-bottom: 1.5rem; transition: all 0.3s; }
.custom-amount:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.secure-note { background: var(--slate-50); padding: 0.75rem 1rem; border-radius: 0.75rem; display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem; font-size: 0.875rem; color: var(--slate-600); border: 1px solid var(--slate-200); }

.hidden { display: none !important; }