﻿/* ===========================
   GLOBAL FIX
=========================== */
html, body {
    overflow-x: hidden;
}

/* ===========================
   ALTURA REAL EN TODAS LAS PANTALLAS
=========================== */

/* Desktop: fullscreen real */
#heroCarousel,
#heroCarousel .carousel-item,
#heroCarousel .hero-slide {
    height: 100vh;
    min-height: 600px;
}

/* Móviles modernos — altura real visible */
@media (max-width: 991px) {
    #heroCarousel,
    #heroCarousel .carousel-item,
    #heroCarousel .hero-slide {
        height: 100svh; /* altura real visible */
        min-height: 100svh;
    }
}

/* Fallback universal para navegadores antiguos */
@media (max-width: 991px) {
    .hero-slide {
        height: calc(var(--vh, 1vh) * 100);
    }
}

/* ===========================
   IMAGEN — RECORTE INTELIGENTE
=========================== */

.hero-slide {
    background-size: cover;
    background-position: center; /* mejor para móvil */
    background-repeat: no-repeat;
    position: relative;
}

@media (min-width: 992px) {
    .hero-slide {
        background-position: center top; /* mejor para desktop */
    }
}

/* ===========================
   DEGRADADO PROFESIONAL
=========================== */

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient( rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.25) );
    z-index: 1;
}

/* ===========================
   CAPTION Y TEXTO
=========================== */

.carousel-caption {
    position: relative;
    z-index: 5;
    max-width: 650px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 768px) {
    .carousel-caption {
        padding-bottom: 40px; /* evita que quede pegado abajo */
    }
}

/* Texto responsive */
.carousel-caption h1 {
    font-size: 2.2rem;
}

.carousel-caption p {
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .carousel-caption h1 {
        font-size: 1.6rem;
        line-height: 1.2;
    }

    .carousel-caption p {
        font-size: 0.95rem;
    }
}

/* ===========================
   BOTÓN RESPONSIVE
=========================== */

.carousel-caption .btn {
    padding: 10px 24px;
    font-size: 1rem;
    border-radius: 6px;
}

@media (max-width: 768px) {
    .carousel-caption .btn {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
}

/* ⭐ FIX para que los títulos no se corten en móviles */
@media (max-width: 768px) {
    .carousel-caption {
        text-align: center;
        max-width: 90%;
        align-items: center !important;
    }
}


/* ===========================
   ANIMACIONES
=========================== */

.animate-text {
    opacity: 0;
    transform: translateY(25px);
    transition: all 0.9s ease;
}

.carousel-item.active .animate-text {
    opacity: 1;
    transform: translateY(0);
}

.carousel-item.active .hero-title {
    transition-delay: 0.2s;
}

.carousel-item.active .hero-sub {
    transition-delay: 0.4s;
}

.carousel-item.active .btn {
    transition-delay: 0.6s;
}

/* Fade suave del carrusel */
.carousel-fade .carousel-item {
    transition: opacity 1.2s ease-in-out;
}

/* ⭐ FIX DEFINITIVO PARA CENTRAR TEXTO EN MÓVILES */
@media (max-width: 768px) {

    /* Reset del posicionamiento que Bootstrap aplica */
    .carousel-caption {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: 100%;
        max-width: 90%;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center; /* ← centra horizontalmente */
        justify-content: center;
    }
}





/*MODAL PRIVACIDAD*/
/* ============================
   MODAL PREMIUM ABVA
============================ */

/* Animación fade + slide */
.modal.fade .modal-dialog {
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.45s ease;
}

.modal.fade.show .modal-dialog {
    transform: translateY(0);
    opacity: 1;
}

/* Glass effect + borde corporativo */
#privacidadModal .modal-content {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 14px;
    border: 2px solid rgba(13, 110, 253, 0.35); /* azul corporativo */
    box-shadow: 0 12px 35px rgba(0,0,0,0.25);
}

/* Header elegante */
#privacidadModal .modal-header {
    border-bottom: 1px solid rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(6px);
}

/* Títulos */
#privacidadModal h5 {
    font-weight: 700;
    margin-top: 20px;
    color: #0A1A2F; /* azul corporativo oscuro */
}

/* Texto */
#privacidadModal p,
#privacidadModal li {
    line-height: 1.65;
    color: #333;
    font-size: 1rem;
}

/* Listas */
#privacidadModal ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

/* Footer */
#privacidadModal .modal-footer {
    border-top: 1px solid rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(6px);
}

/* Botón cerrar */
#privacidadModal .btn-secondary {
    background-color: #0A1A2F;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
}

    #privacidadModal .btn-secondary:hover {
        background-color: #0d6efd;
    }








/* ===========================
   HEADER FIXED
=========================== */
body {
    padding-top: 56px;
}

@media (max-width: 576px) {
    body {
        padding-top: 60px;
    }
}


/* ===========================
   NAVBAR
=========================== */
.navbar {
    background-color: #0A1A2F !important;
    padding: 8px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}


/* ===========================
   LOGO
=========================== */
.logo-nav {
    height: 40px;
    max-width: 140px;
    object-fit: contain;
}


/* ===========================
   TOGGLER
=========================== */
.navbar-toggler {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.navbar-toggler-icon {
    width: 26px;
    height: 26px;
}

/* ===========================
   DESKTOP FIX (CRITICAL)
=========================== */
@media (min-width: 992px) {

    .offcanvas {
        transform: none !important;
        visibility: visible !important;
        position: static !important;
        background: none !important;
        height: auto !important;
    }

    .offcanvas-body {
        display: flex !important;
        justify-content: flex-end;
        align-items: center;
    }

    .navbar-nav {
        flex-direction: row;
        gap: 20px;
    }

    .offcanvas .nav-link {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ===========================
   MOBILE MENU CENTERING
=========================== */
@media (max-width: 991.98px) {

    .offcanvas.offcanvas-end {
        transform: translateX(100%) scale(0.98);
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
    }

    .offcanvas.show {
        transform: translateX(0) scale(1);
        opacity: 1;
    }

    /* 🔥 instant visual hide (prevents freeze feeling) */
    .offcanvas.instant-hide {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }

    /* backdrop faster + smoother */
    .offcanvas-backdrop {
        opacity: 0;
        transition: opacity 0.2s ease;
    }

        .offcanvas-backdrop.show {
            opacity: 0.5;
        }

    /* menu items slightly faster */
    .offcanvas .nav-link {
        opacity: 0;
        transform: translateY(16px);
        transition: transform 0.22s ease, opacity 0.22s ease;
    }

    .offcanvas.show .nav-link {
        opacity: 1;
        transform: translateY(0);
    }

    /* tighter stagger (faster overall) */
    .offcanvas.show .nav-item:nth-child(1) .nav-link {
        transition-delay: 0.04s;
    }

    .offcanvas.show .nav-item:nth-child(2) .nav-link {
        transition-delay: 0.08s;
    }

    .offcanvas.show .nav-item:nth-child(3) .nav-link {
        transition-delay: 0.12s;
    }

    .offcanvas.show .nav-item:nth-child(4) .nav-link {
        transition-delay: 0.16s;
    }
}


/* ===========================
   OFFCANVAS ANIMATION (SMOOTH)
=========================== */

/* panel animation */
.offcanvas.offcanvas-end {
    transform: translateX(100%) scale(0.98);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.offcanvas.show {
    transform: translateX(0) scale(1);
}


/* backdrop fade */
.offcanvas-backdrop {
    opacity: 0;
    transition: opacity 0.35s ease;
}

    .offcanvas-backdrop.show {
        opacity: 0.5;
    }


/* ===========================
   MENU ITEMS ANIMATION
=========================== */
.offcanvas .nav-link {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.offcanvas.show .nav-link {
    opacity: 1;
    transform: translateY(0);
}


/* stagger effect */
.offcanvas.show .nav-item:nth-child(1) .nav-link {
    transition-delay: 0.1s;
}

.offcanvas.show .nav-item:nth-child(2) .nav-link {
    transition-delay: 0.2s;
}

.offcanvas.show .nav-item:nth-child(3) .nav-link {
    transition-delay: 0.3s;
}

.offcanvas.show .nav-item:nth-child(4) .nav-link {
    transition-delay: 0.4s;
}
    #clientes .cliente-card img {
        width: 100%;
        height: auto;
        object-fit: contain;
        filter: grayscale(100%);
        opacity: 0.8;
        transition: all 0.3s ease;
    }

    #clientes .cliente-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    }

        #clientes .cliente-card:hover img {
            filter: grayscale(0%);
            opacity: 1;
        }




/* ===========================
   FOOTER
=========================== */
footer {
    background-color: #0A1A2F !important;
}


/* ===========================
   FIX TITLES CUT BY HEADER
=========================== */
section, header:not(#heroCarousel) {
    scroll-margin-top: 70px;
}

/*Recaptcha*/
.captcha-wrapper {
    display: inline-block;
    padding: 5px;
    border-radius: 6px;
}

.captcha-error {
    border: 2px solid #dc3545;
    box-shadow: 0 0 5px rgba(220, 53, 69, 0.5);
}

.fade-message {
    opacity: 1;
    transition: opacity 0.5s ease;
}

    .fade-message.hide {
        opacity: 0;
    }

/*Secciones*/

/* ============================
   SECCIÓN NOSOTROS (SPLIT)
============================ */

.about-split {
    display: flex;
    min-height: 500px;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Columna de la imagen */
.about-image {
    flex: 1;
    background-image: url('/img/customers/nosotros.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Columna del texto */
.about-text {
    flex: 1;
    background: #0A1A2F; /* color corporativo */
    color: white;
    display: flex;
    align-items: center;
    padding: 80px 50px;
}

    .about-text .inner {
        max-width: 600px;
    }

/* Animación premium */
.animate-about-title,
.animate-about-text {
    opacity: 0;
    transform: translateY(25px);
    transition: all 0.9s ease;
}

.about-split.in-view .animate-about-title {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}

.about-split.in-view .animate-about-text {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.4s;
}

/* ============================
   RESPONSIVE FIX — IMAGEN EN MÓVIL
============================ */
@media (max-width: 991px) {
    .about-split {
        flex-direction: column;
    }

    .about-image {
        height: 300px; /* evita que desaparezca */
        flex: none; /* evita colapso de altura */
    }

    .about-text {
        padding: 60px 30px;
    }
}


/* ============================
   SERVICIOS — ANIMACIÓN INICIAL
============================ */

.services-section h2,
.services-section p {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

.services-section.in-view h2,
.services-section.in-view p {
    opacity: 1;
    transform: translateY(0);
}

/* ============================
   TARJETAS DE SERVICIO
============================ */

.service-card {
    position: relative;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    overflow: hidden;
    padding: 0;
    min-height: 340px; /* un poco más alta para mejor presencia */
    display: flex;
    align-items: flex-end;
    color: white;
    transition: all 0.35s ease; /* para hover suave */
}

    /* Overlay */
    .service-card .overlay {
        position: absolute;
        inset: 0;
        background: linear-gradient( rgba(0,0,0,0.65), rgba(0,0,0,0.35) );
        z-index: 1;
        transition: all 0.35s ease;
    }

    /* Contenido */
    .service-card .content {
        position: relative;
        z-index: 2;
        padding: 35px; /* más aire */
    }

    /* Títulos dentro de tarjetas */
    .service-card h5 {
        font-size: 1.35rem; /* más grande */
        font-weight: 700;
        margin-bottom: 18px;
    }

    /* Lista */
    .service-card ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

        .service-card ul li {
            font-size: 1.1rem; /* más grande */
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

            .service-card ul li i {
                font-size: 1.2rem; /* icono más visible */
                color: #0d6efd;
            }

/* ============================
   HOVER PREMIUM
============================ */

    .service-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    }

        .service-card:hover .overlay {
            background: linear-gradient( rgba(0,0,0,0.75), rgba(0,0,0,0.45) );
        }

/* ============================
   FADE AL HACER SCROLL
============================ */

.fade-on-scroll {
    opacity: 0;
    transform: translateY(25px);
    transition: all 0.9s ease;
}

    .fade-on-scroll.in-view {
        opacity: 1;
        transform: translateY(0);
    }

/* ============================
   SECCIÓN SECTORES
============================ */

.sectores-section {
    background: #f8f9fa;
}

.sector-card {
    background: white;
    border-radius: 14px;
    padding: 35px 25px;
    text-align: center;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    transition: all 0.35s ease;
    border: 1px solid rgba(0,0,0,0.05);
    height: 100%;
    min-height: 280px; /* puedes ajustar a 300, 320, etc. */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

    /* Ícono circular */
    .sector-card .icon-box {
        width: 70px;
        height: 70px;
        margin: 0 auto 20px;
        border-radius: 50%;
        background: #0A1A2F;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.35s ease;
        flex-shrink: 0;
    }

        .sector-card .icon-box i {
            font-size: 32px;
            color: white;
        }

    /* Hover */
    .sector-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 8px 22px rgba(0,0,0,0.15);
    }

        .sector-card:hover .icon-box {
            background: #0d6efd;
        }

    /* Títulos */
    .sector-card h5 {
        font-weight: 600;
        margin-bottom: 10px;
        flex-shrink: 0;
    }
    .sector-card p {
        flex-grow: 1; /* hace que el texto ocupe el espacio necesario */
    }


/* Fade al hacer scroll */
.fade-on-scroll {
    opacity: 0;
    transform: translateY(25px);
    transition: all 0.9s ease;
}

    .fade-on-scroll.in-view {
        opacity: 1;
        transform: translateY(0);
    }

/* Animación del título principal */
.animate-sector-title {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

.sectores-section.in-view .animate-sector-title {
    opacity: 1;
    transform: translateY(0);
}

/* ============================
   CONTACTO
============================ */

.contact-section h2 {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

.contact-section.in-view h2 {
    opacity: 1;
    transform: translateY(0);
}

/* Formulario */
.contact-form .form-control {
    padding: 14px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.contact-form .btn {
    padding: 12px;
    font-size: 1.1rem;
    border-radius: 8px;
}

/* Mapa */
.map-container {
    width: 100%;
    height: 100%;
    min-height: 350px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

    .map-container iframe {
        width: 100%;
        height: 100%;
        border: 0;
    }

/* Fade al hacer scroll */
.fade-on-scroll {
    opacity: 0;
    transform: translateY(25px);
    transition: all 0.9s ease;
}

    .fade-on-scroll.in-view {
        opacity: 1;
        transform: translateY(0);
    }
.contact-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 30px;
    font-size: 1.1rem;
    color: #444;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

.contact-section.in-view .contact-intro {
    opacity: 1;
    transform: translateY(0);
}
