* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(to bottom, #0a1929 0%, #1e3a5f 50%, #2d5a8c 100%);
    color: white;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
}

/* Loader */
#page-loader {
    position: fixed;
    inset: 0;
    background: linear-gradient(to bottom, #0a1929 0%, #1e3a5f 50%, #2d5a8c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
    animation: pulse 2s ease-in-out infinite;
}

.loader-logo svg {
    width: 100%;
    height: 100%;
    fill: #5ac4f9;
    filter: drop-shadow(0 0 20px rgba(90, 196, 249, 0.5));
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.loader-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid rgba(90, 196, 249, 0.2);
    border-top-color: #5ac4f9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    font-weight: 500;
    margin: 0;
}

/* Animated Cloud Background */
.clouds {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.cloud {
    position: absolute;
    background: radial-gradient(ellipse at center, 
        rgba(255, 255, 255, 0.8) 0%, 
        rgba(255, 255, 255, 0.5) 25%, 
        rgba(200, 220, 255, 0.35) 50%, 
        rgba(150, 180, 220, 0.2) 70%,
        transparent 90%);
    border-radius: 50%;
    filter: blur(40px);
    transition: all 0.5s ease-out;
}

.cloud:nth-child(1) {
    width: 700px;
    height: 450px;
}

.cloud:nth-child(2) {
    width: 600px;
    height: 400px;
}

.cloud:nth-child(3) {
    width: 800px;
    height: 500px;
}

.cloud:nth-child(4) {
    width: 650px;
    height: 420px;
}

.cloud:nth-child(5) {
    width: 750px;
    height: 480px;
}

.cloud:nth-child(6) {
    width: 700px;
    height: 450px;
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 60px;
    background: rgba(10, 25, 41, 0.5);
    backdrop-filter: blur(20px);
}

.logo {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    gap: 40px;
    align-items: center;
    list-style: none;
}

.nav-menu > li {
    position: relative;
}

.nav-menu a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 15px;
    transition: color 0.3s;
    display: block;
    padding: 8px 0;
}

.nav-menu a:hover {
    color: white;
}

/* Dropdown Menu */
.has-submenu {
    position: relative;
}

.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(10, 25, 41, 0.95);
    backdrop-filter: blur(20px);
    min-width: 220px;
    padding: 10px 0;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    margin-top: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu li {
    list-style: none;
}

.submenu a {
    padding: 12px 20px;
    font-size: 14px;
    white-space: nowrap;
}

.submenu a:hover {
    background: rgba(93, 196, 249, 0.1);
    color: #5ac4f9;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height para móviles */
    display: flex;
    align-items: flex-end;
    padding: 120px 60px 100px;
    overflow: hidden;
    z-index: 2;
}

/* Keyboard Background */
.keyboard-bg {
    position: absolute;
    inset: 0;
    perspective: 1500px;
    overflow: hidden;
    z-index: 3;
}

.keyboard-grid {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotateX(45deg) rotateZ(-45deg);
    display: grid;
    grid-template-columns: repeat(6, 280px);
    grid-template-rows: repeat(5, 280px);
    gap: 40px;
    transform-style: preserve-3d;
}

.key {
    position: relative;
    width: 280px;
    height: 280px;
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.key::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.key::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: inherit;
    transform: translateZ(-12px);
    filter: brightness(0.5);
    z-index: -1;
}

.key:hover {
    transform: translateZ(20px) translateY(-8px);
    background: linear-gradient(135deg, #ff6b3d 0%, #ff5722 50%, #d84315 100%);
    box-shadow: 
        0 25px 50px rgba(255, 87, 34, 0.5),
        0 15px 30px rgba(255, 87, 34, 0.4),
        0 0 60px rgba(255, 87, 34, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.2),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}

.key:hover::before {
    opacity: 1;
}

.key:hover::after {
    transform: translateZ(-16px);
    filter: brightness(0.3);
}

.key svg {
    width: 120px;
    height: 120px;
    opacity: 0.4;
    transition: opacity 0.4s;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.key:hover svg {
    opacity: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

/* Highlight desde hover en el menú */
.key.key-highlight {
    transform: translateZ(20px) translateY(-8px);
    background: linear-gradient(135deg, #ff6b3d 0%, #ff5722 50%, #d84315 100%);
    box-shadow: 
        0 25px 50px rgba(255, 87, 34, 0.5),
        0 15px 30px rgba(255, 87, 34, 0.4),
        0 0 60px rgba(255, 87, 34, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.2),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}

.key.key-highlight::before {
    opacity: 1;
}

.key.key-highlight svg {
    opacity: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

/* Content */
.hero-content {
    position: relative;
    z-index: 10;
    max-width: 700px;
}

.logo-main {
    margin-bottom: 30px;
    max-width: 500px;
}

/* Logo en desktop - parte superior izquierda */
@media (min-width: 769px) {
    .logo-main {
        position: fixed;
        top: 80px;
        left: 60px;
        max-width: 500px;
        margin: 0;
        z-index: 999;
    }
}

.logo-main img {
    width: 100%;
    height: auto;
    display: block;
}

h1 {
    font-family: 'Aller', 'Work Sans', sans-serif;
    font-size: 52px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0;
    letter-spacing: -1px;
    margin-top: 0;
    white-space: nowrap;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: relative;
    background: rgba(30, 58, 95, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    margin: 3% auto;
    width: 85%;
    max-width: 1200px;
    height: 85vh;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: zoomInLarge 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

@keyframes zoomInLarge {
    from {
        transform: scale(0.7);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 25px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: all 0.3s;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.close-modal:hover,
.close-modal:focus {
    color: #ff5722;
    transform: rotate(90deg);
}

.modal-body {
    width: 100%;
    height: 100%;
    padding: 15px;
    background: transparent;
}

/* Modal pequeño para contacto */
#contactModal.modal {
    background-color: rgba(0, 0, 0, 0.3);
}

.modal-small {
    max-width: 500px;
    height: auto;
    min-height: 300px;
    margin: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: zoomInSmall 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: rgba(30,58,95,0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-radius: 8px;
}

@keyframes zoomInSmall {
    from {
        transform: translate(-50%, -50%) scale(0.7);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.modal-body-contact {
    padding: 40px 30px;
    text-align: center;
    position: relative;
    border-radius: 8px;
}

.modal-body-contact h2,
.modal-body-contact p,
.contact-info {
    position: relative;
    z-index: 1;
}

.modal-body-contact h2 {
    font-size: 32px;
    margin-bottom: 15px;
    color: #5ac4f9;
    font-weight: 500;
}

.modal-body-contact p {
    color: #FFF;
    margin-bottom: 35px;
    font-size: 16px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 15px 20px;
    background: rgba(90, 196, 249, 0.07);
    border: 1px solid rgba(90, 196, 249, 0.2);
    border-radius: 8px;
    transition: all 0.3s;
    cursor: pointer;
}

.contact-item:hover {
    background: rgba(90, 196, 249, 0.14);
    border-color: rgba(90, 196, 249, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.contact-item svg {
    flex-shrink: 0;
    color: #5ac4f9;
}

.contact-item a {
    color: #e8ebef;
    text-decoration: none;
    font-size: 16px;
    font-weight: 400;
    pointer-events: none;
}

.modal-small .close-modal {
    color: #AAA;
}

.modal-small .close-modal:hover {
    color: #ff5722;
}

/* Modal de servicios (tamaño grande) */
.modal-service {
    margin: 3% auto;
    width: 85%;
    max-width: 1200px;
    height: 85vh;
    overflow-y: auto;
    animation: zoomInLarge 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-radius: 8px;
}

.modal-body-service {
    padding: 50px 60px;
    height: 100%;
    overflow-y: auto;
}

.modal-body-service h2 {
    font-size: 36px;
    margin-bottom: 30px;
    color: #FFF;
    font-weight: 500;
}

.service-content {
    color: #FFF;
    font-size: 18px;
    line-height: 1.8;
	font-weight: 300
}

.service-content p {
    margin-bottom: 20px;
}

/* Fondo más transparente para todos los modales de servicios */
#seguridadModal.modal,
#iaModal.modal,
#dominiosModal.modal,
#dnsModal.modal,
#cloudModal.modal,
#dedicadosModal.modal,
#correoModal.modal,
#privacidadModal.modal,
#nosotrosModal.modal {
    background-color: rgba(0, 0, 0, 0.6);
}

/* Colores por servicio con glassmorphism */
.modal-service[data-service="seguridad"], 
.modal-service[data-service="ia"],
.modal-service[data-service="dns"],
.modal-service[data-service="cloud"],
.modal-service[data-service="dedicados"],
.modal-service[data-service="correo"],
.modal-service[data-service="nosotros"],
.modal-service[data-service="privacidad"]
.modal-service[data-service="dominios"] {
    background: rgba(12, 29, 48, 0.4);
    overflow: hidden;
}

/*  Colores para el texto de los modales */

.modal-service[data-service="dominios"] h2 {
    color: #5AC4F9;
}

.modal-service[data-service="dominios"] .service-content {
    color: #E8EBEF;
}


/* Botón cerrar en servicios */
.modal-service .close-modal {
    color: #AAA;
}

.modal-service .close-modal:hover {
    color: #ff5722;
}


/* Responsive - Fallback básico */
@media (max-width: 768px) {

/* Especial para Microsoft Edge */

    @supports (-ms-ime-align: auto) {
        body {
            max-height: 100vh;
            overflow-y: auto;
        }
    }

/* Responsive General */

    .key::after {
        transform: translateZ(-6px) !important;
    }

    .key:hover::after {
        transform: translateZ(-10px) !important;
    }

    nav {
        padding: 15px 20px;
    }

    .nav-menu {
        gap: 15px;
        font-size: 13px;
    }
    
    .hero {
        min-height: 100vh;
        padding: 90px 20px 110px;
    }

    /* Fallback básico del teclado - será sobrescrito por JS */
    .keyboard-grid {
        grid-template-columns: repeat(3, 80px);
        grid-template-rows: repeat(3, 80px);
        gap: 15px;
    }
    
    .key {
        width: 80px;
        height: 80px;
    }
    
    .key svg {
        width: 35px;
        height: 35px;
    }
    
    /* Responsive de modales */
    .modal-content {
        width: 95%;
        height: 90vh;
        margin: 5% auto;
        border-radius: 12px;
    }
    
    .close-modal {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }
    
    .modal-body {
        padding: 10px;
    }

    .modal-small {
    width: 90% !important;
    max-width: 500px !important;
    height: auto !important;
    min-height: auto !important;
    }
    
    .modal-body-contact {
        padding: 30px 20px;
    }
    
    .modal-body-contact h2 {
        font-size: 26px;
    }
    
    .contact-info {
        gap: 20px;
    }
    
.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 15px 20px;
    background: rgba(90, 196, 249, 0.07);
    border: 1px solid rgba(90, 196, 249, 0.2);
    border-radius: 8px;
    transition: all 0.3s;
    cursor: pointer;
}

    .modal-service {
        width: 95%;
        height: 90vh;
        margin: 5% auto;
    }
    
    .modal-body-service {
        padding: 30px 25px;
    }
    
    .modal-body-service h2 {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .keyboard-grid {
        grid-template-columns: repeat(3, 70px);
        grid-template-rows: repeat(3, 70px);
        gap: 12px;
    }

    .key {
        width: 70px;
        height: 70px;
    }

    .key svg {
        width: 30px;
        height: 30px;
    }
}

/* Footer */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 15px;
    background: rgba(10, 25, 41, 0.5);
    backdrop-filter: blur(10px);
    z-index: 100;
}

footer p {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.icon-inline {
    display: inline-flex;
    width: 16px;
    height: 16px;
}

.icon-inline svg {
    width: 100%;
    height: 100%;
    fill: rgba(255, 255, 255, 0.7);
}

@media (max-width: 768px) {
    footer {
        padding: 10px;
    }
    
    footer p {
        font-size: 11px;
    }
}

/* ── Modal Dominios: pestañas ── */
.dom-panel { display: none; }
.dom-panel.dom-panel-active { display: block; }
 
.dom-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid rgba(90, 196, 249, 0.2);
    margin-bottom: 30px;
}
 
.dom-tab {
    padding: 10px 24px;
    background: transparent;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    color: rgba(255, 255, 255, 0.45);
    font-size: 15px;
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
}
 
.dom-tab:hover { color: rgba(255, 255, 255, 0.75); }
 
.dom-tab-active {
    background: rgba(90, 196, 249, 0.12) !important;
    border-color: rgba(90, 196, 249, 0.35) !important;
    color: #5ac4f9 !important;
    font-weight: 500;
}
 
/* Advertencia búsqueda de dominios */
.domain-warning {
    background: rgba(255, 152, 0, 0.08);
    border-left: 3px solid rgba(255, 152, 0, 0.6);
    border-radius: 0 8px 8px 0;
    padding: 12px 16px;
    font-size: 18px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    margin: 4px 0 16px;
}
.domain-warning strong { color: #ffb74d; }
 
/* CTA del modal de dominios */
.dom-cta {
    margin-top: 30px;
    padding: 24px 28px;
    background: rgba(90, 196, 249, 0.07);
    border: 1px solid rgba(90, 196, 249, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
 
.dom-cta p {
    margin: 0;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.75);
    flex: 1;
    min-width: 200px;
}
 
.dom-cta-btn {
    padding: 12px 24px;
    background: #5ac4f9;
    border: none;
    border-radius: 8px;
    color: #0a1929;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Work Sans', sans-serif;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}
.dom-cta-btn:hover { background: #7dd4fb; }

/* Botón narrar — Dominios */
.dom-narrar-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.35rem;
    color: #5ac4f9;
    opacity: 0.85;
    transition: opacity 0.2s, color 0.2s;
    padding: 0 0 0 8px;
    vertical-align: middle;
    line-height: 1;
}
.dom-narrar-btn:hover   { opacity: 1; }
.dom-narrar-btn.playing { opacity: 1; color: #ffb74d; }

/* Responsivo pestañas dominios */
@media (max-width: 768px) {
    .dom-tabs { gap: 3px; margin-bottom: 20px; }
    .dom-tab { padding: 8px 14px; font-size: 13px; flex: 1; text-align: center; }
    .dom-cta { flex-direction: column; padding: 18px; gap: 16px; }
    .dom-cta p { font-size: 15px; }
    .dom-cta-btn { width: 100%; text-align: center; }
}

/* Canvas para los dominios*/

#tld-container {
  position: relative;
  text-align: center;
  margin-top: 10px;
  background-image: url('../img/globeback.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

#tldCanvas {
  margin: 0 auto;
  display: block;
  max-width: 100%;
  height: auto;
}

.tld-tooltip {
  position: relative;
  margin: 20px auto 0;
  background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8c 100%);
  color: #ffffff;
  border: 2px solid #5AC4F9;
  backdrop-filter: blur(10px);
  padding: 12px 20px;
  border-radius: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-size: 16px;
  font-weight: 200;
  max-width: 400px;
  text-align: center;
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  min-height: 80px;
  display: flex;
  align-items: center; 
  justify-content: center;
  line-height: 1.5; 
}

.tld-tooltip::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid #5AC4F9;
}

/* Canvas responsive para móviles */
@media (max-width: 768px) {
    #tld-container {
        margin-top: 5px;
        background-size: 100% 100%;
        background-position: center;
    }
    
    #tldCanvas {
        max-width: 100% !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    .tld-tooltip {
        max-width: 90%;
        font-size: 14px;
        padding: 10px 16px;
        min-height: 55px;
    }
}


/* ══════════════════════════════════════════════════════════════
   bloque IA — v5
   ══════════════════════════════════════════════════════════════ */
 
 /* ── Canvas de fondo de nodos ── */
.ai-bg-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    border-radius: 8px;
    z-index: 0;
}
 
.modal-content[data-service="ia"] {
    position: relative;
    overflow: hidden;
}
 
.modal-content[data-service="ia"] .modal-body-service {
    position: relative;
    z-index: 1;
}
 
/* ── Layout — grid de 2 filas en landscape ──
   Fila 1: [esfera | panel-derecho]
   Fila 2: [subtítulo a todo el ancho]
── */
.ai-layout {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
        "sphere  right"
        "sub     sub";
    gap: 0.5rem 2.5rem;
    align-items: start;
}
 
.ai-sphere-block  { grid-area: sphere; }
.ai-right-panel   { grid-area: right; }
.ai-subtitle      { grid-area: sub; max-width: 100%; text-align: left; padding-left: 0.2rem; }
 
/* ── Vista centrada (primera visita) ── */
.ai-layout.ai-layout--centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 55vh;
}
 
.ai-layout--centered .ai-sphere-block { order: 1; width: 100%; align-items: center; }
.ai-layout--centered .ai-right-panel  { order: 2; }
 
/* Subtítulo más ancho en panel 1 para evitar reflow al pasar a bold */
.ai-layout--centered .ai-subtitle {
    order: 10;
    width: min(620px, 88vw);   /* más ancho que antes */
    max-width: 100%;
    font-size: 1.05rem;
    text-align: center;
    /* Reservar altura para el texto en bold desde el inicio */
    min-height: 5.5rem;
}
 
/* ── Bloque esfera ── */
.ai-sphere-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    flex-shrink: 0;
}
 
.ai-sphere-wrapper {
    position: relative;
    width: min(300px, 64vw, 30vh);
    height: min(300px, 64vw, 30vh);
}
 
#aiSphereCanvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    filter: drop-shadow(0 0 18px rgba(90, 196, 249, 0.60))
            drop-shadow(0 0 40px rgba(90, 196, 249, 0.20));
    transition: filter 0.1s ease;
}
 
/* ── Indicador de barras ── */
.ai-speech-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 20px;
    opacity: 0;
    transition: opacity 0.3s;
    justify-content: center;
}
.ai-speech-indicator.active { opacity: 1; }
.ai-speech-indicator span {
    display: block; width: 3px;
    background: #5ac4f9; border-radius: 3px;
    animation: aiBar 0.8s ease-in-out infinite;
}
.ai-speech-indicator span:nth-child(1) { animation-delay: 0s;   height: 6px; }
.ai-speech-indicator span:nth-child(2) { animation-delay: 0.1s; height: 12px; }
.ai-speech-indicator span:nth-child(3) { animation-delay: 0.2s; height: 18px; }
.ai-speech-indicator span:nth-child(4) { animation-delay: 0.1s; height: 12px; }
.ai-speech-indicator span:nth-child(5) { animation-delay: 0s;   height: 6px; }
@keyframes aiBar {
    0%, 100% { transform: scaleY(0.4); opacity: 0.5; }
    50%       { transform: scaleY(1);   opacity: 1; }
}
 
/* ── Controles ── */
.ai-sphere-controls { display: flex; justify-content: center; }
 
/* ── Botón Escuchar ── */
.btn-speak {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.4rem;
    border-radius: 50px;
    font-family: 'Work Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.25s ease;
    background: linear-gradient(135deg, #325d9b, #1e3d6e);
    color: #5ac4f9;
    box-shadow: 0 0 20px rgba(50, 93, 155, 0.45);
}
.btn-speak:hover   { transform: translateY(-2px); box-shadow: 0 0 35px rgba(50, 93, 155, 0.70); }
.btn-speak.speaking { animation: aiSpeakPulse 1s ease-in-out infinite; }
.btn-speak.attention { animation: aiAttention 1.2s ease-in-out infinite; }
@keyframes aiSpeakPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(90, 196, 249, 0.35); }
    50%       { box-shadow: 0 0 50px rgba(90, 196, 249, 0.85); }
}
@keyframes aiAttention {
    0%, 100% { box-shadow: 0 0 20px rgba(50, 93, 155, 0.45); transform: scale(1); }
    50%       { box-shadow: 0 0 45px rgba(90, 196, 249, 0.90), 0 0 80px rgba(90, 196, 249, 0.35); transform: scale(1.06); }
}
 
/* ════════════════════════════════════════════════════
   SUBTÍTULOS — solo para panel 1 (texto corto)
   ════════════════════════════════════════════════════ */
.ai-subtitle {
    min-height: 5.5rem;
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.65;
    opacity: 0;
    transition: opacity 0.4s ease;
    letter-spacing: 0.01em;
    word-spacing: 0.08em;
}
.ai-subtitle.active { opacity: 1; }
 
.ai-sub-word.ai-sub-pending {
    color: rgba(232, 244, 253, 0.35);
    font-weight: 400;
    transition: color 0.15s ease;
}
.ai-sub-word.ai-sub-active {
    color: #5ac4f9;
    font-weight: 700;
    text-shadow: 0 0 12px rgba(90, 196, 249, 0.80), 0 0 24px rgba(90, 196, 249, 0.35);
    transition: color 0.08s ease;
}
.ai-sub-word.ai-sub-said {
    color: #5ac4f9;
    font-weight: 700;
    transition: color 0.08s ease;
}
 
/* ════════════════════════════════════════════════════
   PANEL DERECHO — contenedor que alterna
   preguntas ↔ diapositiva
   ════════════════════════════════════════════════════ */
.ai-right-panel {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
    padding-top: 0.5rem;
}
 
/* ── Sección de preguntas ── */
.ai-questions-intro {
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(90, 196, 249, 0.70);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1rem !important;
}
 
.ai-questions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
 
.ai-question-btn {
    display: block;
    width: 100%;
    padding: 0.85rem 1.2rem;
    background: rgba(50, 93, 155, 0.12);
    border: 1px solid rgba(90, 196, 249, 0.18);
    border-radius: 10px;
    color: rgba(232, 244, 253, 0.80);
    font-family: 'Work Sans', sans-serif;
    font-size: 0.92rem;
    font-weight: 400;
    text-align: left;
    cursor: pointer;
    transition: all 0.22s ease;
    line-height: 1.4;
}
.ai-question-btn:hover {
    background: rgba(50, 93, 155, 0.28);
    border-color: rgba(90, 196, 249, 0.45);
    color: #e8f4fd;
    transform: translateX(4px);
}
.ai-question-btn.active {
    background: rgba(50, 93, 155, 0.35);
    border-color: #5ac4f9;
    color: #5ac4f9;
    font-weight: 500;
    box-shadow: 0 0 12px rgba(90, 196, 249, 0.20);
    transform: translateX(4px);
}
 
/* ════════════════════════════════════════════════════
   DIAPOSITIVA ACOMPAÑANTE — Glassmorphism corporativo
   ════════════════════════════════════════════════════ */
.ai-slide {
    display: none;
    flex-direction: column;
    gap: 1.2rem;
    animation: aiSlideFadeIn 0.4s ease;
    background: rgba(10, 25, 60, 0.55);
    border: 1px solid rgba(90, 196, 249, 0.22);
    border-radius: 14px;
    padding: 1.6rem 1.8rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 0 40px rgba(50, 93, 155, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.ai-slide.visible { display: flex; }
 
@keyframes aiSlideFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
 
/* Título de la diapositiva */
.ai-slide-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.01em;
    line-height: 1.25;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(90, 196, 249, 0.18);
}
 
/* Cuerpo */
.ai-slide-body {
    font-size: 1.0rem;
    font-weight: 700;
    color: rgba(232, 244, 253, 0.88);
    line-height: 1.8;
}
 
.ai-slide-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
 
.ai-slide-body ul li {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding-left: 0.2rem;
}
 
.ai-slide-body ul li::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 0.95em;
    background: #5ac4f9;
    border-radius: 2px;
    flex-shrink: 0;
    margin-top: 0.15em;
    align-self: flex-start;
}
 
/* Frase final destacada — amarillo pálido armonizado */
.ai-slide-body em {
    display: block;
    margin-top: 0.8rem;
    padding: 0.75rem 1rem;
    background: rgba(240, 208, 128, 0.07);
    border-left: 3px solid #f0d080;
    border-radius: 0 8px 8px 0;
    font-style: normal;
    font-size: 1.05rem;
    font-weight: 700;
    color: #f0d080;
    line-height: 1.5;
}
 
.ai-slide-body strong {
    color: #ffffff;
    font-weight: 700;
}
 
/* Botón volver */
.ai-slide-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: 1px solid rgba(90, 196, 249, 0.22);
    border-radius: 50px;
    color: rgba(90, 196, 249, 0.65);
    font-family: 'Work Sans', sans-serif;
    font-size: 0.80rem;
    font-weight: 500;
    padding: 0.4rem 0.9rem;
    cursor: pointer;
    transition: all 0.22s ease;
    align-self: flex-start;
    margin-top: 0.1rem;
}
.ai-slide-back:hover {
    border-color: #5ac4f9;
    color: #5ac4f9;
    background: rgba(90, 196, 249, 0.06);
}
 
/* ── Responsive: portrait ── */
@media (max-width: 680px), (orientation: portrait) {
    .ai-layout {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.2rem;
    }
    .ai-subtitle {
        max-width: 90vw;
        font-size: 0.98rem;
        text-align: center;
        min-height: 4rem;
    }
    .ai-right-panel { width: 100%; }
    .ai-question-btn:hover,
    .ai-question-btn.active { transform: none; }
    .ai-slide-back { align-self: center; }
}

/* ══════════════════════════════════════════════════
   Modal DNS — slider de 3 secciones
   ══════════════════════════════════════════════════ */

.modal-service[data-service="dns"] h2 { color: #5ac4f9; }
.modal-service[data-service="dns"] .service-content { color: #E8EBEF; }

.dns-slider {
    position: relative;
    overflow: hidden;
}

.dns-slide {
    display: none;
    animation: dnsFadeIn 0.35s ease;
}

.dns-slide.dns-slide-active {
    display: block;
}

@keyframes dnsFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.dns-closing {
    margin-top: 8px;
    padding: 12px 16px;
    background: rgba(90, 196, 249, 0.06);
    border-left: 3px solid rgba(90, 196, 249, 0.5);
    border-radius: 0 8px 8px 0;
    color: #5ac4f9 !important;
    font-weight: 500 !important;
}

.dns-tech-list {
    list-style: none;
    padding: 0;
    margin: 12px 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dns-tech-list li {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding-left: 4px;
    line-height: 1.7;
}

.dns-tech-list li::before {
    content: '';
    display: inline-block;
    width: 3px;
    min-width: 3px;
    height: 0.95em;
    background: #5ac4f9;
    border-radius: 2px;
    flex-shrink: 0;
    margin-top: 0.2em;
    align-self: flex-start;
}

.dns-tech-list li strong {
    color: #5ac4f9;
}

/* Navegación */
.dns-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 24px 0 20px;
}

.dns-arrow {
    background: transparent;
    border: 1px solid rgba(90, 196, 249, 0.3);
    border-radius: 50%;
    color: #5ac4f9;
    font-size: 18px;
    width: 38px;
    height: 38px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-family: inherit;
}

.dns-arrow:hover {
    background: rgba(90, 196, 249, 0.1);
    border-color: #5ac4f9;
}

.dns-arrow:disabled {
    opacity: 0.2;
    cursor: default;
}

.dns-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.dns-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(90, 196, 249, 0.25);
    transition: background 0.25s, transform 0.25s;
    cursor: pointer;
}

.dns-dot.dns-dot-active {
    background: #5ac4f9;
    transform: scale(1.3);
}

/* Atención: pulso en flechas si no hay interacción */
@keyframes dnsAttention {
    0%, 100% { box-shadow: 0 0 0 0 rgba(90, 196, 249, 0); }
    50%       { box-shadow: 0 0 0 6px rgba(90, 196, 249, 0.2); }
}

.dns-arrow.attention {
    animation: dnsAttention 1.8s ease-in-out infinite;
}

.dns-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 0.5px solid rgba(90, 196, 249, 0.15);
    flex-wrap: wrap;
}

.dns-cta span {
    color: rgba(232, 235, 239, 0.5);
    font-size: 15px;
    font-weight: 300;
}

.dns-cta button {
    padding: 8px 20px;
    background: transparent;
    border: 1px solid rgba(90, 196, 249, 0.35);
    border-radius: 50px;
    color: #5ac4f9;
    font-size: 14px;
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
}

.dns-cta button:hover {
    background: rgba(90, 196, 249, 0.08);
    border-color: #5ac4f9;
}

.dns-section-title {
    font-size: 36px;
    font-weight: 500;
    color: #5ac4f9;
    margin-left: 10px;
}

.dns-section-title::before {
    content: '—';
    margin-right: 10px;
    color: rgba(90, 196, 249, 0.3);
}

.dns-slide1-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: center;
}

.dns-slide1-img img {
    width: 100%;
    border-radius: 10px;
    opacity: 0.9;
}

@media (orientation: portrait) {
    .dns-slide1-layout {
        grid-template-columns: 1fr;
    }

    .dns-slide1-img {
        order: -1;
        max-width: 80%;
        margin: 0 auto;
    }
}

/* ── Modal Privacidad ── */
.privacy-intro {
    font-size: 17px;
    line-height: 1.8;
    color: #c8dff0;
    margin-bottom: 36px;
}

.privacy-pillars {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.privacy-pillar {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px 24px;
    background: rgba(90, 196, 249, 0.06);
    border: 1px solid rgba(90, 196, 249, 0.18);
    border-radius: 10px;
    transition: border-color 0.3s, background 0.3s;
}

.privacy-pillar:hover {
    background: rgba(90, 196, 249, 0.11);
    border-color: rgba(90, 196, 249, 0.35);
}

.privacy-pillar-icon {
    flex-shrink: 0;
    color: #5ac4f9;
    margin-top: 2px;
}

.privacy-pillar-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.privacy-pillar-text strong {
    font-size: 16px;
    font-weight: 500;
    color: #e8f4fd;
}

.privacy-pillar-text span {
    font-size: 16px;
    font-weight: 400;
    color: #a8c8e0;
    line-height: 1.7;
}

.privacy-pillar-text code {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #5ac4f9;
    background: rgba(90, 196, 249, 0.1);
    padding: 1px 5px;
    border-radius: 3px;
}

.privacy-download {
    border-top: 1px solid rgba(90, 196, 249, 0.15);
    padding-top: 32px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.privacy-download p {
    font-size: 15px;
    color: #a8c8e0;
    font-weight: 300;
    margin: 0;
    max-width: 620px;
    line-height: 1.7;
}

.privacy-btn-download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, rgba(50, 93, 155, 0.5), rgba(90, 196, 249, 0.2));
    border: 1px solid rgba(90, 196, 249, 0.45);
    border-radius: 8px;
    color: #e8f4fd;
    font-family: 'Work Sans', sans-serif;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.privacy-btn-download:hover {
    background: linear-gradient(135deg, rgba(50, 93, 155, 0.7), rgba(90, 196, 249, 0.35));
    border-color: rgba(90, 196, 249, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(90, 196, 249, 0.15);
    color: #ffffff;
}

.privacy-btn-download svg {
    flex-shrink: 0;
}

.privacy-version {
    font-size: 12px;
    color: rgba(168, 200, 224, 0.5);
    font-weight: 300;
}

@media (max-width: 600px) {
    .privacy-intro {
        font-size: 15px;
    }
    .privacy-pillar {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }
    .privacy-btn-download {
        width: 100%;
        justify-content: center;
    }
}

/* ── Modal Nosotros ── */
.nosotros-content .nosotros-intro {
    font-size: 19px;
    line-height: 1.8;
    color: #c8dff0;
    margin-bottom: 36px;
}

.nosotros-pillars {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.nosotros-pillar {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px 24px;
    background: rgba(90, 196, 249, 0.06);
    border: 1px solid rgba(90, 196, 249, 0.18);
    border-radius: 10px;
    transition: border-color 0.3s, background 0.3s;
}

.nosotros-pillar:hover {
    background: rgba(90, 196, 249, 0.11);
    border-color: rgba(90, 196, 249, 0.35);
}

.nosotros-pillar-icon {
    flex-shrink: 0;
    color: #5ac4f9;
    margin-top: 2px;
}

.nosotros-pillar-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nosotros-pillar-text strong {
    font-size: 16px;
    font-weight: 500;
    color: #e8f4fd;
}

.nosotros-pillar-text span {
    font-size: 16px;
    font-weight: 400;
    color: #a8c8e0;
    line-height: 1.7;
}

@media (max-width: 600px) {
    .nosotros-content .nosotros-intro { font-size: 17px; }
    .nosotros-pillar {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }
}

/* ── Modal Servidores Dedicados ── */
.modal-content[data-service="dedicados"] {
    background-image:
        linear-gradient(rgba(4, 10, 22, 0.78), rgba(4, 10, 22, 0.78)),
        url('../img/dedicated.jpg');
    background-size: cover;
    background-position: center;
}

.modal-content[data-service="dedicados"] .modal-body-service {
    display: flex;
    flex-direction: column;
}

.modal-content[data-service="dedicados"] .service-content {
    flex: 1;
    display: flex;
    align-items: center;
}

.dedicados-content p {
    font-size: 20px;
    font-weight: 340;
    color: #ffffff;
    line-height: 1.8;
    margin-bottom: 18px;
}

.dedicados-content p:last-child {
    margin-bottom: 0;
}

/* ── Modal Arquitectura en la Nube ── */
.modal-content[data-service="cloud"] {
    background-image:
        linear-gradient(rgba(4, 10, 22, 0.82), rgba(4, 10, 22, 0.82)),
        url('../img/cloud.jpg');
    background-size: cover;
    background-position: center;
}

.modal-content[data-service="cloud"] .modal-body-service {
    display: flex;
    flex-direction: column;
}

.modal-content[data-service="cloud"] .service-content {
    flex: 1;
    display: flex;
    align-items: center;
}

.cloud-content p {
    font-size: 20px;
    font-weight: 340;
    color: #ffffff;
    line-height: 1.8;
    margin-bottom: 18px;
}

.cloud-content p:last-child {
    margin-bottom: 0;
}

.cloud-highlight {
    color: #f0d080 !important;
}

/* ── Modal Correo Corporativo ── */
.modal-content[data-service="correo"] {
    background-image:
        linear-gradient(rgba(4, 10, 22, 0.85), rgba(4, 10, 22, 0.85)),
        url('../img/correocorporativo.jpg');
    background-size: cover;
    background-position: center;
}

.modal-content[data-service="correo"] .modal-body-service {
    display: flex;
    flex-direction: column;
}

.modal-content[data-service="correo"] .service-content {
    flex: 1;
    display: flex;
    align-items: center;
}

.correo-content p {
    font-size: 20px;
    font-weight: 340;
    color: #ffffff;
    line-height: 1.8;
    margin-bottom: 18px;
}

.correo-content p:last-child {
    margin-bottom: 0;
}

/* ══════════════════════════════════════════════════
   Modal Seguridad de la Información — pestañas
   ══════════════════════════════════════════════════ */

.modal-service[data-service="seguridad"] h2 { color: #5ac4f9; }

.sec-panel { display: none; }
.sec-panel.sec-panel-active { display: block; }

.sec-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid rgba(90, 196, 249, 0.2);
    margin-bottom: 30px;
}

.sec-tab {
    padding: 10px 24px;
    background: transparent;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    color: rgba(255, 255, 255, 0.45);
    font-size: 15px;
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
}

.sec-tab:hover { color: rgba(255, 255, 255, 0.75); }

.sec-tab.sec-tab-active {
    background: rgba(90, 196, 249, 0.12) !important;
    border-color: rgba(90, 196, 249, 0.35) !important;
    color: #5ac4f9 !important;
    font-weight: 500;
}

/* Texto largo/corto según orientación */
.sec-tab-short { display: none; }
.sec-tab-long  { display: inline; }

/* Frase destacada */
.sec-highlight {
    margin-top: 28px;
    padding: 16px 20px;
    border-left: 3px solid #5ac4f9;
    background: rgba(90, 196, 249, 0.06);
    border-radius: 0 8px 8px 0;
    color: #5ac4f9;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.6;
}

/* Portrait */
@media (orientation: portrait) {
    .sec-tabs { gap: 3px; margin-bottom: 20px; }
    .sec-tab {
        padding: 8px 10px;
        font-size: 13px;
        flex: 1;
        text-align: center;
    }
    .sec-tab-short { display: inline; }
    .sec-tab-long  { display: none; }
    .sec-highlight { font-size: 15px; }
}

