/* Base & Variables */
:root {
    --primary-color: #6B21A8;
    /* Deep Purple */
    --primary-light: #9333EA;
    --primary-dark: #4C1D95;
    --secondary-color: #4B5563;
    /* Gray */
    --secondary-light: #9CA3AF;
    --secondary-dark: #1F2937;
    --bg-light: #F3F4F6;
    --white: #FFFFFF;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

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

/* Typography Refinement */
h1,
h2,
h3,
h4,
.category-title {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    color: var(--secondary-dark);
    letter-spacing: -0.01em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
}

p {
    margin-bottom: 1.25rem;
    color: var(--secondary-color);
    font-size: 1.05rem;
    max-width: 75ch;
    /* Optimal line length for readability */
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Layout & Utility */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 5%;
}

.container-narrow {
    max-width: 900px;
}

.section-padding {
    padding: 5rem 0;
}

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

.max-w-none {
    max-width: none !important;
}

.mx-auto {
    margin-left: auto !important;
    margin-right: auto !important;
}

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

/* Image Utilities */
.img-fluid {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.w-100 {
    width: 100%;
}

.rounded-lg {
    border-radius: 12px;
}

.rounded-xl {
    border-radius: 20px;
}

.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.border-white {
    border: 6px solid var(--white);
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-5 {
    margin-top: 3rem;
}

.banner-img {
    max-height: 400px;
    object-position: center 60%;
}

.section-tag {
    display: inline-block;
    padding: 0.25rem 1rem;
    background: rgba(107, 33, 168, 0.1);
    color: var(--primary-color);
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.section-title {
    color: var(--secondary-dark);
    margin-bottom: 1.5rem;
}

.text-center p {
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.9rem 2.2rem;
    border-radius: 999px;
    font-weight: 600;
    font-family: var(--font-sans);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn-large {
    padding: 1.1rem 2.8rem;
    font-size: 1.15rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white);
    box-shadow: 0 4px 14px rgba(107, 33, 168, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(107, 33, 168, 0.4);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

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

/* Header & Top Bar */
.top-bar {
    background: var(--primary-dark);
    color: var(--white);
    padding: 8px 0;
    font-size: 0.85rem;
    font-weight: 500;
    position: relative;
    z-index: 1001;
}

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

.top-bar-info {
    display: flex;
    gap: 1.5rem;
}

.top-bar-info span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.top-bar-social {
    display: flex;
    gap: 1.2rem;
}

.top-bar-social a {
    color: var(--white);
    transition: var(--transition);
    font-size: 1rem;
}

.top-bar-social a:hover {
    color: var(--primary-light);
    transform: translateY(-2px);
}

.header {
    position: fixed;
    top: 36px;
    /* Height of top-bar */
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.4s ease;
    padding: 1.2rem 0;
    background: transparent;
}

.header.header-scrolled {
    top: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 0.6rem 0;
    /* Slightly tighter on scroll */
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid var(--glass-border);
}

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

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 160px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
    margin: -50px 0;
}

.header.header-scrolled .logo-img {
    height: 120px;
    margin: -35px 0;
}

.footer-logo {
    padding: 10px;
    border-radius: 12px;
    height: 240px;
    margin: -110px 0 -80px -0px;
}

.nav-links {
    display: flex;
    gap: 2.2rem;
    align-items: center;
}

.nav-links a {
    font-weight: 600;
    color: var(--secondary-dark);
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.header:not(.header-scrolled) .nav-links a {
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.header.header-scrolled .nav-links a {
    color: var(--primary-dark);
}

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

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Dropdown Menú */
.dropdown {
    position: relative;
    display: inline-block;
    padding: 10px 0;
    margin: -10px 0;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--white);
    min-width: 280px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    z-index: 1001;
    top: 100%;
    left: -20px;
    padding: 0.8rem 0;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.3s ease;
}

.dropdown-content a {
    color: var(--secondary-dark) !important;
    padding: 12px 24px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.95rem;
    font-weight: 600;
    text-shadow: none !important;
}

.dropdown-content a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color) !important;
    padding-left: 30px;
}

.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeInUp 0.3s ease;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-dark);
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    padding-bottom: 40px;
    background: url('images/paciente.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: scroll;
    /* Handled by JS parallax */
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(107, 33, 168, 0.5));
    z-index: 1;
}

.hero-grid {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    width: 100%;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--white);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease backwards;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 2rem;
    color: var(--white);
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-title span {
    color: #fca5a5;
    /* Light accent for white text theme */
    display: block;
}

.hero-text {
    font-size: 1.2rem;
    color: var(--white);
    margin-bottom: 2.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 3.5rem;
    animation: fadeInUp 0.8s ease 0.6s backwards;
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.8s backwards;
}

.badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--secondary-dark);
    background: var(--glass-bg);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(5px);
}

.badge i {
    color: var(--primary-color);
}

.img-cover-hero {
    max-height: 500px;
    object-position: center;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    font-size: 1.05rem;
    margin-bottom: 1.25rem;
}

.img-about {
    max-height: 480px;
    width: 100%;
}

.about-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.glass-card {
    background: linear-gradient(135deg, var(--white), rgba(255, 255, 255, 0.8));
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.glass-card .mt-4 {
    margin-top: auto !important;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
}

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

.card-icon {
    font-size: 2rem;
    color: var(--primary-light);
    margin-bottom: 0.75rem;
}

/* Page Header (Subpages) */
.page-header {
    position: relative;
    padding-top: 150px;
    padding-bottom: 60px;
    background: linear-gradient(135deg, var(--bg-light) 0%, #e9d5ff 100%);
    text-align: center;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(147, 51, 234, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: 0;
}

.page-title {
    font-size: 3rem;
    color: var(--secondary-dark);
    position: relative;
    z-index: 1;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease backwards;
}

.page-title span {
    color: var(--primary-color);
}

.breadcrumb {
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease 0.2s backwards;
    font-weight: 500;
    font-size: 0.95rem;
}

.breadcrumb a {
    color: var(--primary-color);
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 0.5rem;
    color: var(--secondary-light);
}

.subpage-content {
    font-size: 1.1rem;
}

.subpage-content p {
    margin-bottom: 1.5rem;
}

.subpage-content ul {
    list-style-type: disc;
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

.subpage-content ul li {
    margin-bottom: 0.5rem;
}

/* Services */
.services-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.service-category {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.service-category:hover {
    box-shadow: var(--shadow-lg);
}

.img-service {
    height: 220px;
    width: 100%;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--primary-dark);
    border-bottom: 2px solid var(--bg-light);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.category-title i {
    color: var(--primary-color);
}

.service-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

.service-list li i {
    margin-top: 0.25rem;
    color: var(--primary-color);
    font-size: 0.875rem;
}

.service-list li .icon-dim {
    color: var(--secondary-light);
}

.service-list.two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1rem;
}

.service-list.two-cols li {
    margin-bottom: 0;
}

@media (max-width: 576px) {
    .service-list.two-cols {
        grid-template-columns: 1fr;
    }
}

.service-cta {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px dashed var(--secondary-light);
    text-align: center;
}

.service-cta p {
    font-weight: 600;
    color: var(--secondary-dark);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.service-item-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--secondary-dark);
    gap: 0.5rem;
    padding: 0.6rem 0.4rem;
    background: var(--bg-light);
    border-radius: 8px;
    transition: var(--transition);
    text-decoration: none;
    height: 100%;
    justify-content: center;
}

.service-item-box i {
    font-size: 1.1rem;
    color: var(--primary-color);
}

.service-item-box:hover {
    background: var(--primary-light);
    color: var(--white);
    transform: translateY(-3px);
}

.service-item-box:hover i {
    color: var(--white);
}

.small-text {
    font-size: 0.85rem;
}

.small-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.small-text li {
    margin-bottom: 0.5rem !important;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Alliances */
.alliance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.alliance-item {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--bg-light);
}

.alliance-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.alliance-item.highlight {
    background: #F0F9FF;
    /* Azul muy claro (Sky 50) */
    border-color: var(--primary-light);
}

.alli-icon {
    font-size: 2rem;
    color: var(--secondary-light);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.alliance-item:hover .alli-icon {
    color: var(--primary-color);
}

.alliance-item h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.alliance-item span {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 600;
}

/* CTA Section */
.cta-section {
    padding: 4rem 0;
    background: linear-gradient(to right, var(--primary-dark), var(--primary-color));
}

.cta-box {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    padding: 3rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.cta-content {
    flex: 1;
    min-width: 300px;
}

.cta-content h2 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-size: 1.1rem;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cta-pulse {
    animation: pulse 2s infinite;
}

/* Footer */
.footer {
    background: var(--secondary-dark);
    color: var(--bg-light);
    padding: 4rem 0 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
    align-items: stretch;
}

.footer-brand,
.footer-links,
.footer-contact {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Logo image replaces text */

.footer-brand p {
    color: var(--secondary-light);
    margin-top: 1rem;
    max-width: 300px;
}

.footer h3 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.footer-links ul li {
    margin-bottom: 0.75rem;
}

.footer-links ul li a {
    color: var(--secondary-light);
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--white);
    padding-left: 0.5rem;
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--secondary-light);
}

.footer-contact i {
    color: var(--primary-light);
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem 0;
    color: var(--secondary-light);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(255, 255, 255, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* --- Base Animations & Reveals --- */
.fade-in-up,
.reveal {
    opacity: 0;
    will-change: transform, opacity;
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-in-up {
    transform: translateY(30px);
}

.reveal-up {
    transform: translateY(50px);
}

.reveal-left {
    transform: translateX(-50px);
}

.reveal-right {
    transform: translateX(50px);
}

.reveal-scale {
    transform: scale(0.95);
}

.fade-in-up.visible,
.reveal.active {
    opacity: 1 !important;
    transform: translate(0) scale(1) !important;
}

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

/* Responsive Media Queries */
@media (max-width: 992px) {

    .about-grid,
    .footer-grid,
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .hero-buttons,
    .trust-badges {
        justify-content: center;
    }

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

    .img-cover-hero {
        max-height: 400px;
    }

    .header .logo img {
        height: 180px;
        /* Scaled down logo for mobile/tablets */
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 2.5rem 1.5rem;
        gap: 1.5rem;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
        z-index: 999;
        max-height: 80vh;
        overflow-y: auto;
    }

    .nav-links.active {
        display: flex;
    }

    /* Override header scroll colors for mobile menu */
    .header:not(.header-scrolled) .nav-links a,
    .header.header-scrolled .nav-links a,
    .nav-links a {
        color: var(--secondary-dark) !important;
        text-shadow: none !important;
    }

    .nav-links a:hover {
        color: var(--primary-color) !important;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .header-cta {
        display: none;
    }

    .hero-buttons {
        flex-direction: column;
    }

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

    /* Mobile Dropdown Fixes */
    .dropdown {
        width: 100%;
        padding: 0;
        margin: 0;
    }

    .dropdown>a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .dropdown .fa-chevron-down {
        transition: transform 0.3s ease;
    }

    .dropdown.active .fa-chevron-down {
        transform: rotate(180deg);
    }

    .dropdown-content {
        position: relative;
        top: 0;
        left: 0;
        min-width: 100%;
        box-shadow: none;
        border: none;
        padding: 0.5rem 0 0.5rem 1rem;
        display: none;
        background: transparent;
        backdrop-filter: none;
        animation: none;
    }

    .dropdown.active .dropdown-content {
        display: block;
    }

    .dropdown-content a {
        padding: 10px 15px !important;
        margin-bottom: 5px;
        border-left: 2px solid var(--primary-light);
        background: rgba(107, 33, 168, 0.05);
        border-radius: 0 8px 8px 0;
    }

    h2 {
        font-size: 2rem;
    }

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

/* Floating WhatsApp Button */
.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 35px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
    text-decoration: none;
}

.floating-whatsapp:hover {
    background-color: #128C7E;
    transform: scale(1.1);
    box-shadow: 2px 2px 15px rgba(0, 0, 0, 0.3);
    color: white;
}

/* Tooltip text for WhatsApp button */
.floating-whatsapp::before {
    content: "¿Necesitas ayuda?";
    position: absolute;
    right: 75px;
    background-color: var(--white);
    color: var(--secondary-dark);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    white-space: nowrap;
    border: 1px solid var(--bg-light);
}

.floating-whatsapp:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Social & Contact Section */
.social-contact-section {
    padding: 5rem 0;
    background-color: var(--white);
    position: relative;
    z-index: 1;
}

.social-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

@media (max-width: 992px) {
    .social-contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

.contact-form-card {
    background: var(--glass-bg);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--secondary-dark);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--secondary-light);
    background: rgba(255, 255, 255, 0.8);
    font-family: var(--font-sans);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(107, 33, 168, 0.15);
    background: var(--white);
}

.form-group:focus-within label {
    color: var(--primary-color);
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    z-index: 10001;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Smooth Scroll Configuration */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

@media (max-width: 768px) {
    .floating-whatsapp {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 30px;
    }

    .floating-whatsapp::before {
        display: none;
    }
}

/* Efectos Dinámicos de Agilidad (Dynamic Hover) */
.service-category,
.glass-card,
.alliance-item,
.cta-box {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-category:hover,
.glass-card:hover,
.alliance-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.about-image img,
.hero-image img,
.service-category img,
.instalaciones-banner img,
.text-center img {
    transition: transform 0.5s ease;
}

.about-image:hover img,
.hero-image:hover img,
.service-category:hover img,
.instalaciones-banner:hover img {
    transform: scale(1.03);
}

.about-image,
.hero-image,
.service-category,
.instalaciones-banner {
    overflow: hidden;
    /* Contains the image zoom */
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    background-color: var(--primary-color);
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 999;
    border: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy transition */
    transform: translateY(20px);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-5px);
    box-shadow: 2px 2px 15px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 80px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}



/* Insurances Section - Redesigned Clinical Glow */
.insurances {
    overflow: hidden;
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--white) 0%, #f9fafb 100%);
    position: relative;
}

.insurances::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-light), transparent);
    opacity: 0.3;
}


.logo-slider-container {
    padding: 4rem 0;
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Enhanced Gradient fade on edges */
.logo-slider-container::before,
.logo-slider-container::after {
    content: "";
    position: absolute;
    top: 0;
    width: 15%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

.logo-slider-container::before {
    left: 0;
    background: linear-gradient(to right, #ffffff, rgba(255, 255, 255, 0));
}

.logo-slider-container::after {
    right: 0;
    background: linear-gradient(to left, #f9fafb, rgba(249, 250, 251, 0));
}

/* Track adjustments for 5 items x 2 sets = 10 items total (UPSCALE) */
.logo-track {
    display: flex;
    width: calc(300px * 10 + 6rem * 10);
    animation: marquee 45s linear infinite;
    gap: 6rem;
    align-items: center;
}

.logo-track:hover {
    animation-play-state: paused;
}

.logo-item {
    flex: 0 0 300px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--white);
    border-radius: 24px;
    border: 1px solid rgba(107, 33, 168, 0.05);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.logo-item img {
    max-width: 100%;
    max-height: 85%;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.45;
    transition: all 0.5s ease;
}

.logo-item:hover {
    transform: translateY(-10px);
    background: var(--white);
    border-color: rgba(107, 33, 168, 0.15);
    box-shadow: 0 20px 40px rgba(107, 33, 168, 0.08);
}

.logo-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        /* Move exactly half of the track (one full set of 5 logos + 5 gaps) */
        transform: translateX(calc(-300px * 5 - 6rem * 5));
    }
}

@media (max-width: 992px) {

    .logo-slider-container::before,
    .logo-slider-container::after {
        width: 100px;
    }

    .logo-item {
        flex: 0 0 240px;
        height: 110px;
    }

    @keyframes marquee {
        0% {
            transform: translateX(0);
        }

        100% {
            transform: translateX(calc(-240px * 5 - 6rem * 5));
        }
    }
}

@media (max-width: 576px) {

    .logo-slider-container::before,
    .logo-slider-container::after {
        width: 50px;
    }

    .logo-track {
        gap: 2rem;
        animation-duration: 25s;
    }

    .logo-item {
        flex: 0 0 150px;
        height: 100px;
        padding: 1rem;
        /* Better scaling for small screens */
    }

    @keyframes marquee {
        0% {
            transform: translateX(0);
        }

        100% {
            transform: translateX(calc(-150px * 5 - 2rem * 5));
        }
    }
}

/* Map Section */
.map-section {
    width: 100%;
    height: 450px;
    background-color: var(--bg-light);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    position: relative;
    z-index: 1;
}

.map-section iframe {
    width: 100%;
    height: 100%;
    filter: grayscale(0.2) contrast(1.1);
    /* Subtle professional styling */
}