/* =========================================
   ENDOCRINOLOGIA — Color Override + Premium
   Base color: #D5C8B5 (beige/sand)
   ========================================= */

:root {
    --bg: #D5C8B5;
    --bg-alt: #C9BAA5;
    --surface: rgba(222, 213, 198, 0.82);
    --surface-2: rgba(235, 228, 216, 0.92);
    --bg-dark: #1A1410;
    --text: #1A1410;
    --text-2: #2A2218;
    --muted: #4A3F33;
    --muted-2: #6B5E4F;
    --accent: #8B7355;
    --primary: #6B5B4A;
    --accent-light: rgba(139, 115, 85, 0.12);
    --accent-glow: rgba(139, 115, 85, 0.25);
    --border: rgba(26, 20, 16, 0.12);
}

/* =========================================
   HERO — Layout fix + typography refinement
   ========================================= */

/*
 * BASE: .hero-section uses align-items:flex-end (styles.css).
 * With a long H1 ("Endocrinologia e Nutrologia na Asa Sul") the
 * total content stack exceeds viewport height → badge overflows
 * upward and gets clipped by overflow:hidden.
 * FIX: switch to center alignment + add top padding for fixed topbar.
 */
.hero-section {
    align-items: center;
}

.hero-inner {
    padding-top: 112px;  /* fixed topbar (~60px) + breathing room */
    padding-bottom: 72px;
}

/* Smaller H1 — this title is ~40% longer than other pages */
.hero-h1 {
    font-size: clamp(3rem, 4.2vw, 5.2rem);
    margin-bottom: 20px;
}

/* Specialty list — replaces plain <p class="hero-sub"> */
.hero-spec-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    border-left: 1px solid rgba(255, 255, 255, .18);
    padding-left: 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hero-spec-list li {
    font-size: .68rem;
    font-weight: 400;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .48);
    line-height: 2;
}

/* Highlight the current specialty (last item) */
.hero-spec-list li strong {
    font-weight: 600;
    color: rgba(255, 255, 255, .82);
}

/* Tighten body paragraph spacing */
.hero-body {
    margin-bottom: 32px;
}

/* =========================================
   TOPBAR / NAV OVERRIDES
   ========================================= */
.topbar {
    background: rgba(213, 200, 181, 0.25);
    border-bottom: 1px solid rgba(139, 115, 85, 0.12);
}

.rightnav {
    background: rgba(201, 186, 165, 0.65);
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.rnav-link:hover,
.rnav-link.active {
    background: rgba(255, 255, 255, 0.55);
    color: var(--primary);
}

/* =========================================
   STATS BAR
   ========================================= */
.stats-bar {
    background: var(--bg-alt);
}

.stat-icon {
    background: rgba(139, 115, 85, 0.14);
    border-color: rgba(139, 115, 85, 0.25);
}

/* =========================================
   SECTIONS — Color overrides
   ========================================= */

.problem-section {
    background-image: linear-gradient(180deg, var(--bg) 0%, rgba(201, 186, 165, 0.4) 100%);
}

.timeline-line {
    background: linear-gradient(to bottom, var(--accent), rgba(139, 115, 85, 0.12));
}

.timeline-dot {
    background: var(--bg);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(139, 115, 85, 0.12);
}

.auth-section {
    background: var(--bg-alt);
    background-image: linear-gradient(170deg, rgba(255, 255, 255, 0.12) 0%, transparent 60%);
}

/* Auth — 2-column cards layout */
.auth-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 48px;
}

.auth-card {
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(139, 115, 85, 0.12);
    border-radius: 8px;
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.08);
}

.auth-card-photo {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
    background: rgba(139, 115, 85, 0.1);
}

.auth-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.auth-card-name {
    font-family: var(--display);
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--text);
    line-height: 1.15;
}

.auth-card-name em {
    font-style: italic;
    color: var(--accent);
}

.auth-card-crm {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.auth-card-desc {
    font-size: .87rem;
    font-weight: 400;
    color: var(--muted);
    line-height: 1.75;
}

@media (max-width: 768px) {
    .auth-two-col {
        grid-template-columns: 1fr;
    }
}

/* Spec cards */
.spec-card {
    background: rgba(213, 200, 181, 0.6);
    border-color: rgba(139, 115, 85, 0.08);
}

.spec-card:hover {
    background: rgba(255, 255, 255, 0.65);
    border-color: rgba(139, 115, 85, 0.2);
}

.spec-card-icon {
    background: rgba(139, 115, 85, 0.12);
    border-color: rgba(139, 115, 85, 0.2);
}

.spec-card:hover .spec-card-icon {
    background: rgba(139, 115, 85, 0.22);
    border-color: rgba(139, 115, 85, 0.35);
}

/* Gallery */
.gallery-section {
    background: var(--bg-alt);
    background-image: linear-gradient(to bottom, var(--bg-alt), rgba(213, 200, 181, 0.7));
}

/* CTA */
.cta-section {
    background: var(--bg-dark);
}

.cta-section::before {
    background:
        radial-gradient(ellipse 60% 50% at 50% 110%, rgba(139, 115, 85, 0.25), transparent),
        radial-gradient(ellipse 40% 30% at 80% -10%, rgba(107, 91, 74, 0.1), transparent);
}

/* CRM chips */
.crm-chip {
    color: var(--accent);
    border-color: rgba(139, 115, 85, 0.35);
    background: rgba(255, 255, 255, 0.4);
}

/* =========================================
   WHY SECTION
   ========================================= */
.why-section {
    padding: 100px 0;
    background: var(--bg);
    position: relative;
    overflow: hidden;
}

.why-section::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 115, 85, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.why-header {
    text-align: center;
    margin-bottom: 72px;
}

.why-title {
    font-family: var(--display);
    font-size: clamp(2.6rem, 5vw, 4.6rem);
    font-weight: 300;
    color: var(--text);
    line-height: 1.1;
    letter-spacing: -.025em;
    margin-top: 12px;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.why-card {
    text-align: center;
    padding: 44px 28px 40px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(139, 115, 85, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    position: relative;
    overflow: hidden;
}

.why-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.why-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.55);
}

.why-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: rgba(139, 115, 85, 0.1);
    border: 1px solid rgba(139, 115, 85, 0.18);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.3s ease;
}

.why-card:hover .why-icon {
    background: rgba(139, 115, 85, 0.2);
    transform: scale(1.05);
}

.why-icon svg {
    width: 26px;
    height: 26px;
    stroke: var(--accent);
}

.why-card h3 {
    font-size: .95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.why-card p {
    font-size: .83rem;
    font-weight: 400;
    color: var(--muted);
    line-height: 1.7;
}

/* =========================================
   SOCIAL PROOF
   ========================================= */
.social-proof-section {
    background: var(--primary);
}

/* =========================================
   PROCEDIMENTOS
   ========================================= */
.proc-section::before,
.proc-section::after {
    background: radial-gradient(circle, rgba(139, 115, 85, .04) 0%, transparent 70%);
}

.proc-num { color: rgba(139, 115, 85, .06); }

.proc-item {
    background: rgba(255, 255, 255, .3);
    border-color: rgba(139, 115, 85, .1);
}

.proc-item:hover { border-color: rgba(139, 115, 85, .2); }

.proc-item::before {
    background: linear-gradient(180deg, var(--accent), rgba(139, 115, 85, .2));
}

.proc-icon {
    background: rgba(139, 115, 85, .07);
    border-color: rgba(139, 115, 85, .12);
}

.proc-item:hover .proc-icon { background: rgba(139, 115, 85, .14); }
.proc-icon svg { stroke: var(--accent); }

.proc-cta { color: var(--accent); }
.proc-cta::after { background: var(--accent); }
.proc-cta:hover { color: var(--text); }

/* =========================================
   SUBESPECIALIDADES
   ========================================= */
.subspecs-section {
    background-image: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 35%);
}

.subspecs-section::before {
    background: radial-gradient(circle, rgba(139, 115, 85, .04) 0%, transparent 65%);
}

.subspec-card {
    background: rgba(255, 255, 255, .3);
    border-color: rgba(139, 115, 85, .1);
}

.subspec-card::before {
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.subspec-card:hover {
    background: rgba(255, 255, 255, .55);
    border-color: rgba(139, 115, 85, .22);
}

.subspec-num { color: rgba(139, 115, 85, .12); }

.subspec-icon {
    background: rgba(139, 115, 85, .06);
    border-color: rgba(139, 115, 85, .1);
}

.subspec-card:hover .subspec-icon {
    background: rgba(139, 115, 85, .14);
    border-color: rgba(139, 115, 85, .25);
}

.subspec-icon svg { stroke: var(--accent); }
.subspec-card:hover .subspec-icon svg { stroke: var(--text); }

/* =========================================
   TESTIMONIALS
   ========================================= */
.testimonials-section {
    padding: 148px 0;
    background: var(--bg);
    background-image: linear-gradient(180deg, var(--bg) 0%, rgba(201, 186, 165, 0.25) 100%);
}

.testimonials-header {
    text-align: center;
    margin-bottom: 72px;
}

.testimonials-title {
    font-family: var(--display);
    font-size: clamp(2.6rem, 5vw, 4.6rem);
    font-weight: 300;
    color: var(--text);
    line-height: 1.1;
    letter-spacing: -.025em;
    margin-top: 12px;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(139, 115, 85, 0.1);
    border-radius: 6px;
    padding: 40px 32px;
    position: relative;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.08);
}

.testimonial-quote {
    position: absolute;
    top: 24px;
    left: 28px;
    font-family: var(--display);
    font-size: 4rem;
    line-height: 1;
    color: rgba(139, 115, 85, 0.15);
    user-select: none;
}

.testimonial-text {
    font-size: .9rem;
    font-weight: 400;
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 24px;
    margin-top: 28px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 14px;
}

.testimonial-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), rgba(139, 115, 85, 0.5));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--display);
    font-size: 1.1rem;
    font-weight: 500;
    color: white;
    flex-shrink: 0;
}

.testimonial-name {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.testimonial-role {
    font-size: .72rem;
    font-weight: 500;
    color: var(--muted-2);
    letter-spacing: .05em;
}

.testimonial-stars {
    display: flex;
    gap: 3px;
    margin-bottom: 4px;
}

.testimonial-stars svg {
    width: 14px;
    height: 14px;
    fill: #D4A853;
    stroke: none;
}

/* =========================================
   FAQ
   ========================================= */
.faq-section {
    padding: 148px 0;
    background: var(--bg-alt);
    background-image: linear-gradient(170deg, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
}

.faq-header {
    text-align: center;
    margin-bottom: 72px;
}

.faq-title {
    font-family: var(--display);
    font-size: clamp(2.6rem, 5vw, 4.6rem);
    font-weight: 300;
    color: var(--text);
    line-height: 1.1;
    letter-spacing: -.025em;
    margin-top: 12px;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(139, 115, 85, 0.1);
    border-radius: 5px;
    overflow: hidden;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.faq-item:hover { border-color: rgba(139, 115, 85, 0.2); }

.faq-item.open {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    border-color: rgba(139, 115, 85, 0.25);
}

.faq-question {
    padding: 22px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    gap: 16px;
    font-size: .93rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.5;
    user-select: none;
    transition: color 0.2s ease;
}

.faq-question:hover { color: var(--accent); }

.faq-toggle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(139, 115, 85, 0.1);
    border: 1px solid rgba(139, 115, 85, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.35s cubic-bezier(.4, 0, .2, 1), background 0.3s ease;
}

.faq-item.open .faq-toggle {
    transform: rotate(45deg);
    background: rgba(139, 115, 85, 0.2);
}

.faq-toggle svg {
    width: 14px;
    height: 14px;
    stroke: var(--accent);
    stroke-width: 2;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(.4, 0, .2, 1);
}

.faq-item.open .faq-answer { max-height: 400px; }

.faq-answer-inner {
    padding: 0 28px 24px;
    font-size: .88rem;
    font-weight: 400;
    color: var(--muted);
    line-height: 1.8;
}

/* =========================================
   BENEFITS STRIP
   ========================================= */
.benefits-strip {
    padding: 56px 0;
    background: var(--bg);
    border-top: 1px solid rgba(139, 115, 85, 0.08);
    border-bottom: 1px solid rgba(139, 115, 85, 0.08);
}

.benefits-grid {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .82rem;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: .02em;
}

.benefit-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(139, 115, 85, 0.12);
    border: 1px solid rgba(139, 115, 85, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.benefit-check svg {
    width: 12px;
    height: 12px;
    stroke: var(--accent);
    stroke-width: 2.5;
}

/* =========================================
   LEAD FORM
   ========================================= */
.lead-section {
    padding: 128px 0;
    background: var(--bg);
    background-image: linear-gradient(180deg, rgba(201, 186, 165, 0.3) 0%, var(--bg) 100%);
}

.lead-inner {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.lead-title {
    font-family: var(--display);
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 300;
    color: var(--text);
    line-height: 1.1;
    margin-bottom: 14px;
}

.lead-sub {
    font-size: .9rem;
    font-weight: 400;
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 40px;
}

.lead-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.lead-field { position: relative; }

.lead-field input,
.lead-field select {
    width: 100%;
    height: 56px;
    padding: 0 24px;
    border-radius: 4px;
    border: 1.5px solid rgba(139, 115, 85, 0.2);
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-family: var(--body);
    font-size: .88rem;
    font-weight: 400;
    color: var(--text);
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    appearance: none;
    -webkit-appearance: none;
}

.lead-field input::placeholder { color: var(--muted-2); font-weight: 400; }

.lead-field input:focus,
.lead-field select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(139, 115, 85, 0.1);
    background: rgba(255, 255, 255, 0.65);
}

.lead-field select { cursor: pointer; color: var(--muted-2); }
.lead-field select option { background: white; color: var(--text); }

.btn-lead {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 56px;
    padding: 0 48px;
    border-radius: 3px;
    border: none;
    background: var(--text);
    color: var(--white);
    font-family: var(--body);
    font-size: .88rem;
    font-weight: 600;
    letter-spacing: .05em;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    margin-top: 8px;
}

.btn-lead:hover {
    background: #111;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}

.lead-note {
    margin-top: 16px;
    font-size: .72rem;
    font-weight: 400;
    color: var(--muted-2);
    letter-spacing: .03em;
}

/* =========================================
   LOCATION
   ========================================= */
.location-section {
    padding: 128px 0;
    background: var(--bg);
}

.location-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.location-info h3 {
    font-family: var(--display);
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 24px;
}

.location-detail {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
}

.location-detail-icon {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: rgba(139, 115, 85, 0.1);
    border: 1px solid rgba(139, 115, 85, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.location-detail-icon svg { width: 18px; height: 18px; stroke: var(--accent); }

.location-detail-text {
    font-size: .88rem;
    font-weight: 400;
    color: var(--muted);
    line-height: 1.6;
}

.location-detail-text strong {
    display: block;
    color: var(--text);
    font-weight: 600;
    margin-bottom: 2px;
}

.location-map {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(139, 115, 85, 0.12);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    height: 360px;
}

.location-map iframe { width: 100%; height: 100%; border: none; }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
    .why-grid { grid-template-columns: repeat(2, 1fr); }
    .proof-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .hero-inner {
        padding-top: 88px;
        padding-bottom: 56px;
    }

    .hero-h1 { font-size: clamp(2.2rem, 7vw, 3rem); }

    .hero-spec-list { margin-bottom: 14px; }
    .hero-spec-list li { font-size: .65rem; }

    .why-grid { grid-template-columns: 1fr; }

    .proof-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .proof-number { font-size: 2.5rem; }
    .proof-item { padding: 24px 8px; }

    .testimonials-grid { grid-template-columns: 1fr; }

    .why-section,
    .testimonials-section,
    .faq-section,
    .lead-section,
    .location-section { padding: 88px 0; }

    .social-proof-section { padding: 56px 0; }

    .benefits-grid { flex-direction: column; align-items: center; gap: 16px; }

    .location-layout { grid-template-columns: 1fr; gap: 32px; }
    .location-map { height: 260px; }

    .auth-two-col { grid-template-columns: 1fr; }
}
