/* ==========================================================
   CONFIGURACIÓN GENERAL & SCROLL SUAVE CORREGIDO
   ========================================================== */
html, body {
    scroll-behavior: smooth !important;
}

html {
    scroll-padding-top: 90px; /* Offset para el Navbar pegajoso */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --bg-dark: #0f172a;
    --bg-light: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* COMPENSACIÓN DE CABECERA PARA TODAS LAS SECCIONES */
section {
    scroll-margin-top: 90px;
}

/* CONTENEDOR PRINCIPAL */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ==========================================================
   NAVBAR
   ========================================================== */
.navbar {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.brand-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--bg-dark);
    text-decoration: none;
}

.brand-logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* ==========================================================
   BOTONES
   ========================================================== */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--bg-dark);
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: #1e293b;
}

.btn-outline {
    border: 1px solid var(--border-color);
    color: #ffffff;
    background: transparent;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-full {
    display: block;
    text-align: center;
    width: 100%;
}

/* ==========================================================
   HERO SECTION
   ========================================================== */
.hero {
    padding: 60px 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.badge {
    background: rgba(37, 99, 235, 0.2);
    color: #93c5fd;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 15px;
    border: 1px solid rgba(147, 197, 253, 0.3);
}

.badge-accent {
    background: rgba(147, 197, 253, 0.1);
    color: #93c5fd;
}

.hero h1 {
    font-size: 2.2rem;
    line-height: 1.25;
    margin-bottom: 15px;
}

.hero p {
    color: #94a3b8;
    margin-bottom: 25px;
    font-size: 1rem;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

/* IMAGEN DE HERO CONTROLADA */
.hero-media-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.hero-custom-img {
    width: 100%;
    max-width: 480px;
    height: 260px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease;
}

.hero-custom-img:hover {
    transform: scale(1.02);
}

.overlay-compact {
    background: rgba(15, 23, 42, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 12px 18px;
    width: 95%;
    max-width: 420px;
    margin-top: -35px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.status-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 8px #22c55e;
}

.mockup-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
}

.mockup-info div {
    font-size: 0.8rem;
    color: #cbd5e1;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
}

/* ==========================================================
   SECCIONES COMUNES
   ========================================================== */
.section {
    padding: 60px 0;
}

.section-alt {
    background-color: #ffffff;
}

.section-title {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--bg-dark);
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 35px;
}

.grid {
    display: grid;
    gap: 25px;
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.card-icon {
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.card-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.card-link:hover {
    text-decoration: underline;
}

.step-card {
    background: #f8fafc;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.step-number {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin: 0 auto 12px auto;
}

/* ==========================================================
   SECCIÓN CONECTIVIDAD SIM
   ========================================================== */
.section-simbase {
    background: #0f172a;
    color: #ffffff;
    border-top: 1px solid #1e293b;
    border-bottom: 1px solid #1e293b;
}

.simbase-banner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.simbase-text h2 {
    font-size: 1.7rem;
    margin: 10px 0;
}

.simbase-text p {
    color: #94a3b8;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.simbase-list {
    list-style: none;
    padding: 0;
}

.simbase-list li {
    font-size: 0.88rem;
    color: #cbd5e1;
    margin-bottom: 8px;
}

.simbase-img-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.sim-custom-img {
    width: 100%;
    max-width: 380px;
    height: 320px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease;
}

.sim-custom-img:hover {
    transform: scale(1.02);
}

/* ==========================================================
   CABECERAS DE HARDWARE (ST-907 y ST-901)
   ========================================================== */
.hardware-header {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    overflow: hidden;
}

.hardware-accent {
    border-left: 4px solid #16a34a;
}

.hardware-info {
    flex: 1;
}

.hardware-badge {
    background: #e0e7ff;
    color: #3730a3;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 8px;
}

.badge-st901 {
    background: #dcfce7;
    color: #166534;
}

.hardware-header h3 {
    font-size: 1.25rem;
    color: var(--bg-dark);
    margin-bottom: 5px;
}

.hardware-header p {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 10px;
}

.price-tag-hardware {
    font-size: 0.85rem;
    color: var(--bg-dark);
    background: #f1f5f9;
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
}

/* IMÁGENES AMPLIADAS DE LOS DISPOSITIVOS */
.hardware-thumb {
    width: 240px;
    height: 130px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.hardware-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

.hardware-thumb img:hover {
    transform: scale(1.03);
}

/* ==========================================================
   TARJETAS DE PRECIOS Y PLANES
   ========================================================== */
.pricing-grid {
    align-items: stretch;
}

.pricing-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.pricing-popular {
    border: 2px solid var(--primary);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.12);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 10px;
}

.plan-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.plan-price {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--bg-dark);
}

.plan-price span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.plan-setup {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 15px;
}

.plan-features {
    list-style: none;
    margin-bottom: 25px;
    flex-grow: 1;
}

.plan-features li {
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.shipping-note {
    margin-top: 30px;
    background: #ffffff;
    border: 1px dashed var(--primary);
    border-radius: 8px;
    padding: 12px 18px;
    text-align: center;
    font-size: 0.88rem;
}

.highlight-shipping {
    color: #166534;
    background: #dcfce7;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

/* ==========================================================
   FOOTER
   ========================================================== */
.footer {
    background: var(--bg-dark);
    color: #94a3b8;
    padding: 25px 0;
    border-top: 1px solid #1e293b;
    font-size: 0.85rem;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.legal-links a {
    color: #94a3b8;
    text-decoration: none;
    margin-left: 15px;
}

.legal-links a:hover {
    color: #ffffff;
}

/* ==========================================================
   VISOR MODAL LIGHTBOX PARA AMAPLIAR IMÁGENES
   ========================================================== */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.2s ease-in-out;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    user-select: none;
}

.lightbox-close:hover {
    color: var(--primary);
}

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

/* ==========================================================
   RESPONSIVE (MÓVILES Y TABLETS) - CABECERA Y MENÚ CORREGIDOS
   ========================================================== */
@media (max-width: 900px) {
    /* Ocultar enlaces del menú en móvil para evitar el desborde horizontal */
    .nav-links {
        display: none;
    }

    .nav-container {
        padding: 0 15px;
    }

    .hero-container, .simbase-banner, .grid-3 {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .footer-container {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 700px) {
    .hardware-header {
        flex-direction: column-reverse;
        text-align: center;
        padding: 20px;
    }

    .hardware-thumb {
        width: 100%;
        max-width: 320px;
        height: 160px;
    }
}

/* ==========================================================
   ESTILOS PÁGINA LEGAL (LEGAL.HTML)
   ========================================================== */
.legal-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.legal-tabs {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.legal-tab-btn {
    background: transparent;
    border: none;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.legal-tab-btn:hover {
    color: var(--primary);
}

.legal-tab-btn.active {
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
}

.legal-tab-content {
    display: none;
}

.legal-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.legal-tab-content h2 {
    font-size: 1.6rem;
    color: var(--bg-dark);
    margin-bottom: 20px;
}

.legal-tab-content h3 {
    font-size: 1.15rem;
    color: var(--bg-dark);
    margin: 25px 0 10px 0;
}

.legal-tab-content p, .legal-tab-content ul {
    font-size: 0.95rem;
    color: var(--text-main);
    margin-bottom: 15px;
}

.legal-tab-content ul {
    padding-left: 20px;
}

.legal-tab-content li {
    margin-bottom: 8px;
}
