/* Profile Specific Nav Active State */

.nav-item-active {
    color: white !important;
    background-color: #0d9488 !important;
    box-shadow: 0 4px 12px -2px rgba(13, 148, 136, 0.3);
}

/* Hide Scrollbar Utility */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

@keyframes pulse-subtle {

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

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.animate-pulse-subtle {
    animation: pulse-subtle 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* [Nível 2] Skeleton Shimmer Effect */
.skeleton-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.container-fade-in {
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.container-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .mobile-crm-block {
        flex-wrap: nowrap !important;
        justify-content: center !important;
        text-align: center !important;
        margin-left: auto;
        margin-right: auto;
    }

    .mobile-agendar-btn {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
        font-size: 0.875rem !important;
    }
}

/* overflow-x originou problemas no sticky */


/* =============================================
           MOBILE OPTIMIZATIONS (LEGACY REMOVED)
           The new Slim Hero Card uses Tailwind for responsivity.
           ============================================= */


/* =============================================
   LEVEL 3: RICH ENGAGEMENT STYLES
   ============================================= */

/* 1. Lead Form Styles */
.lead-form-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lead-form-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    border-color: rgba(13, 148, 136, 0.2);
}

.input-premium {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: white;
    border: 1px solid #f3f4f6;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    transition: all 0.2s;
    outline: none;
}

.input-premium:focus {
    border-color: #0d9488;
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.05);
}

/* 2. Lightbox Modal */
#lightboxModal {
    backdrop-filter: blur(8px);
    transition: opacity 0.3s ease;
}

.lightbox-content {
    animation: zoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

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

/* 3. Micro-animations & Toggles */
.rotate-180 {
    transform: rotate(180deg);
}

.transition-transform {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#docBio {
    white-space: pre-wrap;
    word-break: break-word;
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Improved Reviews Container */
#reviewsContainer {
    transition: max-height 0.5s ease-in-out;
    overflow: hidden;
}

.review-item {
    transition: opacity 0.4s ease;
}

/* Expansion state for education */
#educationContainer {
    max-height: 480px;
    /* Suficiente para mostrar 2 itens confortavelmente */
    overflow: hidden;
    transition: max-height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Regra de Ouro: Esconder a partir do 3º item */
#educationContainer>div:nth-child(n+3) {
    display: none;
}

/* Quando expandido, mostra tudo e aumenta a altura máxima */
#educationContainer.expanded {
    max-height: 5000px;
}

#educationContainer.expanded>div:nth-child(n+3) {
    display: flex;
}

/* Lightbox Premium Styles */
#lightboxModal {
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    z-index: 9999;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 4px solid white;
    border-radius: 1rem;
    animation: zoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.service-item-mobile-fix {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}


/* =============================================
   ESTILO PADRÃO: CARD PREMIUM
   ============================================= */
.card-premium {
    background-color: #ffffff;
    border-radius: 2.25rem;
    border: 1px solid rgba(226, 232, 240, 0.6);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

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

/* [Nível 2] Premium Hero Card v2 - Evolution Compact Refined */
#heroCardMain {
    /* Agora usa .card-premium no HTML, mantendo apenas IDs específicos aqui */
    width: 100%;
}


@media (max-width: 1023px) {

    /* Reset Global para Forçar Responsividade */
    html,
    body {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        position: relative !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    *,
    ::before,
    ::after {
        box-sizing: border-box !important;
    }

    #profileMainContainer {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        margin: 0 auto !important;
        overflow: hidden !important;
    }

    #heroCardMain {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        border-radius: 1.5rem !important;
        padding: 1.25rem !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    .card-premium {
        border-radius: 1.5rem !important;
        padding: 1.25rem !important;
    }


    /* Forçar colapso de grids internos do Hero */
    #heroCardMain .grid {
        grid-template-columns: 1fr !important;
    }

    #stickyNav {
        width: 100% !important;
        max-width: 100% !important;
        left: 0 !important;
        top: 0 !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    #stickyNav>div {
        border-radius: 0 !important;
        margin-top: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
    }

    #stickyNav .flex {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        width: max-content !important;
        padding-right: 1rem !important;
    }

    /* Ocultar barra de rolagem no nav */
    #navScrollContainer {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    #navScrollContainer::-webkit-scrollbar {
        display: none;
    }

    /* Redução de fontes mobile para evitar quebras de layout */
    h1#docName {
        font-size: 1.4rem !important;
        line-height: 1.2 !important;
    }
}

/* Dynamically adjust font size for long names */
#docName {
    word-break: break-word;
    overflow-wrap: break-word;
    /* transition: font-size 0.2s ease; */
}

.gradient-text {
    background: linear-gradient(135deg, #0D9488, #2DD4BF);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pro-pill {
    background: #0f172a;
    /* Slate 900 */
    color: white;
    padding: 0.35rem 1rem;
    border-radius: 0.85rem;
    font-size: 10px;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 3px solid white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    z-index: 20;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pro-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.pro-pill-dot {
    width: 8px;
    height: 8px;
    background: #fbbf24;
    /* Amber 400 */
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.8);
}

.divider-vertical {
    display: inline-block;
    width: 1px;
    height: 12px;
    background-color: #e2e8f0;
    /* slate-200 */
    margin: 0 0.5rem;
    opacity: 0.6;
}

/* Slim Action Buttons */
.btn-premium-slim {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
    font-size: 14px !important;
    font-weight: 700 !important;
}

.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

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

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

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

/* IA Summary Item Dot Decoration */
.ia-dot {
    width: 6px;
    height: 6px;
    background-color: #34d399;
    /* emerald-400 */
    border-radius: 9999px;
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.5);
}

/* =============================================
   GALLERY MOBILE CAROUSEL STYLES
   ============================================= */
@media (max-width: 768px) {
    .gallery-mobile-carousel {
        display: flex !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        scroll-padding-left: 1rem !important;
        gap: 1rem !important;
        padding-bottom: 1.5rem !important;
        margin-left: -1.25rem !important;
        /* Compensa o padding do card para o carrossel "sangrar" até a borda */
        margin-right: -1.25rem !important;
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .gallery-mobile-carousel::-webkit-scrollbar {
        display: none;
    }

    .gallery-mobile-carousel>div {
        flex: 0 0 85% !important;
        /* 85% para deixar a pontinha do próximo visível */
        scroll-snap-align: center !important;
        margin-bottom: 0 !important;
    }
}

/* =============================================
   REFINEMENT: SEALS & CLINIC HOURS
   ============================================= */
.animate-in {
    animation: slideInFromTop 0.3s ease-out;
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

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

.seal-card:hover .icon-chevron {
    transform: translateY(2px);
}

.group\/hours:hover span {
    color: #0D9488;
}

/* =============================================
   CLINICS MOBILE CAROUSEL
   ============================================= */
@media (max-width: 768px) {
    .clinics-mobile-carousel {
        display: grid !important;
        grid-auto-flow: column !important;
        grid-auto-columns: 90% !important;
        /* Aumentado de 85% para 90% para dar mais respiro */
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        gap: 1.25rem !important;
        padding-bottom: 2.5rem !important;
        margin-left: -1.25rem !important;
        margin-right: -1.25rem !important;
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
        scrollbar-width: none;
        -ms-overflow-style: none;
        scroll-padding: 1.25rem;
        align-items: stretch !important;
        /* Força mesma altura em todas as colunas */
    }

    .clinics-mobile-carousel::-webkit-scrollbar {
        display: none;
    }

    /* Padronização de tamanho para todos os consultórios no carrossel */
    .clinics-mobile-carousel .clinic-card-item {
        height: 100% !important;
        scroll-snap-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        margin: 0 !important;
    }

    .clinics-mobile-carousel .clinic-card-item>div {
        flex: 1 !important;
        /* Garante que o conteúdo interno preencha a altura total */
        display: flex;
        flex-direction: column;
    }
}

/* Dots do Carrossel de Consultórios */
.clinic-dots-container {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: -0.5rem;
    padding-bottom: 1.5rem;
}

.clinic-dot {
    width: 6px;
    height: 6px;
    border-radius: 99px;
    background-color: #E2E8F0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.clinic-dot.active {
    width: 20px;
    background-color: #0D9488;
    box-shadow: 0 2px 4px rgba(13, 148, 136, 0.2);
}

/* =============================================
   PREMIUM MAP STYLES (Leaflet Customization)
   ============================================= */
.clinic-map-container {
    width: 100%;
    height: 12.5rem;
    min-height: 200px;
    /* Força altura mínima para não esmagar no mobile */
    background-color: #f1f5f9;
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(226, 232, 240, 0.6);
    z-index: 10;
}

@media (min-width: 768px) {
    .clinic-map-container {
        width: 16rem;
        /* Equivalent to w-64 */
    }
}

/* Custom Marker Styling */
.custom-map-marker {
    display: flex;
    align-items: center;
    justify-content: center;
}

.marker-pin {
    width: 30px;
    height: 30px;
    border-radius: 50% 50% 50% 0;
    background: #0D9488;
    position: absolute;
    transform: rotate(-45deg);
    left: 50%;
    top: 50%;
    margin: -15px 0 0 -15px;
    box-shadow: 0 0 15px rgba(13, 148, 136, 0.4);
    border: 3px solid white;
}

.marker-pin::after {
    content: '';
    width: 12px;
    height: 12px;
    margin: 6px 0 0 6px;
    background: white;
    position: absolute;
    border-radius: 50%;
}

/* Leaflet UI Overrides for Premium Look */
.leaflet-container {
    font-family: 'Inter', sans-serif !important;
    background: #f8fafc !important;
}

.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    margin: 12px !important;
}

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
    background-color: white !important;
    color: #0F172A !important;
    border: 1px solid #f1f5f9 !important;
    width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
    font-weight: bold !important;
}

.leaflet-control-zoom-in {
    border-radius: 8px 8px 0 0 !important;
}

.leaflet-control-zoom-out {
    border-radius: 0 0 8px 8px !important;
}

.leaflet-control-attribution {
    font-size: 8px !important;
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(4px);
    border-radius: 4px 0 0 0;
}

.map-loading-overlay {
    position: absolute;
    inset: 0;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: opacity 0.5s ease;
}

/* Animations & Popup Polish */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: translateY(-50px) rotate(-45deg);
    }

    60% {
        opacity: 1;
        transform: translateY(10px) rotate(-45deg);
    }

    80% {
        transform: translateY(-5px) rotate(-45deg);
    }

    100% {
        transform: translateY(0) rotate(-45deg);
    }
}

.animate-bounce-in {
    animation: bounceIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.premium-map-popup .leaflet-popup-content-wrapper {
    border-radius: 1rem !important;
    padding: 4px !important;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1) !important;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.premium-map-popup .leaflet-popup-content {
    margin: 12px !important;
    line-height: 1.4 !important;
}

.premium-map-popup .leaflet-popup-tip-container {
    margin-top: -1px !important;
}

/* Map Modal (Level 4) */
#mapModalOverlay {
    backdrop-filter: blur(8px);
    background-color: rgba(15, 23, 42, 0.8);
}

.map-modal-container {
    width: 95%;
    max-width: 900px;
    height: 80vh;
    background: white;
    border-radius: 2rem;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Fix for Zoom Button Z-Index (to avoid inline style CSP block) */
.btn-zoom-premium {
    z-index: 1001 !important;
}

#expandedMapContainer {
    width: 100%;
    height: 100%;
    background-color: #f8fafc;
}

/* [Nível 3] Animações para o Botão de Contato */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-fadeIn {
    animation: fadeIn 0.3s ease-out forwards;
}

#btnEvaluateHero span {
    transition: opacity 0.15s ease-in-out, transform 0.15s ease-in-out;
}