/**
 * Mounjaro - Estilos Personalizados
 * Versão: 1.0.0
 * Autor: Mounjaro Team
 */

/* ============================================
   Animações Personalizadas
   ============================================ */

@keyframes pulse-ring {
    0% {
        transform: scale(0.95);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.7;
    }
    100% {
        transform: scale(0.95);
        opacity: 1;
    }
}

@keyframes pulse-ring-outer {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.4;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes pulse-ring-inner {
    0% {
        transform: scale(1);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.25);
        opacity: 0.3;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(34, 197, 94, 0.6),
                    0 0 40px rgba(34, 197, 94, 0.4),
                    0 0 60px rgba(34, 197, 94, 0.2);
    }
    50% {
        box-shadow: 0 0 30px rgba(34, 197, 94, 0.8),
                    0 0 60px rgba(34, 197, 94, 0.6),
                    0 0 90px rgba(34, 197, 94, 0.4);
    }
}

@keyframes shake {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-5deg);
    }
    75% {
        transform: rotate(5deg);
    }
}

@keyframes tooltipSlide {
    from {
        opacity: 0;
        transform: translateX(10px) translateY(-50%);
    }
    to {
        opacity: 1;
        transform: translateX(0) translateY(-50%);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   Classes Utilitárias
   ============================================ */

.pulse-ring {
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.pulse-ring-outer {
    animation: pulse-ring-outer 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.pulse-ring-inner {
    animation: pulse-ring-inner 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.whatsapp-float {
    animation: float 3s ease-in-out infinite;
}

.whatsapp-glow {
    animation: glow 2s ease-in-out infinite;
}

.whatsapp-shake:hover {
    animation: shake 0.5s ease-in-out;
}

.tooltip-slide {
    animation: tooltipSlide 0.3s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

/* ============================================
   Melhorias de Acessibilidade
   ============================================ */

/* Foco visível para navegação por teclado */
*:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Redução de movimento para usuários que preferem */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   Otimizações de Performance
   ============================================ */

img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* ============================================
   Responsividade Avançada
   ============================================ */

@media (max-width: 640px) {
    .mobile-optimized {
        font-size: 0.875rem;
    }
}

/* ============================================
   Melhorias de UX
   ============================================ */

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.smooth-scroll {
    scroll-behavior: smooth;
}

/* ============================================
   Botão WhatsApp Premium
   ============================================ */

.whatsapp-button-wrapper {
    position: fixed !important;
    bottom: 1.25rem !important;
    right: 1.25rem !important;
    z-index: 99999 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

@media (min-width: 768px) {
    .whatsapp-button-wrapper {
        bottom: 1.5rem;
        right: 1.5rem;
    }
}

.whatsapp-button {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 60px !important;
    height: 60px !important;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4),
                0 8px 30px rgba(37, 211, 102, 0.3),
                0 0 0 0 rgba(37, 211, 102, 0.5) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer !important;
    overflow: visible !important;
    visibility: visible !important;
    opacity: 1 !important;
    text-decoration: none !important;
    border: none !important;
}

@media (min-width: 768px) {
    .whatsapp-button {
        width: 64px;
        height: 64px;
    }
}

.whatsapp-button:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.5),
                0 12px 40px rgba(37, 211, 102, 0.4),
                0 0 0 8px rgba(37, 211, 102, 0.1);
}

.whatsapp-button:active {
    transform: scale(0.95) translateY(0);
}

.whatsapp-button:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.3),
                0 4px 20px rgba(37, 211, 102, 0.4),
                0 8px 30px rgba(37, 211, 102, 0.3);
}

.whatsapp-icon {
    color: white !important;
    font-size: 1.75rem !important;
    z-index: 2 !important;
    position: relative !important;
    transition: transform 0.3s ease;
    display: block !important;
    visibility: visible !important;
}

@media (min-width: 768px) {
    .whatsapp-button {
        width: 64px !important;
        height: 64px !important;
    }
    
    .whatsapp-icon {
        font-size: 2rem !important;
    }
}

.whatsapp-button:hover .whatsapp-icon {
    transform: scale(1.1);
}

/* Anéis de pulso */
.whatsapp-pulse-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.whatsapp-pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(37, 211, 102, 0.6);
}

.whatsapp-pulse-ring-outer {
    animation: pulse-ring-outer 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.whatsapp-pulse-ring-inner {
    animation: pulse-ring-inner 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    border-width: 3px;
    border-color: rgba(37, 211, 102, 0.8);
}

/* Tooltip melhorado */
.whatsapp-tooltip {
    position: absolute;
    right: calc(100% + 1rem);
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 8px solid transparent;
    border-left-color: #1f2937;
}

.whatsapp-button-wrapper:hover .whatsapp-tooltip {
    opacity: 1;
    transform: translateX(-4px) translateY(-50%);
}

/* Badge de notificação (opcional) */
.whatsapp-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    border: 2px solid white;
    z-index: 3;
    animation: pulse-ring 2s ease-in-out infinite;
}

/* Efeito de brilho no hover */
.whatsapp-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.whatsapp-button:hover::before {
    width: 100%;
    height: 100%;
}

/* Animação de ripple */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Responsividade mobile */
@media (max-width: 640px) {
    .whatsapp-button-wrapper {
        bottom: 1.25rem;
        right: 1.25rem;
    }
    
    .whatsapp-tooltip {
        display: none;
    }
    
    .whatsapp-button {
        width: 56px;
        height: 56px;
    }
    
    .whatsapp-icon {
        font-size: 1.5rem;
    }
}

/* Transição suave para mostrar/esconder */
.whatsapp-button-wrapper {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Garantir que o botão não interfira com outros elementos */
.whatsapp-button-wrapper * {
    box-sizing: border-box;
}

/* ============================================
   Ícones Médicos Profissionais
   ============================================ */

.medical-card {
    position: relative;
    overflow: hidden;
}

.medical-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.medical-card:hover::before {
    opacity: 1;
}

.medical-icon-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.medical-icon-inner {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    z-index: 2;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.medical-icon-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    opacity: 0;
    transition: all 0.6s ease;
    z-index: 1;
}

.medical-card:hover .medical-icon-glow {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1.3);
    animation: medicalPulse 2s ease-in-out infinite;
}

.medical-card:hover .medical-icon-inner {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.2),
        0 6px 16px rgba(0, 0, 0, 0.15),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

/* Cores específicas para cada ícone médico */
.medical-icon-blue .medical-icon-inner {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 50%, #1e3a8a 100%);
}

.medical-icon-blue .medical-icon-glow {
    background: radial-gradient(circle, rgba(37, 99, 235, 0.4) 0%, transparent 70%);
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.5);
}

.medical-icon-green .medical-icon-inner {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 50%, #166534 100%);
}

.medical-icon-green .medical-icon-glow {
    background: radial-gradient(circle, rgba(22, 163, 74, 0.4) 0%, transparent 70%);
    box-shadow: 0 0 30px rgba(22, 163, 74, 0.5);
}

.medical-icon-purple .medical-icon-inner {
    background: linear-gradient(135deg, #9333ea 0%, #7e22ce 50%, #6b21a8 100%);
}

.medical-icon-purple .medical-icon-glow {
    background: radial-gradient(circle, rgba(147, 51, 234, 0.4) 0%, transparent 70%);
    box-shadow: 0 0 30px rgba(147, 51, 234, 0.5);
}

.medical-icon-yellow .medical-icon-inner {
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 50%, #a16207 100%);
}

.medical-icon-yellow .medical-icon-glow {
    background: radial-gradient(circle, rgba(234, 179, 8, 0.4) 0%, transparent 70%);
    box-shadow: 0 0 30px rgba(234, 179, 8, 0.5);
}

.medical-icon-red .medical-icon-inner {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 50%, #991b1b 100%);
}

.medical-icon-red .medical-icon-glow {
    background: radial-gradient(circle, rgba(220, 38, 38, 0.4) 0%, transparent 70%);
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.5);
}

.medical-icon-indigo .medical-icon-inner {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 50%, #3730a3 100%);
}

.medical-icon-indigo .medical-icon-glow {
    background: radial-gradient(circle, rgba(79, 70, 229, 0.4) 0%, transparent 70%);
    box-shadow: 0 0 30px rgba(79, 70, 229, 0.5);
}

/* Animação de pulso médico */
@keyframes medicalPulse {
    0%, 100% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(1.2);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.4);
    }
}

/* Efeito de profundidade nos cards */
.medical-card {
    backdrop-filter: blur(10px);
}

.medical-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
}

/* Melhorias de tipografia médica */
.medical-card h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
    font-size: 1.25rem;
}

.medical-card p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #4b5563;
}

/* Efeito de brilho sutil nos ícones */
.medical-icon-inner::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 20%;
    width: 30%;
    height: 30%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.medical-card:hover .medical-icon-inner::before {
    opacity: 1;
}

/* Linha decorativa superior nos cards */
.medical-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    opacity: 0;
    transition: opacity 0.5s ease, width 0.5s ease;
}

.medical-card:hover::after {
    opacity: 0.3;
    width: 100%;
}

/* Sombra interna para profundidade */
.medical-icon-inner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.2));
    border-radius: 0 0 50% 50%;
    pointer-events: none;
}

/* Responsividade para ícones médicos */
@media (max-width: 768px) {
    .medical-icon-wrapper {
        width: 72px;
        height: 72px;
    }
    
    .medical-icon-inner {
        font-size: 1.75rem;
    }
    
    .medical-card {
        padding: 1.5rem;
    }
}

/* ============================================
   Ícones da Galeria - Profissionais
   ============================================ */

.gallery-icon-wrapper {
    position: relative;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-icon-inner {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    z-index: 2;
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.12),
        0 3px 10px rgba(0, 0, 0, 0.08),
        inset 0 2px 4px rgba(255, 255, 255, 0.25);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2.5px solid rgba(255, 255, 255, 0.4);
}

.gallery-icon-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    opacity: 0;
    transition: all 0.5s ease;
    z-index: 1;
}

.gallery-icon-wrapper:hover .gallery-icon-glow {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1.4);
    animation: galleryPulse 2s ease-in-out infinite;
}

.gallery-icon-wrapper:hover .gallery-icon-inner {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 
        0 10px 28px rgba(0, 0, 0, 0.18),
        0 5px 14px rgba(0, 0, 0, 0.12),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

/* Cores específicas para cada ícone da galeria */
.gallery-icon-blue .gallery-icon-inner {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 50%, #1e3a8a 100%);
}

.gallery-icon-blue .gallery-icon-glow {
    background: radial-gradient(circle, rgba(37, 99, 235, 0.35) 0%, transparent 70%);
    box-shadow: 0 0 25px rgba(37, 99, 235, 0.4);
}

.gallery-icon-green .gallery-icon-inner {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 50%, #166534 100%);
}

.gallery-icon-green .gallery-icon-glow {
    background: radial-gradient(circle, rgba(22, 163, 74, 0.35) 0%, transparent 70%);
    box-shadow: 0 0 25px rgba(22, 163, 74, 0.4);
}

.gallery-icon-purple .gallery-icon-inner {
    background: linear-gradient(135deg, #9333ea 0%, #7e22ce 50%, #6b21a8 100%);
}

.gallery-icon-purple .gallery-icon-glow {
    background: radial-gradient(circle, rgba(147, 51, 234, 0.35) 0%, transparent 70%);
    box-shadow: 0 0 25px rgba(147, 51, 234, 0.4);
}

/* Animação de pulso para galeria */
@keyframes galleryPulse {
    0%, 100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1.3);
    }
    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.5);
    }
}

/* Efeito de brilho interno nos ícones da galeria */
.gallery-icon-inner::before {
    content: '';
    position: absolute;
    top: 18%;
    left: 18%;
    width: 35%;
    height: 35%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.7) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.gallery-icon-wrapper:hover .gallery-icon-inner::before {
    opacity: 1;
}

/* Sombra interna para profundidade */
.gallery-icon-inner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.25));
    border-radius: 0 0 50% 50%;
    pointer-events: none;
}

/* Responsividade para ícones da galeria */
@media (max-width: 768px) {
    .gallery-icon-wrapper {
        width: 48px;
        height: 48px;
    }
    
    .gallery-icon-inner {
        font-size: 1.25rem;
    }
    
    .gallery-icon-wrapper + h3 {
        font-size: 1rem;
    }
}
