/* ==========================================================================
   Dr. Thiago Grossi — Ortodontia
   Paleta original preservada: azul-marinho + dourado, fonte Poppins.
   ========================================================================== */

/* --- CSS RESET & BASIC SETUP --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

:root {
    --navy-950: #081d35;
    --navy-900: #0d2c4f;
    --navy-800: #123a63;
    --navy-700: #17456f;

    --gold: #c6a468;
    --gold-light: #e0b86e;
    --gold-dark: #a9854f;

    --cream: #f7f5f1;
    --ink: #22262b;
    --text-color: #d7deea;
    --muted: #6b7280;

    --font-display: 'Fraunces', 'Georgia', serif;
    --font-body: 'Poppins', sans-serif;

    --radius-sm: 10px;
    --radius-md: 18px;
    --radius-lg: 28px;
    --radius-full: 999px;

    --shadow-sm: 0 4px 14px rgba(8, 29, 53, 0.08);
    --shadow-md: 0 12px 30px rgba(8, 29, 53, 0.14);
    --shadow-lg: 0 24px 60px rgba(8, 29, 53, 0.22);
    --shadow-gold: 0 12px 26px rgba(198, 164, 104, 0.35);

    --section-padding: 110px 0;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body {
    font-family: var(--font-body);
    background-color: #ffffff;
    color: var(--ink);
    line-height: 1.7;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1140px;
    margin: 0 auto;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.1rem, 4.6vw, 3.4rem);
    color: #ffffff;
    letter-spacing: -0.01em;
}

h2 {
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    color: var(--navy-900);
}

h3 {
    font-size: 1.2rem;
    color: var(--gold-dark);
    margin-bottom: 10px;
    font-family: var(--font-body);
    font-weight: 600;
}

p {
    margin-bottom: 15px;
}

a {
    color: inherit;
}

/* --- SKIP LINK --- */
.skip-link {
    position: absolute;
    left: 1rem;
    top: -60px;
    background: var(--navy-900);
    color: #fff;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    z-index: 3000;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 1rem;
}

/* --- SHARED: EYEBROW, PILLS, SECTION HEADINGS --- */
.eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 14px;
    position: relative;
    padding-left: 26px;
}

.eyebrow::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 2px;
    background: var(--gold);
}

.section-heading {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 50px;
}

.section-heading .eyebrow {
    padding-left: 0;
}

.section-heading .eyebrow::before {
    display: none;
}

.section-hint {
    margin-top: 10px;
    color: var(--gold-light);
    font-size: 0.95rem;
    text-align: center;
}

.section-hint i {
    margin-right: 6px;
}

.credential-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(198, 164, 104, 0.4);
    background: rgba(198, 164, 104, 0.08);
    color: var(--gold-light);
    font-size: 0.85rem;
    font-weight: 500;
}

.pill i {
    color: var(--gold);
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    color: var(--navy-950);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-gold);
}

.btn-ghost {
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
    background: transparent;
}

.btn-ghost:hover {
    border-color: var(--gold);
    color: var(--gold);
    transform: translateY(-3px);
}

.btn-ghost-light {
    border-color: rgba(13, 44, 79, 0.25);
    color: var(--navy-900);
    background: transparent;
}

.btn-ghost-light:hover {
    border-color: var(--navy-900);
    background: rgba(13, 44, 79, 0.05);
    transform: translateY(-3px);
}

.btn-lg {
    padding: 16px 34px;
    font-size: 1.05rem;
}

.btn-sm {
    padding: 9px 20px;
    font-size: 0.85rem;
}

/* --- NAVBAR --- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--navy-950);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: box-shadow 0.3s ease, padding 0.3s ease;
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.navbar .logo img {
    height: 58px;
    display: block;
    transition: height 0.3s ease;
}

.navbar nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 10px 16px;
    border-radius: var(--radius-full);
    position: relative;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.nav-cta-item {
    margin-left: 8px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --- HERO SECTION --- */
#hero {
    position: relative;
    background: linear-gradient(160deg, var(--navy-900) 0%, var(--navy-950) 100%);
    padding: 110px 0 100px;
    color: #ffffff;
    overflow: hidden;
}

.hero-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(480px circle at 88% 8%, rgba(198, 164, 104, 0.18), transparent 60%),
        radial-gradient(420px circle at 6% 92%, rgba(198, 164, 104, 0.12), transparent 60%);
}

.hero-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.hero-text {
    flex: 1;
    min-width: 0;
}

.hero-text p {
    font-size: 1.15rem;
    margin: 18px 0 26px;
    color: var(--text-color);
    max-width: 46ch;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.hero-image {
    flex: 0 0 320px;
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-image-frame {
    position: relative;
    width: 300px;
    height: 300px;
}

.hero-image-frame::before {
    content: '';
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    border: 1.5px dashed rgba(198, 164, 104, 0.5);
    animation: spin 40s linear infinite;
}

.hero-image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid var(--gold);
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.hero-badge {
    position: absolute;
    left: -10px;
    bottom: 4px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    color: var(--navy-900);
    padding: 12px 18px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    font-size: 0.85rem;
    font-weight: 600;
}

.hero-badge i {
    color: var(--gold);
    font-size: 1.1rem;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- CONTENT SECTIONS --- */
.content-section {
    padding: var(--section-padding);
}

/* --- SOBRE SECTION --- */
.about-card {
    max-width: 720px;
    margin: 0 auto;
    background: var(--cream);
    border-radius: var(--radius-lg);
    padding: 46px 50px;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.about-quote {
    color: var(--gold);
    opacity: 0.35;
    font-size: 1.8rem;
    display: block;
    margin-bottom: 10px;
}

#sobre .subtitle {
    font-weight: 600;
    color: var(--navy-900);
    margin-bottom: 15px;
}

/* --- SERVICES SECTION --- */
.dark-bg {
    position: relative;
    background: linear-gradient(160deg, var(--navy-900) 0%, var(--navy-950) 100%);
    overflow: hidden;
}

.section-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(600px circle at 50% 0%, rgba(198, 164, 104, 0.1), transparent 60%);
}

.dark-bg h2 {
    color: #ffffff;
}

.dark-bg .container {
    position: relative;
}

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

.service-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 34px 30px;
    border-radius: var(--radius-md);
    color: var(--text-color);
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background-color 0.35s var(--ease), border-color 0.35s var(--ease);
    cursor: pointer;
}

.service-card:hover,
.service-card:focus-visible {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(198, 164, 104, 0.4);
    box-shadow: var(--shadow-lg);
    outline: none;
}

.service-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(198, 164, 104, 0.12);
    border: 1px solid rgba(198, 164, 104, 0.35);
    margin-bottom: 18px;
    transition: background-color 0.35s var(--ease), transform 0.35s var(--ease);
}

.service-icon i {
    font-size: 1.5rem;
    color: var(--gold);
    transition: color 0.35s var(--ease);
}

.service-card:hover .service-icon {
    background: var(--gold);
    transform: rotate(-6deg);
}

.service-card:hover .service-icon i {
    color: var(--navy-950);
}

.service-card p {
    font-size: 0.95rem;
    color: #b9c2d0;
    margin-bottom: 18px;
}

.service-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gold-light);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.service-link i {
    font-size: 0.75rem;
    transition: transform 0.3s var(--ease);
}

.service-card:hover .service-link i {
    transform: translateX(4px);
}

/* --- CONTACT SECTION --- */
#contato {
    background: var(--cream);
}

.contact-card {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 56px 50px;
    box-shadow: var(--shadow-md);
    border-top: 4px solid var(--gold);
}

.contact-card .eyebrow {
    justify-content: center;
}

.contact-card p {
    max-width: 520px;
    margin: 0 auto 30px auto;
    color: var(--muted);
}

.contact-actions {
    justify-content: center;
}

.contact-address {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #ece7de;
    font-style: normal;
    font-size: 0.9rem;
    color: var(--muted);
}

.contact-address i {
    color: var(--gold-dark);
}

.contact-address a {
    color: var(--navy-900);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* --- WHATSAPP FLOAT BUTTON --- */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    text-decoration: none;
    box-shadow: 2px 2px 14px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    z-index: 100;
}

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

.whatsapp-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #25D366;
    animation: pulse-ring 2.4s ease-out infinite;
    z-index: -1;
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 0.55; }
    100% { transform: scale(1.9); opacity: 0; }
}

/* --- FOOTER --- */
footer {
    background-color: var(--navy-950);
    color: var(--text-color);
    text-align: center;
    padding: 24px 0;
    font-size: 0.85rem;
}

.footer-nap {
    font-size: 0.85rem;
    color: #9aa7ba;
    margin-bottom: 8px;
}

/* --- MODAL STYLES --- */
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s var(--ease), opacity 0.25s var(--ease), visibility 0.25s;
    border-radius: var(--radius-md);
    z-index: 2001;
    background-color: #ffffff;
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow-lg);
}

.modal.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
}

.modal-content {
    padding: 0 34px 34px;
    position: relative;
    max-height: 82vh;
    overflow-y: auto;
}

.modal-header {
    position: sticky;
    top: 0;
    background: #ffffff;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 26px 0 16px;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    z-index: 1;
}

.modal-header i {
    color: var(--gold);
    font-size: 1.4rem;
    flex-shrink: 0;
}

.modal-header h2 {
    flex: 1;
    text-align: left;
    color: var(--navy-900);
    font-size: 1.4rem;
    margin: 0;
}

.modal-subheading {
    text-align: left;
    color: var(--navy-900);
    margin: 20px 0 15px;
    font-size: 1.3rem;
}

.modal-content h4 {
    color: var(--gold-dark);
    font-family: var(--font-body);
    font-weight: 600;
    margin-bottom: 8px;
}

.modal-content ul {
    list-style-position: inside;
    padding-left: 10px;
}

.modal-content ul li {
    margin-bottom: 10px;
}

.close-button {
    cursor: pointer;
    font-size: 1.6rem;
    line-height: 1;
    color: var(--muted);
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.close-button:hover {
    color: var(--navy-900);
}

body.modal-open {
    overflow: hidden;
}

#overlay {
    position: fixed;
    opacity: 0;
    transition: opacity 0.25s var(--ease);
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(8, 29, 53, 0.75);
    backdrop-filter: blur(2px);
    pointer-events: none;
    z-index: 2000;
}

#overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* --- SCROLL REVEAL --- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

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

    .reveal {
        transition: none;
        opacity: 1;
        transform: none;
    }

    .hero-image-frame::before,
    .whatsapp-ring {
        animation: none;
    }
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 960px) {
    .hero-content {
        gap: 40px;
    }
}

@media (max-width: 860px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: min(300px, 80vw);
        background: var(--navy-950);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 6px;
        padding: 100px 24px 24px;
        transform: translateX(100%);
        transition: transform 0.35s var(--ease);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
    }

    .nav-menu.open {
        transform: translateX(0);
    }

    .nav-link {
        width: 100%;
    }

    .nav-cta-item {
        margin-left: 0;
        margin-top: 10px;
    }

    .nav-cta-item .btn {
        width: 100%;
    }

    .navbar .logo img {
        height: 46px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 80px 0;
    }

    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
    }

    .hero-text p {
        max-width: none;
    }

    .credential-pills,
    .hero-actions {
        justify-content: center;
    }

    .hero-image {
        flex-basis: auto;
        flex-direction: column;
        align-items: center;
        gap: 16px;
        margin-bottom: 10px;
    }

    .hero-image-frame {
        width: 240px;
        height: 240px;
    }

    .hero-badge {
        position: static;
        transform: none;
        max-width: 90%;
        text-align: center;
        font-size: 0.8rem;
    }

    .about-card {
        padding: 36px 26px;
    }

    .contact-card {
        padding: 42px 26px;
    }
}

@media (max-width: 480px) {
    .btn-lg {
        width: 100%;
    }

    .hero-actions,
    .contact-actions {
        flex-direction: column;
    }

    .modal-content {
        padding: 0 22px 26px;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 10px 14px;
    }
}
