/* ============================================
   CHARANGO - Estilos v2.1
   Responsive Corregido
   ============================================ */

/* ============================================
   RESET Y BASE - CRÍTICO PARA RESPONSIVE
   ============================================ */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Ocultar scrollbar */
::-webkit-scrollbar {
    display: none;
}

html {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Selection */
::selection {
    background-color: #D91023;
    color: white;
}

/* ============================================
   CONTENEDOR PRINCIPAL - PREVENIR OVERFLOW
   ============================================ */

.page-wrapper {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
}

section {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* ============================================
   HEADER - EFECTO GLASS PROFESIONAL
   ============================================ */

.header-default {
    background: transparent;
    backdrop-filter: none;
    border-bottom: 1px solid transparent;
}

.header-scrolled {
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(217, 16, 35, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ============================================
   EFECTOS DE NEÓN
   ============================================ */

.neon-red {
    text-shadow: 
        0 0 10px rgba(217, 16, 35, 0.8), 
        0 0 20px rgba(217, 16, 35, 0.6),
        0 0 40px rgba(217, 16, 35, 0.4);
}

.neon-gold {
    text-shadow: 
        0 0 10px rgba(255, 215, 0, 0.8), 
        0 0 20px rgba(255, 215, 0, 0.6);
}

/* Reducir neón en móviles para mejor rendimiento */
@media (max-width: 640px) {
    .neon-red {
        text-shadow: 
            0 0 5px rgba(217, 16, 35, 0.6), 
            0 0 10px rgba(217, 16, 35, 0.4);
    }
    .neon-gold {
        text-shadow: 
            0 0 5px rgba(255, 215, 0, 0.6);
    }
}

/* ============================================
   OVERLAYS Y FONDOS
   ============================================ */

.hero-overlay {
    background: linear-gradient(
        180deg,
        rgba(5, 5, 5, 0.6) 0%,
        rgba(5, 5, 5, 0.8) 50%,
        rgba(5, 5, 5, 1) 100%
    );
}

/* Spotlights - CONTENIDOS para no causar overflow */
.spotlight {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at center top,
        rgba(217, 16, 35, 0.15) 0%,
        transparent 50%
    );
    pointer-events: none;
}

.spotlight-gold {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at center,
        rgba(255, 215, 0, 0.08) 0%,
        transparent 60%
    );
    pointer-events: none;
}

/* ============================================
   ANIMACIONES
   ============================================ */

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(217, 16, 35, 0.5), 0 0 40px rgba(217, 16, 35, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(217, 16, 35, 0.7), 0 0 60px rgba(217, 16, 35, 0.5);
    }
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* MARQUEE - CONTENIDO DENTRO DEL VIEWPORT */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.marquee {
    display: flex;
    white-space: nowrap;
    animation: marquee 25s linear infinite;
    width: max-content;
}

/* Fade in */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fade-in 0.8s ease-out forwards;
}

/* ============================================
   COMPONENTES INTERACTIVOS
   ============================================ */

.bento-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bento-item:hover {
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(217, 16, 35, 0.2);
}

.feature-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(217, 16, 35, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    border-color: rgba(217, 16, 35, 0.5);
}

/* Flyer container */
.flyer-container {
    transition: all 0.3s ease;
    position: relative;
    display: block;
    max-width: 100%;
}

.flyer-container:hover {
    transform: scale(1.02);
}

.flyer-container img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Nav links underline */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #D91023;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ============================================
   MOBILE MENU
   ============================================ */

.mobile-menu-open {
    overflow: hidden;
}

#mobile-menu {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#mobile-menu.hidden {
    opacity: 0;
    visibility: hidden;
}

#mobile-menu:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   UTILIDADES
   ============================================ */

.glass {
    background: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.img-zoom {
    transition: transform 0.5s ease;
}

.img-zoom:hover {
    transform: scale(1.05);
}

/* ============================================
   RESPONSIVE - MÓVIL PRIMERO
   ============================================ */

/* Imágenes responsivas */
img {
    max-width: 100%;
    height: auto;
}

/* Contenedores fluidos */
.container-fluid {
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container-fluid {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container-fluid {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Texto responsivo para títulos grandes */
@media (max-width: 480px) {
    .hero-title {
        font-size: 3rem !important;
        line-height: 1 !important;
    }
}

@media (min-width: 481px) and (max-width: 640px) {
    .hero-title {
        font-size: 4rem !important;
    }
}

/* ============================================
   STICKY CTA - RESPONSIVE SEGURO
   ============================================ */

.sticky-cta-mobile {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 50;
    padding: 1rem;
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(217, 16, 35, 0.2);
}

.sticky-cta-mobile a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
}

.sticky-cta-desktop {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 50;
}

/* ============================================
   MAP IFRAME RESPONSIVE
   ============================================ */

.map-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 1rem;
}

.map-container iframe {
    width: 100%;
    height: 14rem;
    border: 0;
}

@media (min-width: 640px) {
    .map-container iframe {
        height: 18rem;
    }
}

/* ============================================
   RADIAL BACKGROUNDS - CONTENIDOS
   ============================================ */

.radial-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 600px;
    height: 100%;
    max-height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(217, 16, 35, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

/* ============================================
   ADMIN PANEL
   ============================================ */

.admin-card {
    transition: all 0.3s ease;
}

.admin-card:hover {
    border-color: rgba(217, 16, 35, 0.3);
}

.upload-zone {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: #D91023;
    background: rgba(217, 16, 35, 0.05);
}

.upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* ============================================
   FIXES ESPECÍFICOS PARA EVITAR OVERFLOW
   ============================================ */

/* Hero section */
#inicio {
    width: 100%;
    max-width: 100vw;
}

/* Textos largos */
h1, h2, h3, p {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Elementos absolutos contenidos */
[style*="position: absolute"],
[style*="position:absolute"] {
    max-width: 100%;
}

/* Botones que no se desborden */
button, a {
    max-width: 100%;
}

/* Bento grid en móvil */
@media (max-width: 768px) {
    .bento-item {
        transform: none !important;
    }
    .bento-item:hover {
        transform: none !important;
    }
}

/* Footer spacing para CTA móvil */
.footer-spacing {
    height: 6rem;
}

@media (min-width: 640px) {
    .footer-spacing {
        height: 4rem;
    }
}
