/* ==========================================
   CONFIGURACIÓN GLOBAL Y PARCHES
   ========================================== */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }

body {
    background-color: #050505;
    color: #fff;
    overflow: hidden; 
    cursor: crosshair; 
}

/* Evitar que los teléfonos se pongan azules con línea en móvil u ordenador */
a[href^="tel"], a[href^="tel:"], a[x-apple-data-detectors] {
    color: inherit !important;
    text-decoration: none !important;
}

/* ==========================================
   BLOQUEO ABSOLUTO DEL MENÚ HAMBURGUESA EN PC
   ========================================== */
#menu-toggle, .mobile-menu-btn {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    z-index: -9999 !important;
    pointer-events: none !important;
}

/* ==========================================
   PRELOADER INICIAL
   ========================================== */
#preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background-color: #050505; z-index: 9999;
    display: flex; justify-content: center; align-items: center;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
    perspective: 1000px;
}
#preloader.loaded { opacity: 0; visibility: hidden; }

.preloader-logo {
    pointer-events: none;
    animation: cinematicSpin 2.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes cinematicSpin {
    0% { transform: scale(0.5) rotateY(-180deg); opacity: 0; filter: blur(10px); }
    40% { transform: scale(2.2) rotateY(15deg); opacity: 1; filter: blur(0px) drop-shadow(0 0 30px rgba(255,255,255,0.7)); }
    100% { transform: scale(2) rotateY(0deg); opacity: 1; filter: drop-shadow(0 0 10px rgba(255,255,255,0.2)); }
}

#loader-text {
    position: absolute; bottom: 40px; right: 50px; font-family: 'Courier New', Courier, monospace;
    font-size: 1rem; color: #fff; letter-spacing: 3px; z-index: 10000;
    display: flex; align-items: center; gap: 15px; font-weight: bold;
}
.loading-line { width: 80px; height: 2px; background: rgba(255,255,255,0.2); position: relative; overflow: hidden; }
.loading-line-inner { position: absolute; top: 0; left: 0; height: 100%; background: #fff; width: 0%; transition: width 0.1s linear; }

/* ==========================================
   MOTOR DINÁMICO DE FONDOS
   ========================================== */
#base-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background-size: cover; background-position: center; background-attachment: fixed; z-index: -3;
}
#transition-layer {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    z-index: -2; display: flex; flex-wrap: wrap; pointer-events: none;
}
.bg-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(0, 0, 0, 0.4); z-index: -1;
}
.bg-tile { background-size: cover; background-position: center; background-attachment: fixed; position: absolute; }

/* ==========================================
   LOGO ESTILO ROLLS ROYCE
   ========================================== */
.brand-container {
    margin-bottom: 40px; display: flex; flex-direction: column; align-items: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); cursor: pointer; perspective: 500px;
}
.brand-container:hover { transform: scale(1.1) rotateY(15deg); }

.rr-badge {
    width: 70px; height: 90px;
    background: linear-gradient(135deg, #e6e6e6 0%, #ffffff 40%, #8c8c8c 60%, #e6e6e6 100%);
    border-radius: 6px; padding: 3px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.8), inset 0 0 5px rgba(255,255,255,1);
    position: relative; overflow: hidden;
}
.rr-badge::after {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.9) 50%, transparent 60%);
    animation: metallicSweep 4s infinite linear; pointer-events: none; z-index: 10;
}
@keyframes metallicSweep {
    0% { transform: translateX(-100%) translateY(-100%); }
    100% { transform: translateX(100%) translateY(100%); }
}

.rr-inner {
    width: 100%; height: 100%; background: linear-gradient(180deg, #111 0%, #222 100%);
    border-radius: 4px; display: flex; justify-content: center; align-items: center;
    position: relative; overflow: hidden; border: 1px solid #555;
}
.rr-monogram {
    font-family: 'Times New Roman', Times, serif; color: #e6e6e6; font-size: 2.2rem;
    line-height: 1; position: relative; width: 100%; height: 100%; text-shadow: 1px 1px 2px #000;
}
.letter-a { position: absolute; top: 15px; left: 10px; z-index: 3; color: #fff;}
.letter-d1 { position: absolute; top: 35px; left: 22px; z-index: 2; color: #b3b3b3;}
.letter-d2 { position: absolute; top: 45px; left: 32px; z-index: 1; color: #808080; font-size: 1.8rem;}

.rr-text {
    margin-top: 15px; font-size: 0.75rem; color: #fff; letter-spacing: 2px;
    text-transform: uppercase; font-weight: bold; text-align: center; text-shadow: 0 0 10px rgba(255,255,255,0.4);
}

/* ==========================================
   MENÚ DE NAVEGACIÓN FLOTANTE (ORDENADOR)
   ========================================== */
nav {
    position: fixed; left: 40px; top: 50%; transform: translateY(-50%);
    display: flex; flex-direction: column; gap: 15px; z-index: 100;
    transition: all 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}
nav.hidden {
    transform: translateX(-150%) translateY(-50%);
    opacity: 0; pointer-events: none;
}

nav button:not(#menu-toggle):not(.mobile-menu-btn) {
    background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3); color: white; padding: 12px 25px;
    text-transform: uppercase; font-weight: bold; letter-spacing: 2px;
    cursor: pointer; transition: all 0.3s; text-align: left; border-radius: 5px;
    position: relative; overflow: hidden; font-size: 0.85rem; width: 100%;
}
nav button:not(#menu-toggle):not(.mobile-menu-btn)::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}
nav button:not(#menu-toggle):not(.mobile-menu-btn):hover::before { left: 100%; }
nav button.active-nav { background: white; color: black; box-shadow: 0 0 20px rgba(255,255,255,0.5); transform: translateX(10px); }

/* ==========================================
   BOTÓN ACCESO VIP (ULTRA FINO Y MÁS ARRIBA)
   ========================================== */
.btn-vip-header {
    position: fixed; top: 12px; right: 30px; 
    background: rgba(0, 0, 0, 0.3); backdrop-filter: blur(5px);
    color: #fff; border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 4px 15px; 
    font-size: 0.7rem; letter-spacing: 2px; text-transform: uppercase;
    border-radius: 4px; cursor: pointer; z-index: 100;
    transition: all 0.4s ease; display: flex; align-items: center; gap: 8px;
    overflow: hidden; font-weight: bold;
}
.btn-vip-header::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: #fff; transition: left 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); z-index: -1;
}
.btn-vip-header:hover {
    color: #000; border-color: #fff; box-shadow: 0 0 20px rgba(255, 255, 255, 0.5); transform: translateY(-2px);
}
.btn-vip-header:hover::before { left: 0; }

/* ==========================================
   ARQUITECTURA DE ESCENAS (CRISTAL)
   ========================================== */
.scene-container {
    position: absolute; top: 0; left: 280px; width: calc(100% - 280px); height: 100vh;
    display: flex; justify-content: center; align-items: center;
    z-index: 10; perspective: 1000px;
    transition: all 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}
.scene-container.full-width {
    left: 0; width: 100%;
}
.scene {
    position: absolute; width: 90%; height: 85%;
    background: rgba(20, 20, 20, 0.5); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 20px; box-shadow: 0 30px 60px rgba(0,0,0,0.8);
    padding: 40px 60px; display: flex; flex-direction: column; justify-content: center;
    opacity: 0; visibility: hidden; transform: translateZ(-200px) scale(0.9) rotateY(10deg);
    transition: all 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.scene.active { opacity: 1; visibility: visible; transform: translateZ(0) scale(1) rotateY(0deg); z-index: 20; }

@keyframes itemEnter { 0% { opacity: 0; transform: translateY(40px); } 100% { opacity: 1; transform: translateY(0); } }
.anim-item { opacity: 0; }
.scene.active .anim-item { animation: itemEnter 0.6s ease forwards; }
.scene.active .d1 { animation-delay: 0.2s; }
.scene.active .d2 { animation-delay: 0.4s; }
.scene.active .d3 { animation-delay: 0.6s; }

/* ==========================================
   CUBO RUBIK HORIZONTAL (EJE Y)
   ========================================== */
.cube-scene { width: 400px; height: 160px; perspective: 1500px; margin-bottom: 30px; }
.cube { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transition: transform 1s cubic-bezier(0.77, 0, 0.175, 1); }
.cube-face {
    position: absolute; width: 400px; height: 160px; display: flex; flex-direction: column;
    align-items: flex-start; justify-content: center; padding: 20px 30px;
    background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 10px;
    box-shadow: inset 0 0 20px rgba(255,255,255,0.1); font-size: 2.8rem; font-weight: 900;
    text-transform: uppercase; line-height: 1.1; letter-spacing: -1px; backface-visibility: hidden;
    color: #fff; text-shadow: 0 5px 15px rgba(0,0,0,0.5);
}
.cube-face span { color: #aaa; font-weight: 300; font-size: 2rem;}
.cube-face.front  { transform: rotateY(0deg) translateZ(200px); }
.cube-face.right  { transform: rotateY(90deg) translateZ(200px); }
.cube-face.back   { transform: rotateY(180deg) translateZ(200px); }
.cube-face.left   { transform: rotateY(-90deg) translateZ(200px); }

h2 { font-size: 4rem; margin-bottom: 20px; text-transform: uppercase; letter-spacing: -2px; }
p { font-size: 1.2rem; line-height: 1.6; margin-bottom: 30px; color: #ddd;}

/* ==========================================
   SLIDER DE TEXTO
   ========================================== */
.text-slider-container { display: grid; max-width: 600px; margin-bottom: 30px; }
.text-slide {
    grid-area: 1 / 1; opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    font-size: 1.2rem; line-height: 1.6; color: #ddd; margin-bottom: 0; pointer-events: none;
}
.text-slide.active-text { opacity: 1; transform: translateY(0); pointer-events: auto; }
.text-slide.exit-text { opacity: 0; transform: translateY(-30px); }

/* SLIDESHOW DE LA ESCENA 2 (SOBRE MÍ) */
.slideshow { position: relative; width: 100%; height: 350px; overflow: hidden; border-radius: 10px; border: 1px solid rgba(255,255,255,0.1);}
.slide {
    position: absolute; top:0; left:0; width: 100%; height: 100%; background-size: cover; background-position: center;
    display: flex; align-items: flex-end; padding: 30px; opacity: 0; transition: opacity 1s;
}
.slide.active-slide { opacity: 1; }
.slide-content { background: rgba(0,0,0,0.7); padding: 20px; border-left: 4px solid #fff; backdrop-filter: blur(5px); max-width: 600px;}

.slideshow-controls { position: absolute; top: 20px; right: 20px; z-index: 10; }
.control-btn {
    background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); border: 1px solid rgba(255,255,255,0.3); color: white;
    padding: 8px 15px; border-radius: 20px; cursor: pointer; font-size: 0.9rem; transition: all 0.3s; font-weight: bold; letter-spacing: 1px; text-transform: uppercase;
}
.control-btn:hover { background: rgba(255,255,255,0.2); border-color: #fff; box-shadow: 0 0 10px rgba(255,255,255,0.3); }

/* ==========================================
   TARJETAS PLANES Y PORTAFOLIO (CON EFECTO NEON)
   ========================================== */
.pricing-grid { display: flex; gap: 20px; width: 100%; justify-content: space-between; }
.plan-card {
    background: rgba(255,255,255,0.05); padding: 25px 15px; border-radius: 10px; flex: 1; text-align: center; 
    border: 1px solid rgba(255,255,255,0.1); transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease; position: relative; cursor: pointer; 
}
.plan-card:hover { 
    transform: translateY(-10px); border-color: var(--hover-color, #25D366) !important; background: rgba(37,211,102,0.05); 
    box-shadow: 0 15px 30px rgba(0,0,0,0.5), 0 0 25px var(--hover-color, rgba(37,211,102,0.4)) !important; 
}

.plan-card.popular { background: rgba(255,255,255,0.12); border: 2px solid #25D366; transform: scale(1.05); }
.plan-card.popular:hover { transform: translateY(-10px) scale(1.05); border-color: #25D366; }

.price { font-size: 2.8rem; font-weight: bold; margin: 10px 0; color: #fff; }
.plan-subtitle { font-size: 0.85rem; color: #aaa; height: 35px; margin-bottom: 5px; }
.plan-ideal { font-size: 0.8rem; color: #999; margin-bottom: 10px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 8px;}
.plan-ideal strong { color: #fff; }

.plan-features { list-style: none; margin: 10px 0; text-align: left; padding: 0; }
.plan-features li { margin-bottom: 8px; font-size: 0.9rem; padding-left: 25px; position: relative; color: #ddd; line-height: 1.3;}
.plan-features li::before { content: '✓'; position: absolute; left: 0; color: #25D366; font-weight: bold; font-size: 1rem; }
.plan-badge { background: #25D366; color: #fff; padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: bold; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); text-transform: uppercase; letter-spacing: 1px; }

/* ==========================================
   ACORDEÓN PREGUNTAS FRECUENTES (FAQ)
   ========================================== */
.faq-container { display: flex; flex-direction: column; gap: 15px; width: 100%; margin: 0 auto; max-height: 60vh; overflow-y: auto; padding-right: 15px; }
.faq-container::-webkit-scrollbar { width: 6px; }
.faq-container::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; }

.faq-item { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; transition: all 0.3s; }
.faq-item:hover { border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.1); }
.faq-question { padding: 20px; cursor: pointer; font-size: 1.05rem; font-weight: bold; display: flex; justify-content: space-between; align-items: center; letter-spacing: 0.5px; color: #fff; }
.faq-question::after { content: '+'; font-size: 1.8rem; transition: transform 0.3s; line-height: 0; }
.faq-item.active .faq-question::after { transform: rotate(45deg); color: #25D366; }
.faq-item.active { border-color: #25D366; background: rgba(37, 211, 102, 0.05); }

.faq-answer { padding: 0 20px; max-height: 0; opacity: 0; overflow: hidden; transition: all 0.4s ease-in-out; color: #ccc; font-size: 0.95rem; line-height: 1.6; }
.faq-item.active .faq-answer { padding: 0 20px 20px 20px; max-height: 500px; opacity: 1; }
.faq-answer strong { color: #fff; }
.faq-answer em { color: #25D366; font-style: normal; }
.faq-link { color: #25D366; text-decoration: none !important; font-weight: bold; transition: color 0.3s; }
.faq-link:hover { color: #fff; text-shadow: 0 0 10px rgba(37, 211, 102, 0.6); }

/* ==========================================
   BOTONES Y FORMULARIOS GLOBALES
   ========================================== */
.btn-action {
    padding: 12px 20px; font-size: 1rem; cursor: pointer; border: none; background: #fff; color: #000;
    font-weight: bold; border-radius: 8px; text-transform: uppercase; transition: all 0.3s; display: inline-block; 
    text-align: center; text-decoration: none !important;
}
.btn-action:hover { box-shadow: 0 0 20px rgba(255,255,255,0.6); transform: scale(1.02); }

.contact-input {
    padding: 12px 15px; background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.2); 
    color: #fff; border-radius: 5px; outline: none; transition: all 0.3s; width: 100%;
}
.contact-input:focus { border-color: #fff; background: rgba(255,255,255,0.1); }
select.contact-input option { background: #111; color: #fff; }

/* ==========================================
   WIPE DE ESCENAS (TRANSICIÓN LOGO)
   ========================================== */
.wipe-transition {
    position: fixed; top: 0; left: -100%; width: 100%; height: 100vh;
    background-color: #050505; z-index: 999; transition: left 0.6s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex; justify-content: center; align-items: center;
}
.wipe-transition.play { left: 0; }
.wipe-transition.finish { left: 100%; }
.wipe-logo-wrapper { display: flex; flex-direction: column; align-items: center; opacity: 0; transform: scale(1); transition: all 0.5s ease; }
.wipe-transition.play .wipe-logo-wrapper { opacity: 1; transform: scale(3.5); transition-delay: 0.2s; }
.wipe-transition.finish .wipe-logo-wrapper { opacity: 0; transform: scale(4.5); transition-delay: 0s; }
.wipe-logo-wrapper .rr-text { color: #fff; text-shadow: 0 5px 15px rgba(0,0,0,0.9); margin-top: 20px; }

/* ==========================================
   MODALES (PORTAFOLIO, GALERÍA, LASER, LIGHTBOX)
   ========================================== */
#portfolio-modal, #plan-details-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    z-index: 10000; display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: opacity 0.4s ease;
}
#portfolio-modal.active-modal, #plan-details-modal.active { opacity: 1; visibility: visible; }

.portfolio-laser-box, .laser-box {
    position: relative; width: 90%; border-radius: 20px; padding: 3px; background: #111;
    transform: scale(0.7) rotateX(25deg); opacity: 0; transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease; overflow: hidden;
}
.portfolio-laser-box { max-width: 600px; }
.laser-box { max-width: 500px; box-shadow: 0 25px 60px rgba(0,0,0,0.9), 0 0 30px rgba(37, 211, 102, 0.3); }

#portfolio-modal.active-modal .portfolio-laser-box, #plan-details-modal.active .laser-box { transform: scale(1) rotateX(0deg); opacity: 1; }

.portfolio-laser-box::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: conic-gradient(transparent, transparent, transparent, var(--laser-color, #fff)); animation: laserRotate 3s linear infinite;
}
.laser-box::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: conic-gradient(transparent, transparent, transparent, #25D366); animation: laserRotate 3s linear infinite;
}
@keyframes laserRotate { 100% { transform: rotate(360deg); } }

.portfolio-laser-inner, .laser-inner { position: relative; background: #121212; border-radius: 18px; padding: 40px; z-index: 2; }
.portfolio-laser-inner .modal-title, .portfolio-laser-inner .modal-price, .portfolio-laser-inner p, .laser-inner { text-align: center; }

.close-modal, .close-laser {
    position: absolute; top: 20px; right: 25px; font-size: 2rem; color: #fff; cursor: pointer; transition: transform 0.3s, color 0.3s; line-height: 1; z-index: 50;
}
.close-modal:hover { transform: rotate(90deg); color: var(--laser-color, #25D366); }
.close-laser:hover { transform: rotate(90deg); color: #25D366; }

.modal-title, .laser-title { font-size: 2.2rem; margin-bottom: 5px; color: #fff; text-transform: uppercase; letter-spacing: -1px; }
.modal-price, .laser-price { font-size: 2rem; font-weight: bold; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 15px;}
.laser-price { color: #25D366; }
.laser-info { margin-bottom: 30px; color: #ccc; font-size: 0.95rem; line-height: 1.6; text-align: left; }

.portfolio-list { 
    list-style: none; margin-bottom: 20px; text-align: left; padding-left: 10px; display: grid; grid-template-rows: repeat(4, auto); grid-auto-flow: column; gap: 12px 30px;
}
.portfolio-list li { font-size: 0.95rem; position: relative; opacity: 0; transform: translateY(20px); transition: all 0.4s ease; display: flex; align-items: center; }
#portfolio-modal.active-modal .portfolio-list li { opacity: 1; transform: translateY(0); }
#portfolio-modal.active-modal .portfolio-list li:nth-child(1) { transition-delay: 0.1s; }
#portfolio-modal.active-modal .portfolio-list li:nth-child(2) { transition-delay: 0.15s; }
#portfolio-modal.active-modal .portfolio-list li:nth-child(3) { transition-delay: 0.2s; }
#portfolio-modal.active-modal .portfolio-list li:nth-child(4) { transition-delay: 0.25s; }
#portfolio-modal.active-modal .portfolio-list li:nth-child(5) { transition-delay: 0.3s; }
#portfolio-modal.active-modal .portfolio-list li:nth-child(6) { transition-delay: 0.35s; }
#portfolio-modal.active-modal .portfolio-list li:nth-child(7) { transition-delay: 0.4s; }
#portfolio-modal.active-modal .portfolio-list li:nth-child(8) { transition-delay: 0.45s; }
.portfolio-link { color: #ccc; text-decoration: none !important; display: inline-flex; align-items: center; transition: all 0.3s; font-weight: normal; letter-spacing: 0.5px; }
.portfolio-link:hover { color: #fff; transform: translateX(10px); text-shadow: 0 0 15px var(--laser-color, rgba(255,255,255,0.7)); }

#gallery-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(0, 0, 0, 0.95); z-index: 10001;
    display: flex; justify-content: center; align-items: center; flex-direction: column; opacity: 0; visibility: hidden; transition: opacity 0.4s ease; overflow-y: auto; padding: 40px 20px;
}
#gallery-modal.active { opacity: 1; visibility: visible; }
.gallery-title { color: #fff; font-size: 2rem; margin-bottom: 30px; text-transform: uppercase; letter-spacing: 1px; text-align: center; }
.gallery-container { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 600px; width: 100%; }
.gallery-container img { width: 100%; height: 200px; border-radius: 8px; object-fit: cover; box-shadow: 0 10px 30px rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.1); transition: transform 0.4s ease, border-color 0.4s ease; cursor: zoom-in; }
.gallery-container img:hover { transform: scale(1.05); border-color: #25D366; }
.close-gallery { position: fixed; top: 20px; right: 30px; font-size: 3rem; color: #fff; cursor: pointer; z-index: 10002; transition: transform 0.3s; line-height: 1; }
.close-gallery:hover { transform: scale(1.2) rotate(90deg); color: #25D366; }

#image-lightbox {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(0, 0, 0, 0.98); z-index: 10005;
    display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: opacity 0.4s ease; cursor: zoom-out;
}
#image-lightbox.active { opacity: 1; visibility: visible; }
#image-lightbox img { max-width: 90%; max-height: 90vh; border-radius: 10px; box-shadow: 0 15px 50px rgba(0,0,0,0.9); border: 1px solid rgba(255,255,255,0.2); object-fit: contain; }
.close-lightbox { position: absolute; top: 20px; right: 30px; font-size: 3rem; color: #fff; transition: transform 0.3s; line-height: 1; pointer-events: none; }
#image-lightbox:hover .close-lightbox { color: #25D366; transform: scale(1.2); }


/* ==========================================
   DASHBOARD GLOBAL: LIBERACIÓN DE SCROLL Y LOGO
   ========================================== */
.scene-container.full-width {
    display: block !important; /* MATA EL FLEXBOX QUE ESCONDÍA EL LOGO Y EL CONTENIDO POR ARRIBA */
    overflow: auto !important;
    height: 100vh !important;
    padding-top: 0 !important; 
    z-index: 99999 !important; 
}

#dashboard.scene {
    position: relative !important; 
    top: 0 !important; left: 0 !important;
    width: 100% !important;
    height: auto !important; 
    min-height: 100vh !important;
    border-radius: 0 !important; 
    border: none !important; 
    padding: 0 !important;
    background: #050505 !important;
    overflow: visible !important; 
    display: block !important;
    margin: 0 !important;
    transform: none !important; /* MATA ANIMACIONES INICIALES QUE LO DESPLAZAN */
}

.dashboard-container { 
    width: 100%; 
    min-height: 100vh; 
    margin: 0; 
    display: flex; 
    flex-direction: column; 
}

.dashboard-sidebar {
    background: #0a0a0a; 
    border-right: 1px solid rgba(255, 255, 255, 0.1); 
    padding: 40px 30px; 
    display: flex; 
    flex-direction: column; 
    height: auto; 
    box-shadow: 10px 0 30px rgba(0,0,0,0.5); 
    z-index: 5;
}

/* FORZAR LA VISIBILIDAD DEL LOGO DEL DASHBOARD (PC Y MÓVIL) */
.dashboard-sidebar .brand-container {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-bottom: 30px !important;
}

.dashboard-main {
    padding: 30px; 
    display: flex; 
    flex-direction: column; 
    height: auto; 
    min-height: 600px;
    background: radial-gradient(circle at center, #1a1a1a 0%, #050505 100%);
}

.client-info h2 { font-size: 1.6rem; margin-bottom: 5px; letter-spacing: 0; text-transform: none; color: #fff; }
.client-info p { color: #aaa; margin-bottom: 30px; font-size: 0.9rem; }

.preview-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 15px; }
.device-toggles { display: flex; gap: 10px; }
.device-btn { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.2); color: #fff; padding: 8px 15px; border-radius: 5px; cursor: pointer; transition: all 0.2s; outline: none; }
.device-btn.active { background: #fff; color: #000; font-weight: bold; }

#dash-fullscreen-link {
    color: #25D366; text-decoration: none !important; font-size: 0.85rem; display: flex; align-items: center; gap: 6px; 
    padding: 4px 12px; background: rgba(37,211,102,0.1); border: 1px solid rgba(37,211,102,0.2); border-radius: 4px; transition: all 0.3s;
}
#dash-fullscreen-link:hover {
    background: rgba(37,211,102,0.2); text-shadow: 0 0 8px rgba(37, 211, 102, 0.6);
}

.iframe-wrapper { 
    width: 100%; flex: 1; background: #fff; border-radius: 10px; overflow: hidden; 
    transition: width 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); margin: 0 auto; 
    border: 1px solid rgba(255,255,255,0.2); box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}
iframe { width: 100%; height: 100%; border: none; }
.action-bar { display: flex; gap: 15px; margin-top: 20px; justify-content: flex-end; }

/* RECUPERAR GRID Y SCROLL SEPARADO PARA DASHBOARD EN PC */
@media (min-width: 901px) {
    .scene-container.full-width {
        overflow: hidden !important; 
    }
    #dashboard.scene {
        height: 100vh !important;
        overflow: hidden !important;
    }
    .dashboard-container { 
        display: grid !important; 
        grid-template-columns: 350px 1fr !important; 
        height: 100vh !important;
    }
    .dashboard-sidebar {
        height: 100vh !important;
        overflow-y: auto !important; 
    }
    .dashboard-main {
        height: 100vh !important;
        overflow-y: auto !important; 
    }
}


/* ==========================================
   ADAPTACIÓN EXCLUSIVA PARA MÓVILES (MAX-WIDTH: 900px)
   ========================================== */
@media (max-width: 900px) {
    /* EL BOTÓN HAMBURGUESA NACE EN MÓVIL Y REEMPLAZA AL MENÚ */
    #menu-toggle, .mobile-menu-btn {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 10000 !important;
        pointer-events: auto !important;
        background: transparent !important;
        border: none !important;
        color: white !important;
        padding: 12px !important; border-radius: 5px; font-size: 1.1rem;
        cursor: pointer; text-align: center; font-weight: bold; 
        text-transform: uppercase; letter-spacing: 2px;
        width: 100%;
    }

    /* Menú superior limpio */
    nav {
        top: 15px; left: 15px; transform: none;
        width: calc(100% - 30px);
        background-color: #050505 !important; 
        padding: 10px; border-radius: 8px;
        border: none !important;
        box-shadow: 0 10px 30px rgba(0,0,0,1);
        gap: 5px;
        z-index: 9999;
    }
    
    /* Ocultamos SOLO el logo del menú principal (NO EL DEL DASHBOARD) */
    nav .brand-container {
        display: none !important;
    }
    
    /* El botón VIP se mueve a la esquina inferior derecha */
    .btn-vip-header {
        top: auto !important;
        bottom: 12px !important;
        right: 12px !important;
        transform: scale(0.85);
        transform-origin: bottom right;
        background: rgba(0, 0, 0, 0.8);
        border: 1px solid rgba(255, 255, 255, 0.3);
        box-shadow: 0 5px 15px rgba(0,0,0,0.9);
        z-index: 1000;
    }
    
    nav button:not(#menu-toggle):not(.mobile-menu-btn) {
        display: none !important;
    }
    
    nav.mobile-open button:not(#menu-toggle):not(.mobile-menu-btn) {
        display: block !important;
        animation: itemEnter 0.3s ease forwards;
    }
    
    /* ALINEACIÓN DESDE ARRIBA PARA EVITAR QUE SE COMA CONTENIDO AL HACER SCROLL */
    .scene-container { 
        left: 0; width: 100%; padding-top: 75px; 
        align-items: flex-start !important; 
    }
    
    .scene-container.full-width {
        padding-top: 0 !important;
    }
    
    .scene { 
        width: 100%; 
        height: calc(100vh - 75px); 
        min-height: auto;
        border-radius: 0; 
        border-left: none; border-right: none;
        padding: 30px 15px 150px 15px !important; 
        overflow-y: auto !important; 
        -webkit-overflow-scrolling: touch; 
        justify-content: flex-start !important; 
    }
    
    #dashboard.scene {
        padding: 0 !important;
    }
    
    .scene::-webkit-scrollbar { width: 4px; }
    .scene::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 4px; }

    .cube-scene { width: 100%; max-width: 100%; height: 100px; margin-bottom: 30px; margin-top: 10px; }
    .cube-face { width: 100%; height: 100px; font-size: 1.5rem; padding: 15px; }
    .cube-face span { font-size: 1.2rem; }
    .text-slide { font-size: 1rem; } 
    
    .slideshow { height: 450px; } 
    .slide-content { padding: 15px; }
    .slide-content h3 { font-size: 1.2rem !important; margin-bottom: 5px !important; }
    .slide-content p { font-size: 0.9rem; line-height: 1.4; margin-bottom: 0; }
    
    .pricing-grid { flex-direction: column; gap: 20px; }
    .scene h2 { font-size: 2rem; margin-bottom: 20px; }
    
    /* MODALES ADAPTADOS */
    .portfolio-laser-box, .laser-box {
        max-height: 85vh;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .portfolio-list {
        grid-template-rows: auto !important;
        grid-template-columns: 1fr !important;
        grid-auto-flow: row !important;
        gap: 12px !important; 
    }
    
    .portfolio-link {
        font-size: 0.9rem !important; 
        padding: 8px 0;
    }
    
    /* DASHBOARD MÓVIL SEGURO */
    .dashboard-container { 
        grid-template-columns: 1fr; 
        display: flex;
        flex-direction: column; 
        height: auto; 
        min-height: 100vh;
    }
    
    .dashboard-sidebar {
        height: auto !important; 
        min-height: auto !important;
        padding-bottom: 20px;
        overflow-y: visible !important;
    }
    
    .dashboard-main {
        height: auto !important; 
        min-height: 600px !important;
        padding: 30px 15px 120px 15px !important; 
        overflow-y: visible !important;
    }
    
    .iframe-wrapper { 
        min-height: 50vh; 
    }
}