/* ============================================================
   MONSEVAS Ingenieros S.A. — estilos del sitio
   Paleta: azul marino (#0a2540 / #00304b) + teal (#0fa3b1)
   Tipografía: Figtree
   ============================================================ */

:root {
    --navy-900: #071b30;
    --navy-800: #0a2540;
    --navy-700: #0f3054;
    --navy-600: #16395f;
    --logo-blue: #00304b;
    --teal-500: #0fa3b1;
    --teal-600: #0b8592;
    --teal-700: #096b76;
    --teal-soft: rgba(15, 163, 177, 0.12);
    --sand-100: #f6f8fa;
    --sand-200: #eef2f6;
    --ink-900: #14212e;
    --border: #e3e9ef;
    --radius-lg: 20px;
    --shadow-sm: 0 2px 10px rgba(10, 37, 64, 0.06);
    --shadow-md: 0 10px 30px rgba(10, 37, 64, 0.10);
    --shadow-lg: 0 20px 50px rgba(10, 37, 64, 0.16);
}

/* ── Base ─────────────────────────────────────────────────── */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 78px;
}

body {
    font-family: 'Figtree', system-ui, -apple-system, sans-serif;
    color: var(--ink-900);
    overflow-x: clip;
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.4px;
}

a {
    text-decoration: none;
}

::selection {
    background: var(--teal-500);
    color: #fff;
}

/* Botón teal principal */
.btn-teal {
    --bs-btn-bg: var(--teal-500);
    --bs-btn-border-color: var(--teal-500);
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: var(--teal-600);
    --bs-btn-hover-border-color: var(--teal-600);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--teal-700);
    --bs-btn-active-border-color: var(--teal-700);
    --bs-btn-active-color: #fff;
    --bs-btn-disabled-bg: var(--teal-500);
    --bs-btn-disabled-border-color: var(--teal-500);
    --bs-btn-disabled-color: #fff;
    border-radius: 999px;
    font-weight: 600;
}

.text-teal-subtle {
    color: var(--teal-700) !important;
    background-color: var(--teal-soft);
}

.text-bg-teal {
    color: #fff !important;
    background-color: var(--teal-500);
}

/* ── Barra de progreso de lectura ─────────────────────────── */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--teal-500), #35c3d0);
    z-index: 2000;
    transition: width 80ms linear;
}

/* ── Accesibilidad: saltar al contenido ───────────────────── */
.skip-link {
    position: absolute;
    left: -999px;
    top: 8px;
    z-index: 2100;
    background: var(--navy-800);
    color: #fff;
    padding: .6rem 1.2rem;
    border-radius: 8px;
}

.skip-link:focus {
    left: 8px;
}

/* ── Navbar ───────────────────────────────────────────────── */
.site-header {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    transition: box-shadow .25s ease;
}

.site-header.nav-scrolled {
    box-shadow: 0 4px 24px rgba(10, 37, 64, 0.12);
}

.navbar-brand img {
    height: 44px;
    width: auto;
}

.navbar-nav .nav-link {
    color: var(--navy-800);
    font-weight: 500;
    font-size: .95rem;
    padding: .5rem .75rem !important;
    border-radius: 8px;
    transition: color .2s ease, background-color .2s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--teal-600);
    background: var(--teal-soft);
}

.navbar-nav .nav-link.active {
    color: var(--teal-600);
    background: var(--teal-soft);
    font-weight: 700;
}

/* ── HERO: slider ─────────────────────────────────────────── */
.hero {
    position: relative;
    background: var(--navy-900);
}

.hero-carousel,
.hero-carousel .carousel-item {
    height: min(72vh, 660px);
    min-height: 480px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    animation: kenburns 9s ease-out forwards;
}

@keyframes kenburns {
    from { transform: scale(1); }
    to   { transform: scale(1.07); }
}

.carousel-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(100deg, rgba(7, 27, 48, 0.92) 0%, rgba(7, 27, 48, 0.72) 45%, rgba(10, 37, 64, 0.35) 100%),
        linear-gradient(to top, rgba(7, 27, 48, 0.9), transparent 40%);
    z-index: 1;
}

.hero-caption {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    color: #fff;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: .45rem 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 1.4rem;
}

.hero-title {
    font-size: clamp(2.1rem, 5vw, 3.6rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.2rem;
    text-wrap: balance;
}

.hero-text {
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    color: rgba(255, 255, 255, 0.88);
    max-width: 34rem;
    margin-bottom: 2rem;
}

.hero .carousel-indicators {
    z-index: 3;
    margin-bottom: 1.2rem;
}

.hero .carousel-indicators [data-bs-target] {
    width: 34px;
    height: 4px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.45);
    border: 0;
}

.hero .carousel-indicators .active {
    background-color: #35c3d0;
}

.hero .carousel-control-prev,
.hero .carousel-control-next {
    z-index: 3;
    width: 6%;
    opacity: 0;
    transition: opacity .25s ease;
}

.hero:hover .carousel-control-prev,
.hero:hover .carousel-control-next {
    opacity: .9;
}

/* Animación suave del texto en cada diapositiva */
.hero-carousel .carousel-item.active .hero-caption > .row {
    animation: heroIn .9s ease both;
}

@keyframes heroIn {
    from { opacity: 0; transform: translateY(26px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Franja bajo el hero */
.hero-ribbon {
    position: relative;
    z-index: 4;
    background: var(--navy-800);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ribbon-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #fff;
}

.ribbon-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--teal-500), #35c3d0);
    color: #fff;
    font-size: 1.25rem;
    box-shadow: 0 6px 18px rgba(15, 163, 177, 0.35);
}

.ribbon-card strong {
    font-size: 1.02rem;
}

.ribbon-card span:not(.ribbon-icon) {
    color: rgba(255, 255, 255, 0.72);
    font-size: .88rem;
}

/* ── Secciones ────────────────────────────────────────────── */
.section-padding {
    padding: 84px 0;
}

.section-alt {
    background:
        radial-gradient(circle at 100% 0%, rgba(15, 163, 177, 0.05), transparent 45%),
        var(--sand-100);
}

.section-header {
    max-width: 760px;
    margin: 0 auto 56px;
    text-align: center;
}

.eyebrow {
    color: var(--teal-600);
    font-weight: 700;
    font-size: .85rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: .6rem;
}

.section-title {
    font-weight: 800;
    font-size: clamp(1.7rem, 3.4vw, 2.4rem);
    color: var(--navy-800);
    margin-bottom: 1rem;
    text-wrap: balance;
}

.section-subtitle {
    color: #5a6b7c;
    font-size: 1.05rem;
    margin-bottom: 0;
}

/* ── Valores: tarjetas ────────────────────────────────────── */
.feature-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.8rem 1.6rem;
    box-shadow: var(--shadow-sm);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(15, 163, 177, 0.4);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: var(--teal-soft);
    color: var(--teal-600);
    font-size: 1.3rem;
    margin-bottom: 1.1rem;
}

/* ── Servicios ────────────────────────────────────────────── */
.service-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .25s ease, box-shadow .25s ease;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    color: inherit;
}

.service-thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--sand-200);
}

.service-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.service-card:hover .service-thumb img {
    transform: scale(1.06);
}

.service-icon {
    position: absolute;
    right: 12px;
    bottom: -20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--navy-700), var(--navy-600));
    color: #fff;
    font-size: 1.05rem;
    box-shadow: 0 8px 18px rgba(10, 37, 64, 0.3);
}

.service-body {
    display: flex;
    flex-direction: column;
    gap: .8rem;
    padding: 1.1rem 1.1rem 1.2rem;
}

.btn-link-servicio {
    background: none;
    border: 0;
    padding: 0;
    color: var(--teal-600);
    font-weight: 700;
    font-size: .88rem;
    align-self: flex-start;
    transition: color .2s ease, transform .2s ease;
}

.btn-link-servicio:hover {
    color: var(--teal-700);
    transform: translateX(3px);
}

/* Tarjeta del PDF corporativo */
.service-thumb-pdf {
    background:
        radial-gradient(circle at 80% 20%, rgba(15, 163, 177, 0.16), transparent 55%),
        linear-gradient(135deg, var(--navy-800), var(--navy-600));
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.2rem;
    color: #7fd6de;
}

/* ── Proyectos: filtros + tarjetas ────────────────────────── */
.filter-btn {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--navy-800);
    font-weight: 600;
    font-size: .9rem;
    padding: .55rem 1.25rem;
    border-radius: 999px;
    transition: all .2s ease;
}

.filter-btn:hover {
    border-color: var(--teal-500);
    color: var(--teal-600);
}

.filter-btn.active {
    background: var(--navy-800);
    border-color: var(--navy-800);
    color: #fff;
}

.proyecto-card {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--navy-900);
    box-shadow: var(--shadow-sm);
    cursor: zoom-in;
    aspect-ratio: 4 / 3;
}

.proyecto-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.proyecto-card:hover img {
    transform: scale(1.07);
}

.proyecto-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 1.1rem;
    background: linear-gradient(to top, rgba(7, 27, 48, 0.92) 0%, rgba(7, 27, 48, 0.25) 55%, transparent 100%);
    opacity: 0;
    transition: opacity .3s ease;
    text-align: left;
}

.proyecto-card:hover .proyecto-overlay,
.proyecto-card:focus-visible .proyecto-overlay {
    opacity: 1;
}

.proyecto-info {
    display: block;
    color: #fff;
}

.proyecto-cat {
    display: block;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #7fd6de;
    margin-bottom: .25rem;
}

.proyecto-titulo {
    display: block;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.25;
}

.proyecto-lugar {
    display: block;
    font-size: .82rem;
    color: rgba(255, 255, 255, 0.75);
}

.proyecto-zoom {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(4px);
    color: #fff;
}

/* Filtro: ocultar / mostrar con transición */
.proyecto-item {
    transition: opacity .3s ease, transform .3s ease;
}

.proyecto-item.oculto {
    display: none;
}

/* ── Quiénes somos ────────────────────────────────────────── */
.video-frame {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transform: rotate(-1deg);
}

.video-frame .ratio {
    border-radius: var(--radius-lg);
    background: #000;
}

.stats-row {
    border-top: 1px solid var(--border);
    padding-top: 1.4rem;
}

.stat-box {
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--navy-800);
    line-height: 1;
}

.stat-num::after {
    content: "+";
    color: var(--teal-500);
}

.stat-label {
    font-size: .8rem;
    color: #5a6b7c;
    font-weight: 600;
}

.quality-band {
    background:
        radial-gradient(circle at 0% 50%, rgba(15, 163, 177, 0.14), transparent 50%),
        var(--navy-800);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 2.4rem 2.6rem;
}

.quality-band h3 {
    color: #fff;
}

/* ── Equipo ───────────────────────────────────────────────── */
/* La foto llena la tarjeta y los datos van sobre un degradado */
.team-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--navy-900);
    aspect-ratio: 3 / 4;
    box-shadow: var(--shadow-sm);
    transition: transform .25s ease, box-shadow .25s ease;
}

.team-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.team-photo {
    position: absolute;
    inset: 0;
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.team-card:hover .team-photo img {
    transform: scale(1.06);
}

.team-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2.8rem 1.15rem 1.2rem;
    background: linear-gradient(to top, rgba(7, 27, 48, 0.96) 25%, rgba(7, 27, 48, 0.55) 70%, transparent);
    color: #fff;
    text-align: left;
}

.team-overlay::before {
    content: "";
    display: block;
    width: 34px;
    height: 3px;
    border-radius: 3px;
    background: var(--teal-500);
    margin-bottom: .6rem;
    transition: width .3s ease;
}

.team-card:hover .team-overlay::before {
    width: 56px;
}

.team-overlay h3 {
    color: #fff;
}

.team-role {
    color: #7fd6de;
    font-weight: 600;
    font-size: .85rem;
}

.team-area {
    color: rgba(255, 255, 255, 0.78);
    font-size: .8rem;
}

/* ── Aliados ──────────────────────────────────────────────── */
.aliado-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform .25s ease, box-shadow .25s ease;
}

.aliado-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.aliado-logo {
    height: 84px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.1rem;
}

.aliado-logo img {
    max-height: 72px;
    max-width: 160px;
    width: auto;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
    padding: 6px;
}

/* ── Contacto ─────────────────────────────────────────────── */
.contact-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.2rem;
    box-shadow: var(--shadow-sm);
    height: 100%;
}

.contact-card .form-control {
    border-radius: 12px;
    padding: .7rem 1rem;
    border-color: var(--border);
}

.contact-card .form-control:focus {
    border-color: var(--teal-500);
    box-shadow: 0 0 0 .2rem rgba(15, 163, 177, 0.18);
}

.contact-info-card {
    background:
        radial-gradient(circle at 100% 0%, rgba(15, 163, 177, 0.1), transparent 50%),
        var(--navy-800);
    border-radius: var(--radius-lg);
    padding: 2.2rem;
    color: #fff;
    box-shadow: var(--shadow-md);
}

.contact-info-card a {
    color: #7fd6de;
}

.contact-info-card a:hover {
    color: #b7e9ee;
}

.contact-list {
    display: grid;
    gap: 1.2rem;
}

.contact-list li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.contact-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.1);
    color: #7fd6de;
    font-size: 1rem;
}

.contact-map iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    filter: grayscale(30%) contrast(1.05);
}

/* Honeypot invisible para humanos */
.hp-field {
    position: absolute !important;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
    background: var(--navy-900);
    color: rgba(255, 255, 255, 0.78);
}

/* El logo original es azul marino: se invierte a blanco */
.footer-logo {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: .95;
}

.footer-title {
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    font-size: .82rem;
    letter-spacing: .1em;
    margin-bottom: 1rem;
}

.footer-links li {
    margin-bottom: .55rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.72);
    transition: color .2s ease, padding-left .2s ease;
}

.footer-links a:hover {
    color: #7fd6de;
    padding-left: 4px;
}

.footer-contact li {
    display: flex;
    gap: .8rem;
    margin-bottom: .8rem;
    font-size: .92rem;
}

.footer-contact i {
    color: #7fd6de;
    margin-top: .25rem;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.78);
}

.footer-contact a:hover {
    color: #7fd6de;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: .88rem;
}

.footer-bottom a {
    color: #7fd6de;
}

/* Crédito de desarrollo */
.credito {
    color: rgba(255, 255, 255, 0.55);
    font-size: .84rem;
}

.credito a {
    color: #7fd6de;
    font-weight: 600;
    transition: color .2s ease;
}

.credito a:hover {
    color: #b7e9ee;
}

/* ── Botón volver arriba ──────────────────────────────────── */
.back-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1500;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--teal-500), #35c3d0);
    color: #fff;
    font-size: 1rem;
    box-shadow: 0 10px 24px rgba(15, 163, 177, 0.45);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    color: #fff;
    filter: brightness(1.06);
}

/* ── Modales ──────────────────────────────────────────────── */
.modal-content {
    border: 0;
    border-radius: var(--radius-lg);
}

.posicion-cerrar {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    background: rgba(10, 37, 64, 0.55);
    border-radius: 8px;
    padding: .6rem;
}

/* ── Animaciones de aparición ─────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .6s ease, transform .6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .section-padding {
        padding: 60px 0;
    }

    .hero-carousel,
    .hero-carousel .carousel-item {
        min-height: 450px;
        height: 70vh;
    }

    .hero .carousel-control-prev,
    .hero .carousel-control-next {
        opacity: .9;
    }

    .navbar-brand img {
        height: 38px;
    }

    .quality-band {
        padding: 1.8rem 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .hero-carousel .carousel-item {
        height: 72vh;
        min-height: 440px;
    }

    .ribbon-icon {
        width: 44px;
        height: 44px;
        font-size: 1.05rem;
        border-radius: 12px;
    }

    .contact-card,
    .contact-info-card {
        padding: 1.5rem;
    }

    .stat-num {
        font-size: 1.6rem;
    }
}

/* Respeta la preferencia de menos movimiento */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .hero-slide {
        animation: none;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hero-carousel .carousel-item.active .hero-caption > .row {
        animation: none;
    }
}
