:root {
    --primary-color: #0d47a1;   /* Azul corporativo */
    --primary-dark: #093170;
    --secondary-color: #00897b; /* Verde/Teal para acentos e IA */
    --accent-blue: #0284c7;     /* Azul brillante para destacados y bordes */
    --dark-color: #0f172a;      /* Dark Slate premium */
    --light-bg: #f8fafc;
    --white: #ffffff;
    --text-color: #334155;
    --font: 'Segoe UI', -apple-system, BlinkMacSystemFont, Tahoma, Geneva, Verdana, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font);
}

body {
    color: var(--text-color);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* HEADER & NAV */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 2rem;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 45px;
    max-height: 45px;
    width: auto;
    display: block;
    object-fit: contain;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    transition: color 0.3s ease;
}

nav a:hover,
nav a.active,
nav a:focus-visible {
    color: var(--primary-color);
    outline: none;
}

.header-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-login {
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    background-color: transparent;
    padding: 0.5rem 1.1rem;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-header:hover {
    background-color: var(--primary-dark);
}

/* HERO SECTION CARRUSEL */
.hero-swiper {
    width: 100%;
    position: relative;
}

.hero-slide {
    padding: 6rem 2rem;
    text-align: center;
    color: var(--white);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
}

.hero-content h1 {
    font-size: 2.6rem;
    margin-bottom: 1rem;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 720px;
    margin: 0 auto 2rem;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

.btn-cta {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 0.8rem 1.8rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 137, 123, 0.4);
}

.btn-cta:hover {
    background-color: #00695c;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 137, 123, 0.6);
}

.swiper-button-next,
.swiper-button-prev {
    color: var(--white) !important;
}

.swiper-pagination-bullet {
    background: var(--white) !important;
    opacity: 0.6;
}

.swiper-pagination-bullet-active {
    background: var(--secondary-color) !important;
    opacity: 1;
}

/* SECCIONES COMUNES */
section {
    padding: 5rem 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    color: var(--dark-color);
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 3rem;
}

/* =======================================================
   SECCIÓN HUBIA NODE (ESTILOS Y FONDO REAJUSTADO)
   ======================================================= */
#nodo {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 3.5rem 2rem;
}

.node-header-top {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2rem auto;
}

.node-header-top .badge {
    background-color: rgba(2, 132, 199, 0.25);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.5);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 0.6rem;
}

.node-header-top h2 {
    font-size: 2rem;
    color: #ffffff;
    margin-bottom: 0.6rem;
    font-weight: 800;
}

.node-header-top p {
    color: #cbd5e1;
    font-size: 1rem;
    line-height: 1.5;
}

.node-grid-container {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 2.5rem;
    align-items: center;
}

/* Botones de la Izquierda */
.node-tabs-column {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    justify-content: center;
}

.node-tab-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 1rem 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #cbd5e1;
    cursor: pointer;
    text-align: left;
    font-size: 0.98rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.node-tab-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(56, 189, 248, 0.4);
}

.node-tab-btn.active {
    background: rgba(2, 132, 199, 0.25);
    border-color: #38bdf8;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.node-tab-btn .icon-arrow {
    color: #38bdf8;
    transition: transform 0.3s ease;
}

.node-tab-btn.active .icon-arrow {
    transform: translateX(4px);
}

/* Panel Derecha con Fondo de Imagen más Sutil y Bajado */
.node-panel-column {
    background: linear-gradient(
                    135deg, 
                    rgba(15, 23, 42, 0.88) 0%, 
                    rgba(15, 23, 42, 0.78) 100%
                ), 
                url('../img/server.png');
    background-size: cover;
    background-position: center 80%; /* Desplaza la imagen hacia abajo */
    background-repeat: no-repeat;
    
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 14px;
    padding: 1.8rem 2rem;
    min-height: 270px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    position: relative;
    backdrop-filter: blur(2px);
    overflow: hidden;
}

.node-panel-column::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #38bdf8, transparent);
}

.node-content-panel {
    display: none;
    animation: fadeIn 0.3s ease forwards;
}

.node-content-panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =======================================================
   SECCIÓN MÓDULOS / CARACTERÍSTICAS
   ======================================================= */
#caracteristicas {
    background-color: #f0f7ff;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.feature-card {
    position: relative;
    background-color: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid #e2e8f0;
    border-top: 4px solid var(--accent-blue);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.3s ease, 
                border-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(2, 132, 199, 0.18);
    border-color: var(--accent-blue);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.15) rotate(-5deg);
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    font-size: 1.25rem;
}

.feature-card::after {
    content: "Ver detalles →";
    display: block;
    margin-top: 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-blue);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.feature-card:hover::after {
    opacity: 1;
    transform: translateY(0);
}

/* =======================================================
   ESTILOS PÁGINA DE DETALLE (ESPACIO COMPACTADO)
   ======================================================= */
.detalle-modulo-section {
    padding: 1.2rem 2rem 4rem; /* Reducción de relleno superior */
    background-color: var(--light-bg);
    min-height: calc(100vh - 80px);
}

/* Botón Volver Posicionado dentro de la tarjeta */
.btn-volver {
    position: absolute;
    top: 15px;
    left: 20px;
    z-index: 100;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color) !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.88rem;
    background-color: #ffffff;
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

.btn-volver:hover {
    color: var(--primary-dark) !important;
    background-color: #f8fafc;
    border-color: var(--primary-color);
    transform: translateX(-3px);
}

.producto-card {
    position: relative; /* Permite posicionar el botón .btn-volver internamente */
    background-color: var(--white);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    display: grid;
    grid-template-columns: 1fr;
    overflow: hidden;
}

@media (min-width: 768px) {
    .producto-card {
        grid-template-columns: 1.1fr 0.9fr;
    }
}

.producto-imagen {
    position: relative;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3.8rem 2.5rem 2.5rem; /* Margen superior amplio para no chocar con el botón flotante */
    overflow: hidden;
    border-right: 1px solid #e2e8f0;
}

.producto-imagen::before {
    content: "";
    position: absolute;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(2, 132, 199, 0.22) 0%, rgba(248, 250, 252, 0) 70%);
    filter: blur(25px);
    z-index: 1;
    pointer-events: none;
}

.producto-imagen img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: auto;
    max-height: 380px;
    object-fit: cover;
    -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 95%);
    mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 95%);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.producto-card:hover .producto-imagen img {
    transform: scale(1.05) translateY(-3px);
    -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 98%);
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 98%);
}

.producto-info {
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.badge {
    align-self: flex-start;
    background-color: rgba(2, 132, 199, 0.1);
    color: var(--accent-blue);
    border: 1px solid var(--accent-blue);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.producto-info h1 {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    line-height: 1.2;
    font-weight: 800;
}

.precio {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.2rem;
}

.descripcion {
    color: var(--text-color);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

#lista-caracteristicas ul li {
    color: var(--text-color) !important;
    font-size: 0.98rem !important;
    line-height: 1.6 !important;
}

#lista-caracteristicas ul li strong {
    color: var(--dark-color) !important;
    font-weight: 700 !important;
}

#lista-caracteristicas ul li span {
    color: var(--accent-blue) !important;
}

/* SECCIÓN INTELIGENCIA ARTIFICIAL */
.ai-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--white);
    border-top: 1px solid #334155;
    border-bottom: 1px solid #334155;
}

.ai-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.ai-text h2 {
    font-size: 2.2rem;
    color: var(--white);
    margin-bottom: 1rem;
}

.ai-text p {
    color: #cbd5e1;
}

.ai-list {
    list-style: none;
    margin-top: 1.5rem;
}

.ai-list li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.05rem;
    color: #f1f5f9;
}

.ai-badge {
    background-color: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid #22c55e;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.85rem;
}

.ai-box {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 2.2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 4px solid #22c55e;
}

.ai-box h3 {
    color: #ffffff;
}

.ai-box p {
    color: #cbd5e1;
}

/* SECCIÓN SOBRE NOSOTROS */
#nosotros {
    background-color: var(--white);
    padding: 5rem 2rem;
    border-bottom: 1px solid #e2e8f0;
}

#nosotros .ai-content {
    align-items: center;
}

#nosotros .ai-text h2 {
    color: var(--dark-color);
}

#nosotros .ai-text p,
#nosotros .ai-text strong {
    color: var(--text-color);
}

#nosotros .feature-card {
    border-top: 1px solid #e2e8f0;
}

#nosotros .feature-card::after {
    display: none;
}

/* SECCIÓN PRECIOS */
#precios {
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.price-card {
    background-color: var(--white);
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.price-card.featured {
    border: 2px solid var(--primary-color);
    box-shadow: 0 15px 35px rgba(13, 71, 161, 0.18);
    transform: scale(1.03);
}

.badge-popular {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.price {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--dark-color);
    margin: 1rem 0;
}

.price span {
    font-size: 1rem;
    color: #64748b;
}

.price-features {
    list-style: none;
    margin: 2rem 0;
    text-align: left;
}

.price-features li {
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

/* MODALES */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    overflow-y: auto;
}

.modal-content {
    background-color: var(--white);
    margin: 8% auto;
    padding: 2.2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.detail-modal-content {
    max-width: 600px;
    text-align: left;
}

.detail-modal-content h3 {
    margin-top: 0.5rem;
    color: var(--dark-color);
    font-size: 1.4rem;
}

.detail-modal-content .modal-icon {
    font-size: 2.5rem;
}

.detail-modal-content ul {
    margin-top: 1rem;
    padding-left: 1.2rem;
    color: var(--text-color);
}

.detail-modal-content li {
    margin-bottom: 0.6rem;
}

.modal-content h2 {
    color: var(--dark-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.close-btn {
    position: absolute;
    right: 1.2rem;
    top: 0.8rem;
    font-size: 1.8rem;
    font-weight: bold;
    color: #64748b;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: var(--dark-color);
}

.form-group {
    margin-bottom: 1.2rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-color);
}

.form-group input {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    border-color: var(--primary-color);
}

/* FOOTER */
footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 4rem 2rem 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.footer-col h4 {
    margin-bottom: 1.2rem;
    color: var(--white);
    font-size: 1.1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col a {
    color: #94a3b8;
    text-decoration: none;
    line-height: 2;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #334155;
    color: #94a3b8;
    font-size: 0.9rem;
}

/* WIDGET WHATSAPP */
.wa-widget {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9999;
}

.wa-toggle {
    width: 60px;
    height: 60px;
    background-color: #25d366;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.wa-toggle:hover {
    transform: scale(1.1);
}

.wa-box {
    display: none;
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 320px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    flex-direction: column;
}

.wa-box.active {
    display: flex;
}

.wa-header {
    background-color: #075e54;
    color: white;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wa-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    object-fit: cover;
}

.wa-info h4 {
    margin: 0;
    font-size: 15px;
}

.wa-info span {
    font-size: 12px;
    color: #25d366;
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #25d366;
    border-radius: 50%;
    display: inline-block;
}

.wa-close {
    margin-left: auto;
    background: transparent;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.wa-body {
    background-color: #e5ddd5;
    padding: 15px;
    min-height: 120px;
}

.wa-msg {
    background: white;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
    color: #333;
    position: relative;
    max-width: 85%;
}

.wa-time {
    display: block;
    font-size: 10px;
    color: #888;
    text-align: right;
    margin-top: 4px;
}

.wa-footer {
    display: flex;
    padding: 10px;
    background: #f0f0f0;
    gap: 8px;
}

.wa-footer input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 20px;
    outline: none;
    font-size: 13px;
}

.wa-send-btn {
    background: #075e54;
    border: none;
    color: white;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* MEDIA QUERIES (RESPONSIVE) */
@media (max-width: 992px) {
    .node-grid-container {
        grid-template-columns: 1fr;
    }
    .node-panel-column {
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .header-buttons {
        width: 100%;
        justify-content: center;
    }

    .btn-login, 
    .btn-header {
        flex: 1;
        text-align: center;
    }

    .ai-content {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 1.9rem;
    }

    .price-card.featured {
        transform: scale(1);
    }

    .producto-info {
        padding: 2rem 1.5rem;
    }

    .producto-imagen {
        padding: 1.5rem;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }

    .wa-widget {
        bottom: 15px;
        right: 15px;
    }

    .wa-box {
        width: 290px;
    }
}