/* ==========================================================================
   RehabilitOral CSS Stylesheet
   Design System: Premium Medical & Training Clinic SPA
   Colors: Navy Blue (#0f2b46), Champagne Gold (#d4af37), Mint Teal (#20a497)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Color Palette */
    --primary-color: #0f2b46;
    --primary-light: #1b446c;
    --primary-dark: #071625;
    
    --secondary-color: #d4af37;
    --secondary-light: #e5c358;
    --secondary-dark: #a3811f;
    
    --accent-color: #20a497;
    --accent-light: #32c5b7;
    --accent-dark: #147a70;
    
    --text-main: #2d3748;
    --text-muted: #718096;
    --text-light: #a0aec0;
    
    --bg-main: #ffffff;
    --bg-alt: #f7fafc;
    --bg-dark: #0d1e2e;
    
    --success: #38a169;
    --error: #e53e3e;
    --warning: #dd6b20;
    
    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing & Borders */
    --border-radius-sm: 6px;
    --border-radius-md: 12px;
    --border-radius-lg: 24px;
    --border-radius-full: 9999px;
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

/* ==========================================================================
   1. Resets & Global Styles
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 116px;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.25;
}

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

ul {
    list-style: none;
}

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

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-alt);
}

::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: var(--border-radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Section Common Styles */
section {
    padding: 72px 0;
    position: relative;
}

.section-alt {
    background-color: var(--bg-alt);
}

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

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
}

.section-header h2 span {
    color: var(--accent-color);
}

.section-header h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--secondary-color);
    margin: 12px auto 0 auto;
    border-radius: var(--border-radius-full);
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--border-radius-full);
    cursor: pointer;
    transition: var(--transition-normal);
    border: 2px solid transparent;
    outline: none;
}

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

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

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

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

.btn-accent {
    background-color: var(--accent-color);
    color: #ffffff;
}

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

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

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

.btn-outline-white {
    background-color: transparent;
    border-color: #ffffff;
    color: #ffffff;
}

.btn-outline-white:hover {
    background-color: #ffffff;
    color: var(--primary-dark);
    transform: translateY(-2px);
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #ffffff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #e2e8f0;
    border-top: 6px solid var(--primary-color);
    border-bottom: 6px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.55, 0.055, 0.675, 0.19) infinite;
}

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

/* ==========================================================================
   2. Header & Sticky Navbar
   ========================================================================== */

#header {
    width: 100%;
    position: sticky;
    top: 0;
    left: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

#header.scrolled {
    padding: 0;
    box-shadow: var(--shadow-md);
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 96px;
    transition: var(--transition-normal);
}

#header.scrolled .navbar-container {
    height: 96px;
}

/* Logo Styles */
.logo {
    display: flex;
    align-items: center;
    width: 126px;
    height: 90px;
    flex: 0 0 auto;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--transition-normal);
}

#header.scrolled .logo img {
    height: 100%;
}

#header.scrolled .logo {
    height: 90px;
}

main {
    padding-top: 0;
}

#nosotros,
#especialistas,
#tratamientos,
#cursos,
#contacto {
    scroll-margin-top: 116px;
}

/* Navigation Links */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary-color);
    position: relative;
    padding: 8px 0;
    cursor: pointer;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2.5px;
    background-color: var(--accent-color);
    transition: var(--transition-normal);
    border-radius: var(--border-radius-full);
}

.nav-link:hover {
    color: var(--accent-color);
}

.nav-link.active {
    color: var(--accent-color);
}

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

/* Hamburguer mobile menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1010;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: var(--border-radius-full);
    transition: var(--transition-normal);
}

/* Mobile Nav Styles */
@media (max-width: 991px) {
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background-color: #ffffff;
        box-shadow: -5px 0 25px rgba(0,0,0,0.15);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1005;
    }
    
    .nav-menu.open {
        right: 0;
    }
    
    .nav-link {
        font-size: 1.2rem;
    }
    
    .menu-toggle.open span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    
    .menu-toggle.open span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.open span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}

/* ==========================================================================
   3. Hero Banner Slider (Carrusel)
   ========================================================================== */

.hero-slider {
    height: min(720px, calc(100vh - 112px));
    min-height: 580px;
    padding: 0;
    position: relative;
    overflow: hidden;
    margin-top: 112px;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.slide.active {
    opacity: 1;
    visibility: visible;
}

/* Slide Overlays */
.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(7, 22, 37, 0.85) 0%, rgba(15, 43, 70, 0.4) 100%);
    z-index: 1;
}

.slide-content {
    position: relative;
    z-index: 2;
    color: #ffffff;
    max-width: 750px;
    padding: 0 24px;
    transform: translateY(30px);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}

.slide.active .slide-content {
    transform: translateY(0);
}

.slide-tag {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--primary-dark);
    padding: 6px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: var(--border-radius-full);
    margin-bottom: 24px;
}

.slide h1 {
    font-size: 3.5rem;
    color: #ffffff;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.15;
}

.slide h1 span {
    color: var(--secondary-color);
}

.slide p {
    font-size: 1.2rem;
    margin-bottom: 35px;
    color: rgba(255, 255, 255, 0.9);
}

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

/* Slider Controls */
.slider-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition-normal);
    backdrop-filter: blur(5px);
}

.slider-control:hover {
    background-color: #ffffff;
    color: var(--primary-color);
    border-color: #ffffff;
}

.slider-control.prev {
    left: 30px;
}

.slider-control.next {
    right: 30px;
}

/* Dots Navigation */
.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 12px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition-normal);
}

.dot.active {
    background-color: var(--secondary-color);
    width: 28px;
    border-radius: var(--border-radius-full);
}

@media (max-width: 768px) {
    .slide h1 {
        font-size: 2.2rem;
    }
    .slide p {
        font-size: 1rem;
    }
    .slide-actions {
        flex-direction: column;
        gap: 12px;
    }
    .slider-control {
        display: none; /* Hide side controls on mobile */
    }
}

/* ==========================================================================
   4. Highlight Access Cards (Destaques)
   ========================================================================== */

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
    position: relative;
    z-index: 20;
}

.highlight-card {
    background: #ffffff;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-slow);
    display: flex;
    flex-direction: column;
}

.highlight-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.card-img-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.card-img-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(15,43,70,0) 60%, rgba(15,43,70,0.4) 100%);
}

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

.highlight-card:hover .card-img-wrapper img {
    transform: scale(1.1);
}

.card-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: var(--accent-color);
    color: #ffffff;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: var(--border-radius-sm);
    z-index: 5;
}

.card-body {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-body h3 {
    font-size: 1.35rem;
    margin-bottom: 12px;
}

.card-body p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
    flex-grow: 1;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.95rem;
}

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

.highlight-card:hover .card-link i {
    transform: translateX(5px);
}

@media (max-width: 991px) {
    .highlights-grid {
        grid-template-columns: 1fr;
        margin-top: 30px;
        gap: 24px;
    }
}

/* ==========================================================================
   5. About Us Section (Nosotros)
   ========================================================================== */

.about-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 40px;
    align-items: stretch;
    max-width: 1200px;
    margin: 0 auto;
}

.about-heading {
    max-width: 780px;
    margin: 0 auto 42px;
    text-align: center;
}

.section-kicker {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--accent-color);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.about-heading h1 {
    margin-bottom: 12px;
    color: var(--primary-color);
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    line-height: 1.05;
}

.about-heading h1::after {
    content: '';
    display: block;
    width: 64px;
    height: 4px;
    margin: 18px auto 0;
    background: var(--secondary-color);
    border-radius: var(--border-radius-full);
}

.about-heading .about-intro {
    max-width: 720px;
    margin: 20px auto 0;
    color: var(--text-muted);
    font-size: 1.15rem;
}

.about-media {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
}

.about-media .about-badge {
    position: static;
    width: 100%;
    max-width: 260px;
    min-height: 100%;
    padding: 38px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.about-vision-mission {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    height: 100%;
}

.value-card {
    height: 100%;
    padding: 32px;
    background: #ffffff;
    border: 1px solid #e5edf3;
    border-radius: 18px;
    box-shadow: 0 14px 35px rgba(15, 43, 70, 0.08);
}

.value-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    border-radius: 14px;
    font-size: 1.25rem;
}

.value-card h3 {
    margin: 0 0 14px;
    font-size: 1.55rem;
}

.value-card p {
    margin: 0;
    color: #4a5b6d;
    font-size: 1rem;
    line-height: 1.75;
}

.single-area-grid {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 1000px;
    margin: 40px auto 0;
}

.area-card,
.content-panel {
    padding: 36px;
    background: #ffffff;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
}

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

.area-card > div:first-child {
    text-align: center;
}

.area-card h3,
.content-panel h3 {
    margin: 24px 0 12px;
    color: var(--primary-color);
}

.area-card p,
.content-panel p {
    margin-bottom: 18px;
    color: var(--text-main);
    font-size: 1.02rem;
}

.content-section,
.content-panel {
    max-width: 1000px;
}

.content-list {
    display: grid;
    gap: 10px;
    margin: 14px 0 24px;
    padding-left: 24px;
    list-style: disc;
}

.content-list li {
    padding-left: 4px;
    color: var(--text-main);
}

.locations-note {
    margin-top: 26px;
    color: var(--primary-color);
    font-weight: 600;
}

.about-content h3 {
    font-size: 1.8rem;
    margin-bottom: 16px;
    color: var(--accent-color);
}

.about-content p {
    margin-bottom: 20px;
    color: var(--text-main);
    font-size: 1.05rem;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px 0;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.feature-item i {
    color: var(--secondary-color);
    font-size: 1.25rem;
    margin-top: 4px;
}

.feature-item h4 {
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.feature-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

.about-media {
    position: relative;
}

.about-img-main {
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 2;
    position: relative;
    width: 100%;
}

.about-badge {
    position: absolute;
    bottom: -30px;
    left: -30px;
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 30px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 5;
    text-align: center;
}

.about-badge .years {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    color: var(--secondary-color);
    line-height: 1;
    display: block;
}

.about-badge .text {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

@media (min-width: 992px) {
    #nosotros {
        min-height: auto;
        display: block;
    }

    .about-wrapper {
        gap: 40px;
    }
}

@media (max-width: 991px) {
    .about-wrapper {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .about-media {
        order: 2;
        margin-left: 0;
    }

    .about-vision-mission {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   6. Dental Specialists (Especialistas)
   ========================================================================== */

.team-image-container {
    max-width: 900px;
    margin: 0 auto 50px auto;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 5px solid #ffffff;
}

.team-image-container img {
    width: 100%;
    display: block;
    object-fit: cover;
}

.specialists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
    gap: 30px;
}

.specialist-card {
    background-color: #ffffff;
    border-radius: var(--border-radius-md);
    padding: 0 0 24px;
    overflow: hidden;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

.specialist-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.specialist-avatar {
    width: 100%;
    height: 310px;
    border-radius: 0;
    margin: 0 0 22px;
    background-color: #e2e8f0;
    overflow: hidden;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.specialist-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 18%;
}

.specialist-card h3 {
    font-size: 1.2rem;
    margin-bottom: 6px;
    padding: 0 20px;
}

.specialist-role {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
    padding: 0 20px;
}

.specialist-bio {
    font-size: 0.88rem;
    color: var(--text-muted);
    padding: 0 20px;
}

.footer-logo {
    width: 118px;
    height: 118px;
    object-fit: contain;
    margin-bottom: 20px;
    background: #ffffff;
    border-radius: var(--border-radius-sm);
}

@media (max-width: 991px) {
    .specialists-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .specialists-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   7. Treatments & Services (Tratamientos)
   ========================================================================== */

.treatments-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.treatment-box {
    background-color: #ffffff;
    border-radius: var(--border-radius-md);
    padding: 40px 30px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.treatment-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--accent-color);
    transition: var(--transition-normal);
}

.treatment-box:hover::before {
    width: 100%;
    opacity: 0.05;
}

.treatment-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.treatment-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(32, 164, 151, 0.1);
    color: var(--accent-color);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 24px;
}

.treatment-box h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.treatment-box p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0;
}

@media (max-width: 991px) {
    .treatments-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* ==========================================================================
   8. Courses & Academy (Cursos)
   ========================================================================== */

.courses-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.course-card {
    background: #ffffff;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
}

.course-img-wrapper {
    height: 240px;
    overflow: hidden;
    position: relative;
}

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

.course-info-tag {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: var(--border-radius-sm);
    z-index: 5;
}

.course-body {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.course-meta {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.course-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.course-body h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.course-body p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
    flex-grow: 1;
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #edf2f7;
}

.course-price {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-color);
}

@media (max-width: 991px) {
    .courses-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   9. Virtual Library (Biblioteca Virtual)
   ========================================================================== */

.library-search-box {
    max-width: 600px;
    margin: 0 auto 40px auto;
    position: relative;
}

.library-search-box input {
    width: 100%;
    padding: 16px 24px;
    padding-right: 50px;
    border-radius: var(--border-radius-full);
    border: 2px solid #e2e8f0;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: var(--transition-normal);
}

.library-search-box input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(32, 164, 151, 0.15);
}

.library-search-box i {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.2rem;
}

.library-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.resource-card {
    background-color: #ffffff;
    border-radius: var(--border-radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #edf2f7;
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.resource-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-light);
}

.resource-icon {
    width: 48px;
    height: 48px;
    background-color: rgba(212, 175, 55, 0.1);
    color: var(--secondary-color);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 20px;
}

.resource-card h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.resource-type {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 12px;
}

.resource-size {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.resource-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background-color: var(--bg-alt);
    color: var(--primary-color);
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 0.88rem;
    width: 100%;
}

.resource-card:hover .resource-btn {
    background-color: var(--primary-color);
    color: #ffffff;
}

@media (max-width: 991px) {
    .library-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .library-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   10. Blog & News (Noticias)
   ========================================================================== */

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.news-card {
    background-color: #ffffff;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.news-img-wrapper {
    height: 200px;
    overflow: hidden;
    position: relative;
}

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

.news-date {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background-color: var(--accent-color);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 5;
}

.news-body {
    padding: 24px;
}

.news-body h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-body p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-more {
    font-weight: 600;
    color: var(--accent-color);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.news-card:hover .news-more i {
    transform: translateX(4px);
}

@media (max-width: 991px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* ==========================================================================
   11. Contact & Locations (Contacto)
   ========================================================================== */

.contact-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
}

.contact-form-container {
    background-color: #ffffff;
    border-radius: var(--border-radius-md);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.contact-form-container h3 {
    font-size: 1.6rem;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    border: 1px solid #cbd5e0;
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-normal);
}

.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(32, 164, 151, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Offices & Locations info */
.locations-info h3 {
    font-size: 1.6rem;
    margin-bottom: 24px;
}

.location-item {
    background-color: #ffffff;
    border-radius: var(--border-radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    border-left: 4px solid var(--secondary-color);
    transition: var(--transition-normal);
}

.location-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.location-item h4 {
    font-size: 1.15rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
}

.location-item h4 i {
    color: var(--accent-color);
}

.location-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.location-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.location-btn {
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    background-color: var(--bg-alt);
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.location-btn:hover {
    background-color: var(--primary-color);
    color: #ffffff;
}

@media (max-width: 991px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   12. Footer
   ========================================================================== */

#footer {
    background-color: var(--bg-dark);
    color: #ffffff;
    padding-top: 80px;
    position: relative;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    padding-bottom: 50px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-widget h4 {
    color: #ffffff;
    font-size: 1.25rem;
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 10px;
}

.footer-widget h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 35px;
    height: 3px;
    background-color: var(--secondary-color);
    border-radius: var(--border-radius-full);
}

.footer-widget p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-nav a {
    color: var(--text-light);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-nav a:hover {
    color: var(--secondary-color);
    transform: translateX(4px);
}

.footer-socials {
    display: flex;
    gap: 12px;
}

.social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.05);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--transition-normal);
    border: 1px solid rgba(255,255,255,0.1);
}

.social-icon:hover {
    background-color: var(--secondary-color);
    color: var(--primary-dark);
    transform: translateY(-3px);
}

/* Newsletter Widget */
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.newsletter-form input {
    padding: 10px 14px;
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(255,255,255,0.15);
    background-color: rgba(255,255,255,0.05);
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
}

.newsletter-form input:focus {
    border-color: var(--accent-color);
    background-color: rgba(255,255,255,0.08);
}

.newsletter-form button {
    padding: 10px 14px;
    border-radius: var(--border-radius-sm);
    background-color: var(--secondary-color);
    color: var(--primary-dark);
    border: none;
    font-family: var(--font-heading);
    font-weight: 700;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition-normal);
}

.newsletter-form button:hover {
    background-color: var(--secondary-light);
}

/* Footer Bottom */
.footer-bottom {
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-light);
}

.footer-logo svg {
    height: 40px;
}

@media (max-width: 991px) {
    .footer-top {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .footer-top {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   13. Floating elements & Utilities
   ========================================================================== */

.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    z-index: 1000;
    transition: var(--transition-normal);
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}

.whatsapp-float span {
    position: absolute;
    right: 70px;
    background-color: #ffffff;
    color: #333333;
    padding: 6px 14px;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.88rem;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.whatsapp-float:hover span {
    opacity: 1;
    visibility: visible;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
}

/* Professional clinic layout refinements */
html {
    scroll-padding-top: 120px;
}

section[id] {
    scroll-margin-top: 120px;
}

#nosotros {
    padding: 84px 0 92px;
    overflow: hidden;
    background:
        radial-gradient(circle at 8% 12%, rgba(32, 164, 151, 0.10), transparent 30%),
        linear-gradient(180deg, #f8fcfd 0%, #ffffff 100%);
}

#nosotros .container {
    position: relative;
    z-index: 1;
}

.about-heading .section-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    padding: 10px 20px;
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(20, 122, 112, 0.22);
    border-radius: var(--border-radius-full);
    box-shadow: 0 8px 24px rgba(15, 43, 70, 0.08);
    font-size: clamp(1.15rem, 1.8vw, 1.5rem);
    font-weight: 800;
    letter-spacing: 0.16em;
}

.about-heading h1 {
    font-size: clamp(2.6rem, 4vw, 3.6rem);
    letter-spacing: -0.035em;
}

/* Marcas de Instituto Mundo Oral */
.brands-section {
    position: relative;
    overflow: hidden;
    background: #ffffff;
}

.brands-section::before {
    content: '';
    position: absolute;
    top: -150px;
    left: 50%;
    width: 520px;
    height: 300px;
    background: radial-gradient(circle, rgba(32, 164, 151, 0.11), transparent 68%);
    transform: translateX(-50%);
    pointer-events: none;
}

.brands-heading {
    position: relative;
    z-index: 1;
}

.brands-heading .section-kicker,
.brand-detail-heading .section-kicker {
    display: block;
    margin-bottom: 10px;
    color: var(--accent-dark);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.institutional-brands-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    max-width: 1120px;
    margin: 0 auto;
}

.institutional-brand-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    color: var(--primary-color);
    background: #ffffff;
    border: 1px solid #dfe9ef;
    border-radius: 20px;
    box-shadow: 0 14px 35px rgba(15, 43, 70, 0.09);
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.institutional-brand-card:hover,
.institutional-brand-card:focus-visible {
    color: var(--primary-color);
    border-color: rgba(32, 164, 151, 0.55);
    box-shadow: 0 22px 46px rgba(15, 43, 70, 0.16);
    transform: translateY(-7px);
}

.institutional-brand-card:focus-visible {
    outline: 3px solid rgba(32, 164, 151, 0.28);
    outline-offset: 4px;
}

.brand-logo-frame {
    display: grid;
    flex: 0 0 290px;
    min-width: 0;
    height: 290px;
    place-items: center;
    overflow: hidden;
    padding: 30px;
    border-bottom: 1px solid #e7eef3;
    box-sizing: border-box;
}

.brand-logo-light {
    background: #ffffff;
}

.brand-logo-cestoma {
    background: #082f65;
}

.brand-logo-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-logo-cestoma img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-detail-heading h2 {
    font-size: clamp(2.6rem, 4vw, 3.6rem);
    letter-spacing: -0.035em;
}

.brand-detail-heading > p {
    margin-top: 26px;
    color: #71839d;
    font-size: clamp(1.15rem, 1.8vw, 1.45rem);
    font-weight: 500;
}

.brand-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    text-align: center;
}

.brand-card-content strong {
    margin-bottom: 6px;
    font-size: 1.35rem;
    font-weight: 800;
}

.brand-card-content > span:not(.brand-card-link) {
    color: var(--text-light);
}

.brand-card-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 20px;
    color: var(--accent-dark);
    font-weight: 700;
}

.brand-card-link i {
    transition: transform 0.2s ease;
}

.institutional-brand-card:hover .brand-card-link i {
    transform: translateX(5px);
}

.about-media .about-badge {
    background: linear-gradient(145deg, #123654, #0b243a);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    box-shadow: 0 20px 45px rgba(15, 43, 70, 0.22);
}

.about-badge .years {
    font-size: 3.6rem;
}

.section-header h2 {
    max-width: 840px;
    font-size: clamp(2rem, 3vw, 2.65rem);
    letter-spacing: -0.025em;
}

#areas .area-card,
.content-panel {
    border: 1px solid #e5edf3;
    border-top: 4px solid var(--accent-color);
    border-radius: 18px;
    box-shadow: 0 14px 36px rgba(15, 43, 70, 0.08);
}

#especialistas {
    background: #ffffff;
}

#tratamientos,
#cursos {
    background: #f6fafc;
}

#andesorto {
    background: #ffffff;
}

#asesorias {
    background: linear-gradient(135deg, #eaf8f6, #f7fbfd);
}

.cestoma-panel {
    max-width: 1120px;
    margin: 0 auto;
    text-align: center;
}

.cestoma-panel > p {
    max-width: 1000px;
    margin-right: auto;
    margin-left: auto;
    line-height: 1.8;
}

.cestoma-panel h3 {
    text-align: center;
}

.cestoma-panel .content-list {
    width: fit-content;
    max-width: 100%;
    margin-right: auto;
    margin-left: auto;
    text-align: left;
}

.campaign-panel {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 32px;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
    border-top-color: var(--secondary-color);
}

.campaign-panel p {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.12rem;
    line-height: 1.8;
}

.campaign-icon {
    position: relative;
    width: 96px;
    height: 96px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(145deg, var(--accent-color), var(--accent-dark));
    border-radius: 26px;
    box-shadow: 0 16px 32px rgba(32, 164, 151, 0.25);
    font-size: 2.25rem;
}

.campaign-icon::after {
    content: '';
    position: absolute;
    inset: -8px;
    border: 2px solid rgba(32, 164, 151, 0.25);
    border-radius: 32px;
    animation: campaignPulse 2.4s ease-out infinite;
}

.campaign-icon span {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: var(--primary-dark);
    background: var(--secondary-color);
    border: 4px solid #ffffff;
    border-radius: 50%;
    font-size: 0.8rem;
}

@keyframes campaignPulse {
    0% { transform: scale(0.92); opacity: 0; }
    35% { opacity: 1; }
    100% { transform: scale(1.12); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .campaign-icon::after {
        animation: none;
    }
}

.specialist-card,
.treatment-box,
.contact-form-container,
.location-item {
    border: 1px solid #e6edf2;
    box-shadow: 0 12px 30px rgba(15, 43, 70, 0.07);
}

@media (min-width: 992px) {
    .treatments-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    #nosotros {
        padding: 64px 0 72px;
    }

    .about-heading {
        margin-bottom: 32px;
    }

    .value-card,
    .area-card,
    .content-panel {
        padding: 24px;
    }

    .about-media .about-badge {
        min-height: 190px;
    }

    .campaign-panel {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .campaign-icon {
        margin: 0 auto;
    }

    .institutional-brands-grid {
        grid-template-columns: 1fr;
        max-width: 460px;
    }

    .brand-logo-frame {
        flex-basis: 260px;
        height: 260px;
    }
}

@media (max-width: 576px) {
    section {
        padding: 60px 0;
    }

    .container {
        padding: 0 18px;
    }

    .navbar-container {
        height: 92px;
    }

    .logo {
        width: 92px;
        height: 86px;
    }

    .hero-slider {
        height: 570px;
        min-height: 570px;
        margin-top: 92px;
    }

    main {
        padding-top: 0;
    }

    .specialist-avatar {
        height: 360px;
    }
}
