/* =========================================================================
   NCM Aduanas — site.css
   Paleta: Navy + Amarillo (paleta original real del sitio)
   Tipografía: Open Sans
   ========================================================================= */

:root {
    --brand-navy:        #001758;   /* azul corporativo profundo */
    --brand-navy-dark:   #000d3a;
    --brand-blue:        #2d8cff;   /* azul más claro (acento del logo) */
    --brand-blue-bright: #5aa9ff;
    --brand-bg-soft:     #f4f6f9;
    --brand-text:        #2a2a2a;
    --brand-muted:       #6c757d;
    --brand-white:       #ffffff;
    --transition:        all .25s ease;
    --radius:            8px;
    --shadow-sm:         0 2px 8px rgba(0,0,0,.06);
    --shadow-md:         0 8px 24px rgba(0,0,0,.10);
    --shadow-lg:         0 16px 40px rgba(0,0,0,.14);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--brand-text);
    background: var(--brand-white);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto', sans-serif;
    color: var(--brand-navy);
    letter-spacing: -.01em;
    font-weight: 700;
}

a { color: var(--brand-blue); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--brand-blue-bright); }

img { max-width: 100%; height: auto; }

main { padding-top: 0; }

/* =========================================================================
   Navbar — transparente sobre el hero, sólido al hacer scroll
   ========================================================================= */
.site-navbar {
    background: transparent;
    box-shadow: none;
    transition: var(--transition);
    padding: 1rem 1rem;
}
.site-navbar.scrolled {
    background: rgba(255,255,255,.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    padding: .5rem 1rem;
}
.site-navbar .navbar-brand img {
    transition: var(--transition);
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.35));
}
.site-navbar.scrolled .navbar-brand img {
    height: 40px;
    /* Convierte el logo blanco a navy (#001758) cuando el navbar es sólido */
    filter: brightness(0) saturate(100%) invert(7%) sepia(89%) saturate(4538%) hue-rotate(229deg) brightness(86%) contrast(122%);
}

.site-navbar .nav-link {
    font-weight: 600;
    color: #fff !important;
    padding: .5rem 1rem !important;
    position: relative;
    text-transform: uppercase;
    font-size: .82rem;
    letter-spacing: .04em;
    text-shadow: 0 1px 8px rgba(0,0,0,.45);
}
.site-navbar.scrolled .nav-link { color: var(--brand-navy) !important; text-shadow: none; }
.site-navbar .nav-link::after {
    content: '';
    position: absolute;
    left: 1rem; right: 1rem; bottom: .35rem;
    height: 2px;
    background: var(--brand-blue);
    transform: scaleX(0);
    transition: transform .25s ease;
}
.site-navbar .nav-link:hover::after { transform: scaleX(1); }

.btn-lang {
    background: rgba(255,255,255,.18);
    color: #fff !important;
    border: 1px solid rgba(255,255,255,.55);
    border-radius: 50px;
    padding: .5rem 1.2rem;
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 600;
    transition: var(--transition);
}
.btn-lang:hover { background: #fff; color: var(--brand-navy) !important; border-color: #fff; }
.site-navbar.scrolled .btn-lang { background: var(--brand-navy); border-color: var(--brand-navy); color: #fff !important; }
.site-navbar.scrolled .btn-lang:hover { background: var(--brand-blue); border-color: var(--brand-blue); }

.navbar-toggler { border: none; color: #fff; font-size: 1.4rem; text-shadow: 0 1px 4px rgba(0,0,0,.4); }
.site-navbar.scrolled .navbar-toggler { color: var(--brand-navy); text-shadow: none; }
.navbar-toggler:focus { box-shadow: none; }

/* =========================================================================
   Hero slider
   ========================================================================= */
.hero { position: relative; margin-top: 0; }
.hero-swiper {
    width: 100%;
    height: 100vh;          /* fallback */
    height: 100dvh;         /* adapta a barra de URL móvil */
    min-height: 520px;
}
.hero-swiper .swiper-slide { position: relative; overflow: hidden; background: var(--brand-navy-dark); }
.hero-swiper .swiper-slide img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover; object-position: center center;
}
.hero-overlay {
    position: absolute; inset: 0;
    background:
        linear-gradient(180deg, rgba(0,13,58,.35) 0%, rgba(0,13,58,.55) 60%, rgba(0,13,58,.75) 100%);
    display: flex; align-items: center; justify-content: center;
    padding-top: 80px;            /* deja respirar bajo el navbar fijo */
}
.hero-content {
    color: #fff; text-align: center;
    padding: 0 1.5rem; max-width: 960px;
}
.hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: .28em;
    font-size: .8rem;
    color: var(--brand-blue);
    margin-bottom: 1.25rem;
    font-weight: 700;
}
.hero-title {
    color: #fff;
    font-size: clamp(2.4rem, 5.6vw, 5rem);
    line-height: 1.08;
    margin-bottom: 1.35rem;
    text-shadow: 0 3px 22px rgba(0,0,0,.45);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .015em;
}
.hero-caption {
    font-size: 1rem;
    max-width: 780px;
    margin: 0 auto;
    opacity: .92;
    line-height: 1.65;
}

/* Controles del swiper */
.hero-swiper .swiper-button-prev,
.hero-swiper .swiper-button-next {
    color: #fff;
    background: rgba(0,0,0,.30);
    width: 44px; height: 44px;
    border-radius: 50%;
    transition: var(--transition);
    top: 60%;
}
.hero-swiper .swiper-button-prev:hover,
.hero-swiper .swiper-button-next:hover { background: var(--brand-blue); color: var(--brand-navy); }
.hero-swiper .swiper-button-prev::after,
.hero-swiper .swiper-button-next::after { font-size: 1rem; font-weight: 700; }
.hero-swiper .swiper-pagination { bottom: 1.5rem; }
.hero-swiper .swiper-pagination-bullet { background: #fff; opacity: .55; width: 10px; height: 10px; }
.hero-swiper .swiper-pagination-bullet-active { background: var(--brand-blue); opacity: 1; }

/* =========================================================================
   Sections
   ========================================================================= */
.section { padding: 5rem 0; }
.section-title {
    font-size: clamp(1.7rem, 2.6vw, 2.4rem);
    margin-bottom: .5rem;
    font-weight: 700;
}
.title-rule {
    width: 60px;
    height: 3px;
    background: var(--brand-blue);
    margin: 0 0 1.5rem;
    border-radius: 2px;
}
.mx-auto.title-rule { margin-left: auto; margin-right: auto; }
.section-body { font-size: 1rem; line-height: 1.75; color: #4a4a4a; }
.section-lead { font-size: 1.05rem; color: var(--brand-muted); max-width: 760px; margin: 0 auto; }

/* =========================================================================
   Areas — icon cards on soft gray
   ========================================================================= */
.areas-section { background: var(--brand-bg-soft); padding: 4.5rem 0; }
.area-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fff;
    border: 1px solid #e9edf2;
    border-radius: var(--radius);
    padding: 1.75rem 1rem;
    height: 100%;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.area-card::before {
    content: '';
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 3px;
    background: var(--brand-blue);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .35s ease;
}
.area-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}
.area-card:hover::before { transform: scaleX(1); }
.area-card-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: rgba(0, 23, 88, .06);
    display: flex; align-items: center; justify-content: center;
    color: var(--brand-navy);
    font-size: 1.6rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}
.area-card:hover .area-card-icon { background: var(--brand-navy); color: #fff; transform: scale(1.06); }
.area-card-title {
    font-size: .92rem;
    font-weight: 700;
    color: var(--brand-navy);
    text-transform: uppercase;
    letter-spacing: .03em;
    margin: 0 0 .55rem;
    line-height: 1.25;
}
.area-card-text {
    font-size: .82rem;
    color: var(--brand-muted);
    line-height: 1.5;
    margin: 0;
}

/* =========================================================================
   About + Value cards (Misión / Visión)
   ========================================================================= */
.section-about { background: var(--brand-white); }

.value-card {
    position: relative;
    height: 100%;
    background: var(--brand-bg-soft);
    border-radius: var(--radius);
    padding: 2rem 1.75rem 1.85rem;
    border-top: 3px solid var(--brand-blue);
    transition: var(--transition);
}
.value-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
}
.value-card:hover { transform: translateY(-4px); background: #fff; }
.value-card:hover::after { opacity: 1; }

.value-card-icon {
    width: 54px; height: 54px;
    border-radius: 50%;
    background: var(--brand-navy);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 1.1rem;
    transition: var(--transition);
}
.value-card:hover .value-card-icon { background: var(--brand-blue); color: var(--brand-navy); transform: scale(1.05); }

.value-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--brand-navy);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin: 0 0 .85rem;
    line-height: 1.25;
}
.value-card-text {
    font-size: .92rem;
    line-height: 1.65;
    color: var(--brand-muted);
    margin: 0;
}

/* =========================================================================
   Mission banner
   ========================================================================= */
.mission-banner {
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-dark) 100%);
    padding: 4rem 0;
}
.banner-text {
    color: #fff;
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    font-weight: 600;
    line-height: 1.5;
    max-width: 1000px;
    margin: 0 auto;
}
.banner-text em { color: var(--brand-blue); font-style: normal; font-weight: 700; }

/* =========================================================================
   Services
   ========================================================================= */
.section-services { background: var(--brand-bg-soft); }
.service-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    height: 100%;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.service-card-media { overflow: hidden; aspect-ratio: 16 / 10; }
.service-card-media img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}
.service-card:hover .service-card-media img { transform: scale(1.05); }
.service-card-body { padding: 1.75rem; flex: 1; display: flex; flex-direction: column; }
.service-card-title {
    font-size: 1.25rem;
    margin-bottom: .85rem;
    color: var(--brand-navy);
}
.service-card-text { color: var(--brand-muted); flex: 1; margin-bottom: 1.25rem; }
.btn-brand {
    background: var(--brand-navy);
    color: #fff;
    border: 2px solid var(--brand-navy);
    border-radius: 50px;
    padding: .65rem 1.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: .82rem;
    transition: var(--transition);
}
.btn-brand:hover { background: var(--brand-blue); border-color: var(--brand-blue); color: var(--brand-navy); transform: translateY(-2px); }
.btn-outline-brand {
    background: transparent;
    color: var(--brand-navy);
    border: 2px solid var(--brand-navy);
    border-radius: 50px;
    padding: .55rem 1.25rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: .78rem;
    align-self: flex-start;
    transition: var(--transition);
}
.btn-outline-brand:hover { background: var(--brand-navy); color: #fff; }

/* =========================================================================
   Why us
   ========================================================================= */
.section-why { background: var(--brand-white); }
.why-item { display: flex; gap: 1.25rem; align-items: flex-start; padding: 1rem 0; }
.why-item-icon {
    flex: 0 0 80px;
    width: 80px; height: 80px;
    border-radius: 50%;
    background: var(--brand-bg-soft);
    display: flex; align-items: center; justify-content: center;
}
.why-item-icon img { width: 48px; height: 48px; object-fit: contain; }
.why-item-title {
    font-size: 1rem;
    color: var(--brand-navy);
    margin-bottom: .35rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    font-weight: 700;
}
.why-item-text { color: var(--brand-muted); }

/* =========================================================================
   Gallery
   ========================================================================= */
.section-gallery { background: var(--brand-bg-soft); }
.gallery-grid .gallery-item {
    display: block;
    overflow: hidden;
    border-radius: 6px;
    aspect-ratio: 4 / 3;
}
.gallery-grid img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .5s ease, filter .3s ease;
}
.gallery-grid .gallery-item:hover img { transform: scale(1.08); filter: brightness(1.1); }

/* =========================================================================
   Clients
   ========================================================================= */
.section-clients { background: var(--brand-white); }
.client-logo {
    max-height: 90px;
    width: auto;
    filter: grayscale(60%);
    opacity: .75;
    transition: var(--transition);
}
.client-logo:hover { filter: grayscale(0%); opacity: 1; }

/* =========================================================================
   Contact
   ========================================================================= */
.section-contact { background: #fff; }
.contact-grid {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.contact-form-wrap { background: var(--brand-bg-soft); padding: 2.5rem; height: 100%; }
.contact-form-wrap .form-control { background: #fff; }
.contact-aside {
    background: linear-gradient(160deg, var(--brand-navy) 0%, var(--brand-navy-dark) 100%);
    color: #fff;
    padding: 2.5rem;
    height: 100%;
}
.aside-title { color: #fff; font-size: 1.35rem; margin-bottom: 1.5rem; font-weight: 600; }
.aside-subtitle { color: var(--brand-blue); text-transform: uppercase; letter-spacing: .1em; font-size: .85rem; margin-top: 2rem; margin-bottom: 1rem; font-weight: 700; }
.aside-list { list-style: none; padding: 0; margin: 0; }
.aside-list li { padding: .65rem 0; display: flex; gap: .85rem; align-items: flex-start; line-height: 1.6; }
.aside-list i { color: var(--brand-blue); margin-top: .25rem; min-width: 18px; }
.aside-list a { color: #fff; text-decoration: underline; }

.social-row { display: flex; gap: .85rem; }
.social-row a {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.social-row a:hover { background: var(--brand-blue); color: var(--brand-navy); transform: translateY(-2px); }

.form-label { font-weight: 600; color: var(--brand-navy); font-size: .9rem; margin-bottom: .35rem; }
.form-control {
    border-radius: 6px;
    border: 1px solid #dee2e6;
    padding: .65rem .9rem;
    font-size: .95rem;
    transition: var(--transition);
}
.form-control:focus { border-color: var(--brand-blue); box-shadow: 0 0 0 .2rem rgba(0,93,180,.15); }

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer {
    background: var(--brand-navy-dark);
    color: #c5d0dc;
    padding: 3.5rem 0 1.5rem;
}
.footer-logo { max-height: 70px; }
.footer-address { color: #c5d0dc; font-size: .9rem; line-height: 1.7; font-style: normal; }
.footer-title {
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .82rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { padding: .3rem 0; }
.footer-links a { color: #c5d0dc; font-size: .9rem; }
.footer-links a:hover { color: var(--brand-blue); }

.footer-divider { border-color: rgba(255,255,255,.1); margin: 2.5rem 0 1.25rem; }
.footer-copy { text-align: center; color: #8a98a7; font-size: .85rem; margin: 0; line-height: 1.4; }
.footer-credit { color: #6b7888; margin-left: .35rem; white-space: nowrap; }
.footer-credit a { color: var(--brand-blue); font-weight: 500; }
.footer-credit a:hover { color: var(--brand-blue-bright); }

.site-footer .social-row a { background: rgba(255,255,255,.08); }
.site-footer .social-row a:hover { background: var(--brand-blue); color: var(--brand-navy); }

/* =========================================================================
   Scroll-to-top
   ========================================================================= */
.scroll-top {
    position: fixed;
    right: 1.25rem; bottom: 1.25rem;
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--brand-navy);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    z-index: 999;
    box-shadow: var(--shadow-md);
    text-decoration: none;
}
.scroll-top.visible { opacity: 1; pointer-events: auto; }
.scroll-top:hover { background: var(--brand-blue); color: var(--brand-navy); transform: translateY(-3px); }

/* =========================================================================
   WhatsApp floating button
   ========================================================================= */
.whatsapp-float {
    position: fixed;
    right: 1.25rem; bottom: 5rem;
    background: #25D366;
    color: #fff;
    height: 56px;
    border-radius: 28px;
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: 0 .8rem 0 1rem;
    box-shadow: 0 6px 20px rgba(37,211,102,.45);
    text-decoration: none;
    z-index: 999;
    transition: var(--transition);
    overflow: hidden;
    max-width: 56px;
}
.whatsapp-float i { font-size: 1.85rem; line-height: 1; flex-shrink: 0; }
.whatsapp-float .whatsapp-label {
    font-weight: 600;
    font-size: .92rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity .2s ease .05s;
}
.whatsapp-float:hover {
    color: #fff;
    background: #1ebe5d;
    max-width: 260px;
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(37,211,102,.55);
}
.whatsapp-float:hover .whatsapp-label { opacity: 1; }
@media (max-width: 575.98px) {
    .whatsapp-float { bottom: 4.5rem; }
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 991.98px) {
    main { padding-top: 0; }
    .hero-swiper { height: 100svh; min-height: 460px; }
    .section { padding: 3.5rem 0; }
    .site-navbar .nav-link::after { display: none; }

    /* En móvil mantenemos el navbar con tamaño constante para evitar el "corte"
       al hacer scroll cuando pasa al estado .scrolled */
    .site-navbar,
    .site-navbar.scrolled {
        padding: .65rem 1rem;
    }
    .site-navbar .navbar-brand img,
    .site-navbar.scrolled .navbar-brand img {
        height: 44px;
    }

    .site-navbar .navbar-collapse {
        background: rgba(255,255,255,.98);
        backdrop-filter: blur(10px);
        padding: 1rem;
        margin-top: .75rem;
        border-radius: var(--radius);
        box-shadow: var(--shadow-md);
    }
    .site-navbar .navbar-collapse .nav-link {
        color: var(--brand-navy) !important;
        text-shadow: none;
    }
    .contact-form-wrap, .contact-aside { padding: 1.75rem; }
}
@media (max-width: 575.98px) {
    .hero-swiper { height: 100svh; min-height: 420px; }
    .hero-swiper .swiper-button-prev,
    .hero-swiper .swiper-button-next { display: none; }
    .footer-copy { font-size: .72rem; }
}
