/* Main CSS for CHAD Foundation Website */
/* Updated with correct paths */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a5276;
    --secondary-color: #229954;
    --accent-color: #f39c12;
    --light-color: #f8f9fa;
    --dark-color: #2c3e50;
    --gray-color: #7f8c8d;
    --text-color: #333;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.7;
    color: #444;
    background-color: #fff;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5 {
    font-family: 'Merriweather', serif;
    font-weight: 700;
}

h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 2rem;
}

h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

.section-title h2:after {
    left: 50%;
    transform: translateX(-50%);
}

p {
    margin-bottom: 1.2rem;
    line-height: 1.8;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

/* Button Styles */
.btn {
    display: inline-block;
    background: linear-gradient(to right, var(--primary-color), #2980b9);
    color: white;
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(26, 82, 118, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, var(--secondary-color), #27ae60);
    transition: all 0.4s ease;
    z-index: -1;
}

.btn:hover:before {
    left: 0;
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(26, 82, 118, 0.4);
}

.btn-secondary {
    background: linear-gradient(to right, var(--secondary-color), #27ae60);
}

.btn-secondary:before {
    background: linear-gradient(to right, var(--primary-color), #2980b9);
}

.btn-small {
    padding: 10px 25px;
    font-size: 0.9rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(26, 82, 118, 0.85), rgba(34, 153, 84, 0.8)), url('../assets/images/chad (1).jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 150px 0 100px;
    text-align: center;
    margin-top: 60px;
}

.hero h1 {
    color: white;
    font-size: 3.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    margin-bottom: 2rem;
}

.hero p {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto 3rem;
    color: rgba(255, 255, 255, 0.95);
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Section Styles */
.section {
    padding: 100px 0;
}

.section-light {
    background-color: #f9f9f9;
}

.section-dark {
    background-color: #fff;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.4s ease;
    height: 100%;
    border: 1px solid #eee;
}

.card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.card-img {
    height: 250px;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.card:hover .card-img img {
    transform: scale(1.1);
}

.card-content {
    padding: 30px;
}

.program-card .card-content {
    text-align: center;
}

.program-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: inline-block;
    background: #f8f9fa;
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
}

/* Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    padding: 0 15px;
    margin-bottom: 30px;
}

.col-3 {
    flex: 0 0 25%;
    max-width: 25%;
}

.col-4 {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
}

.col-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

/* Statistics Section */
.statistics {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2980b9 100%);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.statistics:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    background-position: bottom;
}

.stat-item {
    text-align: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.stat-number {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--accent-color);
    text-shadow: 0 2px 5px rgba(0,0,0,0.2);
    line-height: 1;
}

.stat-label {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

/* About Image */
.about-image {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    height: 100%;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Vision & Mission Cards */
.vision-card, .mission-card {
    height: 100%;
    text-align: center;
    padding: 20px;
}

.vision-icon, .mission-icon {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    display: inline-block;
}

.vision-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-style: italic;
}

/* Call to Action */
.cta-section {
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url('../assets/images/chad (9).jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
    text-align: center;
}

.cta-content h2 {
    color: white;
    font-size: 3rem;
    margin-bottom: 20px;
}

.cta-content h2:after {
    background: var(--accent-color);
    left: 50%;
    transform: translateX(-50%);
}

.cta-content p {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto 40px;
    color: rgba(255, 255, 255, 0.9);
}

.cta-buttons {
    display: flex;
    gap: 25px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-cta {
    background: linear-gradient(to right, var(--accent-color), #e67e22);
    font-size: 1.1rem;
    padding: 18px 45px;
}

.btn-cta:before {
    background: linear-gradient(to right, var(--secondary-color), #27ae60);
}

.btn-cta-secondary {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn-cta-secondary:before {
    background: white;
}

.btn-cta-secondary:hover {
    color: var(--primary-color);
}

/* Footer Base */
.footer-base {
    background-color: var(--dark-color);
    color: rgba(255, 255, 255, 0.7);
    padding: 25px 0;
    text-align: center;
    font-size: 0.9rem;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mt-4 { margin-top: 4rem; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.mb-4 { margin-bottom: 4rem; }

.py-1 { padding-top: 1rem; padding-bottom: 1rem; }
.py-2 { padding-top: 2rem; padding-bottom: 2rem; }
.py-3 { padding-top: 3rem; padding-bottom: 3rem; }

.px-1 { padding-left: 1rem; padding-right: 1rem; }
.px-2 { padding-left: 2rem; padding-right: 2rem; }

/* Mobile Menu Overlay Background */
@media (max-width: 768px) {
    /* Add overlay when menu is open */
    .nav-menu.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: -1;
    }
    
    /* Ensure body doesn't scroll when menu is open */
    body.menu-open {
        overflow: hidden !important;
        position: fixed;
        width: 100%;
        height: 100%;
    }
    
    /* Fix for iOS Safari */
    @supports (-webkit-touch-callout: none) {
        body.menu-open {
            position: relative;
        }
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed !important;
        top: 70px !important;
        z-index: 9999 !important;
    }
    
    .main-nav {
        position: relative;
        z-index: 1000;
    }
}

/* Mobile Menu Fix */
@media (max-width: 768px) {
    /* Mobile toggle button */
    .mobile-toggle {
        display: block !important;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: #2c3e50;
        cursor: pointer;
        padding: 5px;
        z-index: 1002;
        position: relative;
    }
    
    /* Mobile menu container */
    .nav-menu {
        display: none !important; /* Hidden by default on mobile */
        position: fixed !important;
        top: 70px !important;
        left: 0 !important;
        right: 0 !important;
        background: white !important;
        flex-direction: column !important;
        padding: 20px !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
        gap: 5px !important;
        max-height: calc(100vh - 70px) !important;
        overflow-y: auto !important;
        z-index: 9999 !important;
        margin: 0 !important;
        list-style: none !important;
    }
    
    /* When menu is active */
    .nav-menu.active {
        display: flex !important;
    }
    
    /* Menu items */
    .nav-menu > li {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Links */
    .nav-link, .dropdown-toggle {
        width: 100% !important;
        text-align: left !important;
        padding: 12px 15px !important;
        border-radius: 0 !important;
        border-bottom: 1px solid #eee !important;
        display: block !important;
        text-decoration: none !important;
        color: #2c3e50 !important;
        font-weight: 600 !important;
    }
    
    /* Dropdown menus */
    .dropdown-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        background: #f8f9fa !important;
        margin-left: 20px !important;
        padding: 0 !important;
        max-height: 0 !important;
        overflow: hidden !important;
        transition: max-height 0.3s ease !important;
        display: block !important;
    }
    
    .dropdown-menu.active {
        max-height: 500px !important;
    }
    
    /* Dropdown toggle indicator */
    .has-dropdown > .dropdown-toggle::after {
        content: '▼' !important;
        font-size: 0.8em !important;
        margin-left: 5px !important;
        transition: transform 0.3s ease !important;
        float: right !important;
    }
    
    .has-dropdown > .dropdown-toggle.active::after {
        transform: rotate(180deg) !important;
    }
    
    /* Donate button */
    .nav-donate {
        width: 100% !important;
        text-align: center !important;
        margin-top: 15px !important;
        border-radius: 5px !important;
    }
    
    /* Prevent body scrolling when menu is open */
    body.menu-open {
        overflow: hidden !important;
    }
}