/* ═══════════════════════════════════════════════════════════════════════
   VARIABLES GLOBALES Y RESET
   ═════════════════════════════════════════════════════════════════════════ */

:root {
    --primary-color: #e63946;
    --secondary-color: #f1faee;
    --accent-color: #a8dadc;
    --dark-color: #1d3557;
    --text-color: #333;
    --success-color: #06d6a0;
    --warning-color: #ffb703;
    --danger-color: #d62828;
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ═══════════════════════════════════════════════════════════════════════
   NAVBAR
   ═════════════════════════════════════════════════════════════════════════ */

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(29, 53, 87, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #fff;
    transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* ═══════════════════════════════════════════════════════════════════════
   HERO SECTION
   ═════════════════════════════════════════════════════════════════════════ */

.hero {
    margin-top: 60px;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--dark-color) 0%, #457b9d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    color: #fff;
}

.hero-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23rgba(255,255,255,0.05)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,144C960,149,1056,139,1152,128C1248,117,1344,107,1392,101.3L1440,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>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: slideUp 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--accent-color);
    animation: slideUp 0.8s ease-out 0.2s both;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
    padding: 2rem;
    animation: slideUp 0.8s ease-out 0.4s both;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--success-color);
}

.stat-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 0.5rem;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   BUTTONS
   ═════════════════════════════════════════════════════════════════════════ */

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 5px 15px rgba(230, 57, 70, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(230, 57, 70, 0.4);
}

.btn-donation {
    background: var(--success-color);
    color: var(--dark-color);
    width: 100%;
    margin-top: 1rem;
}

.btn-donation:hover {
    background: #05c194;
    transform: scale(1.02);
}

/* ═══════════════════════════════════════════════════════════════════════
   SECCIONES COMUNES
   ═════════════════════════════════════════════════════════════════════════ */

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--dark-color);
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* ═════════════════════════════════════════════════════════════════════════
   MISSION SECTION
   ═════════════════════════════════════════════════════════════════════════ */

.mission-section {
    padding: 4rem 0;
    background: #fff;
}

.mission-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.mission-text h2 {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.mission-text p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.mission-values {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.value-item {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.value-item i {
    font-size: 2rem;
    color: var(--primary-color);
}

.value-item h3 {
    color: var(--dark-color);
}

.placeholder-image {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #999;
}

/* ═════════════════════════════════════════════════════════════════════════
   DATA SECTION
   ═════════════════════════════════════════════════════════════════════════ */

.data-section {
    padding: 4rem 0;
    background: #f9f9f9;
}

.metrics-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.metric {
    background: #fff;
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.metric:hover {
    transform: translateY(-8px);
}

.metric::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
}

.metric-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.metric-label {
    color: #666;
    margin-bottom: 1rem;
}

.metric-bar {
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    overflow: hidden;
}

.metric-bar::after {
    content: '';
    display: block;
    height: 100%;
    width: var(--percent);
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    animation: fillBar 1.5s ease-out forwards;
}

@keyframes fillBar {
    from { width: 0; }
    to { width: var(--percent); }
}

.chart-title {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin: 3rem 0 2rem;
    text-align: center;
}

.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

/* ═════════════════════════════════════════════════════════════════════════
   PIE CHART
   ═════════════════════════════════════════════════════════════════════════ */

.chart-container {
    background: #fff;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.pie-chart {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: conic-gradient(
        var(--primary-color) 0deg 126deg,
        var(--success-color) 126deg 216deg,
        var(--warning-color) 216deg 288deg,
        var(--accent-color) 288deg 360deg
    );
    margin: 0 auto 2rem;
}

.chart-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.color {
    width: 20px;
    height: 20px;
    border-radius: 3px;
}

.color.education {
    background: var(--primary-color);
}

.color.health {
    background: var(--success-color);
}

.color.water {
    background: var(--warning-color);
}

.color.employment {
    background: var(--accent-color);
}

/* ═════════════════════════════════════════════════════════════════════════
   PROGRESS BARS
   ═════════════════════════════════════════════════════════════════════════ */

.progress-bars {
    background: #fff;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.progress-item {
    margin-bottom: 2rem;
}

.progress-item:last-child {
    margin-bottom: 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: #666;
    font-weight: 500;
}

.progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    animation: fillBar 1.5s ease-out forwards;
}

/* ═════════════════════════════════════════════════════════════════════════
   TESTIMONIALS SECTION
   ═════════════════════════════════════════════════════════════════════════ */

.testimonials-section {
    padding: 4rem 0;
    background: #fff;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.testimonial-text {
    padding: 1.5rem;
}

.testimonial-text h3 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.testimonial-text p {
    color: #666;
    font-size: 0.95rem;
    font-style: italic;
}

/* ═════════════════════════════════════════════════════════════════════════
   DONATE SECTION
   ═════════════════════════════════════════════════════════════════════════ */

.donate-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--dark-color) 0%, #457b9d 100%);
    color: #fff;
}

.donate-subtitle {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: var(--accent-color);
}

.donation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.donation-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
}

.donation-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.donation-card.featured {
    background: linear-gradient(135deg, var(--primary-color), var(--warning-color));
    border: none;
    transform: scale(1.05);
}

.donation-amount {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.donation-description {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.custom-donation {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.custom-donation h3 {
    margin-bottom: 1.5rem;
}

.donation-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.donation-form input {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 1rem;
}

.donation-form input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.donation-form button {
    flex: 0 0 auto;
}

/* ═════════════════════════════════════════════════════════════════════════
   FOOTER
   ═════════════════════════════════════════════════════════════════════════ */

.footer {
    background: var(--dark-color);
    color: #fff;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(230, 57, 70, 0.2);
    border-radius: 50%;
    font-size: 1.2rem;
}

.social-links a:hover {
    background: var(--primary-color);
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* ═════════════════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
   ═════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: rgba(29, 53, 87, 0.99);
        gap: 0;
        padding: 1rem 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 1rem 20px;
    }

    .nav-toggle {
        display: flex;
    }

    .mission-content {
        grid-template-columns: 1fr;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .donation-form {
        flex-direction: column;
    }

    .donation-card.featured {
        transform: scale(1);
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .metrics-carousel {
        grid-template-columns: 1fr;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .donation-grid {
        grid-template-columns: 1fr;
    }

    .mission-values {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}
