@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root{
    --padding-container: 100px 0;
    --color-title: #001A49;
}

/* Desplazamiento suave y compensación del menú flotante */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Compensación para que la cápsula flotante no tape los títulos */
}

body{
    font-family: "Poppins", sans-serif;    
}

.container{
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    padding: var(--padding-container);
}

.hero{
    width: 100%;
    height: 100vh;
    min-height: 600px;
    max-height: 800px;
    position: relative;
    display: flex;
    grid-template-rows: 100px 1fr;
    color: #fff;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(180deg, #0000008c 0%, #0000008c 100%), url(../IMAGE/integration.jpeg);
    background-size: cover;
    background-position: center center; /* 👈 Centra al técnico y al gabinete en pantallas chicas */
    z-index: -1;
}

/* NAV CENTRADO SIN TRANSFORM (Arregla el bug del menú desplegable) */
.nav {
    --padding-container: 0;
    height: 65px;
    display: flex;
    align-items: center;
    padding: 0 35px;

    position: fixed;
    top: 10px;
    left: 0;
    right: 0;
    margin: 0 auto; /* 👈 Centra la cápsula sin usar transform */
    width: 90%;
    max-width: 1100px;
    z-index: 1000;

    background-color: rgba(29, 41, 63, 0.555);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);

    transition: transform 0.4s ease, opacity 0.4s ease;
}

.nav__logo-img {
    height: 40px;          /* Ajusta la altura proporcional a la cápsula */
    width: auto !important;/* Obliga a Safari a no estirar el logo */
    object-fit: contain;   /* Mantiene la proporción exacta en iOS */
    filter: invert(1);
}

.nav__link{
    margin-left: auto;
    padding: 0;
    display: flex;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    align-items: center;
    gap: 2.5em;
}

.nav__items{
    list-style: none;
    transition: transform 0.3s ease;
}

.nav__items:hover {
    transform: translateY(-4px); /* Eleva levemente el icono al pasar el mouse */
}

.nav__links {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
    line-height: 1;
}

.nav__links:hover {
    color: #2091f9;                        /* Resalta en azul claro al pasar el mouse */
}

.nav__menu{
    margin-left: auto;
    cursor: pointer;
    display: none;
}

.nav__img{
    display: block;
    width: 25px; 
    height: auto;
    filter: brightness(0) invert(1);
}

.nav__close{
    display: none; 
    width: 30px;   
    height: auto;
    cursor: pointer;
    filter: brightness(0) invert(1);
}

.nav--hidden {
    transform: translateY(-120px) !important; /* 👈 Solo se mueve hacia arriba al ocultar */
    opacity: 0;
    pointer-events: none;
}

/* HERO CONTAINER */

.hero__container{
    max-width: 800px;
    --padding-container:0;
    display: grid;
    grid-auto-rows: max-content;
    align-content: center;
    gap: 1em;
    padding-bottom: 100px;
    text-align: center;
    margin-top: 0px;
}

.hero__title{
    font-size: 3rem;
    text-transform: uppercase;
}

.hero__paragraph{
    margin-bottom: 20px;
}

.cta{
    display: inline-block;
    background-color: #4ba0f0e3;
    justify-self: center;
    color: #fff;
    text-decoration: none;
    padding: 13px 30px;
    border-radius: 32px;    
}


/* ================= ANIMACIÓN AL HACER SCROLL ================= */

/* Estado inicial: alejado (escalado a 85%) y desplazado hacia abajo */
.reveal {
    opacity: 0;
    transform: scale(0.85) translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

/* Estado activo: se expande a su tamaño normal (100%) y sube a su posición */
.reveal.active {
    opacity: 1;
    transform: scale(1) translateY(0);
}


/* ================= SERVICIES =================  */

.services {
    text-align: center;
    padding: 60px 0;
}


.services__title{
    color: var(--color-title);
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 50px;
}

.services__index{
    margin-top: 50px;
    font-size: 2rem;
}

.services__subtitle{
    margin-top: 10px;
}

.services__paragraph{
    margin-top: 10px;
    text-align: justify;
}

.services__grid {
    margin-top: 50px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.services__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 280px;  /* Ajusta el ancho base */
    max-width: 320px; /* Evita que se estiren demasiado */
}

/* Envoltorio con habilitación de profundidad 3D */
.services__img-wrapper {
    position: relative;
    width: 200px;
    height: 130px;
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 800px; /* Crea el espacio en 3D */
}

/* Estado inicial: Imagen acostada en 3D */
.services__img {
    cursor: pointer;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    /* rotateX inclina la imagen hacia atrás y rotateZ le da un ligero ángulo lateral */
    transform: rotateX(45deg) rotateZ(-10deg) scale(0.9);
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.5s ease;
    box-shadow: -10px 15px 20px rgba(0, 0, 0, 0.3);
}

/* Estado Hover: La imagen se levanta, se pone recta de frente y se agranda */
.services__card:hover .services__img {
    transform: rotateX(0deg) rotateZ(0deg) scale(1.12);
    box-shadow: 0px 15px 25px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.services__more {
    margin-top: 80px;
    text-align: center;
}

.services_cta {
    display: inline-block;
    background-color: #2091f9; /* Azul de acento inicial */
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    padding: 14px 34px;
    border-radius: 32px;
    
    /* Aceleración por hardware */
    will-change: transform, background-color;
    transform: translate3d(0, 0, 0);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                background-color 0.25s ease,
                box-shadow 0.25s ease;
    cursor: pointer;
}

/* EFECTO HOVER: Azul más oscuro + Elevación + Sombra */
.services_cta:hover {
    background-color: #1263c2; /* Azul más oscuro e institucional */
    transform: translate3d(0, -4px, 0) scale(1.05); /* Se agranda y eleva suavemente */
    box-shadow: 0 10px 25px rgba(32, 145, 249, 0.35); /* Resplandor azul */
}

/* EFECTO PRESIONADO (Click) */
.services_cta:active {
    transform: translate3d(0, -1px, 0) scale(0.98); /* Feedback visual al dar clic */
}
/* ================= BANNER / CARRUSEL PRINCIPIOS ================= */

.beggin {
    position: relative;
    padding: 60px 0;
    text-align: center;
    background-color: #ffffff;
}

/* Ajuste de fondo para que el logo SAJ no se deforme ni se vea gigante */
.beggin__window {
    width: 100%;
    overflow: hidden;
    border-radius: 24px;
    background-image: linear-gradient(180deg, rgba(15, 23, 42, 0.93) 0%, rgba(15, 23, 42, 0.93) 100%), url(../IMAGE/logo-saj-.jpg);
    background-size: contain;           /* Evita que el logo se deforme de fondo */
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 35px 0 25px 0;
}

/* 2. Título separado del techo del contenedor */
.beggin__title {
    color: #ffffff;
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 10px;
    padding: 0 20px;
}

.beggin__track {
    display: flex;
    width: 100%;
    transition: transform 0.6s ease-in-out;
    will-change: transform;
}

/* 3. Ajustamos el padding de las diapositivas para no sumar espacio excesivo */
.beggin__slide {
    min-width: 100%;
    box-sizing: border-box;
    padding: 20px 50px;                 /* Reducimos relleno vertical, conservando lados */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    text-align: left;
}

.beggin__content {
    flex: 1;
}

.beggin__tag {
    display: inline-block;
    color: #ffffff;                  
    font-size: 1.3rem;               
    font-weight: 700;
    padding: 6px 18px;
    border-radius: 12px;
    margin-bottom: 15px;
}

.beggin__paragraph {
    font-size: 0.92rem;
    color: #f1f5f9;
    line-height: 1.6;
    text-align: justify;
}

.beggin__paragraph strong {
    color: #ffffff;
}

.beggin__media {
    flex: 0 0 220px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.beggin__icon {
    width: 100%;
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0px 4px 10px rgba(0, 0, 0, 0.4));
}

/* 4. Puntos despegados del piso del contenedor */
.beggin__dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 15px;
    margin-bottom: 5px;                 /* Otorga espacio limpio antes del borde inferior */
}

.beggin__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.beggin__dot--active {
    background-color: #2091f9;
    transform: scale(1.2);
}

.beggin__tag--mision { background-color: #ff2a5f; }
.beggin__tag--vision { background-color: #2091f9; }
.beggin__tag--valores { background-color: #00b894; }
.beggin__tag--mejora { background-color: #ff9f43; }

/* ================= FOOTER ================= */

.footer {
    background-color: #ffffff;             /* Fondo externo claro */
    padding-top: 40px;
}

/* Tarjeta contenedora con bordes redondeados estilo Keyence */
.footer__card {
    background-color: #1d293f;            /* Color azul institucional */
    color: #ffffff;
    border-radius: 30px 30px 0 0;          /* Redondeado en las esquinas superiores */
    padding: 50px 40px 20px 40px;
    box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.05);
}

.footer__container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    align-items: start;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 40px;
}

.footer__name {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.4;
}

.footer__col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer__info-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.footer__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
}

.footer__subtitle {
    font-size: 0.95rem;
    color: #cbd5e1;
}

.footer__divider {
    font-size: 0.85rem;
    color: #94a3b8;
    margin: 5px 0;
}

/* Formulario */
.footer__form {
    gap: 10px;
}

.footer__inputs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.footer__input {
    background-color: #ffffff;
    height: 45px;
    padding: 0 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    border: none;
    color: #333333;
    flex: 1;
    min-width: 200px;
}

.footer__submit {
    height: 45px;
    padding: 0 20px;
    background-color: #2091f9;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.footer__submit:hover {
    background-color: #1872c4;
}

/* Redes Sociales y Copyright */
.footer__copy {
    padding-top: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer__social {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.footer__icon-link {
    display: inline-block;
    transition: transform 0.3s ease;
}

.footer__icon-link:hover {
    transform: translateY(-3px);
}

.footer__img {
    width: 26px;
    height: 26px;
}

.footer__copyright {
    font-weight: 300;
    font-size: 0.85rem;
    color: #94a3b8;
}

/* ================= SECCIÓN CONSTELACIÓN (ULTRA FLUIDO / ULTRA LIGHT) ================= */

.relation {
    position: relative;
    padding: 60px 0;
    text-align: center;
    background: radial-gradient(circle at center, rgba(32, 145, 249, 0.05) 0%, transparent 70%);
    overflow: hidden;
}

/* Fondo de red liviano */
.relation__bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(32, 145, 249, 0.15) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
    z-index: 0;
}

.relation__tittle {
    position: relative;
    z-index: 1;
    color: var(--color-title);
    font-size: 2.2rem;
    font-weight: 900;
    margin: 40px 0 30px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Contenedores Flex (Garantiza exactamente 3 por fila en pantallas grandes) */
.relation__clients,
.relation__partnership {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 30px 40px;
    max-width: 1260px; /* 3 tarjetas de 380px + gaps = cabe perfecto en 3 columnas */
    margin: 0 auto;
    padding: 20px 0;
}

/* Ocultamos los puntos de la esquina (eliminados para liberar carga de renderizado) */
.relation__pin {
    display: none;
}

/* Tarjeta / Nodo Individual (Forzado en GPU 3D) */
.relation__node {
    position: relative;
    width: 370px;  
    height: 210px; 
    background: transparent; 
    border: none;            
    box-shadow: none;       
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;    
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    transition: transform 0.2s ease-out;    
}

/* Línea conectora horizontal sutil */
.relation__node::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -20px;
    width: 20px;
    height: 2px;
    background: rgba(32, 145, 249, 0.25);
    transition: background-color 0.2s ease;
}

/* Imagen del logo */
.relation__img {
    max-width: 85%;
    max-height: 75%;
    object-fit: contain;
    mix-blend-mode: multiply;
    border-radius: 8px;
    opacity: 0.85;
    pointer-events: none; /* Deshabilita detección del mouse sobre la foto para evitar tirones */
    transform: translate3d(0, 0, 0);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* HOVER FLUIDO */

.relation__node:hover {
    transform: translate3d(0, -6px, 0); /* Animación pura en GPU */
    z-index: 5;
}

.relation__node:hover .relation__img {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1.03);
}

.relation__node:hover::before {
    background-color: #2091f9;
}

/* Nodos Activos en Cadena (JS) */
.relation__node.node-connected::before {
    background-color: #00b894;
}


/* ================= MODAL BOTTOM SHEET (OPTIMIZADO Y FLUIDO) ================= */

.service-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.service-modal.active {
    opacity: 1;
    pointer-events: all;
}

/* Sombreado de fondo oscuro */
.service-modal__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 15, 25, 0.82);
}

/* Contenedor Principal Blanco */
.service-modal__container {
    position: relative;
    z-index: 2;
    width: 95%;
    max-width: 1200px;
    max-height: 85vh;
    background: #ffffff;
    border-radius: 28px 28px 0 0;
    padding: 40px;
    overflow-y: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    
    /* Aceleración por Hardware */
    contain: content;
    will-change: transform;
    transform: translate3d(0, 100%, 0);
    transition: transform 0.25s cubic-bezier(0, 0, 0.2, 1);
}

.service-modal.active .service-modal__container {
    transform: translate3d(0, 0, 0);
}

.service-modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.service-modal__close:hover {
    background: #ff2a5f;
    color: #ffffff;
}

.service-modal__tag {
    display: inline-block;
    color: #2091f9;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.service-modal__title {
    color: var(--color-title);
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 25px;
}

/* Estructura Grid de 2 Columnas */
.service-modal__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* Modo 1 Columna (Para servicios que solo llevan texto) */
.service-modal__grid.no-gallery {
    grid-template-columns: 1fr;
    max-width: 850px;
}

/* Mantiene el texto de la izquierda fijo mientras bajas a ver fotos */
.service-modal__info {
    position: sticky;
    top: 0;
    align-self: start;
}

.service-modal__info h3,
.service-modal__media h3 {
    color: var(--color-title);
    font-size: 1.1rem;
    font-weight: 800;
    margin: 15px 0 10px 0;
}

.service-modal__info p {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.7;
    text-align: justify;
}

/* Galería Vertical de Fotos Grandes */
.service-modal__gallery {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 10px;
}

.service-modal__gallery img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 14px;
    border: 2px solid rgba(32, 145, 249, 0.4);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    will-change: transform;
    transform-style: preserve-3d;
    transition: transform 0.10s ease-out, border-color 0.5s ease;
}

.service-modal__gallery img:hover {
    transform: scale(1.02);
    border-color: #2091f9;
}

/* ================= MODAL DE CONTACTO (SUBE HASTA EL TOPE) ================= */

.contact-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 4000;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.contact-modal.active {
    opacity: 1;
    pointer-events: all;
}

.contact-modal__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 15, 25, 0.82);
}

.contact-modal__container {
    position: relative;
    z-index: 2;
    width: 95%;
    max-width: 1100px;
    height: 92vh; /* 👈 Sube casi hasta el tope superior de la pantalla */
    background: #ffffff;
    border-radius: 28px 28px 0 0;
    padding: 40px;
    overflow-y: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    
    contain: content;
    will-change: transform;
    transform: translate3d(0, 100%, 0);
    transition: transform 0.3s cubic-bezier(0, 0, 0.2, 1);
}

.contact-modal.active .contact-modal__container {
    transform: translate3d(0, 0, 0);
}

.contact-modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.contact-modal__close:hover {
    background: #ff2a5f;
    color: #ffffff;
}

.contact-modal__tag {
    display: inline-block;
    color: #2091f9;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.contact-modal__title {
    color: var(--color-title);
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 30px;
}

.contact-modal__grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    align-items: start;
}

.contact-modal__info h3,
.contact-modal__form-wrapper h3 {
    color: var(--color-title);
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.contact-modal__info p {
    color: #475569;
    font-size: 0.93rem;
    line-height: 1.6;
}

.contact-modal__details {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-modal__item strong {
    color: var(--color-title);
    font-size: 0.9rem;
    display: block;
}

.contact-modal__item p {
    color: #2091f9;
    font-weight: 600;
}

/* Campos de Formulario */
.contact-modal__form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.contact-modal__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.contact-modal__field label {
    font-size: 0.88rem;
    color: #64748b;
    font-weight: 500;
}

.contact-modal__input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #1e293b;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-modal__input:focus {
    border-color: #2091f9;
    box-shadow: 0 0 0 3px rgba(32, 145, 249, 0.15);
}

.contact-modal__textarea {
    resize: vertical;
    min-height: 110px;
}

.contact-modal__submit {
    align-self: center;
    background-color: #3b5998; /* Azul oscuro corporativo centrado */
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 14px 40px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.2s ease;
    margin-top: 10px;
}

.contact-modal__submit:hover {
    background-color: #2091f9;
    transform: translateY(-2px);
}

.contact-modal__status {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 10px;
}

.contact-modal__status.success {
    color: #10b981;
}

.contact-modal__status.error {
    color: #ef4444;
}

/* Adaptación a móviles */
@media (max-width: 800px) {
    .contact-modal__grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .contact-modal__container {
        padding: 25px;
        height: 95vh;
    }
}


/* ==========================================================================
   RESPONSIVE DESIGN / MEDIA QUERIES (CORREGIDO Y FULL SCREEN)
   ========================================================================== */

/* 1. Laptops Pequeñas y Tablets Horizontales (Hasta 1024px) */
@media (max-width: 1024px) {
    .container {
        width: 92%;
    }

    .hero__title {
        font-size: 2.4rem;
    }

    .relation__clients,
    .relation__partnership {
        max-width: 900px;
    }

    .relation__node {
        width: 340px;
        height: 190px;
    }
}

/* 2. Tablets en Modo Retrato y Celulares (Hasta 800px) */
@media (max-width: 800px) {
    /* Desactivamos el filtro en la cápsula para que no encierre al menú desplegable */
    .nav {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background-color: rgba(29, 41, 63, 0.95);
    }

    .nav__menu {
        display: block; /* Muestra el icono de menú hamburguesa */
    }

    /* MENÚ DESPLEGABLE EN TODA LA PANTALLA Y SEMI-TRANSPARENTE */
    .nav__link {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        background-color: rgba(29, 41, 63, 0.92) !important; /* Azul semi-transparente */
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 2.2rem !important;
        z-index: 9999 !important;

        /* Estado cerrado por defecto */
        opacity: 0;
        pointer-events: none;
        transform: translateY(-10px);
        transition: opacity 0.35s ease, transform 0.35s ease;
    }

    /* Estado desplegado al hacer clic */
    .nav__link--show {
        opacity: 1 !important;
        pointer-events: all !important;
        transform: translateY(0) !important;
    }

    .nav__close {
        display: block;
        position: absolute;
        top: 30px;
        right: 30px;
        width: 32px;
        cursor: pointer;
    }

    .nav__links {
        font-size: 1.35rem;
        font-weight: 600;
    }

    /* Ajuste modal de servicios a 1 columna */
    .service-modal__grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .service-modal__info {
        position: static;
    }

    .service-modal__container {
        padding: 25px;
        max-height: 90vh;
    }

   /* Carrusel de Principios: Texto alineado arriba e icono grande abajo */
    .beggin__slide {
        flex-direction: column; /* Mantiene el orden HTML: 1° Texto, 2° Icono */
        text-align: justify;
        padding: 20px 25px;
        gap: 25px;
    }

    .beggin__content {
        display: flex;
        flex-direction: column;
        align-items: center; /* Centra la etiqueta de VISIÓN/MISIÓN respecto al texto */
    }

    .beggin__paragraph {
        text-align: justify;
        font-size: 0.92rem;
        line-height: 1.65;
    }

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

    .beggin__icon {
        display: block;
        width: 150px; /* Aumentamos el tamaño para que luzca en pantallas chicas */
        max-width: 170px;
        height: auto;
        margin: 0 auto;
        filter: drop-shadow(0px 6px 14px rgba(0, 0, 0, 0.45)); /* Resalta el icono sobre el fondo */
    }

    /* Centra la columna del botón de contacto a todo lo ancho del footer */
    .footer__container > .footer__col:last-child {
        grid-column: 1 / -1;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer__container > .footer__col:last-child .services_cta {
        margin: 0 auto;
    }
}

/* 3. Teléfonos Inteligentes / Celulares (Hasta 600px) */
@media (max-width: 600px) {
    :root {
        --padding-container: 50px 0;
    }

    /* ENCUADRE DE LA IMAGEN Y TEXTO DEL HERO */
    .hero {
        height: auto;
        min-height: 100vh;
        padding-top: 110px; /* Despeja el texto de la barra superior */
        padding-bottom: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero::before {       
        background-position: 50% center; /* Enfoca a los técnicos en pantallas angostas */
        background-size: cover;
    }

    .hero__container {
        padding: 0 15px;
        margin-top: 20px;
    }

    .hero__title {
        font-size: 1.55rem;
        line-height: 1.35;
    }

    .hero__paragraph {
        font-size: 0.85rem;
        line-height: 1.5;
        margin-bottom: 15px;
    }

    .cta {
        padding: 12px 28px;
        font-size: 0.9rem;
    }

    .services__title,
    .relation__tittle,
    .beggin__title {
        font-size: 1.55rem;
    }

    /* Red de Nodos en 1 sola columna centrada */
    .relation__clients,
    .relation__partnership {
        gap: 15px;
    }

    .relation__node {
        width: 100%;
        max-width: 290px;
        height: 140px;
    }

    .relation__node::before {
        display: none;
    }

    /* Footer adaptativo */
    .footer__card {
        padding: 30px 20px 20px 20px;
        border-radius: 20px 20px 0 0;
    }

    .footer__inputs {
        flex-direction: column;
    }

    .footer__input,
    .footer__submit {
        width: 100%;
    }
}

/* ===== CORRECCIONES PARA SAFARI EN IOS ===== */

/* Bloqueo de scroll universal compatible con iOS */
body.no-scroll {
    overflow: hidden !important;
    touch-action: none;
}

/* Corrección de alto dinámico para el menú desplegable en iPhone */
@media (max-width: 800px) {
    .nav__link {
        height: 100vh !important;
        height: 100dvh !important; /* Ajusta al alto real de pantalla en Safari */
    }
}

/* Restricción global para evitar desbordamientos de imágenes en iOS Safari */
img {
    max-width: 100%;
    height: auto;
}
