/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Variables */
:root {
    --primary-color: #007934; /* Deep Green */
    --secondary-color: #005f28; /* Darker Green */
    --accent-color: #f1c40f; /* Gold */
    --accent-dark: #f39c12; /* Darker Gold */
    --bg-light: #f9f9f9;
    --bg-alt: #e8f5e9; /* Mint Green Tint */
    --text-color: #333;
    --footer-bg: #27ae60; /* Brighter Emerald Green */
}

/* Typography Helpers */
.text-center { text-align: center; }
.section-padding { padding: 80px 0; }
.bg-light { background-color: var(--bg-light); }
.bg-alt { background-color: var(--bg-alt); }

/* Top Bar */
.top-bar {
    background: var(--secondary-color);
    color: #fff;
    padding: 10px 0;
    font-size: 0.9rem;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info span {
    margin-right: 20px;
}

.contact-info i {
    margin-right: 5px;
    color: var(--accent-color);
}

.social-links-top a {
    color: #fff;
    margin-left: 15px;
    transition: color 0.3s;
}

.social-links-top a:hover {
    color: var(--accent-color);
}

/* Header */
header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 75px; /* header logo */
    margin-right: 15px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.brand-sub {
    font-size: 0.9rem;
    color: #666;
    letter-spacing: 1px;
}

nav ul {
    display: flex;
    align-items: center;
    gap: 30px;
}

nav a {
    color: var(--text-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap; /* Prevents wrapping causing misalignment */
}

nav a:hover, nav a.active-link {
    color: var(--primary-color);
}

.btn-nav {
    background: var(--accent-color);
    color: #000 !important; /* Contrast on Gold */
    padding: 10px 25px;
    border-radius: 50px; /* Pill shape */
    font-weight: 700 !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: inline-flex;
    align-items: center;
    gap: 8px; /* Spacing for icon */
    transition: all 0.3s ease;
}

.btn-nav:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(241, 196, 15, 0.3);
}

.mobile-menu-icon {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section with Slider */
.hero {
    height: 85vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.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); /* Darker overlay for better contrast */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 20px;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    line-height: 1.2;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 40px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn-primary {
    display: inline-block;
    background: var(--accent-color);
    color: #000;
    padding: 18px 45px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(241, 196, 15, 0.4);
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(241, 196, 15, 0.6);
}

.btn-outline {
    display: inline-block;
    border: 2px solid #fff;
    color: #fff;
    padding: 16px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.btn-outline:hover {
    background: #fff;
    color: var(--primary-color);
}

/* Page Header (For Gallery) */
.page-header {
    background: linear-gradient(rgba(0, 121, 52, 0.8), rgba(0, 121, 52, 0.8)), url('Pictures/IMG_1189.JPG') center/cover;
    color: #fff;
    text-align: center;
    padding: 100px 20px;
}

.page-header-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.page-header-content p {
    font-size: 1.3rem;
}

/* Section Titles */
.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.8rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.title-underline {
    width: 100px;
    height: 5px;
    background: var(--accent-color);
    margin: 0 auto;
    border-radius: 2px;
}

/* About Section */
.about-text-full {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.lead-text {
    font-size: 1.25rem;
    color: #555;
    margin-bottom: 20px;
}

/* Programs Section (Z-Pattern) */
.program-row {
    display: flex;
    align-items: center;
    gap: 60px;
    margin-bottom: 80px;
}

.program-row:last-child {
    margin-bottom: 0;
}

.program-row.reverse {
    flex-direction: row-reverse;
}

.program-image {
    flex: 1;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.program-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.program-image:hover img {
    transform: scale(1.05);
}

.program-text {
    flex: 1;
}

.icon-box {
    width: 70px;
    height: 70px;
    background: #fff;
    color: var(--primary-color);
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.program-text h3 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

.program-text p {
    color: #666;
    margin-bottom: 25px;
    font-size: 1.1rem;
}

.btn-text {
    color: var(--primary-color);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}

.btn-text:hover {
    color: var(--accent-dark);
    gap: 15px;
}

/* border and infographic place thing */
.infographic-container {
    max-width: 520px;
    margin: 0 auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    border-radius: 15px;
    overflow: hidden;
    border: 5px solid var(--primary-color);
    position: relative;
    display: flex;
    justify-content: center;
    background: #fff;
}

.infographic-container img {
    margin: 0 auto;
    display: block;
}

.infographic-container::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 2px solid var(--accent-color);
    border-radius: 10px;
    pointer-events: none;
    z-index: 10;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 300px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: #fff;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.4s ease-out;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h4 {
    font-size: 1.4rem;
    margin-bottom: 5px;
    color: var(--accent-color);
}

.gallery-overlay p {
    font-size: 0.95rem;
    color: #eee;
}

/* Donation Section (Split Layout) */
.donation-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: stretch; /* Ensure same height */
}

.donation-visual {
    height: 100%;
    min-height: 500px;
}

.donation-slider-container {
    height: 100%;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.donation-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2s ease-in-out; /* Slower transition */
}

.donation-slide.active {
    opacity: 1;
}

.donation-overlay {
    position: absolute;
    bottom: 30px; /* Floating from bottom */
    left: 30px; /* Floating from left */
    right: 30px; /* Floating from right */
    width: auto;
    height: auto;
    background: transparent; /* Removed full gradient */
    display: flex;
    align-items: flex-end;
    padding: 0;
    z-index: 2;
    pointer-events: none; /* Let clicks pass through if needed */
}

.donation-text-content {
    background: rgba(84, 84, 84, 0.25); /* light glass */
    backdrop-filter: blur(10px); /* this is the blur behind the donation thing */
    padding: 15px 20px;
    border-radius: 10px;
    border-left: 4px solid var(--accent-color);
    color: #fff;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    pointer-events: auto;
}

.impact-amount {
    display: block;
    font-size: 2rem; /* the donation text */
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin-bottom: 5px;
}

.impact-desc {
    font-size: 1rem; /* Smaller text */
    font-weight: 500;
    line-height: 1.3;
    color: #f0f0f0;
    margin: 0;
}

.donation-form-container {
    height: 100%;
}

.donation-box {
    background: #fff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    text-align: center;
    border-top: 5px solid var(--accent-color);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.donation-box h3 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.donation-amounts {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 30px 0;
}

.amount-btn {
    padding: 15px 25px;
    border: 2px solid #eee;
    background: #f8f8f8;
    color: #555;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1 1 80px;
}

.amount-btn.active {
    background: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
    box-shadow: 0 5px 15px rgba(241, 196, 15, 0.3);
}

.amount-btn.active, .amount-btn:hover {
    background: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
    box-shadow: 0 5px 15px rgba(241, 196, 15, 0.3);
}

.amount-btn:hover:not(.active) {
    border-color: var(--accent-color);
    color: var(--accent-dark);
}

.donation-frequency {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.qr-code-container {
    text-align: center;
    margin: 25px 0;
    animation: fadeIn 0.5s ease;
}

.qr-code-container img {
    width: 130px;
    height: 130px;
    margin: 0 auto;
    display: block;
    border: 4px solid #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 12px;
}

.qr-code-container p {
    font-size: 0.9rem;
    color: #666;
    margin-top: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Custom Radio Button Styling */
.radio-container {
    display: block;
    position: relative;
    padding-left: 35px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 1.1rem;
    user-select: none;
}

.radio-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 25px;
    width: 25px;
    background-color: #eee;
    border-radius: 50%;
}

.radio-container:hover input ~ .checkmark {
    background-color: #ccc;
}

.radio-container input:checked ~ .checkmark {
    background-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.radio-container input:checked ~ .checkmark:after {
    display: block;
}

.radio-container .checkmark:after {
    top: 9px;
    left: 9px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

.btn-donate-submit {
    width: 100%;
    padding: 20px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-donate-submit:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 121, 52, 0.3);
}

.payment-methods {
    margin-top: 20px;
    color: #ccc;
    font-size: 2rem;
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Footer */
footer {
    background: var(--footer-bg);
    color: #fff;
    padding: 80px 0 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 50px;
    margin-bottom: 50px;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-logo img {
    height: 60px;
    margin-bottom: 10px;
}

.footer-logo h3 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    color: #fff;
    font-weight: 700;
}

.footer-registration {
    margin: 15px 0 20px;
}

.footer-registration p {
    font-size: 0.9rem;
    margin-bottom: 8px;
    opacity: 0.9;
}

.cc-logo {
    background: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    height: 50px;
    width: auto;
    display: inline-block;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.footer-links a {
    display: block;
    color: #fff; /* White links for better visibility on bright green */
    margin-bottom: 12px;
    font-weight: 600;
    background: rgba(0,0,0,0.1);
    padding: 10px;
    border-radius: 5px;
    transition: background 0.3s;
}

.footer-links a:hover {
    background: rgba(0,0,0,0.2);
}

.footer-nav ul li {
    margin-bottom: 12px;
}

.footer-nav a {
    color: #f0f0f0;
    transition: transform 0.3s, color 0.3s;
    display: inline-block;
}

.footer-nav a:hover {
    color: #fff;
    transform: translateX(8px);
    text-decoration: underline;
}

.footer-contact h4, .footer-nav h4 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    border-bottom: 2px solid rgba(255,255,255,0.3);
    padding-bottom: 10px;
    display: inline-block;
}

.social-icons a {
    background: #fff;
    color: var(--footer-bg);
    width: 40px;
    height: 40px;
}

.social-icons a:hover {
    background: var(--accent-color);
    color: #000;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 30px;
    font-size: 1rem;
    color: #f0f0f0;
    text-align: center;
}

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Fixes */
@media (max-width: 1024px) {
    .donation-grid {
        grid-template-columns: 1fr;
    }

    .donation-card-visual {
        min-height: 300px;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
}

/* Landscape Mode Fixes */
@media (max-width: 900px) and (orientation: landscape) {
    .header-container {
        padding: 5px 20px;
    }
    
    .logo img {
        height: 45px;
    }
    
    .mobile-menu-icon {
        font-size: 1.3rem;
    }
    
    /* Ensure modal fits */
    nav {
        max-height: 70vh;
    }
}

/* TABLET & MOBILE BREAKPOINT - Increased to 1024px to prevent overlapping on tablets/landscape phones */
@media (max-width: 1024px) {
    .top-bar {
        display: none; /* Simplify for mobile */
    }

    .header-container {
        padding: 15px;
    }

    .mobile-menu-icon {
        display: block;
    }

    /* Mobile Navigation Container */
    nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        padding: 0;
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        display: none; /* Hidden by default */
        text-align: left; /* Changed from center for better list alignment */
        border-top: 1px solid rgba(0,0,0,0.05);
        max-height: 80vh;
        overflow-y: auto; /* Enable scroll for landscape/small screens */
    }

    nav.active {
        display: block;
        animation: slideDown 0.3s ease-out forwards;
    }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    nav ul {
        flex-direction: column;
        gap: 0; /* Remove gap, use padding on items instead */
        padding: 10px 0;
    }

    nav li {
        width: 100%;
        border-bottom: 1px solid rgba(0,0,0,0.03);
    }

    nav li:last-child {
        border-bottom: none;
    }

    nav a {
        display: block;
        padding: 15px 25px;
        font-size: 1rem;
        color: var(--text-color);
        transition: background 0.2s, color 0.2s;
    }

    nav a:hover, nav a.active-link {
        background-color: var(--bg-alt);
        color: var(--primary-color);
    }

    /* Mobile Dropdown Styling */
    .dropdown {
        width: 100%;
    }

    /* Mobile Dropdown Button */
    .dropbtn {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Mobile Dropdown Content (Accordion Style) */
    .dropdown-content {
        position: static; /* Stack naturally */
        box-shadow: none;
        display: none; /* Hidden by default */
        background: #f9f9f9; /* Slightly darker bg for nested items */
        width: 100%;
        transform: none;
        border: none;
        padding: 0;
        margin: 0;
        border-radius: 0;
        min-width: 0; /* Reset width constraints */
    }

    .dropdown.clicked .dropdown-content {
        display: block;
        animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    .dropdown-item {
        padding: 12px 30px !important; /* Indent nested items */
        border-bottom: 1px solid rgba(0,0,0,0.03);
        background: transparent;
    }
    
    .dropdown-item:last-child {
        border-bottom: none;
    }

    /* Donate Button in Mobile Menu */
    .btn-nav {
        background: transparent;
        color: var(--text-color) !important;
        box-shadow: none;
        padding: 15px 25px;
        border-radius: 0;
        font-weight: 600 !important;
        text-align: left;
    }

    .btn-nav:hover {
        background-color: var(--bg-alt);
        transform: none;
        color: var(--primary-color) !important;
    }

    /* Override any specific desktop dropdown styles for mobile */
    .donate-dropdown {
        position: static !important;
        top: auto !important;
        right: auto !important;
        left: auto !important;
        transform: none !important;
        margin-top: 0 !important;
        width: 100% !important;
    }

    .donate-dropdown::before {
        display: none;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    /* Previously this had more mobile styles but the new ones below handle the project rows */

    .icon-box {
        margin: 0 auto 20px;
    }

    .btn-text {
        justify-content: center;
    }
    
    .logo img {
        height: 50px;
    }
    
    .brand-name {
        font-size: 1.1rem;
    }
}

/* ========================================= */
/* NEW STYLES for Projects (Water Wells, Orphanage) */
/* ========================================= */

/* Dropdown Menu - Enhanced */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 280px; /* Wider for new content */
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 1000;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 12px;
    padding: 10px;
    border: 1px solid rgba(0,0,0,0.05);
    /* Subtle background gradient */
    background: #fff;
}

.dropdown-item {
    display: flex !important; /* Override generic a block */
    align-items: center;
    gap: 15px;
    padding: 12px 15px !important;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    color: var(--text-color);
    text-transform: none !important;
}

.dropdown-item i {
    font-size: 1.4rem;
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    background: var(--bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.dropdown-item div {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.item-title {
    font-weight: 700;
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.item-desc {
    font-size: 0.8rem;
    color: #888;
    margin-top: 3px;
    font-weight: 400;
    line-height: 1.4;
}

.dropdown-item:hover {
    background-color: var(--bg-alt);
    transform: translateX(5px);
}

.dropdown-item:hover i {
    background-color: var(--primary-color);
    color: #fff;
}

.dropdown-item:hover .item-title {
    color: var(--primary-color);
}

/* Arrow rotation */
.dropbtn i {
    font-size: 0.8em;
    margin-left: 5px;
    transition: transform 0.3s;
}

.dropdown:hover .dropbtn i {
    transform: rotate(180deg);
}

/* Show dropdown on hover for desktop */
@media (min-width: 1025px) {
    .dropdown:hover .dropdown-content {
        display: block;
        animation: slideUp 0.3s ease forwards;
    }
    
    /* Specific animation for right-aligned donate dropdown */
    .dropdown:hover .donate-dropdown {
        animation: slideUpRight 0.3s ease forwards;
    }
}

@keyframes slideUp {
    from { opacity: 0; transform: translate(-50%, 15px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes slideUpRight {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Video Header */
.video-header {
    position: relative;
    overflow: hidden;
    height: 70vh; /* Adjust height */
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.header-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 0;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5); /* Dark overlay */
    z-index: 1;
}

.video-header .page-header-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    max-width: 900px;
}

.video-header h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    line-height: 1.2;
}

.video-header p {
    font-size: 1.5rem;
    text-shadow: 0 1px 5px rgba(0,0,0,0.5);
}

/* Water Wells Header Specifics */
.waterwells-header {
    background: linear-gradient(rgba(0, 121, 52, 0.75), rgba(0, 121, 52, 0.75)), url('Pictures/WhatsApp Image 2025-03-05 at 22.16.45_09a4e2bf.jpg') center/cover;
}

/* Project Details */
.project-row {
    display: flex;
    align-items: center;
    gap: 60px;
    margin-bottom: 80px;
}

.project-row:last-child {
    margin-bottom: 0;
}

.project-row.reverse {
    flex-direction: row-reverse;
}

.project-text {
    flex: 1;
}

.project-text h2 {
    font-size: 2.5rem;
    margin-bottom: 25px;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

.project-text h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    margin-top: 10px;
    border-radius: 2px;
}

.project-text p {
    font-size: 1.15rem;
    margin-bottom: 20px;
    color: #555;
    line-height: 1.8;
}

.project-image {
    flex: 1;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    height: 400px;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-image:hover img {
    transform: scale(1.05);
}

/* Donation Card Simple */
.donation-card-simple {
    background: #fff;
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    max-width: 550px;
    margin: 40px auto 0;
    border-top: 6px solid var(--accent-color);
    position: relative;
    z-index: 10;
}

.donation-card-simple h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.donation-card-simple .price {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 20px 0;
    line-height: 1;
}

.donation-card-simple p {
    margin-bottom: 35px;
    font-size: 1.2rem;
    color: #666;
}

.cta-desc {
    font-size: 1.4rem;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #444;
}

/* Water Wells Contact Box */
.contact-box-well {
    background: var(--bg-alt);
    padding: 25px;
    border-radius: 12px;
    margin-top: 30px;
    border-left: 5px solid var(--accent-color);
}

.contact-box-well h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.contact-box-well p {
    margin-bottom: 10px;
    font-size: 1rem;
    color: #444;
}

.contact-box-well a {
    color: var(--primary-color);
    font-weight: 600;
}

.contact-box-well a:hover {
    text-decoration: underline;
}

.contact-box-well i {
    width: 25px;
    color: var(--accent-dark);
}

/* Responsive Fixes */
@media (max-width: 900px) {
    .project-row, .program-row {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }
    
    .project-row.reverse, .program-row.reverse {
        flex-direction: column;
    }

    .program-image {
        width: 100%;
        max-width: 500px; /* Prevent overly large images on tablets */
        margin: 0 auto;
    }

    .project-text h2::after {
        margin: 10px auto 0; /* Center underline on mobile */
    }
    
    .video-header {
        height: 50vh;
    }

    .video-header h1 {
        font-size: 2.8rem;
    }

    .project-image {
        height: 300px;
        width: 100%;
    }
}

@media (max-width: 1024px) {
    .dropdown-content {
        position: static !important;
        box-shadow: none !important;
        display: none; /* Hidden by default */
        background: #f9f9f9;
        text-align: left;
        width: 100% !important;
        transform: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0;
        min-width: 0 !important;
        border-radius: 0 !important;
    }
    
    /* Ensure desktop hover effects don't interfere */
    .dropdown:hover .dropdown-content {
        display: none; 
        animation: none;
    }
    
    .dropdown.clicked .dropdown-content {
        display: block;
        animation: fadeIn 0.3s ease;
    }
}

/* ========================================= */
/* Zakat Calculator Styles */
/* ========================================= */

.zakat-header {
    background: linear-gradient(rgba(0, 121, 52, 0.85), rgba(0, 121, 52, 0.85)), url('Pictures/IMG_1189.JPG') center/cover;
}

.calculator-container {
    background: #fff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    border-top: 5px solid var(--accent-color);
}

.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 40px;
}

.calc-column h3 {
    color: var(--primary-color);
    margin-bottom: 25px;
    font-size: 1.5rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.calc-column h3 i {
    margin-right: 10px;
}

.form-group {
    margin-bottom: 30px; /* Increased spacing */
}

.form-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: #333;
    font-size: 1.05rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.currency {
    position: absolute;
    left: 18px;
    color: #777;
    font-weight: 600;
    font-size: 1.2rem;
}

.zakat-input {
    width: 100%;
    padding: 16px 20px 16px 45px; /* Larger padding for touch targets */
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 1.2rem; /* Larger font for readability */
    transition: all 0.3s;
    background-color: #fdfdfd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.zakat-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 121, 52, 0.1);
    outline: none;
}

.nisab-box {
    background: var(--bg-alt);
    padding: 20px;
    border-radius: 10px;
    margin: 40px auto 0;
    border: 1px dashed var(--primary-color);
    max-width: 800px;
}

.nisab-box h4 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.small-text {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
}

.nisab-details {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: #555;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.detail-row:last-of-type {
    border-bottom: none;
    margin-bottom: 5px;
}

.detail-row.total-nisab {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 5px;
    padding-top: 5px;
    border-top: 2px solid #eee;
}

.update-info {
    font-size: 0.8rem;
    color: #888;
    text-align: right;
    margin-top: 10px;
    font-style: italic;
}

.update-info i {
    margin-right: 4px;
}

.calc-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.btn-calc {
    font-size: 1.2rem;
    padding: 15px 40px;
    border: none;
    cursor: pointer;
}

.btn-reset {
    background: transparent;
    color: #666;
    border: 2px solid #ccc;
    cursor: pointer;
}

.btn-reset:hover {
    border-color: #999;
    color: #333;
    background: #f5f5f5;
}

/* Results */
.zakat-result {
    margin-top: 50px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    padding: 40px;
    text-align: center;
    border: 2px solid var(--primary-color);
    animation: slideUp 0.5s ease-out;
}

.zakat-result.hidden {
    display: none;
}

.result-row {
    display: flex;
    justify-content: space-between;
    max-width: 400px;
    margin: 10px auto;
    font-size: 1.1rem;
    color: #555;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.result-row.highlight {
    font-weight: 700;
    color: var(--text-color);
    border-bottom: none;
    font-size: 1.2rem;
    margin-top: 20px;
}

.final-amount {
    margin-top: 30px;
    background: var(--bg-alt);
    padding: 30px;
    border-radius: 15px;
}

.final-amount h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.amount-display {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 25px;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.btn-pay-zakat {
    font-size: 1.3rem;
    padding: 18px 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 480px) {
    .result-row {
        flex-direction: column;
        align-items: center;
        gap: 5px;
        text-align: center;
    }
    
    .result-row span:last-child {
        font-weight: 700;
        color: var(--text-color);
        font-size: 1.2rem;
    }

    .result-row.highlight {
        margin-top: 25px;
    }

    /* Mobile fixes for Total Payable & Button */
    .final-amount {
        padding: 20px 15px;
    }

    .amount-display {
        font-size: 2rem; /* Smaller font to prevent wrapping */
        margin-bottom: 20px;
    }

    .btn-pay-zakat {
        width: 100%;
        max-width: 100%;
        padding: 15px 10px;
        font-size: 1rem;
        display: block;
        margin: 0 auto;
        white-space: normal; /* Allow text to wrap naturally if needed */
        line-height: 1.3;
    }
}

/* Tooltip Styles */
.section-intro {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.has-tooltip {
    position: relative;
    display: inline-block;
    width: 100%;
}

.has-tooltip label {
    display: inline-block;
    width: 100%;
}

.info-icon {
    color: var(--accent-dark);
    margin-left: 5px;
    cursor: help;
    font-size: 0.9em;
}

.tooltip-text {
    visibility: hidden;
    width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -125px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.85rem;
    line-height: 1.4;
    font-weight: 400;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    pointer-events: none;
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.has-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

@media (max-width: 768px) {
    .tooltip-text {
        width: 200px;
        margin-left: -100px;
        left: 50%;
    }
}

/* Donate Dropdown Specifics */
.donate-dropdown {
    left: auto !important;
    right: 0 !important;
    transform: none !important;
    top: calc(100% + 15px) !important;
    margin-top: 0 !important;
}

.donate-dropdown::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
}

/* Ensure the arrow in the button inherits color */
.btn-nav i {
    font-size: 0.8em;
    margin-left: 5px;
    transition: transform 0.3s;
}

.dropdown:hover .btn-nav i {
    transform: rotate(180deg);
}

/* ========================================= */
/* Zakat Mobile Fixes - FINAL OVERRIDES */
/* ========================================= */
@media (max-width: 1024px) {
    /* FORCE column layout with high specificity */
    .calc-grid {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: 1fr !important; /* Fallback */
        gap: 50px !important;
    }
    
    .calculator-container {
        padding: 30px 15px; 
    }

    .form-group {
        margin-bottom: 30px;
    }

    .calc-column h3 {
        margin-bottom: 35px;
        font-size: 1.6rem;
    }
    
    .nisab-box {
        margin-top: 50px;
        padding: 30px 20px;
        border-width: 2px;
    }
    
    .input-wrapper {
        margin-top: 10px;
    }
    
    .zakat-input {
        padding: 18px 20px 18px 45px;
        font-size: 1.1rem;
    }

    .detail-row {
        font-size: 1rem;
        padding-bottom: 12px;
        margin-bottom: 12px;
    }

    .calc-actions {
        flex-direction: column;
        gap: 15px;
    }

.btn-calc, .btn-reset {
        width: 100%;
        padding: 18px;
        font-size: 1.1rem;
    }
}

/* ========================================= */
/* Project Page Refinements */
/* ========================================= */

.project-details .project-text p {
    line-height: 1.9;
    margin-bottom: 25px;
}

/* Water Wells Contact Box */
.contact-box-well {
    background: var(--bg-alt);
    padding: 25px;
    border-radius: 12px;
    margin-top: 30px;
    border-left: 5px solid var(--accent-color);
}

.cta-section .donation-card-simple {
    padding: 45px 35px;
}
