   /* =============================================
   PHOTODENT - css
   ============================================= */

   /* =============================================
   1. VARIABLES Y CONFIGURACIÓN BASE
   ============================================= */
    :root {
        --card-width: 300px;
        --card-height: 400px;
        --color-purple: #7000ff;
        --color-purple-light: #a855f7;
        --color-purple-dark: #9333ea;
        --color-pink: #9333ea;
        --color-dark: #0a0e14;
        --color-darker: #0a0a0f;
        --color-gradient-start: #17062C;
        --color-gradient-end: #17263C;
        --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        --transition-bounce: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    }

    /* =============================================
    2. FUENTES
    ============================================= */
    @font-face {
        font-family: 'DIN Pro';
        src: url('/public/fonts/DINPro-Bold.ttf') format('truetype');
        font-weight: 700;
        font-style: normal;
        font-display: swap;
    }

    @font-face {
        font-family: 'DIN Pro';
        src: url('/public/fonts/DINPro.ttf') format('truetype');
        font-weight: 400;
        font-style: normal;
        font-display: swap;
    }

   /* =============================================
   3. RESET Y ESTILOS GLOBALES
   ============================================= */
    *,
    *::before,
    *::after {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    html {
        scroll-behavior: smooth;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    body {
        font-family: 'Inter', sans-serif;
        overflow-x: hidden;
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        background-color: white;
        line-height: 1.5;
    }

    main {
        flex: 1;
    }

    img {
        max-width: 100%;
        height: auto;
        display: block;
    }

    a {
        text-decoration: none;
        color: inherit;
    }

   /* =============================================
   4. UTILIDADES REUTILIZABLES
   ============================================= */
    .tech-gradient {
        background: linear-gradient(135deg, var(--color-pink), var(--color-purple));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .badge-tech {
        background: linear-gradient(90deg, #ffb53b, var(--color-purple));
        padding: 6px 16px;
        border-radius: 100px;
        font-size: 10px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 2px;
        box-shadow: 0 0 20px rgba(255, 0, 255, 0.3);
    }

    .glass-card {
        background: rgba(255, 255, 255, 0.03);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .serif {
        font-family: 'Playfair Display', serif;
    }

    /* =============================================
    5. NAVBAR 
    ============================================= */
    #header-main {
        will-change: transform, padding;
    }

    #header-main * {
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden; 
    }

    #header-main nav {
        transition: background-color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease, backdrop-filter 0.5s ease, -webkit-backdrop-filter 0.5s ease;
    }

   /* ==========================================================================
   6. HERO / VIDEO SECTION (SPLIT SCROLL)
   ========================================================================== */
    #split-scroll {
        background-color: #0d1117;
        overflow: hidden;
    }

    /* Efecto de resplandor morado (Solo visible en escritorio para optimizar rendimiento móvil) */
    @media (min-width: 768px) {
        #split-scroll::before {
            content: '';
            position: absolute;
            width: 400px;
            height: 400px;
            background: radial-gradient(circle, rgba(112, 0, 255, 0.2) 0%, transparent 70%);
            top: 50%;
            left: 20%;
            transform: translateY(-50%);
            pointer-events: none;
            z-index: 1;
        }

        #hero-info-container::before {
            content: '';
            position: absolute;
            width: 600px;
            height: 600px;
            background: radial-gradient(circle, rgba(255, 251, 255, 0.15) 0%, transparent 70%);
            top: 50%;
            left: -10%;
            transform: translateY(-50%);
            z-index: -1;
            pointer-events: none;
        }
    }

    #hero-info-container {
        will-change: transform, opacity;
    }

    .main-title {
        color: white;
        text-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        z-index: 100;
    }

    #right-panel {
        width: 50%;
        will-change: width;
        z-index: 10;
        transition: none;
    }

    #horizontal-scroll-container {
        opacity: 0;
        visibility: hidden;
        -webkit-mask-image: linear-gradient(to right, transparent 7%, black 10%, black 100%);
        mask-image: linear-gradient(to right, transparent 7%, black 10%, black 100%);
    }

    .horizontal-text {
        font-family: 'Cormorant Garamond', serif;
        font-weight: 300;
        letter-spacing: -0.02em;
        will-change: transform;
    }


   /* ==========================================================================
   7. SECCIÓN NOSOTROS (CAPA A)
   ========================================================================== */
    #why-choose-us {
        background-color: #ffffff;
        color: #000000;
    }

    #why-choose-us h2 {
        font-family: 'Inter', sans-serif;
        line-height: 0.85;
        letter-spacing: -0.05em;
    }

    #why-choose-us p {
        margin-left: auto;
        color: #4b5563;
    }

    #why-choose-us h3 {
        font-family: 'Inter', sans-serif;
        font-weight: 900;
        line-height: 0.9;
        letter-spacing: -0.04em;
        text-transform: uppercase;
        transition: transform var(--transition-smooth), color var(--transition-smooth);
    }

    @media (min-width: 768px) {
        #why-choose-us h3:hover {
            color: var(--color-purple);
            transform: translateX(10px);
        }
    }


   /* ==========================================================================
   8. SERVICIOS (CAPA B)
   ========================================================================== */
    #services {
        background: linear-gradient(to right, #17062C 0%, #17263C 100%);
        position: absolute;
        z-index: 10;
        transform: translateY(100%);
        min-height: 100vh;
    }

    #services .group:hover span {
        color: var(--color-pink);
    }

    .group {
        position: relative;
    }

    .group::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 0;
        height: 1px;
        background: var(--color-purple-light);
        transition: width var(--transition-bounce);
    }

    @media (min-width: 768px) {
        .group:hover::after {
            width: 100%;
        }
    }


   /* ==========================================================================
   9. SECCIÓN DE CONFIGURACIÓN Y RESETS PARA MÓVIL (MAX-WIDTH: 767px)
   ========================================================================== */
    @media (max-width: 767px) {
    
    /* --- ESTRUCTURA BASE Y CONTENEDORES (CRÍTICO SCROLL) --- */
    #master-wrap {
        height: auto !important;
        overflow: visible !important;
        background: transparent !important;
        min-height: auto !important;
    }

    #master-wrap::after {
        display: none !important;
    }

    #moving-tooth {
        display: none !important;
    }

    .layer {
        position: relative !important;
        height: auto !important;
        min-height: auto !important;
        padding: 40px 20px !important;
    }

    .layer .grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .hidden.md\:block {
        display: none !important;
    }

    /* --- RESET DEL HERO / SPLIT SCROLL --- */
    #split-scroll {
        height: 100vh !important;
        overflow: hidden !important;
    }

    #right-panel {
        width: 100% !important;
        left: 0 !important;
    }

    /* Estilo del Badge de Radiología en móvil */
    .badge-tech {
        background-color: rgba(147, 51, 234, 0.4) !important;
        border: 1px solid rgba(255, 255, 255, 0.15);
    }

    /* --- CAPA A: NOSOTROS / WHY TEXT --- */
    #why-text h2 {
        font-size: 3rem !important;
        line-height: 0.9 !important;
    }

    #why-benefits .absolute.left-0 {
        display: none !important;
    }

    /* --- CAPA B: SERVICIOS --- */
    #services.layer {
        position: relative !important;
        transform: none !important;
        height: auto !important;
        min-height: auto !important;
        display: flex !important;
    }

    #services-content h2 {
        font-size: 2.8rem !important;
        line-height: 0.95 !important;
    }

    /* Ocultar elementos innecesarios en móvil */
    #horizontal-scroll-container {
        display: none !important;
    }
    }


   /* ==========================================================================
   10. SERVICE OVERLAY
   ========================================================================== */
    #service-overlay {
        background: linear-gradient(to right, var(--color-gradient-start) 0%, var(--color-gradient-end) 100%);
        background-attachment: fixed;
    }

    #service-title {
        font-size: clamp(2.2rem, 7vw, 4.5rem); /* Limita de forma inteligente el tamaño en pantallas chicas y grandes */
    }

    .grid-layout {
        display: grid;
        gap: 1.5rem;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Optimiza ancho mínimo para tarjetas responsivas */
    }

    /* Scrollbar estética */
    #service-overlay::-webkit-scrollbar { width: 6px; }
    #service-overlay::-webkit-scrollbar-track { background: #050505; }
    #service-overlay::-webkit-scrollbar-thumb { background: #222; border-radius: 10px; }
    #service-overlay::-webkit-scrollbar-thumb:hover { background: var(--color-purple-light); }

    /* --- RESETS PARA SERVICE OVERLAY EN MÓVIL --- */
    #service-title {
        font-size: clamp(1.8rem, 10vw, 2.6rem) !important; /* Evita que el título se rompa toscamente */
    }

    .grid-layout {
        grid-template-columns: 1fr !important; /* Una sola columna fluida y ordenada en celular */
        gap: 1.25rem !important;
    }


   /* ==========================================================================
   11. BLOG & CAROUSEL (SWIPER)
   ========================================================================== */
    .blogSwiper {
        width: 100%;
        overflow: hidden !important;
        padding: 20px 10px 50px 10px !important;
    }

    .blogSwiper .swiper-slide {
        height: auto;
        opacity: 0;
        transition: opacity 0.4s ease, transform 0.6s ease;
    }

    /* Forzar visibilidad suave al inicializarse Swiper */
    .blogSwiper .swiper-slide-visible,
    .blogSwiper .swiper-slide-active {
        opacity: 1 !important;
    }

    .blogSwiper .swiper-wrapper {
        display: flex;
        align-items: stretch;
    }

    /* Personalización de Paginación Premium */
    .blog-pagination {
        position: absolute;
        bottom: 0px !important;
        left: 0;
        width: 100%;
        text-align: center;
    }

    .blog-pagination .swiper-pagination-bullet {
        background: rgba(255, 255, 255, 0.3);
        opacity: 1;
        transition: all 0.3s ease;
    }

    .blog-pagination .swiper-pagination-bullet-active {
        background: var(--color-purple-light, #a855f7) !important;
        width: 26px;
        border-radius: 4px;
    }

    /* Estilos de Lectura Editorial (Modal del Artículo Completo) */
    .journal-text {
        color: #a1a1aa;
        font-size: 1.125rem;
        line-height: 1.8;
        font-weight: 300;
    }

    .journal-text::first-letter {
        color: var(--color-purple-light, #a855f7);
        font-weight: 800;
        font-size: 1.5em;
    }

    .journal-text p {
        margin-bottom: 1.5rem;
    }

    #modal-bg {
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }

    #modal-body {
        scroll-behavior: smooth;
        overscroll-behavior: contain;
    }

    #modal-content img {
        width: 100%;
        height: auto;
        border: 1px solid rgba(255, 255, 255, 0.05);
        margin: 2.5rem 0;
        border-radius: 8px;
    }

    /* Utilidades Globales de Animación y Scroll */
    .scrollbar-hide::-webkit-scrollbar { display: none; }
    .scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

    @keyframes loadingPulse {
        0%, 100% { opacity: 0.2; }
        50% { opacity: 0.5; }
    }

    .animate-pulse {
        animation: loadingPulse 2s ease-in-out infinite;
    }


    /* --- RESETS DE BLOG EN MÓVIL --- */
    .blogSwiper {
        padding-bottom: 40px !important;
    }

    .journal-text {
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }


   /* ==========================================================================
   12. REVIEWS CAROUSEL (SWIPER)
   ========================================================================== */
    .reviewsSwiper {
        width: 100%;
        overflow: hidden !important;
        padding: 10px 10px 40px 10px !important;
    }

    .reviewsSwiper .swiper-slide {
        height: auto;
        display: flex;
        align-items: stretch;
    }

    /* Contenedor de la Paginación de Reseñas */
    .reviews-pagination {
        position: absolute;
        bottom: 0px !important;
        left: 0;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .reviews-pagination .swiper-pagination-bullet {
        width: 8px !important;
        height: 8px !important;
        background: #cbd5e1 !important; /* slate-300 */
        opacity: 1 !important;
        border-radius: 50% !important;
        transition: all 0.3s ease !important;
        margin: 0 5px !important;
    }

    .reviews-pagination .swiper-pagination-bullet-active {
        width: 26px !important;
        border-radius: 4px !important;
        background: var(--color-purple-dark, #6b21a8) !important; /* purple-700 */
    }

    /* Ajustes responsivos integrados */
    @media (max-width: 767px) {
        .reviewsSwiper {
            padding-bottom: 30px !important;
        }
    }


    /* ==========================================================================
    13. GALLERY
    ========================================================================== */
    /* Ocultar barra de desplazamiento manteniendo la funcionalidad de scroll */
    .scrollbar-hide::-webkit-scrollbar { 
        display: none; 
    }
    .scrollbar-hide { 
        -ms-overflow-style: none; 
        scrollbar-width: none; 
    }

    /* Transición suave para todos los dots */
    .gallery-dot {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Estilo del dot activo */
    .gallery-dot[aria-selected="true"] {
        background-color: #a855f7; /* Color púrpura (purple-500) */
        width: 24px;
        border-radius: 4px;
    }

    /* Evita la fricción del "snap" al saltar de clones a elementos reales */
    #gallery-track:not(.scroll-smooth) .gallery-item {
        scroll-snap-align: none !important;
    }


   /* =============================================
   14. DIENTE ANIMACIÓN
   ============================================= */
    #master-wrap {
        position: relative;
        width: 100%;
        height: 100vh;
        overflow: hidden;
    }

    #moving-tooth {
        position: absolute;
        top: 2vh;
        left: 50%;
        transform: translateX(-50%);
        width: 650px;
        height: 750px;
        z-index: 100;
        overflow: visible;
        pointer-events: none;
        background: transparent !important;
        will-change: transform, width, height, top, left;
    }

    #inner-img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        background: transparent !important;
        transform: scale(1.1);
        will-change: transform;
    }

    .layer {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        display: flex;
        align-items: center;
    }

    .text-outline {
        -webkit-text-stroke: 1px rgba(0, 0, 0, 0.1);
        color: transparent;
    }

    /* Diente - Móvil */
    @media (max-width: 767px) {
        #moving-tooth {
            display: none !important;
        }

        .layer.bg-\[\#ffffff\] {
            padding-top: 100px !important;
            padding-bottom: 40px !important;
        }
    }


   /* =============================================
   15. OVERLAY PANELS (Optimizado)
   ============================================= */
   .overlay-panel {
        will-change: transform;
        /* Bloquea clics por defecto cuando está oculto */
        pointer-events: none; 
   }

   .overlay-panel.is-active {
        transform: translateY(0);
        pointer-events: auto;
   }

   /* --- ITEMS DE SERVICIOS --- */
   .service-item {
        opacity: 0;
        transform: translateY(-20px);
        /* La transición se queda aquí para que anime también al CERRARSE */
        transition: transform var(--transition-bounce), opacity var(--transition-bounce); 
   }

   .is-active .service-item {
        opacity: 1;
        transform: translateY(0);
   }

   /* Retrasos de entrada al activarse */
   .is-active .service-item:nth-child(1) { transition-delay: 0.3s; }
   .is-active .service-item:nth-child(2) { transition-delay: 0.4s; }
   .is-active .service-item:nth-child(3) { transition-delay: 0.5s; }
   .is-active .service-item:nth-child(4) { transition-delay: 0.6s; }

   /* --- ENLACES DE NAVEGACIÓN --- */
   .nav-link {
        opacity: 0;
        transform: translateY(30px);
        /* Animamos propiedades específicas en lugar de 'all' (mejora rendimiento) */
        transition: transform 0.5s ease-out, opacity 0.5s ease-out; 
   }

   #menu-overlay.is-active .nav-link {
        opacity: 1;
        transform: translateY(0);
   }

   /* Retrasos de entrada del menú */
   #menu-overlay.is-active .nav-link:nth-child(1) { transition-delay: 0.2s; }
   #menu-overlay.is-active .nav-link:nth-child(2) { transition-delay: 0.3s; }
   #menu-overlay.is-active .nav-link:nth-child(3) { transition-delay: 0.4s; }
   #menu-overlay.is-active .nav-link:nth-child(4) { transition-delay: 0.5s; }
   #menu-overlay.is-active .nav-link:nth-child(5) { transition-delay: 0.6s; }

   /* --- BACKDROP (FONDO) --- */
   .services-backdrop {
        opacity: 0;
        transition: opacity 0.4s ease;
        pointer-events: none;
   }

   .is-active .services-backdrop {
        opacity: 1;
        pointer-events: auto;
   }

   
   /* =============================================
   16. WHATSAPP BUTTON
   ============================================= */
    :root {
        /* Respaldo por si no tienes la variable definida */
        --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .whatsapp-button {
        position: fixed;
        bottom: 30px;
        right: 30px;
        width: 60px;
        height: 60px;
        background-color: #192D46;
        border: none;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 999;
        transition: all var(--transition-smooth);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    .whatsapp-button:hover {
        background-color: #25D366;
        transform: scale(1.1);
    }

    .whatsapp-button img {
        width: 30px;
        height: 30px;
    }

    .whatsapp-modal {
        position: fixed;
        bottom: 100px;
        right: 30px;
        width: 350px;
        background-color: white;
        border-radius: 12px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
        z-index: 998;
        display: flex;
        flex-direction: column;
        transition: opacity var(--transition-smooth), transform var(--transition-smooth);
    }

    .whatsapp-modal.hidden {
        opacity: 0;
        visibility: hidden;
        transform: translateY(20px);
        pointer-events: none;
    }

    .whatsapp-modal-header {
        background: linear-gradient(135deg, #25D366 0%, #20BA5A 100%);
        padding: 15px;
        border-radius: 12px 12px 0 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: white;
    }

    .whatsapp-header-content {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .whatsapp-close-btn {
        background: none;
        border: none;
        color: white;
        font-size: 24px;
        cursor: pointer;
        line-height: 1;
    }

    .whatsapp-modal-body {
        padding: 20px;
        background-color: #f9f9f9;
    }

    .whatsapp-message {
        font-size: 14px;
        color: #444;
        line-height: 1.5;
        margin: 0;
    }

    .whatsapp-modal-footer {
        padding: 15px;
        border-top: 1px solid #eee;
    }

    .whatsapp-input-group {
        display: flex;
        gap: 8px;
    }

    .whatsapp-input {
        flex: 1;
        padding: 10px 12px;
        border: 1px solid #ddd;
        border-radius: 6px;
        outline: none;
        color: #333333 !important;
        background-color: #ffffff !important;
        font-size: 16px !important;
        font-family: Arial, sans-serif;
    }

    .whatsapp-send-btn {
        background-color: #25D366;
        color: white;
        border: none;
        padding: 10px 15px;
        border-radius: 6px;
        cursor: pointer;
        font-weight: bold;
        transition: background-color var(--transition-smooth);
    }

    .whatsapp-send-btn:hover {
        background-color: #20BA5A;
    }

    /* WhatsApp - Móvil */
    @media (max-width: 480px) {
        .whatsapp-modal {
            width: calc(100% - 40px);
            right: 20px;
            bottom: 90px;
        }
    }


    /* =============================================
    17. FOOTER
    ============================================= */
    .footer-link {
        position: relative;
        padding-left: 0;
        transition: padding-left var(--transition-smooth), color 0.2s ease;
    }

    .footer-link:hover {
        padding-left: 8px;
        color: #ffffff;
    }


   /* =============================================
   18. IMPRESIÓN
   ============================================= */
    @media print {
        footer {
            background: var(--color-darker) !important;
            color: #fff !important;
        }

        footer a {
            color: var(--color-purple-light) !important;
        }

        footer .absolute,
        #moving-tooth,
        .whatsapp-button,
        .whatsapp-modal {
            display: none !important;
        }
    }



/* =============================================
   19. SCROLL OFFSET PARA NAVEGACIÓN
   ============================================= */
#Dentistas::before,
#blog::before,
#contact::before,
#services::before,
#reviews::before,
#gallery::before {
    content: '';
    display: block;
    height: 100px;
    margin-top: -100px;
    visibility: hidden;
    pointer-events: none;
}

@media (max-width: 767px) {
    #Dentistas::before,
    #blog::before,
    #contact::before,
    #services::before,
    #reviews::before,
    #gallery::before {
        height: 80px;
        margin-top: -80px;
    }
}