/* === Fondo global único === */
body {
    font-family: 'Segoe UI', sans-serif;
    background: url('img/estrada2.webp') center center / cover no-repeat fixed;
    color: #0d1b2a;
    padding-top: 80px;
    /* igual a la altura del navbar */
}

/* Overlay oscuro para mejorar contraste */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(13, 27, 42, 0.45);
    pointer-events: none;
    z-index: -1;
}

/* ===== NAV ===== */
.navbar {
    background: rgba(13, 27, 42, 0.85);
    backdrop-filter: blur(6px);
}

.navbar-brand,
.navbar-nav .nav-link {
    color: #fff !important;
}

.logo-ec {
    height: 60px;
    /* tamaño fijo de alto */
    width: auto;
    /* mantiene proporción */
    display: block;
    /* evita inline gaps */
}

/* ===== HERO (Carrusel) ===== */
.hero {
    position: relative;
    overflow: hidden;
    padding: 0;
    background: transparent !important;
    width: 100%;
}

.hero .carousel,
.hero .carousel-inner,
.hero .carousel-item,
.hero .hero-slide {
    height: 70vh;
    /* alto hero */
    min-height: 420px;
}

.hero .hero-slide {
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
    width: 100%;
    height: 100%;
}

.hero .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(13, 27, 42, 0.35) 0%, rgba(13, 27, 42, 0.55) 60%, rgba(13, 27, 42, 0.65) 100%);
    z-index: 1;
}

/* Texto del hero */
.hero .hero-caption {
    position: relative;
    z-index: 2;
    color: #fff;
    max-width: 920px;
    padding: 0 12px;
}

.hero .hero-caption h1,
.hero .hero-caption h2 {
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 6px 30px rgba(0, 0, 0, 0.45);
    margin: 0;
}

.hero .hero-caption h1 {
    font-size: clamp(1.8rem, 3.6vw, 3rem);
}

.hero .hero-caption h2 {
    font-size: clamp(1.4rem, 3.2vw, 2.4rem);
}

/* Indicadores y controles con acento naranja */
.carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.6);
}

.carousel-indicators .active {
    background-color: #f36c21;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.hero-intro {
    background: rgba(13, 27, 42, 0.85);
    backdrop-filter: blur(4px);
}

.hero-intro p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* ===== Secciones (Glassmorphism) ===== */
.section {
    padding: 60px 0;
    background: transparent !important;
}

.section>.container {
    background: rgba(13, 27, 42, 0.75);
    /* azul oscuro translúcido */
    border-radius: 16px;
    padding: 32px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    color: #fff;
    /* texto claro */
}

/* HERO y FOOTER sin panel */
.hero>.container {
    background: transparent;
    border: none;
    box-shadow: none;
}

footer .container {
    background: transparent;
    box-shadow: none;
    padding: 20px 0;
}

/* ===== FOOTER ===== */
footer {
    background: rgba(13, 27, 42, 0.85);
    color: #ced4da;
    text-align: center;
}

.site-footer {
    background: rgba(13, 27, 42, 0.85);
    color: #ced4da;
    padding: 28px 0 32px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.footer-logo {
    height: 42px;
    width: auto;
    display: block;
}

.footer-brand-text {
    color: #fff;
    font-weight: 600;
    letter-spacing: .2px;
}

.footer-title {
    color: #fff;
    font-weight: 700;
    margin-bottom: .5rem;
}

.footer-addr {
    white-space: normal;
    line-height: 1.5;
}

.footer-link {
    color: #f36c21;
    text-decoration: none;
}

.footer-link:hover {
    text-decoration: underline;
}

.footer-copy {
    font-size: .9rem;
    color: #adb5bd;
}


/* ===== Componentes ===== */
.btn-primary {
    background: #f36c21;
    border: none;
}

.btn-primary:hover {
    background: #f36c21;
}

.card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(8px);
}

.form-control,
.btn,
.alert,
.toast,
.modal-content,
.tooltip-inner,
.popover,
.badge,
.progress {
    border-radius: 12px;
}

/* ===== Navbar hover naranja con línea ===== */
.navbar-nav .nav-link {
    color: #fff !important;
    position: relative;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: #f36c21;
    /* naranja del logo */
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    color: #f36c21 !important;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link:focus::after {
    width: 100%;
}

.navbar-nav .nav-link.active::after {
    width: 100%;
}

/* ===== Imagen en “Quiénes Somos” ===== */
.imagen-wrapper {
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    z-index: 2;
}

.img-full-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Iconos de lista con color naranja del logo */
.valor-icon {
    color: #f36c21;
}

/* ===== Políticas (Acordeón) ===== */
/* Ítem y borde */
#politica .accordion-item {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* Header cerrado = oscuro; abierto = naranja */
#politica .accordion-button {
    background: rgba(13, 27, 42, 0.9) !important;
    /* cerrado */
    color: #fff !important;
    font-weight: 600;
    box-shadow: none !important;
}

#politica .accordion-button:not(.collapsed) {
    background: #f36c21 !important;
    /* abierto */
    color: #fff !important;
}

#politica .accordion-button::after {
    filter: invert(1) brightness(2);
    /* chevron blanco */
}

/* Cuerpo del acordeón */
#politica .accordion-collapse,
#politica .accordion-body {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #fff !important;
}

/* Botones y links dentro de Políticas */
#politica .btn-outline-primary {
    border-color: #f36c21;
    color: #f36c21;
}

#politica .btn-outline-primary:hover {
    background: #f36c21;
    color: #fff;
}

#politica .link-quejas {
    color: #f36c21;
}

/* Modal de políticas */
#modalPolitica .modal-content {
    background: rgba(13, 27, 42, 0.95);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.no-copy {
    user-select: none;
    -webkit-user-select: none;
}

.no-copy a {
    user-select: text;
}

/* ===== Banner de Cookies (CMP) ===== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: none;
    z-index: 1080;
    padding: 16px 20px;
    background: rgba(13, 27, 42, .95);
    color: #fff;
    border-top: 2px solid #f36c21;
    align-items: center;
    justify-content: space-between;
}

.cookie-banner.show {
    display: flex;
    flex-wrap: wrap;
}

.cookie-banner .cookie-text {
    flex: 1;
    font-size: 0.95rem;
}

.cookie-banner .btn-primary {
    background: #f36c21;
    border: none;
}

.cookie-banner .btn-primary:hover {
    background: #d65f1d;
}

/* Footer link para reabrir preferencias */
#open-cookie-center {
    color: #f36c21;
}

/* Imagen dentro del modal de privacidad */
#privacy-modal img {
    border: 1px solid rgba(255, 255, 255, .1);
}

/* Opcional: asegurar altura del formulario en el modal */
#modalTrabajo .modal-body {
    padding: 0;
}

#trabajo-iframe-wrap {
    height: 70vh;
}

#trabajo-iframe-wrap iframe {
    display: block;
}


/* ===== Responsive ===== */
@media (max-width: 768px) {

    .hero .carousel,
    .hero .carousel-inner,
    .hero .carousel-item,
    .hero .hero-slide {
        height: 56vh;
        min-height: 360px;
    }

    .hero {
        padding: 50px 0;
    }

    .section {
        padding: 40px 0;
    }

    .logo-ec {
        height: 45px;
    }

    .imagen-wrapper {
        min-height: 400px;
        margin: 20px 0;
    }

    #quienes .row {
        flex-direction: column;
    }

    .cookie-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .cookie-actions {
        margin-top: 8px;
    }
}

/* Tarjeta del mapa con estética glass */
.map-card {
    background: rgba(13, 27, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    color: #fff;
}

/* Contenedor del iframe del mapa */
.map-embed {
    position: relative;
    width: 100%;
    height: 320px;
    background: rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.map-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    filter: saturate(1.05) contrast(1.02);
}

/* Ajuste responsive */
@media (max-width: 768px) {
    .map-embed {
        height: 260px;
    }
}

/* Modal resultado formulario */
#formResultCard {
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .45);
}

#formResultModal .modal-header .btn-close {
    filter: invert(1) brightness(2);
    /* X blanca */
}

#formResultModal .modal-content.bg-success,
#formResultModal .modal-content.bg-danger {
    /* hace contraste en el cuerpo/footers que no llevan bordes */
    color: #fff;
}

#formResultModal .btn.btn-primary {
    background: #f36c21;
    border: none;
}

#formResultModal .btn.btn-primary:hover {
    background: #d65f1d;
}

#formResultModal .btn.btn-outline-light:hover {
    color: #0d1b2a;
}

#soluciones .card-body ul li,
#procesos ol li,
#procesos ul li {
    margin-bottom: .35rem;
}

#soluciones .card-body p.small,
#soluciones .card-body ul {
    font-size: 0.95rem;
}

#procesos .rounded-3 h6 {
    color: #fff;
    font-weight: 700;
}

/* ===== Offset limpio para anclas bajo navbar ===== */
:root {
    --nav-h: 80px;
    /* alto actual del navbar */
    --section-gap: 18px;
    /* respiración adicional */
}

/* desplazamiento suave y con padding automático para TODAS las anclas */
html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + var(--section-gap));
}

/* por si se llega vía hash antiguo, da margen visual extra */
.section {
    margin-top: var(--section-gap);
}

/* móvil: navbar más bajo */
@media (max-width: 992px) {
    :root {
        --nav-h: 64px;
    }
}

/* ===== Sección Clientes ===== */
/* ===== CLIENTES ===== */
#clientes h2 {
    color: #fff;
    font-weight: 700;
}

#clientes p {
    color: #dee2e6;
    font-size: 1.05rem;
}

.client-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 40px 30px;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(6px);
}

.client-card:hover {
    transform: translateY(-5px);
    border-color: #f36c21;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.client-logo {
    max-width: 80%;
    max-height: 80px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.95;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.client-card:hover .client-logo {
    opacity: 1;
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 768px) {
    .client-card {
        padding: 30px 20px;
        min-height: 130px;
    }

    .client-logo {
        max-height: 60px;
    }
}

/* ===== Botón flotante WhatsApp ===== */
.btn-whatsapp {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background-color: #25D366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1100;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.btn-whatsapp:hover {
    background-color: #20b858;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.btn-whatsapp i {
    font-size: 24px;
}

/* Ajuste responsive */
@media (max-width: 576px) {
    .btn-whatsapp {
        width: 48px;
        height: 48px;
        bottom: 15px;
        right: 15px;
    }

    .btn-whatsapp i {
        font-size: 20px;
    }
}