/**
 * Monica Zatta Tonial - Componentes Reutilizáveis (Navbar, Footer, Botões, Cards, Depoimentos)
 */

/* ==========================================
   NAVBAR (CABEÇALHO NOVO - ESTILO ILHA FLUTUANTE)
   ========================================== */
.main-header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: var(--container-width);
    z-index: 1000;
    background-color: #ffffff; /* Fundo totalmente sólido sem transparência */
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md); /* 16px */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: var(--transition-smooth);
}

/* Quando rolar a página, ela gruda no topo sutilmente ou diminui a margem */
.main-header.scrolled {
    top: 10px;
    width: 95%;
    background-color: #ffffff; /* Fundo totalmente sólido sem transparência */
    box-shadow: 0 15px 35px rgba(39, 171, 183, 0.08);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 25px;
    margin: 0 auto;
    width: 100%;
}

.logo-link img {
    height: 48px;
    width: auto;
    transition: var(--transition-smooth);
}

.main-header.scrolled .logo-link img {
    height: 40px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 25px; /* Reduzido de 40px para evitar quebra */
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 8px; /* Reduzido de 15px para evitar quebra */
}

.nav-item a {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.78rem; /* Reduzido de 0.82rem */
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.6px; /* Reduzido de 1px */
    padding: 6px 10px; /* Reduzido de 8px 12px */
    border-radius: var(--border-radius-sm);
    position: relative;
    white-space: nowrap; /* Força o texto a não quebrar */
    transition: var(--transition-smooth);
}

/* Efeito de fundo sutil no hover */
.nav-item a:hover {
    color: var(--primary-color);
    background-color: var(--primary-light);
}

/* Marcação de página ativa de forma moderna */
.nav-item.active > a {
    color: var(--primary-color);
    background-color: var(--primary-light);
}

/* Submenu "Terapias" (hover no desktop, clique no mobile) */
.nav-item-dropdown {
    position: relative;
}

.dropdown-toggle i {
    font-size: 0.7rem;
    margin-left: 4px;
    transition: transform 0.2s ease;
}

.nav-item-dropdown:hover .dropdown-toggle i,
.nav-item-dropdown.open .dropdown-toggle i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    min-width: 240px;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    margin: 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: var(--transition-smooth);
    z-index: 1001;
}

.nav-item-dropdown:hover .dropdown-menu,
.nav-item-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 10px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-color);
    border-radius: var(--border-radius-sm);
    white-space: nowrap;
}

.dropdown-menu li a:hover {
    color: var(--primary-color);
    background-color: var(--primary-light);
}

.dropdown-menu li.active a {
    color: var(--primary-color);
    background-color: var(--primary-light);
}

/* Seção de Redes Sociais no Header */
.social-icons-header {
    display: flex;
    gap: 12px;
    border-left: 1px solid var(--border-color);
    padding-left: 20px;
}

.icon-link {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--bg-alt);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--transition-fast);
}

.icon-link:hover {
    color: var(--white);
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Suporte responsivo a resoluções intermediárias (evita quebras entre desktop e mobile) */
@media (min-width: 992px) and (max-width: 1199px) {
    .social-icons-header {
        display: none; /* Oculta redes sociais para expandir área de menu */
    }
    .nav-menu {
        gap: 15px;
    }
    .nav-list {
        gap: 6px;
    }
    .nav-item a {
        font-size: 0.74rem;
        padding: 5px 8px;
    }
}

/* Menu Hamburguer (Mobile) */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--text-color);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-alt);
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.mobile-nav-toggle:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

@media (max-width: 991px) {
    .main-header {
        top: 15px;
        width: calc(100% - 30px);
    }
    
    .mobile-nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 75px;
        left: -105%;
        width: 100%;
        height: calc(100vh - 100px);
        background-color: #ffffff; /* Fundo totalmente sólido sem transparência */
        border-radius: var(--border-radius-md);
        border: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 30px;
        padding: 40px 20px;
        transition: var(--transition-smooth);
        z-index: 999;
    }

    .nav-menu.open {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }

    .nav-item {
        width: 100%;
        text-align: center;
    }

    .nav-item a {
        display: block;
        padding: 12px;
        font-size: 0.95rem;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-item-dropdown.open .dropdown-menu {
        max-height: 200px;
        margin-top: 8px;
    }

    .dropdown-menu li a {
        color: var(--text-muted);
        font-size: 0.85rem;
        text-align: center;
        padding: 10px;
    }

    .social-icons-header {
        border-left: none;
        padding-left: 0;
        margin-top: 20px;
        gap: 20px;
    }
}

/* ==========================================
   BOTÕES
   ========================================== */
.btn-premium {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: var(--border-radius-md);
    box-shadow: 0 4px 14px rgba(39, 171, 183, 0.3);
    transition: var(--transition-smooth);
    border: none;
    cursor: pointer;
}

.btn-premium i {
    margin-right: 8px;
    font-size: 1.1rem;
}

.btn-premium:hover {
    background-color: var(--primary-hover);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 171, 183, 0.4);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 12px 26px;
    border-radius: var(--border-radius-md);
    border: 2px solid var(--primary-color);
    transition: var(--transition-smooth);
    cursor: pointer;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* ==========================================
   CARDS DE TRATAMENTO / TERAPIAS
   ========================================== */
.therapy-card {
    background-color: var(--white);
    border-radius: var(--border-radius-md);
    padding: 40px 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
    text-align: center;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.therapy-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-premium);
    border-color: rgba(39, 171, 183, 0.2);
}

.therapy-icon {
    width: 70px;
    height: 70px;
    background-color: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: var(--primary-color);
    font-size: 1.8rem;
    transition: var(--transition-smooth);
}

.therapy-card:hover .therapy-icon {
    background-color: var(--primary-color);
    color: var(--white);
}

.therapy-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.therapy-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
}

/* ==========================================
   CARDS DE POSTS DO BLOG (PREVIEW & LISTAGEM)
   ========================================== */
.blog-card {
    background-color: var(--white);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.blog-card-img {
    height: 220px;
    overflow: hidden;
    position: relative;
    background-color: var(--bg-alt);
}

.blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.blog-card:hover .blog-card-img img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    gap: 15px;
}

.blog-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.blog-card-title {
    font-size: 1.15rem;
    line-height: 1.4;
    margin-bottom: 12px;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.5;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================
   CARROSSEL DE DEPOIMENTOS
   ========================================== */
.testimonial-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--white);
    border-radius: var(--border-radius-md);
    padding: 60px 50px 40px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    text-align: center;
}

.testimonial-quote-icon {
    font-size: 3rem;
    color: rgba(39, 171, 183, 0.15);
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.testimonial-track {
    overflow: hidden;
    position: relative;
}

.testimonial-item {
    display: none;
    animation: fadeIn 0.5s ease forwards;
}

.testimonial-item.active {
    display: block;
}

.testimonial-text {
    font-size: 1.1rem;
    font-style: italic;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 25px;
}

.testimonial-author {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 0.5px;
}

.testimonial-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.testimonial-btn {
    background: none;
    border: 2px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
}

.testimonial-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: var(--primary-light);
}

/* ==========================================
   RODAPÉ (FOOTER)
   ========================================== */
.main-footer {
    background-color: var(--bg-alt);
    padding: 60px 0 90px; /* Margem interna inferior aumentada para evitar colisão com o WhatsApp flutuante */
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 30px;
}

.footer-logo img {
    height: 60px;
    width: auto;
}

.footer-nav {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-nav-link {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
}

.footer-nav-link:hover {
    color: var(--primary-color);
}

.footer-socials {
    display: flex;
    gap: 20px;
}

.footer-social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: var(--transition-fast);
}

.footer-social-link:hover {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-copy {
    width: 100%;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-copy-left {
    text-align: left;
}

.footer-copy-right {
    text-align: right;
}

.link-mvirt {
    color: var(--text-muted);
    font-weight: 600;
}

.link-mvirt:hover {
    color: var(--primary-color);
}

@media (max-width: 767px) {
    .footer-copy {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-copy-left, .footer-copy-right {
        text-align: center;
        width: 100%;
    }
}

/* ==========================================
   BOTÃO DO WHATSAPP FLUTUANTE
   ========================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
}

.whatsapp-link-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.whatsapp-circle {
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: var(--transition-smooth);
}

.whatsapp-circle i {
    color: var(--white);
}

.whatsapp-tooltip {
    background-color: var(--white);
    color: var(--text-color);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 10px 18px;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-md);
    position: relative;
    white-space: nowrap;
    opacity: 0.95;
    transition: var(--transition-smooth);
    border: 1px solid var(--border-color);
}

/* Seta do balão de diálogo apontando para o ícone do WhatsApp */
.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background-color: var(--white);
    border-right: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
}

.whatsapp-link-wrapper:hover .whatsapp-circle {
    background-color: #128c7e;
    transform: scale(1.08) rotate(10deg);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.whatsapp-link-wrapper:hover .whatsapp-tooltip {
    transform: translateX(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.whatsapp-link-wrapper:hover .whatsapp-tooltip::after {
    border-right: 1px solid var(--primary-color);
    border-top: 1px solid var(--primary-color);
}

@media (max-width: 767px) {
    .whatsapp-circle {
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
    }
    
    .whatsapp-tooltip {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .whatsapp-tooltip {
        display: none;
    }
}
