/* Camada estrutural compartilhada. Mantém a identidade visual atual e melhora
   navegação, acessibilidade, conversão e privacidade. */

:root {
    --focus-ring: #f4d58d;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 10000;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    background: #ffffff;
    color: #0b0b0b;
    font-weight: 700;
    transform: translateY(-160%);
    transition: transform 0.2s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 4px;
}

.site-nav {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 20;
    display: flex;
    width: 100%;
    min-height: 112px;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.25rem 5%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), transparent);
}

.site-logo {
    display: inline-flex;
    flex: 0 0 auto;
}

.site-logo img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.site-nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.4rem;
}

.site-nav-links > a:not(.btn) {
    color: var(--text-pure);
    font-size: 0.86rem;
    font-weight: 500;
    letter-spacing: 0.04em;
}

.site-nav-links > a:not(.btn):hover {
    color: var(--gold);
}

.site-nav .btn {
    padding: 0.75rem 1rem;
    font-size: 0.78rem;
}

.menu-toggle {
    display: none;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 4px;
    background: rgba(11, 11, 11, 0.65);
    color: #ffffff;
    cursor: pointer;
}

.menu-toggle-lines,
.menu-toggle-lines::before,
.menu-toggle-lines::after {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    content: "";
}

.menu-toggle-lines {
    position: relative;
}

.menu-toggle-lines::before {
    position: absolute;
    top: -7px;
}

.menu-toggle-lines::after {
    position: absolute;
    top: 7px;
}

/* Conteúdo permanece disponível mesmo se o JavaScript falhar. */
.fade-in-up {
    opacity: 1;
    transform: none;
    animation: content-enter 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes content-enter {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    font-size: clamp(2rem, 5vw, 2.5rem);
    text-wrap: balance;
}

.hero-title,
.hero-subtitle {
    text-wrap: balance;
}

.hero-bg picture,
.card picture,
.equipe-card picture,
.footer-logo picture {
    display: block;
    width: 100%;
    height: 100%;
}

.equipe-info .cro-number,
.privacy-header .cro-number {
    color: #b89365;
    font-size: 0.82rem;
}

.card:focus-within img,
.card:hover img {
    transform: scale(1.035);
    opacity: 0.48;
}

.card:focus-within .card-content,
.card:hover .card-content {
    transform: translateY(0);
}

.card:focus-within p,
.card:hover p {
    opacity: 1;
}

.section-processo {
    background: #0b0b0b;
}

.process-grid,
.trust-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.process-card,
.trust-card {
    padding: 2rem;
    border: 1px solid rgba(197, 160, 89, 0.2);
    border-radius: 8px;
    background: #151515;
}

.process-step {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    border: 1px solid var(--gold);
    border-radius: 50%;
    color: var(--gold);
    font-weight: 700;
}

.process-card h3,
.trust-card h3 {
    margin-bottom: 0.75rem;
    color: var(--gold);
    font-size: 1.45rem;
}

.process-card p,
.trust-card p {
    color: var(--text-muted);
}

.section-trust {
    background: var(--bg-surface);
}

.trust-card {
    text-align: center;
}

.trust-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.carousel-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 5%;
    margin-bottom: 1rem;
}

.carousel-instructions {
    color: var(--text-dim);
    font-size: 0.88rem;
}

.carousel-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.carousel-control {
    min-width: 44px;
    min-height: 44px;
    padding: 0.6rem 0.8rem;
    border: 1px solid rgba(197, 160, 89, 0.55);
    border-radius: 4px;
    background: #151515;
    color: var(--gold);
    cursor: pointer;
}

.carousel-control:hover {
    border-color: var(--gold);
    background: rgba(197, 160, 89, 0.1);
}

.carousel-track:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: -3px;
}

.carousel-slide {
    margin: 0;
}

.case-caption {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    padding: 3rem 1.25rem 1.1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.88), transparent);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    text-align: center;
}

.clinical-disclaimer {
    max-width: 920px;
    margin: 1.5rem auto 0;
    padding: 0 5%;
    color: var(--text-dim);
    font-size: 0.82rem;
    line-height: 1.6;
    text-align: center;
}

.clinical-responsibles {
    display: block;
    margin-top: 0.35rem;
    color: var(--text-muted);
}

.accordion-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.accordion-header {
    list-style: none;
}

.accordion-header::-webkit-details-marker {
    display: none;
}

.accordion-header::after {
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
    margin-left: 1rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    content: "";
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.accordion-item[open] .accordion-header {
    color: var(--gold);
}

.accordion-item[open] .accordion-header::after {
    transform: rotate(225deg);
}

.accordion-body {
    max-height: none;
    overflow: visible;
}

.accordion-content {
    padding: 0 0 1.5rem;
}

.section-contact {
    background: #0b0b0b;
}

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 3rem;
    align-items: start;
}

.contact-copy .section-title,
.contact-copy .section-subtitle {
    margin-right: 0;
    margin-left: 0;
    text-align: left;
}

.contact-points {
    display: grid;
    gap: 0.85rem;
    margin-top: 1.5rem;
    padding: 0;
    list-style: none;
}

.contact-points li {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
}

.contact-points li::before {
    color: var(--gold);
    content: "✓";
    font-weight: 700;
}

.contact-form {
    display: grid;
    gap: 1rem;
    padding: 2rem;
    border: 1px solid rgba(197, 160, 89, 0.2);
    border-radius: 8px;
    background: #151515;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-field {
    display: grid;
    gap: 0.4rem;
}

.form-field label,
.form-consent {
    color: var(--text-pure);
    font-size: 0.88rem;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    min-height: 48px;
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background: #0b0b0b;
    color: #ffffff;
    font: inherit;
}

.form-field textarea {
    min-height: 110px;
    resize: vertical;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: #9a9a9a;
}

.form-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.form-consent input {
    width: 20px;
    height: 20px;
    margin-top: 0.15rem;
    accent-color: var(--gold);
}

.form-note {
    color: var(--text-dim);
    font-size: 0.78rem;
}

.privacy-link {
    color: var(--gold);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.map-container {
    position: relative;
    min-height: 200px;
    background: #111111;
}

.map-btn {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
}

.map-consent {
    display: flex;
    min-height: 200px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1rem;
    color: var(--text-muted);
    text-align: center;
}

.map-consent p {
    margin: 0;
    font-size: 0.82rem;
}

.map-load-button {
    min-height: 44px;
    padding: 0.65rem 1rem;
    border: 1px solid var(--gold);
    border-radius: 4px;
    background: transparent;
    color: var(--gold);
    cursor: pointer;
}

.cookie-settings-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cookie-banner {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    z-index: 9998;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.25rem;
    max-width: 1080px;
    margin: 0 auto;
    padding: 1.25rem;
    border: 1px solid rgba(197, 160, 89, 0.45);
    border-radius: 8px;
    background: #151515;
    box-shadow: 0 16px 55px rgba(0, 0, 0, 0.65);
    color: var(--text-muted);
}

.cookie-banner[hidden],
.cookie-modal[hidden] {
    display: none;
}

.cookie-banner h2,
.cookie-modal h2 {
    margin-bottom: 0.35rem;
    color: #ffffff;
    font-size: 1.2rem;
}

.cookie-banner p {
    margin: 0;
    font-size: 0.9rem;
}

.cookie-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
}

.cookie-button {
    min-height: 44px;
    padding: 0.65rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
    font-weight: 600;
}

.cookie-button-primary {
    border-color: var(--gold);
    background: var(--gold);
    color: #0b0b0b;
}

.cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.78);
}

.cookie-dialog {
    width: min(100%, 560px);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    padding: 1.5rem;
    border: 1px solid rgba(197, 160, 89, 0.45);
    border-radius: 8px;
    background: #151515;
    color: var(--text-muted);
}

.cookie-option {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-option strong {
    display: block;
    color: #ffffff;
}

.cookie-option small {
    display: block;
    margin-top: 0.25rem;
    line-height: 1.45;
}

.cookie-option input {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    accent-color: var(--gold);
}

.cookie-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.65rem;
    margin-top: 1.25rem;
}

.privacy-main {
    min-height: 65vh;
    padding: 9rem 0 5rem;
    background: var(--bg-dark);
}

.privacy-header {
    max-width: 820px;
    margin-bottom: 3rem;
}

.privacy-header h1 {
    margin-bottom: 1rem;
    font-size: clamp(2.5rem, 6vw, 4rem);
}

.privacy-content {
    max-width: 820px;
}

.privacy-content h2 {
    margin: 2.5rem 0 0.8rem;
    color: var(--gold);
    font-size: 1.65rem;
}

.privacy-content p,
.privacy-content li {
    margin-bottom: 0.85rem;
}

.privacy-content ul {
    padding-left: 1.25rem;
}

@media (hover: none), (pointer: coarse) {
    .card img {
        opacity: 0.55;
    }

    .card .card-content {
        transform: translateY(0);
    }

    .card p {
        opacity: 1;
    }

}

@media (max-width: 860px) {
    .site-nav {
        min-height: 104px;
        align-items: flex-start;
    }

    .site-logo img {
        width: 72px;
        height: 72px;
    }

    .js-enabled .menu-toggle {
        display: inline-flex;
        margin-top: 0.35rem;
    }

    .site-nav-links {
        position: absolute;
        top: 92px;
        right: 5%;
        display: flex;
        width: min(90%, 340px);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.75rem;
        border: 1px solid rgba(197, 160, 89, 0.35);
        border-radius: 6px;
        background: rgba(11, 11, 11, 0.98);
        box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
    }

    .js-enabled .site-nav-links {
        display: none;
    }

    .js-enabled .site-nav-links.is-open {
        display: flex;
    }

    .site-nav-links > a {
        min-height: 48px;
        padding: 0.8rem;
    }

    .process-grid,
    .trust-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .carousel-heading-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .cookie-banner {
        grid-template-columns: 1fr;
    }

    .cookie-actions {
        justify-content: stretch;
    }

    .cookie-button {
        flex: 1 1 140px;
    }
}

@media (max-width: 520px) {
    section {
        padding: 4.5rem 0;
    }

    .hero-section {
        padding-right: 1.25rem;
        padding-left: 1.25rem;
    }

    .hero-title {
        font-size: clamp(2.35rem, 11vw, 3.2rem);
    }

    .section-title {
        font-size: clamp(1.9rem, 9vw, 2.25rem);
    }

    .process-card,
    .trust-card,
    .contact-form {
        padding: 1.4rem;
    }

    .carousel-instructions {
        display: none;
    }

    .carousel-control {
        padding: 0.55rem 0.7rem;
    }

    .whatsapp-float {
        width: 56px;
        height: 56px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .fade-in-up,
    .animate {
        opacity: 1 !important;
        transform: none !important;
    }
}
