/* ==============================================================
   Core Variables & Reset
   ============================================================== */
:root {
    /* Colors */
    --primary: #2ecc71;
    --primary-dark: #27ae60;
    --secondary: #3498db;
    --dark: #2c3e50;
    --light: #f8f9fa;
    --white: #ffffff;
    --gray: #95a5a6;
    --text: #333333;
    --text-light: #777777;
    --danger: #e74c3c;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    --gradient-secondary: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    
    /* Shadows */
    --shadow-sm: 0 5px 15px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.15);
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Transition */
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--light);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==============================================================
   Typography & Utilities
   ============================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--dark);
    line-height: 1.2;
    margin-bottom: 15px;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.text-center {
    text-align: center;
}

.py-5 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    outline: none;
    text-align: center;
    transition: var(--transition);
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(46, 204, 113, 0.4);
    color: var(--white);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-dark);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    color: var(--primary);
}

/* ==============================================================
   Header & Navbar
   ============================================================== */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    color: var(--dark);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
}

.main-content {
    margin-top: 80px;
    min-height: calc(100vh - 80px - 300px); /* Adjust based on header/footer */
}

/* ==============================================================
   Hero Section
   ============================================================== */
.hero {
    position: relative;
    height: 80vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    color: var(--white);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(44, 62, 80, 0.8), rgba(44, 62, 80, 0.6));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    font-weight: 300;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s backwards;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    animation: fadeInUp 1s ease 0.4s backwards;
}

/* ==============================================================
   Stats Section
   ============================================================== */
.stats-section {
    background: var(--white);
    padding: 60px 0;
    margin-top: -50px;
    position: relative;
    z-index: 10;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 30px;
}

.stat-item {
    text-align: center;
    flex: 1;
    min-width: 200px;
}

.stat-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--dark);
}

.stat-label {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 500;
}

/* ==============================================================
   Cards & Project Grids
   ============================================================== */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.project-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.project-img {
    height: 250px;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
}

.project-card:hover .project-img img {
    transform: scale(1.1);
}

.project-content {
    padding: 25px;
}

.project-content h3 {
    margin-bottom: 15px;
}

.project-content p {
    color: var(--text-light);
    margin-bottom: 20px;
}

/* ==============================================================
   Forms & Inputs
   ============================================================== */
.form-container {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--light);
}

.form-control:focus {
    border-color: var(--primary);
    background: var(--white);
    outline: none;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Donation Specific */
.amount-options {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.amount-btn {
    flex: 1;
    min-width: 80px;
    padding: 10px;
    border: 2px solid #ecf0f1;
    background: var(--white);
    border-radius: 8px;
    font-weight: 600;
    color: var(--dark);
    cursor: pointer;
    transition: var(--transition);
}

.amount-btn.active, .amount-btn:hover {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--white);
}

/* ==============================================================
   Tables (Admin)
   ============================================================== */
.table-wrapper {
    background: var(--white);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.table th {
    font-weight: 600;
    color: var(--dark);
    background: var(--light);
}

.table tr:hover {
    background: #fdfdfd;
}

.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-success { background: #e8f8f5; color: #27ae60; }
.badge-warning { background: #fef9e7; color: #f1c40f; }

/* ==============================================================
   Footer
   ============================================================== */
.footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 80px 0 20px;
    margin-top: 60px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer h3 {
    color: var(--white);
    font-family: var(--font-heading);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--white);
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-info i {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==============================================================
   Responsive — Tablet
   ============================================================== */
@media (max-width: 992px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-title {
        font-size: 3rem;
    }
    .section-title {
        font-size: 2rem;
    }
}

/* ==============================================================
   Responsive — Mobile
   ============================================================== */
@media (max-width: 768px) {
    /* ---- Navbar & Mobile Menu ---- */
    .nav-container {
        height: 65px;
        position: relative;
    }
    .logo {
        font-size: 1.4rem;
    }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(15px);
        flex-direction: column;
        padding: 15px 20px;
        gap: 0;
        box-shadow: 0 15px 30px rgba(0,0,0,0.12);
        border-top: 2px solid var(--primary);
        z-index: 999;
    }
    .nav-links.active {
        display: flex !important;
    }
    .nav-links a {
        padding: 14px 10px;
        border-bottom: 1px solid #f0f0f0;
        font-size: 1.05rem;
    }
    .nav-links a:last-child {
        border-bottom: none;
    }
    .nav-links a::after {
        display: none;
    }
    .nav-actions {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .nav-actions .btn-primary {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    .nav-actions .btn-secondary {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
        font-size: 1.4rem;
        padding: 5px;
    }

    /* ---- Main Content ---- */
    .main-content {
        margin-top: 65px;
    }

    /* ---- Hero Section ---- */
    .hero {
        height: auto;
        min-height: 450px;
        padding: 40px 0;
        background-attachment: scroll;
    }
    .hero-title {
        font-size: 2rem;
        line-height: 1.3;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }
    .hero-buttons .btn {
        text-align: center;
    }

    /* ---- Stats ---- */
    .stats-section {
        flex-direction: column;
        margin-top: -30px;
        padding: 30px 20px;
        gap: 20px;
    }
    .stat-item {
        min-width: unset;
    }
    .stat-number {
        font-size: 1.8rem;
    }

    /* ---- Section Titles ---- */
    .section-title {
        font-size: 1.7rem;
        margin-bottom: 25px;
    }

    /* ---- Grid ---- */
    .grid-3 {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* ---- Forms ---- */
    .form-container {
        padding: 25px 20px;
        margin: 0 10px;
    }

    /* ---- Donation Page ---- */
    .amount-options {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .amount-btn {
        min-width: unset;
    }

    /* ---- Footer ---- */
    .footer {
        padding: 50px 0 20px;
        margin-top: 30px;
    }
    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .footer h3 {
        font-size: 1.3rem;
    }

    /* ---- Utility ---- */
    .py-5 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    /* ---- Contact Page Grid ---- */
    .grid-3[style*="grid-template-columns: 1fr 2fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* ==============================================================
   Responsive — Small Mobile
   ============================================================== */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.6rem;
    }
    .hero-subtitle {
        font-size: 0.9rem;
    }
    .logo {
        font-size: 1.2rem;
    }
    .form-container {
        padding: 20px 15px;
        margin: 0 5px;
    }
    .amount-options {
        grid-template-columns: 1fr 1fr;
    }
    .stat-number {
        font-size: 1.5rem;
    }
}

/* ==============================================================
   Animations
   ============================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
