﻿/* =========================================================
   Variables
========================================================= */
:root {
    --bg: #0b1220;
    --bg-soft: #0e1628;
    --card: #121a2d;
    --text: #e5eefc;
    --muted: #a3b1c6;
    --brand: #0ea5e9;
    --brand2: #f97316;
    /* Alturas/ratios responsivos */
    --hero-pad-top: 64px;
    --carousel-aspect: 16/9; /* móvil 16:9, en desktop ajusto abajo */
}

/* =========================================================
   Reset básico
========================================================= */
* {
    box-sizing: border-box
}

html, body {
    height: 100%
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--text);
    background: radial-gradient(1200px 800px at -10% -20%, rgba(14,165,233,.16), transparent 60%), radial-gradient(900px 700px at 120% 10%, rgba(249,115,22,.16), transparent 60%), linear-gradient(180deg, var(--bg), #0a1020 30%, #0a0f1d 100%);
    background-attachment: scroll; /* 🔧 en móvil evita saltos por 'fixed' */
}

/* En desktop reactivamos el fixed para un look más “glass” */
@media (min-width: 900px) {
    body {
        background-attachment: fixed;
    }
}

a {
    color: inherit;
    text-decoration: none
}

img {
    max-width: 100%;
    display: block
}

.container {
    width: min(1180px,92vw);
    margin: 0 auto;
    padding: 0 4px;
}
/* un pelín de padding ayuda en móviles */

/* =========================================================
   Header / Navegación (unificado + móvil first)
========================================================= */
.nav {
    position: sticky;
    top: 0;
    z-index: 60;
    background: #0b1220; /* sólido en móvil para estabilidad */
    border-bottom: 1px solid rgba(255,255,255,.06);
    backdrop-filter: none;
}

@media (min-width:900px) {
    .nav {
        background: rgba(9,14,28,.6);
        backdrop-filter: blur(14px);
    }
}

.nav-inner {
    height: 76px; /* móvil */
    display: flex;
    align-items: center;
    justify-content: space-between;
}

@media (min-width:900px) {
    .nav-inner {
        height: 84px;
    }
}

.brand {
    display: flex;
    align-items: center;
    gap: .8rem
}

    .brand img {
        height: 48px;
        width: 48px;
        border-radius: 12px;
        object-fit: cover;
        border: 1px solid rgba(255,255,255,.1);
        background: #0b1220;
        padding: 2px;
    }

@media (min-width:1100px) {
    .brand img {
        height: 64px;
        width: 64px;
    }
}

.brand .brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05
}

.brand .brand-title {
    font-weight: 800;
    letter-spacing: .1px;
    font-size: 1.02rem;
}

@media (min-width:900px) {
    .brand .brand-title {
        font-size: 1.1rem;
    }
}

/* Menú desktop */
.menu-desktop {
    display: none;
    align-items: center;
    gap: 1.1rem
}

@media (min-width:900px) {
    .menu-desktop {
        display: flex
    }
}

.nav a {
    color: var(--muted)
}

    .nav a:hover {
        color: #fff
    }

/* Botón base */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    border-radius: 12px;
    padding: .85rem 1.1rem;
    border: 1px solid rgba(255,255,255,.14);
    color: var(--text);
    background: rgba(255,255,255,.04);
    transition: transform .12s
}

    .btn:hover {
        transform: translateY(-1px)
    }

    .btn.primary {
        background: var(--brand);
        border-color: transparent;
        color: #fff;
        box-shadow: 0 14px 40px rgba(14,165,233,.28)
    }

/* Hamburguesa */
.nav-toggle {
    display: flex;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 10px;
    background: rgba(255,255,255,.04);
    align-items: center;
    justify-content: center;
    gap: 4px;
}

    .nav-toggle span {
        display: block;
        width: 18px;
        height: 2px;
        background: #fff;
        border-radius: 2px
    }

/* Panel móvil (off-canvas) */
.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    backdrop-filter: saturate(120%) blur(2px);
    z-index: 70;
    display: none;
}

.menu-panel {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100dvh;
    width: min(78vw,340px);
    background: #0b1220;
    border-left: 1px solid rgba(255,255,255,.08);
    box-shadow: -24px 0 60px rgba(0,0,0,.45);
    padding: 18px;
    z-index: 80;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: right .18s ease;
}

    .menu-panel a {
        display: block;
        padding: 12px 10px;
        border-radius: 10px;
        border: 1px solid rgba(255,255,255,.08);
        background: linear-gradient(180deg,rgba(255,255,255,.03),rgba(255,255,255,.02));
        color: #e5eefc
    }

        .menu-panel a:hover {
            background: rgba(255,255,255,.06)
        }

.menu-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #fff
}

/* Estado abierto (lo controla el JS) */
.menu-open .menu-panel {
    right: 0
}

.menu-open .menu-overlay {
    display: block
}

/* =========================================================
   Hero + Grid
========================================================= */
.hero {
    padding: var(--hero-pad-top) 0 26px;
    position: relative;
    overflow: hidden
}

.grid {
    display: grid;
    gap: 22px
}

    /* Móvil columna única */
    .grid.hero {
        grid-template-columns: 1fr;
        align-items: center;
    }

@media (min-width:900px) {
    .grid.hero {
        grid-template-columns: 1.15fr .85fr;
    }
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 999px;
    padding: .45rem .8rem;
    font-size: .8rem;
    background: rgba(255,255,255,.06)
}

.hero h1 {
    font-size: clamp(2.2rem,5vw,4.4rem);
    line-height: 1.05;
    letter-spacing: -.02em;
    margin: .6rem 0
}

.hero p {
    color: var(--muted);
    font-size: 1.02rem;
    max-width: 56ch
}

/* =========================================================
   Section / Titles
========================================================= */
.section {
    padding: 36px 0
}

.title {
    font-size: clamp(1.7rem,3vw,2.3rem);
    margin: 0 0 6px 0
}

.muted {
    color: var(--muted)
}

/* =========================================================
   Card
========================================================= */
.card {
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,.3)
}

/* =========================================================
   Carousel (responsivo: ratio en vez de altura fija)
========================================================= */
.carousel {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    height: 460px; /* más alto que 360px */
    max-height: 100%; /* asegura que escale con el grid */
    background: rgba(255,255,255,.03);
    display: flex;
    align-items: center;
    justify-content: center;
}
}

    .carousel .slides {
        display: flex;
        height: 100%;
        width: 100%;
        transition: transform .6s cubic-bezier(.2,.8,.2,1)
    
    will-change: transform;
}

    .carousel .slide {
        min-width: 100%;
        height: 100%
    
    flex: 0 0 100%;
}

        .carousel .slide img {
            width: 100%;
            height: 100%;
            object-fit: cover; /* llena simétricamente */
        }

    .carousel .nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(0,0,0,.35);
        border: 1px solid rgba(255,255,255,.2);
        color: #fff;
        width: 36px;
        height: 36px;
        border-radius: 999px;
        display: grid;
        place-items: center;
        cursor: pointer
    }

        .carousel .nav:hover {
            background: rgba(0,0,0,.5)
        }

    .carousel .prev {
        left: 10px
    }

    .carousel .next {
        right: 10px
    }

    .carousel .dots {
        position: absolute;
        bottom: 10px;
        left: 0;
        right: 0;
        display: flex;
        justify-content: center;
        gap: 8px
    }

        .carousel .dots button {
            width: 8px;
            height: 8px;
            border-radius: 999px;
            border: 1px solid rgba(255,255,255,.6);
            background: transparent
        }

            .carousel .dots button.active {
                background: #fff;
                border-color: #fff
            }

/* En desktop damos un poco más de alto visual */
@media (min-width:900px) {
    :root {
        --carousel-aspect: 16/7;
    }
}

/* =========================================================
   Grids genéricos
========================================================= */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(260px,1fr));
    gap: 18px;
    margin-top: 22px
}

.grid-2 {
    display: grid;
    gap: 12px
}

@media(min-width:800px) {
    .grid-2 {
        grid-template-columns: 1fr 1fr
    }
}

/* =========================================================
   Reveal (accesible)
========================================================= */
.reveal {
    opacity: 0;
    transform: translateY(14px);
}

    .reveal.in {
        opacity: 1;
        transform: translateY(0);
        transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1);
    }

@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal.in {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* =========================================================
   Listas / tablas
========================================================= */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px
}

    .table tr {
        background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
    }

    .table td {
        padding: 14px;
        border-top: 1px solid rgba(255,255,255,.08);
        border-bottom: 1px solid rgba(255,255,255,.08)
    }

.badgel {
    display: inline-block;
    padding: .25rem .55rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.14);
    color: var(--muted);
    font-size: .78rem
}

/* =========================================================
   Form
========================================================= */
input, textarea {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.14);
    color: var(--text);
    border-radius: 12px;
    padding: 12px 14px;
    outline: none;
    width: 100%
}

    input:focus, textarea:focus {
        border-color: var(--brand);
        box-shadow: 0 0 0 3px rgba(14,165,233,.18)
    }

/* =========================================================
   Clientes (3 logos)
========================================================= */
.logos-3 {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 18px;
    margin-top: 18px
}

@media(max-width:820px) {
    .logos-3 {
        grid-template-columns: 1fr 1fr
    }
}

.logo-card {
    display: grid;
    place-items: center;
    height: 110px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;
    background: linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.02));
    transition: transform .15s ease, opacity .15s ease
}

    .logo-card:hover {
        transform: translateY(-3px)
    }

    .logo-card img, .logo-card svg {
        max-width: 70%;
        max-height: 64px;
        opacity: .9
    }

/* =========================================================
   Qué hacemos (3x2 simétrico con hover)
========================================================= */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 22px
}

@media(max-width:1024px) {
    .icon-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width:640px) {
    .icon-grid {
        grid-template-columns: 1fr;
    }
}

.icon-tile {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 12px;
    align-items: flex-start;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;
    background: linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.02));
    padding: 18px;
    min-height: 128px;
    transition: transform .16s ease, box-shadow .16s ease;
}

    .icon-tile:hover {
        transform: translateY(-3px) scale(1.02);
        box-shadow: 0 18px 50px rgba(0,0,0,.35)
    }

.icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg,var(--brand),var(--brand2));
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

    .icon svg {
        width: 26px;
        height: 26px;
        fill: #fff
    }

.icon-tile strong {
    display: block;
    margin-top: 2px
}

/* =========================================================
   Footer
========================================================= */
.footer {
    margin-top: 22px;
    background: rgba(9,14,28,.6);
    border-top: 1px solid rgba(255,255,255,.08);
}

    .footer .wrap {
        width: min(1180px,92vw);
        margin: 0 auto;
        padding: 42px 0;
        display: grid;
        gap: 28px;
        grid-template-columns: 1.2fr 1fr 1fr 1fr;
    }

@media(max-width:1024px) {
    .footer .wrap {
        grid-template-columns: 1fr 1fr
    }
}

@media(max-width:640px) {
    .footer .wrap {
        grid-template-columns: 1fr
    }
}

.footer h4 {
    margin: 0 0 10px 0;
    font-size: 1.05rem
}

.footer p, .footer a {
    color: var(--muted);
    font-size: .95rem
}

    .footer a:hover {
        color: #fff
    }

.footer .brandline {
    display: flex;
    align-items: center;
    gap: .6rem
}

    .footer .brandline img {
        height: 34px;
        width: 34px;
        border-radius: 8px;
        border: 1px solid rgba(255,255,255,.08);
        background: #0b1220;
        padding: 2px
    }

.footer .list {
    display: grid;
    gap: 8px
}

.footer .socials {
    display: flex;
    gap: 10px;
    margin-top: 8px
}

    .footer .socials a {
        width: 36px;
        height: 36px;
        border-radius: 999px;
        display: grid;
        place-items: center;
        border: 1px solid rgba(255,255,255,.12);
        background: rgba(255,255,255,.04)
    }

.footer .bar {
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 14px 0;
    color: var(--muted);
    font-size: .9rem
}

/* =========================================================
   WhatsApp FAB
========================================================= */
.wa-fab {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 60;
    width: 58px;
    height: 58px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #22c55e;
    color: #fff;
    box-shadow: 0 14px 40px rgba(34,197,94,.35);
    transition: transform .12s ease;
}

    .wa-fab:hover {
        transform: translateY(-2px) scale(1.03)
    }

    .wa-fab svg {
        width: 28px;
        height: 28px;
        fill: #fff
    }

/* Evita que tape el botón de cookies/otros en móviles con barra inferior */
@media (max-width: 640px) {
    .wa-fab {
        bottom: 22px;
        right: 16px;
    }
}
/* === Tarjetas uniformes en "Qué hacemos" === */

/* 1) Igualar alturas en la grilla */
.icon-grid {
    grid-auto-rows: 1fr;
}
    /* Cada celda ocupa la misma altura */
    .icon-grid > a {
        display: block;
        height: 100%;
    }
        /* El <a> rellena la celda */
        .icon-grid > a .icon-tile {
            height: 100%;
        }
/* La tarjeta rellena la celda */

/* 2) Estructura interna consistente */
.icon-tile {
    display: grid;
    grid-template-columns: 52px 1fr;
}

    .icon-tile > div:last-child { /* Contenedor de texto */
        display: flex;
        flex-direction: column;
    }

    /* 3) Reservar espacio fijo para el título */
    .icon-tile strong {
        line-height: 1.3;
        min-height: 2.6em; /* ≈ 2 líneas; asegura uniformidad de la banda del título */
    }

    /* 4) Limitar y alinear la descripción (sin cortar feo) */
    .icon-tile p {
        margin-top: 6px;
        line-height: 1.45;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3; /* 3 líneas */
        overflow: hidden;
        max-height: calc(1.45em * 3); /* fallback para navegadores sin line-clamp */
    }

/* 5) Altura mínima coherente (sube un poco en desktop) */
.icon-tile {
    min-height: 150px;
}

@media (min-width: 900px) {
    .icon-tile {
        min-height: 170px;
    }
}

/* Evitar que cada slide se encoja: 1 slide por vista */
.slide {
    flex: 0 0 100%;
}

/* Perf opcional */
.slides {
    will-change: transform;
}
/* ===== tamaños y padding del bloque de logos ===== */
:root {
    --logo-size: 120px; /* tamaño del círculo en móvil */
    --logo-size-lg: 140px; /* tamaño en desktop */
    --logo-pad: 18px; /* padding interno del recuadro (móvil) */
    --logo-pad-lg: 22px; /* padding interno del recuadro (desktop) */
}

/* Recuadro de cada logo: bordes/“líneas” del fondo */
.logo-card {
    background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.02));
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;
    padding: var(--logo-pad);
    display: grid;
    place-items: center;
    /* Altura mínima para que el círculo quepa sin sobresalir */
    min-height: calc(var(--logo-size) + (var(--logo-pad) * 2));
}

@media (min-width:901px) {
    .logo-card {
        padding: var(--logo-pad-lg);
        min-height: calc(var(--logo-size-lg) + (var(--logo-pad-lg) * 2));
    }
}

/* Círculo del logo */
.logo-wrap {
    position: relative;
    width: var(--logo-size);
    height: var(--logo-size);
    border-radius: 9999px;
    background: #fff; /* blanco por defecto */
    display: grid;
    place-items: center;
    padding: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,.18);
    transition: transform .18s ease, box-shadow .18s ease;
    outline: none;
}

@media (min-width:901px) {
    .logo-wrap {
        width: var(--logo-size-lg);
        height: var(--logo-size-lg);
    }
}

/* Versión negra SOLO para el primero (o cuando se use la clase .dark) */
.logo-wrap.dark {
    background: #0b1220; /* negro/azul muy oscuro del sitio */
    box-shadow: 0 6px 20px rgba(0,0,0,.28);
}

/* Imagen del logo dentro del círculo */
.logo-wrap img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    display: block;
}

/* Hover/focus */
.logo-wrap:hover,
.logo-wrap:focus-visible {
    transform: translateY(-2px) scale(1.02);
}

/* Tooltip (si ya lo tenías, se mantiene igual) */
.logo-wrap::after {
    content: attr(data-name);
    position: absolute;
    left: 50%;
    bottom: -38px;
    transform: translateX(-50%);
    background: rgba(255,255,255,.98);
    color: #0b1220;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,.18);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
}

.logo-wrap::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -6px;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: rgba(255,255,255,.98);
    box-shadow: 2px 2px 6px rgba(0,0,0,.08);
    opacity: 0;
    transition: opacity .18s ease;
}

.logo-wrap:hover::after, .logo-wrap:hover::before,
.logo-wrap:focus-visible::after, .logo-wrap:focus-visible::before {
    opacity: 1;
}

