/* ==========================================================================
   ULTRA-MINIMALIST DESIGN SYSTEM - FISIODEP
   ========================================================================== */

   :root {
    /* Core Brand Colors */
    --brand-primary: #0094B3;
    --brand-primary-light: #00B3C3;

    /* Theme: Light (Verde Agua / Aqua Green Background) */
    --bg-main: #E0F2F1;
    --bg-alt: #C9EAE5;
    --card-bg: #FFFFFF;
    --text-primary: #032E2A;
    --text-secondary: #13554E;
    --border-color: #AEE2DC;
    --nav-bg: rgba(224, 242, 241, 0.88);
    
    --success: #10b981;
    --error: #ef4444;
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --font-accent: 'Caveat', cursive;

    /* Spacing */
    --container-max: 1200px;
    --space-xs: 0.4rem;
    --space-sm: 0.8rem;
    --space-md: 1.5rem;
    --space-lg: 2.8rem;
    --space-xl: 4.5rem;
    --space-xxl: 6.5rem;

    /* Effects */
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
    /* Theme: Dark (Deep Ocean Aqua Teal) */
    --bg-main: #041D1B;
    --bg-alt: #082A27;
    --card-bg: #0D3733;
    --text-primary: #E0F2F1;
    --text-secondary: #9CE0D7;
    --border-color: #124D46;
    --nav-bg: rgba(4, 29, 27, 0.88);
    
    --success: #34d399;
    --error: #f87171;
}

/* ==========================================================================
   RESETS & GLOBAL
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: var(--font-body);
    color: var(--text-secondary);
    background-color: var(--bg-main);
    background-image: 
        linear-gradient(rgba(0, 148, 179, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 148, 179, 0.04) 1px, transparent 1px),
        radial-gradient(circle at 15% 15%, rgba(0, 179, 195, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 85% 85%, rgba(0, 148, 179, 0.12) 0%, transparent 50%);
    background-size: 50px 50px, 50px 50px, auto, auto;
    background-attachment: fixed;
    line-height: 1.6;
    font-weight: 300;
    transition: background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-x: hidden;
}

/* Buttery smooth theme morphing for key components */
body, header, p, h1, h2, h3, h4, section, .card-premium, .service-card, .accordion-item, .accordion-header, .accordion-content, input, select, textarea, .icon-btn, .mobile-nav, .logo-icon, .logo-fisio, .logo-dep, .logo-tagline {
    transition: background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                color 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section {
    padding: var(--space-xxl) 0;
}

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

/* Typography Base */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    line-height: 1.1;
    font-weight: 400;
}

.eyebrow {
    display: block;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--brand-primary);
    margin-bottom: var(--space-sm);
    font-weight: 600;
    text-align: center;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin-bottom: var(--space-lg);
    letter-spacing: -1px;
    text-align: center;
}

p.lead {
    font-size: clamp(1.05rem, 1.6vw, 1.35rem);
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    line-height: 1.5;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    font-weight: 400;
    font-family: var(--font-body);
    border-radius: 100px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    font-size: 1rem;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-main);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
    background: var(--brand-primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 148, 179, 0.35);
}

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

.btn-outline:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 148, 179, 0.1);
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
}

.icon-btn:hover {
    background: var(--bg-alt);
}

/* Theme Toggle Icons Logic */
[data-theme="light"] .sun-icon { display: none; }
[data-theme="dark"] .moon-icon { display: none; }

/* ==========================================================================
   HEADER
   ========================================================================== */

#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0.5rem 0;
    transition: var(--transition);
    background: transparent;
}

#main-header.scrolled {
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 148, 179, 0.04);
}

#main-header .nav-container {
    max-width: 95% !important;
    width: 95% !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-new {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 120px;
    width: auto;
    object-fit: contain;
    display: block;
    transition: var(--transition);
}

#main-header .logo-img {
    height: 160px;
    transition: var(--transition);
}

@media (max-width: 992px) {
    #main-header .logo-img {
        height: 100px;
    }
}

@media (max-width: 576px) {
    #main-header .logo-img {
        height: 70px;
    }
}

.logo-img:hover {
    transform: scale(1.03);
}

.logo-icon {
    color: var(--text-primary);
    flex-shrink: 0;
    transition: var(--transition);
}

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo-text-wrapper {
    display: flex;
    align-items: baseline;
    line-height: 1;
}

.logo-fisio {
    font-family: var(--font-accent);
    color: var(--brand-primary);
    font-size: 2.2rem;
    font-weight: 700;
    margin-right: 4px;
}

.logo-dep {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.7rem;
    letter-spacing: -1px;
}

.logo-tagline {
    font-family: var(--font-body);
    font-size: 0.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 1px;
    margin-top: 4px;
    text-transform: uppercase;
}

#desktop-nav ul {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

#desktop-nav a:not(.btn) {
    color: var(--text-primary);
    font-size: 0.95rem;
    position: relative;
}

#desktop-nav a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text-primary);
    transition: var(--transition);
}

#desktop-nav a:not(.btn):hover::after {
    width: 100%;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    color: var(--text-primary);
    transition: var(--transition);
}

.icon-btn:hover {
    background-color: rgba(0, 148, 179, 0.08);
    transform: scale(1.05);
}

/* Theme Toggle Icons Logic */
[data-theme="light"] .sun-icon { display: none; }
[data-theme="dark"] .moon-icon { display: none; }

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
}

.mobile-nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: var(--space-lg) var(--space-md);
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
    z-index: 999;
}

.mobile-nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-nav ul {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-nav a {
    font-size: 1.5rem;
    color: var(--text-primary);
    font-family: var(--font-heading);
}

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 100px;
}

.hero-decorative-shape {
    position: absolute;
    top: -25%;
    right: -15%;
    width: 65vw;
    height: 65vw;
    background: radial-gradient(circle, rgba(0, 148, 179, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: var(--space-lg);
    align-items: center;
    width: 100%;
}

.hero-grid-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    position: relative;
    z-index: 10;
    padding: var(--space-lg) 0;
}

.hero-grid-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    width: 100%;
    position: relative;
    z-index: 10;
    padding: var(--space-lg) 0;
}

.hero-video-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.hero-video-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.95;
}

.hero-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(224, 242, 241, 0.25) 30%, rgba(224, 242, 241, 0.65) 100%);
}

[data-theme="dark"] .hero-video-overlay {
    background: radial-gradient(circle, rgba(4, 29, 27, 0.30) 30%, rgba(4, 29, 27, 0.70) 100%);
}

.hero-centered-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    animation: floatIllustration 8s ease-in-out infinite;
}

.futuristic-screen {
    width: 380px;
    height: 190px;
    background: rgba(0, 148, 179, 0.03);
    border: 3px solid rgba(0, 148, 179, 0.35);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 148, 179, 0.15), inset 0 0 25px rgba(0, 148, 179, 0.08);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 20px;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.futuristic-screen:hover {
    transform: scale(1.02);
    border-color: var(--brand-primary);
    box-shadow: 0 15px 45px rgba(0, 148, 179, 0.25), inset 0 0 35px rgba(0, 148, 179, 0.12);
}

.futuristic-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.15) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.04), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.04));
    background-size: 100% 4px, 6px 100%;
    pointer-events: none;
    z-index: 2;
    opacity: 0.35;
}

[data-theme="dark"] .futuristic-screen {
    background: rgba(0, 148, 179, 0.05);
    border-color: var(--brand-primary);
    box-shadow: 0 12px 50px rgba(0, 148, 179, 0.3), inset 0 0 30px rgba(0, 148, 179, 0.15);
}

.free-logo-container {
    width: 440px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    background: rgba(224, 242, 241, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 2px solid rgba(0, 148, 179, 0.25);
    border-radius: 24px;
    box-shadow: 0 12px 35px rgba(0, 148, 179, 0.08);
    overflow: hidden;
    transition: var(--transition);
}

.free-logo-container:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 45px rgba(0, 148, 179, 0.15);
    border-color: rgba(0, 148, 179, 0.4);
}

.moving-logo-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: screen;
    filter: contrast(200%) brightness(110%) saturate(130%);
    transition: var(--transition);
    transform: scale(2.05);
}

[data-theme="dark"] .free-logo-container {
    background: rgba(3, 46, 42, 0.65);
    border-color: rgba(0, 148, 179, 0.45);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .moving-logo-video {
    filter: contrast(200%) brightness(110%) saturate(130%);
    mix-blend-mode: screen;
}

.hero-text-content {
    max-width: 680px;
}

.hero-tagline {
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.85rem;
    color: var(--brand-primary);
    margin-bottom: var(--space-md);
    font-weight: 600;
}

.hero-title {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    margin-bottom: var(--space-md);
    letter-spacing: -2px;
    font-weight: 600;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
    max-width: 550px;
    margin-bottom: var(--space-lg);
    font-weight: 300;
}

.hero-graphics-content {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero-illustration {
    width: 100%;
    max-width: 440px;
    height: auto;
    animation: floatIllustration 8s ease-in-out infinite;
}

@keyframes floatIllustration {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(1deg); }
}

/* ==========================================================================
   ABOUT / MVV
   ========================================================================== */

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xxl);
}

.founders-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.founder-card.card-premium {
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    background: var(--card-bg);
    box-shadow: 0 10px 30px rgba(0, 148, 179, 0.03);
    transition: var(--transition);
}

.founder-card.card-premium:hover {
    border-color: var(--brand-primary);
    box-shadow: 0 15px 35px rgba(0, 148, 179, 0.08);
    transform: translateY(-5px);
}

.founder-card h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
}

.founder-role {
    font-size: 0.82rem;
    color: var(--brand-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
}

.founder-card p {
    font-size: 0.85rem;
    line-height: 1.5;
}

.founder-avatar-wrapper {
    width: 100%;
    height: 280px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: var(--space-sm);
    border: 1px solid var(--border-color);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .founder-avatar-wrapper {
    background: rgba(255, 255, 255, 0.95);
}

.founder-avatar {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: var(--transition);
}

.founder-card:hover .founder-avatar {
    transform: scale(1.04);
}

@media (max-width: 768px) {
    .founders-info {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
}

.mvv-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.mvv-item {
    position: relative;
}

.mvv-icon-large {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    line-height: 1;
    color: var(--border-color);
    font-weight: 300;
    margin-bottom: var(--space-xs);
    letter-spacing: -2px;
}

.mvv-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   SERVICES
   ========================================================================== */

.section-header {
    margin-bottom: var(--space-xl);
    text-align: center;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 220px));
    gap: var(--space-md);
    justify-content: center;
}

@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(2, minmax(180px, 220px));
    }
}

@media (max-width: 576px) {
    .services-grid {
        grid-template-columns: repeat(1, minmax(180px, 220px));
    }
}

.services-grid .service-card:last-child {
    grid-column: span 3;
    aspect-ratio: auto;
    padding: var(--space-lg);
    min-height: 180px;
}

@media (max-width: 992px) {
    .services-grid .service-card:last-child {
        grid-column: span 2;
    }
}

@media (max-width: 576px) {
    .services-grid .service-card:last-child {
        grid-column: span 1;
    }
}

.service-card {
    aspect-ratio: 1.1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-sm);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--card-bg);
}

.service-icon-wrapper {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
    background: rgba(0, 148, 179, 0.06);
    border-radius: 50%;
    margin-bottom: var(--space-sm);
    transition: var(--transition);
}

.service-svg-icon {
    width: 22px;
    height: 22px;
}

.service-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0;
    color: var(--text-primary);
    transition: var(--transition);
    line-height: 1.3;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--brand-primary);
    box-shadow: 0 12px 30px rgba(0, 148, 179, 0.08);
}

.service-card:hover .service-icon-wrapper {
    color: var(--brand-primary-light);
    background: rgba(0, 148, 179, 0.12);
    transform: scale(1.1);
}

.service-card:hover h3 {
    color: var(--brand-primary);
}

/* Modal de Detalles de Servicio */
.service-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 46, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.service-modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    width: 90%;
    max-width: 550px;
    padding: var(--space-lg);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 50px rgba(0, 148, 179, 0.15);
}

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

.service-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
}

.service-modal-close:hover {
    color: var(--brand-primary);
    transform: rotate(90deg);
}

.service-modal-body {
    text-align: center;
}

.service-modal-icon-container {
    width: 70px;
    height: 70px;
    background: rgba(0, 148, 179, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    color: var(--brand-primary);
}

.service-modal-icon-container svg {
    width: 35px;
    height: 35px;
}

.service-modal-body h3 {
    font-size: 1.6rem;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    font-family: var(--font-heading);
}

.service-modal-body p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.service-modal-body ul {
    text-align: left;
    background: rgba(0, 148, 179, 0.03);
    border: 1px solid var(--border-color);
    padding: 20px 20px 20px 40px;
    border-radius: 16px;
    list-style-type: square;
    color: var(--text-secondary);
}

.service-modal-body ul li {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.service-modal-body ul li:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   PATHOLOGIES / ACCORDION
   ========================================================================== */

.pathologies-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: var(--space-xl);
}

/* Card Premium Design System */
.card-premium {
    position: relative;
    background: var(--card-bg, #FFFFFF);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: var(--space-md);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.card-premium:hover {
    transform: translateY(-5px);
    border-color: var(--brand-primary);
    box-shadow: 0 12px 30px rgba(0, 148, 179, 0.08);
}

/* Glow Effect */
.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 100% 0%, rgba(0, 148, 179, 0.08) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
}

.card-premium:hover .card-glow {
    opacity: 1;
}

/* MVV Card adjustments */
.mvv-item.card-premium {
    padding: var(--space-lg) var(--space-md) var(--space-md);
}

.mvv-item .mvv-icon-large {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 4.5rem;
    margin-bottom: 0;
    opacity: 0.25;
    transition: var(--transition);
}

.mvv-item.card-premium:hover .mvv-icon-large {
    color: var(--brand-primary);
    opacity: 0.45;
    transform: scale(1.1);
}

/* Audience Grid & Card adjustments */
.audience-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.audience-card.card-premium {
    padding: 1.2rem;
    gap: 0.6rem;
    justify-content: flex-start;
}

.audience-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.audience-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
    background: rgba(0, 148, 179, 0.05);
    border-radius: 8px;
    flex-shrink: 0;
    transition: var(--transition);
}

.audience-icon svg {
    width: 20px;
    height: 20px;
}

.audience-card.card-premium:hover .audience-icon {
    background: var(--brand-primary);
    color: #fff;
}

.audience-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.audience-card p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.45;
    margin: 0;
}

.accordion-item {
    border-bottom: 1px solid var(--border-color);
}

.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    background: none;
    border: none;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
}

.accordion-header:hover {
    color: var(--brand-primary);
}

.accordion-header .icon {
    font-size: 1.5rem;
    font-weight: 300;
    transition: var(--transition);
}

.accordion-item.active .accordion-header .icon {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.accordion-content p {
    padding-bottom: 1rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
    padding: var(--space-xl) 0 var(--space-md);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.footer-slogan {
    margin-top: 1rem;
    color: var(--text-secondary);
}

.footer-contact p {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.footer-link {
    transition: var(--transition);
}

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

.social-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 148, 179, 0.05);
    color: var(--brand-primary);
    transition: var(--transition);
}

.social-icon-btn:hover {
    background: var(--brand-primary);
    color: #ffffff;
    transform: translateY(-2px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
}

/* ==========================================================================
   CONTACT SECTION & FORM
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: var(--space-lg);
    align-items: start;
}

.info-card-premium {
    padding: 20px;
    height: 100%;
}

.info-card-premium h3 {
    font-size: 1.4rem;
    margin-bottom: var(--space-xs);
}

.info-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 148, 179, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
    flex-shrink: 0;
}

.info-svg {
    width: 20px;
    height: 20px;
}

.info-text-content {
    display: flex;
    flex-direction: column;
}

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

.info-text-content span {
    font-size: 0.9rem;
}

/* Form Styles */
.appointment-form {
    padding: 20px;
    gap: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-input {
    background: var(--bg-main);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 0.65rem 1rem;
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--text-primary);
    transition: var(--transition);
    width: 100%;
}

.form-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(0, 148, 179, 0.12), 0 0 12px rgba(0, 148, 179, 0.1);
}

select.form-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%230094B3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.booking-success-alert {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid #10b981;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    color: #10b981;
}

.booking-success-alert strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.booking-success-alert p {
    font-size: 0.85rem;
    margin: 0;
    color: var(--text-secondary);
}

/* ==========================================================================
   STATS BANNER
   ========================================================================== */

.stats-banner-fisiodep {
    background: rgba(224, 242, 241, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 2px solid var(--border-color);
    border-radius: 30px;
    margin: -50px auto var(--space-xl) auto;
    max-width: var(--container-max);
    width: calc(100% - 2 * var(--space-md));
    box-shadow: 0 15px 40px rgba(0, 148, 179, 0.06);
    padding: var(--space-md) 0;
    z-index: 20;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .stats-banner-fisiodep {
    background: rgba(4, 29, 27, 0.65);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.stats-banner-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    position: relative;
}

.stat-item-fisiodep {
    text-align: center;
    padding: var(--space-md) var(--space-sm);
    border-right: 1px solid var(--border-color);
}

.stat-item-fisiodep:last-child {
    border-right: none;
}

.stat-num-wrapper {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    margin-bottom: 0.5rem;
}

.stat-num-fisiodep {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 600;
    color: var(--brand-primary);
    line-height: 1;
    letter-spacing: -2px;
}

.stat-plus-fisiodep {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 300;
    color: var(--brand-primary);
}

.stat-label-fisiodep {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    font-weight: 500;
    display: block;
}

@media (max-width: 768px) {
    .stats-banner-container {
        grid-template-columns: repeat(2, 1fr);
    }
    .stat-item-fisiodep:nth-child(2) {
        border-right: none;
    }
    .stat-item-fisiodep:nth-child(3) {
        border-right: 1px solid var(--border-color);
    }
    .stat-item-fisiodep:nth-child(4) {
        border-right: none;
    }
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1), transform 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   MEDIA QUERIES
   ========================================================================== */

@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
        text-align: center;
    }
    
    .hero-text-content {
        margin: 0 auto;
    }
    
    .hero-graphics-content {
        order: -1;
        width: 80%;
        margin: 0 auto;
        max-width: 340px;
    }
    
    .about-grid, .mvv-grid, .pathologies-layout, .footer-content, .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .audience-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1080px) {
    #desktop-nav {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
    .section {
        padding: var(--space-xl) 0;
    }
}

/* ==========================================================================
   FLOATING WHATSAPP WIDGET
   ========================================================================== */

.wa-widget-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
}

.wa-trigger {
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.35);
    position: relative;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.wa-trigger:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 12px 36px rgba(37, 211, 102, 0.45);
}

.wa-badge-pulse {
    position: absolute;
    top: 0;
    right: 0;
    width: 14px;
    height: 14px;
    background-color: #ef4444;
    border-radius: 50%;
    border: 2.5px solid var(--bg-main);
    animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.wa-bubble {
    display: none;
    width: 280px;
    background-color: var(--bg-alt);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0, 148, 179, 0.12);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    animation: slideUpBubble 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.wa-bubble-close {
    position: absolute;
    top: 8px;
    right: 12px;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.wa-bubble p {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-right: 10px;
}

.wa-bubble-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #25d366;
    color: #ffffff;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    width: 100%;
}

.wa-bubble-btn:hover {
    background-color: #20ba5a;
}

/* ==========================================================================
   ARS & COPAY CALCULATOR STYLES
   ========================================================================== */

.ars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.ars-card {
    padding: 16px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0, 148, 179, 0.03);
}

.ars-card:hover {
    transform: translateY(-4px);
    border-color: var(--brand-primary);
    box-shadow: 0 15px 35px rgba(0, 148, 179, 0.08);
}

.calc-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.calc-opt-btn {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
}

.calc-opt-btn i {
    font-size: 1.25rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.calc-opt-btn span {
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}

.calc-opt-btn.active, .calc-opt-btn:hover {
    border-color: var(--brand-primary);
    box-shadow: 0 4px 15px rgba(0, 148, 179, 0.08);
}

.calc-opt-btn.active i {
    color: var(--brand-primary);
    transform: scale(1.1);
}

.calc-qty-wrapper {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: var(--space-sm);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

@media (max-width: 992px) {
    .calculator-layout {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   SPECIALIZED THERAPY CENTER EXTENSION STYLES
   ========================================================================== */

/* 1. Body Zone Anatomy Selector */
.anatomy-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.anatomy-btn {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
    font-family: var(--font-body);
}

.anatomy-btn i {
    font-size: 1.25rem;
    color: var(--brand-primary);
    transition: var(--transition);
}

.anatomy-btn span {
    font-size: 0.82rem;
    font-weight: 700;
}

.anatomy-btn.active, .anatomy-btn:hover {
    border-color: var(--brand-primary);
    background: rgba(0, 148, 179, 0.08);
    box-shadow: 0 8px 25px rgba(0, 148, 179, 0.12);
    color: var(--brand-primary);
}

.anatomy-btn.active i {
    transform: scale(1.15);
}

.anatomy-result-box {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 15px 40px rgba(0, 148, 179, 0.04);
    transition: var(--transition);
}

/* 2. Medical Technology Showcase */
.tech-showcase-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 220px));
    gap: var(--space-md);
    justify-content: center;
}

@media (max-width: 992px) {
    .tech-showcase-grid {
        grid-template-columns: repeat(2, minmax(180px, 220px));
    }
}

@media (max-width: 576px) {
    .tech-showcase-grid {
        grid-template-columns: repeat(1, minmax(180px, 220px));
    }
}

.tech-card {
    aspect-ratio: 1.1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-sm);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--card-bg);
    position: relative;
    overflow: hidden;
}

.tech-card:hover {
    transform: translateY(-5px);
    border-color: var(--brand-primary);
    box-shadow: 0 12px 30px rgba(0, 148, 179, 0.08);
}

.tech-icon-wrapper {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
    background: rgba(0, 148, 179, 0.06);
    border-radius: 50%;
    margin-bottom: var(--space-sm);
    transition: var(--transition);
}

.tech-icon {
    font-size: 1.25rem;
    color: var(--brand-primary);
    margin-bottom: 0;
    transition: var(--transition);
}

.tech-card:hover .tech-icon-wrapper {
    color: var(--brand-primary-light);
    background: rgba(0, 148, 179, 0.12);
    transform: scale(1.1);
}

.tech-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0;
    color: var(--text-primary);
    transition: var(--transition);
    line-height: 1.3;
}

/* Modal de Detalles de Tecnología */
.tech-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 46, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tech-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.tech-modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    width: 90%;
    max-width: 550px;
    padding: var(--space-lg);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 50px rgba(0, 148, 179, 0.15);
}

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

.tech-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
}

.tech-modal-close:hover {
    color: var(--brand-primary);
    transform: rotate(90deg);
}

.tech-modal-body {
    text-align: center;
}

.tech-modal-icon-container {
    width: 70px;
    height: 70px;
    background: rgba(0, 148, 179, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    color: var(--brand-primary);
}

.tech-modal-icon-container i {
    font-size: 1.75rem;
}

.tech-modal-body h3 {
    font-size: 1.6rem;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    font-family: var(--font-heading);
}

.tech-modal-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 12px;
    border-radius: 20px;
    background: rgba(0, 148, 179, 0.08);
    color: var(--brand-primary);
    border: 1px solid rgba(0, 148, 179, 0.15);
    margin-bottom: var(--space-md);
}

.tech-modal-body p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* 3. Patient Clinical Journey (4 Steps) */
.journey-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    position: relative;
}

.journey-grid::before {
    content: '';
    position: absolute;
    top: 43px;
    left: 40px;
    right: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--border-color) 0%, var(--brand-primary) 50%, var(--border-color) 100%);
    z-index: 0;
    opacity: 0.75;
}

@media (max-width: 992px) {
    .journey-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .journey-grid::before {
        display: none;
    }
}

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

.journey-card {
    padding: 18px 16px;
    border-radius: 16px;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1;
    box-shadow: 0 10px 30px rgba(0, 148, 179, 0.03);
    transition: var(--transition);
}

.journey-card:hover {
    transform: translateY(-5px);
    border-color: var(--brand-primary);
    box-shadow: 0 15px 35px rgba(0, 148, 179, 0.08);
}

.journey-step-num {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    font-family: var(--font-heading);
    border: 3px solid var(--card-bg);
    box-shadow: 0 0 0 2px var(--brand-primary);
    z-index: 2;
}

/* 4. Clinical FAQ Accordion */
.faq-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 850px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.faq-question {
    width: 100%;
    padding: 14px 20px;
    background: var(--bg-main);
    border: none;
    text-align: left;
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    color: var(--brand-primary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background: var(--bg-alt);
    padding: 0 24px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.faq-item.active .faq-answer {
    padding: 16px 24px 24px 24px;
}

.faq-item.active .faq-question {
    color: var(--brand-primary);
    border-bottom: 1px solid var(--border-color);
}

/* ==========================================================================
   FULL SCREEN SECTIONS & IDENTIDAD TABS
   ========================================================================== */
.full-screen-section {
    min-height: 82vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg) 0;
    box-sizing: border-box;
}

.contact-section {
    position: relative;
    overflow: hidden;
}

.contact-section .container {
    position: relative;
    z-index: 2;
}

.identidad-tab-container {
    display: inline-flex;
    background: rgba(0, 148, 179, 0.05);
    border: 1px solid var(--border-color);
    padding: 6px;
    border-radius: 40px;
    gap: 6px;
    margin-top: 10px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.02);
}

.identidad-tab-btn {
    background: transparent;
    border: none;
    padding: 10px 24px;
    border-radius: 30px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.identidad-tab-btn.active {
    background: var(--brand-primary);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 148, 179, 0.25);
}

.identidad-tab-btn:not(.active):hover {
    color: var(--brand-primary);
    background: rgba(0, 148, 179, 0.08);
}

.identidad-panel {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
}

.identidad-panel.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .full-screen-section {
        min-height: auto;
        padding: var(--space-lg) 0;
    }
    .identidad-tab-container {
        flex-direction: column;
        width: 100%;
        border-radius: 16px;
    }
    .identidad-tab-btn {
        justify-content: center;
        width: 100%;
    }
}

/* ==========================================================================
   DIAGNOSTICO ZONA - DOS COLUMNAS & ILUSTRACION
   ========================================================================== */
.diagnostico-layout-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 30px;
    align-items: center;
    width: 100%;
}

.diagnostico-info-column {
    display: flex;
    flex-direction: column;
}

.diagnostico-illustration-column {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.anatomy-illustration-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    border-radius: 20px;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    box-shadow: 0 15px 45px rgba(0, 148, 179, 0.04);
    height: 440px;
    width: 100%;
    max-width: 380px;
    overflow: hidden;
    transition: var(--transition);
}

.anatomy-illustration-container:hover {
    border-color: var(--brand-primary);
    box-shadow: 0 20px 50px rgba(0, 148, 179, 0.08);
    transform: translateY(-4px);
}

.anatomy-illustration-container svg {
    width: 100%;
    height: 100%;
    animation: floatIllustration 6s ease-in-out infinite;
}

.anatomy-svg-node .inner-node {
    fill: var(--text-secondary);
    stroke: var(--card-bg);
    stroke-width: 1.5;
    transition: var(--transition);
}

.anatomy-svg-node .outer-pulse {
    fill: transparent;
    stroke: transparent;
    transition: var(--transition);
    transform-origin: center;
}

.anatomy-svg-node:hover .inner-node {
    fill: var(--brand-primary);
    stroke: #ffffff;
    stroke-width: 2;
}

/* Active glowing state for selected joints */
.anatomy-svg-node.active .inner-node {
    fill: var(--brand-primary);
    stroke: #ffffff;
    stroke-width: 2.5;
    filter: url(#glow-filter);
}

.anatomy-svg-node.active .outer-pulse {
    stroke: var(--brand-primary);
    stroke-width: 2;
    fill: rgba(0, 148, 179, 0.12);
    animation: svgPulse 2s infinite ease-in-out;
}

@keyframes svgPulse {
    0% {
        transform: scale(0.9);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.35);
        opacity: 0.3;
    }
    100% {
        transform: scale(0.9);
        opacity: 0.9;
    }
}

@media (max-width: 992px) {
    .diagnostico-layout-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .diagnostico-illustration-column {
        display: none; /* Hide on smaller tablet/mobile to preserve interactive space */
    }
}

/* ==========================================================================
   GLOBAL MOBILE RESPONSIVENESS FIXES
   ========================================================================== */
@media (max-width: 992px) {
    .hero-grid-left, .hero-grid-centered {
        align-items: center !important;
        text-align: center !important;
    }
    .hero-centered-logo, .hero-text-content, .hero-title, .hero-subtitle {
        text-align: center !important;
    }
    .hero-text-content span {
        justify-content: center !important;
    }
    .hero-actions {
        justify-content: center !important;
    }
}

@media (max-width: 768px) {
    h1, h2 {
        font-size: clamp(1.5rem, 6vw, 2.2rem) !important;
        line-height: 1.2 !important;
    }
    h3, h4 {
        font-size: clamp(1.2rem, 5vw, 1.5rem) !important;
        line-height: 1.3 !important;
    }
    .hero {
        align-items: flex-start !important;
        padding-top: 130px !important;
        padding-bottom: 2rem !important;
        height: auto !important;
    }
    .stats-banner-fisiodep {
        margin-top: 0 !important;
        width: 100% !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
    }
    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem) !important;
    }
    .hero-subtitle {
        font-size: 1rem !important;
    }
    .hero-actions {
        flex-direction: column !important;
        width: 100% !important;
        gap: 1rem !important;
    }
    .hero-actions .btn {
        width: 100% !important;
        justify-content: center !important;
    }
    .hero-text-content {
        padding: 0 1rem !important;
    }
    .section {
        padding: var(--space-lg) 0 !important;
    }
    .section-title {
        font-size: clamp(1.5rem, 6vw, 2rem) !important;
    }
    p.lead {
        font-size: 1rem !important;
    }
}

@media (max-width: 576px) {
    .stats-banner-container {
        grid-template-columns: 1fr !important;
    }
    .stat-item-fisiodep {
        border-right: none !important;
        border-bottom: 1px solid var(--border-color);
    }
    .stat-item-fisiodep:last-child {
        border-bottom: none;
    }
    .hero-grid-left, .hero-grid-centered {
        padding-top: 120px !important; /* Account for mobile header */
        padding-bottom: 2rem !important;
    }
    .wa-widget-wrapper {
        bottom: 15px !important;
        right: 15px !important;
    }
    .wa-trigger {
        width: 50px !important;
        height: 50px !important;
    }
    .wa-trigger svg {
        width: 24px !important;
        height: 24px !important;
    }
    .logo-img {
        height: 60px !important; /* ensure it fits on small phones */
    }
}

/* ==========================================================================
   UNIVERSAL FLUID MEDIA & TEXT WRAPPING (ALL DEVICES)
   ========================================================================== */
img, video, canvas, svg, iframe {
    max-width: 100%;
    /* No forzamos height: auto aquí globalmente para no romper el mapa ni el video de fondo, 
       pero aseguramos que nunca excedan el ancho de la pantalla */
}

/* Excepción para el video de fondo del hero: en PC (escritorio) cubrirá toda la pantalla sin bordes */
.hero-video-bg, .hero-video-bg-container {
    width: 100% !important;
    height: 100% !important;
}

.hero-video-bg {
    object-fit: cover !important;
}

/* En dispositivos móviles, regresar a cover para evitar barras vacías y un fondo roto */
@media (max-width: 992px) {
    .hero-video-bg {
        object-fit: cover !important;
    }
}

/* Evitar que textos largos rompan el diseño en pantallas muy pequeñas (ej. iPhone SE) */
h1, h2, h3, h4, p, a, span, li, div {
    overflow-wrap: break-word;
    word-break: break-word;
    -webkit-hyphens: auto;
    hyphens: auto;
}

/* Asegurar que las tarjetas y formularios no se desborden horizontalmente */
.card-premium, .info-card-premium, .service-card, .form-input, .modal-overlay .glass-panel {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Contenedores siempre confinados al ancho del dispositivo (Viewport width) */
body, html {
    max-width: 100vw;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent; /* Remove grey tap highlight on mobile webkit */
}

/* ==========================================================================
   MODERN MOBILE OPTIMIZATIONS (NOTCH, SAFE AREAS & TOUCH TARGETS)
   ========================================================================== */
@media (max-width: 768px) {
    /* Ajustar botones para que no sean excesivamente grandes en pantallas pequeñas */
    .btn {
        padding: 0.8rem 1.5rem !important;
        font-size: 0.95rem !important;
    }
    
    /* Prevenir que el contenido choque con la "isla dinámica" o muesca de los nuevos iPhones */
    body {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    
    /* El botón flotante de WhatsApp respeta la barra inferior de inicio en iOS/Android */
    .wa-widget-wrapper {
        bottom: max(15px, calc(env(safe-area-inset-bottom) + 15px)) !important;
    }

    /* Vencer los estilos en línea de equipo.html que fuerzan 2 columnas en móviles */
    .founders-info {
        grid-template-columns: 1fr !important;
    }

    /* Asegurar que los botones de anatomía no queden diminutos (forzar 2 columnas en vez de 3) */
    .anatomy-selector-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
