body {
    background-color: #363a51;
    /* mismo color del hero */
}

:root {
    --nav-bg: #363a51;
    --nav-text: #ffffff;
    --nav-accent: #7D91C9;
    --primary-blue: #2D3C59;
    --stat-card-bg: #7D91C9;
    /* #7D91C9 con opacidad rgba(125, 145, 201, 0.85);*/
    --stat-card-hover: #2F66B4;
    --stat-card-border: rgba(50, 131, 244, 0.671);
}

html {
    scroll-behavior: smooth;
}

.navbar {
    background: transparent;
}

.navbar-float {
    background: linear-gradient(to right,
            #363a51 0%,
            #363a51 65%,
            #1c7aff 110%);

    border-radius: 2.5rem;
    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.18),
        0 4px 10px rgba(88, 154, 246, 0.616);

    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}



/* Texto de los links */
.nav-link {
    color: #ffffff;
    /* siempre blanco */
    position: relative;
    padding: 0.4rem 0.2rem;
    transition: color 0.3s ease;
    font-weight: 450;
}

/* Solo cambia a blanco al hover (opcional) */
.nav-link:hover {
    color: #ffffff;
    /* se mantiene blanco al hover */
}

/* Línea base (invisible) */
.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background-color: var(--nav-accent);
    /* línea azul */
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

/* Hover muestra línea */
.nav-link:hover::after {
    transform: scaleX(1);
}

/* Activo queda fijo */
.nav-link.active::after {
    transform: scaleX(1);
}

/* ===== Animaciones de entrada por sección ===== */

.section-animate {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    /* IMAGEN DE FONDO */
    background-image: url('/images/fondos/bg-mapa.jpg');
    /* cambia la ruta */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.section-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== INTRO ¿QUÉ HACEMOS? - CENTRADO Y RESPONSIVO ===== */

.intro-que-hacemos {
    position: relative;
    width: 100%;
    min-height: 100vh;
    /* Asegura que ocupe todo el alto de la pantalla */
    display: flex;
    /* ESTO ES LO QUE LOGRA EL CENTRADO TOTAL */
    align-items: center;
    /* Centrado vertical */
    justify-content: center;
    /* Centrado horizontal */

    padding: 20px 20px;
    /* Padding reducido para evitar que en móvil se aplaste el texto */
    background-image: url('/images/fondos/quehacemos.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

/* Overlay elegante - MANTENIDO IGUAL */
.intro-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(15, 23, 42, 0.75),
            rgba(15, 23, 42, 0.85));
    z-index: 1;
}

/* Contenido - ELIMINAMOS MÁRGENES MANUALES PARA QUE FLEXBOX MANDE */
.intro-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    width: 100%;
    /* Para que use bien el espacio en móviles */
    text-align: center;
    color: white;
    margin: 0;
    /* Quitamos el margin auto para confiar en el centrado del padre */
}

/* Badge - MANTENIDO IGUAL */
.intro-badge {
    display: inline-block;
    margin-bottom: 1.25rem;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    background: rgba(28, 122, 255, 0.2);
    color: #93c5fd;
}

/* Título - MANTENIDO IGUAL */
.intro-content h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
}

/* Texto - MANTENIDO IGUAL */
.intro-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    opacity: 0.92;
}

/* Énfasis - MANTENIDO IGUAL */
.intro-content p strong {
    color: #bfdbfe;
}

.intro-content p span {
    color: #60a5fa;
    font-weight: 600;
}

/* Claim final - MANTENIDO IGUAL */
.intro-claim {
    margin-top: 2.5rem;
    font-size: 1.4rem;
    font-weight: 700;
}

.intro-claim strong {
    color: #60a5fa;
}

/* --- RESPONSIVE OPTIMIZADO --- */


/* ===== AJUSTE PARA MÓVIL (Responsivo y sin espacios sobrantes) ===== */
/* ===== SOLUCIÓN DEFINITIVA PARA MÓVIL (Compacto y Centrado) ===== */
@media (max-width: 767px) {


    .intro-que-hacemos {

        min-height: auto !important;
        height: auto !important;

        /* Eliminamos centrado vertical */
        display: block !important;

        /* Ajustamos espacio real */
        padding: 40px 20px 50px 20px !important;
        margin-top: -20px;
    }

    .intro-content {
        margin: 0 auto !important;
    }

    .intro-claim {
        margin-top: 1.8rem !important;
    }
}


/* ===== SECCIÓN DE ESTADÍSTICAS ===== */

.stat-card {
    background: linear-gradient(180deg,
            rgba(125, 145, 201, 0.95),
            rgba(125, 145, 201, 0.85));
    backdrop-filter: blur(10px);
    /* Efecto elegante de desenfoque */
    border: none;
    border-radius: 1.4rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 25px 50px -12px rgba(15, 23, 42, 0.35);
    /* Efecto de profundidad */
}

@media (min-width: 768px) {
    .stat-card {
        padding: 2rem;
    }
}

.stat-card:hover {
    background-color: var(--stat-card-hover);
    box-shadow:
        0 20px 40px -10px rgba(28, 122, 255, 0.2),
        0 10px 20px -5px rgba(28, 122, 255, 0.1);
    transform: translateY(-6px) scale(1.02);
    border-color: rgba(28, 122, 255, 0.4);

}

.stat-number {
    font-size: 2.25rem;
    font-weight: 800;
    color: white;
    /* Cambiado a blanco para mejor contraste */
    margin-bottom: 0.75rem;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .stat-number {
        font-size: 3rem;
    }
}

@media (min-width: 1024px) {
    .stat-number {
        font-size: 3.75rem;
    }
}

.stat-label {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    /* Blanco con opacidad */
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .stat-label {
        font-size: 1rem;
    }
}

/* Reemplaza .stat-grid con esto: */
.stat-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    /* Esto centra las tarjetas */
    gap: 1rem;
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .stat-grid {
        gap: 2rem;
    }
}

/* Ajusta el ancho de las tarjetas para que quepan en el contenedor */
.stat-card {
    background-color: var(--stat-card-bg);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    border: 1px solid var(--stat-card-border);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 2px 4px -1px rgba(0, 0, 0, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    flex: 0 1 calc(50% - 0.5rem);
    /* Añade esto - 2 columnas en móvil */
}

@media (min-width: 768px) {
    .stat-card {
        padding: 2rem;
        flex: 0 1 calc(25% - 1.5rem);
        /* 4 columnas en desktop */
    }
}

/* Para mejorar la legibilidad del texto blanco */
.stat-card .stat-number,
.stat-card .stat-label {
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.stat-card:hover .stat-number {
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.stat-card:hover .stat-label {
    color: rgba(255, 255, 255, 1);
}


/* ===== BOTÓN FLOTANTE SÍGUENOS ===== */

/* ===============================
   CONTENEDOR GENERAL
================================ */
.social-float {
    position: fixed;
    bottom: 35px;
    right: 35px;
    z-index: 20;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    /* --- CAMBIO CLAVE --- */
    pointer-events: none;
    /* Los clics pasan a través del área invisible */
}

/* Reactivamos los clics solo en los elementos que sí se ven */
.social-label,
.social-icons {
    pointer-events: auto;
}


/* ===============================
   BOTÓN "CONTÁCTANOS"
================================ */
.social-label {
    background-color: #0A5ED6;
    color: white;
    height: 50px;
    display: flex;
    align-items: center;
    padding: 0px 18px;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 1px;
    border-radius: 999px;
    white-space: nowrap;
    box-shadow:
        0 8px 20px rgba(13, 98, 235, 0.68),
        0 2px 6px rgba(122, 152, 243, 0.737);

    transition: transform 0.3s ease, box-shadow 0.3s ease;
}


/* ===============================
   CONTENEDOR DE ICONOS
================================ */
.social-icons {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;

    background-color: #2F66B4;
    border-radius: 16px;
    padding: 6px 0;

    opacity: 0;
    transform: translateY(15px);
    pointer-events: none;

    transition: opacity 0.3s ease, transform 0.3s ease;
}


/* ===============================
   BOTÓN DE CADA ICONO
================================ */
.social-icons a {
    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;
    background-color: transparent;

    opacity: 0;
    transform: translateY(10px);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        background-color 0.3s ease;
}


/* ===============================
   IMAGEN PNG (ICONO REAL)
================================ */
.social-icons a img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    pointer-events: none;

    transition: transform 0.25s ease;
}


/* ===============================
   HOVER ICONO
================================ */
.social-icons a:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.social-icons a:hover img {
    transform: scale(1.12);
}


/* ===============================
   HOVER / DESPLIEGUE (DESKTOP)
================================ */
/* Hover SOLO cuando pasas por el botón "Síguenos" */
.social-label:hover+.social-icons,
.social-icons:hover {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Animación del botón */
.social-label:hover {
    transform: translateY(-10px);
    box-shadow:
        0 14px 32px rgba(0, 0, 0, 0.35),
        0 6px 14px rgba(0, 0, 0, 0.2);
}

/* Mostrar iconos */
.social-label:hover+.social-icons a,
.social-icons:hover a {
    opacity: 1;
    transform: translateY(0);
}


/* ===============================
   EFECTO CASCADA
================================ */
.social-icons a:nth-child(1) {
    transition-delay: 0.05s;
}

.social-icons a:nth-child(2) {
    transition-delay: 0.1s;
}

.social-icons a:nth-child(3) {
    transition-delay: 0.15s;
}

.social-icons a:nth-child(4) {
    transition-delay: 0.2s;
}

.social-icons a:nth-child(5) {
    transition-delay: 0.25s;
}


/* ===============================
   MÓVIL (CLASE .open DESDE JS)
================================ */
.social-float.open .social-icons {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.social-float.open .social-label {
    transform: translateY(-10px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

.social-float.open .social-icons a {
    opacity: 1;
    transform: translateY(0);

}

@media (max-width: 480px) {
    .social-label {
        height: 35px;
        /* Sigue siendo cómodo al tacto */
        padding: 0 12px;
        font-size: 12px;
    }

    .social-float {
        right: 10px;
        bottom: 16px;
    }
}

@media (max-width: 768px) {
    .social-label {
        height: 43px;
        /* Mínimo táctil recomendado */
        padding: 0 12px;
        font-size: 12px;
        /* Sigue siendo legible */

    }

    .social-float {
        right: 12px;
        /* Opcional: un poco más al borde */
        bottom: 20px;
    }
}



.presencia-title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    color: #0f172a;
    margin-bottom: 3rem;
}

.presencia-title span {
    display: block;
    font-weight: 600;
    color: #475569;

}

#presencia p {
    margin-top: 3rem;
}

.presencia-title strong {
    display: block;
    color: #0A5ED6;
}



/* MAPA */

/* ===== SECCIÓN PRESENCIA MAPA ===== */
.presencia-section {
    position: relative;
    overflow: hidden;

    /* IMAGEN DE FONDO */
    background-image: url('/images/fondos/bg-mapa.jpg');
    /* cambia la ruta */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* OVERLAY CON BLUR Y COLOR */
.presencia-section::before {
    content: "";
    position: absolute;
    inset: 0;

    /* Color + transparencia */
    background: linear-gradient(to bottom,
            rgba(15, 23, 42, 0.75),
            rgba(15, 23, 42, 0.85));

    /* BLUR */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    z-index: 1;
}

/* El contenido va arriba del blur */
.presencia-section>* {
    position: relative;
    z-index: 2;
}

.section-title--presencia {
    position: relative;
    display: inline-block;
    text-align: center;

}

/* Línea azul centrada respecto al texto */
.section-title.section-title--presencia::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -10px;
    /* separación bajo el texto */
    width: 140%;
    height: 4px;
    background-color: #2563eb;
    transform: translateX(-50%);
    border-radius: 999px;
}



#map {
    min-height: 200px;

    /* FONDO BLANCO CON BLUR */
    background: rgba(255, 255, 255, 0.11);

}


/* Ajustar tamaño en móviles */
@media (max-width: 640px) {
    #map {
        height: 220px !important;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    #map {
        height: 550px !important;
    }
}

@media (min-width: 1025px) {
    #map {
        height: 560px !important;
    }
}

/* Agrega esto a tu archivo CSS o bloque de estilos */
.simplemaps-control-container,
.tt-navigate,
.simplemaps_navigation,
.simplemaps_controls {
    display: none !important;
}


/*SVG GASERA*/

.gas-svg-wrapper {
    pointer-events: none;
}

#estadoModal svg {
    animation: popIn 0.35s ease-out;
}

@keyframes popIn {
    0% {
        transform: scale(0.7);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}


#scanLine {
    animation: scan 1.1s linear infinite;
}

@keyframes scan {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(62px);
    }
}


#pantalla {
    animation: lcdFlicker 2.5s infinite;
}

@keyframes lcdFlicker {

    0%,
    100% {
        opacity: 1;
    }

    92% {
        opacity: 0.9;
    }

    95% {
        opacity: 0.7;
    }

    97% {
        opacity: 1;
    }
}


/* Mejorar los tooltips del mapa */
.simplemaps-container .simplemaps-tooltip {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 14px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}


/*ESTADÍSTICAS MAPA*/
@keyframes bounceNumber {
    0% {
        transform: scale(1);
    }

    60% {
        transform: scale(1.25);
    }

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

.bounce-number {
    animation: bounceNumber 320ms ease-out;
}



.pump-screen {
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.15);
}

@media (max-width: 640px) {
    #estadoModal {
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 640px) {
    #estadoModal svg {
        width: 6rem;
        /* ~104px */
    }
}

#map_access {
    display: none !important;
}



#estadoModal {
    max-width: 90%;
    pointer-events: none;
}


/* Animación de pulso suave para la guía */
@keyframes softPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.85;
        transform: scale(1.02);
    }
}

/* Manita guía profesional */
#handGuide {
    transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.2s ease;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.1));
}

/* Animación de llamada suave */
@keyframes gentleBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

#handGuide {
    animation: gentleBounce 1.8s ease-in-out infinite;
}

#handGuide.fade-out {
    opacity: 0;
    visibility: hidden;
    animation: none;
}

/* Ajustes responsive */
@media (max-width: 640px) {
    #handGuide {
        top: 40px !important;
        /* Cambiado de 20x a 10px */
        left: 50px !important;
        transform: scale(0.8);
        /* Escalar ligeramente */
        transform-origin: top left;
    }



    #handGuide img {
        width: 24px !important;
        /* Aumentado para mejor visibilidad */
    }



    #handGuide .bg-white\/50 {
        font-size: 8px !important;
        padding: 4px 6px !important;
        white-space: normal !important;
        /* Permitir texto en varias líneas */
        max-width: 130px !important;
    }
}

/* ===== MEJORAR RESPONSIVE GENERAL ===== */
@media (max-width: 768px) {
    .presencia-section {
        padding: 2rem 0.75rem !important;
    }

    /* Asegurar que el contenido no esté pegado */
    .max-w-6xl.mx-auto {
        padding: 0 0.5rem;
    }

    /* Ajustar tooltips del mapa */
    .simplemaps-tooltip {
        font-size: 10px !important;
        max-width: 150px !important;
        white-space: normal !important;
    }
}

/* Para tablets */
@media (min-width: 641px) and (max-width: 1024px) {
    #handGuide {
        top: 50px !important;
        left: 45px !important;
    }

    #handGuide img {
        width: 32px !important;
    }
}

/* Para tablets */
@media (min-width: 641px) and (max-width: 1024px) {
    #handGuide {
        top: 30px;
        left: 34px;
    }
}

/* Estilos para la sección de Pain Points */
.pain-point-card {
    @apply bg-white p-6 md:p-8 rounded-xl shadow-md hover:shadow-xl transition-all duration-300 border border-gray-100 hover:border-[#363a51]/20;
}

.pain-point-icon {
    @apply w-14 h-14 rounded-lg bg-[#363a51]/10 flex items-center justify-center text-[#363a51] mb-6 group-hover:bg-[#363a51] group-hover:text-white transition-colors duration-300;
}

.pain-point-title {
    @apply text-xl font-bold text-gray-800 mb-3;
}

.pain-point-description {
    @apply text-gray-600 mb-4 leading-relaxed;
}

.pain-point-solution {
    @apply text-gray-700 bg-gray-50 p-3 rounded-lg text-sm;
}




.diagnostico-section {
    position: relative;
    scroll-margin-top: 5rem;
    padding-top: 2rem;
    padding-bottom: 6rem;

    /* IMAGEN */
    background-image: url('/images/diagnostico-bg3.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    /* EFECTO PARALLAX */
    background-attachment: fixed;
}


@media (min-width: 768px) {
    .diagnostico-section {
        padding-top: 3rem;
        padding-bottom: 6rem;
    }
}

/* Título de la sección */
.diagnostico-title-section {
    text-align: center;
    margin-bottom: 3rem;
}

.diagnostico-title-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .diagnostico-title-section h2 {
        font-size: 1.875rem;
    }
}

/* Grid de tarjetas */
.diagnostico-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 72rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .diagnostico-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

/* Tarjetas individuales */
.diagnostico-card {
    background: solid #7D91C9;
    border: 2px solid #7D91C9;
    border-radius: 0.8rem;
    height: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
}

.diagnostico-card:hover {
    border-color: #0a5ed6;
    transform: translateY(-7px);
    box-shadow: 0 10px 25px rgba(28, 122, 255, 0.15);
}

/* Iconos */
.diagnostico-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background-color: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.diagnostico-icon i {
    font-size: 1.25rem;
    color: #2F66B4;
}

/* Títulos de tarjetas */
.diagnostico-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

/* Contenido de tarjetas */
.diagnostico-card-content {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
    flex-grow: 1;
}

/* ===== DIAGNÓSTICO TIMELINE (Base Móvil) ===== */

.diagnostico-timeline {
    display: flex;
    flex-direction: column;
    gap: 5rem;
    margin-top: 2rem;
}

/* En móvil usamos Flexbox vertical para evitar huecos del grid */
.diagnostico-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    /* Espacio entre carta e imagen en móvil */
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    overflow: visible;
}

/* Forzamos que en móvil no haya alternado (todo centrado) */
.diagnostico-item.right {
    direction: ltr;
}

.diagnostico-info {
    max-width: 450px;
    background: #0A5ED6;
    padding: 2rem 2.5rem;
    border-radius: 1rem;
    color: white;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    z-index: 2;
    text-align: center;
    /* Centrado en móvil */
}

.diagnostico-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.diagnostico-info p {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.95;
}

/* CONECTOR: Oculto por defecto en móvil */
.diagnostico-connector {
    display: none;
}

/* IMAGEN: Ajustes base */
.diagnostico-image-wrapper {
    position: relative;
    background: white;
    border-radius: 1.4rem;
    width: 100%;
    max-width: 420px;
    height: 220px;
    /* Altura móvil */
    margin: 0 auto;
    overflow: visible;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.diagnostico-image-wrapper img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 1.1rem;
    transform: translate(10px, -10px);
    /* Menos desplazamiento en móvil */
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
    transition: transform 0.4s ease;
}

/* Hover para corregir la foto */
.diagnostico-item:hover .diagnostico-image-wrapper img {
    transform: translate(0, 0);
}

/* ===== AJUSTES PARA DESKTOP (Pantallas > 900px) ===== */
@media (min-width: 901px) {
    .diagnostico-item {
        display: grid;
        grid-template-columns: 1fr 150px 1fr;
        gap: 0;
        align-items: center;
    }

    /* Alternado solo en Desktop */
    .diagnostico-item.right {
        direction: rtl;
    }

    .diagnostico-item.right * {
        direction: ltr;
    }

    .diagnostico-info {
        text-align: left;
    }

    /* ACTIVAR CONECTOR SOLO EN DESKTOP */
    .diagnostico-connector {
        display: block;
        /* Aparece la línea */
        position: relative;
        width: calc(100% - 40px);
        margin: 0 20px;
        height: 2px;
        background: linear-gradient(to right,
                rgba(255, 255, 255, 0.4) 0%,
                rgba(255, 255, 255, 1) 50%,
                rgba(255, 255, 255, 0.4) 100%);
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
        z-index: 20;
    }

    .diagnostico-connector::before,
    .diagnostico-connector::after {
        content: "";
        position: absolute;
        top: 50%;
        width: 10px;
        height: 10px;
        background: white;
        border-radius: 50%;
        box-shadow: 0 0 12px 3px rgba(255, 255, 255, 0.8);
        transform: translateY(-50%);
        z-index: 21;
    }

    .diagnostico-connector::before {
        left: 0;
    }

    .diagnostico-connector::after {
        right: 0;
    }

    .diagnostico-image-wrapper {
        height: 260px;
        /* Altura Desktop */
    }

    .diagnostico-image-wrapper img {
        transform: translate(16px, -16px);
    }
}

/* ===== NOTICIAS - CARRUSEL 3 A LA VEZ ===== */

#noticias {
    background: #929292;
    position: relative;

}

/* TRACK */
#noticias-track {
    display: flex;
    gap: 1.5rem;
    transition: transform 0.6s ease-in-out;
    /* ESTA LÍNEA ES LA MAGIA */
    will-change: transform;
    /* Optimiza el movimiento */

}

#noticias-track:hover {
    cursor: grab;
}

.noticia-slide {
    position: relative;
    flex: 0 0 calc(33.333% - 1rem);
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;

    /* estado base (laterales) */
    transform: scale(0.92);
    opacity: 0.65;
    filter: blur(0.6px);

    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);

    transition:
        transform 0.45s ease,
        opacity 0.45s ease,
        filter 0.45s ease,
        box-shadow 0.45s ease;
}



.noticia-slide img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

/* TEXTO */
.noticia-slide h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1f2937;
}

.noticia-slide p {
    font-size: .9rem;
    color: #4b5563;
}

.noticia-slide a {
    font-weight: 600;
    color: #1c7aff;
}

/* ===== SLIDE CENTRAL DESTACADA ===== */
.noticia-slide.is-active {
    transform: scale(1.06);
    opacity: 1;
    filter: blur(0);
    z-index: 5;

    box-shadow:
        0 30px 70px rgba(0, 0, 0, 0.28),
        0 12px 30px rgba(28, 122, 255, 0.25);
}

/* Hover SOLO para la central */
.noticia-slide.is-active:hover {
    transform: scale(1.09) translateY(-6px);
}

/* Oscurecer ligeramente las laterales */
.noticia-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.06);
    pointer-events: none;
}

.noticia-slide.is-active::after {
    background: transparent;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .noticia-slide {
        flex: 0 0 calc(50% - 1rem);
        /* 2 en tablet */
    }
}

@media (max-width: 640px) {
    .noticia-slide {
        flex: 0 0 100%;
        /* 1 en móvil */
    }
}

@media (max-width: 640px) {
    .noticia-slide {
        transform: none !important;
        opacity: 1 !important;
        filter: none !important;
    }

    .noticia-slide::after {
        display: none;
    }
}

/* ===== BOTONES CARRUSEL NOTICIAS ===== */

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    pointer-events: auto;

    width: 52px;
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.45);

    background: rgba(170, 192, 239, 0.662);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    color: #1c7aff;
    font-size: 1.4rem;
    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        background-color 0.3s ease;
}


/* Hover */
.carousel-btn:hover {
    transform: translateY(-50%) scale(1.08);
    background: rgba(172, 196, 248, 0.459);
    box-shadow:
        0 18px 45px rgba(28, 122, 255, 0.35),
        0 0 0 6px rgba(28, 122, 255, 0.15);
}

/* Click */
.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

/* Ocultar en móvil (swipe manda) */
@media (max-width: 640px) {
    .carousel-btn {
        display: none;
    }
}


/* Estilo para los puntos indicadores */
#carousel-dots .dot {
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

#carousel-dots .dot.active {
    background-color: #1c7aff;
    /* El azul de tu acento */
    width: 25px;
    /* Efecto de píldora para el activo */
    border-radius: 5px;
}



.noticias-wrapper {
    position: relative;
    max-width: 1200px;
    /* más ancho que el carrusel */
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

#noticias-carousel {
    flex: 1;
    overflow: hidden;
}

.carousel-btn.outside {
    position: static;
    margin-top: -40px;
    /* ya no absolute */
    transform: none;
}

/* Wrapper general */
#noticias .relative.flex {
    gap: 2.5rem;
    /* espacio entre botones y carrusel */
}

/* Carrusel */
#noticias-carousel {
    padding: 0 0.5rem;
    /* aire extra interno */
}


@media (max-width: 640px) {
    .noticias-wrapper {
        gap: 0;
    }

    .carousel-btn.outside {
        display: none;
    }
}

/* ===== NAVBAR COMPACTO AL SCROLL ===== */

.navbar-float {
    background: linear-gradient(90deg,
            #363a51 0%,
            #363a51 45%,
            #1c7aff 70%,
            #363a51 100%);
    background-size: 200% 100%;
    background-position: 0% 50%;
    transition: background-position 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}




/* Estado compacto */
.navbar.scrolled .navbar-float {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    border-radius: 2rem;
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.2),
        0 2px 8px rgba(28, 122, 255, 0.18);
}

/* Logo normal */
.navbar img {
    transition: height 0.35s ease;
}

/* Logo compacto */
.navbar.scrolled img {
    height: 2.7rem;
    /* 40px */
}

@media (max-width: 767px) {
    .navbar .group ul {
        position: static;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none;
        margin-top: 0.75rem;
        border-radius: 1rem;
        box-shadow: none;
    }

    .navbar .group button {
        justify-content: center;
        width: 100%;
    }
}


@media (max-width: 767px) {
    #menu .nav-link {
        display: block;
        font-size: 1rem;
        padding: 0.5rem 0;
    }
}

/* Esto hace que todas las secciones con ID se detengan 100px antes del tope */
section[id] {
    scroll-margin-top: 100px;
}

/* CONTACTO - UNIFICADO */
.contacto-split {
    background-image: url('/images/diagnostico-bg3.jpg');
}

.contact-form-glass {
    background: rgba(255, 255, 255, 0.333);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 1.75rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-form-glass:hover {
    transform: translateY(-4px);
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.35);
}

/* Labels unificados (blanco sobre fondo oscuro) */
.contact-form-glass label {
    color: #f9fafb;
    font-weight: 500;
    margin-bottom: 0.25rem;
    display: block;
}

/* ESTILO BASE UNIFICADO para todos los inputs, textarea y select personalizado */
.contact-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.9rem;
    border: 1px solid #d1d5db;
    /* gris consistente */
    background-color: #ffffffcb;
    /* fondo blanco sólido SIEMPRE */
    color: #111827;
    /* texto negro/gris muy oscuro */
    font-size: 0.95rem;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

textarea.contact-input {
    resize: none;
}

/* Placeholder unificado (gris claro, bien visible) */
.contact-input::placeholder {
    color: #9ca3af;
    opacity: 1;
}

/* Focus: borde azul y sombra suave */
.contact-input:focus {
    outline: none;
    border-color: #1c7aff;
    background-color: #ffffffc9;
    box-shadow: 0 0 0 3px rgba(28, 122, 255, 0.2);
}

/* ===== AUTOCOMPLETADO: mismo fondo blanco y texto negro ===== */
.contact-input:-webkit-autofill,
.contact-input:-webkit-autofill:hover,
.contact-input:-webkit-autofill:focus,
.contact-input:-webkit-autofill:active {
    -webkit-text-fill-color: #111827 !important;
    -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
    box-shadow: 0 0 0px 1000px #ffffffcf inset !important;
    caret-color: #111827 !important;
    border-color: #d1d5db;
}

/* Para Firefox */
.contact-input:autofill,
.contact-input:autofill:hover,
.contact-input:autofill:focus {
    -webkit-text-fill-color: #111827 !important;
    background-color: #ffffffb3 !important;
    color: #111827 !important;
}

/* Botón principal */
.contact-btn {
    width: 100%;
    padding: 0.9rem;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: white;
    background: linear-gradient(135deg, #1c7aff, #0a5ed6);
    box-shadow: 0 12px 30px rgba(28, 122, 255, 0.45);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 45px rgba(28, 122, 255, 0.6);
}

/* Dropdown con scroll elegante y redondeado */
.dropdown-options {
    background-color: #ffffff;
    border: 2px solid #7aaefc;
    border-radius: 0.9rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    max-height: 240px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 60;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    /* Firefox: barra delgada */
    scrollbar-color: #1c7aff #e2e8f0;
}

/* Ocultar flechas de spinners (por si acaso) */
.dropdown-options::-webkit-inner-spin-button,
.dropdown-options::-webkit-outer-spin-button {
    display: none;
}

/* Scrollbar para Chrome, Edge, Safari - más delgado y redondeado */
.dropdown-options::-webkit-scrollbar {
    display: none;

}

.dropdown-options::-webkit-scrollbar-track {
    background: #e2e8f000;
    border-radius: 20px;
    /* Totalmente redondeado */
    margin-block: 10px;
    /* Espacio arriba/abajo para que no toque el borde */
}

.dropdown-options::-webkit-scrollbar-thumb {
    background: #1c7bff00;
    border-radius: 20px;
    border: none;
    /* Sin borde para que se vea más limpio */
}

.dropdown-options::-webkit-scrollbar-thumb:hover {
    background: #0a5ed6;
}

/* Ajuste fino para las opciones */
.dropdown-option {
    padding: 0.6rem 1rem;
    padding-right: 1rem;
    /* Menos espacio a la derecha */
    cursor: pointer;
    color: #111827;
    transition: background 0.2s;
    white-space: normal;
    word-break: break-word;
}

.dropdown-option:hover {
    background-color: #1c7bff42;
}


.footer-link {
    color: #cbd5f5;
    transition: color 0.25s ease, transform 0.25s ease;
}

.footer-link:hover {
    color: #ffffff;
    transform: translateX(2px);
}

.footer-social {
    color: #cbd5f5;
    font-weight: 500;
    transition: color 0.25s ease, transform 0.25s ease;
}

.footer-social:hover {
    color: #7D91C9;
    transform: translateY(-2px);
}

.map-label {
    text-shadow: 0 0 5px black, 0 0 5px black;
}

/* Mapas más grandes y responsivos */
#cmxMap {
    min-height: 550px;
    transition: height 0.3s ease;
}

@media (min-width: 768px) {
    #cmxMap {
        min-height: 580px;
    }
}

@media (min-width: 1024px) {
    #cmxMap {
        min-height: 550px;
    }
}

/* Cuando hay errores, mantener el tamaño */
.contacto-split:has(.error-message) #cmxMap {
    min-height: 550px;
}

/*ACREDITACIONES*/

/* ===== ANIMACIONES PROFESIONALES ===== */
.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.show {
    opacity: 1;
    transform: translateY(0);
}

.fade-delay-1 {
    transition-delay: 0.15s;
}

.fade-delay-2 {
    transition-delay: 0.3s;
}

.fade-delay-3 {
    transition-delay: 0.45s;
}

.acreditacion {
    border-left: 3px solid #2563eb;
    padding-left: 1.25rem;
}

.acreditacion h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.acreditacion p {
    color: #6b7280;
    margin-top: 0.25rem;
}

.acreditacion-icon {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #2563eb;
    margin-bottom: 0.5rem;
}


/* ===== GALERÍA CASOS DE ÉXITO ===== */
/* ===== GALERÍA EFECTO MONEDA ===== */
.gallery-card {
    position: relative;
    border-radius: 22px;
    perspective: 1200px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition: all 0.7s cubic-bezier(.2, .8, .2, 1);
}

/* Contenedor que gira */
.gallery-flip {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.9s cubic-bezier(.4, .2, .2, 1);
    border-radius: 22px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
}

/* Giro tipo moneda */
.gallery-card:hover .gallery-flip {
    transform: rotateY(180deg);
}

/* Cara frontal y trasera */
.gallery-front,
.gallery-back {
    position: absolute;
    inset: 0;
    border-radius: 22px;
    backface-visibility: hidden;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* FRENTE: imagen completa con fondo blur */
.gallery-front {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    border-radius: 15px;
}

/* Imagen completa sin cortar */
.gallery-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 14px;
    transition: transform 0.6s ease;

}

/* REVERSO */
.gallery-back {
    background: linear-gradient(135deg, #2f66b4, #1e293b);
    color: white;
    transform: rotateY(180deg);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Contenido del reverso */
.gallery-back-content {
    padding: 24px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(6px);
}

.gallery-back-content h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.gallery-back-content p {
    font-size: 0.9rem;
    opacity: 0.85;
}

/* Hover extra premium */
.gallery-card:hover .gallery-img {
    transform: scale(1.05);
}

/* Animación al aparecer */
.reveal-gallery.show-gallery {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-back-content h3 {
        font-size: 1.1rem;
    }

    .gallery-flip {
        transition: transform 0.7s ease;
    }
}

/* Select más pequeño */
select.contact-input {
    font-size: 14px;
    height: 36px;
    max-height: 200px;
    color: #9ca3af;
    /* gris suave (muy común) */

}

/* Opciones del select (dropdown) */
select.contact-input option {
    font-size: 13px;
    padding: 4px;
}

/* En celular */
@media (max-width: 768px) {
    select.contact-input {
        font-size: 13px;
        height: 34px;
    }

    select.contact-input option {
        font-size: 12px;
    }
}

@media (max-width: 768px) {

    .container,
    .max-w-6xl,
    .max-w-5xl,
    .max-w-4xl,
    .w-full {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
}