/* ==========================================================================
   Avance Medicina Diagnóstica — estilos principais
   Cores extraídas da logomarca: azul-marinho, azul e verde.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
    --navy: #103359;
    --navy-900: #0a2240;
    --blue: #1e5fa0;
    --blue-100: #e8f1fb;
    --green: #4cb07d;
    --green-700: #2b7f55;       /* verde com contraste AA sobre branco */
    --green-100: #e6f6ee;
    --ink: #1c2b3a;
    --muted: #556577;
    --line: #e3eaf2;
    --soft: #f5f8fc;
    --white: #fff;

    --grad-brand: linear-gradient(135deg, var(--blue) 0%, var(--green) 100%);
    --grad-dark: linear-gradient(135deg, var(--navy-900) 0%, var(--blue) 100%);

    --font-head: "Montserrat", system-ui, sans-serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

    --radius: 1rem;
    --radius-lg: 1.5rem;
    --shadow-sm: 0 2px 8px rgba(16, 51, 89, .06);
    --shadow: 0 12px 32px rgba(16, 51, 89, .10);
    --shadow-lg: 0 24px 60px rgba(16, 51, 89, .16);
    --ease: cubic-bezier(.2, .7, .2, 1);
    --header-h: 84px;

    /* Integração com Bootstrap */
    --bs-body-font-family: var(--font-body);
    --bs-body-color: var(--ink);
    --bs-link-color-rgb: 30, 95, 160;
    --bs-link-hover-color-rgb: 16, 51, 89;
    --bs-focus-ring-color: rgba(30, 95, 160, .35);
}

/* ---------- 2. Base ---------- */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }

body {
    font-family: var(--font-body);
    color: var(--ink);
    line-height: 1.7;
    background: var(--white);
    padding-top: var(--header-h);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .h3, .h4 { font-family: var(--font-head); color: var(--navy); font-weight: 700; line-height: 1.2; }

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

a { transition: color .2s var(--ease); }

main:focus { outline: none; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.skip-link {
    position: absolute; left: 1rem; top: -100px; z-index: 2000;
    background: var(--navy); color: var(--white); padding: .75rem 1.25rem; border-radius: .5rem;
    text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 1rem; color: var(--white); }

.text-gradient { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- 3. Botões ---------- */
.btn { border-radius: 999px; font-weight: 600; letter-spacing: .01em; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s, color .25s; }
.btn-lg { padding: .85rem 1.75rem; font-size: 1rem; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-brand {
    --bs-btn-color: var(--white);
    --bs-btn-bg: var(--blue);
    --bs-btn-border-color: var(--blue);
    --bs-btn-hover-color: var(--white);
    --bs-btn-hover-bg: var(--navy);
    --bs-btn-hover-border-color: var(--navy);
    --bs-btn-active-bg: var(--navy-900);
    --bs-btn-active-color: var(--white);
    box-shadow: 0 8px 20px rgba(30, 95, 160, .25);
}
.btn-brand:hover { box-shadow: 0 12px 28px rgba(16, 51, 89, .30); }

.btn-outline-brand {
    --bs-btn-color: var(--navy);
    --bs-btn-border-color: rgba(16, 51, 89, .25);
    --bs-btn-hover-color: var(--white);
    --bs-btn-hover-bg: var(--navy);
    --bs-btn-hover-border-color: var(--navy);
    --bs-btn-active-bg: var(--navy-900);
    --bs-btn-active-color: var(--white);
    background: var(--white);
}

.link-arrow { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; text-decoration: none; color: var(--blue); }
.link-arrow i { transition: transform .25s var(--ease); }
.link-arrow:hover i { transform: translateX(4px); }

/* ---------- 4. Cabeçalho / menu ---------- */
.site-header {
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid transparent;
    transition: box-shadow .3s var(--ease), border-color .3s;
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); border-color: var(--line); }
.site-header .navbar { min-height: var(--header-h); padding-block: .5rem; transition: min-height .3s var(--ease); }
.site-header.is-scrolled .navbar { min-height: 68px; }

.brand-logo { width: 220px; height: auto; transition: width .3s var(--ease); }
.site-header.is-scrolled .brand-logo { width: 180px; }

.navbar-nav .nav-link {
    position: relative; color: var(--ink); font-weight: 500; padding: .5rem 1rem !important;
}
.navbar-nav .nav-link::after {
    content: ""; position: absolute; left: 1rem; right: 1rem; bottom: .2rem; height: 2px;
    background: var(--grad-brand); border-radius: 2px; transform: scaleX(0); transform-origin: left;
    transition: transform .3s var(--ease);
}
.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active { color: var(--navy); }
.navbar-nav .nav-link:hover::after, .navbar-nav .nav-link.active::after { transform: scaleX(1); }
.navbar-nav .nav-link.active { font-weight: 600; }

/* Hambúrguer animado */
.navbar-toggler { border: 0; padding: .6rem; width: 46px; height: 46px; display: none; flex-direction: column; justify-content: center; gap: 5px; border-radius: .75rem; }
.navbar-toggler:focus { box-shadow: 0 0 0 3px var(--bs-focus-ring-color); }
.toggler-bar { display: block; width: 24px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; margin-inline: auto; }
.navbar-toggler[aria-expanded="true"] .toggler-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar-toggler[aria-expanded="true"] .toggler-bar:nth-child(2) { opacity: 0; }
.navbar-toggler[aria-expanded="true"] .toggler-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 5. Seções ---------- */
.section { padding-block: 6rem; }
.section--soft { background: var(--soft); }

.section-head { max-width: 680px; margin: 0 auto 3.5rem; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.075rem; margin: 0; }
.section-title { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); font-weight: 800; margin-bottom: 1rem; }

.eyebrow {
    display: inline-flex; align-items: center; gap: .4rem;
    font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
    color: var(--green-700); background: var(--green-100);
    padding: .35rem .85rem; border-radius: 999px; margin-bottom: 1rem;
}

.lead-text { font-size: 1.15rem; color: var(--ink); }
p { color: var(--muted); }

.icon-badge {
    display: inline-grid; place-items: center; flex-shrink: 0;
    width: 56px; height: 56px; border-radius: 16px;
    background: var(--blue-100); color: var(--blue); font-size: 1.5rem;
    transition: background .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
}

/* ---------- 6. Hero ---------- */
.hero {
    position: relative; overflow: hidden;
    padding-block: 5rem 6rem;
    background:
        radial-gradient(60% 60% at 90% 10%, rgba(76, 176, 125, .12) 0%, transparent 60%),
        radial-gradient(50% 60% at 0% 100%, rgba(30, 95, 160, .10) 0%, transparent 60%),
        var(--white);
}
.hero-title { font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.6rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: 1.25rem; }
.hero-text { font-size: 1.15rem; max-width: 540px; margin-bottom: 2rem; }

.hero-badges { list-style: none; padding: 0; margin: 2.25rem 0 0; display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; }
.hero-badges li { display: flex; align-items: center; gap: .45rem; font-size: .95rem; font-weight: 500; color: var(--navy); }
.hero-badges i { color: var(--green-700); font-size: 1.1rem; }

.hero-visual { position: relative; max-width: 560px; margin-inline: auto; }
.hero-visual > img { width: 100%; animation: float 7s ease-in-out infinite; }

.floating-card {
    position: absolute; display: flex; align-items: center; gap: .75rem;
    background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: .8rem 1.1rem; font-size: .9rem; line-height: 1.3;
}
.floating-card i { font-size: 1.6rem; color: var(--green); }
.floating-card strong { display: block; color: var(--navy); font-family: var(--font-head); }
.floating-card span { color: var(--muted); }
.floating-card--top { top: 8%; right: 0; animation: float 6s ease-in-out infinite .5s; }
.floating-card--bottom { bottom: 6%; left: 0; animation: float 6s ease-in-out infinite 1.5s; }
.floating-card--bottom i { color: var(--blue); }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ---------- 7. Sobre ---------- */
.about-card {
    background: var(--grad-dark); color: var(--white);
    border-radius: var(--radius-lg); padding: 2.5rem; box-shadow: var(--shadow-lg);
    position: relative; overflow: hidden;
}
.about-card::after {
    content: ""; position: absolute; width: 240px; height: 240px; right: -80px; bottom: -80px;
    border-radius: 50%; background: rgba(76, 176, 125, .25);
}
.about-stat { display: flex; align-items: center; gap: 1rem; padding-bottom: 1.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid rgba(255, 255, 255, .15); }
.about-stat__num { font-family: var(--font-head); font-size: 3.25rem; font-weight: 800; line-height: 1; color: #8fe0b6; }
.about-stat__label { font-weight: 500; line-height: 1.4; }

.check-list { list-style: none; padding: 0; margin: 0; position: relative; z-index: 1; }
.check-list li { display: flex; gap: .75rem; padding-block: .45rem; }
.check-list li::before {
    content: "\F26E"; font-family: "bootstrap-icons"; color: #8fe0b6; font-size: 1.15rem; line-height: 1.5;
}

/* ---------- 8. Cards ---------- */
.feature-card, .service-card, .mvv-card, .pillar-card, .contact-card, .value-card {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
    transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.feature-card:hover, .service-card:hover, .mvv-card:hover, .pillar-card:hover, .contact-card:hover, .value-card:hover {
    transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent;
}

.feature-card { padding: 2rem; }
.feature-card h3 { font-size: 1.2rem; margin: 1.25rem 0 .6rem; }
.feature-card p { margin: 0; }
.feature-card:hover .icon-badge { background: var(--grad-brand); color: var(--white); transform: rotate(-6deg); }

.service-card { padding: 1.75rem 1.5rem; position: relative; overflow: hidden; }
.service-card::before {
    content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--grad-brand);
    transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.service-card:hover::before { transform: scaleX(1); }
.service-card > i { font-size: 2rem; color: var(--blue); display: block; margin-bottom: 1rem; }
.service-card h3 { font-size: 1.05rem; margin-bottom: .5rem; }
.service-card p { font-size: .925rem; margin: 0; }

/* ---------- 9. Etapas ---------- */
.steps {
    list-style: none; padding: 0; margin: 0;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; position: relative; counter-reset: none;
}
.steps--3 { grid-template-columns: repeat(3, 1fr); }
.steps::before {
    content: ""; position: absolute; top: 44px; left: 12%; right: 12%; height: 2px;
    background: repeating-linear-gradient(90deg, var(--green) 0 8px, transparent 8px 16px);
}
.step { text-align: center; position: relative; }
.step__icon {
    position: relative; display: inline-grid; place-items: center;
    width: 88px; height: 88px; border-radius: 50%; margin-bottom: 1.25rem;
    background: var(--white); color: var(--blue); font-size: 2rem;
    box-shadow: var(--shadow); border: 4px solid var(--blue-100);
    transition: transform .35s var(--ease);
}
.step:hover .step__icon { transform: scale(1.08); }
.step__num {
    position: absolute; top: -4px; right: -4px; width: 30px; height: 30px; border-radius: 50%;
    display: grid; place-items: center; font-size: .85rem; font-weight: 700; font-family: var(--font-head);
    background: var(--green-700); color: var(--white);
}
.step h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.step p { margin: 0 auto; max-width: 260px; }

/* ---------- 10. CTA ---------- */
.cta-box {
    display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
    background: var(--grad-dark); border-radius: var(--radius-lg); padding: 3.5rem;
    box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.cta-box::before {
    content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: -200px; border-radius: 50%;
    background: radial-gradient(circle, rgba(76, 176, 125, .45), transparent 70%);
}
.cta-box > * { position: relative; }
.cta-box h2 { color: var(--white); font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.2rem); font-weight: 800; }
.cta-box p { color: rgba(255, 255, 255, .85); margin: 0; font-size: 1.075rem; }
.cta-box .btn-light { color: var(--navy); }

/* ---------- 11. Páginas internas ---------- */
.page-hero {
    padding-block: 4.5rem 4rem; text-align: center; color: var(--white);
    background:
        radial-gradient(50% 80% at 85% 0%, rgba(76, 176, 125, .35), transparent 70%),
        var(--grad-dark);
}
.page-hero h1 { color: var(--white); font-size: clamp(2rem, 1.4rem + 2.5vw, 3rem); font-weight: 800; margin-bottom: .75rem; }
.page-hero p { color: rgba(255, 255, 255, .85); font-size: 1.1rem; margin: 0; }
.page-hero .breadcrumb { justify-content: center; margin-bottom: 1rem; --bs-breadcrumb-divider-color: rgba(255, 255, 255, .6); }
.page-hero .breadcrumb a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.page-hero .breadcrumb a:hover { color: var(--white); text-decoration: underline; }
.page-hero .breadcrumb-item.active { color: #8fe0b6; }

.timeline-card { background: var(--soft); border-radius: var(--radius-lg); padding: 2.5rem; border: 1px solid var(--line); }
.timeline-item { display: flex; gap: 1.25rem; align-items: center; position: relative; padding-bottom: 1.75rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item:not(:last-child)::after {
    content: ""; position: absolute; left: 32px; top: 64px; bottom: 0; width: 2px; background: var(--line);
}
.timeline-year {
    flex-shrink: 0; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
    background: var(--white); border: 2px solid var(--green); color: var(--navy);
    font-family: var(--font-head); font-weight: 700; font-size: .9rem;
}
.timeline-year i { font-size: 1.4rem; color: var(--blue); }
.timeline-item p { margin: 0; color: var(--ink); font-weight: 500; }

.mvv-card { padding: 2.5rem; }
.mvv-card h3 { margin: 1.25rem 0 .75rem; font-size: 1.5rem; }
.mvv-card p { margin: 0; font-size: 1.05rem; }

.value-card { padding: 1.5rem 1rem; text-align: center; }
.value-card i { font-size: 1.75rem; color: var(--green-700); }
.value-card h4 { font-size: 1rem; margin: .75rem 0 .4rem; }
.value-card p { font-size: .875rem; margin: 0; line-height: 1.5; }

.pillar-card { padding: 2rem; display: flex; gap: 1.5rem; align-items: flex-start; }
.pillar-card h3 { font-size: 1.25rem; margin-bottom: .6rem; }
.pillar-card p { margin: 0; }

/* Contato */
.contact-card { padding: 2rem 1.75rem; }
.contact-card__head { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.1rem; }
.contact-card__head .icon-badge { width: 48px; height: 48px; border-radius: 14px; font-size: 1.3rem; }
.contact-card h2 { font-size: 1.1rem; margin: 0; }
.contact-card address, .contact-card p { color: var(--muted); font-style: normal; }
.contact-card a { text-decoration: none; font-weight: 500; }
.contact-card a:hover { text-decoration: underline; }

.hours-list { list-style: none; padding: 0; margin: 0; font-size: .925rem; }
.hours-list li { display: flex; justify-content: space-between; gap: .75rem; padding-block: .3rem; border-bottom: 1px dashed var(--line); }
.hours-list li:last-child { border: 0; }
.hours-list span { color: var(--muted); }
.hours-list strong { color: var(--navy); font-weight: 600; white-space: nowrap; }

.map-wrapper { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 3; background: var(--blue-100); }
.map-wrapper iframe { width: 100%; height: 100%; border: 0; display: block; }
.location-list { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.location-list li { display: flex; gap: .85rem; padding-block: .55rem; border-bottom: 1px solid var(--line); color: var(--muted); }
.location-list li:last-child { border: 0; }
.location-list i { color: var(--blue); font-size: 1.15rem; }
.location-list strong { color: var(--navy); font-weight: 600; }
.location-list a { text-decoration: none; font-weight: 500; }
.location-list a:hover { text-decoration: underline; }

.btn-route { font-size: 1.15rem; letter-spacing: .06em; padding-block: 1.1rem; }

.form-card { background: var(--white); border-radius: var(--radius-lg); padding: 2.5rem; box-shadow: var(--shadow); height: 100%; }
.form-label { font-weight: 600; color: var(--navy); font-size: .925rem; }
.form-control { border-radius: .75rem; padding: .8rem 1rem; border-color: #cfd9e5; }
.form-control:focus { border-color: var(--blue); box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color); }
.form-status { margin-top: 1rem; }
.form-status:empty { display: none; }
.form-privacy { margin: 1rem 0 0; font-size: .85rem; text-align: center; }
.form-privacy i { color: var(--green-700); }
/* Campo-armadilha: fora da tela (não usar display:none, que alguns robôs detectam) */
.form-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Resultado */
.result-hero {
    padding-block: 5rem;
    background:
        radial-gradient(50% 70% at 100% 0%, rgba(76, 176, 125, .14), transparent 70%),
        radial-gradient(50% 70% at 0% 100%, rgba(30, 95, 160, .12), transparent 70%),
        var(--soft);
}
.result-panel {
    max-width: 720px; margin-inline: auto; text-align: center;
    background: var(--white); border-radius: var(--radius-lg); padding: 3.5rem 3rem; box-shadow: var(--shadow-lg);
}
.result-icon {
    display: inline-grid; place-items: center; width: 96px; height: 96px; border-radius: 28px;
    background: var(--grad-brand); color: var(--white); font-size: 2.75rem; margin-bottom: 1.5rem;
    box-shadow: 0 16px 32px rgba(30, 95, 160, .3);
}
.result-panel h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 2.8rem); font-weight: 800; margin-bottom: 1rem; }
.result-panel > p { font-size: 1.1rem; max-width: 540px; margin: 0 auto 2rem; }
.result-note { margin: 1.5rem 0 0; font-size: .9rem; }
.result-note i { color: var(--green-700); }

/* ---------- 12. Rodapé ---------- */
.site-footer { background: var(--navy-900); color: rgba(255, 255, 255, .75); padding-top: 5rem; }
.site-footer p { color: rgba(255, 255, 255, .75); }
.footer-logo { width: 240px; height: auto; }
.footer-title { color: var(--white); font-size: 1rem; font-weight: 700; margin-bottom: 1.25rem; text-transform: uppercase; letter-spacing: .06em; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .6rem; font-size: .95rem; }
.footer-links a, .footer-contact a { color: rgba(255, 255, 255, .75); text-decoration: none; }
.footer-links a:hover, .footer-contact a:hover { color: #8fe0b6; }
.footer-contact { font-style: normal; font-size: .95rem; }
.footer-contact p { display: flex; gap: .75rem; margin-bottom: .9rem; }
.footer-contact i { color: #8fe0b6; margin-top: .15rem; }

.social-list { list-style: none; padding: 0; margin: 0; display: flex; gap: .75rem; }
.social-list a {
    display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
    background: rgba(255, 255, 255, .08); color: var(--white); font-size: 1.15rem; text-decoration: none;
    transition: background .3s, transform .3s var(--ease);
}
.social-list a:hover { background: var(--green-700); transform: translateY(-3px); color: var(--white); }

.footer-bottom {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    margin-top: 4rem; padding-block: 1.75rem; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .875rem;
}
.back-to-top {
    flex-shrink: 0; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
    background: rgba(255, 255, 255, .08); color: var(--white); text-decoration: none; transition: background .3s;
}
.back-to-top:hover { background: var(--blue); color: var(--white); }

/* WhatsApp flutuante */
.whatsapp-float {
    position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 1030;
    width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
    background: #25d366; color: var(--white); font-size: 1.75rem; text-decoration: none;
    box-shadow: 0 10px 28px rgba(37, 211, 102, .45);
    transition: transform .3s var(--ease);
}
.whatsapp-float:hover { transform: scale(1.08); color: var(--white); }

/* ---------- 13. Animações de entrada ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- 14. Ajustes de espaçamento ---------- */
/* Cards de contato seguidos da seção do mapa: evita somar dois paddings completos */
.section.section--cards { padding-bottom: 2.5rem; }
.section.section--after-cards { padding-top: 3rem; }
/* Quebra primeiro após o "@" (<wbr>); só corta a palavra se ainda não couber */
.email-link { overflow-wrap: anywhere; }
