:root {
    --primary-color: #9a748c;
    /* Mauve/Purple text */
    --secondary-color: #e39bb6;
    /* Pink accent */
    --button-bg: #eca9c5;
    --text-muted: #b08ea4;
    --bg-light: #fdfafb;

    --font-heading: 'Philosopher', serif;
    --font-text: 'Montserrat', sans-serif;
    --font-logo: 'Great Vibes', cursive;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* --- Entrance Animations --- */
.anim-slide-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.anim-slide-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.anim-fade-in {
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.anim-fade-in.visible {
    opacity: 1;
    transform: scale(1);
}

body {
    font-family: var(--font-text);
    background-color: var(--bg-light);
    color: var(--primary-color);
    overflow-x: hidden;
}

.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    /* Prevents centering container away from bottom */
    overflow: hidden;
    background: url('bgherodrpaula.png') center center / cover no-repeat;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    /* Push items bottom */
    position: relative;
    z-index: 10;
}

.hero-section .container {
    padding-bottom: 0;
    /* Ensures image hits absolute bottom */
}

/* --- Content Left --- */
.hero-content {
    flex: 1 1 50%;
    min-width: 300px;
    max-width: 600px;
    z-index: 10;
    align-self: center;
    /* Keep text vertically centered! */
    padding-bottom: 4rem;
}

.logo {
    margin-bottom: 3rem;
}

.logo-img {
    max-height: 120px;
    width: auto;
    object-fit: contain;
}

.main-heading {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 400;
    line-height: 1.15;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.sub-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-weight: 400;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--button-bg);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(236, 169, 197, 0.4);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(236, 169, 197, 0.6);
    background-color: #e59bb9;
}

.cta-button i {
    font-size: 1.3rem;
}

html {
    scroll-behavior: smooth;
}

/* --- Navigation --- */
.main-nav {
    position: static; /* Let container be handled by fixed elements */
}

.nav-toggle {
    display: flex !important; /* Always visible */
    position: fixed;
    top: 30px;
    right: 40px;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: var(--primary-color);
    cursor: pointer;
    z-index: 3000;
    box-shadow: 0 4px 20px rgba(154, 116, 140, 0.15);
    transition: all 0.3s ease;
}

.nav-toggle:hover {
    transform: scale(1.1);
    background: #fff;
    color: var(--secondary-color);
}

.nav-links {
    position: fixed;
    top: 0;
    right: -350px; /* Hidden by default */
    width: 350px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 3rem;
    gap: 2.5rem;
    list-style: none;
    z-index: 2500;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
    transition: all 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-links.active {
    right: 0;
}

.nav-link {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.5rem; /* Larger links in sidebar */
    transition: all 0.3s ease;
    display: block;
}

.nav-link:hover {
    color: var(--secondary-color);
    transform: translateX(10px);
}

.nav-logo {
    display: none; /* Hide logo part of the fixed nav bar structure */
}

/* Sidebar Overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    z-index: 2400;
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.nav-overlay.active {
    display: block;
    opacity: 1;
}

@media (max-width: 480px) {
    .nav-links {
        width: 100%;
        right: -100%;
    }
    
    .nav-toggle {
        top: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
}

.doctor-credentials {
    margin-top: 3rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    border-left: 2px solid var(--secondary-color);
    padding-left: 1rem;
}

/* --- Visual Right --- */
.hero-visual {
    flex: 1 1 50%;
    min-width: 0;
    position: relative;
    height: 95vh;
    /* Increased base height */
    display: flex;
    align-items: flex-end;
    align-self: flex-end;
    /* Pushes image flush to the bottom */
    z-index: 10;
}

.doctor-image-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
    transform: scale(1.15);
    /* Increased size! */
    transform-origin: bottom center;
    /* This anchors to the curve perfectly! */
}

.floating-icons-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 15;
    pointer-events: none;
    transform: scale(1.25);
    /* Accompanying floating icons */
    transform-origin: bottom center;
}

.doctor-img,
.floating-elements-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom center;
    display: block;
}

.floating-elements-img {
    animation: float 6s ease-in-out infinite;
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Bottom Curve */
.bottom-curve {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    z-index: 20;
    line-height: 0;
}

.bottom-curve svg {
    display: block;
    width: 100%;
    height: 60px;
}

/* --- Global Components --- */
.section-subtitle {
    display: inline-block;
    color: var(--secondary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--primary-color);
    line-height: 1.2;
    margin-bottom: 2rem;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* --- Dobra 2: Sobre --- */
.about-section {
    padding: 2rem 0 8rem 0;
    background-color: #fff;
}

.about-container {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.about-image {
    flex: 0.8;
    max-width: 450px;
}

.image-frame {
    position: relative;
    border-radius: 20px 100px 20px 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(154, 116, 140, 0.15);
    background: var(--bg-light);
    padding: 1rem;
}

.image-frame img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.about-content {
    flex: 1.2;
}

.about-text p {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.credentials-badges {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.badge {
    background-color: var(--bg-light);
    border: 1px solid var(--button-bg);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* --- Dobra 3: Serviços --- */
.services-section {
    padding: 8rem 0;
    background-color: var(--bg-light);
}

.services-container {
    flex-direction: column;
    align-items: center;
}

.section-header.text-center {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem auto;
}

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

.service-card {
    background: #fff;
    padding: 3rem 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(154, 116, 140, 0.05);
    transition: all 0.4s ease;
    border-bottom: 4px solid transparent;
}

.service-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(154, 116, 140, 0.15);
    border-color: var(--secondary-color);
}

.card-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1.5rem auto;
    color: var(--primary-color);
    font-size: 2.5rem;
    transition: all 0.4s ease;
}

.service-card:hover .card-icon {
    background: var(--secondary-color);
    color: #fff;
    transform: scale(1.1) rotate(5deg);
}

.service-card h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* --- Dobra 4: Clínica --- */
.clinic-section {
    padding: 8rem 0;
    background: #fff;
}

.clinic-container {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.clinic-content {
    flex: 1.2;
}

.clinic-content p {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.clinic-features {
    list-style: none;
    margin-bottom: 3rem;
}

.clinic-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.clinic-features li i {
    color: var(--secondary-color);
    font-size: 1.5rem;
}

.outline-button {
    display: inline-block;
    border: 2px solid var(--button-bg);
    color: var(--primary-color);
    padding: 1rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: transparent;
}

.outline-button:hover {
    background-color: var(--button-bg);
    color: #fff;
    transform: translateY(-2px);
}

.clinic-image-box {
    flex: 0.8;
    border-radius: 20px 100px 20px 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(154, 116, 140, 0.15);
    background: var(--bg-light);
    max-height: 500px;
}

.single-clinic-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
}

/* --- Dobra 5: Galeria em Movimento --- */
.gallery-section {
    padding: 4rem 0;
    background: var(--bg-light);
    overflow: hidden;
}

.gallery-marquee {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    margin-bottom: 1.5rem;
}

.marquee-track {
    display: flex;
    width: max-content;
}

.marquee-set {
    display: flex;
    gap: 1.5rem;
    padding-right: 1.5rem;
    /* The padding creates the exact gap between set 1 and set 2 */
}

.track-left {
    animation: scroll-left 60s linear infinite;
}

.track-right {
    animation: scroll-right 60s linear infinite;
}

.gallery-box {
    width: 300px;
    height: 220px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(154, 116, 140, 0.1);
    border: 1px solid #f8e1ec;
    transition: transform 0.3s;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
}

.gallery-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-box:hover {
    transform: scale(1.05);
}
/* --- Gallery Lightbox --- */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox-overlay.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    user-select: none;
}

.lightbox-close:hover {
    color: var(--secondary-color);
    transform: scale(1.2);
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes scroll-right {
    0% {
        transform: translateX(-50%);
    }

    100% {
        transform: translateX(0);
    }
}

/* --- Dobra 6: Depoimentos / Avaliações Google --- */
.reviews-section {
    padding: 8rem 0;
    background: var(--bg-light);
}

.reviews-container {
    flex-direction: column;
    gap: 3rem;
}

.google-rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border: 1px solid #f0dcea;
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    margin-top: 1.5rem;
    box-shadow: 0 5px 20px rgba(154, 116, 140, 0.1);
}

.google-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.badge-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.badge-stars {
    display: flex;
    gap: 2px;
    color: #FBBC04;
    font-size: 1rem;
}

.badge-info span {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0;
    text-transform: none;
    font-weight: 400;
}

.badge-info strong {
    color: var(--primary-color);
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    width: 100%;
}

.review-card {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(154, 116, 140, 0.08);
    border: 1px solid #f5e8f2;
    transition: all 0.35s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.review-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(154, 116, 140, 0.18);
    border-color: var(--secondary-color);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reviewer-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
    font-family: var(--font-heading);
}

.reviewer-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.reviewer-info strong {
    color: var(--primary-color);
    font-size: 0.95rem;
}

.reviewer-info span {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.google-small-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-left: auto;
}

.review-stars {
    display: flex;
    gap: 3px;
    color: #FBBC04;
    font-size: 0.95rem;
}

.review-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    flex: 1;
    margin: 0;
}

.google-review-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    align-self: center;
    margin-top: 1rem;
    padding: 0.9rem 2rem;
    background: #fff;
    border: 2px solid #e6d0e8;
    border-radius: 50px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(154, 116, 140, 0.08);
}

.google-review-link svg {
    width: 22px;
    height: 22px;
}

.google-review-link:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(154, 116, 140, 0.25);
}

/* --- Dobra 7: Contato --- */
.contact-section {
    padding: 8rem 0;
    background: #fff;
}

.contact-container {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.contact-info {
    flex: 1;
}

.contact-info p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.contact-card:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 10px 20px rgba(154, 116, 140, 0.1);
    transform: translateY(-5px);
}

.contact-card i {
    width: 60px;
    height: 60px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    color: var(--secondary-color);
    box-shadow: 0 5px 15px rgba(236, 169, 197, 0.2);
}

.contact-card div {
    display: flex;
    flex-direction: column;
}

.contact-card span {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-card strong {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 600;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.65rem 1.2rem;
    background: #fff;
    border: 1.5px solid #f0dcea;
    border-radius: 50px;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(154, 116, 140, 0.08);
}

.social-btn i {
    font-size: 1.2rem;
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

.social-btn:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(227, 155, 182, 0.35);
}

.social-btn:hover i {
    color: #fff;
}

.contact-map {
    flex: 1;
}

.map-placeholder {
    width: 100%;
    height: 400px;
    background: var(--bg-light);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
    font-size: 1.2rem;
    border: 2px dashed #e6a9cb;
}

.map-placeholder i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background: var(--primary-color);
    padding: 3rem 0;
    text-align: center;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-logo img {
    height: 60px;
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Responsiveness */
@media (max-width: 992px) {
    .container {
        flex-direction: column;
        text-align: center;
        padding-top: 5rem;
    }

    .logo {
        justify-content: center;
    }

    .doctor-credentials {
        border-left: none;
        padding-left: 0;
        border-top: 2px solid var(--secondary-color);
        padding-top: 1rem;
        margin-top: 2rem;
        display: inline-block;
    }

    .main-heading {
        font-size: 2.8rem;
    }

    .about-container,
    .clinic-container,
    .contact-container {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
    }

    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-title {
        font-size: 2.5rem;
    }

    .clinic-features li {
        justify-content: center;
    }

    .contact-card {
        text-align: left;
    }
}

@media (max-width: 576px) {
    .main-heading {
        font-size: 2.2rem;
    }

    .cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .clinic-image-grid {
        flex-direction: column;
    }

    .clinic-img-bg.placeholder-1 {
        margin-top: 0;
    }

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