/* ========================================
   RESET & BASE
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Cores principais */
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #f3f4f6;
    --text: #1f2937;
    --text-light: #6b7280;
    --border: #e5e7eb;
    --white: #ffffff;
    --success: #10b981;

    /* Tipografia */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Espaçamentos */
    --container-width: 1200px;
    --section-padding: 5rem 1.5rem;

    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ========================================
   CONTAINER & SECTION
   ======================================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: var(--section-padding);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-light);
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* ========================================
   HEADER & NAVBAR
   ======================================== */
.header {
    position: sticky;
    top: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.navbar {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1.125rem;
}

.logo img {
    height: 40px;
    width: auto;
}

.logo-text {
    display: none;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    transition: color 0.2s;
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.btn-icon.instagram {
    color: #E4405F;
}

.btn-icon:hover {
    background: var(--secondary);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: all 0.3s;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--text);
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-primary-small,
.btn-secondary-small {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary-small {
    background: var(--primary);
    color: var(--white);
}

.btn-secondary-small {
    background: var(--secondary);
    color: var(--text);
}

/* ========================================
   HERO
   ======================================== */
.hero {
    padding: 6rem 1.5rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.hero-content {
    max-width: var(--container-width);
    margin: 0 auto;
    text-align: center;
}

.hero-logo {
    margin: 0 auto 2rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   SOBRE
   ======================================== */
.sobre-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.sobre-text {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sobre-description {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-light);
}

.cro-info {
    font-size: 1rem;
    color: var(--text);
    padding: 1rem;
    background: var(--secondary);
    border-radius: 8px;
}

.sobre-image img {
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

/* ========================================
   SERVIÇOS
   ======================================== */
.servicos {
    background: var(--secondary);
}

.servicos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.servico-card {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.servico-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dbeafe;
    border-radius: 12px;
    color: var(--primary);
}

.servico-categoria {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.servico-titulo {
    font-size: 1.5rem;
    font-weight: 700;
}

.servico-descricao {
    color: var(--text-light);
    line-height: 1.6;
}

/* ========================================
   AGENDE
   ======================================== */
.agende-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.agende-info {
    background: var(--white);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: var(--shadow);
}

.contact-item {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.contact-link {
    color: var(--primary);
    font-weight: 600;
    transition: color 0.2s;
}

.contact-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.horario {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-light);
}

.trafft-container {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border);
}

.trafft-container h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.trafft-placeholder {
    margin-top: 1.5rem;
}

/* ========================================
   CONTATO
   ======================================== */
.contato {
    background: var(--secondary);
}

.contato-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contato-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contato-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.contatos-lista {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mapa-placeholder {
    background: var(--white);
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.mapa-placeholder p {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--text);
    color: var(--white);
    padding: 3rem 1.5rem 2rem;
}

.footer-content {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.footer-logo img {
    border-radius: 50%;
}

.footer-cro {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.footer-text {
    color: #9ca3af;
    font-size: 0.875rem;
}

.footer-nav {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.footer-link {
    color: #9ca3af;
    font-size: 0.875rem;
    transition: color 0.2s;
}

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

/* ========================================
   COOKIE BAR
   ======================================== */
.cookie-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 1.5rem;
    box-shadow: 0 -4px 6px -1px rgb(0 0 0 / 0.1);
    z-index: 1000;
    display: flex;
    justify-content: center;
}

.cookie-bar[style*="display: none"] {
    display: none !important;
}

.cookie-content {
    max-width: var(--container-width);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cookie-text {
    flex: 1;
}

.cookie-text p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.5;
}

.cookie-text a {
    color: var(--primary);
    text-decoration: underline;
    font-weight: 600;
}

.cookie-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .cookie-actions {
        width: 100%;
    }

    .cookie-actions button {
        flex: 1;
    }
}

/* ========================================
   WHATSAPP FLUTUANTE
   ======================================== */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transition: transform 0.2s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* ========================================
   RESPONSIVO
   ======================================== */
@media (max-width: 768px) {
    /* Navbar mobile */
    .nav-menu {
        position: fixed;
        top: 73px;
        left: 0;
        right: 0;
        width: 100%;
        background: var(--white);
        display: flex;
        flex-direction: column;
        padding: 1.5rem;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        max-height: calc(100vh - 73px);
        overflow-y: auto;
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-100%);
        transition: all 0.3s ease-in-out;
        pointer-events: none;
    }

    .nav-menu.active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: all !important;
    z-index: 2000 !important; /* ensure it's above other fixed elements */
    }

    .nav-menu li {
        padding: 0.75rem 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-link {
        display: block;
        padding: 0.5rem 0;
        font-size: 1.1rem;
    }

    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 0.4rem;
        background: none;
        border: none;
        padding: 0;
        cursor: pointer;
    z-index: 2100; /* ensure button is above nav/menu and other fixed elements */
    pointer-events: auto;
    }

    .mobile-menu-toggle span {
        width: 25px;
        height: 3px;
        background: var(--text);
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(10px, 10px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .nav-actions .btn-primary {
        display: none;
    }

    /* Hero */
    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    /* Sobre */
    .sobre-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .sobre-image {
        order: -1;
    }

    /* Serviços */
    .servicos-grid {
        grid-template-columns: 1fr;
    }

    /* Contato */
    .contato-content {
        grid-template-columns: 1fr;
    }

    /* Cookie bar */
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    /* WhatsApp */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 1rem;
        right: 1rem;
    }

    .whatsapp-float svg {
        width: 24px;
        height: 24px;
    }
}

/* When menu is open, prevent body scroll and make sure menu stays on top */
body.menu-open {
    overflow: hidden;
}

/* Extra safety: ensure nav-menu shows when active even if other styles interfere */
@media (max-width: 768px) {
    .nav-menu {
        display: flex !important;
    }
}
