/* ==================================== */
/* 1. CONFIGURACIÓN GLOBAL Y COLORES    */
/* ==================================== */
:root {
    --color-primary: #6f42c1;
    /* Morado Fundación */
    --color-primary-dark: #553098;
    --color-secondary: #28a745;
    /* Verde Éxito */
    --color-accent: #ffc107;
    /* Amarillo */
    --color-text: #333333;
    --color-bg: #f4f6f9;
    --color-white: #ffffff;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Lato', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 92%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Tipografía */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    margin-bottom: 0.5em;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    text-align: center;
}

/* Botones Generales */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.3s ease;
    text-align: center;
}

.btn--primary {
    background-color: var(--color-primary);
    color: white;
    box-shadow: 0 4px 10px rgba(111, 66, 193, 0.3);
}

.btn--primary:hover {
    transform: translateY(-2px);
    background-color: var(--color-primary-dark);
}

.btn--outline {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn--outline:hover {
    background: var(--color-primary);
    color: white;
}

.btn--large {
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* HEADER */
.main-header {
    background: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.main-header__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-header__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.logo-text-wrapper {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--color-primary);
    line-height: 1;
}

.logo-subtitle {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #666;
    letter-spacing: 1px;
}

/* NAV */
.nav-list {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-list__link {
    text-decoration: none;
    color: #555;
    font-weight: 600;
    transition: color 0.3s;
}

.nav-list__link:hover {
    color: var(--color-primary);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-primary);
    cursor: pointer;
}

/* SECCIONES */
.hero-section {
    text-align: center;
    padding: 80px 0;
    background: linear-gradient(135deg, #f3e5f5 0%, #fff 100%);
}

.hero-section__subtitle {
    font-size: 1.2rem;
    margin: 20px auto;
    max-width: 700px;
    color: #555;
}

.hero-section__actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.raffle-section {
    padding: 60px 0;
    background: white;
}

.raffle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.raffle-poster {
    width: 100%;
    max-width: 400px;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border: 5px solid white;
    margin: 0 auto;
}

.raffle-tag {
    background: var(--color-accent);
    color: #333;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.prizes-box {
    background: #fff;
    border: 2px solid #eee;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.prizes-list {
    list-style: none;
    margin-top: 10px;
}

.prizes-list li {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.raffle-details {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.detail-item {
    background: #f8f9fa;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn--raffle {
    width: 100%;
    background: #25d366;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn--raffle:hover {
    background: #128c7e;
    transform: translateY(-2px);
}

/* STATS & CONTACTO */
.stats-section,
.contact-section {
    padding: 60px 0;
    background: white;
    text-align: center;
}

.stats-grid {
    display: flex;
    justify-content: space-around;
    margin-top: 30px;
}

.stat-item__number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-secondary);
    display: block;
}

.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    text-align: left;
    justify-content: center;
}

.contact-info ul {
    list-style: none;
    margin-top: 20px;
}

.contact-info li {
    margin-bottom: 15px;
    font-size: 1rem;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.contact-form-card {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 15px;
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
}

/* FOOTER */
.main-footer {
    background: #2c3e50;
    color: white;
    padding: 40px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #444;
}

.footer-col h4 {
    color: white;
    margin-bottom: 15px;
}

.footer-links {
    list-style: none;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
}

.copyright {
    text-align: center;
    margin-top: 20px;
    font-size: 0.8rem;
    color: #888;
}

/* =========================================
   ESTILOS REDES SOCIALES (Footer)
   ========================================= */

.social-links a {
    display: flex; /* Para alinear icono y texto */
    align-items: center;
    gap: 10px; /* Espacio entre el emoji y la letra */
    font-size: 1rem;
    transition: all 0.3s ease; /* Suaviza la animación */
}

/* Efecto Hover: Cambia de color y se mueve a la derecha */
.social-links a:hover {
    color: var(--color-accent); /* Se pone amarillo (tu color de acento) */
    transform: translateX(8px); /* Pequeño desplazamiento a la derecha */
    text-shadow: 0 0 10px rgba(255, 193, 7, 0.5); /* Brillo suave */
}

/* Opcional: Quitar viñetas si aparecen */
.social-links {
    padding-left: 0;
}

/* MODAL DE PAGO */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay.is-visible {
    display: flex;
    opacity: 1;
}

.payment-modal {
    background: white;
    width: 100%;
    max-width: 480px;
    margin: 30px auto;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.modal-header-bar {
    background-color: #2c3e50;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.8;
}

.modal-body {
    padding: 20px;
}

.payment-tabs {
    display: flex;
    background: #f1f3f5;
    padding: 4px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    border-radius: 6px;
    transition: all 0.2s;
}

.tab-btn.active {
    background: white;
    color: var(--color-primary);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.donation-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.btn-amount {
    background: white;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 6px;
    font-weight: 700;
    color: #555;
    cursor: pointer;
}

.btn-amount.selected {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.card-logos-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.card-icon {
    height: 20px;
    width: auto;
}

.bank-card {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

.btn-copy-small {
    background: #e9ecef;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    color: #555;
    font-weight: bold;
}

.btn-pay-action {
    width: 100%;
    background: #0056b3;
    color: white;
    padding: 16px;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 10px;
}

.form-row-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #f9f9f9;
    margin-bottom: 15px;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* =========================================
   🎨 NUEVOS ESTILOS: HISTORIA Y MISIÓN
   (Pega esto antes de la Versión Móvil)
   ========================================= */

/* 1. SECCIÓN HISTORIA (Lado a lado en PC) */
.history-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Texto a la izq, Imagen a la der */
    gap: 60px;
    align-items: center; /* Centrado verticalmente */
}

.history-content {
    text-align: left;
}

.section-tag {
    display: inline-block;
    background: #e1bee7; /* Fondo lila suave */
    color: var(--color-primary);
    padding: 5px 15px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.history-image img {
    border-radius: 20px;
    /* Efecto de sombra sólida decorativa */
    box-shadow: 20px 20px 0px rgba(111, 66, 193, 0.1); 
    width: 100%;
    object-fit: cover;
}

/* 2. SECCIÓN MISIÓN Y VISIÓN (Tarjetas Cuadradas) */
.mission-section {
    padding: 80px 0;
    background-color: #f8f9fa; /* Gris muy suave para diferenciar sección */
}

.mission-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Dos columnas exactas */
    gap: 40px;
    /* ESTO ES CLAVE: Hace que ambos cuadros tengan la misma altura */
    align-items: stretch; 
}

.mission-card {
    background: white;
    padding: 50px 40px;
    border-radius: 20px;
    /* Sombra suave para que parezca flotar */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08); 
    text-align: center;
    border-top: 6px solid var(--color-primary); /* Detalle de color arriba */
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Efecto al pasar el mouse */
.mission-card:hover {
    transform: translateY(-10px); /* Sube un poco */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.mission-card .icon-box {
    font-size: 3.5rem;
    background: #f3e5f5; /* Círculo morado claro */
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 25px;
}

.mission-card h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--color-primary);
}

.mission-card p {
    font-size: 1.05rem;
    color: #555;
    line-height: 1.8;
}

/* Pequeño divisor visual entre tarjetas (opcional, si usas la clase mission-divider) */
.mission-divider {
    display: none; /* En PC no lo necesitamos */
}

/* ========================================== */
/* 📱 VERSIÓN MÓVIL (SUPER RESPONSIVE) 📱 */
/* ========================================== */

@media (max-width: 900px) {

    /* 1. AJUSTES GENERALES */
    .container {
        width: 90%;
        /* Más espacio a los lados */
    }

    h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    h2 {
        font-size: 1.8rem;
    }

    /* 2. HEADER Y MENÚ */
    .menu-toggle {
        display: block;
        /* Aparece la hamburguesa */
        font-size: 2rem;
        padding: 5px;
    }

    .nav-list {
        display: none;
        /* Oculto por defecto */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        text-align: center;
        gap: 15px;
    }

    /* Clase que añade JS para mostrar el menú */
    .main-header__nav.is-open .nav-list {
        display: flex;
    }

    /* Ocultar el botón "Donar" del header en móvil para ahorrar espacio (ya está en el Hero) */
    .main-header__content .btn--donate {
        display: none;
    }

    /* Si quieres mostrar el botón donar en el menú, descomenta esto: */
    /* .main-header__content .btn--donate { display: block; margin: 10px auto; } */

    /* 3. HERO SECTION */
    .hero-section {
        padding: 40px 0;
    }

    .hero-section__actions {
        flex-direction: column;
        gap: 15px;
    }

    .btn--large {
        width: 100%;
        /* Botones ancho completo */
    }

    /* 4. RIFA Y GRID */
    .raffle-grid,
    .mission-grid,
    .stats-grid,
    .history-container,
    .footer-content {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
        gap: 30px;
    }

    /* Imagen Rifa */
    .raffle-poster {
        max-width: 80%;
        /* Un poco más pequeña en móvil */
    }

    /* 5. MODAL DE PAGO (ESTILO APP) */
    .modal-overlay {
        align-items: flex-end;
        /* Pegar al fondo */
        padding: 0;
    }

    .payment-modal {
        margin: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        /* Redondo solo arriba */
        max-height: 85vh;
        /* Ocupa 85% de la altura */
        animation: slideUp 0.3s ease-out;
    }

    /* Ajustes internos del modal */
    .donation-options {
        grid-template-columns: repeat(2, 1fr);
        /* 2 botones por fila en vez de 4 */
    }

    .form-row-split {
        grid-template-columns: 1fr 1fr;
        /* Mantener fecha/cvv juntos */
    }

    /* Hacer el botón de cerrar más grande para el dedo */
    .modal-close {
        font-size: 2rem;
        padding: 10px;
    }
}

/* Animación para que el modal suba suave */
@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

/* Ajustes para pantallas MUY pequeñas (iPhone SE, etc) */
@media (max-width: 380px) {
    h1 {
        font-size: 1.6rem;
    }

    .stat-item__number {
        font-size: 2rem;
    }
}

/* =========================================
   ESTILOS DEL SELECTOR DE PAGO MODERNO
   ========================================= */
.payment-method-selector {
    margin: 20px 0;
}

.selector-title {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    color: #333;
    font-size: 0.95rem;
}

.methods-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Ocultar el radio button nativo feo */
.method-item input[type="radio"] {
    display: none;
}

/* La tarjeta contenedora */
.method-card {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #e9ecef; /* Borde gris suave */
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
}

.method-card:hover {
    background-color: #f8f9fa;
}

/* CUANDO ESTÁ SELECCIONADO (La Magia) */
.method-item input[type="radio"]:checked + .method-card {
    border-color: var(--color-primary); /* Tu color morado */
    background-color: #fdfbff; /* Fondo morado muy suave */
    box-shadow: 0 4px 12px rgba(111, 66, 193, 0.15);
}

/* Iconos y Textos */
.method-icon {
    font-size: 1.5rem;
    margin-right: 15px;
}

.method-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.method-name {
    font-weight: 700;
    color: #333;
    font-size: 1rem;
}

.method-desc {
    font-size: 0.8rem;
    color: #888;
}

.method-badge {
    display: inline-block;
    background-color: #e8f5e9;
    color: #2e7d32;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    width: fit-content;
    margin-top: 2px;
}

/* El círculo de selección a la derecha */
.check-circle {
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 50%;
    position: relative;
}

.method-item input[type="radio"]:checked + .method-card .check-circle {
    border-color: var(--color-primary);
    background-color: var(--color-primary);
    box-shadow: inset 0 0 0 4px white; /* Crea el punto blanco en el centro */
}