/* =============================================
   ESTILOS MENÚS EVENTOS - MOMA DOUX
   ============================================= */

/* Variables consistentes con el sitio */
:root {
    --color-primario: #0a0002;
    --color-dorado: #d4a574;
    --color-dorado-claro: #e8c4a0;
    --color-oscuro: #1a1a1a;
    --color-claro: #ffffff;
    --color-gris: #f8f8f8;
    --color-texto: #333333;
    --sombra-suave: 0 5px 20px rgba(0, 0, 0, 0.08);
    --sombra-media: 0 10px 30px rgba(0, 0, 0, 0.1);
    --sombra-fuerte: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* =============================================
   LOADER
   ============================================= */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader.oculto {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--color-gris);
    border-top: 3px solid var(--color-dorado);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =============================================
   NAVEGACIÓN - Consistente con el sitio
   ============================================= */
.navegacion {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navegacion.desplazado {
    box-shadow: var(--sombra-media);
    padding: 0.8rem 0;
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero-menus {
    background: linear-gradient(135deg, var(--color-primario) 0%, var(--color-oscuro) 100%);
    padding: 8rem 0 4rem;
    margin-top: 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-menus::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 165, 116, 0.1) 0%, transparent 70%);
    animation: rotateGradient 30s linear infinite;
}

@keyframes rotateGradient {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.contenido-hero {
    position: relative;
    z-index: 1;
}

.subtitulo-hero {
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    letter-spacing: 0.2em;
    color: var(--color-dorado);
    margin-bottom: 1rem;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

.titulo-hero {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 300;
    letter-spacing: 0.05em;
    color: var(--color-claro);
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease 0.2s forwards;
}

.descripcion-hero {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--color-dorado-claro);
    font-weight: 300;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease 0.4s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============================================
   SECCIÓN PDF VIEWER
   ============================================= */
.seccion-pdf-viewer {
    padding: 4rem 0;
    background: var(--color-claro);
}

/* Tabs de menús */
.menu-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-button {
    padding: 1rem 2rem;
    background: var(--color-claro);
    border: 2px solid var(--color-dorado);
    color: var(--color-primario);
    font-size: clamp(1rem, 1.5vw, 1.1rem);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    letter-spacing: 0.5px;
    font-family: inherit;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .menu-tabs {
        gap: 0.5rem;
        padding: 0 0.5rem;
    }
    
    .tab-button {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        flex: 1 1 auto;
        min-width: 100px;
    }
}

.tab-button:hover {
    background: var(--color-dorado);
    color: var(--color-claro);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 165, 116, 0.3);
}

.tab-button.activo {
    background: var(--color-primario);
    color: var(--color-claro);
    border-color: var(--color-primario);
}

/* Controles del PDF */
.pdf-controls {
    background: var(--color-gris);
    padding: 1.5rem;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
    box-shadow: var(--sombra-suave);
}

.pdf-info {
    color: var(--color-texto);
    font-weight: 500;
}

.pdf-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Controles de zoom */
.zoom-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.3rem;
    border-radius: 25px;
}

.boton-control {
    background: var(--color-claro);
    border: 2px solid var(--color-dorado);
    color: var(--color-primario);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    /* Mejorar accesibilidad en móviles */
    -webkit-tap-highlight-color: rgba(212, 165, 116, 0.2);
    touch-action: manipulation;
    /* Evitar problemas de zoom en iOS */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.boton-control:hover:not(:disabled) {
    background: var(--color-dorado);
    color: var(--color-claro);
    transform: scale(1.1);
}

.boton-control:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.zoom-value {
    font-weight: 600;
    color: var(--color-primario);
    min-width: 60px;
    text-align: center;
    font-size: 0.95rem;
}

/* Botón de descarga */
.boton-accion {
    background: var(--color-dorado);
    color: var(--color-claro);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
}

.boton-accion:hover {
    background: #c19560;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

/* Contenedor scrolleable del PDF */
.pdf-scroll-container {
    background: var(--color-claro);
    border-radius: 10px;
    box-shadow: var(--sombra-media);
    position: relative;
    overflow: auto;
    max-height: 80vh;
    min-height: 60vh;
    border: 1px solid #e0e0e0;
    /* Permitir scroll táctil en móviles */
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
    overflow-x: hidden;
}

.pdf-pages {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    min-height: 400px;
    /* Asegurar que sea scrolleable */
    position: relative;
}

.pdf-page {
    display: block;
    max-width: 100%;
    height: auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    background: white;
    /* Prevenir problemas de interacción en móviles */
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.pdf-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--color-texto);
}

.pdf-loader .spinner {
    margin: 0 auto 1rem;
}

.pdf-loader p {
    font-size: 1.1rem;
    color: var(--color-texto);
}

/* Indicador de scroll */
.scroll-indicator {
    text-align: center;
    padding: 1.5rem 0;
    color: var(--color-dorado);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    animation: bounce 2s infinite;
    transition: opacity 0.3s ease;
}

.scroll-indicator.oculto {
    opacity: 0;
}

.zoom-hint {
    font-size: 0.85rem;
    color: var(--color-texto);
    display: none;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* =============================================
   SECCIÓN INFORMACIÓN
   ============================================= */
.seccion-info {
    padding: 4rem 0;
    background: var(--color-gris);
}

.grid-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.info-card {
    background: var(--color-claro);
    padding: 2.5rem 2rem;
    border-radius: 10px;
    box-shadow: var(--sombra-suave);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: var(--color-dorado);
    transition: left 0.5s ease;
}

.info-card:hover::before {
    left: 0;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--sombra-fuerte);
}

.info-icono {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--color-dorado), var(--color-dorado-claro));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-claro);
}

.info-card h3 {
    color: var(--color-primario);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 400;
    letter-spacing: 0.05em;
}

.info-card p {
    color: var(--color-texto);
    line-height: 1.6;
    font-size: 0.95rem;
}

.info-card strong {
    color: var(--color-dorado);
    font-weight: 600;
}

/* =============================================
   SECCIÓN CTA
   ============================================= */
.seccion-cta {
    background: linear-gradient(135deg, var(--color-primario) 0%, var(--color-oscuro) 100%);
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.seccion-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23d4a574" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,117.3C672,107,768,117,864,133.3C960,149,1056,171,1152,165.3C1248,160,1344,128,1392,112L1440,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>');
    background-size: cover;
    opacity: 0.3;
}

.contenido-cta {
    position: relative;
    z-index: 1;
}

.titulo-cta {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--color-claro);
    margin-bottom: 1rem;
    font-weight: 300;
    letter-spacing: 0.05em;
}

.descripcion-cta {
    font-size: 1.2rem;
    color: var(--color-dorado);
    margin-bottom: 2rem;
}

.botones-cta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.boton-primario,
.boton-secundario {
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.05rem;
}

.boton-primario {
    background: var(--color-dorado);
    color: var(--color-claro);
}

.boton-primario:hover {
    background: #c19560;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(212, 165, 116, 0.3);
}

.boton-secundario {
    background: transparent;
    color: var(--color-claro);
    border: 2px solid var(--color-claro);
}

.boton-secundario:hover {
    background: var(--color-claro);
    color: var(--color-primario);
}

/* =============================================
   RESPONSIVE - AJUSTES ESPECÍFICOS PARA MÓVILES
   ============================================= */
@media (max-width: 768px) {
    /* Hero más compacto en móviles */
    .hero-menus {
        padding: 5rem 0 2.5rem;
        margin-top: 50px;
    }
    
    .titulo-hero {
        font-size: 1.8rem;
    }
    
    .descripcion-hero {
        font-size: 1rem;
    }
    
    /* PDF Viewer con más espacio */
    .seccion-pdf-viewer {
        padding: 2rem 0;
    }
    
    /* Tabs más compactos */
    .menu-tabs {
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .tab-button {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
        min-height: 44px;
    }
    
    /* Controles más compactos */
    .pdf-controls {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        margin-bottom: 1rem;
        gap: 0.5rem;
    }
    
    .pdf-actions {
        justify-content: space-between;
        width: 100%;
        flex-wrap: wrap;
    }
    
    /* Hacer los botones de zoom más grandes y accesibles */
    .zoom-controls {
        display: flex !important;
        gap: 0.5rem;
        justify-content: center;
        align-items: center;
        padding: 0.5rem;
        background: rgba(255, 255, 255, 0.95);
        border-radius: 30px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        order: -1; /* Mover arriba en móviles */
        margin-bottom: 0.5rem;
    }
    
    .boton-control {
        width: 48px !important;
        height: 48px !important;
        font-size: 1.4rem;
        border: 2px solid var(--color-dorado);
        background: white;
        color: var(--color-primario);
        /* Mejorar el área táctil */
        position: relative;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    /* Añadir área táctil extra invisible */
    .boton-control::before {
        content: '';
        position: absolute;
        top: -8px;
        left: -8px;
        right: -8px;
        bottom: -8px;
        z-index: -1;
    }
    
    .boton-control:active {
        background: var(--color-dorado);
        color: white;
        transform: scale(0.95);
    }
    
    .boton-control:disabled {
        opacity: 0.4;
        background: #f0f0f0;
    }
    
    .zoom-value {
        font-weight: 700;
        font-size: 1.1rem;
        min-width: 70px;
        padding: 0 0.5rem;
        color: var(--color-primario);
    }
    
    /* Contenedor con menos padding en móviles */
    .contenedor {
        padding: 0 0.75rem;
    }
    
    /* Contenedor del PDF optimizado para móviles - MÁXIMO ESPACIO */
    .pdf-scroll-container {
        max-height: 80vh !important;
        min-height: 70vh !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
        /* Permitir gestos de zoom y scroll */
        touch-action: pan-y pinch-zoom;
        position: relative;
        /* Menos bordes en móviles */
        border-radius: 8px;
        box-shadow: 0 1px 5px rgba(0, 0, 0, 0.08);
    }
    
    /* Prevenir que las páginas del PDF interfieran con el touch */
    .pdf-pages {
        padding: 1rem 0.5rem;
        /* Transición suave para el preview del zoom */
        transition: transform 0.1s ease-out;
        transform-origin: center top;
        /* Asegurar que el contenido sea scrolleable */
        min-height: 100%;
    }
    
    .pdf-page {
        /* Hacer que los canvas no capturen eventos táctiles */
        pointer-events: none;
        user-select: none;
        -webkit-user-select: none;
        -webkit-touch-callout: none;
        /* Mejorar el renderizado */
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
        /* Sombra más sutil en móviles */
        box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
        margin: 0 auto 1rem;
        display: block;
        max-width: 100%;
        height: auto;
    }
    
    /* Mostrar hint de zoom solo en móviles */
    .zoom-hint {
        display: block;
        font-size: 0.85rem;
        color: var(--color-texto);
        opacity: 0.8;
        margin-top: 0.25rem;
    }
    
    /* Indicador de scroll más visible */
    .scroll-indicator {
        background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.9));
        padding: 1rem 0 2rem;
        position: sticky;
        bottom: 0;
        z-index: 10;
    }
    
    .tab-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
        min-height: 48px;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Info section más compacta */
    .seccion-info {
        padding: 2.5rem 0;
    }
    
    /* Info cards más compactas */
    .grid-info {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .info-card {
        padding: 1.5rem;
    }
    
    .info-icono {
        width: 50px;
        height: 50px;
        margin-bottom: 1rem;
    }
    
    .info-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .info-card p {
        font-size: 0.9rem;
    }
    
    /* CTA */
    .botones-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .boton-primario,
    .boton-secundario {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    /* Botón de descarga optimizado */
    .boton-accion {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
        white-space: nowrap;
    }
    
    .pdf-info {
        flex: 1 1 100%;
        text-align: center;
        margin-bottom: 0.5rem;
        font-size: 0.95rem;
    }
    
    .pdf-actions {
        flex: 1 1 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    /* Hero aún más compacto */
    .hero-menus {
        padding: 4rem 0 2rem;
    }
    
    /* Pantallas muy pequeñas */
    .zoom-controls {
        gap: 0.3rem;
        padding: 0.4rem;
    }
    
    .boton-control {
        width: 44px !important;
        height: 44px !important;
        font-size: 1.2rem;
    }
    
    .zoom-value {
        font-size: 1rem;
        min-width: 60px;
    }
    
    /* PDF con máximo espacio posible */
    .pdf-scroll-container {
        max-height: 75vh !important;
        min-height: 65vh !important;
    }
    
    /* Sección PDF más compacta */
    .seccion-pdf-viewer {
        padding: 1.5rem 0;
    }
    
    /* Hero */
    .titulo-hero {
        font-size: 1.6rem;
    }
    
    .subtitulo-hero {
        font-size: 0.85rem;
    }
    
    .descripcion-hero {
        font-size: 0.9rem;
    }
    
    /* Info cards */
    .info-card {
        padding: 1.5rem 1rem;
    }
    
    .info-icono {
        width: 45px;
        height: 45px;
    }
}

/* Mejorar la experiencia en iPad y tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .zoom-controls {
        display: flex !important;
    }
    
    .boton-control {
        width: 44px;
        height: 44px;
    }
    
    .pdf-scroll-container {
        max-height: 70vh;
    }
}

/* Modo oscuro del navegador */
@media (prefers-color-scheme: dark) {
    .pdf-scroll-container {
        background: #1a1a1a;
        border-color: #333;
    }
    
    .zoom-controls {
        background: rgba(30, 30, 30, 0.95);
    }
    
    .boton-control {
        background: #2a2a2a;
        color: #d4a574;
        border-color: #d4a574;
    }
    
    .boton-control:active {
        background: #d4a574;
        color: #1a1a1a;
    }
}

/* =============================================
   ESTADOS Y ANIMACIONES
   ============================================= */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Error message styles */
.error-message {
    text-align: center;
    padding: 3rem;
    color: var(--color-texto);
}

.error-message button {
    margin-top: 1rem;
    padding: 0.8rem 2rem;
    background: var(--color-dorado);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.error-message button:hover {
    background: #c19560;
    transform: translateY(-2px);
}

/* Indicador de renderizado */
.rendering-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.spinner-small {
    width: 30px;
    height: 30px;
    border: 3px solid var(--color-gris);
    border-top: 3px solid var(--color-dorado);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Indicador de versión actualizada */
.pdf-info .version-badge {
    display: inline-block;
    background: #4CAF50;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-left: 8px;
    animation: pulse 2s ease-in-out;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}