/* =========================================
   VARIABLES CSS Y TEMA (Modo Claro/Oscuro)
   ========================================= */
:root {
    /* Paleta de colores - Modo Claro */
    --color-bg: #E0E5EC; /* Gris azulado neutro ideal para neumorfismo */
    --color-text-main: #2D3748; /* Gris oscuro / Authority */
    --color-text-muted: #718096;
    
    /* Colores estratégicos */
    --color-autoridad: #004080; /* Azul profundo Navy */
    --color-tierra: #e2e8f0; /* Fondo sereno */
    --color-accent: #E53E3E; /* Rojo Dinámico para CTAs */
    --color-accent-hover: #C53030;
    --color-primary: #3182CE; /* Azul para botones estándar */
    --color-primary-hover: #2B6CB0;

    /* Sombras Neumórficas (Claro) */
    --shadow-light: #ffffff;
    --shadow-dark: #a3b1c6;
    
    /* Tipografía */
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

[data-theme="dark"] {
    /* Paleta de colores - Modo Oscuro */
    --color-bg: #1A202C;
    --color-text-main: #E2E8F0;
    --color-text-muted: #A0AEC0;
    
    /* Colores estratégicos ajustados para contraste */
    --color-autoridad: #90CDF4; 
    --color-tierra: #2D3748;
    --color-accent: #FC8181;
    --color-accent-hover: #E53E3E;
    --color-primary: #63B3ED;
    --color-primary-hover: #4299E1;

    /* Sombras Neumórficas (Oscuro) */
    --shadow-light: #2d3748;
    --shadow-dark: #11151d;
}

/* =========================================
   RESETEOS BÁSICOS
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, .logo-text {
    font-family: var(--font-display);
    color: var(--color-text-main);
    font-weight: 800;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* =========================================
   UTILIDADES NEUMÓRFICAS
   ========================================= */
.neu-flat {
    background: var(--color-bg);
    box-shadow: 8px 8px 16px var(--shadow-dark), 
               -8px -8px 16px var(--shadow-light);
    border-radius: 12px;
}

.neu-convex {
    background: linear-gradient(145deg, var(--shadow-light), var(--color-bg));
    box-shadow: 6px 6px 12px var(--shadow-dark), 
               -6px -6px 12px var(--shadow-light);
    border-radius: 12px;
}

.neu-pressed {
    background: var(--color-bg);
    box-shadow: inset 5px 5px 10px var(--shadow-dark), 
                inset -5px -5px 10px var(--shadow-light);
    border-radius: 12px;
}

/* Botones genéricos */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-family: var(--font-display);
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    border: none;
    outline: none;
    transition: all 0.2s ease-in-out;
    text-align: center;
}

.btn:active {
    box-shadow: inset 4px 4px 8px var(--shadow-dark), 
                inset -4px -4px 8px var(--shadow-light);
}

.btn-primary {
    color: var(--color-primary);
}

.btn-accent {
    color: var(--color-accent);
}

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

/* =========================================
   HEADER & NAVEGACIÓN (Mobile First)
   ========================================= */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
    border-radius: 0 0 16px 16px;
    margin-bottom: 2rem;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-text {
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    color: var(--color-autoridad);
}

/* Botón Menú Móvil */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2000;
}

.mobile-menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--color-text-main);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Navegación */
.main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--color-bg);
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    padding: 80px 20px 20px;
    transition: right 0.3s ease;
    z-index: 1500;
}

.main-nav.active {
    right: 0;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    padding: 10px 18px;
    border-radius: 12px;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-block;
    color: var(--color-text-main);
}

.nav-links a:hover {
    color: var(--color-primary);
    background: var(--color-bg);
    box-shadow: 5px 5px 10px var(--shadow-dark), 
               -5px -5px 10px var(--shadow-light);
    transform: translateY(-2px);
}

.nav-links a:active {
    box-shadow: inset 3px 3px 6px var(--shadow-dark), 
                inset -3px -3px 6px var(--shadow-light);
    transform: translateY(0);
}

.nav-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: auto;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text-main);
}

/* =========================================
   SECCIÓN HERO
   ========================================= */
.hero {
    padding: 2rem 0 4rem;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.hero-text h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--color-autoridad);
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dashboard-mockup {
    width: 100%;
    height: 300px;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mockup-header {
    height: 30px;
    width: 40%;
    background: var(--color-text-muted);
    opacity: 0.2;
    border-radius: 5px;
}

.mockup-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.mockup-card {
    height: 60px;
    width: 100%;
}

/* =========================================
   QUICK ACTIONS (Navegación Tareas)
   ========================================= */
.quick-actions {
    padding: 4rem 0;
}

.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 3rem;
}

.task-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.task-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    transition: transform 0.2s ease;
}

.task-card:hover {
    transform: translateY(-5px);
}

.task-card .icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 10px;
}

.task-card h3 {
    font-size: 1.25rem;
    color: var(--color-autoridad);
}

.task-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
    padding: 3rem 0;
    margin-top: 4rem;
    text-align: center;
    border-radius: 16px 16px 0 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.footer-links a {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

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

/* =========================================
   MEDIA QUERIES (Desktop)
   ========================================= */
@media (min-width: 768px) {
    .hero-content {
        flex-direction: row;
        align-items: center;
    }

    .hero-text {
        flex: 1;
    }

    .hero-text h1 {
        font-size: 3.5rem;
    }

    .hero-buttons {
        flex-direction: row;
    }

    .hero-image {
        flex: 1;
    }

    .task-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .mobile-menu-toggle {
        display: none;
    }

    .main-nav {
        position: static;
        width: auto;
        max-width: none;
        height: auto;
        background: transparent;
        box-shadow: none;
        flex-direction: row;
        padding: 0;
        align-items: center;
        gap: 15px;
    }

    .nav-links {
        flex-direction: row;
        margin-bottom: 0;
        gap: 15px;
    }

    .nav-actions {
        flex-direction: row;
        margin-top: 0;
        align-items: center;
    }

    .task-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* =========================================
   MODAL DE VALES DE GAS
   ========================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: flex-start; /* Evita que el contenido superior se oculte */
    justify-content: center;
    padding: 40px 0; /* Margen superior/inferior para el modal al hacer scroll */
    overflow-y: auto; /* Permite scroll en pantallas pequeñas */
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: var(--color-bg);
    padding: 30px;
    width: 90%;
    max-width: 600px;
    border-radius: 16px;
    position: relative;
    margin: auto; /* Lo centra verticalmente cuando hay espacio disponible */
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: var(--color-text-muted);
}

.close-modal:hover {
    color: var(--color-accent);
}

.modal-title {
    margin-bottom: 20px;
    text-align: center;
    color: var(--color-autoridad);
}

.gas-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

@media (min-width: 600px) {
    .gas-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.gas-card {
    padding: 20px;
    text-align: center;
    border-radius: 12px;
}

.gas-card h4 {
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.gas-card .price {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.gas-card .stock {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.gas-card .stock.out {
    color: var(--color-accent);
    font-weight: bold;
}

.gas-card.clickable {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gas-card.clickable:hover {
    transform: translateY(-3px);
    box-shadow: 10px 10px 20px var(--shadow-dark), -10px -10px 20px var(--shadow-light);
}

.gas-card.clickable:active {
    box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
    transform: translateY(0);
}

/* =========================================
   ESTILOS DE MODAL DIRECTIVA (OPCIÓN 3)
   ========================================= */
.directiva-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin-top: 20px;
    width: 100%;
}

@media (min-width: 768px) {
    .directiva-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.directiva-card {
    padding: 25px 20px;
    text-align: center;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.directiva-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
    border: 3px solid var(--color-bg);
}

.directiva-nombre {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--color-text-main);
    line-height: 1.3;
    font-family: var(--font-display);
}

.directiva-rol-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rol-presidente {
    background-color: #EBF8FF;
    color: #2B6CB0;
    border: 1px solid #BEE3F8;
}

.rol-tesorero {
    background-color: #E6FFFA;
    color: #319795;
    border: 1px solid #B2F5EA;
}

.rol-secretario {
    background-color: #FEFCBF;
    color: #B7791F;
    border: 1px solid #FEEBC8;
}

.directiva-meta {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-weight: 500;
    line-height: 1.4;
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.directiva-actions {
    display: flex;
    width: 100%;
    gap: 8px;
    margin-top: 10px;
}

.directiva-btn {
    flex: 1;
    padding: 10px 5px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-whatsapp {
    background-color: #25D366 !important;
    color: white !important;
    box-shadow: 2px 2px 5px rgba(37, 211, 102, 0.2);
}

.btn-whatsapp:hover {
    background-color: #128C7E !important;
    transform: translateY(-2px);
}

.btn-call {
    color: var(--color-primary);
}

.btn-mail {
    color: var(--color-accent);
}

/* =========================================
   SECCIÓN DE EVENTOS Y TICKETS DIGITALES
   ========================================= */
.eventos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.evento-card {
    padding: 25px 20px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.evento-card:hover {
    transform: translateY(-5px);
}

.evento-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.evento-badge {
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-activo {
    background-color: #E6FFFA;
    color: #319795;
    border: 1px solid #B2F5EA;
}

.badge-registrado {
    background-color: #EBF8FF;
    color: #2B6CB0;
    border: 1px solid #BEE3F8;
}

.evento-titulo {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--color-text-main);
    margin-top: 5px;
}

.evento-detalles {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.evento-detalle-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.evento-detalle-item strong {
    color: var(--color-text-main);
}

.evento-acciones {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-registro-evento {
    width: 100%;
    padding: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- TICKET NEUMÓRFICO PREMIUM --- */
.ticket-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 10px 0;
}

.ticket-card {
    width: 100%;
    max-width: 380px;
    border-radius: 24px;
    padding: 30px;
    background: var(--color-bg);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 15px 15px 30px var(--shadow-dark), 
                -15px -15px 30px var(--shadow-light);
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px dashed var(--shadow-dark);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.ticket-org {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--color-autoridad);
}

.ticket-badge {
    background-color: var(--color-accent);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ticket-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--color-text-main);
    line-height: 1.2;
    text-align: center;
    margin-bottom: 20px;
}

.ticket-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.ticket-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}

.ticket-value {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text-main);
    word-break: break-word;
}

.ticket-separator {
    position: relative;
    height: 20px;
    margin: 20px -30px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.notch {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--color-bg);
    box-shadow: inset 3px 0 5px rgba(0,0,0,0.05);
    z-index: 2;
}

.notch-left {
    left: -10px;
    box-shadow: inset -3px 0 5px rgba(0,0,0,0.05);
}

.notch-right {
    right: -10px;
    box-shadow: inset 3px 0 5px rgba(0,0,0,0.05);
}

.dotted-line {
    width: 100%;
    border-top: 2px dotted var(--shadow-dark);
}

.ticket-qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
}

.ticket-qr {
    width: 150px;
    height: 150px;
    padding: 10px;
    border-radius: 16px;
    background-color: white;
    box-shadow: inset 3px 3px 6px var(--shadow-dark), 
                inset -3px -3px 6px var(--shadow-light),
                0px 8px 16px rgba(0,0,0,0.06);
    transition: transform 0.2s ease;
}

.ticket-qr:hover {
    transform: scale(1.05);
}





/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.3), -4px -4px 10px rgba(255,255,255,0.05);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.whatsapp-float:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 6px 6px 15px rgba(0,0,0,0.4), -6px -6px 15px rgba(255,255,255,0.05);
}
.whatsapp-float svg {
    fill: white;
}
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    .whatsapp-float svg {
        width: 26px;
        height: 26px;
    }
}
