:root {
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css');
    --bg-dark: #0D0D0D;
    /* user */
    --bg-section: #082B59;
    /* user */
    --bg-card: #093773;
    /* user */
    --primary: #359AF2;
    /* user */
    --primary-dark: #1B62BF;
    /* user */
    --text-light: #e5e7eb;
    --text-muted: #9ca3af;
    --border-soft: rgba(255, 255, 255, 0.06);
    --navbar-height: 64px;
}

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

body {
    background-color: #0b0f1a;
    color: #e5e7eb;
}

/* Contenedor central común */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Hacer imágenes y medios responsivos para evitar overflow */
img,
picture,
video,
svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Prevención global de overflow horizontal accidental */
html,
body {
    overflow-x: hidden;
}

/* Evitar que la navbar fija tape el contenido al hacer scroll */
body {
    padding-top: var(--navbar-height);
}


/* Utilidad para accesibilidad (visualmente oculta, visible al enfocar) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.sr-only:focus,
.sr-only:active {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Skip link visible on keyboard focus */
.skip-link {
    left: -9999px;
    position: absolute;
}

.skip-link:focus {
    left: 20px;
    top: 12px;
    background: #ffffff;
    color: #0b0f1a;
    padding: 8px 12px;
    border-radius: 6px;
    z-index: 10001;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}


/* NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 10px 8%;
    /* antes 18px */
    min-height: var(--navbar-height);
    background: rgba(11, 15, 26, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 2000;
}

/* Estado reducido/pegajoso cuando el usuario hace scroll hacia abajo */
.navbar.scrolled{
    padding: 6px 6%;
    background: rgba(7,18,40,0.96);
    border-bottom-color: rgba(255,255,255,0.06);
    box-shadow: 0 6px 20px rgba(2,6,23,0.35);
    transform: translateZ(0);
    transition: padding 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

/* Animación temporal en la sección objetivo al navegar desde la navbar */
.section-highlight{
    animation: sectionHighlight 720ms ease both;
}

@keyframes sectionHighlight{
    0% { transform: translateY(8px); opacity: 0.0; }
    30% { transform: translateY(4px); opacity: 0.45; }
    100% { transform: translateY(0); opacity: 1; }
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Toggle (hamburguesa) - oculto en escritorio */
.nav-toggle {
    display: none;
    background: transparent;
    border: 0;
    color: var(--text-light);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
}

.nav-toggle:focus {
    outline: 2px solid rgba(56, 189, 248, 0.25);
}

/* Navegación móvil: clase open mostrará el menú */
.main-nav {
    display: flex;
    align-items: center;
    gap: 35px;
}

.main-nav.open {
    display: block;
}

/* Soporte para abrir dropdowns en móvil (clase .open en .dropdown) */
.dropdown.open>.dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Responsive: colapsar menú en pantallas pequeñas */
@media (max-width: 900px) {
    .nav-toggle {
        display: inline-flex;
    }

    /* en móvil la navbar puede ocupar más altura */
    :root {
        --navbar-height: 72px;
    }

    .nav-wrapper {
        gap: 12px;
    }

    /* ocultar menú principal por defecto en móvil */
    .navbar .main-nav {
        display: none;
    }

    .navbar .main-nav.open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(11, 15, 26, 0.98);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        padding: 12px 0 20px;
        gap: 0;
        z-index: 1999;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }

    .navbar .main-nav a {
        display: block;
        padding: 14px 24px;
        font-size: 1.05rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    }

    .main-nav a:last-child {
        border-bottom: none;
    }

    .btn-nav {
        margin: 12px 24px 0;
        text-align: center;
        border-radius: 30px;
    }

    /* aumentar área táctil del toggle y mejorar visibilidad */
    .nav-toggle {
        width: 48px;
        height: 48px;
        padding: 8px;
        border-radius: 10px;
        align-items: center;
        justify-content: center;
    }

    .nav-toggle svg {
        width: 22px;
        height: 22px;
    }

    /* evitar scroll del fondo cuando el menú está abierto */
    html.nav-open, body.nav-open {
        height: 100%;
        overflow: hidden;
    }

    /* Mejor separación cuando el menú ocupa la pantalla */
    .navbar .main-nav.open a {
        border-bottom: 1px solid rgba(255,255,255,0.04);
    }

    /* Dropdown como bloque dentro del flujo en móvil */
    .dropdown-menu {
        position: relative;
        top: 0;
        left: 0;
        min-width: auto;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0 0 6px 0;
        transform: none;
        opacity: 1;
        visibility: visible;
        display: none;
    }

    .dropdown.open>.dropdown-menu {
        display: block;
    }

    .dropdown-menu a {
        padding-left: 28px;
    }
}

/* ===== DROPDOWN MODERNO ===== */

.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #e5e7eb;
    font-weight: 500;
    transition: 0.3s ease;
}

.dropdown-toggle .arrow {
    font-size: 0.7rem;
    transition: 0.3s ease;
}

.dropdown:hover .arrow {
    transform: rotate(180deg);
}

.dropdown-toggle:hover {
    color: #38bdf8;
}

/* MENÚ */
.dropdown-menu {
    position: absolute;
    top: 55px;
    left: 0;
    min-width: 250px;
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 15px 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s ease;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

/* Mostrar */
.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Links internos */
.dropdown-menu a {
    padding: 10px 22px;
    font-size: 0.9rem;
    text-decoration: none;
    color: #d1d5db;
    transition: 0.3s ease;
}

.dropdown-menu a:hover {
    background: rgba(56, 189, 248, 0.08);
    color: #38bdf8;
    padding-left: 28px;
}

@media (max-width: 900px) {
    .navbar .main-nav {
        align-items: stretch;
    }

    .navbar .dropdown {
        width: 100%;
    }

    .navbar .dropdown-toggle {
        width: 100%;
        justify-content: space-between;
        padding: 12px 24px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    }

    .navbar .dropdown-menu {
        position: static;
        top: auto;
        left: auto;
        min-width: 100%;
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
        transform: none;
        opacity: 1;
        visibility: visible;
        display: none;
        padding: 0 0 8px 0;
    }

    .navbar .dropdown.open>.dropdown-menu {
        display: block;
    }

    .navbar .dropdown-menu a {
        display: block;
        padding: 10px 34px;
    }

    .navbar .btn-nav {
        display: block;
        width: auto;
    }
}

/* LOGO */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    line-height: 1.1;
    /* controla altura vertical */
    font-size: 1.25rem;
    /* ligeramente menor */
    font-weight: 700;
    text-decoration: none;
    color: #fff;
}

.logo img {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: cover;
}

/* Línea principal */
.logo-srt {
    color: var(--text-light);
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* Video específico para móvil: contenedor oculto en escritorio, visible en pantallas pequeñas */
.mobile-only-video {
    display: none;
}

@media (max-width: 900px) {
    .mobile-only-video {
        display: block;
        width: 100%;
        max-width: 100%;
        margin: 0 auto 18px;
    }

    .mobile-only-video > div {
        position: relative;
        width: 100%;
        /* ratio 9:16 (alto/ancho = 16/9 -> padding-top 177.777% ) */
        padding-top: 177.77777777777777%;
        overflow: hidden;
        border-radius: 12px;
    }

    .mobile-only-video iframe {
        position: absolute !important;
        top: 0;
        left: 0;
        width: 100% !important;
        height: 100% !important;
        border: none !important;
        object-fit: cover;
    }
}

.logo-logistica {
    color: var(--primary-dark);
    margin-left: 0;
    font-weight: 700;
}

/* Tagline más discreto */
.logo .logo-tag {
    font-size: 0.65rem;
    /* más pequeño */
    font-weight: 400;
    color: #9ca3af;
    margin-top: 1px;
    letter-spacing: 0.5px;
}

/* NAV LINKS */
.navbar nav {
    display: flex;
    align-items: center;
    gap: 35px;
}

.navbar nav a {
    position: relative;
    text-decoration: none;
    color: #e5e7eb;
    font-weight: 500;
    transition: 0.3s ease;
}

/* Línea animada hover */
.navbar nav a::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: #38bdf8;
    transition: 0.3s ease;
}

.navbar nav a:hover {
    color: #38bdf8;
}

.navbar nav a:hover::after {
    width: 100%;
}

/* BOTÓN CONTACTO */
.btn-nav {
    padding: 10px 20px;
    border-radius: 30px;
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: #0b0f1a !important;
    font-weight: 600;
    transition: 0.3s ease;
}

.btn-nav::after {
    display: none;
}

.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(56, 189, 248, 0.4);
}

/* HERO */
.hero-carousel {
    position: relative;
    /* restablecer altura para compensar navbar fija */
    height: calc(100vh - var(--navbar-height));
    min-height: 420px;
    overflow: hidden;
}

.hero-title span {
    display: inline-block;
    overflow: hidden;
}

.carousel-inner {
    height: 100%;
    position: relative;
}

.carousel-item {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-item.active {
    opacity: 1;
    z-index: 1;
}

.carousel-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1;
}

/* Hero background video */
.hero-bg {
    position: relative;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    padding-top: 56.25%; /* 16:9 aspect ratio */
}

.hero-bg iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* MOBILE: aplicar ratio portrait hasta 900px para móviles grandes/tablets verticales */
@media (max-width: 900px) {
    .hero-bg {
        padding-top: 177.77%; /* 9:16 */
        overflow: hidden;
        background: transparent;
    }

    .hero-bg iframe {
        object-fit: cover;
        background: transparent;
    }
}

.carousel-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
    color: #fff;
}

.carousel-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: -1px;
}

.carousel-content p {
    font-size: 1.1rem;
    max-width: 600px;
    margin-bottom: 30px;
    color: #d1d5db;
}

.btn-hero {
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 40px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.3);
}

/* Normalizar enlaces: quitar subrayado por defecto */
a {
    text-decoration: none;
    color: inherit;
}

.btn-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(56, 189, 248, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .carousel-content h2 {
        font-size: 2rem;
    }
}

/* Typewriter (escritura) */
.typewriter {
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
}

.typewriter::after {
    content: "";
    display: inline-block;
    width: 2px;
    height: 1.05em;
    background: var(--text-light);
    margin-left: 8px;
    vertical-align: middle;
    animation: blink-cursor 900ms steps(1) infinite;
}

@keyframes blink-cursor {
    50% {
        opacity: 0
    }
}

/* ---- Scroll reveal animations ---- */
.scroll-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 600ms cubic-bezier(.2, .9, .3, 1), transform 600ms cubic-bezier(.2, .9, .3, 1);
    will-change: opacity, transform;
}

.scroll-reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

.scroll-reveal-left {
    transform: translateX(-28px);
}

.scroll-reveal-right {
    transform: translateX(28px);
}

.scroll-reveal-left.in-view,
.scroll-reveal-right.in-view {
    transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {

    .scroll-reveal,
    .scroll-reveal-left,
    .scroll-reveal-right {
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

/* ===== WHY US ===== */
.why-us {
    padding: 80px 8%;
    background: linear-gradient(180deg, #0b0f1a 0%, #0d1d3a 50%, var(--bg-section) 100%);
}

.why-us h2 {
    text-align: center;
    font-size: 2.4rem;
    margin-bottom: 70px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 40px;
}

.why-grid div {
    background: #111827;
    padding: 40px 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.4s ease;
}

.why-grid div:hover {
    transform: translateY(-8px);
    border-color: #38bdf8;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.why-grid h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #38bdf8;
}

.why-grid p {
    color: #9ca3af;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===== NOSOTROS / ABOUT ===== */
.about-section {
    padding: 80px 8%;
    background: linear-gradient(180deg, #0b0f1a 0%, #0a1f45 50%, var(--bg-section) 100%);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 20px 40px rgba(2, 6, 23, 0.6);
}

.about-content h2 {
    font-size: 2rem;
    margin-bottom: 18px;
}

.about-content p {
    color: #cbd5e1;
    margin-bottom: 22px;
}

.about-stats {
    display: flex;
    gap: 28px;
}

.about-stats div {
    background: rgba(255, 255, 255, 0.03);
    padding: 18px 20px;
    border-radius: 12px;
    text-align: center;
}

.about-stats strong {
    display: block;
    font-size: 1.4rem;
    color: var(--primary);
}

.about-stats span {
    display: block;
    color: #9ca3af;
    font-size: 0.9rem;
}

@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .about-stats {
        justify-content: space-between;
    }
}

/* ===== SERVICES PRO ===== */

.services-modern {
    padding: 64px 6%;
    background: linear-gradient(180deg, var(--bg-section) 0%, #071e45 40%, #0b0f1a 100%);
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
    padding: 18px 12px;
}

.section-header h2 {
    font-size: 2.6rem;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 40px 36px;
}

/* Responsive breakpoints for the services grid */
@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 32px 28px;
    }
}

@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

/* Estilos específicos para la página "Nuestros Servicios" */
.services-overview .services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
    align-items: start;
}

.services-overview .service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    padding: 28px;
    border-radius: 16px;
    text-align: center;
    transition: transform 0.32s ease, box-shadow 0.32s ease, border-color 0.32s ease;
}

.services-overview .service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
    border-color: var(--primary);
}

.service-figure {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.service-figure img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    box-shadow: 0 8px 24px rgba(2, 6, 23, 0.6);
}

.service-card h3 {
    font-size: 1.25rem;
    margin: 8px 0 6px;
}

.service-card p.muted {
    color: var(--text-muted);
    margin-top: 8px;
    font-size: 0.95rem;
}

.card-actions {
    margin-top: 14px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.card-actions .btn-service,
.card-actions .btn-outline {
    min-width: 180px;
    /* Asegura un ancho mínimo para todos los botones */
    text-align: center;
    /* Centra el texto dentro del botón */
    display: inline-flex;
    /* Permite alinear contenido vertical y horizontalmente */
    justify-content: center;
    align-items: center;
}

/* Botón secundario estilo outline usado en la página de servicios */
.btn-outline {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-light);
    background: transparent;
    font-weight: 600;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.btn-outline:hover,
.btn-outline:focus {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(56, 189, 248, 0.08);
}

@media (max-width: 900px) {
    .service-figure img {
        width: 110px;
        height: 110px;
    }

    .services-overview .services-grid {
        gap: 18px;
    }

    .services-overview .service-card {
        padding: 20px;
    }
}

.service-item {
    padding: 42px 32px;
    border-radius: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    transition: all 0.36s ease;
    position: relative;
    overflow: hidden;
}

/* Línea animada superior */
.service-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #0ea5e9);
    transition: 0.4s ease;
}

.service-item:hover::before {
    left: 0;
}

.service-item:hover {
    transform: translateY(-12px);
    border-color: var(--primary);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

/* Ícono */
.icon-wrapper {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    background: rgba(56, 189, 248, 0.08);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 25px;
    transition: 0.3s ease;
}

.service-item:hover .icon-wrapper {
    background: var(--primary);
    color: #0b0f1a;
    transform: scale(1.1);
}

.service-item h4 {
    margin: 0 0 22px 0;
    font-weight: 600;
    font-size: 1.2rem;
}

/* Inline SVG icons inside .icon-wrapper */
.icon-wrapper svg {
    width: 34px;
    height: 34px;
    display: block;
    stroke: currentColor;
    fill: none;
}

.icon-wrapper svg [fill="currentColor"] {
    fill: currentColor;
}

.service-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .services-modern {
        padding: 56px 5%;
    }

    .services-modern .section-header {
        margin-bottom: 38px;
        padding: 0 8px;
    }

    .services-modern .section-header h2 {
        font-size: 2rem;
    }

    .services-modern .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .services-modern .service-item {
        padding: 28px 22px;
        border-radius: 16px;
    }

    .services-modern .icon-wrapper {
        width: 56px;
        height: 56px;
        margin-bottom: 16px;
    }

    .services-modern .icon-wrapper svg {
        width: 28px;
        height: 28px;
    }

    .services-modern .service-item h4 {
        font-size: 1.05rem;
        margin-bottom: 10px;
    }

    .services-modern .service-item p {
        font-size: 0.92rem;
        line-height: 1.5;
    }
}

/* Botón */
.btn-service {
    display: inline-block;
    margin-top: 22px;
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--primary), #0ea5e9);
    color: #0b0f1a;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s ease;
}

.btn-service:hover,
.btn-service:focus {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.3);
}

/* TECH */
.tech {
    padding: 80px 8%;
    text-align: center;
    background: #0f172a;
}

.tech h2 {
    margin-bottom: 20px;
}

/* CTA */
.contact-cta {
    padding: 80px 8%;
    background: linear-gradient(180deg, #0b0f1a 0%, #061a3a 50%, var(--bg-section) 100%);
}

.contact-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    max-width: 1200px;
    margin: auto;
    flex-wrap: wrap;
}

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    padding: 50px;
    border-radius: 25px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    max-width: 500px;
    flex: 1;
}

.contact-card .tag {
    font-size: 0.8rem;
    color: var(--primary-dark);
    font-weight: 600;
    letter-spacing: 1px;
}

.contact-card h2 {
    margin: 15px 0;
    font-size: 1.8rem;
}

.contact-card p {
    color: var(--text-muted);
    margin-bottom: 25px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.contact-card input,
.contact-card select,
.contact-card textarea {
    width: 100%;
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid var(--border-soft);
    margin-bottom: 15px;
    font-size: 0.9rem;
    transition: 0.3s ease;
    background: #0f172a;
    color: var(--text-light);
}

.contact-card input:focus,
.contact-card select:focus,
.contact-card textarea:focus {
    border-color: #2c5aa0;
    outline: none;
}

.contact-card button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 30px;
    background: #2c5aa0;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s ease;
}

.contact-card button:hover {
    background: #1e3f78;
}

.contact-image {
    flex: 1 1 520px;
    max-width: 620px;
}

.contact-image img {
    width: 100%;
    height: auto;
    max-height: 420px;
    border-radius: 18px;
    object-fit: cover;
    aspect-ratio: 16/9;
    display: block;
}

/* Responsive */
@media (max-width: 900px) {
    .contact-wrapper {
        flex-direction: column;
    }

    .contact-image img {
        max-height: 320px;
        border-radius: 12px;
    }
}

@media (min-width: 1300px) {
    .contact-wrapper {
        max-width: 1400px;
    }

    .contact-image {
        flex-basis: 55%;
        max-width: 760px;
    }

    .contact-card {
        flex-basis: 40%;
        max-width: 560px;
    }

    .contact-image img {
        max-height: 520px;
    }
}

/* FOOTER */
/* ===== MARCAS PRO ===== */

/* SECCIÓN */
.brands {
    background: linear-gradient(180deg, #0b0f1a 0%, #061a3a 50%, var(--bg-section) 100%);
    padding: 70px 0;
    overflow: hidden;
}

/* HEADER */
.brands-header {
    text-align: center;
    margin-bottom: 40px;
    color: #ffffff;
}

.brands-header p {
    opacity: 0.8;
}

/* CONTENEDOR CARRUSEL */
.brand-carousel {
    position: relative;
    overflow: hidden;
    padding: 10px 0 14px;
}

/* TRACK */
.brand-track {
    display: flex;
    gap: 40px;
    animation: scrollBrands 30s linear infinite;
    align-items: center;
}

/* TARJETAS INDIVIDUALES */
.brand {
    background: #ffffff;
    padding: 18px 28px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Ajustes móviles: hacer que el hero iframe ocupe toda la pantalla y escale si es necesario */
@media (max-width: 900px) {
    /* El contenedor del hero ocupa la altura completa del viewport (incluye navbar) */
    .hero-carousel {
        height: 100vh;
        min-height: 100vh;
        padding-top: 0;
    }

    /* Cada slide ocupa toda la pantalla para evitar 'letterboxing' */
    .carousel-item {
        position: absolute;
        inset: 0;
        width: 100vw;
        height: 100vh;
        min-height: 100vh;
    }

    /* El contenedor del vídeo debe cubrir el espacio y esconder overflow */
    .hero-bg {
        position: absolute;
        inset: 0;
        width: 100vw;
        height: 100vh;
        padding-top: 0 !important;
        overflow: hidden;
        display: block;
    }

    /* Forzar iframe a cubrir y permitir un ligero zoom para asegurar que no queden barras negras */
    .hero-bg iframe {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        width: 120% !important; /* ancho mayor para permitir recorte lateral */
        height: 120% !important; /* alto mayor para permitir recorte superior/inferior */
        transform: translate(-50%, -50%) scale(1.05);
        transform-origin: center center;
        object-fit: cover;
        border: none !important;
    }

    /* Mantener el contenido del carousel centrado y legible encima del iframe */
    .carousel-content {
        padding-top: 0;
        padding-bottom: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Reducir tamaño de tipografías para móviles muy pequeños */
    .carousel-content h2 { font-size: 1.6rem; }
    .carousel-content p  { font-size: 0.95rem; max-width: 90%; }
}


.brand:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.35);
}

.brand img {
    max-height: 45px;
    width: auto;
    object-fit: contain;
}

/* ANIMACIÓN */
@keyframes scrollBrands {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

#h2-title {
    font-size: 2.6rem;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

/* DEGRADADO LATERAL */
.brand-carousel::before,
.brand-carousel::after {
    content: "";
    position: absolute;
    top: 0;
    width: 120px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.brand-carousel::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-section), transparent);
}

.brand-carousel::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-section), transparent);
}

.trust {
    padding: 80px 8%;
    background: linear-gradient(180deg, var(--bg-section) 0%, #061a3a 50%, #0b0f1a 100%);
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    text-align: center;
}

.trust-grid h3 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.trust-grid p {
    color: var(--text-muted);
}


/* BOTONES HERO: ancho uniforme y mejor alineación */
.hero-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
}

.hero-buttons .btn-hero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    min-width: 160px;
    /* asegura ancho consistente */
    white-space: nowrap;
    text-align: center;
    transition: transform .12s ease, box-shadow .12s ease;
}

/* ===== BOTONES VER MÁS DEL CARRUSEL ===== */

.carousel-content .btn-hero {
    display: inline-flex;
    /* evita que se estire */
    width: auto;
    /* elimina ancho completo */
    min-width: 120px;
    /* todos mismo tamaño */
    justify-content: center;
    align-items: center;
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: 24px;
}

/* Efectos hover accesibles */
.btn-hero:focus,
.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(11, 15, 26, 0.18);
    outline: none;
}

/* HERO */
@media (max-width: 600px) {
    .hero-buttons .btn-hero {
        min-width: 48%;
        padding: 0.65rem;
        font-size: 0.95rem;
    }
}

/* Si hay otros enlaces en navegación, asegúrate de mantener contraste y foco visible */
header nav a {
    text-decoration: none;
    padding: 0.25rem 0.5rem;
}

header nav a:focus,
header nav a:hover {
    text-decoration: none;
    /* se elimina línea */
    outline: 2px solid rgba(0, 123, 255, 0.18);
    outline-offset: 2px;
}

/* Nuestro Clientes */
.clients-section {
    padding: 80px 8%;
    background: linear-gradient(180deg, var(--bg-section) 0%, #071e45 50%, #0b0f1a 100%);
}

.clients-section .section-header {
    text-align: center;
    margin-bottom: 32px;
}

.clients-section .section-header h2 {
    margin: 0 0 10px;
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    color: var(--text-light);
}

.clients-section .section-header p {
    margin: 0;
    color: var(--text-muted);
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.client-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 22px 18px;
    box-shadow: 0 10px 28px rgba(2, 6, 23, 0.45);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.client-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 16px 34px rgba(2, 6, 23, 0.6);
}

.client-card h4 {
    margin: 0 0 8px;
    font-size: 1.05rem;
    color: var(--text-light);
}

.client-card p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Tablet */
@media (max-width: 992px) {
    .clients-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile */
@media (max-width: 576px) {
    .clients-section {
        padding: 56px 0;
    }

    .clients-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .client-card {
        padding: 18px 16px;
    }
}

/* ===== FOOTER ===== */
.site-footer {
    background: linear-gradient(180deg, #071026, #050c1d);
    padding: 60px 8% 30px;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.footer-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-srt {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-light);
}

.logo-logistica {
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--primary);
}

.footer-desc {
    margin-top: 16px;
    max-width: 360px;
    line-height: 1.6;
}

.footer-links h4,
.footer-contact h4 {
    color: var(--text-light);
    margin-bottom: 16px;
    font-size: 1rem;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a,
.footer-contact a {
    color: var(--text-muted);
    text-decoration: none;
    transition: all .2s ease;
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--primary);
    transform: translateX(4px);
}

.social {
    margin-top: 20px;
    display: flex;
    gap: 12px;
}

.social-link {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 0.9rem;
    transition: all .25s ease;
}

.social-link:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 40px;
    padding-top: 20px;
}

.footer-bottom-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.9rem;
}

.footer-legal {
    display: flex;
    gap: 20px;
}

.footer-legal a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color .2s ease;
}

.footer-legal a:hover {
    color: var(--primary);
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-brand {
        text-align: left;
    }

    .footer-brand .footer-brand-text {
        flex-direction: row;
        gap: 8px;
        align-items: center;
    }
}

/* Alternating feature rows */
.service-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    align-items: center;
    margin: 36px 0;
}

.service-row .service-media img {
    width: 100%;
    max-width: 560px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 18px 48px rgba(2, 6, 23, 0.6);
    display: block;
    margin: 0 auto;
}

.service-row .service-content h2 {
    font-size: 1.75rem;
    margin-bottom: 12px;
}

.service-row .lead {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.service-row.row--reverse {
    direction: ltr;
}

.service-row.row--reverse .service-media {
    order: 2
}

.service-row.row--reverse .service-content {
    order: 1
}

.services-grid.compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-top: 28px;
}

@media (max-width: 900px) {
    .service-row {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .service-row.row--reverse .service-media,
    .service-row.row--reverse .service-content {
        order: initial
    }
}

/* ===== CÁMARAS (cards compactas) ===== */
.cameras-section {
    padding: 56px 0 72px;
}

.cameras-section .section-header {
    margin-bottom: 28px;
    padding: 0;
}

.cameras-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.camera-card.service-item {
    padding: 18px 16px;
    border-radius: 14px;
}

.camera-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 12px;
}

.camera-card h3,
.camera-card .camera-brand {
    font-size: 1rem;
    margin-bottom: 8px;
}

.camera-card p,
.camera-card .camera-description {
    font-size: 0.9rem;
    line-height: 1.45;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 600px) {
    .cameras-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .camera-card img {
        height: 140px;
    }
}

.chatbot-widget {
    position: fixed;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    left: auto;
    right: 20px;
    bottom: 20px;
    z-index: 3000;
}

.chatbot-toggle {
    border: 1px solid var(--border-soft);
    background: var(--primary);
    color: var(--text-light);
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transform: translateY(0);
    transition: transform .2s ease, box-shadow .25s ease;
    animation: chatbotPulse 2.8s ease-in-out infinite;
}

.chatbot-toggle-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.chatbot-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(2, 6, 23, 0.45);
}

.chatbot-panel {
    width: min(340px, calc(100vw - 24px));
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(2, 6, 23, 0.45);
    margin-bottom: 10px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(.98);
    transform-origin: bottom right;
    pointer-events: none;
    transition: opacity .2s ease, transform .22s ease, visibility .22s ease;
    margin-left: auto;
}

.chatbot-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.chatbot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-soft);
}

.chatbot-title {
    font-size: 0.95rem;
    color: var(--text-light);
    margin: 0;
}

.chatbot-close {
    border: 0;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
}

.chatbot-messages {
    max-height: 320px;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chatbot-msg {
    padding: 9px 10px;
    border-radius: 10px;
    font-size: 0.92rem;
    line-height: 1.4;
    max-width: 90%;
    animation: chatbotMessageIn .22s ease both;
}

.chatbot-msg.bot {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    border: 1px solid var(--border-soft);
    align-self: flex-start;
}

.chatbot-msg.user {
    background: var(--primary-dark);
    color: var(--text-light);
    align-self: flex-end;
}

.chatbot-form {
    border-top: 1px solid var(--border-soft);
    display: flex;
    gap: 8px;
    padding: 10px;
}

.chatbot-input {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 10px;
}

.chatbot-send {
    border: 0;
    border-radius: 10px;
    background: var(--primary);
    color: var(--text-light);
    padding: 0 14px;
    cursor: pointer;
    font-weight: 600;
}

@keyframes chatbotMessageIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes chatbotPulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(53, 154, 242, 0.32);
    }

    60% {
        box-shadow: 0 0 0 12px rgba(53, 154, 242, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .chatbot-toggle,
    .chatbot-panel,
    .chatbot-msg {
        animation: none;
        transition: none;
    }
}

@media (max-width: 576px) {
    .chatbot-widget {
        left: auto;
        right: 12px;
        bottom: 12px;
    }
}

.monitoring-page {
    padding-top: 18px;
}

.monitoring-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.monitoring-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}

.monitoring-breadcrumb a:hover {
    color: var(--primary);
}

.monitoring-page .section-header {
    margin-bottom: 22px;
}

.monitoring-intro {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 22px;
}

.monitoring-intro p {
    color: var(--text-light);
    line-height: 1.65;
}

.monitoring-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

/* ===== Ajustes adicionales para móvil (mejorar adaptabilidad) ===== */
@media (max-width: 600px) {
    /* Hero: ajustar altura y tipografías para móviles pequeños */
    .hero-carousel {
        height: calc(70vh - var(--navbar-height));
        min-height: 320px;
    }

    .carousel-content {
        padding: 0 4%;
        max-width: 100%;
    }

    .carousel-content h2 {
        font-size: 1.6rem;
        margin-bottom: 10px;
        line-height: 1.15;
    }

    .carousel-content p {
        font-size: 0.95rem;
        max-width: 100%;
        margin-bottom: 16px;
    }

    /* Botones del hero apilados y con ancho completo relativo */
    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .btn-hero {
        width: 100%;
        max-width: 420px;
        padding: 12px 18px;
        align-self: center;
        text-align: center;
    }

    .carousel-item {
        background-position: center center;
    }

    /* Reducir paddings generales para móviles */
    .why-us,
    .about-section,
    .services-modern {
        padding: 40px 4%;
    }

    /* About: imagen arriba, texto abajo */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    /* Servicios: ajustar columnas y reducir gap */
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }

    /* Marcas: permitir scroll horizontal en track */
    .brand-track {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        padding: 8px 0;
        -webkit-overflow-scrolling: touch;
    }

    .brand {
        flex: 0 0 auto;
    }

    /* Contacto: apilar y full-width */
    .contact-wrapper {
        display: flex;
        flex-direction: column;
        gap: 18px;
        padding: 0 4%;
    }

    .contact-card {
        width: 100%;
        padding: 18px;
    }

    .contact-image img {
        width: 100%;
        height: auto;
        border-radius: 12px;
    }

    /* Formulario: inputs apilados y cómodos para touch */
    .contact-card form .form-row {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .contact-card input,
    .contact-card select,
    .contact-card textarea,
    .contact-card button {
        width: 100%;
        box-sizing: border-box;
        font-size: 1rem;
        padding: 12px 14px;
    }

    .contact-card button {
        margin-top: 6px;
        border-radius: 10px;
    }

    /* Navbar: reducir espaciamiento y hacer toggle más accesible */
    .nav-wrapper {
        padding: 6px 6%;
    }

    .navbar {
        padding: 8px 4%;
    }

    /* Mejorar lectura de textos y evitar textos largos en una línea */
    .carousel-content h2,
    .section-header h2 {
        font-size: 2.6rem;
        font-weight: 700;
        margin-bottom: 22px;
        letter-spacing: -0.5px;
    }

    /* Spacing for smaller section titles */
    .section-header h3 {
        margin: 0 0 14px 0;
        font-size: 1.25rem;
        font-weight: 600;
    }
    .hero-carousel {
        height: calc(100vh + var(--navbar-height));
        min-height: calc(100vh + var(--navbar-height));
        margin-top: calc(-1 * var(--navbar-height));
    }

    /* Asegurar que el contenido del hero no quede oculto bajo la navbar */
    .carousel-content {
        padding-top: calc(var(--navbar-height) + 8px);
    }
.carousel-content {
        padding-top: calc(var(--navbar-height) + 8px);
    }

    /* Mejoras específicas para h4 y p en móviles: tamaño, interlineado y wrapping */
    h4 {
        font-size: clamp(1rem, 4.2vw, 1.05rem);
        line-height: 1.25;
        margin-bottom: 8px;
        word-break: break-word;
    }

    p {
        font-size: clamp(0.9rem, 3.5vw, 0.98rem);
        line-height: 1.6;
        margin-bottom: 12px;
        color: #cbd5e1;
    }

    /* Ajustes por sección para mantener jerarquía y evitar saltos de diseño */
    .why-grid h4 {
        font-size: clamp(1.05rem, 4.6vw, 1.1rem);
    }

    .why-grid p {
        font-size: clamp(0.95rem, 3.8vw, 1rem);
    }

    .service-item h4 {
        font-size: 1rem;
    }

    .service-item p {
        font-size: 0.95rem;
    }

    .clients-grid article h4 {
        font-size: 1rem;
    }

    .clients-grid article p {
        font-size: 0.95rem;
    }

    /* Ajustes del hero para pantallas muy pequeñas */
    .carousel-content h2 {
        font-size: 1.3rem;
        justify-content: center;
    }

    .carousel-content p {
        font-size: 1rem;
        max-width: 100%;
    }
}
.monitoring-badges span {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 0.85rem;
    background: rgba(53, 154, 242, 0.15);
    border: 1px solid rgba(53, 154, 242, 0.35);
    color: var(--text-light);
}

.monitoring-features,
.monitoring-plans {
    margin-top: 24px;
}

.monitoring-plans-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.monitoring-features h3,
.monitoring-plans h3 {
    margin-bottom: 12px;
}

.monitoring-features ul {
    margin: 0;
    padding-left: 20px;
    color: var(--text-muted);
    line-height: 1.6;
    display: grid;
    gap: 8px;
}

.monitoring-page .services-grid {
    align-items: stretch;
}

.monitoring-page .service-item {
    height: 100%;
    border: 1px solid var(--border-soft);
    background: linear-gradient(180deg, rgba(9, 55, 115, 0.95), rgba(8, 43, 89, 0.96));
    box-shadow: 0 12px 28px rgba(2, 6, 23, 0.36);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.monitoring-page .service-item:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 18px 36px rgba(2, 6, 23, 0.5);
}

.monitoring-page .service-item .icon-wrapper {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    background: rgba(53, 154, 242, 0.14);
    border: 1px solid rgba(53, 154, 242, 0.3);
}

.monitoring-page .service-item p {
    color: var(--text-light);
    line-height: 1.55;
}

.monitoring-plans .plan-card {
    border: 1px solid var(--border-soft);
    background: var(--bg-card);
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.35);
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 16px;
    border-radius: 14px;
    min-height: 100%;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.monitoring-plans .plan-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 16px 34px rgba(2, 6, 23, 0.5);
}

.monitoring-plans .plan-card h4 {
    margin-bottom: 8px;
}

.monitoring-plans .plan-card p {
    margin-bottom: 0;
    color: var(--text-light);
    line-height: 1.55;
}

.monitoring-plans .plan-tag {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    color: var(--text-light);
    background: rgba(53, 154, 242, 0.16);
    border: 1px solid rgba(53, 154, 242, 0.32);
}

.monitoring-plans .plan-list {
    margin: 0;
    padding-left: 18px;
    color: var(--text-muted);
    line-height: 1.5;
    display: grid;
    gap: 4px;
}

.monitoring-plans .btn-service {
    margin-top: auto;
}

@media (max-width: 992px) {
    .monitoring-plans-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .monitoring-intro {
        padding: 16px;
    }

    .monitoring-breadcrumb {
        font-size: 0.82rem;
    }

    .monitoring-plans-grid {
        grid-template-columns: 1fr;
    }
}

.legal-page {
    padding: 32px 0 48px;
}

.legal-document {
    background: linear-gradient(180deg, rgba(9, 55, 115, 0.94), rgba(8, 43, 89, 0.96));
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 14px 34px rgba(2, 6, 23, 0.45);
}

.legal-header {
    margin-bottom: 18px;
}

.legal-kicker {
    display: inline-flex;
    align-items: center;
    margin: 0 0 10px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: .3px;
    color: var(--text-light);
    background: rgba(53, 154, 242, 0.15);
    border: 1px solid rgba(53, 154, 242, 0.35);
}

.legal-header h1 {
    margin: 0 0 10px;
    font-size: clamp(1.6rem, 2.7vw, 2.2rem);
}

.legal-header p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.6;
}

.legal-content {
    display: grid;
    gap: 16px;
}

.legal-content section {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 14px 14px;
}

.legal-content h2 {
    margin: 0 0 8px;
    font-size: 1.02rem;
    color: var(--text-light);
}

.legal-content p,
.legal-content li {
    color: var(--text-muted);
    line-height: 1.6;
}

.legal-content p {
    margin: 0;
}

.legal-content p+p {
    margin-top: 8px;
}

.legal-content ul {
    margin: 10px 0 0;
    padding-left: 20px;
    display: grid;
    gap: 6px;
}

.legal-content a {
    color: var(--primary);
    text-decoration: none;
}

.legal-content a:hover {
    text-decoration: underline;
}

.legal-footer {
    margin-top: 20px;
    border-top: 1px solid var(--border-soft);
    padding-top: 12px;
}

.legal-footer p {
    margin: 0;
    color: var(--text-muted);
}

@media (max-width: 640px) {
    .legal-document {
        padding: 20px 16px;
    }

    .legal-content section {
        padding: 12px;
    }
}

/* Bloque adicional móvil: mejoras de usabilidad táctil y layout */
@media (max-width: 600px) {
    /* Nav: toggle más grande y enlaces con mayor área táctil */
    .nav-toggle {
        padding: 10px 12px;
        border-radius: 10px;
        font-size: 1.05rem;
    }

    .navbar .main-nav a {
        padding: 14px 18px;
        font-size: 1rem;
    }

    /* Botones: aumentar hit area y evitar textos cortados */
    .btn-hero, .btn-service, .btn-nav {
        padding: 14px 16px;
        font-size: 1rem;
        min-height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Carrusel de marcas: scroll snap para mejor experiencia táctil */
    .brand-track {
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .brand {
        scroll-snap-align: start;
        min-width: 140px;
    }

    /* Servicios: reducir padding y mantener botones visibles */
    .service-item {
        padding: 16px 14px;
    }

    .service-item h4 {
        font-size: 1rem;
        margin-bottom: 8px;
    }

    .service-item p {
        font-size: 0.95rem;
    }

    /* Clientes: ajustar tarjeta para lectura cómoda */
    .client-card {
        padding: 16px 14px;
    }

    .client-card h4 {
        font-size: 1rem;
    }

    .client-card p {
        font-size: 0.95rem;
    }

    /* Footer: espaciar elementos y aumentar legibilidad */
    .footer-grid {
        gap: 18px;
    }

    .footer-links a, .footer-contact a {
        font-size: 0.98rem;
    }
}

/* Mobile performance improvements: disable heavy animations and shadows */
@media (max-width: 600px) {
    /* Disable continuous brand animation to avoid repainting; allow manual scroll */
    .brand-track {
        animation: none !important;
        overflow: hidden; /* ocultar barra en móvil y usar autoscroll */
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: none;
        display: flex;
        align-items: center;
    }

    .brand {
        box-shadow: none !important;
        transform: none !important;
        transition: none !important;
        scroll-snap-align: start;
    }

    /* ocultar scrollbars en navegadores WebKit/Chromium */
    .brand-track::-webkit-scrollbar { display: none; }
    .brand-track { -ms-overflow-style: none; scrollbar-width: none; }

    /* Reduce shadows and hover transforms across cards to reduce paint cost */ 
    .service-item,
    .client-card,
    .contact-card,
    .brand,
    .hero-carousel,
    .carousel-overlay {
        box-shadow: none !important;
        border-radius: 8px;
    }

    .service-item:hover,
    .client-card:hover,
    .brand:hover {
        transform: none !important;
    }

    /* Remove expensive backdrop-filter on mobile (if supported) */
    .navbar,
    .navbar .main-nav.open {
        backdrop-filter: none !important;
    }

    /* Disable scroll-reveal animations on touch devices for performance */
    .scroll-reveal,
    .scroll-reveal-left,
    .scroll-reveal-right {
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }

    /* Simplify button transitions to avoid reflow during touch */
    .btn-hero,
    .btn-service,
    .btn-nav,
    .btn-outline {
        transition: none !important;
    }

    /* Improve touch responsiveness */
    button, a, .nav-toggle {
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(0,0,0,0.05);
    }
}

/* Mobile: centrar y ajustar carrusel de marcas para pantallas pequeñas */
@media (max-width:600px) {
    .brand-track {
        justify-content: center !important;
        gap: 16px !important;
        padding-inline: 12px !important;
    }

    .brand {
        min-width: 120px !important;
        padding: 10px !important;
        border-radius: 10px;
    }

    .brand img {
        max-height: 40px !important;
    }

    /* quitar degradados laterales en móvil para que no parezca descentrado */
    .brand-carousel::before,
    .brand-carousel::after {
        display: none !important;
    }
}