/* =========================================================================
   RD CLOUD SMARTWARE - CORE STYLES
   Minimalist, Command-Center Aesthetic
   ========================================================================= */

:root {
    /* Color Palette - Cyber Navy & Neon */
    --bg-dark: #00020a;
    --bg-panel: rgba(10, 25, 55, 0.45);
    --bg-panel-light: rgba(15, 35, 75, 0.6);
    --bg-panel-border: rgba(0, 195, 255, 0.25);

    /* Accents */
    --accent-blue: #007bff;
    --accent-cyan: #00d2ff;
    --accent-green: #00ffa3;
    --accent-purple: #9d4edd;
    --accent-red: #ff3366;

    /* Glows */
    --neon-glow: 0 0 20px rgba(0, 210, 255, 0.4);
    --neon-hover: 0 0 35px rgba(0, 210, 255, 0.8);

    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #b0c4de;
    --text-muted: #64748b;

    /* Typography */
    --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', Courier, monospace;

    /* Metrics */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Evita que cualquier elemento rompa el ancho del viewport */
    max-width: 100%;
}

/* OVERFLOW PREVENTION — must be on BOTH html AND body for iOS Safari */
html {
    overflow-x: hidden;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-ui);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    width: 100%;
    /* Límite duro: el body nunca supera el viewport */
    max-width: 100vw;
}

h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: var(--text-primary);
    transition: color var(--transition-speed);
}

/* ================= NAV BAR ================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 17, 21, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--bg-panel-border);
    z-index: 1000;
    /* Needed so absolute-positioned mobile menu is relative to navbar */
    position: fixed;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#logo-lottie {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.logo i {
    color: var(--accent-blue);
    font-size: 1.5rem;
}

.logo strong {
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 1.5rem;
}

.lang-btn {
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.2rem 0.5rem;
}

.lang-btn.active {
    color: var(--neon-cyan);
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.4);
}

.lang-btn:hover:not(.active) {
    color: rgba(255, 255, 255, 0.8);
}

.lang-btn:hover {
    filter: grayscale(50%) opacity(0.8);
    transform: translateY(-2px);
}

.lang-btn.active {
    filter: grayscale(0%) opacity(1);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.4);
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

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

.btn-primary-sm {
    background: var(--accent-blue);
    color: #fff !important;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
}

.btn-primary-sm:hover {
    filter: brightness(1.1);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ================= HERO ================= */
.hero-section {
    position: relative;
    padding: 10rem 2rem 5rem;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-x: hidden;
    /* Limitar al viewport */
    max-width: min(1200px, 100%);
}

.hero-bg {
    /* fixed para el efecto de fondo paralax, pero clippeado al viewport */
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    /* clip-path = corta todo lo que salga del viewport incluso con position:fixed */
    clip-path: inset(0 0 0 0);
    pointer-events: none;
}

/* ================= PAGE WRAPPER ================= */
/* Contenedor definitivo que evita scroll horizontal en todos los navegadores,
   incluyendo iOS Safari. position:fixed (navbar, hero-bg) no se ve afectado. */
.page-wrapper {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
}


    inset: 0;
    background-image: linear-gradient(var(--bg-panel-border) 1px, transparent 1px),
                      linear-gradient(90deg, var(--bg-panel-border) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.2;
    mask-image: radial-gradient(circle at center, black, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, black, transparent 80%);
}

/* ========== AURORA BOREALIS BACKGROUND ========== */

@keyframes aurora-1 {
    0%   { transform: translate(0,0)     scale(1)   ; border-radius: 60% 40% 55% 45% / 50% 60% 40% 55%; }
    25%  { transform: translate(60px,-40px)  scale(1.08); border-radius: 45% 55% 40% 60% / 60% 40% 65% 35%; }
    50%  { transform: translate(30px, 70px)  scale(0.95); border-radius: 55% 45% 65% 35% / 45% 55% 35% 65%; }
    75%  { transform: translate(-50px, 20px) scale(1.05); border-radius: 40% 60% 50% 50% / 55% 45% 60% 40%; }
    100% { transform: translate(0,0)     scale(1)   ; border-radius: 60% 40% 55% 45% / 50% 60% 40% 55%; }
}

@keyframes aurora-2 {
    0%   { transform: translate(0,0)      scale(1)   ; border-radius: 50% 50% 40% 60% / 60% 35% 65% 40%; }
    33%  { transform: translate(-70px,50px)  scale(1.1) ; border-radius: 65% 35% 55% 45% / 40% 60% 45% 55%; }
    66%  { transform: translate(40px,-60px)  scale(0.92); border-radius: 40% 60% 60% 40% / 50% 50% 40% 60%; }
    100% { transform: translate(0,0)      scale(1)   ; border-radius: 50% 50% 40% 60% / 60% 35% 65% 40%; }
}

@keyframes aurora-3 {
    0%   { transform: translateX(40%)  scale(1)   ; border-radius: 55% 45% 60% 40% / 45% 65% 35% 55%; }
    30%  { transform: translateX(30%) translateY(-60px) scale(1.07); border-radius: 40% 60% 45% 55% / 60% 40% 60% 40%; }
    60%  { transform: translateX(45%) translateY(50px)  scale(0.93); border-radius: 60% 40% 55% 45% / 35% 65% 45% 55%; }
    100% { transform: translateX(40%)  scale(1)   ; border-radius: 55% 45% 60% 40% / 45% 65% 35% 55%; }
}

@keyframes aurora-4 {
    0%   { transform: translateX(-40%) scale(1)   ; border-radius: 45% 55% 65% 35% / 55% 45% 50% 50%; }
    40%  { transform: translateX(-32%) translateY(60px)  scale(1.06); border-radius: 60% 40% 40% 60% / 40% 60% 60% 40%; }
    70%  { transform: translateX(-46%) translateY(-40px) scale(0.96); border-radius: 50% 50% 55% 45% / 65% 35% 45% 55%; }
    100% { transform: translateX(-40%) scale(1)   ; border-radius: 45% 55% 65% 35% / 55% 45% 50% 50%; }
}

@keyframes aurora-5 {
    0%   { transform: translate(0,0)      scale(1)   ; border-radius: 60% 40% 50% 50% / 40% 60% 55% 45%; }
    35%  { transform: translate(-60px,-50px) scale(1.09); border-radius: 45% 55% 60% 40% / 55% 45% 40% 60%; }
    70%  { transform: translate(50px, 40px)  scale(0.94); border-radius: 55% 45% 40% 60% / 60% 40% 65% 35%; }
    100% { transform: translate(0,0)      scale(1)   ; border-radius: 60% 40% 50% 50% / 40% 60% 55% 45%; }
}

.glow-orb {
    position: absolute;
    filter: blur(90px);
    opacity: 0.45;
    z-index: -1;
    will-change: transform, border-radius;
}

/* Orb 1 — Cyan eléctrico top-right */
.orb-1 {
    width: 700px;
    height: 550px;
    background: radial-gradient(ellipse at 40% 40%, #00d2ff 0%, #007bff 55%, transparent 80%);
    top: -180px;
    right: -180px;
    animation: aurora-1 18s ease-in-out infinite;
}

/* Orb 2 — Teal / aqua bottom-left */
.orb-2 {
    width: 680px;
    height: 600px;
    background: radial-gradient(ellipse at 55% 55%, #00ffd5 0%, #00a8cc 50%, transparent 80%);
    bottom: -180px;
    left: -180px;
    animation: aurora-2 22s ease-in-out infinite;
}

/* Orb 3 — Azul profundo mid-right */
.orb-3 {
    width: 650px;
    height: 650px;
    background: radial-gradient(ellipse at 45% 50%, #1a4fff 0%, #0a1e6e 55%, transparent 80%);
    top: 35%;
    right: 0;
    animation: aurora-3 25s ease-in-out infinite;
}

/* Orb 4 — Indigo / purple-blue mid-left */
.orb-4 {
    width: 700px;
    height: 600px;
    background: radial-gradient(ellipse at 50% 45%, #2d00f7 0%, #6a00f4 45%, transparent 80%);
    bottom: 10%;
    left: 0;
    animation: aurora-4 20s ease-in-out infinite;
    opacity: 0.30;
}

/* Orb 5 — Cyan-verde center-right */
.orb-5 {
    width: 550px;
    height: 500px;
    background: radial-gradient(ellipse at 50% 50%, #00ffcc 0%, #00b4d8 50%, transparent 80%);
    top: 60%;
    right: 18%;
    animation: aurora-5 28s ease-in-out infinite;
    opacity: 0.35;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-panel);
    border: 1px solid var(--bg-panel-border);
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-green);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
}

.text-gradient {
    background: linear-gradient(135deg, #fff 0%, var(--accent-cyan) 50%, var(--accent-blue) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShimmer 3s linear infinite;
}

@keyframes gradientShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin-bottom: 2.5rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-cyan) 100%);
    box-shadow: var(--neon-glow);
    color: #fff;
    padding: 0.8rem 1.8rem;
    border-radius: 30px;
    font-weight: 600;
    transition: all var(--transition-speed);
    border: 1px solid rgba(255,255,255,0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--neon-hover);
    filter: brightness(1.2);
}

/* Abstract Dashboard Preview */
.hero-dashboard-preview {
    margin-top: 4rem;
    background: var(--bg-panel);
    border: 1px solid var(--bg-panel-border);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.dash-header {
    background: var(--bg-panel-light);
    border-bottom: 1px solid var(--bg-panel-border);
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
}

.mac-dots {
    display: flex;
    gap: 0.4rem;
}

.mac-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4b5563;
}

.dash-title {
    margin: 0 auto;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.dash-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1px;
    background: var(--bg-panel-border);
}

.stat-box {
    background: var(--bg-panel);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-box .label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.stat-box .value {
    font-size: 1.5rem;
    font-weight: 600;
    font-family: var(--font-mono);
}

.text-green { color: var(--accent-green); }
.text-cyan { color: var(--accent-cyan); }


/* ================= SOLUTIONS SECTION ================= */
.solutions-section {
    padding: 6rem 2rem;
    max-width: min(1200px, 100%);
    margin: 0 auto;
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
}

.section-topline {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-blue);
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    display: block;
}

.section-header p {
    color: var(--text-secondary);
    margin-top: 1rem;
}

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

.solutions-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 4rem;
    /* CRÍTICO: flex items necesitan min-width:0 para ceder ante su contenedor */
    min-width: 0;
    width: 100%;
    overflow: hidden;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    /* El grid mismo tampoco puede crecer más allá del contenedor */
    min-width: 0;
    width: 100%;
}

.bento-item {
    background: var(--bg-panel);
    border: 1px solid var(--bg-panel-border);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    /* CRÍTICO: evita que el item de grid crezca más allá de su celda */
    min-width: 0;
    overflow: hidden;
    width: 100%;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: inset 0 0 20px rgba(0, 210, 255, 0.05), 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.bento-item:hover {
    border-color: rgba(0, 210, 255, 0.6);
    box-shadow: inset 0 0 20px rgba(0, 210, 255, 0.1), 0 10px 40px rgba(0, 210, 255, 0.15);
}

.bento-item.span-2 {
    grid-column: span 2;
}

@media (max-width: 900px) {
    .bento-grid { grid-template-columns: 1fr; }
    .bento-item.span-2 { grid-column: span 1; }
}

/* Hero Stats Bar */
.hero-stats-bar {
    display: flex;
    justify-content: center;
    gap: 4rem;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid var(--bg-panel-border);
    border-bottom: 1px solid var(--bg-panel-border);
    background: rgba(10, 22, 40, 0.4);
    width: 100%;
    flex-wrap: wrap;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.hero-stat .stat-val {
    font-size: 1.5rem;
    font-family: var(--font-mono);
    color: var(--text-primary);
    font-weight: bold;
}

.hero-stat .stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.view-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    /* Evitar que el h3 largo fuerce el ancho del card */
    min-width: 0;
    overflow: hidden;
}

.view-header h3 {
    /* flex item que debe encogerse y wrappear */
    min-width: 0;
    flex: 1 1 0;
    word-break: break-word;
    overflow-wrap: break-word;
}

.pro-icon {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.4);
    border: 1px solid rgba(0, 210, 255, 0.3);
    background: #000;
}

.view-desc {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 3rem;
}

.tech-pill {
    background: var(--bg-panel-light);
    border: 1px solid var(--bg-panel-border);
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-primary);
    /* Pill no puede romper el contenedor */
    min-width: 0;
    word-break: break-word;
}

/* UI Mockups Inside Tabs */
.ui-mockup {
    border: 1px solid var(--bg-panel-border);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    background: #000;
    /* No puede ser más ancho que su bento-item padre */
    width: 100%;
    min-width: 0;
}

.mockup-header {
    background: var(--bg-panel-light);
    border-bottom: 1px solid var(--bg-panel-border);
    padding: 0.5rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    /* El header nunca puede ser más ancho que el mockup */
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.mockup-body {
    padding: 2rem;
    min-height: 200px;
    position: relative;
    background: #0e1015;
    overflow-x: auto;
    overflow-y: hidden;
    /* El mockup body no puede ser más ancho que el ui-mockup */
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

/* Custom Mockup specific styles */
.text-mono { font-family: var(--font-mono); }
.flex-center { display: flex; justify-content: center; align-items: center; }

/* Network Topology Mockup */
.topology-diagram { display: flex; flex-direction: column; align-items: center; gap: 1rem; width: max-content; min-width: 100%; }
.node { background: var(--bg-panel); border: 1px solid var(--bg-panel-border); padding: 0.5rem 1rem; font-size: 0.8rem; border-radius: var(--border-radius-sm); display: flex; gap: 0.5rem; position: relative; z-index: 2; transition: box-shadow 0.3s, border-color 0.3s; flex-direction: column; align-items: center; text-align: center; white-space: nowrap; }
.node i { font-size: 1.2rem; color: var(--accent-blue); }
.node.active-tx { box-shadow: 0 0 15px var(--text-primary); border-color: var(--text-primary); }
.node.client { background: rgba(10, 22, 40, 0.3); border-style: dashed; }
.line { background: var(--bg-panel-border); position: relative; }
.line.vertical { width: 2px; height: 30px; }
.line.horizontal { width: 100px; height: 2px; margin: auto; }
.packet { position: absolute; width: 6px; height: 6px; background: var(--text-primary); border-radius: 50%; box-shadow: 0 0 8px var(--text-primary); opacity: 0; z-index: 3;}
.packet.pkt-v { left: -2px; }
.packet.v-move { animation: pktV 1s ease-in-out; }
@keyframes pktV { 0% { top: 0; opacity: 1; transform: scale(1); } 50% { transform: scale(1.5);} 90% { top: 100%; opacity: 1; transform: scale(1);} 100% { top: 100%; opacity: 0; } }

.topo-branches { display: flex; gap: 2rem; position: relative; margin-top: 5px; width: max-content; justify-content: center; }
.line-branch { position: absolute; top: -16px; left: 16%; right: 16%; height: 2px; background: var(--bg-panel-border); z-index: 1;}
.branch { display: flex; flex-direction: column; align-items: center; gap: 10px; position:relative; z-index:2;}

/* CCTV Analytics Panel */
.view-cctv-feed {
    background: url('cctv_bg.png') center/cover no-repeat;
    position: relative;
    overflow: hidden;
    min-height: 240px;
    height: 240px;
}
.view-cctv-feed::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.35) 100%);
    z-index: 0;
}
.view-cctv-feed::after {
    content: '';
    position: absolute; top:0; left:0; right:0; height:2px;
    background: rgba(0,210,255,0.35);
    animation: cctvScan 8s linear infinite;
    pointer-events: none;
    z-index: 2;
}
@keyframes cctvScan { 0% { top: 0; } 100% { top: 100%; } }

.cctv-analytics-panel {
    position: absolute;
    right: 8px; bottom: 8px;
    width: auto;
    min-width: 170px;
    display: flex; flex-direction: column;
    padding: 0.35rem 0.5rem;
    background: rgba(5, 10, 18, 0.78);
    border: 1px solid rgba(0,210,255,0.15);
    border-radius: 4px;
    z-index: 3;
}

/* HUD corners */
.hud-corner {
    position: absolute;
    width: 14px; height: 14px;
    border-color: rgba(0,210,255,0.75); border-style: solid;
    z-index: 4;
}
.hud-tl { top: 8px;  left: 8px;  border-width: 2px 0 0 2px; }
.hud-tr { top: 8px;  right: 8px; border-width: 2px 2px 0 0; }
.hud-bl { bottom: 8px; left: 8px;  border-width: 0 0 2px 2px; }
.hud-br { bottom: 8px; right: 8px; border-width: 0 2px 2px 0; }

/* Live clock */
.hud-timestamp {
    position: absolute;
    top: 8px; left: 26px;
    font-family: var(--font-mono);
    font-size: 0.58rem;
    color: rgba(0,210,255,0.7);
    letter-spacing: 0.05em;
    z-index: 4;
    pointer-events: none;
}

.cctv-panel-title {
    font-family: var(--font-mono);
    font-size: 0.46rem;
    letter-spacing: 0.18em;
    color: rgba(0,210,255,0.5);
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}

.cctv-service-list {
    display: flex; flex-direction: column; gap: 0.15rem;
}

.cctv-svc {
    display: flex; align-items: center; gap: 0.3rem;
    padding: 0.12rem 0.3rem;
    border-radius: 2px;
    transition: background 0.3s;
}

.cctv-svc:hover { background: rgba(0,210,255,0.06); }

.cctv-dot {
    width: 4px; height: 4px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    flex-shrink: 0;
    transition: background 0.4s, box-shadow 0.4s;
}
.cctv-dot.active {
    background: var(--accent-green);
    box-shadow: 0 0 6px rgba(46,213,115,0.8);
    animation: dotPulse 2s infinite;
}
@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 4px rgba(46,213,115,0.7); }
    50%       { box-shadow: 0 0 10px rgba(46,213,115,1); }
}

.cctv-svc-name {
    flex: 1;
    font-size: 0.5rem;
    font-family: var(--font-mono);
    color: rgba(255,255,255,0.75);
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.cctv-svc-badge {
    font-size: 0.42rem;
    font-family: var(--font-mono);
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.07rem 0.28rem;
    border-radius: 20px;
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.28);
    border: 1px solid rgba(255,255,255,0.07);
    transition: all 0.4s;
    white-space: nowrap;
}
.cctv-svc-badge.active {
    background: rgba(46,213,115,0.12);
    color: var(--accent-green);
    border-color: rgba(46,213,115,0.35);
}
.cctv-svc-badge.processing {
    background: rgba(0,210,255,0.12);
    color: var(--neon-cyan);
    border-color: rgba(0,210,255,0.35);
    animation: dotPulse 1s infinite;
}


/* Access Mockup */
.list-data { padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.75rem; height: 200px; overflow: hidden; position: relative; }
.log-row { display: flex; justify-content: space-between; padding: 0.5rem; border-bottom: 1px solid var(--bg-panel-border); animation: slideDown 0.4s ease-out; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.log-row.success span:last-child { color: var(--accent-green); }
.log-row.error span:last-child { color: var(--accent-red); }

/* Cloud Mockup (Phone / Bot) */
.bot-header { color: var(--accent-cyan); display: flex; align-items: center; gap: 0.5rem; justify-content: space-between; }
.bot-metrics { display: flex; justify-content: center; align-items: center; padding: 1rem; }
.m-phone { width: 240px; background: #1a1a1a; border-radius: 30px; padding: 6px; box-shadow: 0 0 0 1px rgba(255,255,255,.07), 0 15px 30px rgba(0,0,0,.5); }
.m-screen { background: #0a1628; border-radius: 24px; overflow: hidden; height: 380px; display: flex; flex-direction: column; position: relative; }
.m-notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 80px; height: 18px; background: #1a1a1a; border-radius: 0 0 10px 10px; z-index: 10; }
.m-wa-header { background: #075E54; padding: 22px 10px 8px; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.m-avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg,#25D366,#128C7E); display: flex; align-items: center; justify-content: center; font-size: 14px; }
.m-wa-name { font-size: 11px; font-weight: 600; color: #fff; line-height: 1.1; }
.m-wa-status { font-size: 9px; color: rgba(255,255,255,.65); display: flex; align-items: center; gap: 3px; }
.m-status-dot { width: 4px; height: 4px; border-radius: 50%; background: #25D366; animation: blink 2s infinite; }
.m-chat { flex: 1; overflow-y: auto; background: #0d1f38; padding: 8px; display: flex; flex-direction: column; gap: 5px; }
.m-msg { display: flex; flex-direction: column; opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; max-width: 85%; }
.m-msg.show { opacity: 1; transform: translateY(0); }
.m-msg.in { align-self: flex-start; }
.m-msg.out { align-self: flex-end; }
.m-bubble { padding: 6px 8px; font-size: 10px; line-height: 1.3; word-break: break-word; }
.m-msg.in .m-bubble { background: #1a2f4a; color: #e8e8e8; border-radius: 3px 10px 10px 10px; }
.m-msg.out .m-bubble { background: #1a3a2a; color: #e8f8e8; border-radius: 10px 10px 3px 10px; }
.m-time { font-size: 8px; color: rgba(255,255,255,.28); margin-top: 2px; }
.m-msg.in .m-time { align-self: flex-start; }
.m-msg.out .m-time { align-self: flex-end; }
.m-typing { display: none; align-self: flex-start; background: #1a2f4a; padding: 6px 10px; border-radius: 3px 10px 10px 10px; gap: 3px; align-items: center; }
.m-typing.show { display: flex; }
.m-tdot { width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.35); animation: typeBounce 1.2s infinite; }
.m-tdot:nth-child(2){animation-delay:.2s}
.m-tdot:nth-child(3){animation-delay:.4s}
@keyframes typeBounce { 0%,80%,100%{transform:scale(.7);opacity:.35} 40%{transform:scale(1);opacity:1} }
.m-input { background: #1f2d3d; padding: 6px; display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.m-input-box { flex: 1; background: rgba(255,255,255,.05); border-radius: 12px; padding: 6px 10px; font-size: 9px; color: rgba(255,255,255,.35); }
.m-send { width: 24px; height: 24px; border-radius: 50%; background: #075E54; display: flex; align-items: center; justify-content: center; font-size: 10px; color: white; }


/* ================= CONTACT SECTION ================= */
.contact-section {
    padding: 6rem 2rem;
    max-width: min(1200px, 100%);
    margin: 0 auto;
    box-sizing: border-box;
    width: 100%;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    width: 100%;
}

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

.info-line {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text-primary);
    background: var(--bg-panel);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--bg-panel-border);
    /* Evitar que el email largo fuerce el ancho */
    overflow-wrap: break-word;
    word-break: break-all;
    min-width: 0;
}

.info-line span {
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-all;
}

.info-line i {
    font-size: 1.5rem;
    color: var(--accent-blue);
    flex-shrink: 0;
}

.contact-form {
    background: var(--bg-panel);
    padding: 3rem;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--bg-panel-border);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    background: var(--bg-panel);
    border: 1px solid var(--bg-panel-border);
    color: var(--text-primary);
    padding: 0.8rem 1rem;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-ui);
    outline: none;
    transition: border-color var(--transition-speed);
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    border-color: var(--accent-blue);
}

.w-100 {
    width: 100%;
    justify-content: center;
    border: none;
    cursor: pointer;
}

/* ================= CAPABILITIES SECTION ================= */
.capabilities-section {
    padding: 6rem 2rem;
    border-top: 1px solid var(--bg-panel-border);
    box-sizing: border-box;
    width: 100%;
}

.caps-header {
    margin-bottom: 4rem;
}

.caps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* ================= FOOTER ================= */
.footer {
    background: var(--bg-dark);
    border-top: 1px solid var(--bg-panel-border);
    padding: 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.footer-logo {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.footer-legal {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-links {
    font-size: 0.8rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.footer-links a {
    color: var(--text-muted);
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--accent-cyan);
}

.footer-links span {
    color: var(--text-muted);
    opacity: 0.4;
}

/* ================= RESPONSIVE ================= */

/* -------------------------------------------------------
   GLOBAL: evitar scroll horizontal en TODOS los tamaños
   ------------------------------------------------------- */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Las orbes de fondo (glow) no deben ampliar el viewport */
.hero-bg {
    overflow: hidden;
    max-width: 100vw;
}

/* =================================================================
   RESPONSIVE — versión definitiva
   La página NO debe moverse horizontalmente en NINGÚN dispositivo.
   El page-wrapper maneja el clip principal; aquí ajustamos layout.
   ================================================================= */

@media (max-width: 900px) {

    /* Navbar hamburguesa */
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(10, 12, 18, 0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        padding: 1.5rem 1.5rem 2rem;
        border-bottom: 1px solid var(--bg-panel-border);
        gap: 1.25rem;
        z-index: 998;
    }
    .nav-links.nav-open { display: flex; }
    .nav-links a {
        font-size: 1rem;
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    .btn-primary-sm {
        width: 100%;
        text-align: center;
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
    .lang-switcher {
        border-left: none;
        padding-left: 0;
        margin-left: 0;
        justify-content: center;
        padding-top: 0.5rem;
        border-top: 1px solid rgba(255,255,255,0.05);
    }
    .menu-toggle { display: block; }

    /* Hero */
    .hero-section {
        padding: 7rem 1.25rem 3rem;
        min-height: auto;
    }
    .hero-dashboard-preview { display: none; }
    .hero-stats-bar {
        gap: 1rem;
        padding: 1.25rem 0.75rem;
        flex-wrap: wrap;
        justify-content: space-around;
    }

    /* Solutions */
    .solutions-section {
        padding: 4rem 1.25rem;
    }
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .bento-item.span-2 { grid-column: span 1; }
    .bento-item { padding: 1.25rem; }

    /* Mockup interno */
    .mockup-body { padding: 0.75rem; }

    /* Topología red — se hace scroll dentro del mockup */
    .topo-branches { gap: 0.75rem; }
    .node {
        font-size: 0.65rem;
        padding: 0.35rem 0.5rem;
        max-width: 88px;
        white-space: normal;
        word-break: break-word;
    }

    /* CCTV panel */
    .cctv-analytics-panel {
        right: 6px;
        bottom: 6px;
        max-width: 54%;
        min-width: unset;
    }

    /* Bot */
    .bot-metrics { padding: 0.75rem 0.5rem; }

    /* Capabilities */
    .capabilities-section { padding: 4rem 1.25rem; }
    .caps-grid {
        grid-template-columns: 1fr;
    }

    /* Contact */
    .contact-section { padding: 4rem 1.25rem; }
    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .contact-form { padding: 2rem; }
}

@media (max-width: 560px) {

    /* Navbar */
    .nav-container { padding: 0.75rem 1rem; }
    .logo span { font-size: 0.82rem; }

    /* Hero */
    .hero-section { padding: 5.5rem 1rem 2rem; }
    .hero-title { font-size: 1.75rem; }
    .hero-subtitle { font-size: 0.92rem; }
    .hero-stats-bar {
        gap: 0.5rem;
        padding: 0.75rem 0.5rem;
    }
    .hero-stat .stat-val { font-size: 1rem; }
    .hero-stat .stat-label { font-size: 0.58rem; }

    /* Solutions */
    .solutions-section { padding: 3rem 0.75rem; }
    .section-header h2 { font-size: 1.4rem; }
    .bento-item { padding: 1rem; }
    .pro-icon { width: 44px; height: 44px; flex-shrink: 0; }

    /* Topología */
    .node { font-size: 0.55rem; padding: 0.25rem 0.4rem; max-width: 72px; }

    /* CCTV */
    .cctv-analytics-panel { max-width: 58%; padding: 0.25rem 0.35rem; }
    .cctv-svc-name { font-size: 0.4rem; }

    /* Bot */
    .m-phone { width: 185px; }
    .m-screen { height: 300px; }

    /* Capabilities */
    .capabilities-section { padding: 3rem 0.75rem; }

    /* Contact */
    .contact-section { padding: 3rem 0.75rem; }
    .contact-info h2 { font-size: 1.35rem; }
    .contact-info p { font-size: 0.9rem; margin-bottom: 1.5rem; }
    .info-line { font-size: 0.9rem; padding: 0.75rem 1rem; }
    .contact-form { padding: 1.25rem; }
}
        font-size: 0.85rem;
        padding: 0.7rem 1rem;
        word-break: break-all;
    }
    .contact-form {
        padding: 1.25rem;
    }
}