/* =========================================================
   ESTILOS DE SERVICIOS // PINO LIVE V3 (SISTEMA DE INGENIERÍA)
   ========================================================= */

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

:root {
    --font-primary: 'Space Grotesk', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --accent-pino: #c1cd7d;
    --accent-pino-dim: rgba(193, 205, 125, 0.25);
    --accent-pino-glow: rgba(193, 205, 125, 0.4);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --text-muted: #9e9ea7;
}

body.service-body {
    background-color: #040507;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center top;
    color: #ffffff;
    font-family: var(--font-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Header Flotante de Cristal */
.service-header {
    position: fixed;
    top: 24px;
    left: 0;
    right: 0;
    margin-inline: auto;
    width: min(1200px, 92%);
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: rgba(14, 14, 19, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: 32px;
    z-index: 100;
}

.brand-logo a {
    text-decoration: none;
    display: flex;
    align-items: baseline;
    gap: 8px;
    color: #ffffff;
}

.brand-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 2px;
}

.brand-sub {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--accent-pino);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #ffffff;
}

.btn-pill-cotizar {
    background: var(--accent-pino);
    color: #08090c;
    padding: 8px 18px;
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-pill-cotizar:hover {
    background: #d4e08a;
    box-shadow: 0 0 16px var(--accent-pino-glow);
}

/* CONTENEDOR PRINCIPAL */
.service-main {
    flex: 1;
    width: min(1200px, 92%);
    margin: 140px auto 80px;
    position: relative;
    z-index: 2;
}

/* HERO DEL SERVICIO */
.service-hero {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 40px;
    margin-bottom: 50px;
}

.service-meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent-pino);
    margin-bottom: 14px;
}

.service-title {
    font-size: clamp(34px, 5.5vw, 68px);
    font-weight: 900;
    letter-spacing: 1px;
    line-height: 1.05;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.service-lead {
    font-size: clamp(15px, 1.8vw, 18px);
    color: var(--text-muted);
    max-width: 820px;
    line-height: 1.6;
}

/* RACK SYSTEM (CADENA DE SEÑAL) */
.system-flow-section {
    background: rgba(13, 15, 22, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 32px 28px;
    margin-bottom: 40px;
}

.system-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 14px;
    margin-bottom: 24px;
}

.system-title-bar h3 {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--accent-pino);
}

.system-diagram {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.flow-node {
    background: #08090d;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 16px 18px;
    position: relative;
}

.flow-step {
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 700;
    color: var(--accent-pino);
    display: block;
    margin-bottom: 6px;
}

.flow-name {
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 4px;
}

.flow-detail {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #7d8091;
}

/* =========================================================
   TIRA DOCUMENTAL DE 3 FOTOS (COMPACTA Y PROPORCIONADA)
   ========================================================= */
.service-photo-triptych {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 50px;
}

.triptych-frame {
    cursor: zoom-in;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    height: 180px; /* Altura fija controlada */
    background: #08090d;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

.triptych-frame:hover {
    transform: translateY(-3px);
    border-color: var(--accent-pino);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.7);
}

.triptych-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.85) contrast(1.1);
    transition: transform 0.4s ease, filter 0.3s ease;
    display: block;
}

.triptych-frame:hover img {
    transform: scale(1.04);
    filter: brightness(1) contrast(1.15);
}

.photo-tag {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--accent-pino);
    font-family: var(--font-mono);
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    pointer-events: none;
}

/* ESPECIFICACIONES DE EQUIPAMIENTO */
.service-specs-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    margin-bottom: 70px;
}

.specs-description h3 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.specs-description p {
    font-size: 15px;
    line-height: 1.7;
    color: #c4c5d4;
    margin-bottom: 16px;
}

.specs-table-card {
    background: #090a0f;
    border: 1px dashed rgba(193, 205, 125, 0.4);
    border-radius: 14px;
    padding: 26px 24px;
}

.specs-table-card h4 {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--accent-pino);
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 10px;
}

.spec-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
}

.s-label {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #7d8091;
    text-transform: uppercase;
}

.s-value {
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-weight: 700;
    color: #ffffff;
}

/* BANNER DE COTIZACIÓN */
.service-cta-banner {
    background: rgba(14, 16, 23, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 36px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.cta-txt h4 {
    font-size: 22px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.cta-txt p {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
}

.btn-cta-service {
    background: var(--accent-pino);
    color: #08090c;
    padding: 14px 26px;
    border-radius: 30px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
}

.btn-cta-service:hover {
    background: #d4e08a;
    box-shadow: 0 0 25px var(--accent-pino-glow);
}

/* =========================================================
   LIGHTBOX ROBUSTO // PANTALLA COMPLETA
   ========================================================= */
.service-lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(3, 4, 6, 0.94);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 99999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}

.service-lightbox-modal.active {
    display: flex;
}

.service-lightbox-wrap {
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-lightbox-wrap img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.95);
}

.service-lightbox-caption {
    margin-top: 15px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1.5px;
    color: var(--accent-pino);
    text-transform: uppercase;
}

.service-lightbox-close {
    position: absolute;
    top: 25px;
    right: 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.service-lightbox-close:hover {
    background: var(--accent-pino);
    color: #08090c;
    border-color: var(--accent-pino);
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .service-specs-grid {
        grid-template-columns: 1fr;
    }
    .service-cta-banner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .service-photo-triptych {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .triptych-frame {
        height: 160px;
    }
}

/* =========================================================
   ADAPTACIÓN MOBILE AVANZADA (≤ 768px) // SERVICIOS
   ========================================================= */
@media (max-width: 768px) {
    /* Header compacto */
    .service-header {
        top: 12px;
        width: 94%;
        height: 54px;
        padding: 0 16px;
        border-radius: 20px;
    }

    .brand-name {
        font-size: 16px;
    }

    .brand-sub {
        display: none; /* Ahorra espacio crítico en móviles */
    }

    .header-nav {
        gap: 12px;
    }

    .nav-link {
        display: none; /* Oculta enlaces secundarios en barra fija */
    }

    .btn-pill-cotizar {
        padding: 6px 14px;
        font-size: 10px;
    }

    /* Contenedor y Hero */
    .service-main {
        margin: 95px auto 50px;
        width: 92%;
    }

    .service-hero {
        padding-bottom: 28px;
        margin-bottom: 35px;
    }

    .service-title {
        font-size: 28px;
        line-height: 1.15;
    }

    .service-lead {
        font-size: 14px;
        line-height: 1.55;
    }

    /* Diagrama SYSTEM: Flujo vertical */
    .system-flow-section {
        padding: 20px 16px;
        margin-bottom: 35px;
    }

    .system-title-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        margin-bottom: 18px;
    }

    .system-diagram {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .flow-node {
        padding: 12px 14px;
    }

    /* Tríptico de imágenes */
    .service-photo-triptych {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 40px;
    }

    .triptych-frame {
        height: 170px;
    }

    /* Grilla de Especificaciones y Ficha */
    .service-specs-grid {
        grid-template-columns: 1fr;
        gap: 28px;
        margin-bottom: 45px;
    }

    .specs-description h3 {
        font-size: 19px;
    }

    .specs-description p {
        font-size: 13.5px;
    }

    .specs-table-card {
        padding: 18px 16px;
    }

    .s-value {
        font-size: 11.5px;
        word-break: break-word;
    }

    /* Banner CTA */
    .service-cta-banner {
        padding: 24px 20px;
        flex-direction: column;
        align-items: stretch;
        text-align: left;
    }

    .cta-txt h4 {
        font-size: 17px;
    }

    .btn-cta-service {
        width: 100%;
        text-align: center;
        padding: 12px 18px;
        font-size: 11px;
    }

    /* Modal Visor Lightbox */
    .service-lightbox-close {
        top: 16px;
        right: 16px;
        padding: 6px 12px;
        font-size: 10px;
    }

    .service-lightbox-wrap img {
        max-height: 70vh;
    }
}