/* =============================================
   TABLE OF CONTENTS
   =============================================
   1. CSS Variables & Root
   2. Reset & Base Styles
   3. Typography
   4. Layout & Containers
   5. Utility Classes
   6. Buttons
   7. Spinner
   8. Navbar
   9. Header & Hero
   10. Services
   11. Features
   12. Team

   14. Appointments
   15. Footer
   16. Adn Page
   17. Medicina Dentária Page
   19. Especialidades Page - Icon Animation
   20. Wavy Background Section
   21. Reverse Wavy Background Section (Cream to Green)
   ============================================= */

/* =============================================
   1. CSS VARIABLES & ROOT
   ============================================= */
/* =============================================
   FONT IMPORTS
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

:root {
    /* Brand Colors */
    --primary: #43523F;
    --secondary: #9EAE98;
    --light: #F9F6F0;
    --dark: #0F2D2E;

    /* Typography */
    --heading-font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
    --body-font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;

    /* Bootstrap Overrides */
    --bs-primary: #43523F;
    --bs-primary-rgb: 56, 79, 58;
    --bs-secondary: #F9F6F0;
    --bs-gutter-x: 0;

    /* Layout */
    --navbar-height: 75px;
}

/* =============================================
   2. RESET & BASE STYLES
   ============================================= */
html {
    scroll-behavior: smooth;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--body-font);
    color: #222;
    margin: 0;
    padding: 0;
    padding-top: 0;
    max-width: 100%;
    overflow-x: hidden;
}

/* Ensure anchored sections are visible below fixed navbar */
section[id],
div[id] {
    scroll-margin-top: 90px;
}

/* =============================================
   3. TYPOGRAPHY
   ============================================= */
h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand {
    font-family: var(--heading-font);
}

.fw-medium {
    font-weight: 500 !important;
}

.fw-bold {
    font-weight: 700 !important;
}

.fw-black {
    font-weight: 900 !important;
}

/* =============================================
   4. LAYOUT & CONTAINERS
   ============================================= */
/* Edge-to-edge sections */
.container,
.container-xxl,
.container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.row {
    --bs-gutter-x: 0;
}

/* Restore gutters for especialidades cards grid */
.especialidades-page .especialidades-cards-row {
    --bs-gutter-x: 1.5rem;
}

/* Section margins */
#news-discounts-section,
#insurances-section {
    padding-left: 100px;
    padding-right: 100px;
    margin-left: 0;
    margin-right: 0;
}

@media (max-width: 991.98px) {

    #news-discounts-section,
    #insurances-section,
    #team-section {
        margin-left: 20px;
        margin-right: 20px;
    }
}

#feature-section {
    padding-left: 100px;
    padding-right: 0;
    /* removed right padding so the feature image can reach the viewport edge */
    margin-top: 150px;
    margin-bottom: 0;
}

@media (min-width: 1400px) {
    #feature-section {
        padding-right: 0;
        /* ensure no extra gap on very wide screens */
    }
}

@media (max-width: 1199.98px) {
    #feature-section {
        padding-left: 20px;
        padding-right: 20px;
        margin-top: 100px;
    }
}

/* Instagram Posts Section */
#news-discounts {
    margin-top: 270px;
}

/* Keep Instagram images responsive and within viewport */
#news-discounts img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: cover;
    border-radius: 20px !important;
}

@media (max-width: 991.98px) {
    #news-discounts img {
        height: auto !important;
    }
}

/* =============================================
   5. UTILITY CLASSES
   ============================================= */
/* Background Colors */
.bg-cream {
    background-color: #F9F6F0 !important;
}

.bg-dark-green {
    background-color: #43523F !important;
}

.bg-light-green {
    background-color: #9EAE98 !important;
}

.bg-light-grey {
    background-color: #f1f1f1 !important;
}

/* Primary Color Overrides */
.text-primary {
    color: #43523F !important;
}

.badge.bg-primary {
    background-color: #43523F !important;
}

/* =============================================
   6. BUTTONS
   ============================================= */
.btn {
    font-weight: 500;
    transition: .5s;
}

.btn.btn-primary,
.btn.btn-secondary {
    color: #FFFFFF;
}

/* Button Sizes */
.btn-square {
    width: 38px;
    height: 38px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}

/* Primary Button States */
.btn-primary {
    color: #fff !important;
    background-color: #43523F !important;
    border-color: #43523F !important;
}

.btn-primary:hover {
    color: #fff !important;
    background-color: #43523F !important;
    border-color: #43523F !important;
}

.btn-primary:focus,
.btn-primary.focus,
.btn-check:focus+.btn-primary {
    color: #fff !important;
    background-color: #43523F !important;
    border-color: #43523F !important;
    box-shadow: 0 0 0 .25rem rgba(67, 82, 63, 0.25) !important;
}

.btn-primary:active,
.btn-primary.active,
.show>.btn-primary.dropdown-toggle {
    color: #fff !important;
    background-color: #2f3c2c !important;
    border-color: #2f3c2c !important;
}

.btn-primary:disabled,
.btn-primary.disabled {
    color: #fff !important;
    background-color: #43523F !important;
    border-color: #43523F !important;
}

.btn-outline-primary:focus,
.btn-outline-primary.focus,
.btn-check:focus+.btn-outline-primary {
    box-shadow: 0 0 0 .25rem rgba(67, 82, 63, 0.5) !important;
    color: #43523F !important;
}




.btn-outline-primary {
    color: #2f3c2c;
    border-color: #2f3c2c
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: #2f3c2c;
    border-color: #2f3c2c
}

.btn-check:focus+.btn-outline-primary,
.btn-outline-primary:focus {
    box-shadow: 0 0 0 .25rem rgba(4, 99, 250, 0.5)
}

.btn-check:checked+.btn-outline-primary,
.btn-check:active+.btn-outline-primary,
.btn-outline-primary:active,
.btn-outline-primary.active,
.btn-outline-primary.dropdown-toggle.show {
    color: #fff;
    background-color: #0463FA;
    border-color: #0463FA
}

.btn-check:checked+.btn-outline-primary:focus,
.btn-check:active+.btn-outline-primary:focus,
.btn-outline-primary:active:focus,
.btn-outline-primary.active:focus,
.btn-outline-primary.dropdown-toggle.show:focus {
    box-shadow: 0 0 0 .25rem rgba(4, 99, 250, 0.5)
}





/* =============================================
   7. SPINNER
   ============================================= */
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}

/* =============================================
   8. NAVBAR
   ============================================= */
/* Base Navbar Styles */
.navbar {
    background: rgba(255, 255, 255, 0.7) !important;
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    backdrop-filter: blur(14px) saturate(160%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1030;
    transition: background-color .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.navbar.sticky-top {
    top: 0;
    transition: .5s;
    z-index: 1030;
}

.navbar.navbar-scrolled {
    background: rgba(255, 255, 255, 0.7) !important;
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    backdrop-filter: blur(14px) saturate(160%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.navbar.navbar-scrolled .navbar-brand h1,
.navbar.navbar-scrolled .navbar-brand {
    color: inherit;
}

/* Navbar Brand */
.navbar .navbar-brand,
.navbar a.btn {
    height: 75px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.navbar .navbar-brand img.navbar-logo {
    height: 60px;
    width: auto;
    display: block;
}

@media (max-width: 991.98px) {
    .navbar .navbar-brand img.navbar-logo {
        height: 46px;
    }
}

/* Navbar Links */
.navbar .navbar-nav .nav-link {
    margin-right: 30px;
    padding: 25px 0;
    color: var(--dark);
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
    outline: none;
    font-family: var(--body-font) !important;
    position: relative;
    letter-spacing: 0.5px;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--primary);
}

/* Navbar Link Underline Animation */
.navbar .navbar-nav .nav-link::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 14px;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .25s ease;
    opacity: 0.95;
}

.navbar .navbar-nav .nav-link:hover::after,
.navbar .navbar-nav .nav-link.active::after {
    transform: scaleX(1);
}

/* Navbar Dropdown Toggle */
.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

/* Navbar Dropdown Menu */
.navbar .dropdown-menu {
    background: rgba(255, 255, 255, 0.7);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: .5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    padding: .5rem 0;
}

.navbar .dropdown-item {
    padding: .5rem 1.125rem;
    font-weight: 500;
}

.navbar .dropdown-item:hover {
    color: var(--primary);
    background-color: rgba(56, 79, 58, 0.06);
}

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        border: none;
        margin-top: 0;
        top: 150%;
        opacity: 0;
        visibility: hidden;
        transition: .5s;
    }

    .navbar .nav-item:hover .dropdown-menu {
        top: 100%;
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}

/* Navbar Mobile Styles */
@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link {
        margin-right: 0;
        padding: 10px 0;
    }

    .navbar .navbar-nav {
        border-top: 1px solid #EEEEEE;
    }

    .navbar .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        padding: .5rem 1rem;
    }

    .navbar .navbar-nav .nav-link::after {
        left: 0.5rem;
        right: 0.5rem;
        bottom: 0;
    }
}

/* =============================================
   9. HEADER & HERO
   ============================================= */
/* Header Compact */
.header.header-compact {
    margin-top: 0;
    padding-top: 0;
    height: 100vh;
    position: relative;
    z-index: 1;
}

@supports (height: 100dvh) {
    .header.header-compact {
        height: 100dvh;
    }
}

.header.header-compact .owl-carousel-text {
    padding: 1.25rem;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.header.header-compact .owl-carousel-text h1 {
    font-size: 2rem;
    line-height: 1.2;
    margin: 0;
}

@media (min-width: 576px) {
    .header.header-compact .owl-carousel-text h1 {
        font-size: 2.25rem;
    }
}

@media (min-width: 992px) {
    .header.header-compact .owl-carousel-text h1 {
        font-size: 2.75rem;
    }
}

.header.header-compact .owl-nav,
.header.header-compact .owl-dots {
    bottom: 15px;
}

/* Hero Fullscreen Video */
.hero-fullscreen {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

@supports (height: 100dvh) {
    .hero-fullscreen {
        height: 100dvh;
    }
}

.hero-fullscreen video {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0;
    padding: 0;
    z-index: 0;
}

/* Video Overlay */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.video-overlay::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.30);
    z-index: 1;
}

/* Overlay Content */
.overlay-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
    max-width: 800px;
}

.overlay-content h1 {
    color: #ffffff;
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.overlay-content p {
    color: #ffffff;
    font-size: 1.75rem;
    font-weight: 500;
    margin-bottom: 0;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

@media (max-width: 768px) {
    .overlay-content h1 {
        font-size: 3rem;
    }

    .overlay-content p {
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .overlay-content h1 {
        font-size: 2rem;
    }

    .overlay-content p {
        font-size: 1.1rem;
    }

    .overlay-content {
        padding: 1rem;
    }
}

@media (min-width: 992px) {
    .video-overlay {
        justify-content: flex-start;
    }

    .overlay-content {
        text-align: left;
        margin-left: 150px;
        padding-right: 150px;
        max-width: 800px;
    }
}

@media (max-width: 991.98px) {
    .video-overlay {
        justify-content: center;
    }

    .overlay-content {
        margin-left: 0;
        text-align: center;
        padding-right: 0;
    }
}

/* Header Carousel */
.header-carousel .owl-carousel-text {
    position: absolute;
    width: 100%;
    height: 100%;
    padding: 3rem;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 0 30px rgba(0, 0, 0, .1);
}

.header-carousel .owl-nav {
    position: absolute;
    width: 200px;
    height: 45px;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
}

.header-carousel .owl-nav .owl-prev,
.header-carousel .owl-nav .owl-next {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    background: transparent;
    border: 1px solid #FFFFFF;
    border-radius: 45px;
    font-size: 22px;
    transition: .5s;
}

.header-carousel .owl-nav .owl-prev:hover,
.header-carousel .owl-nav .owl-next:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.header-carousel .owl-dots {
    position: absolute;
    height: 45px;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin: 0 5px;
    width: 15px;
    height: 15px;
    background: transparent;
    border: 1px solid #FFFFFF;
    border-radius: 15px;
    transition: .5s;
}

.header-carousel .owl-dot::after {
    position: absolute;
    content: "";
    width: 5px;
    height: 5px;
    top: 4px;
    left: 4px;
    background: #FFFFFF;
    border-radius: 5px;
}

.header-carousel .owl-dot.active {
    background: var(--primary);
    border-color: var(--primary);
}

/* Page Header */
.page-header {
    background: url(../media/feature_img.jpg) top center no-repeat;
    background-size: cover;
    text-shadow: 0 0 30px rgba(0, 0, 0, .1);
}

.breadcrumb-item+.breadcrumb-item::before {
    color: var(--light);
}

/* =============================================
   10. SERVICES
   ============================================= */
.service-item {
    transition: transform .5s ease, box-shadow .5s ease;
    will-change: transform;
    border-color: var(--primary);
    outline: 1px solid var(--primary);
}

.service-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .08);
}

.service-item .btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    background: #FFFFFF;
    border-radius: 40px;
    white-space: nowrap;
    overflow: hidden;
    transition: .5s;
}

.service-item:hover .btn:not(.btn-urgent-cta) {
    width: 140px;
}

/* Service Arrow Button */
.service-item .btn-service-arrow {
    width: 40px;
    height: 40px;
    min-width: 40px;
    max-width: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    border-radius: 40px;
    flex-shrink: 0;
    transition: .3s;
    margin-left: auto;
}

.service-item:hover .btn-service-arrow {
    width: 45px;
    height: 45px;
    min-width: 45px;
    max-width: 45px;
    background: var(--primary);
}

.service-item:hover .btn-service-arrow i {
    color: #FFFFFF !important;
}

/* Urgency Service Card */
.service-item-urgent {
    background-color: #f0f4ef !important;
    outline: 1px solid var(--primary);
    border-color: var(--primary);
    position: relative;
    overflow: hidden;
}

.service-item-urgent::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
}

.service-item-urgent h4 {
    color: var(--primary);
}

.service-item-urgent .urgent-icon-circle {
    background-color: #ffffff;
}

.service-item-urgent .urgent-icon-circle .fa {
    color: var(--primary);
}

.service-item-urgent .urgent-hr {
    border-color: var(--primary);
    opacity: 0.25;
}

.service-item-urgent .btn-service-arrow-urgent {
    background: #ffffff;
}

.service-item-urgent .btn-service-arrow-urgent i {
    color: var(--primary) !important;
}

.service-item-urgent:hover .btn-service-arrow-urgent {
    background: var(--primary);
}

.service-item-urgent:hover .btn-service-arrow-urgent i {
    color: #ffffff !important;
}

.btn-urgent-cta {
    background-color: var(--primary) !important;
    color: #ffffff !important;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 0.03em;
    transition: background-color .3s ease;
    width: 100% !important;
    height: auto !important;
    border-radius: 4px !important;
}

.btn-urgent-cta:hover {
    background-color: #2f3c2c !important;
    color: #ffffff;
}

/* Service Card Header Layout */
.service-item .d-flex.justify-content-between {
    flex-wrap: nowrap;
    overflow: hidden;
}

.service-item .d-flex.justify-content-between .flex-grow-1 {
    min-width: 0;
    margin-right: 1rem;
}

.service-item h4 {
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

/* Service Overlap Effect */
.service-overlap {
    position: relative;
    z-index: 10;
    background-color: transparent !important;
}

.service-overlap .service-item {
    background-color: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.service-overlap .service-item-urgent {
    background-color: rgba(240, 244, 239, 0.92) !important;
}

/* Services Section Row */
#services-section .row {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.5rem;
    justify-content: center;
}

@media (min-width: 992px) {
    #services-section .row {
        --bs-gutter-x: 4.5rem;
    }

    #services-section .service-item {
        width: calc(100% + 50px);
        margin-left: -25px;
        margin-right: -25px;
    }
}

/* Service Overlap Responsive */
@media (min-width: 1200px) {
    #services-section {
        padding-top: 0 !important;
    }

    .service-overlap {
        margin-top: -130px !important;
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    #services-section {
        padding-top: 0 !important;
    }

    .service-overlap {
        margin-top: -120px !important;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .service-overlap {
        margin-top: -12vh !important;
    }
}

@media (max-width: 767.98px) {
    .service-overlap {
        margin-top: -8vh !important;
    }
}

/* Service Section Container */
.service-section {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    background-color: var(--light);
}

@media (max-width: 1199.98px) {
    .service-section {
        max-width: 100%;
    }
}

/* =============================================
   11. FEATURES
   ============================================= */
.container.feature {
    max-width: 100% !important;
}

/* Feature image: bleed visually to the right edge on large screens
   without reintroducing horizontal scroll */
.feature-overflow-img {
    left: auto;
    right: -0.4rem;
    /* small nudge to close remaining visible gap */
    top: 0;
    /* align with top of its containing block */
    width: calc(100% + 0.4rem);
    max-width: none;
    height: 120%;
    transform: none;
    /* remove translate-based positioning that caused the gap */
    border-radius: 35% 0 0 35%;
    /* user requested: stronger rounded left edge */
}

@media (max-width: 1399.98px) and (min-width: 1200px) {
    .feature-overflow-img {
        right: -0.3rem;
        width: calc(100% + 0.3rem);
        height: 118%;
    }
}

@media (max-width: 1199.98px) and (min-width: 992px) {
    .feature-overflow-img {
        right: -0.2rem;
        width: calc(100% + 0.2rem);
        height: 115%;
    }
}

@media (max-width: 991.98px) {
    .feature-overflow-img {
        position: relative !important;
        right: auto;
        left: 0;
        transform: none !important;
        width: 100% !important;
        height: auto !important;
        border-radius: 12px;
        /* keep mobile radius smaller and consistent with subtler rounding */
    }
}

/* Feature Text */
.feature-text {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.container.feature .feature-text h1 {
    font-size: 35px;
}

.container.feature .feature-text p,
.container.feature .feature-text h5,
.container.feature .feature-text .d-inline-block {
    font-size: 20px;
}

.container.feature .feature-text .d-flex .rounded-circle {
    width: 60px !important;
    height: 60px !important;
}

.container-fluid.bg-primary .col-lg-6.pe-lg-0[style] {
    min-height: 300px !important;
}

.container-fluid.bg-primary .position-relative .position-absolute {
    object-fit: cover;
}

/* Feature Section Background */
.feature-section {
    font-family: "Outfit", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

/* =============================================
   12. TEAM
   ============================================= */
.team-section {
    font-family: var(--body-font);
}

/* Team Item — fixed card, image stays still */
.team-item {
    overflow: hidden;
    background-color: #F9F6F0;
}

/* Image wrapper: clips the sliding overlay */
.team-img-wrap {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.team-img-wrap img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: top center;
    display: block;
    /* image never moves */
}

/* Overlay panel that slides UP from bottom of the image area */
.team-formations-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    /* starts fully hidden below the image area */
    transform: translateY(100%);
    background: rgba(67, 82, 63, 0.92);
    color: #fff;
    font-size: 0.78rem;
    line-height: 1.45;
    transition: transform 0.4s ease;
    max-height: 220px;
    overflow-y: auto;
}

.team-formations-overlay ul {
    margin: 0;
    padding: 0;
}

.team-formations-overlay li {
    margin-bottom: 3px;
}

/* On hover: slide the overlay up to cover image */
.team-item:hover .team-formations-overlay {
    transform: translateY(0);
}

/* Bottom text band — always visible, never moves */
.team-item .team-text {
    background-color: #F9F6F0;
    padding: 10px 12px 12px;
}

.team-item .team-text h6 {
    font-size: 0.95rem;
    margin-bottom: 2px;
    line-height: 1.2;
    color: #2d3a2d;
}

.team-item .team-text p.text-primary {
    font-size: 0.80rem;
    margin-bottom: 0;
    font-weight: 500;
    line-height: 1.3;
}

/* Team Carousel */
.team-carousel {
    position: relative;
    padding: 0;
}

.team-carousel .owl-stage-outer {
    position: relative;
}

.team-carousel .owl-nav {
    display: block !important;
    position: absolute;
    width: 100%;
    top: 40%;
    left: 0;
    margin: 0;
    padding: 0;
    z-index: 100;
}

.team-carousel .owl-nav.disabled {
    display: block !important;
}

.team-carousel .owl-nav .owl-prev,
.team-carousel .owl-nav .owl-next {
    position: absolute !important;
    width: 44px;
    height: 44px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: #FFFFFF !important;
    background: var(--primary) !important;
    font-size: 18px;
    border-radius: 50%;
    transition: .25s ease;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    opacity: 1 !important;
    margin: 0;
    z-index: 2;
}

.team-carousel .owl-nav .owl-prev:hover,
.team-carousel .owl-nav .owl-next:hover {
    background: var(--dark) !important;
    color: #FFFFFF !important;
    transform: scale(1.1);
}

.team-carousel .owl-nav .owl-prev {
    left: -64px;
}

.team-carousel .owl-nav .owl-next {
    right: -64px;
}

@media (max-width: 767.98px) {

    .team-carousel .owl-nav .owl-prev,
    .team-carousel .owl-nav .owl-next {
        width: 36px !important;
        height: 36px !important;
        font-size: 16px !important;
    }

    .team-carousel .owl-nav .owl-prev {
        left: 8px !important;
    }

    .team-carousel .owl-nav .owl-next {
        right: 8px !important;
    }
}

.team-carousel .owl-dots {
    margin-top: 30px;
    text-align: center;
}

.team-carousel .owl-dot {
    display: inline-block;
    margin: 0 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #DDDDDD;
    transition: .5s;
}

.team-carousel .owl-dot.active {
    background: var(--primary);
}

/* Team Grid */
.team-grid {
    align-items: stretch;
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
    margin-left: 5px;
    margin-right: 5px;
}

@media (min-width: 992px) {
    .team-grid {
        --bs-gutter-x: 1.5rem;
        --bs-gutter-y: 1.25rem;
    }

    .team-grid .col-lg-3 {
        flex: 0 0 auto;
        width: 25%;
    }
}

@media (min-width: 1600px) {
    .adn-page main.container {
        max-width: 1500px;
    }

    .adn-page .team-grid .col-lg-3 {
        flex: 0 0 auto;
        width: 25%;
    }
}

/* Team Grid Card */
/* =============================================
   TEAM GRID CARD – slide-up overlay on hover
   Image is fixed; card-body slides up from bottom
   ============================================= */

/* Card: fixed height, clips overflow, image fills it */
.team-grid-card {
    border-radius: 8px;
    border-color: var(--secondary);
    position: relative;
    overflow: hidden;
    display: block !important;
    height: 400px;
    transition: box-shadow 0.3s ease;
}

@media (max-width: 991.98px) {
    .team-grid-card {
        height: 260px;
    }
}

@media (max-width: 575.98px) {
    .team-grid-card {
        height: 240px;
    }
}

.team-grid-card:hover {
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.18) !important;
}

/* card-inner just holds both children; no transform here */
.team-grid-card .card-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Image: fills the card fully, never moves */
.team-grid-card .card-img-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.team-grid-card .card-img-top.team-img-soft {
    width: 76%;
    height: 76%;
    top: 5%;
    left: 12%;
    object-fit: contain;
    opacity: 0.2;
}

/* Card body: anchored to bottom, only as tall as name + specialty at rest.
   On hover it grows upward to show the bullet list. */
.team-grid-card .card-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(67, 82, 63, 0.94);
    padding: 0.75rem 1rem 0.85rem;
    /* transition drives the slide: we animate max-height from the collapsed
       name-bar height to a large value that reveals the list */
    max-height: 72px;
    /* roughly name + specialty at rest */
    overflow: hidden;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.team-grid-card:hover .card-body {
    max-height: 400px;
    /* enough for even the longest list */
}

/* Name – always visible */
.team-grid-card .card-title {
    font-size: 1.2rem;
    color: #fff !important;
    margin-bottom: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Specialty – always visible */
.team-grid-card p.text-primary {
    font-size: 0.85rem;
    color: #c8d6c5 !important;
    margin-bottom: 0.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: bold;
}

/* Bullet list */
.team-grid-card ul.list-unstyled {
    margin: 0;
    padding: 0;
}

.team-grid-card ul.list-unstyled li {
    color: #e8ede7 !important;
    font-size: 0.85rem;
    line-height: 1.8;
    padding: 0.05rem 0;
}

/* =============================================
   14. APPOINTMENTS
   ============================================= */
.bootstrap-datetimepicker-widget.bottom {
    top: auto !important;
}

.bootstrap-datetimepicker-widget .table * {
    border-bottom-width: 0px;
}

.bootstrap-datetimepicker-widget .table th {
    font-weight: 500;
}

.bootstrap-datetimepicker-widget.dropdown-menu {
    padding: 10px;
    border-radius: 2px;
}

.bootstrap-datetimepicker-widget table td.active,
.bootstrap-datetimepicker-widget table td.active:hover {
    background: var(--primary);
}

.bootstrap-datetimepicker-widget table td.today::before {
    border-bottom-color: var(--primary);
}

/* =============================================
   15. FOOTER
   ============================================= */
.footer .btn.btn-social {
    margin-right: 5px;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    border: 1px solid #FFFFFF;
    transition: .3s;
}

.footer .btn.btn-social:hover {
    color: var(--primary);
}

.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: #FFFFFF;
    font-size: 15px;
    font-weight: normal;
    text-transform: capitalize;
    transition: .3s;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    color: var(--primary);
    letter-spacing: 1px;
    box-shadow: none;
}

.footer .copyright {
    padding: 25px 0;
    font-size: 15px;
    border-top: 1px solid rgba(256, 256, 256, .1);
}

.footer .copyright a {
    color: var(--light);
}

.footer .copyright a:hover {
    color: var(--primary);
}

.footer-logo {
    width: 300px;
    height: auto;
    min-width: 60px;
}

.footer-logo span {
    font-size: 20px;
}

.livro-reclamacoes-img {
    width: 150px;
    height: auto;
    min-width: 60px;
}

/* =============================================
   16. ADN PAGE
   ============================================= */
/* ADN Hero */
.adn-hero {
    padding-top: var(--navbar-height);
}

.adn-hero .row {
    --bs-gutter-x: 0;
}

.adn-hero-title {
    letter-spacing: -0.5px;
}

.adn-hero-copy p.lead {
    color: #4f5b66;
}

/* ADN Hero Mosaic */
.adn-hero-mosaic {
    transform: none;
}

.adn-hero-mosaic .mosaic-grid {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 6px;
    padding: 6px;
    filter: grayscale(45%) saturate(90%) brightness(0.96);
}

.adn-hero-mosaic .mosaic-grid::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.3);
    pointer-events: none;
}

.adn-hero-mosaic .mosaic-tile {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.adn-hero-mosaic .mosaic-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 58%;
    height: 58%;
    object-fit: cover;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    border-color: var(--light) !important;
}

@media (max-width: 767.98px) {
    .adn-hero-mosaic {
        transform: none;
    }

    .adn-hero-mosaic .mosaic-center {
        width: 70%;
        height: 70%;
    }
}

/* Section Divider */
.section-divider {
    position: relative;
    padding: 0.75rem 0;
    background: transparent;
}

.section-divider .divider-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.section-divider .line {
    height: 2px;
    background: rgba(0, 0, 0, 0.15);
    flex: 1 1 0;
}

.section-divider .title {
    font-family: var(--heading-font);
    font-weight: 600;
    font-size: 0.95rem;
    color: #43523F;
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .section-divider .title {
        font-size: 0.9rem;
    }
}

/* ADN Page Divider Override */
.adn-page .section-divider .line {
    height: 4px;
}

.adn-page .section-divider .title {
    font-size: 1.25rem;
}

/* =============================================
   17. MEDICINA DENTÁRIA PAGE
   ============================================= */

/* Full viewport container with 100px margins */
.med-dentaria-sections {
    width: calc(100vw - 200px);
    margin-left: 100px;
    margin-right: 100px;
}

.med-dentaria-content {
    width: 100%;
}

.med-dentaria-card {
    /*background: rgba(255, 255, 255, 0.75);*/
    background: var(--light);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    min-height: 350px;
}

.med-dentaria-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(67, 82, 63, 0.15);
}

.med-dentaria-card .card-img-wrapper {
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.med-dentaria-card .card-img-wrapper img {
    width: 100%;
    min-height: 350px;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.med-dentaria-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.med-dentaria-card .card-body {
    padding: 2rem;
}

.med-dentaria-card .card-body h2 {
    font-size: 1.35rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.med-dentaria-card .card-body p {
    color: #555;
    line-height: 1.75;
    margin-bottom: 0.75rem;
}

.med-dentaria-card .card-body p:last-child {
    margin-bottom: 0;
}

/* Card Icon Accent */
.med-dentaria-card .card-body h2 i,
.med-dentaria-text h2 i {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), #5a6b54);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    font-size: 1rem;
    margin-right: 0.75rem;
}

/* Legacy Class Fallback */
.med-dentaria-text {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.med-dentaria-text:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(67, 82, 63, 0.12);
}

/* Responsive Glassmorphism Cards */
@media (min-width: 992px) {
    .med-dentaria-card .card-img-wrapper {
        border-radius: 20px 0 0 20px;
    }

    .med-dentaria-card .row>.col-lg-5.order-lg-2 .card-img-wrapper {
        border-radius: 0 20px 20px 0;
    }

    .med-dentaria-card .card-img-wrapper img {
        height: 350px;
        min-height: 350px;
    }
}

@media (max-width: 991.98px) {
    .med-dentaria-sections {
        width: calc(100vw - 30px);
        margin-left: 15px;
        margin-right: 15px;
    }

    .med-dentaria-card {
        height: auto;
    }

    .med-dentaria-card .card-img-wrapper {
        border-radius: 20px 20px 0 0;
    }

    .med-dentaria-card .card-img-wrapper img {
        height: 220px;
    }

    .med-dentaria-card .card-body {
        padding: 1.5rem;
    }

    .med-dentaria-card .card-body h2 {
        font-size: 1.2rem;
    }

    .med-dentaria-card .card-body h2 i {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

/* Med Dent Page Header */
.med-dent-page .page-header {
    background: linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)),
        url('../media/skilled-dentist-uniform-mask-curing-teeth-patient.jpg') center/cover no-repeat;
    min-height: 50vh;
    display: flex;
    align-items: center;
}

@media (min-width: 768px) {
    .med-dent-page .page-header {
        min-height: 60vh;
    }
}

@media (min-width: 1200px) {
    .med-dent-page .page-header {
        min-height: 70vh;
    }
}

.med-dent-page .page-header h1,
.med-dent-page .page-header p,
.med-dent-page .page-header .text-muted {
    color: #fff !important;
}

/* Mobile margin for page header text */
@media (max-width: 767.98px) {
    .med-dent-page .page-header .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        padding-top: 30px !important;
    }

    .med-dent-page .page-header h1 {
        margin-bottom: 1rem;
        margin-left: 15px;
        margin-right: 15px;
    }

    .med-dent-page .page-header p {
        margin-left: 15px;
        margin-right: 15px;
    }
}

.med-dent-page section {
    padding: 40px 0;
}

/* Section Index Nav */
.med-dent-page .index-nav {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .08);
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .03);
    border-color: var(--primary);
    outline: 1px solid var(--primary);
}

.med-dent-page .index-nav h2 {
    margin-bottom: .75rem;
}

.med-dent-page .index-nav ul {
    margin: 0;
    padding: 0;
}

.med-dent-page .index-nav li {
    list-style: none;
    margin: .25rem 0;
}

.med-dent-page .index-nav a {
    display: block;
    padding: .5rem .75rem .5rem 1.5rem;
    border-radius: .25rem;
    color: #43523F;
    text-decoration: none;
    position: relative;
    transition: all .15s ease;
}

.med-dent-page .index-nav a::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #b9c6bf;
    position: absolute;
    left: .5rem;
    top: 50%;
    transform: translateY(-50%);
    transition: background .15s ease;
}

.med-dent-page .index-nav a:hover {
    background: #e9f1ed;
}

.med-dent-page .index-nav a.active {
    background: #43523F;
    color: #fff;
}

.med-dent-page .index-nav a.active::before {
    background: #fff;
}

/* Horizontal Bar Variant */
.med-dent-page .index-nav--horizontal {
    padding: .5rem;
    width: 100%;
}

/* When JS adds .is-stuck, pin the bar below the navbar */
.med-dent-page .index-nav--horizontal.is-stuck {
    position: fixed;
    z-index: 1010;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .10);
}

/* Placeholder keeps layout space when the bar is fixed */
.index-nav-placeholder {
    display: none;
}

.index-nav-placeholder.active {
    display: block;
}

.med-dent-page .index-nav--horizontal h2 {
    display: none;
}

.med-dent-page .index-nav--horizontal ul {
    display: flex;
    gap: .5rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    justify-content: flex-start;
    width: 100%;
}

.med-dent-page .index-nav--horizontal li {
    margin: 0;
}

.med-dent-page .index-nav--horizontal a {
    padding: .5rem .75rem;
    border-radius: 999px;
    white-space: nowrap;
    text-align: center;
}

.med-dent-page .index-nav--horizontal a::before {
    display: none;
}

@media (min-width: 992px) {

    .med-dent-page .index-nav--horizontal ul {
        justify-content: space-between;
    }
}

/* =============================================
   19. ESPECIALIDADES PAGE - ICON ANIMATION
   ============================================= */

/* Icon Animation */
.especialidades-page .service-item .fa {
    transition: transform 0.3s ease, color 0.3s ease;
}

.especialidades-page .service-item:hover .fa {
    transform: scale(1.2);
}

/* Icon Badge Enhancement */
.especialidades-page .service-item .rounded-circle {
    transition: all 0.3s ease;
}

.especialidades-page .service-item:hover .rounded-circle {
    background: var(--primary) !important;
}

.especialidades-page .service-item:hover .rounded-circle .fa {
    color: white !important;
    transform: scale(1.2);
}

/* =============================================
   20. WAVY BACKGROUND SECTION
   ============================================= */
.wavy-background-section {
    position: relative;
    background-color: transparent;
    /* cream via ::after */
    overflow: visible;
    z-index: 0;
    /* keep below services */
}

/* Cream background that extends slightly above the feature/Instagram area */
.wavy-background-section::after {
    content: "";
    position: absolute;
    top: -465px;
    /* can be tuned, but only affects background, not layout */
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #F9F6F0;
    z-index: -2;
}

/* SVG-based wavy background for better scaling */
.wavy-background-section::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 400' preserveAspectRatio='none'%3E%3Cpath fill='%239EAE98' d='M0,120 C120,180 280,60 480,100 C680,140 850,40 1020,80 C1190,120 1320,60 1440,90 L1440,400 L0,400 Z'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    background-position: bottom;
    background-repeat: no-repeat;
    z-index: -1;
}

.wavy-background-section>* {
    position: relative;
    z-index: 1;
}

/* =============================================
   21. REVERSE WAVY BACKGROUND SECTION (CREAM TO GREEN)
   ============================================= */
.wavy-background-section-reverse {
    position: relative;
    background-color: transparent;
    overflow: visible;
    z-index: 0;
}

/* Cream background in the middle (for Insurances section) */
.wavy-background-section-reverse::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #F9F6F0;
    z-index: -2;
}

/* Green wavy background at the bottom (for Team section) */
.wavy-background-section-reverse::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 400' preserveAspectRatio='none'%3E%3Cpath fill='%239EAE98' d='M0,120 C120,180 280,60 480,100 C680,140 850,40 1020,80 C1190,120 1320,60 1440,90 L1440,400 L0,400 Z'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    background-position: bottom;
    background-repeat: no-repeat;
    z-index: -1;
}

/* Green wave at the top transitioning TO cream (inverted wave from green to cream) */
.wave-top {
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 200px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 400' preserveAspectRatio='none'%3E%3Cpath fill='%239EAE98' d='M0,0 L0,250 C120,100 280,400 480,250 C680,100 850,400 1020,250 C1190,100 1320,380 1440,250 L1440,0 Z'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    background-position: top;
    background-repeat: no-repeat;
    z-index: -1;
    pointer-events: none;
}

.wavy-background-section-reverse>* {
    position: relative;
    z-index: 1;
}

/* Contactos page layout */
.contactos-page-container {
    /* On large screens, leave ~100px margin on each side */
    width: calc(100vw - 200px);
    max-width: none;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
}

@media (max-width: 1199.98px) {

    /* On medium screens, use smaller side margins */
    .contactos-page-container {
        width: calc(100vw - 60px);
    }
}

@media (max-width: 767.98px) {

    /* On mobile, use full width */
    .contactos-page-container {
        width: 100vw;
    }
}

.contactos-hero {
    margin-top: 2rem;
}

.contactos-hero-image-wrapper {
    background-image: url('../media/team-young-specialist-doctors-standing-corridor-hospital2.jpg');
    background-size: cover;
    background-position: center;
    min-height: 420px;
    border-radius: 0.75rem 0 0 0.75rem;
}

.contactos-hero-image-mobile {
    max-height: 260px;
    object-fit: cover;
}

.contactos-form-card {
    background-color: #ffffff;

    border-radius: 0.75rem;
    box-shadow: 0 18px 45px rgba(15, 45, 46, 0.12);
}

.contactos-info-section {
    margin-top: 3rem;
}

.contactos-info-card {
    border-radius: 0.75rem;
    background-color: #F9F6F0;
}

.contactos-social-card {
    border-radius: 0.75rem;
}

/* Make the Social + Map row and left card taller with more breathing room */
.contactos-page-container .row.g-4.mt-4.align-items-stretch {
    min-height: 720px;
    /* was 420px, +200px taller */
}

.contactos-page-container .row.g-4.mt-4.align-items-stretch>.col-lg-5,
contactos-page-container .row.g-4.mt-4.align-items-stretch>.col-lg-7 {
    display: flex;
}

.contactos-page-container .row.g-4.mt-4.align-items-stretch>.col-lg-5>.contactos-social-card,
.contactos-page-container .row.g-4.mt-4.align-items-stretch>.col-lg-7>.contactos-map-card {
    flex: 1 1 auto;
}

@media (max-width: 991.98px) {
    .contactos-page-container .row.g-4.mt-4.align-items-stretch {
        min-height: 0;
    }

    .contactos-page-container .row.g-4.mt-4.align-items-stretch>.col-lg-5,
    .contactos-page-container .row.g-4.mt-4.align-items-stretch>.col-lg-7 {
        display: block;
    }
}

.contactos-map-card {
    border-radius: 0.75rem;
}

.contactos-map-iframe {
    border-radius: 0.5rem;
    width: 100%;
    min-height: 320px;
}

/* Responsive helpers for insurance logos and featured media */
.insurance-logo {
    max-width: 150px;
    /* limit large logos */
    width: 100%;
    height: auto;
    object-fit: contain;
    display: inline-block;
}

.logo-col {
    padding: .5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Responsive media used for the large promotional images in #news-discounts */
.responsive-media {
    width: 100%;
    height: auto !important;
    /* override any inline or framework rules */
    max-height: 650px;
    /* keep a reasonable maximum on large screens */
    object-fit: contain;
}

/* Override object-fit for news-discounts so border-radius clips the actual image */
#news-discounts .responsive-media {
    object-fit: cover !important;
    max-height: none;
}

/* Ensure the insurances section uses flexible wrapping and avoids overlapping */
#insurances-section .row {
    align-items: center;
}

/* Slightly reduce spacing on very narrow screens */
@media (max-width: 575.98px) {
    .insurance-logo {
        max-width: 140px;
    }

    .logo-col {
        padding: .35rem;
    }
}

@media (max-width: 400px) {
    .insurance-logo {
        max-width: 120px;
    }

    .logo-col {
        padding: .25rem;
    }
}

/* Keep the feature overflow image from stretching layout on small screens */
.feature-overflow-img {
    max-width: 100%;
    height: auto !important;
    object-fit: cover;
}

/* =============================================
   ESPECIALIDADES PAGE - ENHANCED CARDS
   ============================================= */

/* Page Header for Especialidades */
.especialidades-page .page-header {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
        url('../media/sunset.jpg') center/cover no-repeat;
    min-height: 50vh;
    display: flex;
    align-items: center;
}

.especialidades-page .page-header h1,
.especialidades-page .page-header p {
    color: #fff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Mobile margin for page header text */
@media (max-width: 767.98px) {
    .especialidades-page .page-header .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        padding-top: 30px !important;
    }

    .especialidades-page .page-header h1 {
        margin-bottom: 1rem;
        margin-left: 15px;
        margin-right: 15px;
    }

    .especialidades-page .page-header p {
        margin-left: 15px;
        margin-right: 15px;
    }
}

@media (min-width: 768px) {
    .especialidades-page .page-header {
        min-height: 60vh;
    }
}

@media (min-width: 1200px) {
    .especialidades-page .page-header {
        min-height: 70vh;
    }
}

/* Override the shared service-section max-width for the especialidades page */
.especialidades-page .service-section {
    max-width: 100%;
}

/* Container for specialty cards */
.especialidades-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 100px;
}

@media (max-width: 991.98px) {
    .especialidades-container {
        padding: 0 40px;
    }
}

@media (max-width: 575.98px) {
    .especialidades-container {
        padding: 0 15px;
    }
}

/* ── Specialty cards grid ────────────────────────────────────────────── */

/* ≥ 1750px : 4 cards per row  (8 phantom cols, each card spans 2) */
@media (min-width: 1750px) {
    .especialidades-grid {
        display: grid;
        grid-template-columns: repeat(8, 1fr);
        gap: 2rem;
    }

    .especialidades-grid .specialty-card {
        grid-column: span 2;
    }
}

/* 1200px – 1749px : 3 cards per row  (6 phantom cols, each card spans 2)
   Last row has 2 cards → place them in cols 2-4 and 4-6 so they're centred */
@media (min-width: 1200px) and (max-width: 1749.98px) {
    .especialidades-grid {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 2rem;
    }

    .especialidades-grid .specialty-card {
        grid-column: span 2;
    }

    /* 2 cards left in last row: card 7 → cols 2-3, card 8 → cols 4-5 */
    .especialidades-grid .specialty-card:nth-last-child(2):nth-child(3n+1) {
        grid-column: 2 / 4;
    }

    .especialidades-grid .specialty-card:nth-last-child(1):nth-child(3n+2) {
        grid-column: 4 / 6;
    }
}

/* 768px – 1199px : 2 cards per row */
@media (min-width: 768px) and (max-width: 1199.98px) {
    .especialidades-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .especialidades-grid .specialty-card {
        grid-column: span 1;
    }
}

/* < 768px : 1 card per row */
@media (max-width: 767.98px) {
    .especialidades-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .especialidades-grid .specialty-card {
        grid-column: span 1;
    }
}



/* Individual specialty card */
.specialty-card {
    height: 100%;
}

.specialty-card-inner {
    background: var(--light);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.specialty-card-inner:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(67, 82, 63, 0.18);
}

/* Image wrapper with overlay */
.specialty-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 220px;
    width: 100%;
}

.specialty-img-wrapper img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.specialty-card-inner:hover .specialty-img-wrapper img {
    transform: scale(1.08);
}

/* Overlay with icon */
.specialty-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(67, 82, 63, 0.1) 0%, rgba(67, 82, 63, 0.5) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 1rem;
    transition: background 0.3s ease;
}

.specialty-card-inner:hover .specialty-overlay {
    background: linear-gradient(to bottom, rgba(67, 82, 63, 0.05) 0%, rgba(67, 82, 63, 0.4) 100%);
}

.specialty-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), #5a6b54);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.specialty-card-inner:hover .specialty-icon {
    transform: scale(1.1);
}

/* Content area */
.specialty-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.specialty-content h4 {
    color: var(--primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.specialty-content p {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Specialty list styling */
.specialty-list {
    list-style: none;
    padding: 0;
    margin: 0 0 auto 0;
}

.specialty-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.specialty-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

/* CTA button in cards */
.specialty-content .btn {
    align-self: flex-start;
    margin-top: auto;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.specialty-content .btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .specialty-img-wrapper {
        height: 200px;
    }

    .specialty-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

@media (max-width: 767.98px) {
    .specialty-img-wrapper {
        height: 180px;
    }

    .specialty-content {
        padding: 1.25rem;
    }

    .specialty-content h4 {
        font-size: 1.15rem;
    }
}

/* Intro text styling */
.especialidades-container .lead {
    font-size: 1.15rem;
    color: #444;
    line-height: 1.8;
    background: rgba(249, 246, 240, 0.9);
    padding: 1.5rem 2rem;
    border-radius: 15px;
}

@media (max-width: 767.98px) {
    .especialidades-container .lead {
        font-size: 1rem;
        padding: 1rem 1.5rem;
    }
}

/* =========================================================
   Page Header for Contactos
   ========================================================= */
.contactos-page .page-header {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
        url('../media/contactos_header.jpg') center/cover no-repeat;
    min-height: 50vh;
    display: flex;
    align-items: center;
}

.contactos-page .page-header h1,
.contactos-page .page-header p {
    color: #fff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Mobile margin for page header text */
@media (max-width: 767.98px) {
    .contactos-page .page-header .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        padding-top: 30px !important;
    }

    .contactos-page .page-header h1 {
        margin-bottom: 1rem;
        margin-left: 15px;
        margin-right: 15px;
    }

    .contactos-page .page-header p {
        margin-left: 15px;
        margin-right: 15px;
    }
}

@media (min-width: 768px) {
    .contactos-page .page-header {
        min-height: 60vh;
    }
}

@media (min-width: 1200px) {
    .contactos-page .page-header {
        min-height: 70vh;
    }
}


/* =============================================
   LAPTOP BREAKPOINT FIX (992px – 1399px)
   Prevents navbar and content overflow/overlap
   on typical laptop resolutions like 1240×544,
   1280×720, 1366×768, etc.
   ============================================= */

/* --- Tier 1: All compact desktops (992px – 1399px) --- */
@media (min-width: 992px) and (max-width: 1399.98px) {

    /* Navbar: shrink brand and links */
    .navbar .navbar-brand,
    .navbar a.btn {
        height: 65px;
    }

    .navbar .navbar-brand img.navbar-logo {
        height: 50px;
    }

    .navbar .navbar-nav .nav-link {
        font-size: 14px;
        margin-right: 18px;
        padding: 20px 0;
        letter-spacing: 0.25px;
    }

    .navbar .navbar-nav .nav-link::after {
        bottom: 10px;
        left: 6px;
        right: 6px;
    }

    /* Navbar CTA button: make more compact */
    .navbar .d-none.d-lg-flex .btn-primary {
        padding: 1rem 1.25rem !important;
        font-size: 13px;
    }

    /* Language toggle: tighter padding */
    .navbar .language-toggle {
        font-size: 12px;
    }

    .navbar .d-flex.align-items-center.px-5 {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }

    /* Feature section: reduce padding for mid-range */
    #feature-section {
        padding-left: 60px;
        margin-top: 120px;
    }

    /* Instagram section: reduce top margin */
    #news-discounts {
        margin-top: 180px;
    }

    /* Insurances section: reduce side padding */
    #news-discounts-section,
    #insurances-section {
        padding-left: 60px;
        padding-right: 60px;
    }

    /* --- Medicina Dentária page --- */
    /* Reduce container side margins */
    .med-dentaria-sections {
        width: calc(100vw - 120px);
        margin-left: 60px;
        margin-right: 60px;
    }

    /* Index nav: shrink items so all fit without horizontal scroll */
    .med-dent-page .index-nav--horizontal a {
        font-size: 0.82rem;
        padding: .4rem .6rem;
    }

    .med-dent-page .index-nav--horizontal ul {
        gap: .3rem;
    }

    /* Card images: reduce fixed height so they don't appear squished */
    .med-dentaria-card .card-img-wrapper img {
        height: 300px;
        min-height: 300px;
    }


    /* --- ADN page: Team grid cards --- */
    /* Switch from 4 to 3 columns so cards aren't too narrow */
    .team-grid .col-lg-3 {
        flex: 0 0 auto;
        width: 33.333%;
    }

    /* Slightly shorter cards to reduce the stretched look */
    .team-grid-card {
        height: 360px;
    }

    /* Shrink card text so names/specialties aren't clipped */
    .team-grid-card .card-title {
        font-size: 1.05rem;
    }

    .team-grid-card p.text-primary {
        font-size: 0.78rem;
    }

    .team-grid-card ul.list-unstyled li {
        font-size: 0.8rem;
        line-height: 1.6;
    }

    .team-grid-card .card-body {
        padding: 0.6rem 0.85rem 0.7rem;
    }
}

/* --- Tier 2: Tightest laptops (992px – 1279px, covers ~1240px) --- */
@media (min-width: 992px) and (max-width: 1279.98px) {

    /* Navbar: even tighter */
    .navbar .navbar-nav .nav-link {
        font-size: 13px;
        margin-right: 12px;
        letter-spacing: 0;
    }

    .navbar .navbar-brand img.navbar-logo {
        height: 44px;
    }

    .navbar .navbar-brand,
    .navbar a.btn {
        height: 60px;
    }

    /* Navbar brand: tighter horizontal padding */
    .navbar .navbar-brand {
        padding-left: 1rem !important;
        padding-right: 0.5rem !important;
    }

    /* Navbar CTA: even more compact */
    .navbar .d-none.d-lg-flex .btn-primary {
        padding: 0.85rem 1rem !important;
        font-size: 12px;
    }

    /* Language toggle area */
    .navbar .d-flex.align-items-center.px-5 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Feature section: match the <1200px breakpoint early */
    #feature-section {
        padding-left: 30px;
        padding-right: 20px;
        margin-top: 100px;
    }

    /* Instagram section: reduce top margin further */
    #news-discounts {
        margin-top: 140px;
    }

    /* Insurances/discounts: tighter side padding */
    #news-discounts-section,
    #insurances-section {
        padding-left: 40px;
        padding-right: 40px;
    }

    /* Service section overlap: reduce to avoid gap/overlap */
    .service-overlap {
        margin-top: -100px !important;
    }

    /* Overlay content: reduce left offset so text doesn't get clipped */
    .overlay-content {
        margin-left: 80px;
        padding-right: 80px;
    }

    /* Feature text: slightly smaller heading */
    .container.feature .feature-text h1 {
        font-size: 24px;
    }

    .container.feature .feature-text p,
    .container.feature .feature-text h5,
    .container.feature .feature-text .d-inline-block {
        font-size: 17px;
    }

    /* Feature bullet icons: reduce size to match smaller text */
    .container.feature .col-lg-4 .d-flex .rounded-circle {
        width: 46px !important;
        height: 46px !important;
    }

    /* Feature section column padding-top adjustments */
    .feature-bullets-col {
        padding-top: 40px !important;
    }

    .feature-img-col {
        padding-top: 60px !important;
    }

    /* --- Medicina Dentária page (tightest) --- */
    /* Even tighter container margins */
    .med-dentaria-sections {
        width: calc(100vw - 60px);
        margin-left: 30px;
        margin-right: 30px;
    }

    /* Index nav: further shrink to prevent any overflow */
    .med-dent-page .index-nav--horizontal a {
        font-size: 0.75rem;
        padding: .35rem .5rem;
    }

    .med-dent-page .index-nav--horizontal ul {
        gap: .2rem;
    }

    /* Card images: shorter to match narrower columns */
    .med-dentaria-card .card-img-wrapper img {
        height: 280px;
        min-height: 280px;
    }

    .med-dentaria-card {
        min-height: 280px;
    }

    /* Card body text: slightly smaller for better fit */
    .med-dentaria-card .card-body {
        padding: 1.5rem;
    }

    .med-dentaria-card .card-body p {
        font-size: 0.92rem;
    }


    /* --- ADN page: Team grid cards (tightest) --- */
    .team-grid-card {
        height: 340px;
    }

    .team-grid-card .card-title {
        font-size: 0.95rem;
    }

    .team-grid-card p.text-primary {
        font-size: 0.75rem;
    }

    .team-grid-card ul.list-unstyled li {
        font-size: 0.78rem;
        line-height: 1.5;
    }

    .team-grid-card .card-body {
        padding: 0.5rem 0.75rem 0.6rem;
        max-height: 65px;
    }

    .team-grid-card:hover .card-body {
        max-height: 340px;
    }
}