/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================================== */
:root {
    /* Color Palette */
    --color-primary: #9D8976;       /* Bronze Chiara */
    --color-primary-light: #b09c89;
    --color-secondary: #CBBCA8;     /* Beige Chiara */
    --color-secondary-light: #e0d6c8;
    --color-accent: #C5A059;        /* Gold/Champagne */
    --color-accent-gold: #D4AF37;
    --color-dark: #313131;          /* Charcoal */
    --color-dark-muted: #4e4e4e;
    --color-light: #F9F6F0;         /* Alabaster */
    --color-white: #ffffff;
    --color-gray-light: #f0ebe1;
    --color-danger: #d9534f;
    --color-whatsapp: #25d366;
    --color-whatsapp-dark: #128c7e;

    /* Fonts */
    --font-headings: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Transitions & Animations */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease-out;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(49, 49, 49, 0.05);
    --shadow-md: 0 8px 24px rgba(49, 49, 49, 0.08);
    --shadow-lg: 0 16px 48px rgba(49, 49, 49, 0.12);
    
    /* Layout */
    --max-width: 1200px;
    --header-height: 80px;
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-dark);
    background-color: var(--color-light);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    font-weight: 600;
    line-height: 1.25;
    color: var(--color-dark);
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

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

.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;
}

/* ==========================================================================
   BUTTONS & UI ELEMENTS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 28px;
    font-family: var(--font-headings);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--border-radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition-smooth);
    white-space: nowrap; /* Prevents button text from wrapping */
}

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

.btn-primary:hover {
    background-color: var(--color-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

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

.btn-lg {
    padding: 16px 36px;
    font-size: 1rem;
    border-radius: var(--border-radius-sm);
}

.btn-block {
    display: flex;
    width: 100%;
}

.icon-accent {
    color: var(--color-accent);
}

/* Section Common Styles */
section {
    padding: 60px 20px; /* Reduced vertical padding from 100px to 60px to eliminate excessive empty space */
}

.section-title {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    margin-bottom: 20px;
    font-weight: 500;
    letter-spacing: -0.5px;
    position: relative;
}

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

.section-subtitle {
    font-size: 1.1rem;
    color: var(--color-dark-muted);
    max-width: 700px;
    margin: 0 auto 60px auto;
}

/* ==========================================================================
   HEADER (CABEÇALHO)
   ========================================================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: rgba(249, 246, 240, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(203, 188, 168, 0.3);
    z-index: 1000;
    transition: var(--transition-smooth);
}

.main-header.scrolled {
    background-color: rgba(249, 246, 240, 0.95);
    height: 70px;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: var(--max-width);
    height: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-link, .main-nav, .header-cta {
    flex-shrink: 0; /* Prevents header components from shrinking and overlapping */
}

.main-nav {
    margin: 0 20px; /* Reduced to fit laptop viewports perfectly */
}

.header-cta {
    display: flex;
    align-items: center;
    gap: 8px; /* Reduced gap between buttons */
}

.btn-header {
    padding: 6px 12px !important; /* Compact button padding */
    font-size: 0.75rem !important; /* Compact button text size */
}

.mobile-only-cta {
    display: none;
}

.logo-img {
    height: 38px; /* Compact height to reduce horizontal width */
    width: auto;
    transition: var(--transition-smooth);
}

.main-header.scrolled .logo-img {
    height: 32px;
}

.nav-list {
    display: flex;
    gap: 12px; /* Compact gap for desktop links */
}

.nav-link {
    font-family: var(--font-headings);
    font-size: 0.78rem; /* Slightly smaller for premium look and fit */
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    color: var(--color-dark-muted);
    padding: 8px 0;
    position: relative;
    white-space: nowrap;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: var(--transition-smooth);
}

.nav-link:hover, .nav-link.active {
    color: var(--color-primary);
}

.nav-link.active::after, .nav-link:hover::after {
    width: 100%;
}

.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

/* ==========================================================================
   SEÇÃO 1: HERO
   ========================================================================== */
.hero-section {
    padding-top: calc(var(--header-height) + 60px);
    padding-bottom: 80px;
    background: linear-gradient(135deg, var(--color-light) 60%, rgba(203, 188, 168, 0.15) 100%);
    overflow: hidden;
}

.hero-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background-color: var(--color-white);
    border: 1px solid var(--color-secondary);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 500;
    color: var(--color-dark);
    line-height: 1.15;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--color-dark-muted);
    margin-bottom: 40px;
    max-width: 580px;
}

.hero-actions {
    display: flex;
    gap: 20px;
    margin-bottom: 48px;
}

.hero-actions .btn-primary {
    background-color: var(--color-primary);
}

.hero-features {
    display: flex;
    gap: 30px;
}

.feature-badge-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-dark-muted);
}

.feature-badge-item i {
    font-size: 1.1rem;
}

.hero-image-wrapper {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-image {
    width: 100%;
    height: 520px;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.hero-image-wrapper:hover .hero-image {
    transform: scale(1.03);
}

/* ==========================================================================
   SEÇÃO 2: SOBRE NÓS
   ========================================================================== */
.about-section {
    background-color: var(--color-white);
}

.about-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 80px;
    align-items: center;
}

.about-image-wrapper {
    position: relative;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

.about-image {
    width: 100%;
    height: 600px;
    object-fit: cover;
    border-radius: var(--border-radius-lg);
}

.about-floating-card {
    position: absolute;
    bottom: -30px;
    right: -30px;
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 30px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 250px;
}

.card-number {
    font-family: var(--font-headings);
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
}

.card-text {
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

.about-text {
    font-size: 1.05rem;
    color: var(--color-dark-muted);
    margin-bottom: 24px;
}

.about-pillars-title {
    font-family: var(--font-headings);
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-primary);
    margin-top: 36px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.about-pillars {
    margin-top: 40px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 992px) {
    .about-pillars {
        grid-template-columns: 1fr 1fr;
    }
    .pillar-item.featured-pillar {
        grid-column: span 2;
    }
}

.pillar-item {
    display: flex;
    gap: 20px;
}

.pillar-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background-color: var(--color-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.pillar-info h3 {
    font-size: 1.15rem;
    margin-bottom: 6px;
    font-weight: 600;
}

.pillar-info p {
    font-size: 0.95rem;
    color: var(--color-dark-muted);
}

/* ==========================================================================
   SEÇÃO: EXAMES
   ========================================================================== */
.exams-section {
    background-color: var(--color-light); /* Cream background to alternate with white */
    border-top: 1px solid rgba(203, 188, 168, 0.2);
}

.exams-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.exams-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.exam-card {
    background-color: var(--color-white);
    border: 1px solid rgba(203, 188, 168, 0.25);
    border-radius: var(--border-radius-md);
    padding: 40px 30px;
    width: calc(33.333% - 20px); /* 3 cards per row on desktop */
    min-width: 290px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

/* Premium glassmorphism border-top accent */
.exam-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-secondary) 0%, var(--color-primary) 100%);
    opacity: 0;
    transition: var(--transition-smooth);
}

.exam-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(188, 161, 120, 0.4);
}

.exam-card:hover::before {
    opacity: 1;
}

.exam-icon-wrapper {
    width: 65px;
    height: 65px;
    background-color: rgba(203, 188, 168, 0.15);
    color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 24px;
    transition: var(--transition-smooth);
}

.exam-card:hover .exam-icon-wrapper {
    background-color: var(--color-primary);
    color: var(--color-white);
    transform: scale(1.05);
}

.exam-card h3 {
    font-family: var(--font-headings);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 16px;
}

.exam-card p {
    font-size: 0.95rem;
    color: var(--color-dark-muted);
    line-height: 1.6;
}

/* Responsiveness for Exames */
@media (max-width: 991px) {
    .exam-card {
        width: calc(50% - 15px); /* 2 cards per row on tablet */
    }
}

@media (max-width: 768px) {
    .exam-card {
        width: 100%; /* 1 card per row on mobile */
    }
}

/* ==========================================================================
   SEÇÃO 3: ESPECIALIDADES
   ========================================================================== */
.specialties-section {
    background-color: var(--color-light);
}

.specialties-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

/* Core Specialties (3 Cards) */
.core-specialties-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 80px;
}

.core-card {
    background-color: var(--color-white);
    padding: 40px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(203, 188, 168, 0.2);
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

.core-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-secondary);
}

.core-icon-wrapper {
    width: 65px;
    height: 65px;
    background-color: var(--color-light);
    color: var(--color-primary);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 24px;
}

.core-card h3 {
    font-size: 1.3rem;
    margin-bottom: 16px;
    font-weight: 500;
}

.core-card p {
    font-size: 0.95rem;
    color: var(--color-dark-muted);
    margin-bottom: 28px;
    flex-grow: 1;
}

.core-link {
    font-family: var(--font-headings);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.core-link i {
    transition: var(--transition-fast);
}

.core-card:hover .core-link {
    color: var(--color-dark);
}

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

/* Multidisciplinary Specialties Section */
.multidisciplinary-container {
    background-color: var(--color-white);
    padding: 60px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(203, 188, 168, 0.2);
}

.multi-title {
    font-size: 1.6rem;
    font-weight: 500;
    text-align: center;
    margin-bottom: 10px;
}

.multi-subtitle {
    font-size: 1rem;
    color: var(--color-dark-muted);
    text-align: center;
    margin-bottom: 40px;
}

.filter-tabs-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.filter-tabs {
    display: flex;
    gap: 10px;
    background-color: var(--color-light);
    padding: 6px;
    border-radius: 50px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-tab {
    background: transparent;
    border: none;
    padding: 10px 24px;
    font-family: var(--font-headings);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 50px;
    color: var(--color-dark-muted);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.filter-tab.active, .filter-tab:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    box-shadow: var(--shadow-sm);
}

/* Specialties Grid to Filter */
.specialties-tags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    min-height: 180px;
    transition: var(--transition-smooth);
}

.specialty-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background-color: var(--color-light);
    border: 1px solid rgba(203, 188, 168, 0.3);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-dark-muted);
    transition: all 0.25s ease-out;
}

.specialty-tag i {
    color: var(--color-accent);
}

.specialty-tag:hover {
    background-color: var(--color-white);
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Filter Tag Animation classes */
.specialty-tag.hide {
    display: none;
    opacity: 0;
    transform: scale(0.9);
}

.specialty-tag.show {
    display: inline-flex;
    animation: fadeInTag 0.3s ease-out forwards;
}

@keyframes fadeInTag {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(5px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.specialties-cta {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

/* ==========================================================================
   SEÇÃO 4: GALERIA E ESTRUTURA
   ========================================================================== */
.gallery-section {
    background-color: var(--color-white);
}

.gallery-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    transition: var(--transition-smooth);
}

.gallery-item.hidden-item {
    display: none;
    opacity: 0;
}

.gallery-grid.expanded .gallery-item.hidden-item {
    display: block;
    animation: fadeInGallery 0.5s ease forwards;
}

@keyframes fadeInGallery {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-more-btn-wrapper {
    margin-top: 40px;
}

.gallery-item {
    position: relative;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

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

.gallery-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(157, 137, 118, 0.7); /* Primary color overlay */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    transition: var(--transition-smooth);
    padding: 20px;
    text-align: center;
}

.gallery-icon-zoom {
    font-size: 1.8rem;
    color: var(--color-white);
    transform: translateY(15px);
    transition: var(--transition-smooth);
}

.gallery-caption {
    font-family: var(--font-headings);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-white);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transform: translateY(15px);
    transition: var(--transition-smooth);
}

.gallery-item:hover .gallery-img {
    transform: scale(1.08);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover .gallery-icon-zoom,
.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

/* ==========================================================================
   LIGHTBOX DIALOG MODAL
   ========================================================================== */
dialog#lightboxDialog {
    border: none;
    outline: none;
    background: transparent;
    padding: 0;
    max-width: 90vw;
    max-height: 90vh;
    margin: auto;
    overflow: visible;
}

/* Top-layer animation with discrete display support */
dialog#lightboxDialog[open] {
    opacity: 1;
    transform: scale(1);

    @starting-style {
        opacity: 0;
        transform: scale(0.95);
    }
}

dialog#lightboxDialog {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out, display 0.3s allow-discrete, overlay 0.3s allow-discrete;
}

dialog#lightboxDialog::backdrop {
    background-color: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0);
    transition: background-color 0.3s ease-out, backdrop-filter 0.3s ease-out, display 0.3s allow-discrete, overlay 0.3s allow-discrete;
}

dialog#lightboxDialog[open]::backdrop {
    background-color: rgba(49, 49, 49, 0.85);
    backdrop-filter: blur(8px);

    @starting-style {
        background-color: rgba(49, 49, 49, 0);
        backdrop-filter: blur(0);
    }
}

.lightbox-content-wrapper {
    position: relative;
    background-color: var(--color-light);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(203, 188, 168, 0.3);
}

.lightbox-content-wrapper img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    display: block;
}

.lightbox-caption {
    width: 100%;
    padding: 20px;
    background-color: var(--color-white);
    font-family: var(--font-headings);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-dark);
    text-align: center;
    border-top: 1px solid rgba(203, 188, 168, 0.2);
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(49, 49, 49, 0.5);
    border: none;
    color: var(--color-white);
    font-size: 2rem;
    line-height: 1;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    z-index: 10;
}

.lightbox-close:hover {
    background: var(--color-primary);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(49, 49, 49, 0.4);
    border: none;
    color: var(--color-white);
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    z-index: 5;
}

.lightbox-nav:hover {
    background: var(--color-primary);
}

.lightbox-nav.prev {
    left: 20px;
}

.lightbox-nav.next {
    right: 20px;
}

/* ==========================================================================
   SEÇÃO: OUVIDORIA
   ========================================================================== */
.ouvidoria-section {
    background-color: var(--color-white);
    border-top: 1px solid rgba(203, 188, 168, 0.2);
}

.ouvidoria-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.ouvidoria-wrapper {
    max-width: 680px;
    margin: 40px auto 0 auto;
}

.ouvidoria-card {
    background-color: var(--color-light);
    border: 1px solid rgba(203, 188, 168, 0.3);
    border-radius: var(--border-radius-md);
    padding: 40px;
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
}

.ouvidoria-card .form-group {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.ouvidoria-card label {
    font-family: var(--font-headings);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ouvidoria-card select,
.ouvidoria-card textarea {
    width: 100%;
    padding: 14px 18px;
    background-color: var(--color-white);
    border: 1px solid rgba(203, 188, 168, 0.5);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-dark);
    box-sizing: border-box;
    transition: var(--transition-fast);
    outline: none;
}

.ouvidoria-card select:focus,
.ouvidoria-card textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(188, 161, 120, 0.15);
}

.ouvidoria-card textarea {
    resize: vertical;
}

.ouvidoria-card select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%23BCA178' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 20px;
    cursor: pointer;
}

.btn-submit {
    width: 100%;
    margin-top: 10px;
}

/* Success Message Card */
.ouvidoria-success-message {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    font-size: 4rem;
    color: #4CAF50;
    margin-bottom: 20px;
}

.ouvidoria-success-message h3 {
    font-family: var(--font-headings);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 12px;
}

.ouvidoria-success-message p {
    font-size: 1rem;
    color: var(--color-dark-muted);
    line-height: 1.6;
    margin-bottom: 24px;
}

/* Responsiveness */
@media (max-width: 576px) {
    .ouvidoria-card {
        padding: 24px;
    }
}

/* ==========================================================================
   SEÇÃO 5: LOCALIZAÇÃO E CONTATO
   ========================================================================== */
.contact-section {
    background-color: var(--color-light);
}

.contact-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 60px;
    align-items: center;
}

.contact-card-info {
    background-color: var(--color-white);
    padding: 50px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(203, 188, 168, 0.2);
}

.contact-intro {
    font-size: 1rem;
    color: var(--color-dark-muted);
    margin-bottom: 40px;
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 45px;
}

.contact-list li {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.contact-icon {
    width: 44px;
    height: 44px;
    background-color: var(--color-light);
    color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.contact-text strong {
    display: block;
    font-family: var(--font-headings);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--color-dark);
}

.contact-text p {
    font-size: 0.95rem;
    color: var(--color-dark-muted);
    line-height: 1.4;
}

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

.contact-cta-wrapper .btn-primary {
    background-color: var(--color-whatsapp);
    border-color: var(--color-whatsapp);
    color: var(--color-white);
}

.contact-cta-wrapper .btn-primary:hover {
    background-color: var(--color-whatsapp-dark);
    border-color: var(--color-whatsapp-dark);
    transform: translateY(-2px);
}

.contact-map {
    height: 580px;
}

.map-wrapper {
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(203, 188, 168, 0.3);
}

/* ==========================================================================
   FOOTER (RODAPÉ)
   ========================================================================== */
.main-footer {
    background-color: var(--color-dark);
    color: var(--color-secondary);
    padding: 40px 20px 30px 20px; /* Reduced top padding from 80px to 40px */
    border-top: 2px solid var(--color-primary);
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    margin-bottom: 40px; /* Reduced from 60px to 40px */
}

.footer-logo {
    height: 48px;
    width: auto;
    margin-bottom: 12px;
}

.footer-tagline {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 16px;
    color: var(--color-secondary-light);
    max-width: 500px;
}

.footer-socials {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.footer-socials a {
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-secondary);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.footer-socials a:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
}

.footer-nav h4 {
    color: var(--color-white);
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: 16px; /* Reduced from 24px */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-nav ul {
    display: flex;
    flex-direction: column;
    gap: 8px; /* Reduced vertical spacing of links list from 12px to 8px */
}

.footer-nav a {
    font-size: 0.9rem;
    color: var(--color-secondary-light);
}

.footer-nav a:hover {
    color: var(--color-white);
    padding-left: 4px;
}

.footer-bottom {
    padding-top: 25px; /* Reduced padding-top from 40px to 25px */
    border-top: 1px solid rgba(203, 188, 168, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px; /* Tighter gap between credits and copyright */
}

.footer-regulatory p {
    font-size: 0.85rem;
    color: var(--color-secondary-light);
}

.footer-regulatory strong {
    color: var(--color-white);
}

.footer-copyright p {
    font-size: 0.8rem;
    color: rgba(203, 188, 168, 0.5);
}

/* ==========================================================================
   MEDIA QUERIES (MOBILE FIRST COMPATIBILITY)
   ========================================================================== */

/* Tablet Viewport (max-width: 1024px) */
@media (max-width: 1024px) {
    section {
        padding: 50px 20px; /* Reduced vertical padding from 80px to 50px */
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .hero-content {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-features {
        justify-content: center;
    }
    
    .hero-image {
        height: 420px;
    }

    .about-container {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .about-image {
        height: 480px;
    }

    .core-specialties-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
    
    .core-card:last-child {
        grid-column: span 2;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-map {
        height: 400px;
    }

}

/* Mobile Navigation Trigger (max-width: 1100px) */
@media (max-width: 1100px) {
    /* Mobile Menu Toggle & Navigation */
    .mobile-nav-toggle {
        display: block;
    }

    .logo-link {
        position: relative;
        z-index: 1001; /* Keep logo above the mobile menu overlay */
    }

    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--color-light);
        padding: calc(var(--header-height) + 40px) 40px 40px 40px;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

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

    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .nav-link {
        font-size: 1.1rem;
    }

    .header-cta {
        display: none; /* Hide top CTA in mobile header to save space */
    }

    .mobile-only-cta {
        display: block;
        width: 100%;
        margin-top: 15px;
    }

    .mobile-only-cta a {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 12px 24px !important;
        border-radius: var(--border-radius-sm);
        font-size: 0.95rem !important;
        font-weight: 600 !important;
        text-transform: uppercase;
        width: 100%;
        box-sizing: border-box;
        transition: var(--transition-smooth);
    }

    .mobile-only-cta a::after {
        display: none !important;
    }

    .mobile-btn-results {
        border: 2px solid var(--color-primary) !important;
        color: var(--color-primary) !important;
        background-color: transparent !important;
    }

    .mobile-btn-results:hover {
        background-color: var(--color-primary) !important;
        color: var(--color-white) !important;
    }

    .mobile-btn-schedule {
        background-color: var(--color-primary) !important;
        color: var(--color-white) !important;
        border: 2px solid transparent !important;
        margin-top: 10px;
    }

    .mobile-btn-schedule:hover {
        background-color: var(--color-dark) !important;
    }

    /* Adjust Hamburger Line */
    .hamburger, .hamburger::before, .hamburger::after {
        width: 25px;
        height: 3px;
        background-color: var(--color-dark);
        border-radius: 3px;
        transition: var(--transition-smooth);
    }
    
    .hamburger {
        position: relative;
    }

    .hamburger::before {
        content: '';
        position: absolute;
        top: -8px;
        left: 0;
    }

    .hamburger::after {
        content: '';
        position: absolute;
        top: 8px;
        left: 0;
    }

    /* Hamburger Animation to 'X' */
    .mobile-nav-toggle[aria-expanded="true"] .hamburger {
        background-color: transparent;
    }

    .mobile-nav-toggle[aria-expanded="true"] .hamburger::before {
        transform: rotate(45deg);
        top: 0;
    }

    .mobile-nav-toggle[aria-expanded="true"] .hamburger::after {
        transform: rotate(-45deg);
        top: 0;
    }
}

/* Mobile Viewport (max-width: 768px) */
@media (max-width: 768px) {
    /* Hero adjustments */
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }
    
    .hero-actions .btn {
        width: 100%;
    }

    .hero-features {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    /* About adjustments */
    .about-floating-card {
        right: 10px;
        bottom: -20px;
        padding: 20px;
        max-width: 200px;
    }
    
    .card-number {
        font-size: 2.5rem;
    }

    /* Specialties adjustments */
    .core-specialties-grid {
        grid-template-columns: 1fr;
    }
    
    .core-card:last-child {
        grid-column: span 1;
    }

    .multidisciplinary-container {
        padding: 30px 20px;
    }

    .filter-tabs {
        border-radius: 16px;
        padding: 10px;
        gap: 5px;
    }

    .filter-tab {
        padding: 8px 16px;
        font-size: 0.75rem;
    }

    /* Gallery adjustments */
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    /* Contact adjustments */
    .contact-card-info {
        padding: 30px 20px;
    }

}

/* Extra Small Screens (Smartphones < 480px) */
@media (max-width: 480px) {
    section {
        padding: 40px 15px; /* Reduced vertical padding from 60px to 40px on tiny screens */
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-image {
        height: 280px;
    }

    .about-image {
        height: 320px;
    }

    .about-floating-card {
        position: relative;
        right: 0;
        bottom: 0;
        margin: 20px auto 0 auto;
        max-width: 100%;
        box-shadow: var(--shadow-md);
    }

    .multidisciplinary-container {
        padding: 24px 15px;
    }

    .filter-tab {
        padding: 6px 12px;
        font-size: 0.7rem;
    }

    .contact-card-info {
        padding: 24px 15px;
    }
}

/* ==========================================================================
   SEÇÃO: INSTAGRAM FEED
   ========================================================================== */
.instagram-section {
    background-color: var(--color-white);
    border-top: 1px solid rgba(203, 188, 168, 0.2);
    border-bottom: 1px solid rgba(203, 188, 168, 0.2);
}

.instagram-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.instagram-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 50px;
}

.instagram-profile-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.instagram-icon-wrapper {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-size: 1.8rem;
    box-shadow: 0 4px 12px rgba(220, 39, 67, 0.2);
}

.instagram-text-info {
    text-align: left;
}

.instagram-tag {
    font-family: var(--font-headings);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 0.5px;
}

.instagram-header .section-title {
    margin-bottom: 0;
}

.instagram-header .section-subtitle {
    margin-bottom: 30px;
}

.instagram-follow-btn-wrapper .btn-secondary {
    border-color: #bc1888;
    color: #bc1888;
}

.instagram-follow-btn-wrapper .btn-secondary:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border-color: transparent;
    color: var(--color-white);
    box-shadow: 0 4px 12px rgba(220, 39, 67, 0.2);
}

.instagram-carousel-wrapper {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(203, 188, 168, 0.4);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
}

.carousel-nav-btn:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: transparent;
    box-shadow: var(--shadow-md);
}

.carousel-nav-btn.prev {
    left: -23px;
}

.carousel-nav-btn.next {
    right: -23px;
}

@media (max-width: 1240px) {
    .carousel-nav-btn.prev {
        left: -10px;
    }
    .carousel-nav-btn.next {
        right: -10px;
    }
}

@media (max-width: 768px) {
    .carousel-nav-btn {
        display: none;
    }
}

.instagram-grid {
    display: flex;
    overflow-x: auto;
    gap: 24px;
    padding: 10px 5px 15px 5px; /* Reduced bottom padding since scrollbar is hidden */
    max-width: var(--max-width);
    margin: 0 auto;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    user-select: none;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.instagram-grid::-webkit-scrollbar {
    display: none;
}

.instagram-embed-card {
    flex: 0 0 min(350px, 100%);
    display: flex;
    justify-content: center;
}

/* Responsiveness for Instagram section */
@media (max-width: 480px) {
    .instagram-profile-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .instagram-text-info {
        text-align: center;
    }
}

/* ==========================================================================
   ACCESSIBILITY & PREFERS-REDUCED-MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    /* Dialog transitions override for reduced motion */
    dialog#lightboxDialog {
        transform: none !important;
        transition-duration: 0.05s !important;
    }
    
    dialog#lightboxDialog[open] {
        @starting-style {
            transform: none !important;
        }
    }
    
    .gallery-item:hover .gallery-img,
    .hero-image-wrapper:hover .hero-image {
        transform: none !important;
    }
}
