/* =====================================================
   STYLES.CSS - ESTILOS GLOBALES
   Asociación de Dodgeball Jalisco
   
   TABLA DE CONTENIDOS:
   1. Variables CSS
   2. Reset y Configuración Base
   3. Layout Principal
   4. Header y Navegación
   5. Contenido Principal
   6. Botones Globales
   7. Secciones Comunes
   8. Footer
   9. Sistema de Modal
   10. Utilidades Globales
   11. Animaciones
   12. Responsive Design
===================================================== */


/* =====================================================
   1. VARIABLES CSS
   Colores y valores reutilizables en toda la aplicación
===================================================== */
:root {
    /* Colores Primarios */
    --primary: #1a3a8f;           /* Azul principal */
    --secondary: #e63946;         /* Rojo secundario */
    --accent: #fca311;            /* Amarillo/Naranja de acento */
    --dark: #1d3557;              /* Azul oscuro */
    --light: #f8f9fa;             /* Gris claro */
    
    /* Colores Específicos */
    --azul-header: #2c3e50;       /* Azul del header */
    --greenlogo: #2a9d8f;         /* Verde del logo */
    --green-logo: #0d7a4e;        /* Verde alternativo */
    --green-dark: #2E7D32;        /* Verde oscuro */
    
    /* Colores de Secciones MVV */
    --mission-color: #4CAF50;     /* Color de Misión */
    --vision-color: #2196F3;      /* Color de Visión */
    --values-color: #FF9800;      /* Color de Valores */
}


/* =====================================================
   2. RESET Y CONFIGURACIÓN BASE
   Configuración inicial para todos los elementos
===================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}


/* =====================================================
   3. LAYOUT PRINCIPAL
   Estructura de las páginas
===================================================== */

/* Contenedor principal que ocupa el espacio disponible */
main, 
.main-content, 
section:first-of-type {
    flex: 1;
}

/* Espaciado del contenido principal */
.main-content {
    flex: 1;
    padding: 140px 0 60px;
}

/* Contenedor genérico con ancho máximo */
.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Títulos principales */
h1 {
    color: var(--light);
    margin-bottom: 20px;
    font-size: 2.2rem;
}


/* =====================================================
   4. HEADER Y NAVEGACIÓN
   Sistema de navegación principal
===================================================== */

/* ----- Header Principal ----- */
header {
    background-color: var(--azul-header);
    color: white;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

/* ----- Logo ----- */
.logo {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 0;
}

.logo img {
    height: 50px;
    margin-right: 10px;
}

/* ----- Botón de Menú Hamburguesa (móvil) ----- */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
}

/* ----- Menú de Navegación ----- */
.nav-menu {
    display: flex;
    list-style: none;
    position: relative;
}

.menu-item {
    position: relative;
}

/* Enlaces del menú principal */
.menu-link {
    color: white;
    text-decoration: none;
    padding: 20px 25px;
    display: block;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.menu-link:hover {
    background-color: #34495e;
}

.menu-link.active {
    background-color: #1a252f;
}

/* Icono de flecha en menú */
.menu-link i {
    margin-left: 8px;
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.menu-link.active i {
    transform: rotate(180deg);
}

/* ----- Submenú Desplegable ----- */
.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 220px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-radius: 0 0 8px 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 10;
}

.submenu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Enlaces del submenú */
.submenu-link {
    color: #2c3e50;
    text-decoration: none;
    padding: 15px 20px;
    display: block;
    border-bottom: 1px solid #eee;
    transition: all 0.2s ease;
    font-weight: 500;
}

.submenu-link:hover {
    background-color: #f8f9fa;
    color: #3498db;
    padding-left: 25px;
}

.submenu-link i {
    margin-right: 10px;
    color: #3498db;
    width: 20px;
    text-align: center;
}


/* =====================================================
   5. CONTENIDO PRINCIPAL
   Estilos para secciones y contenido
===================================================== */

/* ----- Secciones Generales ----- */
section {
    padding: 80px 0;
}

/* Título de sección con línea decorativa */
.section-title {
    text-align: center;
    margin-bottom: 50px;
    color: var(--primary);
    font-size: 2.5rem;
    position: relative;
}

.section-title:after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: var(--secondary);
    margin: 15px auto;
}

/* ----- Lista de Características ----- */
.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.feature-item {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.feature-item h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-item i {
    color: #3498db;
}


/* =====================================================
   6. BOTONES GLOBALES
   Sistema de botones reutilizable
===================================================== */

/* ----- Botón Base ----- */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    font-family: inherit;
}

.btn:hover {
    background: #c1121f;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* ----- Variantes de Botones ----- */

/* Botón Verde */
.btn-green {
    background: var(--green-logo);
    margin: 5px;
}

.btn-green:hover {
    background: #0a5a3b;
}

/* Botón de Acento (Amarillo/Naranja) */
.btn-accent {
    background: var(--accent);
    color: var(--dark);
    margin: 5px;
}

.btn-accent:hover {
    background: #e69500;
}

/* Botón Azul Primario */
.btn-blue-primary {
    background: var(--primary);
    margin: 5px;
}

.btn-blue-primary:hover {
    background: var(--dark);
}

/* Botón Primario (para modales) */
.btn-primary {
    background: #2a9d8f;
    color: white;
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover:not(:disabled) {
    background: #238276;
    transform: translateY(-2px);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Botón Secundario (para modales) */
.btn-secondary {
    background: #fca311;
    color: #1d3557;
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

/* ----- Grupo de Botones ----- */
.btn-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

/* ----- Iconos en Botones ----- */

/* Espaciado para iconos de Iconify */
.btn iconify-icon {
    margin-right: 8px;
    vertical-align: middle;
    display: inline-block;
}

/* Espaciado para iconos de Font Awesome */
.btn i {
    margin-right: 8px;
}


/* =====================================================
   7. SECCIONES COMUNES
   Estilos compartidos entre páginas
===================================================== */

/* Demo de estados responsive (opcional) */
.responsive-demo {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.responsive-state {
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    font-weight: 600;
    min-width: 200px;
}

.desktop-state {
    background-color: #e8f6f3;
    color: #1d8348;
    border: 2px solid #1d8348;
}

.mobile-state {
    background-color: #fef9e7;
    color: #b7950b;
    border: 2px solid #b7950b;
}

.mobile-state.active {
    background-color: #f9e79f;
}


/* =====================================================
   8. FOOTER
   Dos versiones: simple y completo
===================================================== */

/* ----- Footer Simple (páginas secundarias) ----- */
.footer-simple {
    background-color: var(--azul-header);
    color: white;
    padding: 10px 0 0;
    text-align: center;
    margin-top: auto;
}

.footer-simple .footer-content {
    max-width: 800px;
    margin: 0 auto 15px;
}

.footer-simple .footer-content p {
    margin-bottom: 10px;
    opacity: 0.9;
}

/* Enlaces del footer simple */
.footer-simple .footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
    margin-top: 20px;
}

.footer-simple .footer-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.footer-simple .footer-links a i {
    color: var(--accent);
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.footer-simple .footer-links a:hover {
    color: var(--accent);
}

.footer-simple .footer-links a:hover i {
    color: white;
}

/* Copyright en footer simple */
.footer-simple .copyright {
    padding-top: 15px;
    padding-bottom: 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    color: #aaa;
}


/* =====================================================
   9. SISTEMA DE MODAL
   Modal para "En construcción" y notificaciones
===================================================== */

/* ----- Overlay del Modal ----- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ----- Contenido del Modal ----- */
.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideUp 0.4s ease;
    position: relative;
}

/* ----- Header del Modal ----- */
.modal-header {
    background: linear-gradient(135deg, #1a3a8f 0%, #2a9d8f 100%);
    color: white;
    padding: 30px;
    border-radius: 20px 20px 0 0;
    text-align: center;
    position: relative;
}

.modal-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    animation: bounce 1s ease infinite;
}

.modal-header h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.modal-header p {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* ----- Botón de Cerrar Modal ----- */
.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

/* ----- Cuerpo del Modal ----- */
.modal-body {
    padding: 30px;
}

/* Secciones de información dentro del modal */
.info-section {
    margin-bottom: 25px;
}

.info-section h3 {
    color: #1a3a8f;
    font-size: 1.3rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-section p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* Lista de características en el modal */
.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    padding: 10px 0;
    color: #555;
    display: flex;
    align-items: center;
    gap: 10px;
}

.features-list li i {
    color: #2a9d8f;
    font-size: 1.2rem;
}

/* ----- Formulario de Notificación ----- */
.notify-form {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    border-radius: 15px;
    margin-top: 20px;
}

.notify-form h4 {
    color: #1a3a8f;
    margin-bottom: 15px;
    text-align: center;
}

/* Grupo de campos del formulario */
.form-group {
    margin-bottom: 15px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border 0.3s;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: #2a9d8f;
}

/* Acciones del formulario */
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* ----- Aviso de Privacidad en Modal ----- */
.privacy-notice {
    background: rgba(26, 58, 143, 0.05);
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 8px;
}

.privacy-notice p {
    margin: 0;
    font-size: 0.9rem;
    color: #555;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.privacy-notice i {
    color: #2a9d8f;
    font-size: 1.1rem;
}

.privacy-link {
    color: #1a3a8f;
    font-weight: 600;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.privacy-link:hover {
    color: #2a9d8f;
    text-decoration: none;
}

/* ----- Mensaje de Éxito ----- */
.success-message {
    display: none;
    text-align: center;
    padding: 30px;
    color: #2a9d8f;
}

.success-message i {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: scaleIn 0.5s ease;
}

.success-message.active {
    display: block;
}

/* ----- Mensaje de Error ----- */
.error-message {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 12px;
    margin-top: 15px;
    color: #856404;
    display: none;
}

.error-message.active {
    display: block;
}


/* =====================================================
   10. UTILIDADES GLOBALES
   Clases de utilidad reutilizables
===================================================== */

/* ----- Video Responsive ----- */
.video-responsive {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* Ratio 16:9 */
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ----- Animaciones de Secciones ----- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}


/* =====================================================
   11. ANIMACIONES
   Definiciones de keyframes
===================================================== */

/* Fade In - Aparecer gradualmente */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Slide Up - Deslizar hacia arriba */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Bounce - Rebote */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Scale In - Escalar desde cero */
@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}


/* =====================================================
   12. RESPONSIVE DESIGN
   Adaptaciones para diferentes tamaños de pantalla
===================================================== */

/* ----- Tablets y Dispositivos Medianos (≤768px) ----- */
@media (max-width: 768px) {
    
    /* --- Header Responsive --- */
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: #2c3e50;
        flex-direction: column;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.3s ease;
        z-index: 99;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .menu-item {
        width: 100%;
    }
    
    .menu-link {
        padding: 15px 20px;
        text-align: left;
        border-bottom: 1px solid #34495e;
    }
    
    /* --- Submenú en Móvil --- */
    .submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-radius: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        background-color: #1a252f;
        min-width: 100%;
    }
    
    .submenu.active {
        max-height: 500px;
    }
    
    .submenu-link {
        padding: 12px 20px 12px 40px;
        background-color: #1a252f;
        color: #ecf0f1;
        border-bottom: 1px solid #2c3e50;
    }
    
    .submenu-link i {
        color: #3498db;
    }
    
    /* --- Contenido Principal --- */
    .header-container {
        flex-direction: row;
        padding: 10px 0;
    }

    .logo {
        margin-bottom: 5px;
    }

    nav ul {
        display: none;
        flex-direction: row;
        text-align: center;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: var(--primary);
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        padding: 20px 0;
    }

    nav ul.active {
        display: flex;
    }

    nav ul li {
        margin: 10px 0;
        text-align: left;
    }

    .mobile-menu {
        display: block;
        position: absolute;
        top: 25px;
        right: 20px;
    }

    .main-content {
        padding: 120px 0 40px;
    }

    /* --- Tipografía --- */
    h1 {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 2rem;
    }

    /* --- Botones --- */
    .btn-group {
        flex-direction: column;
        align-items: center;
    }

    .btn-green, 
    .btn-accent, 
    .btn-blue-primary {
        width: 100%;
        max-width: 250px;
        margin: 5px 0;
    }

    /* --- Footer --- */
    .footer-simple .footer-links {
        flex-direction: column;
        gap: 15px;
    }
    
    .footer-simple .footer-links a {
        justify-content: center;
    }

    /* --- Modal --- */
    .modal-header h2 {
        font-size: 1.5rem;
    }

    .modal-icon {
        font-size: 3rem;
    }

    .modal-body {
        padding: 20px;
    }

    .form-actions {
        flex-direction: column;
    }
    
    /* --- Aviso de Privacidad --- */
    .privacy-notice p {
        font-size: 0.85rem;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
}

/* ----- Móviles Pequeños (≤576px) ----- */
@media (max-width: 576px) {
    
    /* --- Logo y Header --- */
    .logo img {
        height: 50px;
    }
    
    .logo-text {
        font-size: 1.5rem;
    }
    
    .mobile-menu {
        top: 20px;
    }
}


/* =====================================================
   FIN DE STYLES.CSS
===================================================== */