/* ==============================================
   VARIABLES GLOBALES
============================================== */
:root {
    /* COLORES PRINCIPALES */
    --color-primary: #2C3E50;
    --color-secondary: #1ABC9C;
    --color-accent: #E74C3C;
    --color-light: #ECF0F1;
    --color-dark: #1d74bb;
    --color-gray: #95A5A6;
    
    /* TIPOGRAFÍA */
    --font-main: 'Poppins', sans-serif;
    --font-heading: 'Montserrat', sans-serif;
    
    /* ESPACIOS */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 3rem;
    --space-xl: 5rem;
    
    /* SOMBRAS */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    
    /* BORDES */
    --radius-sm: 5px;
    --radius-md: 10px;
    --radius-lg: 20px;
    --radius-round: 50px;
}

/* ==============================================
   RESET Y ESTILOS BASE
============================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-dark);
    background: #fff;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-sm);
}

/* ==============================================
   LOADING SCREEN
============================================== */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s;
}

#loading.loaded {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    text-align: center;
    color: white;
}

.spinner i {
    font-size: 3rem;
    margin-bottom: var(--space-sm);
}

/* ==============================================
   HEADER Y NAVEGACIÓN
============================================== */
#main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

#main-header.scrolled {
    padding: 0.5rem 0;
}

#main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem var(--space-sm);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
}

.logo img {
    width: 80px;
    height: 120px;
}

.logo-text h1 {
    font-size: 1.2rem;
    color: var(--color-primary);
    margin-bottom: 0.2rem;
}

.logo-text p {
    font-size: 0.8rem;
    color: var(--color-gray);
}

/* MENÚ HAMBURGUESA */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background: var(--color-primary);
    transition: 0.3s;
}

.menu-toggle.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* NAVEGACIÓN */
#mainNav ul {
    display: flex;
    list-style: none;
    gap: var(--space-md);
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--color-dark);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-round);
    transition: all 0.3s;
}

.nav-link:hover,
.nav-link.active {
    background: var(--color-secondary);
    color: white;
}

.btn-donar {
    background: var(--color-accent);
    color: white;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius-round);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-donar:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

/* ==============================================
   HERO SECTION
============================================== */
.hero {
    height: 100vh;
    position: relative;
    margin-top: 80px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(44, 62, 80, 0.8), rgba(44, 62, 80, 0.9));
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    padding-top: 10vh;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: var(--space-md);
    font-family: var(--font-heading);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: var(--space-lg);
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* ==============================================
   BOTONES
============================================== */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: var(--radius-round);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-family: var(--font-main);
}

.btn-primary {
    background: var(--color-secondary);
    color: white;
    border: 2px solid var(--color-secondary);
}

.btn-primary:hover {
    background: transparent;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--color-primary);
}

/* ==============================================
   ESTADÍSTICAS
============================================== */
.stats-section {
    background: var(--color-light);
    padding: var(--space-xl) 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
}

.stat-item {
    text-align: center;
    padding: var(--space-lg);
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: var(--space-sm);
}

.stat-label {
    color: var(--color-gray);
    font-weight: 500;
}

/* ==============================================
   SECCIONES GENERALES
============================================== */
section {
    padding: var(--space-xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--color-secondary);
}

.section-header p {
    color: var(--color-gray);
    font-size: 1.1rem;
}

/* ==============================================
   SECCIÓN NOSOTROS
============================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.about-content h3 {
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
    font-size: 1.5rem;
}

.about-content p {
    margin-bottom: var(--space-md);
    line-height: 1.8;
}

.about-values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.value {
    text-align: center;
    padding: var(--space-md);
    background: var(--color-light);
    border-radius: var(--radius-md);
}

.value i {
    font-size: 2rem;
    color: var(--color-secondary);
    margin-bottom: var(--space-sm);
}

.about-image img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* ==============================================
   PROGRAMAS
============================================== */
.programs-section {
    background: var(--color-light);
}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.program-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s;
}

.program-card:hover {
    transform: translateY(-10px);
}

.program-icon {
    background: var(--color-secondary);
    color: white;
    padding: var(--space-lg);
    text-align: center;
    font-size: 2.5rem;
}

.program-content {
    padding: var(--space-lg);
}

.program-content h3 {
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
}

.program-content ul {
    list-style: none;
    margin: var(--space-md) 0;
}

.program-content li {
    padding: 0.3rem 0;
    color: var(--color-gray);
}

.program-content li::before {
    content: '✓';
    color: var(--color-secondary);
    margin-right: 0.5rem;
}

.btn-program {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    width: 100%;
    transition: background 0.3s;
}

.btn-program:hover {
    background: var(--color-secondary);
}

/* ==============================================
   FORMULARIO DE CONTACTO
============================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-xl);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
}

.info-item i {
    font-size: 1.5rem;
    color: var(--color-secondary);
    margin-top: 0.3rem;
}

.info-item h3 {
    color: var(--color-primary);
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
}

/* FORMULARIO */
.form-group {
    margin-bottom: var(--space-md);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: border 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-secondary);
}

/* ==============================================
   DONACIONES
============================================== */
.donation-section {
    background: var(--color-primary);
    color: white;
}

.donation-section .section-header h2,
.donation-section .section-header p {
    color: white;
}

.donation-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.donation-card {
    background: rgba(255, 255, 255, 0.1);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
}

.bank-info p {
    margin-bottom: 0.5rem;
}

/* ==============================================
   FOOTER
============================================== */
footer {
    background: #1a252f;
    color: white;
    padding: var(--space-xl) 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-col h4 {
    color: var(--color-secondary);
    margin-bottom: var(--space-md);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: var(--space-sm);
}

.footer-col a {
    color: #95a5a6;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--color-secondary);
    transform: translateY(-3px);
}

.newsletter-form {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.newsletter-form input {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-radius: var(--radius-sm);
}

.newsletter-form button {
    background: var(--color-secondary);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.footer-bottom {
    text-align: center;
    padding: var(--space-md) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #95a5a6;
    font-size: 0.9rem;
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

.made-with {
    margin-top: var(--space-sm);
    font-size: 0.8rem;
}

/* ==============================================
   MODALES
============================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    z-index: 2000;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    display: none;
    z-index: 2001;
    box-shadow: var(--shadow-lg);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-gray);
}

.modal-body img {
    width: 100%;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-md);
}

/* ==============================================
   RESPONSIVE - MÓVILES
============================================== */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    #mainNav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: white;
        box-shadow: var(--shadow-lg);
        padding: 5rem 2rem;
        transition: right 0.3s;
        z-index: 1000;
    }
    
    #mainNav.active {
        right: 0;
    }
    
    #mainNav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .programs-grid {
        grid-template-columns: 1fr;
    }
    
    .donation-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
}