/* css/style.css */
:root {
    --primary-color: #DE3641; 
    --primary-gradient: linear-gradient(135deg, #DE3641, #B01E28);
    --secondary-color: #1B3252;
    --secondary-gradient: linear-gradient(135deg, #1B3252, #0A1424);
    
    /* Glassmorphism Variables */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --glass-blur: blur(12px);

    --text-color: #1A202C;
    --text-light: #4A5568;
    --bg-light: #F4F7F6; /* Slightly cooler/gray for glass contrast */
    --white: #FFFFFF;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.04);
    --shadow-md: 0 10px 25px rgba(27, 50, 82, 0.08);
    --shadow-lg: 0 20px 40px rgba(27, 50, 82, 0.12);
    --shadow-hover: 0 15px 35px rgba(222, 54, 65, 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.7;
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
}

/* Background Blobs for Glass Effect */
body::before, body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    z-index: -1;
    filter: blur(100px);
    opacity: 0.5;
    pointer-events: none;
}
body::before {
    top: -10%; left: -10%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(222,54,65,0.15) 0%, transparent 70%);
}
body::after {
    bottom: -10%; right: -10%;
    width: 800px; height: 800px;
    background: radial-gradient(circle, rgba(27,50,82,0.1) 0%, transparent 70%);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--secondary-color);
    margin-bottom: 16px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--secondary-color); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 50px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    text-align: center;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--white);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-outline {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    background: transparent;
}

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

/* Header */
.main-header {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-shadow);
    border-bottom: var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
}

@keyframes logoGradientFlow {
    0% { background-position: 0% 50%; transform: scale(1); }
    10% { transform: scale(1.05); }
    20% { transform: scale(1); }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; transform: scale(1); }
}

.logo, .footer-logo {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -1px;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    text-decoration: none;
}

.logo:hover, .footer-logo:hover {
    transform: scale(1.1) rotate(-2deg);
    filter: drop-shadow(0 5px 15px rgba(222, 54, 65, 0.4));
}

.logo:hover span, .footer-logo:hover span {
    animation-play-state: paused;
}

@keyframes waveLetter {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.logo span, .footer-logo span {
    display: inline-block;
    /* Apply gradient specifically to each letter */
    background: linear-gradient(135deg, var(--primary-color), #ff6b6b, var(--primary-color));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    
    /* Apply both animations: the wave and the gradient flow */
    animation: waveLetter 3s ease-in-out infinite, logoGradientFlow 4s ease-in-out infinite;
    animation-delay: calc(0.15s * var(--i)), 0s;
}

.nav-links {
    display: flex;
    gap: 35px;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-color);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: var(--transition);
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--secondary-color);
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    height: 70vh;
    min-height: 500px;
    background: url('../img/hero-bg.jpg') no-repeat center center/cover;
    background-color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Remove old static gradient, replaced by better overlay */
}
.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(27, 50, 82, 0.85) 0%, rgba(222, 54, 65, 0.6) 100%);
    z-index: 0;
}
.hero-content {

    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: 0 20px;
    animation: fadeInUp 1s ease;
}
.hero h1 {
    color: var(--white);
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 24px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.hero p {
    font-size: 1.25rem;
    margin-bottom: 40px;
    color: rgba(255,255,255,0.9);
    font-weight: 400;
}
.hero .hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Sections */
.section-padding {
    padding: 100px 0;
}
.bg-light { background-color: var(--bg-light); }

.section-title {
    text-align: center;
    margin-bottom: 60px;
    max-width: 700px;
    margin-inline: auto;
}
.section-title h2 {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}
.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%; transform: translateX(-50%);
    width: 60px; height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

/* Projects Cards */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 40px;
}
.project-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
}
.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}
.project-card:hover .project-img {
    transform: scale(1.1);
}
.project-img-wrapper {
    height: 220px;
    overflow: hidden;
    position: relative;
}
.project-img {
    width: 100%;
    height: 100%;
    background-color: #EEE;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.project-img-overlay {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
    pointer-events: none;
}
.project-content {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.project-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.meta-cat { color: var(--primary-color); }
.meta-loc { color: var(--text-light); }
.project-title { font-size: 1.4rem; margin-bottom: 12px; }
.project-desc { color: var(--text-light); font-size: 0.95rem; margin-bottom: 25px; flex: 1; }
.project-impact {
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}
.impact-number {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.impact-text {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
    line-height: 1.3;
}

/* Footer */
.main-footer {
    background: var(--secondary-gradient);
    color: var(--white);
    padding: 80px 0 30px;
    position: relative;
    overflow: hidden;
}
.main-footer::before {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 600px; height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(222, 54, 65, 0.1) 0%, transparent 70%);
    pointer-events: none;
}
.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
    position: relative;
    z-index: 1;
}
.footer-logo {
    color: var(--white);
    font-size: 32px;
    margin-bottom: 20px;
    font-weight: 900;
}
.footer-col p { color: rgba(255,255,255,0.7); }
.footer-col h4 {
    color: var(--white);
    margin-bottom: 25px;
    font-size: 1.2rem;
    position: relative;
    display: inline-block;
}
.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: -8px; left: 0; width: 30px; height: 2px;
    background: var(--primary-color);
}
.footer-col ul li {
    margin-bottom: 12px;
}
.footer-col ul li a {
    color: rgba(255,255,255,0.6);
    font-weight: 500;
}
.footer-col ul li a:hover {
    color: var(--white);
    padding-left: 5px;
}
.copyright-col {
    grid-column: 1 / -1;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
    position: relative;
    z-index: 1;
}

/* Forms (Donation/Contact) */
.form-container {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 50px;
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    border: var(--glass-border);
}

/* Utilities */
.text-center { text-align: center; }

/* REUSABLE RESPONSIVE GRIDS */
.values-grid, .stats-grid, .team-grid, .trust-badges-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    text-align: center;
}
.values-grid { margin-bottom: 50px; }

.history-grid, .contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.filters-grid {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}
.filters-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.donation-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.donation-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}


/* Project Progress Bar */
.project-progress {
    margin: 15px 0;
}
.progress-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}
.progress-bg {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 4px;
    transition: width 1s ease-in-out;
}

/* --- NEW HOMEPAGE STYLES --- */

/* Animations */
.animate-fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes pulse-shadow {
    0% { box-shadow: 0 0 0 0 rgba(222, 54, 65, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(222, 54, 65, 0); }
    100% { box-shadow: 0 0 0 0 rgba(222, 54, 65, 0); }
}

@keyframes pulse-shadow-white {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.btn-pulse {
    animation: pulse-shadow 2s infinite;
}
.btn-pulse:hover {
    animation: none;
}
.btn-pulse-white {
    animation: pulse-shadow-white 2s infinite;
}
.btn-pulse-white:hover {
    animation: none;
}

/* Value Cards */
.value-card {
    background: white;
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.03);
}
.value-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
    border-color: rgba(222, 54, 65, 0.1);
}
.value-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: rgba(222, 54, 65, 0.08);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    transition: var(--transition);
}
.value-card:hover .value-icon-wrapper {
    background: var(--primary-gradient);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

/* Stats Cards */
.stat-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}
.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-bottom-color: var(--primary-color);
}
.stat-icon {
    font-size: 40px;
    color: var(--primary-color);
    opacity: 0.2;
    margin-bottom: 15px;
}
.stat-card .impact-text {
    text-transform: uppercase;
    font-weight: 700;
    margin-top: 12px;
    letter-spacing: 1px;
}

/* CTA Section */
.cta-section {
    background: var(--primary-gradient);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    color: white;
    text-align: center;
}
.cta-section::before {
    content: '';
    position: absolute;
    top: -50%; left: -10%;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
}
.cta-container {
    max-width: 800px;
    position: relative;
    z-index: 1;
}
.cta-section h2 {
    color: white;
    font-size: 3rem;
    margin-bottom: 25px;
}
.cta-section p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    line-height: 1.8;
}
.cta-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}
/* -------------------------- */

/* Responsive Overrides */
@media (max-width: 992px) {
    .projects-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
    .hero h1 { font-size: 3.5rem; }
    
    .values-grid, .stats-grid, .team-grid, .trust-badges-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .history-grid, .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .btn-donate { display: none; }
    .mobile-menu-btn { display: block; }
    .footer-container { grid-template-columns: 1fr; gap: 40px; text-align: center; }
    .footer-col h4::after { left: 50%; transform: translateX(-50%); }
    .copyright-col { text-align: center; }
    
    .hero h1 { font-size: 2.5rem; }
    .hero-content p { font-size: 1.1rem; }
    
    .section-padding { padding: 60px 0; }
    .section-title h2 { font-size: 2rem; }
    
    .values-grid, .stats-grid, .team-grid, .trust-badges-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-grid {
        flex-direction: column;
        gap: 20px;
    }
    
    .donation-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }

    /* CTA Responsive Styles */
    .cta-section { padding: 60px 0; }
    .cta-section h2 { font-size: 2rem; }
    .cta-section p { font-size: 1.05rem; }
    .cta-actions { 
        flex-direction: column;
        align-items: center;
        gap: 20px; 
    }
    .cta-actions .btn {
        width: 100%;
        max-width: 320px;
    }

    /* All Projects Button Responsive */
    .all-projects-wrapper { margin-top: 30px !important; }
    .all-projects-wrapper .btn {
        width: 100%;
        max-width: 320px;
        display: inline-flex;
    }
}
