:root {
    --azul-profundo: #0A2540;
    --azul-medio: #146A9F;
    --azul-claro: #37aae9;
    --verde-acento: #18A66A;
    --blanco: #FFFFFF;
    --gris-claro: #F4F8FB;
    --gris-borde: #DDE8F0;
    --texto: #172331;
    --texto-suave: #5A6775;
    --sombra-suave: 0 14px 36px rgba(10, 37, 64, 0.12);
    --sombra-card: 0 18px 42px rgba(10, 37, 64, 0.14);
    --radio-ui: 0.5rem;
}

html {
    scroll-padding-top: 92px;
}

body {
    background: var(--gris-claro);
    color: var(--texto);
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    padding-top: 76px;
    text-rendering: optimizeLegibility;
}

body.index-popup-open {
    overflow: hidden;
}

img {
    max-width: 100%;
}

a,
.btn,
.card,
.producto-card,
.solucion-card,
.valor-card,
.form-control,
.form-select {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.rounded-4,
.card.rounded-4 {
    border-radius: var(--radio-ui) !important;
}

.bg-azul-profundo {
    background-color: var(--azul-profundo) !important;
}

.bg-azul-claro {
    background-color: var(--azul-claro) !important;
}

.bg-gris-claro {
    background: var(--gris-claro) !important;
}

.text-azul-claro {
    color: var(--azul-claro) !important;
}

.text-azul-profundo {
    color: var(--azul-profundo) !important;
}

.btn {
    border-radius: var(--radio-ui);
}

.asesoria,
.btn-primario {
    background: linear-gradient(135deg, var(--azul-claro), var(--azul-medio)) !important;
    border: 0;
    box-shadow: 0 12px 24px rgba(55, 170, 233, 0.28);
    color: var(--blanco) !important;
    font-weight: 700;
    padding: 12px 30px;
}

.asesoria:hover,
.btn-primario:hover {
    background: linear-gradient(135deg, #2E9CD7, #0F5D8D) !important;
    box-shadow: 0 16px 30px rgba(55, 170, 233, 0.34);
    color: var(--blanco) !important;
    transform: translateY(-2px);
}

.btn-outline-light:hover,
.btn-outline-success:hover {
    transform: translateY(-2px);
}

.hero-section {
    background:
        linear-gradient(120deg, rgba(10, 37, 64, 0.95) 0%, rgba(10, 37, 64, 0.82) 54%, rgba(20, 106, 159, 0.78) 100%),
        url("/assets/img/banner/BannerGIALI.webp") center/cover;
    color: var(--blanco);
    overflow: hidden;
    padding: clamp(36px, 5vw, 64px) 0;
    position: relative;
}

.index-popup {
    align-items: center;
    background: rgba(10, 37, 64, 0.68);
    display: flex;
    inset: 0;
    justify-content: center;
    opacity: 0;
    padding: clamp(18px, 4vw, 36px);
    position: fixed;
    transition: opacity 0.18s ease;
    z-index: 2000;
}

.index-popup[hidden] {
    display: none;
}

.index-popup.is-visible {
    opacity: 1;
}

.index-popup__dialog {
    border-radius: var(--radio-ui);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
    display: block;
    max-height: calc(100vh - clamp(36px, 8vw, 72px));
    max-width: 920px;
    position: relative;
    transform: translateY(8px) scale(0.98);
    transition: transform 0.18s ease;
    width: min(calc(100vw - 32px), 920px);
}

.index-popup__media {
    position: relative;
    width: 100%;
}

.index-popup__media > picture {
    display: block;
}

.index-popup.is-visible .index-popup__dialog {
    transform: translateY(0) scale(1);
}

.index-popup__image {
    background: rgba(0, 0, 0, 0.0);
    border-radius: var(--radio-ui);
    display: block;
    max-height: calc(100vh - clamp(36px, 8vw, 72px));
    object-fit: contain;
    width: 100%;
}

.index-popup__close {
    align-items: center;
    background: rgba(10, 37, 64, 0.92);
    border: 0;
    border-radius: 50%;
    box-shadow: 0 12px 26px rgba(10, 37, 64, 0.24);
    color: var(--blanco);
    display: inline-flex;
    font-size: 1.8rem;
    font-weight: 400;
    height: 44px;
    justify-content: center;
    line-height: 1;
    position: absolute;
    right: 12px;
    top: 12px;
    width: 44px;
    z-index: 5;
}

.index-popup__close:hover,
.index-popup__close:focus {
    background: var(--azul-claro);
    color: var(--blanco);
    outline: 0;
}

.hero-section .carousel-inner {
    min-height: clamp(390px, 52vh, 500px);
}

.hero-section .carousel-item {
    height: 100%;
}

.hero-section .carousel-item .container {
    display: flex;
    min-height: clamp(390px, 52vh, 500px);
    align-items: center;
}

.hero-section h1,
.page-header h1 {
    letter-spacing: 0;
}

.hero-section .badge,
.page-header .badge {
    align-items: center;
    background: rgba(255, 255, 255, 0.13) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    color: var(--blanco) !important;
    display: inline-flex;
    gap: 0.5rem;
}

.hero-section .col-lg-5.d-lg-block > div {
    background: transparent !important;
    border: 0;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    padding: 0;
}

.hero-section .col-lg-5.d-lg-block img {
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.hero-section .asesoria,
.hero-section .asesoria:hover {
    box-shadow: none;
}

.garantia-badge {
    background-color: rgba(55, 170, 233, 0.14);
    border: 1px solid rgba(55, 170, 233, 0.25);
    border-left: 4px solid var(--azul-claro);
}

.page-header {
    background:
        linear-gradient(120deg, rgba(10, 37, 64, 0.94), rgba(10, 37, 64, 0.82)),
        url("../img/banner/BannerGIALI.webp") center/cover;
    color: var(--blanco);
    margin-top: 0;
    overflow: hidden;
    padding: clamp(72px, 8vw, 108px) 0 clamp(56px, 7vw, 88px);
    position: relative;
}

.page-header .lead {
    color: rgba(255, 255, 255, 0.78);
}

section {
    background-color: var(--blanco);
}

section.bg-light,
section.bg-gris-claro {
    background: var(--gris-claro) !important;
}

.valor-card,
.solucion-card,
.producto-card,
.contacto-info-card,
.bg-white.border,
.p-4.bg-white.border {
    border: 1px solid var(--gris-borde) !important;
    box-shadow: 0 10px 30px rgba(10, 37, 64, 0.08);
}

.solucion-card,
.producto-card,
.valor-card {
    background: var(--blanco);
    height: 100%;
}

.solucion-card:hover,
.producto-card:hover,
.valor-card:hover {
    border-color: rgba(55, 170, 233, 0.55) !important;
    box-shadow: var(--sombra-card);
    transform: translateY(-5px);
}

.icon-box {
    align-items: center;
    background-color: rgba(55, 170, 233, 0.12);
    border: 1px solid rgba(55, 170, 233, 0.2);
    border-radius: var(--radio-ui);
    color: var(--azul-claro);
    display: flex;
    font-size: 1.5rem;
    height: 60px;
    justify-content: center;
    margin-bottom: 1.5rem;
    width: 60px;
}

.producto-card .bg-light {
    background: linear-gradient(180deg, #FFFFFF, #EEF6FB) !important;
}

.producto-card img {
    max-height: 190px;
    object-fit: contain;
}

.puntos-recoleccion-media {
    height: 250px;
    overflow: hidden;
    padding: 0;
}

.puntos-recoleccion-media span,
.puntos-recoleccion-media img {
    display: block;
    height: 100%;
    width: 100%;
}

.producto-card .puntos-recoleccion-media img {
    max-height: none;
    object-fit: contain;
}

.precios-box .btn-outline-success {
    background: #F1FBF6;
    border-color: rgba(24, 166, 106, 0.45);
    color: #0B7C4C;
}

.precios-box .btn-outline-success:hover,
.precios-box .btn-outline-success:focus {
    background: var(--verde-acento);
    border-color: var(--verde-acento);
    color: var(--blanco);
}

.precios-box .card-body {
    border-radius: var(--radio-ui);
}

.badge-garantia {
    background: linear-gradient(135deg, var(--azul-profundo), var(--azul-medio));
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    color: var(--blanco);
    display: inline-flex;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.contacto-info-card {
    background:
        linear-gradient(145deg, rgba(10, 37, 64, 0.98), rgba(20, 106, 159, 0.88));
    border-radius: var(--radio-ui);
    color: var(--blanco);
    height: 100%;
    padding: 2.5rem;
}

.contacto-info-card .fs-3.text-azul-claro {
    align-items: center;
    display: flex;
    flex: 0 0 48px;
    justify-content: center;
    margin-right: 1rem !important;
    width: 48px;
}

.form-control,
.form-select {
    border-color: var(--gris-borde);
    border-radius: var(--radio-ui);
    min-height: 48px;
}

.form-control.bg-light,
.form-select.bg-light {
    background-color: #F7FAFC !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--azul-claro);
    box-shadow: 0 0 0 0.25rem rgba(55, 170, 233, 0.18);
}

.valores-section {
    background:
        linear-gradient(135deg, var(--azul-claro), #8FD7F4);
    margin-bottom: 0;
}

.flip-card {
    background-color: transparent;
    cursor: pointer;
    min-height: 136px;
    perspective: 1000px;
}

.flip-card-inner {
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s ease-in-out;
    width: 100%;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    backface-visibility: hidden;
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
    -webkit-backface-visibility: hidden;
}

.flip-card-front {
    background-color: var(--blanco);
    z-index: 2;
}

.flip-card-back {
    background: var(--azul-profundo);
    transform: rotateY(180deg);
}

.button-c {
    background-color: rgba(55, 170, 233, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    color: var(--blanco);
    padding: 30px;
}

.hero-section .carousel-control-prev,
.hero-section .carousel-control-next {
    align-items: center;
}

footer a,
.navbar a {
    text-underline-offset: 0.2em;
}

.whatsapp-floating {
    align-items: center;
    bottom: clamp(18px, 3vw, 30px);
    color: var(--texto);
    display: inline-flex;
    gap: 10px;
    position: fixed;
    right: clamp(16px, 3vw, 28px);
    text-decoration: none;
    z-index: 1080;
}

.whatsapp-floating:hover,
.whatsapp-floating:focus {
    color: var(--texto);
    text-decoration: none;
}

.whatsapp-floating__bubble {
    animation: whatsapp-bubble-hide 0.35s ease 3s forwards;
    background: var(--blanco);
    border: 1px solid var(--gris-borde);
    border-radius: 999px;
    box-shadow: var(--sombra-suave);
    color: var(--texto);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    max-width: calc(100vw - 98px);
    padding: 0.65rem 0.9rem;
    position: relative;
    transform: translateX(0);
    white-space: nowrap;
}

.whatsapp-floating__bubble::after {
    background: var(--blanco);
    border-right: 1px solid var(--gris-borde);
    border-top: 1px solid var(--gris-borde);
    content: "";
    height: 10px;
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 10px;
}

.whatsapp-floating__button {
    align-items: center;
    background: #25D366;
    border-radius: 50%;
    box-shadow: 0 14px 30px rgba(24, 166, 106, 0.34);
    color: var(--blanco);
    display: inline-flex;
    font-size: 2rem;
    height: 60px;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    width: 60px;
}

.whatsapp-floating:hover .whatsapp-floating__button,
.whatsapp-floating:focus .whatsapp-floating__button {
    background: #1EBE5D;
    box-shadow: 0 18px 34px rgba(24, 166, 106, 0.42);
    transform: translateY(-2px);
}

.whatsapp-floating:hover .whatsapp-floating__bubble,
.whatsapp-floating:focus .whatsapp-floating__bubble {
    animation: none;
    opacity: 1;
    transform: translateX(0);
    visibility: visible;
}

@keyframes whatsapp-bubble-hide {
    to {
        opacity: 0;
        transform: translateX(8px);
        visibility: hidden;
    }
}

@media (max-width: 991.98px) {
    body {
        padding-top: 70px;
    }

    .hero-section {
        padding: 56px 0;
    }

    .hero-section .carousel-inner,
    .hero-section .carousel-item .container {
        min-height: auto;
    }

    .lead.w-75 {
        width: 100% !important;
    }
}

@media (max-width: 575.98px) {
    .page-header,
    .hero-section {
        text-align: center;
    }

    .index-popup {
        padding: 16px;
    }

    .index-popup__dialog {
        max-height: calc(100vh - 32px);
    }

    .index-popup__image {
        max-height: calc(100vh - 32px);
    }

    .index-popup__close {
        height: 40px;
        left: 8px;
        right: auto;
        top: 8px;
        width: 40px;
    }

    .contacto-info-card,
    .bg-white.p-5 {
        padding: 1.5rem !important;
    }

    .button-c {
        padding: 20px;
    }

    .whatsapp-floating {
        gap: 8px;
        right: 14px;
    }

    .whatsapp-floating__bubble {
        font-size: 0.82rem;
        max-width: calc(100vw - 88px);
        padding: 0.55rem 0.75rem;
    }

    .whatsapp-floating__button {
        font-size: 1.75rem;
        height: 54px;
        width: 54px;
    }
}
