/* SISTEMA DE DISEÑO DE CONTROL G.A.P. - ESTILO CIBERNÉTICO OSCURO LOVABLE */

:root {
    /* Paleta Cromática Lovable */
    --background-radial: radial-gradient(at top, #0b1c2c, #040a11 70%);
    --bg-page-dark: #040a11;
    --bg-navbar: rgba(4, 10, 17, 0.75);
    
    /* Variables de Fondo y Textos */
    --bg-page-light: #040a11;      /* Fondo general oscuro */
    --bg-card-white: rgba(25, 37, 50, 0.7); /* Vidrio oscuro esmerilado */
    
    --text-hero-title: #ffffff;    /* Título principal en blanco */
    --text-hero-body: #e2e8f0;     /* Texto secundario claro */
    --text-hero-pre: #00cee7;      /* Pretítulo en cian neón */
    
    --text-main: #f8fafc;          /* Texto principal claro */
    --text-muted: #94a3b8;         /* Texto atenuado */
    
    /* Botones y Acentos */
    --accent-btn: #00cee7;         /* Botón principal cian neón */
    --accent-btn-hover: #3b82f6;
    --accent-electric: #3b82f6;   /* Azul Eléctrico */
    --accent-cyan: #00cee7;       /* Cian tecnológico */
    
    /* Glows y Colores de Resplandor */
    --cyan-glow: #00cee7;
    --blue-glow: #3b82f6;
    --teal-glow: #2dd4bf;
    --steel: #475569;
    --steel-light: #94a3b8;
    
    /* Estados */
    --color-ok: #10b981;
    --color-warn: #f59e0b;
    --color-err: #ef4444;
    
    /* Bordes y Esquinas */
    --border-thick-white: 2px solid rgba(0, 206, 231, 0.4); /* Reemplazamos el borde grueso blanco por cian-glow */
    --border-light: rgba(56, 189, 248, 0.15); /* Borde cian translúcido */
    --border-slate: rgba(56, 189, 248, 0.25);
    
    --font-heading: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.25s ease;
}

/* REGLAS BÁSICAS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background: radial-gradient(at top, #0b1c2c, #040a11 70%);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* NAVBAR (CABECERA OSCURA FIEL A LA CAPTURA) */
.navbar-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #0b0f19;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1000;
    transition: var(--transition-smooth);
}

.navbar-container.scrolled {
    background-color: rgba(11, 15, 25, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

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

.logo-area {
    display: flex;
    align-items: center;
}

.logo-container-integrated {
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(14, 165, 233, 0.25);
    border-radius: 10px;
    padding: 0.35rem 0.75rem;
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.1), inset 0 1px 1px rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
}

.logo-container-integrated:hover {
    background: rgba(15, 23, 42, 0.65);
    border-color: rgba(14, 165, 233, 0.45);
    box-shadow: 0 0 25px rgba(14, 165, 233, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.company-logo {
    height: 56px;
    width: auto;
    object-fit: contain;
    transition: var(--transition-smooth);
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    margin-left: 0.75rem;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    transition: var(--transition-smooth);
}

.logo-text-accent {
    color: var(--accent-cyan);
    margin-left: 0.25rem;
}

.logo-container-integrated:hover .company-logo {
    transform: scale(1.02);
}

.logo-container-integrated:hover .logo-text {
    color: var(--accent-cyan);
}

.logo-fallback-text {
    display: none;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
}

.logo-fallback-text span span {
    color: var(--accent-cyan);
}

.bulb-icon-mini {
    width: 24px;
    height: 24px;
    color: var(--accent-cyan);
    background-color: rgba(14, 165, 233, 0.15);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

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

.nav-item {
    font-size: 0.9rem;
    font-weight: 500;
    color: #94a3b8;
    padding: 0.25rem 0.5rem;
}

.nav-item:hover, .nav-item.active {
    color: #ffffff;
}

.nav-btn-link {
    background-color: transparent;
    color: #e2e8f0;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-left: 0.5rem;
    transition: var(--transition-fast);
}

.nav-btn-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: #ffffff;
    color: #ffffff;
}

/* MENÚ MÓVIL */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle .bar {
    width: 24px;
    height: 2px;
    background-color: #ffffff;
    border-radius: 2px;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: #0b0f19;
    border-left: 1px solid rgba(255,255,255,0.08);
    z-index: 999;
    padding: 6rem 2rem 2rem 2rem;
    flex-direction: column;
    gap: 1.5rem;
    transition: var(--transition-smooth);
}

.mobile-menu.active {
    right: 0;
}

.mobile-nav-item {
    font-size: 1.1rem;
    font-weight: 600;
    color: #94a3b8;
}

.mobile-nav-item:hover {
    color: #ffffff;
}

.mobile-btn-link {
    background-color: transparent;
    color: #ffffff;
    padding: 0.75rem;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* HERO (ESTILO CIBERNÉTICO OSCURO CON RESPLANDOR DE NEÓN) */
.hero-section {
    position: relative;
    padding: 10rem 0 12rem 0;
    background: transparent;
    color: var(--text-main);
    overflow: hidden;
    border-bottom: 1px solid var(--border-light);
}

.hero-background-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(48, 76, 89, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(48, 76, 89, 0.08) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.circuit-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 80% 30%, rgba(59, 130, 246, 0.15) 0%, transparent 60%),
        radial-gradient(circle at 20% 70%, rgba(0, 206, 231, 0.12) 0%, transparent 60%);
    pointer-events: none;
}

/* MARCA DE AGUA DIFUMINADA (NUEVO LOGOTIPO DETRÁS DEL TEXTO) */
.background-logo-watermark {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 650px;
    height: 650px;
    opacity: 0.07;
    filter: blur(3px);
    pointer-events: none;
    z-index: -1;
    animation: floatWatermark 12s ease-in-out infinite alternate;
}

.background-logo-watermark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text-content {
    max-width: 620px;
    position: relative;
    z-index: 2;
}

.hero-pretitle {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    color: var(--cyan-glow);
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(0, 206, 231, 0.3);
    border-radius: 50px;
    padding: 0.25rem 1rem;
    background-color: rgba(0, 206, 231, 0.05);
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 0.95;
    margin-bottom: 1rem;
    letter-spacing: -0.04em;
    text-shadow: 0 0 24px rgba(0, 206, 231, 0.35);
}

.hero-tagline {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-hero-body);
    letter-spacing: 0.02em;
    margin-bottom: 2.5rem;
}

/* BOTONES CIBERNÉTICOS CON RESPLANDOR */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: linear-gradient(135deg, var(--cyan-glow), var(--blue-glow));
    color: #010408;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4), inset 0 1px rgba(255, 255, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.6), inset 0 1px rgba(255, 255, 255, 0.4);
}

/* CONTENEDOR BRAZO ROBÓTICO / PANEL SCADA */
.hero-visual-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.robot-arm-image-container {
    width: 100%;
    max-width: 480px;
    height: auto;
    filter: drop-shadow(0 0 35px rgba(0, 206, 231, 0.2));
    animation: hologramFloat 6s ease-in-out infinite;
}

.robot-hero-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    border-radius: 12px;
}

/* WIDGETS DE OPERACIÓN (OVERLAPPING GRIDS CON FONDOS TRASLÚCIDOS) */
.dashboard-widgets-section {
    padding: 0 0 6rem 0;
    margin-top: -8.5rem; /* Margen negativo para superposición */
    background-color: transparent;
    position: relative;
    z-index: 5;
}

.dashboard-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}

.margin-top-cards {
    margin-top: 2.5rem;
}

/* TARJETAS GLASS CIBERNÉTICAS */
.widget-card.glass-card {
    background: linear-gradient(145deg, rgba(25, 37, 50, 0.65), rgba(11, 23, 35, 0.55));
    border: 1px solid rgba(0, 206, 231, 0.15);
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), inset 0 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 2rem;
    transition: var(--transition-smooth);
}

.widget-card.glass-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 206, 231, 0.3);
    box-shadow: 0 16px 48px rgba(0, 206, 231, 0.15), 0 12px 32px rgba(0, 0, 0, 0.5);
}

.widget-header {
    margin-bottom: 1.5rem;
}

.widget-title {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #ffffff;
    margin-bottom: 0.25rem;
    text-shadow: 0 0 15px rgba(0, 206, 231, 0.2);
}

.widget-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.margin-bottom-small {
    margin-bottom: 1.5rem;
}

/* SUB-TARJETAS DE EXCELENCIA OPERACIONAL */
.grid-subcards {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 1.25rem;
}

.sub-dashboard-card {
    background-color: rgba(9, 18, 28, 0.8);
    border: 1px solid rgba(0, 206, 231, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: var(--text-main);
}

.live-data-card {
    min-height: 190px;
}

.subcard-title {
    font-size: 0.7rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    display: block;
}

.sparkline-container {
    height: 60px;
    margin-bottom: 0.5rem;
}

.sparkline-svg {
    width: 100%;
    height: 100%;
}

.subcard-stats {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #f1f5f9;
    padding-top: 0.5rem;
}

.stat-mini {
    display: flex;
    flex-direction: column;
}

.stat-lbl {
    font-size: 0.6rem;
    color: #94a3b8;
    font-weight: 600;
}

.stat-val {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
}

.stat-val.text-green {
    color: #10b981;
}

/* DASHBOARD MOCKUP DENTRO DE EXCELENCIA OPERACIONAL */
.main-dashboard-card {
    display: flex;
    flex-direction: row;
    padding: 0;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.dashboard-mockup-sidebar {
    width: 25px;
    background-color: #0f172a;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding-top: 15px;
}

.sidebar-dot {
    width: 6px;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.dashboard-mockup-content {
    flex-grow: 1;
    min-width: 0; /* Evita que el contenedor flexible desborde por su contenido */
    background-color: #f8fafc;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mockup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.4rem;
}

.mockup-search {
    font-size: 0.65rem;
    color: #94a3b8;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 2px 8px;
    width: 90px;
    display: block;
}

.mockup-icons {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mockup-icon-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: #cbd5e1;
}

.mockup-icon-avatar {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #2563eb;
}

.mockup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.mockup-metric-dial {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 0.5rem;
    text-align: center;
}

.circular-chart-mockup {
    max-width: 45px;
    margin-bottom: 2px;
}

.circle-bg {
    fill: none;
    stroke: #f1f5f9;
    stroke-width: 3.5;
}

.circle {
    fill: none;
    stroke: #2563eb;
    stroke-width: 3.5;
    stroke-linecap: round;
    transition: stroke-dasharray 0.3s ease;
}

.percentage-mockup {
    fill: #0f172a;
    font-family: var(--font-heading);
    font-size: 8px;
    text-anchor: middle;
    font-weight: 800;
}

.mockup-label-small {
    font-size: 0.55rem;
    font-weight: 700;
    color: #94a3b8;
    display: block;
    margin-bottom: 2px;
}

.mockup-graph-area {
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.mockup-line-graphic {
    height: 25px;
}

.mockup-svg-line {
    width: 100%;
    height: 100%;
}

.mockup-predictive-area {
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 0.5rem;
}

.mockup-bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 25px;
    margin-top: 2px;
}

.mockup-bar-chart .bar-col {
    flex-grow: 1;
    background-color: #3b82f6;
    border-radius: 1px;
    min-width: 4px;
    transition: height 0.5s ease;
}

.mockup-status-area {
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-dot-green {
    width: 6px;
    height: 6px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 4px #10b981;
}

.status-text-green {
    font-size: 0.6rem;
    font-weight: 800;
    color: #10b981;
}

.processed-counter {
    border-top: 1px solid #f1f5f9;
    padding-top: 2px;
}

.counter-lbl {
    font-size: 0.5rem;
    color: #94a3b8;
    font-weight: 600;
    display: block;
}

.counter-val {
    font-size: 0.75rem;
    font-weight: 800;
    color: #0f172a;
}

/* HMI CONSOLE (WIDGET 2 PLC/HMI FIEL A LA CAPTURA) */
.plc-monitor-panel {
    background-color: #cbd5e1; /* Borde metálico exterior */
    border-radius: 12px;
    padding: 4px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2), 0 4px 15px rgba(0,0,0,0.05);
}

.hmi-layout-split {
    display: grid;
    grid-template-columns: 80px 1fr;
    background-color: #0b0f19;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0, 206, 231, 0.15);
}

/* HMI Sidebar Column */
.hmi-sidebar {
    background-color: #0f172a;
    padding: 0.75rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-right: 2px solid rgba(0, 206, 231, 0.15);
}

.hmi-sidebar-title {
    font-size: 0.55rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    display: block;
    margin-bottom: 2px;
}

.hmi-sidebar-title.margin-top {
    margin-top: 8px;
}

.hmi-led-btn-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    margin-bottom: 4px;
}

.hmi-btn-status {
    background-color: rgba(9, 18, 28, 0.8);
    border: 1px solid rgba(0, 206, 231, 0.15);
    border-radius: 3px;
    padding: 2px 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.5rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
}

.hmi-btn-status.active {
    background-color: rgba(0, 206, 231, 0.1);
    border-color: var(--cyan-glow);
    color: #ffffff;
}

.hmi-led {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: #475569;
}

.hmi-led.green { background-color: #10b981; box-shadow: 0 0 4px #10b981; }
.hmi-led.yellow { background-color: #f59e0b; box-shadow: 0 0 4px #f59e0b; }
.hmi-led.red { background-color: #ef4444; box-shadow: 0 0 4px #ef4444; }

/* HMI Main Display */
.hmi-main-display {
    background-color: #040a11;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hmi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 206, 231, 0.15);
    padding-bottom: 0.25rem;
}

.hmi-panel-name {
    font-size: 0.65rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.05em;
    text-shadow: 0 0 10px rgba(0, 206, 231, 0.3);
}

.hmi-top-leds {
    display: flex;
    gap: 6px;
}

.hmi-top-leds .led {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #334155;
}

.hmi-top-leds .led.green.active { background-color: #10b981; box-shadow: 0 0 5px #10b981; }
.hmi-top-leds .led.yellow.active { background-color: #f59e0b; box-shadow: 0 0 5px #f59e0b; }
.hmi-top-leds .led.red.active { background-color: #ef4444; box-shadow: 0 0 5px #ef4444; }

/* HMI Charts and Waves */
.hmi-charts-area {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 0.75rem;
}

.hmi-dial-box, .hmi-wave-box {
    background-color: rgba(9, 18, 28, 0.8);
    border: 1px solid rgba(0, 206, 231, 0.15);
    border-radius: 6px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hmi-radial-gauge {
    max-width: 45px;
    margin-bottom: 4px;
}

.hmi-wave-box {
    align-items: stretch;
}

.hmi-wave-svg {
    width: 100%;
    height: 25px;
    margin-bottom: 4px;
}

.hmi-lbl {
    font-size: 0.55rem;
    font-weight: 700;
    color: var(--text-muted);
}

/* LADDER LOGIC (ESTILO CIRCUITAL) */
.ladder-logic-display {
    padding: 0.75rem;
    background-color: rgba(9, 18, 28, 0.8);
    border: 1px solid rgba(0, 206, 231, 0.15);
    border-radius: 6px;
}

.ladder-row {
    display: flex;
    justify-content: space-between;
    height: 38px;
}

.ladder-rail-left {
    width: 4px;
    background-color: #3b82f6;
}

.ladder-rail-right {
    width: 4px;
    background-color: #334155;
}

.ladder-wire {
    flex-grow: 1;
    display: flex;
    align-items: center;
    padding: 0 0.25rem;
}

.ladder-line-connect {
    height: 1.5px;
    background-color: #3b82f6;
    flex-grow: 1;
}

.ladder-line-connect.long-connect {
    flex-grow: 2.5;
}

.ladder-contact {
    display: flex;
    align-items: center;
    font-family: monospace;
    font-weight: bold;
    font-size: 0.75rem;
    position: relative;
    color: #3b82f6;
}

.contacts-ok { color: #10b981; }
.contacts-err { color: #ef4444; }

.contact-bracket {
    font-size: 0.95rem;
}

.contact-label {
    font-size: 0.55rem;
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

.ladder-coil {
    display: flex;
    align-items: center;
    font-family: monospace;
    font-weight: bold;
    font-size: 0.75rem;
    position: relative;
    color: #475569;
}

.ladder-coil.coil-active {
    color: #10b981;
    text-shadow: 0 0 3px rgba(16, 185, 129, 0.4);
}

.ladder-coil.coil-err {
    color: #ef4444;
}

.coil-label {
    font-size: 0.55rem;
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

/* TERMINAL DE DIAGNÓSTICOS HMI */
.plc-diagnostics {
    padding: 0.5rem 0.75rem;
    background-color: #000205;
    font-family: monospace;
    font-size: 0.65rem;
    color: #34d399;
    height: 65px;
    border-radius: 4px;
    overflow-y: hidden;
    border: 1px solid rgba(0, 206, 231, 0.15);
}

.diag-header {
    color: var(--text-muted);
    margin-bottom: 2px;
    font-weight: bold;
}

.diag-row {
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.plc-actions {
    padding: 0.4rem 0.75rem;
    background-color: #0f172a;
    border-radius: 4px;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    border-top: 1px solid rgba(0, 206, 231, 0.15);
}

.btn-plc-control {
    background-color: rgba(0, 206, 231, 0.15);
    color: var(--cyan-glow);
    border: 1px solid rgba(0, 206, 231, 0.3);
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-plc-control:hover {
    background-color: rgba(0, 206, 231, 0.3);
    color: #ffffff;
}

.btn-plc-control.danger-btn {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-plc-control.danger-btn:hover {
    background-color: #ef4444;
    color: #ffffff;
}

/* FILA 2 DE CARD GRIDS (SOLUCIONES & VALORES) */
.solutions-horizontal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.sub-solution-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-right: 0.5rem;
}

.sub-solution-col:not(:last-child) {
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sub-solution-icon {
    width: 32px;
    height: 32px;
    color: var(--accent-cyan);
    margin-bottom: 0.75rem;
}

.sub-solution-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.sub-solution-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* SECCIÓN POR QUÉ ELEGIRNOS - ELIMINADA COMO INDEPENDIENTE Y ADAPTADA AL GRID */
.why-icon-box {
    width: 60px;
    height: 60px;
    background-color: rgba(14, 165, 233, 0.08);
    color: var(--accent-cyan);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    padding: 15px;
}

/* SECCIÓN NOSOTROS */
.about-section {
    padding: 7rem 0;
    background-color: var(--bg-card-white);
    border-bottom: 1px solid var(--border-light);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 5rem;
    align-items: center;
}

/* Widget de Sinergia Tecnológica */
.synergy-widget-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.synergy-widget-container {
    width: 100%;
    max-width: 400px;
    position: relative;
    background: rgba(4, 10, 17, 0.4);
    border: 1px solid rgba(56, 189, 248, 0.1);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: inset 0 0 20px rgba(0, 206, 231, 0.03);
}

.synergy-svg {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
}

/* Estilos de Nodos */
.synergy-node {
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.node-ia { transform-origin: 200px 75px; }
.node-plc { transform-origin: 90px 265px; }
.node-apps { transform-origin: 310px 265px; }
.node-center { transform-origin: 200px 185px; }

.synergy-node:hover {
    transform: scale(1.15);
}

/* Transiciones de color y filtros */
.synergy-node .node-bg {
    transition: stroke-width 0.3s ease, fill 0.3s ease, stroke 0.3s ease;
}

.synergy-node:hover .node-bg {
    stroke-width: 3px;
    fill: rgba(15, 23, 42, 0.9);
}

/* Etiquetas del SVG */
.synergy-label {
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    pointer-events: none;
    user-select: none;
    transition: fill 0.3s ease, opacity 0.3s ease;
}

.synergy-sublabel {
    font-family: var(--font-body);
    font-size: 0.48rem;
    font-weight: 700;
    fill: var(--text-muted);
    letter-spacing: 0.05em;
    pointer-events: none;
    user-select: none;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.label-plc { fill: #00cee7; }
.label-apps { fill: #3b82f6; }
.label-ia { fill: #d946ef; }
.label-center { fill: #ffffff; }

/* Flujos de datos activos (animaciones CSS) */
.flow-line {
    stroke-linecap: round;
    animation: flow-dash 4s linear infinite;
    opacity: 0.75;
    transition: stroke-width 0.3s ease, opacity 0.3s ease, stroke 0.3s ease;
}

.flow-fast {
    animation-duration: 2.2s;
}

@keyframes flow-dash {
    to {
        stroke-dashoffset: -100;
    }
}

/* Tarjeta informativa dinámica del widget */
.synergy-info-card {
    width: 100%;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(11, 15, 25, 0.85) !important;
    border: 1px solid rgba(56, 189, 248, 0.15) !important;
    border-radius: 16px;
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.5) !important;
    transition: border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.3s ease;
}

.synergy-info-card:hover {
    transform: translateY(-2px);
}

.synergy-info-card h4 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 0.6rem;
    color: #ffffff;
    letter-spacing: -0.01em;
    transition: color 0.3s ease;
}

.synergy-info-card p {
    font-family: var(--font-body);
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--text-muted);
    margin: 0;
    transition: color 0.3s ease;
}

/* Modificadores dinámicos activados por JS */
.synergy-info-card.border-plc {
    border-color: rgba(0, 206, 231, 0.5) !important;
    box-shadow: 0 0 20px rgba(0, 206, 231, 0.12), 0 15px 35px -10px rgba(0, 0, 0, 0.5) !important;
}
.synergy-info-card.border-apps {
    border-color: rgba(59, 130, 246, 0.5) !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.12), 0 15px 35px -10px rgba(0, 0, 0, 0.5) !important;
}
.synergy-info-card.border-ia {
    border-color: rgba(217, 70, 239, 0.5) !important;
    box-shadow: 0 0 20px rgba(217, 70, 239, 0.12), 0 15px 35px -10px rgba(0, 0, 0, 0.5) !important;
}
.synergy-info-card.border-center {
    border-color: rgba(0, 206, 231, 0.4) !important;
    box-shadow: 0 0 15px rgba(0, 206, 231, 0.08), 0 15px 35px -10px rgba(0, 0, 0, 0.5) !important;
}

.text-plc { color: #00cee7 !important; }
.text-apps { color: #3b82f6 !important; }
.text-ia { color: #d946ef !important; }
.text-center { color: #00cee7 !important; }

/* Desenfocar flujos inactivos en hover */
.flow-line.muted-flow {
    opacity: 0.15;
    stroke-width: 1px;
}

.flow-line.highlight-flow {
    opacity: 1;
    stroke-width: 3px;
}

/* SECCIÓN CONTACTO */
.contact-section {
    padding: 7rem 0;
    background-color: var(--bg-page-light);
}

.contact-wrapper {
    background-color: var(--bg-navbar);
    border-radius: 24px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    box-shadow: 0 30px 60px -15px rgba(15, 23, 42, 0.2);
}

.contact-info-panel {
    padding: 4.5rem;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.text-white {
    color: #ffffff !important;
}

.contact-intro {
    color: #cbd5e1;
    margin: 1.5rem 0 3rem 0;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.info-icon {
    width: 48px;
    height: 48px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--accent-cyan);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.contact-info-item span {
    display: block;
    font-size: 0.75rem;
    color: #94a3b8;
}

.contact-info-item strong {
    color: #ffffff;
    font-size: 1.1rem;
}

.secure-network-badge {
    margin-top: 3.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: rgba(14, 165, 233, 0.08);
    border: 1px solid rgba(14, 165, 233, 0.15);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    width: fit-content;
}

.shield-icon {
    width: 20px;
    height: 20px;
    color: var(--accent-cyan);
}

/* Panel Formulario */
.contact-form-panel {
    padding: 4.5rem;
    background-color: var(--bg-card-white);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-group input, .form-group select, .form-group textarea {
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background-color: var(--bg-page-light);
    color: var(--text-main);
    outline: none;
    font-family: var(--font-body);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--accent-cyan);
    background-color: var(--bg-card-white);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-status-message {
    display: none;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.form-status-message.success {
    background-color: #ecfdf5;
    color: var(--color-ok);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* FOOTER */
.footer-area {
    background-color: var(--bg-navbar);
    color: #94a3b8;
    padding: 5rem 0 2rem 0;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 3rem;
}

.footer-logo {
    color: #ffffff;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #94a3b8;
}

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

.footer-bottom {
    text-align: center;
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 2rem;
}

/* TRANSICIONES REVEAL */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ANIMACIONES KEYFRAMES */
@keyframes conveyorBeltFlow {
    to {
        stroke-dashoffset: -20;
    }
}

@keyframes boxProgress1 {
    0% {
        transform: translateX(-150px);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translateX(180px);
        opacity: 0;
    }
}

@keyframes boxProgress2 {
    0% {
        transform: translateX(-50px);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translateX(250px);
        opacity: 0;
    }
}

@keyframes joint1Swing {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(15deg); }
}

@keyframes joint2Swing {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-22deg); }
}

@keyframes toolMovement {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-25px, 28px); }
}

@keyframes laserScan {
    0%, 100% {
        opacity: 0;
        transform: scaleX(0.2);
    }
    50% {
        opacity: 0.8;
        transform: scaleX(1);
    }
}

@keyframes hologramFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@keyframes floatWatermark {
    0% { transform: translate(-50%, -50%) translate(0, -8px); }
    100% { transform: translate(-50%, -50%) translate(8px, 8px); }
}

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

/* RESPONSIVIDAD */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-text-content {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .background-logo-watermark {
        width: 380px;
        height: 380px;
        left: 50%;
        transform: translate(-50%, -50%) !important;
        opacity: 0.09;
        filter: blur(2px);
    }
    
    .dashboard-widgets-section {
        margin-top: -3.5rem;
    }
    
    .dashboard-grid-layout {
        grid-template-columns: 1fr;
    }
    
    .solutions-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .stat-box-container {
        order: 2;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    
    .contact-info-panel, .contact-form-panel {
        padding: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-menu {
        display: flex; /* Flex por defecto para permitir animación fluida de deslizamiento */
    }
    
    .hero-title {
        font-size: 2.75rem;
    }
    
    .grid-subcards {
        grid-template-columns: 1fr;
    }
    
    .solutions-grid {
        grid-template-columns: 1fr;
    }
    
    .solutions-horizontal-grid {
        grid-template-columns: 1fr; /* Apilamos verticalmente para evitar columnas aplastadas */
        gap: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    /* Solución de solapamiento para la etiqueta de estado del proyecto */
    .project-badge {
        position: static !important;
        display: inline-block !important;
        margin-bottom: 1rem !important;
        width: fit-content !important;
    }

    /* Solución de apilamiento vertical para la ficha técnica del proyecto */
    .tech-spec-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .spec-value {
        text-align: left;
    }
}

/* --- ESTILOS DEL PANEL SCADA EN MOVIMIENTO (HERO) --- */
.hero-scada-panel {
    width: 100%;
    max-width: 500px;
    background: rgba(15, 23, 42, 0.95);
    border: 3px solid #ffffff; /* Borde blanco grueso del Modelo 2 */
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    padding: 1rem;
    color: #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    backdrop-filter: blur(8px);
}

.scada-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #334155;
    padding-bottom: 0.5rem;
}

.scada-status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

.scada-status-dot.pulse {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 6px #10b981;
    animation: scadaPulse 1.5s infinite ease-in-out;
}

@keyframes scadaPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.4; }
}

.scada-panel-tag {
    font-family: monospace;
    font-size: 0.7rem;
    font-weight: bold;
    color: #10b981;
    background-color: rgba(16, 185, 129, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.scada-diagram-container {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #334155;
}

.scada-svg-diagram {
    width: 100%;
    height: auto;
    display: block;
}

/* Animaciones del flujo en las tuberías */
.scada-flow-line {
    stroke-dasharray: 8 6;
    animation: flowMovementHorizontal 1.5s linear infinite;
}

.scada-flow-line.flow-bypass {
    stroke-dasharray: 6 8;
    animation: flowMovementBypass 2.5s linear infinite;
}

@keyframes flowMovementHorizontal {
    to {
        stroke-dashoffset: -28;
    }
}

@keyframes flowMovementBypass {
    to {
        stroke-dashoffset: -28;
    }
}

.scada-valve-group {
    transition: var(--transition-fast);
}

.scada-valve-group circle {
    transition: fill 0.3s ease;
}

/* Telemetría del SCADA */
.scada-telemetry-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.scada-telemetry-item {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.telemetry-lbl {
    font-size: 0.55rem;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.telemetry-val {
    font-size: 1.05rem;
    font-weight: 900;
    font-family: monospace;
}

.text-blue { color: #38bdf8; }
.text-orange { color: #f97316; }
.text-cyan { color: #0ea5e9; }
.text-green { color: #10b981; }

/* Estilos adicionales para la vista responsiva del SCADA */
@media (max-width: 992px) {
    .hero-scada-panel {
        margin: 0 auto;
    }
}

/* --- ANIMACIONES Y ESTADOS COMPLEJOS DEL SCADA --- */

/* Rotación de la bomba centrífuga P-101 */
.rotate-pump-active {
    animation: rotateImpeller 1s linear infinite;
    transform-origin: 250px 295px;
}

@keyframes rotateImpeller {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Serpentín de intercambio de calor E-101 */
.scada-coil-heat {
    animation: coilThermalPulse 1.5s ease-in-out infinite alternate;
}

@keyframes coilThermalPulse {
    0% {
        stroke: #ef4444;
        filter: drop-shadow(0 0 1px rgba(239, 68, 68, 0.4));
    }
    100% {
        stroke: #f43f5e;
        filter: drop-shadow(0 0 6px rgba(244, 63, 94, 0.8));
    }
}

/* Modos de flujo en las tuberías */
.flow-active {
    stroke: #38bdf8;
    animation: flowMovementHorizontal 1s linear infinite;
}

.flow-recirculation {
    stroke: #0d9488;
    animation: flowMovementHorizontal 1.5s linear infinite;
}

.flow-bypass {
    stroke: #2563eb;
    animation: flowMovementBypass 2.5s linear infinite;
}

/* ESTADO DE FALLA CRÍTICA EN EL SCADA */
.complex-scada.scada-fault .scada-status-dot.pulse {
    background-color: #ef4444;
    box-shadow: 0 0 8px #ef4444;
    animation: scadaPulseDanger 0.8s infinite ease-in-out;
}

@keyframes scadaPulseDanger {
    0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 4px #ef4444; }
    50% { transform: scale(1.4); opacity: 0.3; box-shadow: 0 0 12px #ef4444; }
}

.complex-scada.scada-fault .scada-panel-tag {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Detener bomba y recirculación ante falla */
.complex-scada.scada-fault .rotate-pump-active {
    animation-play-state: paused;
    filter: grayscale(0.8);
}

.complex-scada.scada-fault #scada-flow-pump-in,
.complex-scada.scada-fault #scada-flow-pump-out,
.complex-scada.scada-fault #scada-flow-ret-in,
.complex-scada.scada-fault #scada-flow-ret-out {
    stroke: #475569 !important;
    animation-play-state: paused;
    opacity: 0.5;
}

/* Bypass activo en color rojo de advertencia a alta velocidad */
.complex-scada.scada-fault #scada-flow-bypass-line {
    stroke: #ef4444 !important;
    animation: flowMovementBypass 0.6s linear infinite;
}

.complex-scada.scada-fault #scada-flow-in {
    stroke: #ef4444 !important;
    animation: flowMovementHorizontal 0.6s linear infinite;
}

/* Alarma visual parpadeante en el reactor */
.complex-scada.scada-fault #scada-tank-level {
    fill: #b91c1c !important;
    animation: tankAlarmFlash 1s infinite alternate;
}

@keyframes tankAlarmFlash {
    0% { opacity: 0.85; }
    100% { opacity: 1; fill: #ef4444 !important; filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.5)); }
}

/* Parpadeo de textos de sensores en peligro */
.complex-scada.scada-fault #scada-temp-val,
.complex-scada.scada-fault #scada-press-val {
    fill: #ef4444 !important;
    animation: textAlarmFlash 0.5s infinite alternate;
    font-weight: bold;
}

@keyframes textAlarmFlash {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

.complex-scada.scada-fault .text-danger-blink {
    color: #ef4444 !important;
    animation: textAlarmFlash 0.5s infinite alternate;
}

/* ==========================================================================
   SECCIÓN DE PROYECTOS (ESTILO STEEL TECH & GLASSMORPHISM)
   ========================================================================== */

.projects-section {
    padding: 7rem 0;
    background-color: var(--bg-page-light);
    position: relative;
    border-bottom: 1px solid var(--border-light);
}

.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
    margin-top: 4rem;
}

.project-card {
    padding: 3rem;
    position: relative;
    border-radius: 20px;
    border: 1px solid var(--border-light);
    background: rgba(25, 37, 50, 0.55);
    backdrop-filter: blur(10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 206, 231, 0.15), 0 15px 35px rgba(0, 0, 0, 0.3);
    border-color: rgba(0, 206, 231, 0.35);
}

.project-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-family: monospace;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.success-badge {
    background-color: rgba(16, 185, 129, 0.08);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.primary-badge {
    background-color: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.project-content {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3.5rem;
    align-items: center;
}

@media (max-width: 992px) {
    .project-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

.project-card-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--text-hero-title);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.project-description {
    font-size: 0.9rem;
    color: var(--text-main);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.project-technical-info {
    background-color: rgba(9, 18, 28, 0.75);
    border: 1px solid rgba(0, 206, 231, 0.15);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.03);
}

.tech-spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
    padding-bottom: 0.5rem;
}

.tech-spec-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.spec-label {
    font-weight: 700;
    color: var(--text-muted);
}

.spec-value {
    font-weight: 600;
    color: #ffffff;
    text-align: right;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-tech {
    font-family: monospace;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--cyan-glow);
    background-color: rgba(0, 206, 231, 0.08);
    border: 1px solid rgba(0, 206, 231, 0.25);
    border-radius: 4px;
    padding: 3px 8px;
    transition: var(--transition-fast);
}

.tag-tech:hover {
    background-color: rgba(0, 206, 231, 0.15);
    border-color: var(--cyan-glow);
}

/* Multimedia en Proyectos */
.project-visuals {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.project-media-container {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    border: 2px solid #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    cursor: pointer;
    background-color: #090d16;
    aspect-ratio: 16 / 9;
}

.project-video-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.75;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.project-media-container:hover .project-video-preview {
    transform: scale(1.05);
    opacity: 0.9;
}

.media-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(9, 13, 22, 0.6) 0%, rgba(9, 13, 22, 0.1) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: background 0.3s ease;
}

.project-media-container:hover .media-overlay {
    background: linear-gradient(0deg, rgba(9, 13, 22, 0.7) 0%, rgba(9, 13, 22, 0.3) 100%);
}

.play-btn-circle {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background-color: var(--accent-electric);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.4);
    transform: scale(1);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.3s ease, box-shadow 0.3s ease;
}

.project-media-container:hover .play-btn-circle {
    transform: scale(1.15);
    background-color: var(--accent-cyan);
    box-shadow: 0 0 25px rgba(14, 165, 233, 0.6);
}

.overlay-text {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.08em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Miniaturas secundarias */
.project-thumbnails-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.project-thumbnails-grid.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.thumb-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1.5px solid #ffffff;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
    cursor: pointer;
    aspect-ratio: 4 / 3;
}

.project-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.thumb-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(9, 13, 22, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    opacity: 0;
    transition: opacity 0.3s ease, background-color 0.3s ease;
}

.thumb-wrapper:hover .project-thumb {
    transform: scale(1.08);
}

.thumb-wrapper:hover .thumb-overlay {
    opacity: 1;
    background-color: rgba(9, 13, 22, 0.4);
}

.thumb-caption {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.4;
}

/* ==========================================================================
   LIGHTBOX MODAL ESTILO PREMIUM "STEEL TECH"
   ========================================================================== */

.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(9, 13, 22, 0.85);
    backdrop-filter: blur(12px);
}

.lightbox-container {
    position: relative;
    z-index: 2001;
    width: 90%;
    max-width: 960px;
    background: rgba(15, 23, 42, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5), 0 0 30px rgba(14, 165, 233, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-modal.active .lightbox-container {
    transform: scale(1);
}

/* Personalización para videos verticales (tablet) */
.lightbox-container.vertical-media {
    max-width: 500px;
}

.lightbox-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2005;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.lightbox-close-btn:hover {
    background-color: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    transform: rotate(90deg);
}

.lightbox-header {
    padding: 1.25rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lightbox-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    padding-right: 2rem; /* Espacio para el botón cerrar */
}

.lightbox-content-wrapper {
    width: 100%;
    padding: 1rem 2rem 2rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #060911;
}

.lightbox-media-body {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-media-body video, .lightbox-media-body img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: block;
    object-fit: contain;
}

/* Modificación de diseño para vertical */
.lightbox-container.vertical-media .lightbox-media-body video {
    max-height: 65vh;
}

.lightbox-footer {
    padding: 0.75rem 2rem;
    background-color: rgba(9, 13, 22, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lightbox-brand {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(148, 163, 184, 0.6);
    letter-spacing: 0.05em;
}

/* EXPERIENCIA ADICIONAL Y SOLUCIONES DE ESPECIALIDAD */
.other-experience-container {
    margin-top: 6rem;
    border-top: 1px dashed var(--border-light);
    padding-top: 5rem;
}

.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.experience-card {
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border-light);
    background: rgba(25, 37, 50, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease, box-shadow 0.4s ease;
}

.experience-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 206, 231, 0.35);
    box-shadow: 0 20px 40px rgba(0, 206, 231, 0.15), 0 10px 30px rgba(0, 0, 0, 0.3);
}

.exp-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background-color: rgba(14, 165, 233, 0.08);
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.05);
}

.experience-card h4 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-hero-title);
    margin-bottom: 0.75rem;
}

.experience-card p {
    font-size: 0.88rem;
    color: var(--text-main);
    line-height: 1.6;
    margin: 0;
}

/* AJUSTES ADICIONALES PARA MÓVILES (PANTALLAS CHICAS) */
@media (max-width: 576px) {
    /* Ajuste de contenedor */
    .container {
        padding: 0 1.25rem;
    }

    /* Ajustes del Hero */
    .hero-section {
        padding: 8rem 0 6rem 0;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-tagline {
        font-size: 0.85rem;
    }
    
    .background-logo-watermark {
        width: 290px;
        height: 290px;
        opacity: 0.08;
    }

    /* Optimización de espaciados de secciones */
    .dashboard-widgets-section, 
    .projects-section, 
    .about-section, 
    .contact-section {
        padding: 4rem 0;
    }

    /* Tarjetas de widgets */
    .widget-card.glass-card {
        padding: 1.25rem 1rem;
    }
    
    .widget-title {
        font-size: 1.15rem;
    }

    /* --- CONSOLA HMI / PLC MOVIL VERTICAL --- */
    .hmi-layout-split {
        grid-template-columns: 1fr; /* Stack horizontal a vertical */
    }
    
    .hmi-sidebar {
        display: none !important; /* Ocultar barra lateral redundante en celulares para optimizar espacio */
    }
    
    .hmi-charts-area {
        grid-template-columns: 1fr; /* Stack vertical para Dial y Onda */
        gap: 0.75rem;
    }

    /* Stack de métricas del mockup del dashboard */
    .mockup-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
    }

    /* Stack de estadísticas de transmisión de datos en vivo */
    .subcard-stats {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Grillas secundarias de soluciones en los widgets */
    .solutions-horizontal-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    /* Tarjetas de proyectos y thumbnails */
    .project-card {
        padding: 1.5rem 1rem;
    }
    
    .project-card-title {
        font-size: 1.3rem;
    }
    
    .project-tags {
        gap: 0.35rem;
    }
    
    .tag-tech {
        font-size: 0.65rem;
        padding: 2px 6px;
    }
    
    .project-thumbnails-grid.two-columns {
        grid-template-columns: 1fr; /* Miniaturas de fotos una arriba de la otra en móviles muy pequeños */
        gap: 0.75rem;
    }

    /* Experiencia adicional */
    .other-experience-container {
        margin-top: 4rem;
        padding-top: 3rem;
    }
    
    .experience-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .experience-card {
        padding: 1.5rem;
    }

    /* Nosotros / Widget Sinergia */
    .synergy-widget-container {
        padding: 0.75rem;
    }
    
    .synergy-info-card {
        padding: 1rem;
        margin-top: 1rem;
    }

    .synergy-label {
        font-size: 0.58rem;
    }
    
    .synergy-sublabel {
        font-size: 0.43rem;
    }

    /* Contacto */
    .contact-info-panel, .contact-form-panel {
        padding: 1.5rem 1rem;
    }
    
    .contact-intro {
        margin: 1rem 0 2rem 0;
    }
}




