/* src/pages/HomePage.css - Redesign Version (Compact & Refined) */

/* ========================================
   VARIABLES & RESET
   ======================================== */
:root {
    --primary-green: #2A7F3E;
    --primary-green-hover: #1e5c2d;
    --primary-green-light: #E8F5EA;
    --primary-green-dark: #14532d;

    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;

    --bg-white: #ffffff;
    --bg-light: #f9fafb;
    --bg-accent: #f0fdf4;
    /* Soft green for hero */

    --shadow-sm: 0 1px 2px 0 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);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.homepage {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-primary);
    overflow-x: hidden;
    background-color: var(--bg-white);
}

/* ========================================
   HEADER
   ======================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.main-header.scrolled {
    height: 60px;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 1100px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-name {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* Desktop Navigation */
.main-nav.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-green);
}

.nav-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
}

.nav-dropdown-toggle:hover,
.nav-dropdown-toggle[aria-expanded="true"] {
    color: var(--primary-green);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 20;
    min-width: 200px;
    padding: 8px 0;
    background: #fff;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.nav-dropdown-menu a {
    display: block;
    padding: 8px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
    background: var(--bg-accent);
    color: var(--primary-green);
}

.lang-btn {
    padding: 6px 14px;
    border: 1px solid var(--primary-green);
    border-radius: 20px;
    background: transparent;
    color: var(--primary-green);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-btn:hover {
    background: var(--primary-green);
    color: white;
}

/* Mobile Navigation */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 4px;
}

.mobile-nav-overlay {
    position: fixed;
    top: 70px;
    /* Match header height */
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff !important;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.3s ease-in-out;
    pointer-events: none;
}

.mobile-nav-overlay.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.mobile-nav-link {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.mobile-nav-link:hover {
    color: var(--primary-green);
}

.mobile-lang-btn {
    font-size: 1.2rem;
    padding: 10px 24px;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    padding-top: 100px;
    padding-bottom: 60px;
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-accent);
    background-image: radial-gradient(circle at 50% 50%, #ffffff 0%, transparent 60%);
}

.hero-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Top Row: Image + Text Group */
.hero-top-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

.hero-illustration {
    flex: 0 0 auto;
}

.illustration-placeholder {
    width: 280px;
    /* Smaller fixed width */
    aspect-ratio: 4/3;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.illustration-placeholder picture {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hero-text-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 8px;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.hero .subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.verse-ref-hero {
    font-weight: 700;
    font-style: italic;
    color: var(--primary-green);
    font-size: 1rem;
    margin: 0;
}

/* Bottom Row: Verse Text + Buttons */
.hero-bottom-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 32px;
}

.verse-text-hero {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 700px;
    margin: 0;
}

.verse-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero .cta-buttons .btn {
    min-width: 170px;
    max-width: 170px;
    justify-content: center;
    padding: 12px 20px;
}

.homepage .btn {
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    border: none;
}

.homepage .btn-primary {
    background: var(--primary-green);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.homepage .btn-primary:hover {
    background: var(--primary-green-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.homepage .btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 1px solid #e5e7eb;
}

.homepage .btn-secondary:hover {
    background: var(--bg-light);
    border-color: #d1d5db;
    transform: translateY(-2px);
}

/* ========================================
   ABOUT SECTION (4 Cards)
   ======================================== */
.about {
    padding: 40px 24px;
    background: var(--bg-white);
    text-align: center;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 40px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 900px;
    margin: 0 auto;
}

.feature-card {
    background: white;
    padding: 16px 12px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f3f4f6;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 80%;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-green-light);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: var(--bg-accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 16px;
    color: var(--primary-green);
}

.feature-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.feature-short-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ========================================
   THREE PILLARS (Wave Design)
   ======================================== */
.three-pillars {
    position: relative;
    background-color: var(--primary-green);
    padding: 56px 24px;
    margin-top: 40px;
    overflow: hidden;
    /* Wave Pattern Background */
    background-image: url("data:image/svg+xml,%3Csvg width='1440' height='600' viewBox='0 0 1440 600' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 30 Q 360 130 720 30 T 1440 30' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='2'/%3E%3Cpath d='M0 60 Q 360 160 720 60 T 1440 60' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='2'/%3E%3Cpath d='M0 90 Q 360 190 720 90 T 1440 90' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='2'/%3E%3Cpath d='M0 120 Q 360 220 720 120 T 1440 120' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='2'/%3E%3Cpath d='M0 150 Q 360 250 720 150 T 1440 150' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='2'/%3E%3Cpath d='M0 180 Q 360 280 720 180 T 1440 180' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='2'/%3E%3Cpath d='M0 210 Q 360 310 720 210 T 1440 210' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='2'/%3E%3Cpath d='M0 240 Q 360 340 720 240 T 1440 240' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='2'/%3E%3Cpath d='M0 270 Q 360 370 720 270 T 1440 270' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='2'/%3E%3Cpath d='M0 300 Q 360 400 720 300 T 1440 300' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='2'/%3E%3Cpath d='M0 330 Q 360 430 720 330 T 1440 330' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='2'/%3E%3Cpath d='M0 360 Q 360 460 720 360 T 1440 360' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='2'/%3E%3Cpath d='M0 390 Q 360 490 720 390 T 1440 390' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='2'/%3E%3Cpath d='M0 420 Q 360 520 720 420 T 1440 420' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='2'/%3E%3Cpath d='M0 450 Q 360 550 720 450 T 1440 450' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='2'/%3E%3Cpath d='M0 480 Q 360 580 720 480 T 1440 480' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='2'/%3E%3Cpath d='M0 510 Q 360 610 720 510 T 1440 510' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='2'/%3E%3Cpath d='M0 540 Q 360 640 720 540 T 1440 540' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='2'/%3E%3Cpath d='M0 570 Q 360 670 720 570 T 1440 570' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='2'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

/* Wave Effects - Removed as per design update */
/* .wave-top, .wave-bottom removed */

.pillars-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.section-title.white {
    color: white;
}

.section-subtitle.white {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.15rem;
    margin-bottom: 12px;
}

.section-description.white-transparent {
    color: white;
    font-size: 1rem;
    font-weight: 500;
    max-width: 800px;
    margin: 0 auto 35px;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
}

.pillars-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.pillar-card {
    background: white;
    padding: 24px 16px;
    border-radius: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.pillar-card:hover {
    transform: translateY(-6px);
}

.pillar-icon {
    font-size: 40px;
    margin-bottom: 16px;
    display: inline-block;
}

.pillar-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.pillar-subtitle {
    font-size: 1rem;
    color: var(--primary-green);
    font-weight: 600;
    margin-bottom: 12px;
}

.pillar-description {
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.pillar-verse {
    font-size: 0.85rem;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
    color: var(--text-primary);
}

.pillar-verse-text {
    font-style: italic;
}

.pillar-verse-ref {
    font-weight: 700;
    font-style: italic;
    color: var(--primary-green);
}

.pillars-conclusion {
    color: white;
    font-size: 1rem;
    font-weight: 500;
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
}

/* ========================================
   MISSION & STATS
   ======================================== */
.mission {
    padding: 40px 24px;
    text-align: center;
    background: var(--bg-white);
}

.mission-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 40px;
}

/* ========================================
   DONATION
   ======================================== */
.donation {
    padding: 40px 24px;
    text-align: center;
    background: var(--bg-light);
}

.donation-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 24px;
}

.donation-btn {
    padding: 14px 32px;
    font-size: 1rem;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    padding: 40px 24px;
    background: white;
    text-align: center;
    border-top: 1px solid #f3f4f6;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
}

.footer-link {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--primary-green);
}

.footer-copyright {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.footer-version {
    display: inline-block;
    margin-top: 10px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1;
    white-space: nowrap;
    color: #6b7280;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pillars-container {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Center last pillar on iPad/Tablet */
    .pillars-container .pillar-card:last-child {
        grid-column: 1 / -1;
        justify-self: center;
        width: calc(50% - 12px);
    }

    /* Smaller containers for Tablet/Mobile */
    .feature-card {
        padding: 12px 10px;
    }

    .pillar-card {
        padding: 20px 14px;
    }
}

@media (max-width: 768px) {
    .main-header {
        height: 60px;
    }

    .brand-name {
        font-size: 1.2rem;
    }

    /* Mobile Nav Logic */
    .main-nav.desktop-nav {
        display: none;
        /* Hide desktop nav */
    }

    .mobile-menu-btn {
        display: block;
        /* Show hamburger */
    }

    .hero {
        padding-top: 80px;
        flex-direction: column;
        text-align: center;
    }

    .hero-top-row {
        flex-direction: column;
        gap: 24px;
    }

    .hero-text-group {
        text-align: center;
        align-items: center;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .cta-buttons {
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .pillars-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Reset pillar centering for mobile (stack vertically) */
    .pillars-container .pillar-card:last-child {
        grid-column: auto;
        width: 100%;
        justify-self: stretch;
        max-width: 100%;
    }

    /* Ensure all pillar cards fit properly on mobile */
    .pillar-card {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Ensure pillars section has proper padding on mobile */
    .three-pillars {
        padding: 42px 20px;
    }

    .pillars-content {
        max-width: 100%;
        padding: 0;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-in {
    animation: fadeInUp 0.6s ease-out forwards;
}
