/* RESET & VARIÁVEIS */
:root {
    --paper:    #F1F3F5;
    --paper-2:  #E7E9EC;
    --ink:      #0F1113;
    --ink-2:    #3A4145;
    --accent:   #7A5B3A;
    --accent-2: #B4885A;
    
    --font-serif: "Playfair Display", Georgia, serif;
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.15);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    margin: 0; padding: 0;
    font-family: var(--font-sans);
    color: var(--ink);
    background-color: var(--paper);
    line-height: 1.6;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* TIPOGRAFIA */
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 500; line-height: 1.2; margin-top: 0; }
em { font-style: italic; color: var(--accent); }
.text-center { text-align: center; }
.section-title { font-size: 2.25rem; margin-bottom: 1rem; color: var(--ink); }
.section-desc { font-size: 1.125rem; color: var(--ink-2); max-width: 600px; margin: 0 auto 2rem; }

/* CONTAINERS */
.container {
    width: 100%; max-width: 1200px;
    margin: 0 auto; padding: 0 1.5rem;
}
section { padding: 5rem 0; position: relative; }

/* ACESSIBILIDADE */
.skip-link {
    position: absolute; top: -40px; left: 0;
    background: var(--accent); color: white;
    padding: 8px; z-index: 1000;
}
.skip-link:focus { top: 0; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }

/* BOTÕES & CTAS */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.75rem 1.5rem; border-radius: 4px;
    font-weight: 600; cursor: pointer; transition: all 0.3s ease;
    border: none; text-align: center;
}
.btn-large { padding: 1rem 2rem; font-size: 1.125rem; }
.btn-primary {
    background: linear-gradient(115deg, var(--accent), var(--accent-2), var(--accent));
    background-size: 200% auto;
    color: #fff;
}
.btn-primary:hover { background-position: right center; transform: translateY(-2px); }
.btn-outline {
    background: transparent; border: 2px solid var(--accent);
    color: var(--accent);
}
.btn-outline:hover { background: var(--accent); color: #fff; }
.w-full { width: 100%; }

/* GRADIENTES E FUNDOS */
.grad-light { background: linear-gradient(130deg, var(--paper), var(--paper-2), #FFFFFF); }
.grad-dark {
    background: linear-gradient(115deg, var(--ink), #181B1F, var(--ink));
    color: var(--paper);
}
.text-light { color: var(--paper) !important; }

/* HEADER FIXO QUE RECOLHE */
.header {
    position: fixed; top: 0; left: 0; width: 100%;
    background: rgba(241, 243, 245, 0.95);
    backdrop-filter: blur(8px);
    z-index: 900; transition: padding 0.3s ease, box-shadow 0.3s ease;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.header.scrolled { padding: 0.5rem 0; box-shadow: var(--shadow-sm); }
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.logo-link { display: flex; align-items: center; gap: 0.75rem; }
.logo-img { height: 48px; width: 48px; object-fit: contain; }
.logo-text { display: flex; flex-direction: column; }
.logo-name { font-family: var(--font-serif); font-weight: 600; font-size: 1.125rem; }
.logo-crm { font-size: 0.75rem; color: var(--ink-2); letter-spacing: 0.5px; }
.menu-toggle { display: none; background: transparent; border: none; cursor: pointer; padding: 0.5rem; color: var(--ink); }
.nav-menu ul { display: flex; gap: 1.5rem; align-items: center; }
.nav-menu a { font-size: 0.875rem; font-weight: 500; color: var(--ink-2); transition: color 0.2s; }
.nav-menu a:hover { color: var(--accent); }
.header-cta { display: block; }

/* HERO SECTION */
.hero {
    min-height: 100vh;
    display: flex; align-items: center;
    padding-top: 100px; /* offset header */
    background: linear-gradient(130deg, var(--paper), var(--paper-2), #FFFFFF);
    position: relative; overflow: hidden;
}
.hero::after {
    content: ''; position: absolute; top: -20%; right: -10%;
    width: 600px; height: 600px; border-radius: 50%;
    background: radial-gradient(circle, rgba(122, 91, 58, 0.08) 0%, transparent 70%);
    pointer-events: none;
}
.hero-container { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.badge { display: inline-block; padding: 0.25rem 0.75rem; background: rgba(122,91,58,0.1); color: var(--accent); border-radius: 20px; font-size: 0.875rem; font-weight: 600; margin-bottom: 1.5rem; text-transform: uppercase; letter-spacing: 1px; }
.hero-title { font-size: 3.5rem; margin-bottom: 1.5rem; }
.hero-subtitle { font-size: 1.25rem; color: var(--ink-2); margin-bottom: 2.5rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-image-wrapper { position: relative; border-radius: 240px 240px 0 0; overflow: hidden; height: 600px; border: 1px solid var(--paper-2); }
.hero-img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

/* A MÉDICA */
.about-container { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.about-image-wrapper { border-radius: 8px; overflow: hidden; box-shadow: var(--shadow-lg); }
.about-content h2 { font-size: 2.5rem; }
.about-highlights { margin-top: 2rem; border-left: 2px solid var(--accent); padding-left: 1.5rem; }
.about-highlights li { margin-bottom: 0.75rem; font-weight: 500; }

/* ESTANTE DE LIVROS 3D */
.specialties { background-color: var(--ink); color: var(--paper); overflow: hidden; padding-bottom: 8rem; }
.specialties .section-title { color: var(--paper); }
.specialties .section-desc { color: #A0A5AA; }
.bookshelf-container {
    perspective: 1200px; position: relative; margin-top: 4rem;
    height: 400px; display: flex; justify-content: center;
}
.bookshelf {
    display: flex; gap: 0; justify-content: center; align-items: flex-end;
    transform-style: preserve-3d; margin: 0; padding: 0; width: 100%;
}
.book {
    position: relative; width: 60px; height: 350px; cursor: pointer;
    transform-style: preserve-3d; transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), margin 0.6s;
    transform-origin: left center; z-index: 1;
}
.book:hover { transform: translateZ(20px) rotateY(-5deg); z-index: 10; }
.book-cover {
    position: absolute; width: 260px; height: 100%; left: 0; top: 0;
    transform: rotateY(-90deg) translateZ(0); transform-origin: left;
    background: #1F1A16; overflow: hidden; border-radius: 2px 4px 4px 2px;
    box-shadow: inset 4px 0 10px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1);
}
.book-spine {
    position: absolute; width: 100%; height: 100%; left: 0; top: 0;
    background: linear-gradient(90deg, #181512, #2A241F 10%, #181512);
    border-radius: 2px 0 0 2px; box-shadow: inset -1px 0 2px rgba(255,255,255,0.1);
}
.book-bg { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; z-index: 0; opacity: 0.7; }
.book-text { position: absolute; z-index: 1; bottom: 2rem; left: 1.5rem; right: 1.5rem; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }
.book-num { font-family: var(--font-serif); font-size: 3rem; color: var(--accent); opacity: 0.8; line-height: 1; display: block; margin-bottom: 0.5rem; }
.book-title { font-size: 1.5rem; color: #fff; margin-bottom: 0.5rem; }
.book-subtitle { font-size: 0.875rem; color: #ddd; }

/* ESTADO ATIVO DO LIVRO */
.bookshelf.has-active .book { margin: 0 -30px; opacity: 0; pointer-events: none; transform: translateZ(-200px); }
.bookshelf.has-active .book.active {
    margin: 0 130px; opacity: 1; pointer-events: auto; z-index: 20;
    transform: translateZ(100px) rotateY(-25deg);
}
.btn-close-book {
    position: absolute; top: -2rem; right: 2rem; background: var(--accent); color: white;
    border: none; border-radius: 50%; width: 44px; height: 44px; font-size: 1.5rem;
    cursor: pointer; opacity: 0; pointer-events: none; transition: opacity 0.3s; z-index: 30;
}
.bookshelf-container.active .btn-close-book { opacity: 1; pointer-events: auto; }

/* O CUIDADO */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem; margin-top: 3rem; }
.step-card { background: #fff; padding: 2rem; border-radius: 8px; box-shadow: var(--shadow-sm); position: relative; border-top: 4px solid var(--accent); }
.step-num { font-family: var(--font-serif); font-size: 4rem; color: var(--paper-2); position: absolute; top: 0.5rem; right: 1rem; line-height: 1; font-weight: bold; }
.step-title { margin-bottom: 1rem; position: relative; z-index: 1; }

/* INTERVENCIONISTA */
.tech { background: linear-gradient(130deg, #fff, var(--paper)); }
.tech-container { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.tech-cards { display: flex; flex-direction: column; gap: 1.5rem; }
.tech-card { padding: 1.5rem; background: var(--paper); border-left: 2px solid var(--accent); }
.tech-card-title { margin-bottom: 0.5rem; color: var(--accent); }

/* DEPOIMENTOS */
.testimonials { overflow: hidden; }
.rating-badge { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; margin-bottom: 3rem; font-weight: 500; }
.carousel-container { position: relative; }
.carousel-wrapper { overflow: hidden; }
.carousel-track { display: flex; gap: 1.5rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -ms-overflow-style: none; padding-bottom: 2rem; }
.carousel-track::-webkit-scrollbar { display: none; }
.review-card {
    flex: 0 0 calc(33.333% - 1rem); scroll-snap-align: start;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    padding: 2rem; border-radius: 8px; display: flex; flex-direction: column;
}
.review-stars { color: #FFC107; font-size: 1.25rem; letter-spacing: 2px; margin-bottom: 1rem; }
.review-text { flex-grow: 1; font-style: italic; margin-bottom: 1.5rem; color: #E7E9EC; }
.review-author { font-weight: 600; color: #fff; display: flex; flex-direction: column; }
.review-author span { font-size: 0.75rem; color: #A0A5AA; font-weight: 400; }
.carousel-controls { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 1rem; }
.btn-prev, .btn-next { background: transparent; border: 1px solid rgba(255,255,255,0.3); color: white; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.btn-prev:hover, .btn-next:hover { background: var(--accent); border-color: var(--accent); }
.carousel-dots { display: flex; gap: 0.5rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.2); border: none; cursor: pointer; padding: 0; margin: 0 4px; position: relative; }
.dot::after { content: ''; position: absolute; top: -10px; bottom: -10px; left: -10px; right: -10px; } /* min 44px clicável */
.dot.active { background: var(--accent); }

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
details { background: #fff; border-radius: 4px; box-shadow: var(--shadow-sm); overflow: hidden; }
summary { padding: 1.5rem; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--accent); font-size: 1.5rem; line-height: 1; transition: transform 0.3s; }
details[open] summary::after { transform: rotate(45deg); }
.faq-content { padding: 0 1.5rem 1.5rem; color: var(--ink-2); }

/* LOCATION / CONTATO */
.location-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }
.address-box { font-style: normal; margin-bottom: 2rem; font-size: 1.125rem; }
.contact-info p { margin-bottom: 0.5rem; }
.contact-info a { color: var(--accent); font-weight: 600; }
.contact-form-wrapper { margin-top: 3rem; background: #fff; padding: 2rem; border-radius: 8px; box-shadow: var(--shadow-sm); }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; font-size: 0.875rem; }
.form-group input, .form-group textarea { width: 100%; padding: 0.75rem; border: 1px solid #ccc; border-radius: 4px; font-family: inherit; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(122,91,58,0.2); }
.location-map { border-radius: 8px; overflow: hidden; min-height: 400px; }

/* FOOTER */
.footer { padding: 4rem 0 2rem; font-size: 0.875rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer h4 { color: #fff; margin-bottom: 1.5rem; font-family: var(--font-sans); font-size: 1rem; }
.footer ul { display: flex; flex-direction: column; gap: 0.75rem; }
.footer a { color: #A0A5AA; transition: color 0.2s; }
.footer a:hover { color: var(--accent); }
.footer-brand img { margin-bottom: 1rem; }
.social-link { display: inline-flex; align-items: center; gap: 0.5rem; color: #fff !important; margin-top: 1rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 2rem; color: #A0A5AA; }

/* FAB WHATSAPP */
.fab-whatsapp {
    position: fixed; bottom: 24px; right: 24px; z-index: 999;
    background: #25D366; color: white; width: 60px; height: 60px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-lg); transition: transform 0.3s;
}
.fab-whatsapp:hover { transform: scale(1.1); }

/* COOKIE BAR */
.cookie-bar {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: #fff; box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000; padding: 1rem; display: flex;
    justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
    transform: translateY(100%); transition: transform 0.5s ease;
}
.cookie-bar.show { transform: translateY(0); }
.cookie-content { flex: 1; min-width: 280px; font-size: 0.875rem; }
.cookie-content a { color: var(--accent); text-decoration: underline; }
.cookie-actions { display: flex; gap: 0.5rem; align-items: center; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-icon { background: transparent; border: none; font-size: 1.5rem; cursor: pointer; color: var(--ink-2); width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }

/* MOBILE RESPONSIVE */
@media (max-width: 992px) {
    .hero-container, .about-container, .tech-container, .location-grid { grid-template-columns: 1fr; gap: 3rem; }
    .hero-title { font-size: 2.5rem; }
    .hero-image-wrapper { height: 400px; border-radius: 120px 120px 0 0; }
    .hero-img { object-position: 50% 20%; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
    .footer-brand { display: flex; flex-direction: column; align-items: center; }
    .review-card { flex: 0 0 calc(100% - 1rem); }
    .bookshelf-container { height: auto; overflow: hidden; }
    .bookshelf { flex-direction: column; align-items: center; gap: 1rem; perspective: none; transform-style: flat; padding: 2rem 0; }
    .book { width: 100%; max-width: 320px; height: 120px; transform: none !important; margin: 0 !important; opacity: 1 !important; pointer-events: auto !important; }
    .book-cover { position: relative; width: 100%; transform: none; box-shadow: var(--shadow-md); border-radius: 8px; }
    .book-spine { display: none; }
    .book-text { bottom: 1rem; left: 1rem; right: 1rem; display: flex; align-items: center; gap: 1rem; }
    .book-num { font-size: 2rem; margin-bottom: 0; }
    .book-title { font-size: 1.125rem; margin-bottom: 0; }
    .book-subtitle { display: none; }
    .btn-close-book { display: none; }
}

@media (max-width: 768px) {
    .header-cta { display: none; }
    .menu-toggle { display: block; }
    .nav-menu { position: absolute; top: 100%; left: 0; width: 100%; background: #fff; box-shadow: var(--shadow-md); padding: 1rem; flex-direction: column; gap: 1rem; display: none; }
    .nav-menu.active { display: flex; }
    .nav-menu ul { flex-direction: column; align-items: stretch; width: 100%; gap: 0; }
    .nav-menu a { display: block; padding: 1rem; border-bottom: 1px solid var(--paper-2); }
    .section-title { font-size: 2rem; }
    .cookie-bar { flex-direction: column; align-items: stretch; }
    .cookie-actions { justify-content: center; }
}

/* ANTI-COLISÃO COOKIE BAR / FAB */
@media (max-width: 1024px) {
    body.cookie-open .fab-whatsapp { bottom: 160px; }
}
