:root {
    --azul-soal: #004AAD;
    --blanco: #FFFFFF;
    --oscuro: #1A1A1A;
    --font-regular: 400;
    --font-semibold: 600;
    --font-bold: 700;
}

body {
    font-family: 'Montserrat', sans-serif;
    font-weight: var(--font-regular);
    color: var(--oscuro);
    overflow-x: hidden;
    padding-top: 94px;
    /* compensar navbar fijo */
}

@media (max-width: 576px) {
    body {
        padding-top: 78px;
    }
}

.navbar-soal {
    background-color: #001E42;
    padding: 12px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: none;
    transition: box-shadow 0.35s ease, background-color 0.35s ease;
    will-change: box-shadow;
}

/* Sombra al hacer scroll */
.navbar-soal.navbar-scrolled {
    background-color: rgba(0, 15, 40, 0.97);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Hamburger personalizado */
.navbar-toggler {
    border: none;
    background: transparent;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: 2px solid #1F88FF;
    border-radius: 4px;
}

.soal-hamburger-bar {
    display: block;
    width: 26px;
    height: 2px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Nav links */
.soal-nav-link {
    display: block;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
}

.soal-nav-link:hover,
.soal-nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

/* CTA Cotizar */
.soal-nav-link--cta {
    background: #1F88FF;
    color: #ffffff !important;
    border-radius: 20px;
    padding: 8px 20px;
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.soal-nav-link--cta:hover {
    background: #006ae0;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(31, 136, 255, 0.4);
}

/* Mobile collapse */
@media (max-width: 991.98px) {
    #navMenuPrincipal {
        background: #001E42;
        padding: 14px 0 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        margin-top: 8px;
    }

    .soal-nav-link {
        padding: 11px 16px;
        border-radius: 8px;
        font-size: 0.88rem;
    }

    .soal-nav-link--cta {
        margin: 8px 16px 4px;
        text-align: center;
        border-radius: 20px;
    }
}

.logo-navbar {
    height: 70px;
    width: auto;
    display: block;
}

@media (max-width: 576px) {
    .logo-navbar {
        height: 54px;
    }
}

/* ===== HERO CAROUSEL ===== */

/* Contenedor del carousel: estilos de seguridad para hosting */
#heroCarousel {
    position: relative;
    width: 100%;
    overflow: hidden;
}

#heroCarousel .carousel-inner {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* ── Transición Fade suave (override Bootstrap) ── */
#heroCarousel .carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: block !important;
    opacity: 0;
    transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 0;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

#heroCarousel .carousel-item.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
    position: relative;
}

/* ── Efecto Ken Burns: zoom lento en el fondo ── */
@keyframes kenBurns {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.08);
    }
}

#heroCarousel .carousel-item.active .hero-slide {
    animation: kenBurns 8s ease-out forwards;
}

/* ── Animaciones de entrada del contenido ── */
@keyframes heroSlideUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Activa las animaciones sólo en el slide activo */
#heroCarousel .carousel-item.active .hero-title-main {
    animation: heroSlideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

#heroCarousel .carousel-item.active .hero-subtitle-main {
    animation: heroSlideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.28s both;
}

#heroCarousel .carousel-item.active .hero-blue-banner {
    animation: heroSlideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.38s both;
}

#heroCarousel .carousel-item.active .hero-slide-desc {
    animation: heroSlideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.38s both;
}

#heroCarousel .carousel-item.active .hero-phone-block {
    animation: heroSlideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.50s both;
}

#heroCarousel .carousel-item.active .hero-slide-overlay {
    animation: heroFadeIn 0.65s ease 0s both;
}

.hero-slide {
    position: relative;
    height: 70vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-slide-1 {
    background-image: url('../img/plumbing-professional-doing-his-job.jpg');
    background-position: center top;
}

.hero-slide-2 {
    background-image: url('../img/press.jpg');
}

.hero-slide-3 {
    background-image: url('../img/analisis.png');
    background-position: center center;
}

.hero-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(0, 10, 35, 0.72) 0%,
            rgba(0, 30, 66, 0.50) 60%,
            rgba(0, 0, 0, 0.30) 100%);
    z-index: 0;
}

.hero-slide-content {
    position: relative;
    z-index: 1;
    padding-top: 80px;
    padding-bottom: 80px;
}

.hero-slide-desc {
    font-size: 1.1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.6;
    margin-bottom: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Indicadores */
.hero-indicators {
    z-index: 15;
    bottom: 30px;
}

.hero-indicators [data-bs-target] {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.6);
    border: none;
    transition: all 0.3s ease;
    margin: 0 8px;
    cursor: pointer;
}

.hero-indicators [data-bs-target].active {
    background-color: #1F88FF;
    transform: scale(1.3);
}

/* Controles prev/next */
.hero-control {
    width: 48px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.hero-control:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .hero-slide {
        height: 58vh;
    }

    .hero-slide-content {
        padding-top: 50px;
        padding-bottom: 50px;
    }

    .hero-control {
        display: none;
    }
}

.hero-content-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 20px;
}

.hero-title-main {
    font-weight: 800;
    font-style: italic;
    font-size: 28px;
    line-height: 1.1;
    text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.hero-subtitle-main {
    font-weight: 700;
    font-style: italic;
    font-size: 18px;
    text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.hero-blue-banner {
    background-color: #1F88FF;
    padding: 15px 25px;
    border-radius: 0px 45px 45px 0px;
    color: #FFFFFF;
    width: auto;
}

.hero-icon-24h img {
    width: 60px;
    height: auto;
}

.icon-247-colored {
    width: 70px;
    height: 70px;
    background-color: #004AAD;
    -webkit-mask: url('../icons/247.svg') no-repeat center / contain;
    mask: url('../icons/247.svg') no-repeat center / contain;
    flex-shrink: 0;
}

.hero-urgencias-title {
    font-weight: 800;
    font-style: italic;
    font-size: 28px;
    line-height: 1;
    text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.hero-urgencias-region {
    font-weight: 500;
    font-size: 18px;
}

.hero-phone-icon-circle {
    background-color: #ffffff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-phone-icon-circle img {
    width: 50px;
}

.hero-phone-number {
    font-weight: 800;
    font-style: italic;
    font-size: 28px;
    color: #FFFFFF;
    text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

@media (max-width: 991px) {

    .hero-title-main,
    .hero-urgencias-title,
    .hero-phone-number {
        font-size: 22px;
    }

    .hero-subtitle-main,
    .hero-urgencias-region {
        font-size: 15px;
    }

    .hero-blue-banner,
    .hero-content-block {
        width: 100%;
    }
}

.servicios-section {
    background-color: var(--blanco);
    margin-top: -30px;
    position: relative;
    z-index: 10;
}

.servicios-title {
    font-weight: 600;
    font-size: 2.5rem;
    color: #001E42;
    letter-spacing: 1px;
}

.servicio-icon {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.servicio-text {
    font-weight: 400;
    font-size: 0.9rem;
    color: #001E42;
    line-height: 1.2;
}

.servicios-divider {
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00B4FF, transparent);
    border: none;
    opacity: 0.6;
}

.icon-padding-diag {
    padding: 12px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .servicios-title {
        font-size: 1.8rem;
    }

    .servicio-icon {
        height: 60px;
    }

    .servicio-text {
        font-size: 0.75rem;
    }
}

.seccion-comuna .container {
    padding-left: 15%;
    padding-right: 15%;
}

.titulo-comuna {
    font-weight: 700;
    color: #001E42;
    font-size: 32px;
}

.subtitulo-comuna {
    font-weight: 500;
    color: #666;
    font-size: 20px;
    letter-spacing: 1px;
}

.contenedor-icon-247 {
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
    margin-bottom: 15px;
    background-color: #1F88FF;
    -webkit-mask: url('../icons/247.svg') no-repeat center / contain;
    mask: url('../icons/247.svg') no-repeat center / contain;
}

.txt-urgencia-bold {
    font-weight: 800;
    font-style: italic;
    color: #444;
    font-size: 22px;
}

.txt-region-medium {
    font-weight: 500;
    color: #777;
    font-size: 15px;
}

.circulo-telefono-azul {
    width: 65px;
    height: 65px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.img-phone-svg {
    width: 45px;
    height: 45px;
    background-color: #004AAD;
    -webkit-mask: url('../icons/phone.svg') no-repeat center / contain;
    mask: url('../icons/phone.svg') no-repeat center / contain;
    display: inline-block;
}

.numero-telefono-blue {
    font-weight: 800;
    font-style: italic;
    color: #444;
    font-size: 26px;
    line-height: 1;
}

.wrapper-mapa-efecto {
    overflow: hidden;
    padding: 10px;
}

.mapa-interactivo {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    display: block;
    margin: 0 auto;
    width: 100%;
}

.mapa-interactivo:hover {
    transform: scale(1.03);
}

@media (max-width: 991px) {
    .seccion-comuna .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .titulo-comuna,
    .txt-urgencia-bold,
    .numero-telefono-blue {
        font-size: 24px;
    }

    .img-phone-svg {
        width: 40px;
    }
}

.footer-soal {
    background-color: #1F88FF;
}

.footer-title {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.footer-mail-icon {
    width: 80px;
    height: auto;
    filter: brightness(0) invert(1);
}

.footer-email-link a {
    color: #FFFFFF;
    font-weight: 500;
    font-size: 1.4rem;
    text-decoration: underline;
    transition: opacity 0.3s ease;
}

.footer-email-link a:hover {
    opacity: 0.8;
    color: #FFFFFF;
}

@media (max-width: 768px) {
    .footer-title {
        font-size: 1.1rem;
    }

    .footer-email-link a {
        font-size: 1.2rem;
    }

    .footer-mail-icon {
        width: 60px;
    }
}

.btn-whatsapp-fixed,
.btn-call-fixed {
    position: fixed;
    width: 65px;
    height: 65px;
    bottom: 60px;
    right: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease-in-out;
    text-decoration: none;
}

.btn-whatsapp-fixed {
    background-color: #20ba5a;
}

.btn-call-fixed {
    background-color: #E30613;
    display: none;
    /* Oculto en desktop por defecto */
}

.btn-whatsapp-fixed img,
.btn-call-fixed img {
    width: 35px;
    height: auto;
}

/* Eliminado filtro del botón call para conservar su color original */

.btn-whatsapp-fixed:hover,
.btn-call-fixed:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {

    .btn-whatsapp-fixed,
    .btn-call-fixed {
        width: 55px;
        height: 55px;
        right: 20px;
    }

    .btn-whatsapp-fixed {
        bottom: 85px;
        /* 20px (base) + 55px (alto botón) + 10px (espacio) */
    }

    .btn-call-fixed {
        display: flex;
        bottom: 20px;
    }

    .btn-whatsapp-fixed img,
    .btn-call-fixed img {
        width: 30px;
    }
}

.seccion-contacto {
    background-color: #f4f6f9;
}

.formulario-soal {
    background-color: #FFFFFF;
    border-top: 5px solid #1F88FF;
}

.formulario-soal .form-label {
    font-weight: 600;
    color: #444;
    font-size: 0.95rem;
}

.formulario-soal .form-control {
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.formulario-soal .form-control:focus {
    border-color: #1F88FF;
    box-shadow: 0 0 0 0.25rem rgba(31, 136, 255, 0.25);
}

.btn-enviar-soal {
    background-color: #1F88FF;
    color: #FFFFFF;
    border: none;
    border-radius: 30px;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.btn-enviar-soal:hover {
    background-color: #001E42;
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 30, 66, 0.3);
}

/* ===== SERVICIO CARD INTERACTIVO ===== */
.servicio-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    padding: 16px 12px 20px;
    border-radius: 12px;
    z-index: 1;
}

.servicio-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.servicio-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-color: rgba(0, 30, 66, 0.85);
    /* Overlay oscuro para legibilidad */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.servicio-card:hover::before,
.servicio-card:hover::after {
    opacity: 1;
}

/* Fondos específicos por servicio usando data-modal */
.servicio-card[data-modal="modal-destape"]::before {
    background-image: url('../img/destap.png');
}

.servicio-card[data-modal="modal-presion"]::before {
    background-image: url('../img/press.jpg');
}

.servicio-card[data-modal="modal-limpieza"]::before {
    background-image: url('../img/mantencion.png');
}

.servicio-card[data-modal="modal-diagnostico"]::before {
    background-image: url('../img/analisis.png');
}

/* Transiciones para el contenido */
.servicio-card .servicio-icon,
.servicio-card .servicio-text {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.servicio-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 28px rgba(0, 74, 173, 0.25);
}

.servicio-card:hover .servicio-text {
    color: #ffffff;
}

.servicio-card:hover .servicio-icon {
    filter: brightness(0) invert(1);
}

.servicio-ver-mas {
    position: relative;
    z-index: 2;
    display: inline-block;
    margin-top: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #1F88FF;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.25s ease, transform 0.25s ease, color 0.3s ease;
}

.servicio-card:hover .servicio-ver-mas {
    opacity: 1;
    transform: translateY(0);
    color: #66B2FF;
}

/* ===== MODALES SERVICIOS ===== */
.soal-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.soal-modal--active {
    display: flex;
}

.soal-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 15, 40, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fadeInOverlay 0.25s ease;
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.soal-modal-content {
    position: relative;
    z-index: 1;
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    max-width: 560px;
    width: 100%;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    animation: slideUpModal 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUpModal {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.soal-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.45);
    border: none;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.soal-modal-close:hover {
    background: #004AAD;
    transform: scale(1.1);
}

.soal-modal-img-wrap {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #001E42;
}

.soal-modal-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.soal-modal-body {
    padding: 24px 28px 28px;
}

.soal-modal-titulo {
    font-weight: 800;
    font-size: 1.1rem;
    color: #001E42;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.soal-modal-desc {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.65;
    margin-bottom: 20px;
}

.soal-modal-btn {
    display: inline-block;
    background: #1F88FF;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 28px;
    border-radius: 30px;
    text-decoration: none;
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.soal-modal-btn:hover {
    background: #001E42;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 30, 66, 0.3);
}

/* Bloquear scroll al abrir modal */
body.soal-modal-open {
    overflow: hidden;
}

@media (max-width: 576px) {
    .soal-modal-img-wrap {
        height: 170px;
    }

    .soal-modal-body {
        padding: 18px 20px 22px;
    }

    .soal-modal-titulo {
        font-size: 1rem;
    }
}

/* ============================================
   SISTEMA DE ANIMACIONES POR SCROLL
   ============================================ */

/* Estado inicial: invisible */
.anim {
    opacity: 0;
    transition: opacity 0.7s ease, transform 0.7s ease;
    will-change: opacity, transform;
}

/* Variantes direccionales */
.anim.fade-up {
    transform: translateY(38px);
}

.anim.fade-left {
    transform: translateX(-38px);
}

.anim.fade-right {
    transform: translateX(38px);
}

.anim.fade-in {
    transform: none;
}

/* Estado final: visible (añadido por IntersectionObserver) */
.anim.visible {
    opacity: 1;
    transform: translate(0, 0) !important;
}

/* Delays escalonados */
.anim-delay-1 {
    transition-delay: 0.12s;
}

.anim-delay-2 {
    transition-delay: 0.24s;
}

.anim-delay-3 {
    transition-delay: 0.36s;
}

.anim-delay-4 {
    transition-delay: 0.48s;
}

/* Respeto preferencias de movimiento reducido */
@media (prefers-reduced-motion: reduce) {

    .anim,
    .hero-title-main,
    .hero-subtitle-main,
    .hero-blue-banner,
    .hero-phone-block {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}