:root{
    --fondo-principal:#0b1118;
    --fondo-secundario:#101925;
    --fondo-card:#16202d;
    --fondo-card-hover:#1b2838;
    --rojo:#d62828;
    --rojo-hover:#b91c1c;
    --gris:#aeb8c5;
    --gris-claro:#e5e7eb;
    --blanco:#ffffff;
    --borde:rgba(255,255,255,0.08);
    --sombra:0 10px 35px rgba(0,0,0,0.30);
    --verde-whatsapp-1:#25d366;
    --verde-whatsapp-2:#128c7e;
}

html{
    scroll-behavior:smooth;
}

body{
    margin:0;
    background:var(--fondo-principal);
    color:var(--gris-claro);
    font-family:'Segoe UI', Arial, sans-serif;
    overflow-x:hidden;
}

a{
    text-decoration:none;
}

img{
    max-width:100%;
    display:block;
}

/* NAVBAR */
.navbar{
    background:black;
    backdrop-filter:blur(10px);
    border-bottom:1px solid rgba(255,255,255,0.06);
    transition:all .3s ease;
}

.navbar.scrolled{
    background:black;
    box-shadow:0 8px 24px rgba(0,0,0,0.28);
}

.logo-navbar{
    width:42px;
    height:auto;
    object-fit:contain;
}

.navbar-brand{
    font-weight:700;
    letter-spacing:1px;
    color:var(--blanco)!important;
}

.nav-link{
    color:rgba(255,255,255,0.85)!important;
    font-weight:500;
    transition:.3s ease;
}

.nav-link:hover{
    color:var(--rojo)!important;
}

.btn-whatsapp-nav{
    background:linear-gradient(135deg, var(--verde-whatsapp-1), var(--verde-whatsapp-2));
    border:none;
    color:#fff;
    padding:10px 15px;
    border-radius:999px;
    font-weight:600;
    box-shadow:0 8px 24px rgba(18,140,126,0.28);
    transition:.3s ease;
}

.btn-whatsapp-nav:hover{
    color:#fff;
    transform:translateY(-2px);
    box-shadow:0 10px 28px rgba(18,140,126,0.35);
}

/* HERO */
.hero{
    position:relative;
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    background:url('../img/hero.png') center center / cover no-repeat;
    padding:140px 0 100px;
    overflow:hidden;
}

.hero-overlay{
    position:absolute;
    inset:0;
    background:
        linear-gradient(180deg, rgba(8,12,18,0.60) 0%, rgba(8,12,18,0.62) 55%, rgba(8,12,18,0.3) 100%);
}

.hero-box{
    position:relative;
    z-index:2;
    animation:fadeHeroUp 1s ease;
}

.hero-tag{
    display:inline-block;
    margin-bottom:18px;
    padding:10px 18px;
    border:1px solid rgba(255,255,255,0.12);
    border-radius:999px;
    background:rgba(255,255,255,0.05);
    color:var(--gris-claro);
    font-size:14px;
    letter-spacing:.5px;
    text-transform:uppercase;
}

.hero h1{
    font-size:clamp(3rem, 8vw, 6rem);
    line-height:1;
    margin-bottom:18px;
    color:var(--blanco);
    font-weight:800;
    letter-spacing:2px;
    text-shadow:0 10px 30px rgba(0,0,0,0.30);
}

.hero-subtitulo{
    max-width:780px;
    margin:0 auto 30px;
    font-size:1.1rem;
    line-height:1.8;
    color:var(--gris);
}

.hero-botones{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:14px;
}

/* BOTONES */
.btn-principal,
.btn-secundario{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:14px 26px;
    border-radius:999px;
    font-weight:700;
    transition:all .3s ease;
}

.btn-principal{
    background:linear-gradient(135deg, var(--rojo), #a31515);
    color:#fff;
    box-shadow:0 12px 30px rgba(214,40,40,0.30);
}

.btn-principal:hover{
    color:#fff;
    transform:translateY(-2px);
    background:linear-gradient(135deg, #e53939, var(--rojo-hover));
    box-shadow:0 14px 32px rgba(214,40,40,0.38);
}

.btn-secundario{
    border:1px solid rgba(255,255,255,0.16);
    background:rgba(255,255,255,0.05);
    color:#fff;
}

.btn-secundario:hover{
    color:#fff;
    transform:translateY(-2px);
    background:rgba(255,255,255,0.09);
}

/* SECCIONES */
.seccion{
    padding:100px 0;
    position:relative;
}

.seccion-oscura{
    background:linear-gradient(180deg, var(--fondo-secundario), #0d151f);
}

.etiqueta-seccion{
    display:inline-block;
    margin-bottom:14px;
    color:#fff;
    background:rgba(214,40,40,0.14);
    border:1px solid rgba(214,40,40,0.28);
    border-radius:999px;
    padding:8px 16px;
    font-size:13px;
    font-weight:700;
    letter-spacing:.5px;
    text-transform:uppercase;
}

.seccion-titulo{
    margin-bottom:40px;
}

.seccion-titulo h2{
    color:#fff;
    font-size:clamp(2rem, 4vw, 3rem);
    font-weight:800;
    margin-bottom:12px;
}

.subtexto-seccion{
    color:var(--gris);
    max-width:760px;
    margin:0 auto;
    line-height:1.8;
}

.texto-seccion{
    color:var(--gris);
    line-height:1.9;
    font-size:1rem;
}

.imagen-nosotros{
    border-radius:26px;
    overflow:hidden;
    box-shadow:var(--sombra);
    border:1px solid var(--borde);
}

.imagen-nosotros img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.beneficio-item{
    display:flex;
    align-items:center;
    gap:12px;
    background:rgba(255,255,255,0.04);
    border:1px solid var(--borde);
    border-radius:18px;
    padding:16px 18px;
    color:#fff;
    height:100%;
    transition:.3s ease;
}

.beneficio-item:hover{
    transform:translateY(-3px);
    border-color:rgba(214,40,40,0.28);
}

.beneficio-item i{
    color:var(--rojo);
    font-size:1.2rem;
}

/* SERVICIOS */
.servicio-card{
    position:relative;
    height:100%;
    background:linear-gradient(180deg, var(--fondo-card), #111924);
    border:1px solid var(--borde);
    border-radius:22px;
    overflow:hidden;
    box-shadow:var(--sombra);
    transition:all .35s ease;
    cursor:pointer;
}

.servicio-card::before{
    content:'';
    position:absolute;
    inset:0;
    background:linear-gradient(120deg, transparent, rgba(255,255,255,0.08), transparent);
    opacity:0;
    transition:opacity .35s ease;
    pointer-events:none;
    z-index:1;
}

.servicio-card:hover{
    transform:translateY(-8px);
    background:linear-gradient(180deg, var(--fondo-card-hover), #132030);
    border-color:rgba(214,40,40,0.30);
}

.servicio-card:hover::before{
    opacity:1;
}

.servicio-img{
    position:relative;
    overflow:hidden;
}

.servicio-img img{
    width:100%;
    height:240px;
    object-fit:cover;
    transition:transform .5s ease, filter .5s ease;
}

.servicio-card:hover .servicio-img img{
    transform:scale(1.06);
    filter:brightness(1.08);
}

.servicio-badge{
    position:absolute;
    top:14px;
    left:14px;
    background:rgba(214,40,40,0.90);
    color:#fff;
    font-size:12px;
    font-weight:700;
    padding:7px 12px;
    border-radius:999px;
    z-index:2;
}

.servicio-body{
    position:relative;
    z-index:2;
    padding:22px 18px 20px;
}

.servicio-body h5{
    margin-bottom:10px;
    color:#fff;
    font-size:1.05rem;
    font-weight:700;
}

.servicio-body p{
    margin-bottom:14px;
    color:var(--gris);
    font-size:.95rem;
    line-height:1.7;
}

.servicio-link{
    color:#fff;
    font-weight:700;
    font-size:.92rem;
}

.servicio-link i{
    margin-left:6px;
    transition:.3s ease;
}

.servicio-card:hover .servicio-link i{
    transform:translateX(4px);
}

/* PROYECTOS */
.proyecto-card{
    position:relative;
    height:340px;
    min-height:340px;
    border-radius:24px;
    overflow:hidden;
    border:1px solid var(--borde);
    box-shadow:var(--sombra);
    background:#111827;
    transition:all .35s ease;
    cursor:pointer;
    transform-style:preserve-3d;
    perspective:1000px;
}

.proyecto-card:hover{
    transform:translateY(-8px);
    border-color:rgba(214,40,40,0.28);
}

.proyecto-card img{
    width:100%;
    height:100%;
    min-height:340px;
    object-fit:cover;
    transition:transform .5s ease, filter .5s ease;
}

.proyecto-card:hover img{
    transform:scale(1.06);
    filter:brightness(1.05);
}

.proyecto-overlay{
    position:absolute;
    inset:0;
    background:linear-gradient(180deg, rgba(8,12,18,0.08) 20%, rgba(8,12,18,0.90) 100%);
    display:flex;
    align-items:flex-end;
    padding:24px;
}

.proyecto-info h5{
    margin:0 0 6px;
    color:#fff;
    font-size:1.2rem;
    font-weight:800;
}

.proyecto-info p{
    margin:0;
    color:#d5dbe3;
    font-size:.95rem;
}

/* CATALOGO */
.seccion-catalogo{
    background:
        linear-gradient(180deg, rgba(214,40,40,0.10), rgba(214,40,40,0.03)),
        linear-gradient(180deg, #0d141d, #0b1118);
}

.catalogo-box{
    max-width:900px;
    margin:0 auto;
    padding:50px 30px;
    border-radius:28px;
    border:1px solid rgba(255,255,255,0.08);
    background:rgba(255,255,255,0.04);
    box-shadow:var(--sombra);
}

.catalogo-box h2{
    color:#fff;
    font-weight:800;
    margin-bottom:14px;
}

.catalogo-box p{
    color:var(--gris);
    line-height:1.8;
    margin-bottom:24px;
}

/* CONTACTO */
.contacto-box{
    background:linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    border:1px solid var(--borde);
    border-radius:28px;
    padding:55px 30px;
    box-shadow:var(--sombra);
}

.contacto-box h2{
    color:#fff;
    font-weight:800;
    margin-bottom:14px;
}

.contacto-box p{
    color:var(--gris);
    max-width:720px;
    margin:0 auto 26px;
    line-height:1.8;
}

.contacto-botones{
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:14px;
}

/* FOOTER */
.footer{
    background:black;
    border-top:1px solid rgba(255,255,255,0.05);
    padding:28px 0;
}

.footer-contenido{
    text-align:center;
}

.logo-footer{
    width:20%;
    margin:0 auto 12px;
}

.footer p{
    margin:0;
    color:#8e99a7;
    font-size:.95rem;
}

/* MODAL */
.modal-galeria{
    background:#0d141d;
    border:1px solid rgba(255,255,255,0.08);
    border-radius:24px;
}

.modal-galeria .modal-title{
    color:#fff;
    font-weight:700;
}

.modal-galeria .carousel-inner{
    border-radius:18px;
    overflow:hidden;
}

.modal-galeria .carousel-item img{
    width:100%;
    max-height:76vh;
    object-fit:contain;
    background:#0b1118;
}

/* WHATSAPP FLOTANTE */
.btn-whatsapp-flotante{
    position:fixed;
    right:20px;
    bottom:20px;
    width:58px;
    height:58px;
    border-radius:50%;
    background:linear-gradient(135deg, var(--verde-whatsapp-1), var(--verde-whatsapp-2));
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:1.7rem;
    box-shadow:0 15px 30px rgba(18,140,126,0.35);
    z-index:1200;
    transition:.3s ease;
}

.btn-whatsapp-flotante:hover{
    color:#fff;
    transform:translateY(-3px) scale(1.03);
}

/* ANIMACIONES */
.fade-up,
.fade-left,
.fade-right,
.zoom-in,
.reveal{
    opacity:0;
    transition:all .8s ease;
}

.fade-up{
    transform:translateY(40px);
}

.fade-up.active{
    opacity:1;
    transform:translateY(0);
}

.fade-left{
    transform:translateX(-40px);
}

.fade-left.active{
    opacity:1;
    transform:translateX(0);
}

.fade-right{
    transform:translateX(40px);
}

.fade-right.active{
    opacity:1;
    transform:translateX(0);
}

.zoom-in{
    transform:scale(0.9);
}

.zoom-in.active{
    opacity:1;
    transform:scale(1);
}

.reveal{
    transform:translateY(30px);
}

.reveal.active{
    opacity:1;
    transform:translateY(0);
}

@keyframes fadeHeroUp{
    from{
        opacity:0;
        transform:translateY(35px);
    }
    to{
        opacity:1;
        transform:translateY(0);
    }
}

/* RESPONSIVE */
@media (max-width: 991.98px){
    .hero{
        padding-top:120px;
        background-attachment:scroll !important;
    }

    .navbar-collapse{
        background:rgba(8,12,18,0.96);
        padding:18px;
        border-radius:16px;
        margin-top:12px;
        border:1px solid rgba(255,255,255,0.06);
    }
}

@media (max-width: 767.98px){
    .seccion{
        padding:80px 0;
    }

    .hero{
        min-height:92vh;
    }

    .hero-subtitulo{
        font-size:1rem;
    }

    .servicio-img img{
        height:210px;
    }

    .proyecto-card,
    .proyecto-card img{
        min-height:280px;
    }

    .catalogo-box,
    .contacto-box{
        padding:38px 20px;
    }

    .btn-principal,
    .btn-secundario{
        width:100%;
    }

    .hero-botones,
    .contacto-botones{
        flex-direction:column;
    }
}

.hero-logo img{
    width:220px;
    max-width:85%;
    margin-bottom:25px;
    filter:
        drop-shadow(0 15px 40px rgba(0,0,0,0.6))
        drop-shadow(0 0 20px rgba(214,40,40,0.2));
    transition:0.3s;
}

.hero-logo img:hover{
    transform:scale(1.05);
}

.hero-logo{
    display:flex;
    justify-content:center;
    align-items:center;
    margin-bottom:10px;
}

.hero-logo img{
    width:100%;
    max-width:85%;
    margin:0 auto;
    filter:
        drop-shadow(0 15px 40px rgba(0,0,0,0.6))
        drop-shadow(0 0 20px rgba(214,40,40,0.2));
}

/* HERO layout desktop */
@media (min-width: 992px){

    .hero-box{
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:40px;
    }

    .hero-texto{
        text-align:center;
    }

    .hero-logo{
        display:flex;
        justify-content:flex-end;
    }
}

/* HERO móvil */
@media (max-width: 991px){

    .hero-box{
        flex-direction:column;
    }

    .hero-logo{
        order:-1; /* logo arriba */
        margin-bottom:20px;
        justify-content:center;
    }
}
.contador-galeria {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.6);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    color: #fff;
    backdrop-filter: blur(6px);
}

.servicio-card {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
    will-change: transform;
    perspective: 1000px;
}

.clientes-slider {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.clientes-track {
    display: flex;
    gap: 40px;
    animation: scrollClientes 25s linear infinite;
}

.cliente-logo-box {
    min-width: 180px;
    transition: transform 0.3s ease;
}

.cliente-logo-box:hover {
    transform: scale(1.1);
}

@keyframes scrollClientes {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* BOTONES TOGGLE */
.btn-group-custom {
    display: inline-flex;
    background: rgba(255,255,255,0.05);
    border-radius: 30px;
    padding: 5px;
}

.btn-toggle {
    border: none;
    padding: 10px 18px;
    border-radius: 25px;
    background: transparent;
    color: #fff;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-toggle.active {
    background: #e50914; /* rojo */
    color: #fff;
}

.btn-toggle:hover {
    background: rgba(255,255,255,0.1);
}

/* GRID CLIENTES */
#vistaGrid .cliente-logo-box {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}



.card-visual {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
}

.card-visual img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card-visual:hover img {
    transform: scale(1.1);
}

/* Overlay */
.card-visual .overlay {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff;
    font-weight: 600;
    text-align: center;
    transition: 0.3s;
}