/* ==========================================================================
   Design System & Color Tokens (Clínica Oral Regale)
   ========================================================================== */

:root {
    /* Color Palette */
    --primary: #775c3b;
    --primary-light: #947754;
    --primary-dark: #5c4327;
    --accent: #fe770b; /* Star ratings */
    --text-dark: #242424;
    --text-muted: #666666;
    
    /* Backgrounds */
    --bg-white: #ffffff;
    --bg-light: #fcfcfc;
    --bg-beige-light: #f7f5ef;
    --bg-beige: #eeeade;
    
    /* Font Families */
    --font-serif: 'Source Serif 4', 'Georgia', serif;
    --font-sans: 'Source Sans 3', 'Roboto', 'Arial', sans-serif;
    
    /* Spacing & Borders */
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Box Shadows */
    --shadow-soft: 0 4px 20px rgba(119, 92, 59, 0.08);
    --shadow-hover: 0 10px 30px rgba(119, 92, 59, 0.15);
}

/* ==========================================================================
   Base Resets
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    font-size: 10px; /* Reset for rem units */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: 1.6rem;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
    overflow-x: hidden;
}

/* ==========================================================================
   Utility Layouts
   ========================================================================== */

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 100px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    outline: none;
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.3;
    text-align: center;
    box-sizing: border-box;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--bg-white);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Button 1: Hero button */
.btn-hero {
    width: 347px;
    height: 57px;
    font-size: 2.2rem;
    max-width: 100%; /* Safety cap for mobile */
}

/* Button 2 & 3: Specialties and About us button */
.btn-large {
    width: 484px;
    height: 54px;
    font-size: 1.8rem;
    max-width: 100%; /* Safety cap for mobile */
}

/* Button 5: FAQ button */
.btn-faq {
    width: 275px;
    height: 54px;
    font-size: 1.8rem;
    max-width: 100%; /* Safety cap for mobile */
}

/* Section Title styling */
.section-title {
    font-family: var(--font-serif);
    font-size: 3.6rem;
    line-height: 1.25;
    color: var(--primary);
    margin-bottom: 48px;
    font-weight: 500;
}

.section-title span {
    font-style: italic;
    color: var(--primary-light);
    font-weight: 400;
}

/* ==========================================================================
   Hero Section (Primeira Dobra)
   ========================================================================== */

.hero-section {
    background-color: var(--bg-white);
    padding: 40px 0 80px 0;
    overflow: hidden;
    position: relative;
}

.logo-container-hero {
    display: flex;
    justify-content: center; /* Center aligned logo */
    margin-bottom: 50px;
    width: 100%;
}

.logo-img-hero {
    height: 128.9px; /* Exact model dimension height */
    width: auto;
    display: block;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: 5.1rem; /* Exact size matching model */
    line-height: 1.15;
    color: var(--primary);
    margin-bottom: 28px;
    font-weight: 500;
}

.hero-subtitle {
    margin-bottom: 20px;
    max-width: 540px;
}

.hero-subtitle-line {
    font-size: 1.6rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 6px;
}

.hero-doctor-info {
    font-size: 2.0rem; /* Prominent size from model */
    color: var(--primary); /* Gold/bronze signature color */
    font-weight: 700;
    margin-top: 10px;
    line-height: 1.5;
    font-family: var(--font-sans);
}

.hero-callout {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    margin: 20px 0 32px 0;
    max-width: 520px;
    line-height: 1.5;
}

.hero-footer-text {
    font-size: 1.4rem;
    color: var(--primary);
    margin-top: 24px;
    font-style: italic;
}

.hero-image-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}

.hero-img {
    width: 100%;
    max-width: 440px;
    height: auto;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    object-fit: cover;
    aspect-ratio: 2 / 3;
    transition: var(--transition-smooth);
}

.hero-img:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   Specialties Section (Segunda Dobra)
   ========================================================================== */

.specialties-section {
    background-color: var(--primary);
    padding: 90px 0;
    overflow: visible;
}

.specialties-wrapper {
    position: relative;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
}

.floating-img-left {
    position: absolute;
    width: 362px;
    height: 356.5px;
    left: -154.5px;
    top: 179px;
    z-index: 1;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.2);
}

.floating-img-right {
    position: absolute;
    width: 238px;
    height: 291.7px;
    left: 722px;
    top: 194.8px;
    z-index: 1;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.2);
}

.specialties-card {
    position: relative;
    z-index: 10;
    width: 545px;
    margin: 0 auto;
    background-color: var(--bg-beige-light);
    border-radius: 20px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.25);
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card-title {
    font-family: var(--font-serif);
    font-size: 2.8rem;
    color: var(--primary);
    margin-bottom: 32px;
    text-align: center;
    font-weight: 700;
}

.card-title span {
    font-weight: 400;
}

.specialties-list {
    width: 100%;
    margin-bottom: 32px;
}

.specialty-item {
    display: flex;
    gap: 20px;
    align-items: center;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(119, 92, 59, 0.2);
}

.specialty-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.spec-img-wrapper {
    width: 74px;
    height: 117px;
    border-radius: 15px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.spec-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.spec-text {
    flex-grow: 1;
}

.spec-text h3 {
    font-family: var(--font-sans);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
}

.spec-text p {
    font-size: 1.35rem;
    color: var(--text-dark);
    line-height: 1.5;
}

.card-action {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* ==========================================================================
   Premium Section (Ambiente Premium)
   ========================================================================== */

.premium-section {
    background-color: var(--bg-beige);
    padding: 90px 0;
}

.premium-title {
    font-family: var(--font-serif);
    font-size: 3.6rem;
    color: var(--primary);
    margin-bottom: 48px;
    font-weight: 400;
}

.premium-title strong {
    font-weight: 700;
}

.premium-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 48px;
}

.premium-img-card {
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(119, 92, 59, 0.12);
    height: 180px;
}

.premium-img-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.premium-img-card:hover img {
    transform: scale(1.06);
}

.premium-action {
    display: flex;
    justify-content: center;
}

/* ==========================================================================
   Testimonials Section (Terceira Dobra)
   ========================================================================== */

.testimonials-section {
    background-color: var(--bg-white);
    padding: 100px 0;
    position: relative;
}

.testimonials-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, var(--bg-beige) 0%, transparent 100%);
    pointer-events: none;
    opacity: 0.5;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 960px;
    margin: 0 auto;
}

.testimonial-card {
    background-color: var(--bg-beige-light);
    border-radius: var(--border-radius-md);
    padding: 40px;
    box-shadow: var(--shadow-soft);
    position: relative;
    border-top: 4px solid var(--primary);
}

.stars {
    display: flex;
    gap: 4px;
    color: var(--accent);
    margin-bottom: 20px;
}

.star {
    width: 20px;
    height: 20px;
}

.testimonial-text {
    font-size: 1.6rem;
    line-height: 1.7;
    color: var(--text-dark);
    font-style: italic;
    margin-bottom: 24px;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}

.author-relation {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ==========================================================================
   About Us Section (Sobre Nós)
   ========================================================================== */

.about-section {
    background-color: var(--bg-beige-light);
    padding: 100px 0;
}

.about-container {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 60px;
    align-items: center;
}

.about-image-wrapper {
    position: relative;
    width: 100%;
}

.about-img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.about-img:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2);
}

.about-title {
    font-family: var(--font-serif);
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 28px;
    font-weight: 700;
}

.about-bio p {
    font-size: 1.6rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.75;
}

.about-bio strong {
    color: var(--primary);
    font-weight: 600;
}

/* ==========================================================================
   Location Section (Localização)
   ========================================================================== */

.location-section {
    background-color: var(--bg-white);
    padding: 90px 0;
}

.location-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
}

.location-address-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: var(--bg-beige-light);
    padding: 20px 32px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-soft);
    max-width: 800px;
    width: 100%;
    border-left: 4px solid var(--primary);
}

.icon-location {
    color: var(--primary);
    flex-shrink: 0;
}

.location-details strong {
    font-size: 1.6rem;
    color: var(--primary);
    display: block;
    margin-bottom: 4px;
}

.location-details p {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.map-container {
    width: 70%; /* Reduced by 30% to represent 70% layout size */
    max-width: 672px; /* 70% of 960px container */
    height: 315px; /* 70% of 450px */
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: 0 10px 35px rgba(119, 92, 59, 0.15);
    margin: 0 auto;
}

/* ==========================================================================
   FAQ Section (Quinta Dobra)
   ========================================================================== */

.faq-section {
    background-color: var(--bg-beige-light);
    padding: 100px 0;
}

.faq-container {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 60px;
    align-items: flex-start;
}

.faq-intro {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.faq-header-inline {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.faq-tag {
    font-family: var(--font-serif);
    font-size: 5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.faq-title-side {
    font-family: var(--font-serif);
    font-size: 2rem;
    line-height: 1.2;
    color: var(--primary);
    font-weight: 400;
}

.faq-title-main {
    font-family: var(--font-serif);
    font-size: 3.2rem;
    line-height: 1.25;
    color: var(--primary);
    margin-bottom: 12px;
    font-weight: 700;
}

.faq-subtitle {
    font-size: 1.6rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.faq-cta {
    align-self: flex-start;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background-color: #e5e5e5; /* Exact model gray */
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 20px 24px;
    font-family: var(--font-sans);
    font-size: 1.6rem;
    font-weight: 400;
    color: #444444;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    outline: none;
    transition: var(--transition-smooth);
}

.faq-question:hover {
    background-color: rgba(119, 92, 59, 0.05);
}

.faq-icon {
    transition: transform 0.3s ease;
    color: #666666;
}

/* Active FAQ Item state */
.faq-item.active {
    background-color: var(--bg-white);
    box-shadow: var(--shadow-soft);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg); /* Rotates plus to an X or simple rotation */
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
    padding: 0 24px;
}

.faq-item.active .faq-answer {
    max-height: 200px;
    padding: 0 24px 20px 24px;
}

.faq-answer p {
    font-size: 1.5rem;
    line-height: 1.6;
    color: var(--text-muted);
}

/* ==========================================================================
   Footer Styles (Centered and Aligned)
   ========================================================================== */

.main-footer {
    background-color: var(--bg-beige);
    padding: 40px 0;
    border-top: 1px solid rgba(119, 92, 59, 0.1);
    text-align: center; /* Centered layout matching print 3 */
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    font-size: 1.4rem;
    color: var(--text-muted);
}

.footer-link {
    color: inherit;
    text-decoration: underline;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.footer-link:hover {
    color: var(--primary);
}

.footer-phone-link {
    color: var(--text-dark);
    font-weight: 700;
    text-decoration: none;
}

.footer-phone-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.03);
    }
    100% {
        transform: scale(1);
    }
}

/* ==========================================================================
   Media Queries (Responsive Layouts & Mobile Optimizations)
   ========================================================================== */

@media (max-width: 992px) {
    html {
        font-size: 9px;
    }
    
    .logo-container-hero {
        justify-content: center;
        margin-bottom: 30px;
    }
    
    .logo-img-hero {
        height: 100px; /* Scaled down logo on tablets */
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    
    .hero-content {
        align-items: center;
    }
    
    .hero-title {
        font-size: 3.8rem;
    }
    
    .floating-img-left, .floating-img-right {
        display: none !important;
    }
    
    .specialties-card {
        width: 100%;
        max-width: 480px;
        padding: 40px 24px;
    }
    
    .premium-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .premium-img-card {
        height: 160px;
    }
    
    .about-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-image-wrapper {
        order: 2;
        max-width: 440px;
        margin: 0 auto;
    }
    
    .map-container {
        width: 100%; /* Expands to full container on smaller screens */
        height: 280px;
    }
    
    .faq-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .faq-intro {
        align-items: center;
        text-align: center;
        order: -1; /* Place FAQ titles on top on mobile */
    }
    
    .faq-header-inline {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 8px;
    }
    
    .logo-img-hero {
        height: 80px; /* Scaled down logo on mobile */
    }
    
    .hero-title {
        font-size: 3.2rem;
    }
    
    .hero-doctor-info {
        font-size: 1.8rem;
    }
    
    .hero-img, .about-img {
        box-shadow: none;
    }
    
    .hero-img:hover, .about-img:hover {
        box-shadow: none;
    }
    
    /* Strict Mobile Button Constraints to prevent view port breakages */
    .btn-hero, .btn-large, .btn-faq {
        width: 100%;
        max-width: 100%;
    }
    
    .specialties-card {
        padding: 30px 16px !important; /* Smaller padding on small viewports */
    }
    
    .specialty-item {
        gap: 12px;
    }
    
    .premium-grid {
        grid-template-columns: 1fr;
    }
    
    .premium-img-card {
        height: 180px;
    }
    
    .faq-tag {
        font-size: 4rem;
    }
    
    .faq-title-side {
        font-size: 1.8rem;
    }
    
    .faq-title-main {
        font-size: 2.6rem;
    }
}
