/* =========================================
   1. VARIABLES GLOBALES & RESET
   ========================================= */
:root {
  --font: system-ui, -apple-system, 'Inter', sans-serif;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  
  /* Colores de Marca */
  --brand-notebook: #03A9F4; 
  --brand-mac: #FF9800;      
  --brand-gamer: #00ff88;    
  --brand-drone: #F44336;    
  --brand-biz: #9C27B0;      
  --brand-spec: #607D8B;     
  
  --ink: #0f172a;
  --muted: #64748b;
  --bg-core: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

/* Eliminamos estilos que puedan afectar al body global de WP */
body {
  margin: 0;
  padding: 0;
  overscroll-behavior-y: none;
}

/* Ocultar Desktop por defecto (Mobile First) */
#desktop-hero-system { display: none; }
#mobile-hero-system { display: block; width: 100%; height: 100dvh; }


/* =========================================
   2. ESTILOS MOBILE (STORIES)
   ========================================= */
.story-container { width: 100%; height: 100dvh; position: relative; overflow: hidden; background: #000; }

.slider-track {
  display: flex; width: 100%; height: 100%; overflow-x: scroll; 
  scroll-snap-type: x mandatory; scrollbar-width: none; 
  -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.slider-track::-webkit-scrollbar { display: none; }

.slide {
  flex: 0 0 100%; height: 100%; scroll-snap-align: center; scroll-snap-stop: always;
  position: relative; overflow: hidden;
}

/* Ajustes de imágenes Mobile */
.slide-bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transform: scale(1); transition: transform 7s ease; pointer-events: none; 
}
.slide.active .slide-bg { transform: scale(1.15); }
.slide[data-index="0"] .slide-bg, .slide[data-index="1"] .slide-bg { height: 120%; top: -20%; } 

.slide-overlay {
    position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 60%);
    z-index: 1;
}

/* UI Mobile */
.slide-content {
  position: absolute; bottom: 30px; left: 15px; right: 15px; z-index: 10;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}

.glass-card-mb {
  pointer-events: auto; padding: 24px 20px; border-radius: 24px;
  transform: translateY(20px); opacity: 0; transition: all 0.6s var(--ease-out) 0.1s;
  background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.8); color: #1e293b;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.slide.active .glass-card-mb { transform: translateY(0); opacity: 1; }

.slide.theme-dark .glass-card-mb {
  background: rgba(10, 15, 12, 0.85); color: #fff;
  border: 1px solid rgba(0, 255, 136, 0.4);
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.2);
}

.badge-mb {
  display: inline-block; padding: 4px 10px; border-radius: 99px;
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 10px; background: #fff; color: #000; border: 1px solid rgba(0,0,0,0.1);
}
.slide.theme-dark .badge-mb { background: rgba(0,255,136,0.15); color: var(--brand-gamer); border-color: var(--brand-gamer); }

.h2-mb { font-size: 28px; font-weight: 900; line-height: 1.1; margin-bottom: 8px; letter-spacing: -0.5px; }
.p-mb { font-size: 14px; line-height: 1.5; margin-bottom: 18px; opacity: 0.9; }

.btn-action-mb {
  display: flex; justify-content: center; align-items: center; width: 100%; padding: 14px;
  border-radius: 99px; text-decoration: none;
  font-weight: 800; font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px;
  color: white; box-shadow: 0 8px 20px rgba(0,0,0,0.15); transition: transform 0.2s;
}
.btn-action-mb:active { transform: scale(0.96); }

.indicators-mb {
  position: absolute; top: 100px; left: 15px; right: 15px; z-index: 20; display: flex; gap: 6px; pointer-events: none;
}
.bar-mb { flex: 1; height: 3px; border-radius: 4px; background: rgba(255,255,255,0.3); overflow: hidden; }
.fill-mb { width: 0%; height: 100%; background: #fff; transition: width 0s; }
.bar-mb.filled .fill-mb { width: 100%; }


/* =========================================
   3. ESTILOS DESKTOP (3D LAB)
   ========================================= */
@media (min-width: 1024px) {
    
    #mobile-hero-system { display: none !important; }
    
    /* Contenedor Principal (Aísla el color de fondo) */
    #desktop-hero-system { 
        display: flex; width: 100%; height: 100dvh; 
        position: relative; overflow: hidden;
        transition: background-color 0.8s ease-in-out;
        background-color: var(--bg-core); /* Color base */
    }

    /* --- PROTECCIÓN DE HEADER (Cortina) --- */
    .header-overlay-dt {
      position: absolute; top: 0; left: 0; width: 100%; height: 250px;
      background: linear-gradient(to bottom, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
      z-index: 5; pointer-events: none; transition: opacity 0.5s;
    }

    /* --- MODO DARK (AISLADO) --- */
    /* Usamos el ID del contenedor para no afectar al body global */
    #desktop-hero-system.dark-mode {
      --ink: #ffffff; 
      --muted: #94a3b8; 
    }
    
    /* Ajuste del degradado en modo dark para que no corte brusco */
    #desktop-hero-system.dark-mode .header-overlay-dt {
        background: linear-gradient(to bottom, rgba(255,255,255,0.95) 0%, rgba(51, 70, 102, 0) 100%);
    }

    #desktop-hero-system.dark-mode .h1-dt { color: #fff; }
    #desktop-hero-system.dark-mode .p-dt { color: #cbd5e1; }
    
    #desktop-hero-system.dark-mode .ui-card-dt { 
        background: rgba(20, 25, 30, 0.9); 
        border: 1px solid rgba(0, 255, 136, 0.4); 
        color: #fff; 
        box-shadow: 0 0 25px rgba(0, 255, 136, 0.2); 
    }
    
    #desktop-hero-system.dark-mode .badge-pill-dt { 
        background: rgba(0, 255, 136, 0.15); 
        border-color: rgba(0, 255, 136, 0.6); 
        color: #00ff88; 
        box-shadow: 0 0 15px rgba(0, 255, 136, 0.3); 
    }
    
    #desktop-hero-system.dark-mode .ambient-light-dt { mix-blend-mode: screen; opacity: 0.5; }
    
    #desktop-hero-system.dark-mode .hero-dock-dt { 
        background: #485b7a; 
        border-color: rgba(255, 255, 255, 0.15); 
    }
    
    #desktop-hero-system.dark-mode .dock-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }

    /* FONDOS */
    .bg-manager-dt { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
    .bg-layer-dt { position: absolute; inset: 0; opacity: 0; transition: opacity 1s; }
    .bg-layer-dt.active { opacity: 1; }

    .bg-notebook-dt { background-image: linear-gradient(rgba(14,165,233,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(14,165,233,0.05) 1px, transparent 1px); background-size: 40px 40px; }
    .bg-mac-dt { background: radial-gradient(circle at center, rgba(255,247,237,0.5) 0%, transparent 70%); }
    
    /* TU COLOR GAMER: #334666 */
    .bg-gamer-dt { 
        background-color: #334666; 
        background-image: linear-gradient(rgba(0,255,136,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(0,255,136,0.05) 1px, transparent 1px); 
        background-size: 50px 50px; 
    }
    
    .bg-drone-dt { background-image: radial-gradient(#fef2f2 1px, transparent 1px); background-size: 30px 30px; }
    .bg-business-dt { background-image: repeating-linear-gradient(45deg, rgba(245,243,255,0.5) 0, rgba(245,243,255,0.5) 2px, transparent 0, transparent 50%); background-size: 20px 20px; }
    .bg-special-dt { background-color: #f8fafc; background-image: radial-gradient(#cbd5e1 0.5px, transparent 0.5px); background-size: 10px 10px; }

    .ambient-light-dt {
      position: absolute; top: -30%; right: -20%; width: 1000px; height: 1000px;
      background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, transparent 60%);
      filter: blur(80px); z-index: -1; transition: background 1.2s; animation: pulse-light 6s infinite;
    }
    @keyframes pulse-light { 0%, 100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.05); opacity: 1; } }

    /* LAYOUT */
    .hero-wrapper-dt {
      display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px;
      max-width: 1440px; width: 100%; margin: 0 auto; padding: 0 40px;
      align-items: center; position: relative; z-index: 10; height: 100%;
    }

    /* UI */
    .hero-content-dt { z-index: 10; padding-right: 20px; }
    .badge-pill-dt {
      display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; 
      font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 24px;
      background: rgba(255,255,255,0.8); border: 1px solid rgba(0,0,0,0.1); color: var(--ink);
      box-shadow: 0 2px 10px rgba(0,0,0,0.05); transition: all 0.5s;
    }
    .badge-dot-dt { width: 8px; height: 8px; border-radius: 50%; transition: background 0.8s; }
    
    .h1-dt { font-size: 64px; line-height: 1.1; font-weight: 900; margin: 0 0 24px; letter-spacing: -2px; color: var(--ink); transition: color 0.5s; }
    .gradient-text-dt { background: linear-gradient(135deg, var(--ink) 30%, var(--muted) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; transition: opacity 0.4s; }
    
    .p-dt { font-size: 20px; color: var(--muted); line-height: 1.6; max-width: 500px; margin: 0 0 40px; transition: opacity 0.4s, color 0.5s; }
    
    .btn-group-dt { display: flex; gap: 16px; }
    .btn-primary-dt { padding: 16px 32px; border-radius: 99px; color: #fff; font-weight: 800; text-decoration: none; font-size: 16px; transition: all 0.8s; box-shadow: 0 4px 20px rgba(0,0,0,0.15); display: flex; align-items: center; justify-content: center; }
    .btn-primary-dt:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,0.2); }
    .btn-secondary-dt { padding: 16px 32px; background: rgba(255,255,255,0.5); color: var(--ink); border: 1px solid rgba(0,0,0,0.1); border-radius: 99px; font-weight: 700; text-decoration: none; font-size: 16px; transition: background 0.2s, color 0.5s; display: flex; align-items: center; gap: 8px; }
    
    /* VISUALES 3D */
    .hero-visual-dt { position: relative; height: 100%; display: flex; align-items: center; justify-content: center; perspective: 1000px; }
    .hero-visual-scenes-dt { position: relative; width: 100%; height: 600px; }
    
    .parallax-scene-dt { opacity: 0; transition: opacity 0.8s ease-out; position: absolute; inset: 0; transform-style: preserve-3d; pointer-events: none; }
    .parallax-scene-dt.active { opacity: 1; pointer-events: auto; }

    .obj-layer-dt { position: absolute; transition: transform 0.1s linear; display: flex; align-items: center; justify-content: center; }
    
    .main-img-card-dt {
        border-radius: 24px; background-size: cover; background-position: center;
        box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15); border: 4px solid #fff;
        transition: border-color 0.5s, box-shadow 0.5s;
    }
    
    /* Borde Gamer dentro del Hero */
    #desktop-hero-system.dark-mode .main-img-card-dt { 
        border: 3px solid #00ff88; 
        box-shadow: 0 0 20px rgba(0, 255, 136, 0.6), 0 0 60px rgba(0, 255, 136, 0.3), inset 0 0 10px rgba(0, 255, 136, 0.2); 
    }

    .ui-card-dt {
        background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(12px);
        border: 1px solid rgba(0,0,0,0.05); border-radius: 16px; padding: 16px;
        box-shadow: 0 10px 30px -5px rgba(0,0,0,0.1);
        font-size: 12px; font-weight: 600; color: var(--muted);
        display: flex; align-items: center; gap: 10px;
        transition: all 0.5s;
    }

    .float-icon-dt {
        width: 80px; height: 80px; background: #fff; border-radius: 20px;
        display: grid; place-items: center; box-shadow: 0 20px 40px rgba(0,0,0,0.1);
        font-size: 32px; transition: background 0.5s, color 0.5s, box-shadow 0.5s;
    }
    #desktop-hero-system.dark-mode .float-icon-dt { background: rgba(25, 30, 40, 0.9); color: #fff; box-shadow: 0 0 25px rgba(0,255,136,0.5); border: 1px solid rgba(0,255,136,0.3); }
    
    .stats-card-dt {
      background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(14px);
      border-radius: 18px; border: 1px solid rgba(15, 23, 42, 0.06);
      padding: 16px 18px; box-shadow: 0 18px 40px -16px rgba(15, 23, 42, 0.35);
      display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 200px;
      transition: all 0.5s;
    }
    .stats-card-dt .stat-num { font-size: 26px; line-height: 1.1; font-weight: 900; color: var(--brand-notebook); transition: color 0.5s; }
    .stats-card-dt .stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; transition: color 0.5s; }
    .stats-card-dt .stat-label span { display: block; margin-top: 2px; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--ink); transition: color 0.5s; }

    /* POSICIONAMIENTO DE CAPAS */
    .scene-notebook-dt .layer-1 { top: 10%; left: 5%; width: 75%; height: 65%; z-index: 1; }
    .scene-notebook-dt .layer-2 { bottom: 15%; right: 10%; z-index: 3; } 
    .scene-notebook-dt .layer-3 { top: auto; bottom: 20%; right: 90%; z-index: 2; transform: rotate(15deg);} 
    .scene-notebook-dt .layer-4 { bottom: 10%; left: 5%; z-index: 4; }

    .scene-mac-dt .layer-1 { top: 15%; left: 15%; width: 65%; height: 65%; z-index: 2; border-radius: 40px; border: none; box-shadow: 0 40px 80px rgba(249, 115, 22, 0.2); }
    .scene-mac-dt .layer-2 { top: 10%; right: 15%; z-index: 3; }
    .scene-mac-dt .layer-3 { bottom: 20%; left: 10%; z-index: 3; }

    .scene-gamer-dt .layer-1 { top: 20%; left: 10%; width: 65%; height: 55%; z-index: 1; transform: rotate(-3deg); }
    .scene-gamer-dt .layer-2 { top: 5%; right: 10%; z-index: 3; }
    .scene-gamer-dt .layer-3 { bottom: 15%; right: 25%; z-index: 2; }

    .scene-drone-dt .layer-1 { top: 15%; left: 15%; width: 70%; height: 55%; z-index: 1; border-radius: 100px; }
    .scene-drone-dt .layer-2 { inset: 0; z-index: 2; pointer-events: none; border: 2px dashed rgba(239, 68, 68, 0.3); border-radius: 24px; margin: 60px; }
    .scene-drone-dt .layer-3 { bottom: 10%; left: 35%; z-index: 3; }

    .scene-business-dt .layer-1 { top: 10%; left: 25%; width: 50%; height: 45%; z-index: 1; opacity: 0.6; transform: scale(0.9); }
    .scene-business-dt .layer-2 { top: 15%; left: 20%; width: 50%; height: 45%; z-index: 2; opacity: 0.8; transform: scale(0.95); }
    .scene-business-dt .layer-3 { top: 20%; left: 15%; width: 50%; height: 45%; z-index: 3; }
    .scene-business-dt .layer-4 { bottom: 25%; right: 10%; z-index: 4; }

    .scene-special-dt .layer-1 { top: 15%; left: 15%; width: 70%; height: 60%; z-index: 1; }
    .scene-special-dt .layer-2 { top: 35%; left: 35%; width: 180px; height: 180px; border-radius: 50%; border: 4px solid rgba(255,255,255,0.5); backdrop-filter: brightness(1.2) scale(1.1); z-index: 2; box-shadow: 0 20px 50px rgba(0,0,0,0.2); }

    .hero-dock-dt {
      position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); z-index: 50;
      display: flex; gap: 8px; padding: 8px; background: rgba(255, 255, 255, 0.8);
      backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
      border: 1px solid rgba(0,0,0,0.05); border-radius: 100px;
      box-shadow: 0 10px 30px rgba(0,0,0,0.1); transition: background 0.5s, border-color 0.5s;
    }
    .dock-btn {
      border: none; background: transparent; padding: 10px 20px; border-radius: 99px;
      font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; transition: all 0.3s;
      display: flex; align-items: center; gap: 6px;
    }
    .dock-btn:hover { background: rgba(0,0,0,0.03); color: var(--ink); }
    .dock-btn.active { background: #0f172a; color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
    .dock-btn svg { width: 16px; height: 16px; stroke-width: 2.5px; }
}

/* =========================================
   4. AJUSTE RESPONSIVE (LAPTOPS & HD)
   ========================================= */

/* Esta regla se activa si el ancho es menor a 1440px 
   O si la altura es menor a 800px (típico de notebooks 1366x768) */
@media (max-width: 1440px), (max-height: 850px) {

    /* 1. Reducimos el contenedor principal */
    .hero-wrapper-dt {
        max-width: 1100px;      /* Más angosto */
        gap: 30px;              /* Menos espacio entre texto y 3D */
        padding: 0 30px;        /* Menos padding lateral */
    }

    /* 2. Achicamos la tipografía drásticamente */
    .h1-dt {
        font-size: 42px;        /* De 64px bajamos a 42px */
        margin-bottom: 16px;
    }
    
    .p-dt {
        font-size: 16px;        /* De 20px bajamos a 16px */
        margin-bottom: 24px;
        line-height: 1.4;
    }

    .badge-pill-dt {
        margin-bottom: 16px;    /* Pegamos más el badge al título */
        padding: 4px 12px;
        font-size: 11px;
    }

    /* 3. EL CAMBIO MÁS IMPORTANTE: El alto de la escena 3D */
    /* Tu original tenía 600px fijo, eso rompe las laptops */
    .hero-visual-scenes-dt {
        height: 400px;          /* Bajamos a 400px para que entre en pantalla */
    }

    /* 4. Ajustamos los elementos flotantes (imágenes) para el nuevo tamaño */
    .obj-layer-dt.main-img-card-dt {
        border-radius: 16px;    /* Bordes menos redondeados */
    }
    
    /* Re-escalamos iconos flotantes */
    .float-icon-dt {
        width: 60px; height: 60px; 
        font-size: 24px;
    }
    
    /* Re-escalamos tarjetas de stats */
    .stats-card-dt {
        padding: 10px 14px;
        min-width: 140px;
    }
    .stats-card-dt .stat-num { font-size: 20px; }
    
    /* 5. Ajustamos el Dock (Menú inferior) */
    .hero-dock-dt {
        bottom: 50px;           /* Lo subimos un poco */
        padding: 6px;
    }
    .dock-btn {
        padding: 8px 14px;
        font-size: 12px;
    }
}

/* =========================================
   5. AJUSTE EXTREMO (NETBOOKS / TABLETS LANDSCAPE)
   ========================================= */
/* Para pantallas realmente pequeñas (1024x768 o 1280x720 muy apretado) */
@media (min-width: 1024px) and (max-width: 1100px) {
    .hero-wrapper-dt {
        grid-template-columns: 1fr 1fr; /* Mitad y mitad, en vez de 1fr 1.2fr */
        gap: 20px;
    }
    .h1-dt { font-size: 36px; } /* Aún más chico */
}

/* =======================================================
   4. LAPTOPS PREMIUM (MacBook Air / 1440x900 / 1366x768)
   Objetivo: Llenar la pantalla sin cortar el contenido.
   ======================================================= */
@media (min-width: 1281px) and (max-width: 1500px) {

    .hero-wrapper-dt {
        /* Aprovechamos casi todo el ancho disponible */
        max-width: 1350px; 
        padding: 0 40px;
        gap: 50px; /* Buen espacio entre texto e imagen */
        grid-template-columns: 1fr 1.1fr;
    }

    /* TÍTULO: Grande e impactante (antes te di 42px, ahora subimos a 54px) */
    .h1-dt {
        font-size: 54px; 
        margin-bottom: 20px;
        line-height: 1.1;
    }

    .p-dt {
        font-size: 18px; /* Texto cómodo de leer */
        max-width: 480px;
        margin-bottom: 30px;
    }

    /* ESCENA 3D: Altura generosa pero segura */
    /* Antes 400px (muy chico), ahora 520px (Casi full) */
    .hero-visual-scenes-dt {
        height: 520px; 
    }

    /* Ajuste sutil de elementos flotantes */
    .obj-layer-dt.main-img-card-dt {
        border-radius: 20px;
    }
    
    .float-icon-dt {
        width: 70px; height: 70px; /* Iconos grandes */
        font-size: 28px;
    }

    /* Dock: Posición cómoda */
    .hero-dock-dt {
        bottom: 25px; 
        padding: 8px;
    }
}