/* Font Awesome Import */
@import url('https://use.fontawesome.com/releases/v6.4.0/css/all.css');

body {
    position: relative;
}

/* Century Gothic Font Import */
@import url('https://fonts.cdnfonts.com/css/century-gothic');

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

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

.loading-logo {
    max-width: 200px;
    height: auto;
    filter: none;
    box-shadow: none;
    outline: none;
    border: none;
    animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.03); }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .loading-logo { animation: none; }
    .hero-title, .hero-subtitle, .hero-buttons { animation: none; }
    .btn:hover, .service-category:hover, .testimonial-card:hover,
    .about-rect-image:hover, .btn-inicia-cambio:hover { transform: none; }
}

/* Keyboard focus visibility for accessibility */
.btn:focus-visible,
.nav-link:focus-visible,
a:focus-visible {
    outline: 2px solid #25D366;
    outline-offset: 3px;
}

/* Enhanced Icon Fallbacks */
.fas, .fab, .far {
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Brands', 'Font Awesome 6 Regular', Arial, sans-serif;
    font-weight: 900;
    display: inline-block;
    width: 1em;
    height: 1em;
    line-height: 1;
    text-align: center;
}

.fab {
    font-weight: 400;
}

.far {
    font-weight: 400;
}

/* Icon fallback for when Font Awesome fails to load */
.fas::before,
.fab::before,
.far::before {
    content: attr(data-fallback);
}

/* Specific icon fallbacks */
.fas.fa-crown::before { content: "👑"; }
.fas.fa-teeth::before { content: "🦷"; }
.fas.fa-tooth::before { content: "🦷"; }
.fas.fa-heart::before { content: "❤️"; }
.fas.fa-child::before { content: "👶"; }
.fas.fa-radiation::before { content: "☢️"; }
.fas.fa-user-md::before { content: "👨‍⚕️"; }
.fas.fa-map-marker-alt::before { content: "📍"; }
.fas.fa-phone::before { content: "📞"; }
.fas.fa-envelope::before { content: "✉️"; }
.fas.fa-clock::before { content: "🕐"; }
.fas.fa-hospital::before { content: "🏥"; }
.fab.fa-facebook::before { content: "📘"; }
.fab.fa-twitter::before { content: "🐦"; }
.fab.fa-instagram::before { content: "📷"; }
.fab.fa-linkedin::before { content: "💼"; }
.fab.fa-whatsapp::before { content: "💬"; }

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Century Gothic', 'CenturyGothic', 'AppleGothic', 'Futura', 'Trebuchet MS', Arial, sans-serif !important;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Century Gothic', 'CenturyGothic', 'AppleGothic', 'Futura', 'Trebuchet MS', Arial, sans-serif !important;
    line-height: 1.6;
    color: #E7E7E7;
    background: #151515;
    overflow-x: hidden;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "liga" 1, "kern" 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography - Clínica OI Brand Guide */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Century Gothic', 'CenturyGothic', 'AppleGothic', 'Futura', 'Trebuchet MS', 'Arial', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #E7E7E7;
}

h1 { 
    font-size: 3.5rem; 
    font-weight: 700;
}
h2 { 
    font-size: 2.5rem; 
    font-weight: 600;
}
h3 { 
    font-size: 1.8rem; 
    font-weight: 600;
}

p {
    font-family: 'Century Gothic', 'CenturyGothic', 'AppleGothic', 'Futura', 'Trebuchet MS', 'Arial', sans-serif;
    margin-bottom: 1rem;
    color: #E7E7E7;
    font-weight: 400;
    line-height: 1.6;
}

/* Buttons */
.btn {
    font-family: 'Century Gothic', 'CenturyGothic', 'AppleGothic', 'Futura', 'Trebuchet MS', 'Arial', sans-serif;
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #151515;
    color: #E7E7E7;
    border: 2px solid #E7E7E7;
    box-shadow: 0 4px 15px rgba(21, 21, 21, 0.4);
    padding-left: 30px;
    padding-right: 30px;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(21, 21, 21, 0.6);
}

.btn-secondary {
    background: #ffffff;
    color: #000000;
    border: 2px solid #ffffff;
}

.btn-secondary:hover {
    background: #f0f0f0;
    color: #000000;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* Agendar Online button - WhatsApp green, stands out */
.btn-agendar-online {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    margin-top: 1.25rem;
    background: #25D366 !important;
    color: #ffffff !important;
    border: 2px solid #25D366 !important;
    font-weight: 700 !important;
}

.btn-agendar-online:hover {
    background: #20bd5a !important;
    border-color: #20bd5a !important;
    color: #ffffff !important;
    transform: translateY(-2px);
}

/* Home about-video CTA needs breathing room before next section */
.about-image .btn-agendar-online {
    margin-bottom: 2rem;
}

/* Navigation - absolute overlays hero, scrolls away with page */
.navbar {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1400px;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 15px;
    box-shadow: none;
    border: none;
    z-index: 1000;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(21, 21, 21, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo-image {
    height: 120px;
    width: auto;
    max-width: 450px;
    object-fit: contain;
    transition: all 0.3s ease;
}

/* When navbar is scrolled, switch to logo.png */
.navbar.scrolled .logo-image {
    content: url('images/logo.png');
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #000000;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #353535;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #353535;
    transition: width 0.3s ease;
}

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

/* When navbar is scrolled, make text white */
.navbar.scrolled .nav-link {
    color: #E7E7E7;
}

.navbar.scrolled .nav-link:hover {
    color: #ffffff;
}

.navbar.scrolled .nav-link::after {
    background: rgba(255,255,255,0.9);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    font: inherit;
    color: inherit;
    border: none;
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
}

.bar {
    width: 25px;
    height: 3px;
    background: #000000;
    margin: 3px 0;
    transition: 0.3s;
}

/* When navbar is scrolled, make hamburger bars white */
.navbar.scrolled .bar {
    background: #E7E7E7;
}

/* Hero Section - scrolls with page, never fixed */
.hero {
    height: 100vh;
    min-height: 100vh;
    max-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 120px;
    padding-bottom: 1rem;
    position: relative !important;
    overflow: hidden;
    margin-bottom: 0;
    box-sizing: border-box;
}

/* Shorter hero on services page to prevent covering section below */
.page-services .hero {
    min-height: 50vh;
}

/* Services page: no duplicate GIF background – only video/poster to avoid switching */
.page-services .hero:not(.video-loaded) {
    background: linear-gradient(135deg, rgba(21, 21, 21, 0.9) 0%, rgba(53, 53, 53, 0.9) 100%);
}

/* Prevent hero from overlapping content below (services page) */
.hero + .services-page {
    margin-top: 0;
    padding-top: 4rem;
}

/* Video Background - must stay inside hero and scroll with it */
.hero-video-container {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    opacity: 1;
}

.hero-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(21, 21, 21, 0.8) 0%, rgba(53, 53, 53, 0.8) 100%);
    z-index: -1;
}

.hero-video-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 70% at 50% 50%, transparent 30%, rgba(0,0,0,0.35) 100%);
    pointer-events: none;
}

/* Fallback background for when video doesn't load */
.hero:not(.video-loaded) {
    background: linear-gradient(135deg, rgba(21, 21, 21, 0.8) 0%, rgba(53, 53, 53, 0.8) 100%), url('images/hero-bg.gif');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease;
    text-shadow: 1px 1px 0 #ffffff, -1px -1px 0 #ffffff, 1px -1px 0 #ffffff, -1px 1px 0 #ffffff;
}

.hero-subtitle {
    font-size: 0.95rem;
    font-weight: 400;
    color: #ffffff;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.2s both;
    max-width: 800px;
    text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, 0 0 8px rgba(0,0,0,1), 0 2px 4px rgba(0,0,0,0.9), 0 4px 12px rgba(0,0,0,0.8);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    animation: fadeInUp 1s ease 0.4s both;
    justify-content: center;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInRight 1s ease 0.6s both;
}

.hero-placeholder {
    width: 300px;
    height: 300px;
    background: #353535;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    color: #E7E7E7;
    box-shadow: 0 20px 40px rgba(53, 53, 53, 0.3);
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #000000;
}

.section-header p {
    font-size: 1.1rem;
    color: #000000;
}

/* Services Section */
.services {
    padding: 6rem 0;
    background: #353535;
}

.services-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.service-category {
    background: #151515;
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid #353535;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.service-category:hover {
    transform: translateY(-6px) scale(1.01);
    background: #353535;
    border-color: #353535;
    box-shadow: 0 20px 40px rgba(53, 53, 53, 0.25);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #353535;
}

.category-header i {
    font-size: 2rem;
    color: #353535;
    background: #E7E7E7;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-header h3 {
    color: #E7E7E7;
    margin: 0;
    font-size: 1.4rem;
}

.category-services {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.service-item {
    background: #353535;
    color: #E7E7E7;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.service-item:hover {
    background: #E7E7E7;
    color: #151515;
    transform: translateX(5px);
}

/* About Section - must appear below hero when scrolling */
.about {
    padding: 1rem 0 5rem;
    position: relative;
    background: #151515;
    margin-top: 0;
    clear: both;
    display: block;
    width: 100%;
    z-index: 1;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(231,231,231,0.15), transparent);
    pointer-events: none;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.about-text h2 {
    color: #E7E7E7;
    margin-bottom: 2rem;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #E7E7E7;
}

/* About brand block - "DÓNDE / CLÍNICA OI" style, before the two pictures */
.about-brand-block {
    width: 100%;
    margin-top: 4rem;
    background: #151515;
    border-radius: 20px;
    padding: 2.5rem 2rem 3rem;
}

.about-brand-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(231, 231, 231, 0.65);
    margin-bottom: 0.75rem;
}

.about-brand-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #ffffff;
    margin-bottom: 1.25rem;
    line-height: 1.1;
}

.about-brand-intro {
    font-size: 1.15rem;
    color: #E7E7E7;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.about-brand-text {
    font-size: 1rem;
    color: #E7E7E7;
    line-height: 1.7;
    max-width: 720px;
}

.about-brand-text strong {
    color: #ffffff;
    font-weight: 600;
}

.about-images-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 3rem;
    width: 100%;
}

.about-rect-image {
    aspect-ratio: 3/4;
    min-height: 320px;
    border-radius: 16px;
    overflow: hidden;
    background: #353535;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.about-rect-image:hover {
    transform: scale(1.02);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.about-rect-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.about-images-row .about-rect-image:first-child img {
    transform: scale(1.08) translateY(1%);
    transform-origin: center center;
}

.about-images-row .about-rect-image:nth-child(2) img {
    transform: scale(1.22) translateY(5%);
    transform-origin: center center;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
}

.stat h3 {
    font-size: 2.5rem;
    color: #353535;
    margin-bottom: 0.5rem;
}

.stat p {
    color: #E7E7E7;
    margin: 0;
}

.about-image {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.about-video-container {
    position: relative;
    width: 600px;
    height: 338px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(53, 53, 53, 0.3);
    z-index: 15;
    aspect-ratio: 16/9; /* Full landscape aspect ratio */
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.about-video-container:hover {
    transform: scale(1.02);
    box-shadow: 0 24px 48px rgba(53, 53, 53, 0.35);
}

.about-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-play-overlay:hover {
    background: rgba(0, 0, 0, 0.4);
}

.video-play-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.video-play-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.video-play-btn i {
    font-size: 24px;
    color: #333;
    margin-left: 3px; /* Slight adjustment to center the play icon */
}

.video-play-text {
    color: white;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Hide overlay when video is playing */
.video-playing .video-play-overlay {
    opacity: 0;
    pointer-events: none;
}

/* Image cropping and zoom utilities */
.image-cropped {
    object-fit: cover;
    object-position: center;
    transform: scale(1.3);
    overflow: hidden;
}

.image-zoomed {
    object-fit: cover;
    object-position: center;
    transform: scale(1.5);
    overflow: hidden;
}

.image-cropped-square {
    object-fit: cover;
    object-position: center;
    transform: scale(1.4);
    width: 100%;
    height: 100%;
    clip-path: inset(10% 10% 10% 10%);
}

/* Video Loading States */
.video-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: opacity 0.3s ease;
}

.video-loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.video-loading p {
    color: white;
    font-size: 1rem;
    font-weight: 500;
    margin: 0 0 1rem 0;
}

.loading-progress {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 1rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4285f4, #34a853);
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
}

/* Optimize video loading */
.about-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.3s ease;
    aspect-ratio: 16/9; /* Full landscape aspect ratio */
    object-position: center; /* Center the video content */
}

.about-video.loading {
    opacity: 0.7;
}


/* Doctors Section */
.doctors {
    padding: 6rem 0;
    background: #353535;
}

.doctors .section-header h2,
.doctors .section-header p {
    color: #ffffff !important;
}

.doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.doctor-card {
    background: #151515;
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #353535;
    backdrop-filter: blur(10px);
}

.doctor-card:hover {
    transform: translateY(-10px);
    background: #353535;
    border-color: #E7E7E7;
    box-shadow: 0 20px 40px rgba(231, 231, 231, 0.2);
}

.doctor-image {
    width: 120px;
    height: 120px;
    background: #353535;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    overflow: hidden;
    position: relative;
}

.doctor-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    display: block;
}

.doctor-card h3 {
    color: #E7E7E7;
    margin-bottom: 0.5rem;
}

.specialty {
    color: #E7E7E7 !important;
    font-weight: 500;
    margin-bottom: 1rem;
}

.doctor-card p:not(.specialty) {
    display: none;
}

/* Testimonials Section */
.testimonials {
    padding: 6rem 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    position: relative;
    overflow-x: hidden;
    overflow-y: visible;
}

.testimonials::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.03"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.03"/><circle cx="50" cy="10" r="0.5" fill="%23ffffff" opacity="0.02"/><circle cx="10" cy="60" r="0.5" fill="%23ffffff" opacity="0.02"/><circle cx="90" cy="40" r="0.5" fill="%23ffffff" opacity="0.02"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.testimonials .section-header h2,
.testimonials .section-header p {
    color: #000000 !important;
}

.testimonials-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
    overflow-x: hidden;
    overflow-y: visible;
}

    .testimonials-row {
        position: relative;
        margin-bottom: 2rem;
        overflow-x: hidden;
        overflow-y: visible;
        white-space: nowrap;
        height: auto;
        min-height: 0;
        padding-bottom: 0.4rem;
    }
    
    .testimonials-track {
        display: inline-flex;
        gap: 1.5rem;
        animation: scroll-right 30s linear infinite;
        will-change: transform;
        padding-right: 2rem;
    }
    
    .bottom-row .testimonials-track {
        animation: scroll-right 30s linear infinite reverse;
        padding-left: 2rem;
        padding-right: 2rem;
        transform: none;
    }
    
    .bottom-row {
        margin-bottom: 3rem;
    }

.testimonial-card {
    flex: 0 0 350px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 1.5rem 1.5rem 1.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    white-space: normal;
    position: relative;
}

.testimonial-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
}

@keyframes scroll-right {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes scroll-left {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

.stars {
    display: flex;
    gap: 0.2rem;
    margin-bottom: 1rem;
}

.stars i {
    color: #333;
    font-size: 1rem;
}

.testimonial-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #333;
    margin-bottom: 1rem;
    font-style: normal;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4285f4, #34a853);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.author-info h4 {
    color: #333;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.2rem 0;
}

.author-info span {
    color: #666;
    font-size: 0.8rem;
    font-weight: 500;
    display: block;
    line-height: 1.4;
    padding-bottom: 0.1rem;
}

.testimonials-navigation {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.testimonial-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.testimonial-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.testimonials-dots {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.testimonial-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.testimonial-dot.active {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.2);
}

.google-reviews-link {
    text-align: center;
}

.google-reviews-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(66, 133, 244, 0.3);
    border: 2px solid transparent;
}

.google-reviews-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(66, 133, 244, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.google-reviews-btn i {
    font-size: 1.2rem;
}

/* Testimonials mobile styles moved to main mobile section */

/* Contact Section */
.contact {
    padding: 6rem 0;
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to bottom, rgba(231,231,231,0.04), transparent);
    pointer-events: none;
}

.contact .section-header h2,
.contact .section-header p {
    color: #ffffff !important;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: #E7E7E7;
    margin-top: 0.5rem;
}

.contact-item h3 {
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: #ffffff;
    margin: 0;
}

/* International page contact items should be black */
.international-contact .contact-item h3,
.international-contact .contact-item p {
    color: #000000 !important;
}

.contact-whatsapp {
    background: #151515;
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid #353535;
    backdrop-filter: blur(10px);
    text-align: center;
}

.whatsapp-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.whatsapp-icon-large {
    font-size: 4rem;
    color: #25D366;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.whatsapp-content h3 {
    color: #E7E7E7;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
}

.whatsapp-content p {
    color: rgba(231, 231, 231, 0.8);
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
    max-width: 400px;
}

.whatsapp-btn-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    background: #25D366;
    color: white;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3);
    border: 2px solid #25D366;
    box-sizing: border-box;
}

.whatsapp-btn-large:hover {
    background: #20bd5a;
    border-color: #20bd5a;
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(37, 211, 102, 0.4);
}

.whatsapp-btn-large i {
    font-size: 1.3rem;
}

.whatsapp-features {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(231, 231, 231, 0.8);
    font-size: 0.9rem;
}

.feature i {
    color: #25D366;
    font-size: 1rem;
}

/* International Page Styles */

/* International Hero Section */
.international-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 120px;
    position: relative;
    overflow: hidden;
}

/* International Video Background */
.international-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.international-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    opacity: 1;
}

.international-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(21, 21, 21, 0.8) 0%, rgba(53, 53, 53, 0.8) 100%);
    z-index: -1;
}

/* Fallback background for when video doesn't load */
.international-hero:not(.video-loaded) {
    background: linear-gradient(135deg, rgba(21, 21, 21, 0.8) 0%, rgba(53, 53, 53, 0.8) 100%), url('images/gif2.gif');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.international-hero-content {
    text-align: center;
    color: #ffffff;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.international-hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.4);
}

.international-hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.feature i {
    font-size: 2rem;
    color: #353535;
    display: inline-block;
    visibility: visible;
}

/* International hero features should be white */
.international-hero .feature i {
    color: #ffffff !important;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}

.international-hero .feature span {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.4);
}

.international-hero .hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.why-chile .section-header .whatsapp-btn-large,
.international-contact .section-header .whatsapp-btn-large {
    display: inline-flex;
    margin-top: 1.5rem;
}

.feature span {
    font-size: 0.9rem;
    font-weight: 500;
    color: #000000;
}

/* Why Choose Chile Section */
.why-chile {
    padding: 5rem 0;
    background: #f8f9fa;
}

.reasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.reason-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.reason-card:hover {
    transform: translateY(-5px);
}

.reason-card i {
    font-size: 3rem;
    color: #353535;
    margin-bottom: 1rem;
    display: inline-block;
    visibility: visible;
}

.reason-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #151515;
}

.reason-card p {
    color: #666;
    line-height: 1.6;
}

/* Packages Section */
.packages {
    padding: 5rem 0;
    background: white;
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.package-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.package-card.featured {
    border-color: #353535;
    transform: scale(1.05);
}

.package-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: #353535;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.package-header {
    text-align: center;
    margin-bottom: 2rem;
}

.package-header h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #151515;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: #353535;
    margin-bottom: 0.5rem;
}

.package-header p {
    color: #666;
    font-size: 1rem;
}

.package-features ul {
    list-style: none;
    margin-bottom: 2rem;
}

.package-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    color: #333;
}

.package-features i {
    color: #353535;
    font-size: 0.9rem;
}

/* Procedures Section */
.procedures {
    padding: 5rem 0;
    background: #f8f9fa;
}

.procedures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.procedure-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.procedure-card:hover {
    transform: translateY(-5px);
}

.procedure-icon {
    margin-bottom: 1rem;
}

.procedure-icon i {
    font-size: 3rem;
    color: #353535;
    display: inline-block;
    visibility: visible;
}

.procedure-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #151515;
}

.price-comparison {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.us-price, .our-price {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.us-price {
    color: #666;
    text-decoration: line-through;
}

.our-price {
    color: #353535;
    font-weight: 600;
}

.procedure-card p {
    color: #666;
    line-height: 1.6;
}

/* Outstanding Services (International) */
.outstanding-services .section-header p {
    display: none;
}

.outstanding-services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 2rem;
    align-items: stretch;
}

.outstanding-service-item {
    text-align: center;
    padding: 1.25rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    min-height: 0;
}

.outstanding-service-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.outstanding-service-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #E7E7E7 0%, #353535 100%);
    border-radius: 50%;
}

.outstanding-service-icon i {
    font-size: 1.5rem;
    color: #151515;
}

.outstanding-service-item h3 {
    font-size: 1.1rem;
    margin: 0;
    color: #151515;
    font-weight: 600;
}

@media (max-width: 768px) {
    .outstanding-services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .outstanding-service-icon {
        width: 48px;
        height: 48px;
    }

    .outstanding-service-icon i {
        font-size: 1.25rem;
    }

    .outstanding-service-item h3 {
        font-size: 1rem;
    }
}

/* Travel Information Section */
.travel-info {
    padding: 5rem 0;
    background: white;
}

.travel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.travel-card {
    text-align: center;
    padding: 2rem;
}

.travel-card i {
    font-size: 3rem;
    color: #353535;
    margin-bottom: 1rem;
    display: inline-block;
    visibility: visible;
}

.travel-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #151515;
}

.travel-card p {
    color: #666;
    line-height: 1.6;
}

/* Testimonials Section */
.testimonials {
    padding: 5rem 0;
    background: #f8f9fa;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.testimonial-content {
    margin-bottom: 1.5rem;
}

.testimonial-content p {
    font-style: italic;
    color: #333;
    line-height: 1.6;
}

.testimonial-author {
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.testimonial-author strong {
    display: block;
    color: #151515;
    margin-bottom: 0.2rem;
}

.testimonial-author span {
    color: #666;
    font-size: 0.9rem;
}

/* International Contact Section */
.international-contact {
    padding: 5rem 0;
    background: white;
}

/* International page mobile styles moved to main mobile section */

/* Email Links */
.contact-item a,
.footer-section a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover,
.footer-section a:hover {
    color: #353535;
    text-decoration: underline;
}

/* Icon Fallback Styles */
.fas, .fa, .far, .fab {
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Pro', 'Font Awesome 5 Free', 'Font Awesome 5 Pro', Arial, sans-serif !important;
    font-weight: 900;
    font-style: normal;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Specific icon fallbacks */
.fa-plane::before { content: "✈"; }
.fa-hotel::before { content: "🏨"; }
.fa-car::before { content: "🚗"; }
.fa-globe::before { content: "🌍"; }
.fa-dollar-sign::before { content: "$"; }
.fa-certificate::before { content: "📜"; }
.fa-mountain::before { content: "🏔"; }
.fa-clock::before { content: "🕐"; }
.fa-language::before { content: "🗣"; }
.fa-shield-alt::before { content: "🛡"; }
.fa-check::before { content: "✓"; }
.fa-crown::before { content: "👑"; }
.fa-smile::before { content: "😊"; }
.fa-tooth::before { content: "🦷"; }
.fa-teeth::before { content: "🦷"; }
.fa-calendar::before { content: "📅"; }
.fa-passport::before { content: "📖"; }
.fa-weather-sunny::before { content: "☀"; }
.fa-phone::before { content: "📞"; }
.fa-envelope::before { content: "✉"; }
.fa-map-marker-alt::before { content: "📍"; }

/* Footer */
.footer {
    background: #151515;
    padding: 4rem 0 2rem;
    border-top: 1px solid #353535;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(231,231,231,0.12), transparent);
    margin-top: -1px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.footer-logo .logo-image {
    height: 130px;
    width: auto;
    max-width: 520px;
    object-fit: contain;
}

.footer-section h3 {
    color: #E7E7E7;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #E7E7E7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #353535;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: #353535;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #E7E7E7;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #353535;
    color: #E7E7E7;
    transform: translateY(-2px);
}

.social-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.social-links a:hover .social-icon {
    transform: scale(1.1);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #353535;
    color: #E7E7E7;
}

/* Footer Map Styles */
.footer-map {
    margin-top: 1rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.footer-map iframe {
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.footer-map iframe:hover {
    transform: scale(1.02);
}

/* Footer map mobile styles moved to main mobile section */

/* WhatsApp float mobile styles moved to main mobile section */

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    width: 60px !important;
    height: 60px !important;
    background: #25D366 !important;
    color: white !important;
    border-radius: 50% !important;
    text-align: center !important;
    font-size: 30px !important;
    box-shadow: 0 6px 25px rgba(37, 211, 102, 1) !important;
    z-index: 1000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    animation: pulse 2s infinite !important;
    border: 3px solid #ffffff !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.whatsapp-float:hover {
    background: #128C7E !important;
    transform: scale(1.1);
    box-shadow: 0 10px 35px rgba(37, 211, 102, 1);
    color: white !important;
    border-color: #ffffff !important;
    opacity: 1 !important;
}

.whatsapp-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: none !important;
    opacity: 1 !important;
    transition: all 0.3s ease;
    background: #ffffff;
    border-radius: 50%;
    padding: 2px;
}

.whatsapp-float:hover .whatsapp-icon {
    filter: none !important;
    opacity: 1 !important;
}

@keyframes pulse {
    0% {
        box-shadow: 0 6px 25px rgba(37, 211, 102, 1);
    }
    50% {
        box-shadow: 0 6px 25px rgba(37, 211, 102, 1);
    }
    100% {
        box-shadow: 0 6px 25px rgba(37, 211, 102, 1);
    }
}

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Services Page Styles */
.services-hero {
    padding: 8rem 0 4rem;
    margin-top: 80px;
    background: linear-gradient(135deg, #151515 0%, #353535 100%);
    text-align: center;
}

.services-hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: #E7E7E7;
}

.services-hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #E7E7E7;
    opacity: 0.9;
}

.services-page {
    padding: 4rem 0;
    background: #151515;
    position: relative;
    z-index: 2;
}

.services-grid {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    margin-top: 2rem;
}

.service-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.service-row:nth-child(even) .service-card {
    order: 2;
}

.service-row:nth-child(even) .service-image {
    order: 1;
}

/* Rehabilitación Oral: text left, image right (override even-row swap) */
.service-row.service-row-text-left .service-card { order: 1; }
.service-row.service-row-text-left .service-image { order: 2; }

.service-image {
    width: 100%;
    height: 420px;
    min-height: 420px;
    max-height: 420px;
    background: #353535;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.service-image-periodoncia img {
    object-position: right center;
}

.service-image-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    height: 420px;
    min-height: 420px;
    max-height: 420px;
}

.service-image-split img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    object-position: center center;
}

.service-card {
    background: #353535;
    padding: 2.5rem;
    height: 420px;
    min-height: 420px;
    max-height: 420px;
    display: flex;
    flex-direction: column;
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 1px solid #353535;
    overflow-y: auto;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: #E7E7E7;
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #E7E7E7 0%, #353535 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.service-icon i {
    font-size: 2rem;
    color: #151515;
}

.service-card h3 {
    font-size: 1.4rem;
    line-height: 1.25;
    margin-bottom: 0.75rem;
    color: #E7E7E7;
    flex-shrink: 0;
}

.service-card p {
    color: #E7E7E7;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.service-list {
    list-style: none;
    padding: 0;
    flex: 1;
    min-height: 0;
}

.service-list li {
    color: #E7E7E7;
    font-size: 0.95rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(231,231,231,0.15);
    position: relative;
    padding-left: 1.5rem;
}

.service-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #E7E7E7;
    font-weight: bold;
}

.service-list li:last-child {
    border-bottom: none;
}

.btn-ver-servicio {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: auto;
    padding: 0.85rem 1.5rem;
    flex-shrink: 0;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    align-self: flex-start;
}

.btn-ver-servicio:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    color: #fff;
}

.btn-ver-servicio i {
    font-size: 1.1rem;
}

.services-cta {
    padding: 4rem 0;
    background: linear-gradient(135deg, #353535 0%, #151515 100%);
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #E7E7E7;
}

.cta-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #E7E7E7;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Active Navigation Link */
.nav-link.active {
    color: #E7E7E7 !important;
    background: #353535;
    border-radius: 5px;
    padding: 0.5rem 1rem;
}

/* Before & After Section */
.before-after {
    padding: 4rem 0 5rem;
    background: #252525;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    box-sizing: border-box;
}

.before-after .section-header h2,
.before-after .section-header p {
    color: #ffffff !important;
}

.before-after-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: stretch;
    max-width: 1120px;
    margin: 0 auto;
}

@media (max-width: 992px) {
    .before-after-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
        max-width: 100%;
    }
    .before-after-slider {
        order: 1;
        max-width: min(360px, 90vw);
        margin: 0 auto;
    }
    .before-after-cta-box {
        order: 2;
        text-align: center;
    }
}

.before-after-slider {
    position: relative;
    width: 100%;
    margin: 0 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.before-after-wrapper {
    max-width: 100%;
}

.before-after-cta-box {
    background: #f4f4f4;
    padding: 2.5rem 3rem;
    border-radius: 26px;
    color: #151515;
    display: flex;
    align-items: stretch;
    justify-content: center;
    box-shadow: 0 22px 46px rgba(0, 0, 0, 0.45);
    width: 100%;
    height: 100%;
}

.btn-inicia-cambio {
    display: inline-flex !important;
    align-items: center;
    gap: 12px;
    padding: 1.25rem 2.5rem !important;
    background: #25D366 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    font-size: 1.2rem !important;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-inicia-cambio:hover {
    background: #20bd5a !important;
    color: #ffffff !important;
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 32px rgba(37, 211, 102, 0.55);
}

.before-after-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 260px;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(53, 53, 53, 0.3);
    cursor: ew-resize;
    isolation: isolate;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.ba-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center center;
    border-radius: 24px;
    transform: translateZ(0);
}

.ba-before {
    z-index: 1;
    transform: scale(1.9) translateY(37%) translateZ(0);
    transform-origin: center bottom;
    object-position: center bottom;
}

/* Clip on an untransformed layer so the seam matches the handle/line (transform + clip on one element skews the split). */
.ba-after-wrap {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
    transition: none;
}

.ba-after {
    transform: scale(1.45) translateY(25%) translateZ(0);
    transform-origin: center bottom;
    object-position: center bottom;
    transition: none;
}

.ba-label {
    position: absolute;
    top: 16px;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.95);
    color: #151515;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    z-index: 6;
}

.ba-label-before {
    left: 18px;
}

.ba-label-after {
    right: 18px;
}

.ba-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: #353535;
    border-radius: 50%;
    cursor: ew-resize;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(53, 53, 53, 0.4);
    transition: none;
}

.ba-handle:hover {
    background: #E7E7E7;
    transform: translate(-50%, -50%) scale(1.12);
    box-shadow: 0 0 0 4px rgba(231,231,231,0.2), 0 6px 20px rgba(0,0,0,0.5);
}

.ba-line {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    margin-top: 0;
    background: #353535;
    z-index: 5;
    transform: translateX(-50%);
    transition: none;
}

.before-after-info {
    color: #151515;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.before-after-info h3 {
    color: #151515;
    margin-bottom: 1.75rem;
    font-size: 2.1rem;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.before-after-info p {
    margin-bottom: 1.1rem;
    line-height: 1.6;
    font-size: 0.95rem;
    color: #7a7a7a;
}

.before-after-info ul {
    margin-bottom: 2rem;
    padding-left: 1.5rem;
}

.before-after-info li {
    margin-bottom: 0.5rem;
    color: #E7E7E7;
}

.before-after-info .btn-inicia-cambio {
    align-self: center;
    margin-left: auto;
    margin-right: auto;
}

.treatment-time {
    background: #353535;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    text-align: center;
}

.treatment-time strong {
    color: #E7E7E7;
}

/* Fine-tune image alignment if needed */
.before-image img {
    /* Ensure consistent sizing and force crop */
    object-fit: cover;
    object-position: center center;
    /* Force the image to fill the entire container */
    width: 100% !important;
    height: 100% !important;
}

.after-image img {
    /* Ensure consistent sizing and force crop */
    object-fit: cover;
    object-position: center center;
    /* Force the image to fill the entire container */
    width: 100% !important;
    height: 100% !important;
    /* Move the after image slightly higher */
    transform: translateY(-8px);
}

.after-image img {
    /* Move the after image up slightly to align with before image */
    transform: translateY(-15px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo-image {
        height: 90px;
        max-width: 320px;
    }
    
    /* Mobile Video Optimizations */
    .hero-video,
    .international-video {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        z-index: -2 !important;
    }
    
    /* Mobile video container optimization */
    .hero-video-container {
        z-index: -2 !important;
    }
    
    .hero-video-container,
    .international-video-container {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .footer-logo .logo-image {
        height: 100px;
        max-width: 380px;
    }
    
    .services-hero-content h1 {
        font-size: 2.5rem;
    }
    
        .services-grid {
        gap: 2rem;
    }

    .service-row {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .service-row:nth-child(even) .service-card {
        order: 1;
    }

    .service-row:nth-child(even) .service-image {
        order: 2;
    }

    .service-image {
        height: 320px;
        min-height: 320px;
        max-height: 320px;
    }

    .service-image-split {
        grid-template-columns: 1fr;
        height: 320px;
        min-height: 320px;
        max-height: 320px;
    }

    .service-image-split img {
        min-height: 0;
    }

    .service-card {
        padding: 1.5rem;
        height: 320px;
        min-height: 320px;
        max-height: 320px;
        overflow-y: auto;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    /* Mobile nav handled in "MOBILE RESPONSIVE DESIGN" @media (max-width: 768px) block below */

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

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

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .services-categories {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-category {
        padding: 1.5rem;
    }

    .category-header h3 {
        font-size: 1.2rem;
    }

    .services-grid,
    .doctors-grid {
        grid-template-columns: 1fr;
    }

    .before-after-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .before-after-slider {
        order: 1;
    }

    .before-after-cta-box {
        order: 2;
        text-align: center;
    }

    .before-after-wrapper {
        aspect-ratio: 16 / 9;
    }

    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

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

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

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Floating Abstract Shapes for Main Page */
.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -2;
    pointer-events: none;
}

.shape {
    position: absolute;
    opacity: 0.08;
    filter: blur(1px);
    animation: gentle-float 30s infinite ease-in-out;
}

.shape:nth-child(1) {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(231, 231, 231, 0.15) 0%, rgba(53, 53, 53, 0.05) 70%);
    border-radius: 50%;
    top: 60%;
    left: -100px;
    animation-delay: 0s;
    animation-duration: 40s;
}

.shape:nth-child(2) {
    width: 400px;
    height: 250px;
    background: radial-gradient(ellipse, rgba(53, 53, 53, 0.12) 0%, rgba(231, 231, 231, 0.08) 60%);
    border-radius: 50%;
    top: 20%;
    left: 70%;
    animation-delay: -10s;
    animation-duration: 35s;
}

.shape:nth-child(3) {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(231, 231, 231, 0.1) 0%, rgba(53, 53, 53, 0.06) 80%);
    border-radius: 50%;
    top: 80%;
    left: 80%;
    animation-delay: -20s;
    animation-duration: 45s;
}

.shape:nth-child(4) {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(53, 53, 53, 0.08) 0%, rgba(231, 231, 231, 0.04) 75%);
    border-radius: 50%;
    top: 10%;
    left: 20%;
    animation-delay: -15s;
    animation-duration: 50s;
}

.shape:nth-child(5) {
    width: 250px;
    height: 180px;
    background: radial-gradient(ellipse, rgba(231, 231, 231, 0.12) 0%, rgba(53, 53, 53, 0.07) 65%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    animation-delay: -5s;
    animation-duration: 38s;
}

.shape:nth-child(6) {
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(53, 53, 53, 0.1) 0%, rgba(231, 231, 231, 0.05) 70%);
    border-radius: 50%;
    top: 30%;
    left: -50px;
    animation-delay: -25s;
    animation-duration: 42s;
}

.shape:nth-child(7) {
    width: 320px;
    height: 200px;
    background: radial-gradient(ellipse, rgba(231, 231, 231, 0.09) 0%, rgba(53, 53, 53, 0.06) 60%);
    border-radius: 50%;
    top: 70%;
    left: 60%;
    animation-delay: -12s;
    animation-duration: 36s;
}

.shape:nth-child(8) {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(53, 53, 53, 0.11) 0%, rgba(231, 231, 231, 0.07) 80%);
    border-radius: 50%;
    top: 5%;
    left: 85%;
    animation-delay: -18s;
    animation-duration: 48s;
}

@keyframes gentle-float {
    0% {
        transform: translateY(0px) translateX(0px) scale(1);
        opacity: 0.08;
    }
    25% {
        transform: translateY(-30px) translateX(20px) scale(1.05);
        opacity: 0.12;
    }
    50% {
        transform: translateY(-60px) translateX(-15px) scale(1.1);
        opacity: 0.08;
    }
    75% {
        transform: translateY(-30px) translateX(25px) scale(1.05);
        opacity: 0.12;
    }
    100% {
        transform: translateY(0px) translateX(0px) scale(1);
        opacity: 0.08;
    }
}

/* Floating shapes mobile styles moved to main mobile section */

/* Enhanced Scroll Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-10deg) scale(0.8);
    }
    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation classes */
.animate-on-scroll {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.animated {
    opacity: 1;
}

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

.fade-in-up.animated {
    transform: translateY(0);
}

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

.fade-in-left.animated {
    transform: translateX(0);
}

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

.fade-in-right.animated {
    transform: translateX(0);
}

.scale-in {
    transform: scale(0.8);
}

.scale-in.animated {
    transform: scale(1);
}

.slide-in-top {
    transform: translateY(-50px);
}

.slide-in-top.animated {
    transform: translateY(0);
}

.rotate-in {
    transform: rotate(-10deg) scale(0.8);
}

.rotate-in.animated {
    transform: rotate(0deg) scale(1);
}

.bounce-in {
    transform: scale(0.3);
}

.bounce-in.animated {
    transform: scale(1);
    animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Stagger animations for multiple elements */
.stagger-animation > * {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-animation > *.animated {
    opacity: 1;
    transform: translateY(0);
}

.stagger-animation > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-animation > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-animation > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-animation > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-animation > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-animation > *:nth-child(6) { transition-delay: 0.6s; }

/* Parallax scrolling effects */
.parallax-slow {
    transform: translateZ(0);
    will-change: transform;
}

.parallax-medium {
    transform: translateZ(0);
    will-change: transform;
}

.parallax-fast {
    transform: translateZ(0);
    will-change: transform;
}

/* Hover animations */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-10px);
}

.hover-scale {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Text reveal animation */
.text-reveal {
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-reveal.animated span {
    transform: translateY(0);
}

/* Enhanced floating shapes animation */
.floating-shapes .shape {
    animation-duration: 20s, 8s;
    animation-timing-function: linear, ease-in-out;
    animation-iteration-count: infinite;
    animation-direction: normal, alternate;
}

.floating-shapes .shape:nth-child(odd) {
    animation-name: float, pulse;
}

.floating-shapes .shape:nth-child(even) {
    animation-name: float-reverse, pulse-reverse;
}

@keyframes pulse {
    0%, 100% { opacity: 0.08; }
    50% { opacity: 0.15; }
}

@keyframes pulse-reverse {
    0%, 100% { opacity: 0.15; }
    50% { opacity: 0.08; }
}

@keyframes float-reverse {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(-20px, -30px) rotate(90deg);
    }
    50% {
        transform: translate(-40px, 0) rotate(180deg);
    }
    75% {
        transform: translate(-20px, 30px) rotate(270deg);
    }
    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Enhanced button animations */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Enhanced card animations */
.service-card, .doctor-card, .package-card, .procedure-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
}

.service-card:hover, .doctor-card:hover, .package-card:hover, .procedure-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Enhanced navbar animation */
.navbar {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
    animation: navbarSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes navbarSlideIn {
    from {
        transform: translateX(-50%) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(10px);
        opacity: 1;
    }
}

/* Enhanced loading screen animation */
.loading-screen {
    animation: loadingFadeIn 0.5s ease-out;
}

@keyframes loadingFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.loading-screen.fade-out {
    animation: loadingFadeOut 0.3s ease-in forwards;
}

@keyframes loadingFadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(1.05);
    }
}

/* Enhanced hero section animations */
.hero-content h1 {
    animation: heroTitleSlide 1s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}

.hero-content p {
    animation: heroSubtitleSlide 1s cubic-bezier(0.4, 0, 0.2, 1) 0.6s both;
}

.hero-content .btn {
    animation: heroButtonSlide 1s cubic-bezier(0.4, 0, 0.2, 1) 0.9s both;
}

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

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

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

/* Enhanced section headers */
.section-header h2 {
    position: relative;
    overflow: hidden;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #353535, transparent);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-header.animated h2::after {
    left: 100%;
}

/* Enhanced stats counter animation */
.stat {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat.animated {
    animation: statBounce 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes statBounce {
    0% {
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Enhanced contact form animations */
.contact-form input,
.contact-form textarea,
.contact-form select {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Enhanced footer animations */
.footer-section {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-section:hover {
    transform: translateY(-5px);
}

/* Enhanced social media icons */
.social-links a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-links a:hover {
    transform: translateY(-3px) scale(1.1);
    filter: brightness(1.2);
}

/* Enhanced mobile menu animations */
.nav-menu {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-menu.active {
    animation: mobileMenuSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes mobileMenuSlide {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced hamburger menu animation */
.nav-toggle .bar {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced progress bar */
.progress-bar {
    background: linear-gradient(90deg, #353535, #E7E7E7, #353535);
    background-size: 200% 100%;
    animation: progressShimmer 2s ease-in-out infinite;
}

@keyframes progressShimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* ========================================
   PARALLAX SCROLLING AND ANIMATIONS
   ======================================== */

/* Parallax Scrolling Effects */
.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    will-change: transform;
}

.parallax-slow {
    transform: translateZ(0);
    will-change: transform;
}

.parallax-medium {
    transform: translateZ(0);
    will-change: transform;
}

.parallax-fast {
    transform: translateZ(0);
    will-change: transform;
}

/* Scroll Animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.scroll-animate-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-animate-left.animate {
    opacity: 1;
    transform: translateX(0);
}

.scroll-animate-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-animate-right.animate {
    opacity: 1;
    transform: translateX(0);
}

.scroll-animate-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-animate-scale.animate {
    opacity: 1;
    transform: scale(1);
}

.scroll-animate-rotate {
    opacity: 0;
    transform: rotate(-10deg) scale(0.9);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-animate-rotate.animate {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Staggered Animation Delays */
.scroll-animate:nth-child(1) { transition-delay: 0.1s; }
.scroll-animate:nth-child(2) { transition-delay: 0.2s; }
.scroll-animate:nth-child(3) { transition-delay: 0.3s; }
.scroll-animate:nth-child(4) { transition-delay: 0.4s; }
.scroll-animate:nth-child(5) { transition-delay: 0.5s; }
.scroll-animate:nth-child(6) { transition-delay: 0.6s; }

/* Floating Animation for Cards */
@keyframes float-gentle {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.float-gentle {
    animation: float-gentle 3s ease-in-out infinite;
}

.float-gentle:nth-child(1) { animation-delay: 0s; }
.float-gentle:nth-child(2) { animation-delay: 0.5s; }
.float-gentle:nth-child(3) { animation-delay: 1s; }
.float-gentle:nth-child(4) { animation-delay: 1.5s; }

/* Pulse Animation */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 255, 255, 0.3);
    }
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Text Reveal Animation */
@keyframes text-reveal {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.text-reveal {
    animation: text-reveal 0.8s ease-out forwards;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Enhanced Button Hover Effects */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

/* Card Hover Effects */
.service-card, .testimonial-card, .doctor-card {
    transition: all 0.3s ease;
    transform: translateZ(0);
}

.service-card:hover, .testimonial-card:hover, .doctor-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Parallax Hero Video */
.hero-video-container {
    transform: translateZ(0);
    will-change: transform;
}

/* Enhanced Floating Shapes with Parallax */
.shape {
    will-change: transform;
    transform: translateZ(0);
}

/* Section Reveal Animations */
.section-reveal {
    opacity: 0;
    transform: translateY(80px);
    transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.section-reveal.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Image Parallax */
.image-parallax {
    transform: translateZ(0);
    will-change: transform;
}

/* Text Animation */
@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-100px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    0% {
        opacity: 0;
        transform: translateX(100px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translateY(-30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotateIn {
    0% {
        opacity: 0;
        transform: rotate(-180deg) scale(0.5);
    }
    100% {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

/* Animation Classes */
.slide-in-left {
    animation: slideInFromLeft 0.8s ease-out forwards;
}

.slide-in-right {
    animation: slideInFromRight 0.8s ease-out forwards;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in-down {
    animation: fadeInDown 0.8s ease-out forwards;
}

.zoom-in {
    animation: zoomIn 0.8s ease-out forwards;
}

.rotate-in {
    animation: rotateIn 0.8s ease-out forwards;
}

/* ========================================
   MOBILE OPTIMIZATION
   ======================================== */

/* ========================================
   MOBILE RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    /* Reset and base mobile styles */
    * {
        box-sizing: border-box;
    }
    
    body {
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        padding: 0;
        margin: 0;
    }
    
    /* Prevent images and iframes from causing horizontal scroll */
    img {
        max-width: 100%;
        height: auto;
    }
    
    iframe {
        max-width: 100%;
    }
    
    video.hero-video, video.about-video, video.international-video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .nav-logo .logo-image {
        max-height: 48px;
        width: auto;
        max-width: 160px;
        content: url('images/logo.png');
    }
    
    /* Disable parallax on mobile for better performance */
    .parallax-bg,
    .parallax-slow,
    .parallax-medium,
    .parallax-fast {
        transform: none !important;
        background-attachment: scroll !important;
    }
    
    /* Mobile Navigation */
    .navbar {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        transform: none;
        margin: 0;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        padding: 15px;
        z-index: 1000;
        transition: all 0.3s ease;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0;
        box-sizing: border-box;
    }
    
    .navbar.scrolled {
        background: rgba(21, 21, 21, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    .nav-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        padding: 0;
        position: relative;
        box-sizing: border-box;
    }
    
    .nav-logo {
        flex: 1;
        text-align: left;
    }
    
    .nav-logo img {
        height: 80px;
        width: auto;
        max-width: 250px;
    }
    
    .nav-toggle {
        flex: 0 0 auto;
        margin-left: auto;
        order: 2;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .nav-logo {
        order: 1;
    }
    
    /* Override any desktop navbar styles on mobile */
    .navbar {
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
        margin: 0 !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        box-sizing: border-box !important;
    }
    
    .nav-menu {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        margin: 0 !important;
        padding: 90px 0 2rem 0 !important;
        background: rgba(21, 21, 21, 0.98) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column !important;
        justify-content: flex-start;
        align-items: center;
        transition: transform 0.25s ease-out, visibility 0.25s ease-out;
        z-index: 9998 !important;
        overflow-y: auto;
        transform: translateX(-100%) !important;
        visibility: hidden !important;
        pointer-events: none !important;
        box-sizing: border-box;
        display: flex !important;
        list-style: none;
    }
    
    .nav-menu.active {
        transform: translateX(0) !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }
    
    .nav-item {
        margin: 1rem 0;
        width: 100%;
        display: block;
        visibility: visible;
        opacity: 1;
    }
    
    .nav-link {
        font-size: 1.2rem;
        padding: 1rem 2rem;
        display: block;
        width: 100%;
        text-align: center;
        color: #ffffff !important;
        text-decoration: none;
        transition: all 0.3s ease;
        visibility: visible;
        opacity: 1;
    }
    
    .nav-link:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #ffffff !important;
    }
    
    .nav-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        z-index: 9999 !important;
        padding: 12px !important;
        min-width: 48px;
        min-height: 48px;
        position: relative;
        background: rgba(0,0,0,0.15);
        border: none;
        border-radius: 8px;
        visibility: visible !important;
        opacity: 1 !important;
        -webkit-tap-highlight-color: transparent;
    }
    
    .nav-toggle .bar {
        width: 26px;
        height: 3px;
        background: #E7E7E7;
        margin: 3px 0;
        transition: 0.3s;
        border-radius: 2px;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        box-shadow: 0 0 0 1px rgba(0,0,0,0.2);
    }
    .navbar:not(.scrolled) .nav-toggle .bar {
        background: #151515;
        box-shadow: 0 0 0 1px rgba(255,255,255,0.3);
    }
    
    .nav-toggle.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    /* Hero Section Mobile */
    .hero {
        min-height: 100vh;
        height: 100vh;
        max-height: 100vh;
        padding-top: 80px;
        padding-bottom: 1.5rem;
        display: flex;
        align-items: center;
    }
    
    .page-services .hero {
        min-height: 50vh;
        height: 50vh;
        max-height: 50vh;
        padding-top: 80px;
    }
    
    .hero-container {
        padding: 0 1.25rem;
        width: 100%;
        text-align: center;
    }
    
    .hero-content {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-title {
        font-size: 2.2rem;
        line-height: 1.2;
        margin-bottom: 1rem;
        text-align: center;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.4;
        margin-bottom: 1.5rem;
        padding: 0 1rem;
        text-align: center;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        align-items: center;
        justify-content: center;
    }
    
    .btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 280px;
        padding: 14px 24px;
        font-size: 1rem;
        text-align: center;
        min-height: 48px;
        border-radius: 50px;
        gap: 8px;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-agendar-online,
    .btn-ver-servicio,
    .btn-inicia-cambio {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    
    /* Sections Mobile */
    section {
        padding: 2.5rem 0;
    }
    
    .container {
        padding: 0 1.25rem;
        max-width: 100%;
        margin: 0 auto;
        box-sizing: border-box;
        width: 100%;
    }
    
    .section-header {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
        margin-bottom: 1rem;
        text-align: center;
    }
    
    .section-header p {
        font-size: 1rem;
        line-height: 1.5;
        padding: 0 1rem;
        text-align: center;
    }
    
    
    /* About Section Mobile */
    .about {
        padding: 1rem 0 3rem;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }
    
    .about-content {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        margin: 0 auto;
        padding: 0 1rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        align-items: center;
        justify-content: center;
    }
    
    .about-text {
        padding: 0;
        text-align: center;
        margin: 0 auto;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        display: block;
    }
    
    .about-text h2 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
        text-align: center;
    }
    
    .about-text p {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 1rem;
        text-align: center;
        padding: 0 0.5rem;
    }

    .about-brand-block {
        margin-top: 2.5rem;
        padding: 2rem 1.25rem 2.5rem;
    }

    .about-brand-label {
        font-size: 0.7rem;
    }

    .about-brand-title {
        font-size: 2rem;
    }

    .about-brand-intro,
    .about-brand-text {
        font-size: 0.95rem;
        text-align: left;
    }

    .about-images-row {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        margin-top: 2rem;
        padding: 0 0.5rem;
    }

    .about-rect-image {
        min-height: 200px;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .before-after {
        padding: 2rem 0 3rem;
    }
    
    .before-after-layout {
        gap: 1.5rem;
        padding: 0 0.5rem;
    }
    
    .before-after-cta-box {
        padding: 1.5rem 1rem;
    }
    
    .btn-inicia-cambio {
        padding: 1rem 1.5rem !important;
        font-size: 1rem !important;
        min-height: 48px;
    }

    .about-image {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        margin: 0 auto;
        box-sizing: border-box;
    }
    
    .about-video-container {
        height: 250px;
        margin: 0 auto;
        border-radius: 10px;
        overflow: hidden;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Doctors Section Mobile - Horizontal Scroll */
    .doctors {
        padding: 3rem 0;
    }
    
    .doctors-grid {
        display: flex;
        overflow-x: auto;
        gap: 1.5rem;
        padding: 0 1rem;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .doctors-grid::-webkit-scrollbar {
        display: none;
    }
    
    .doctor-card {
        flex: 0 0 280px;
        margin: 0;
        padding: 1.5rem;
        text-align: center;
        scroll-snap-align: start;
        background: white;
        border-radius: 10px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }
    
    .doctor-image {
        width: 120px;
        height: 120px;
        margin: 0 auto 1rem;
    }
    
    .doctor-card h3 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }
    
    .specialty {
        font-size: 0.9rem;
        color: #666;
    }
    
    /* Scroll indicator for doctors */
    .doctors::after {
        content: "← Swipe to see more doctors →";
        display: block;
        text-align: center;
        color: #666;
        font-size: 0.8rem;
        margin-top: 1rem;
        opacity: 0.7;
    }
    
    /* Testimonials Mobile - Horizontal Scroll */
    .testimonials {
        padding: 3rem 0;
    }
    
    .testimonials-container {
        padding: 0 1rem;
        overflow-x: hidden;
        overflow-y: visible;
    }
    
    .testimonials-row {
        height: auto;
        margin-bottom: 2rem;
        min-height: 0;
        overflow: visible;
    }
    
    .testimonials-track {
        animation: none;
        display: flex;
        flex-direction: row;
        gap: 1rem;
        padding: 0 1rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .bottom-row .testimonials-track {
        transform: none;
    }
    
    .testimonials-track::-webkit-scrollbar {
        display: none;
    }
    
    .testimonial-card {
        flex: 0 0 300px;
        margin: 0;
        padding: 1.5rem 1.5rem 1.75rem;
        scroll-snap-align: start;
        background: white;
        border-radius: 10px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }
    
    .testimonial-text {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .testimonial-author {
        font-size: 0.85rem;
    }
    
    .bottom-row {
        margin-bottom: 3rem;
    }
    
    /* Scroll indicator for testimonials */
    .testimonials::after {
        content: "← Desliza para ver más reseñas →";
        display: block;
        text-align: center;
        color: #666;
        font-size: 0.8rem;
        margin-top: 1rem;
        opacity: 0.7;
    }
    
    /* Contact Section Mobile */
    .contact {
        padding: 3rem 0;
    }
    
    .contact-whatsapp {
        padding: 2rem 1rem;
        text-align: center;
    }
    
    .whatsapp-icon-large {
        width: 80px;
        height: 80px;
        margin: 0 auto 1.5rem;
    }
    
    .whatsapp-content h3 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .whatsapp-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .whatsapp-btn-large {
        font-size: 1.1rem;
        padding: 15px 30px;
        margin-bottom: 2rem;
    }
    
    /* Services Page Mobile */
    .services-hero {
        padding: 4rem 1rem 2rem;
        text-align: center;
    }
    
    .services-hero h1 {
        font-size: 2.2rem;
        margin-bottom: 1rem;
    }
    
    .services-hero p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .service-row {
        flex-direction: column;
        margin-bottom: 3rem;
    }
    
    .service-card {
        order: 2;
        padding: 1.5rem;
        margin: 0;
    }
    
    .service-image {
        order: 1;
        margin: 0 0 1.5rem 0;
    }
    
    .service-card h3 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }
    
    .service-card p {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 1rem;
    }
    
    .service-card {
        text-align: center;
    }
    
    .service-card .btn-ver-servicio {
        align-self: center;
    }
    
    .service-list {
        font-size: 0.9rem;
        text-align: left;
        display: inline-block;
        margin: 0 auto;
    }
    
    .service-list li {
        margin-bottom: 0.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1rem;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
    
    /* Footer Mobile - Center Aligned */
    .footer {
        padding: 3rem 0 1rem;
        text-align: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        justify-items: center;
    }
    
    .footer-section {
        text-align: center;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .footer-section h3 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
        text-align: center;
    }
    
    .footer-section p,
    .footer-section li {
        font-size: 0.9rem;
        line-height: 1.5;
        text-align: center;
    }
    
    .footer-section ul {
        text-align: center;
        list-style: none;
        padding: 0;
    }
    
    .footer-section ul li {
        margin-bottom: 0.5rem;
        text-align: center;
    }
    
    .footer-section ul li a {
        text-align: center;
        display: inline-block;
    }
    
    .footer-logo {
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .footer-logo img {
        margin: 0 auto;
        display: block;
    }
    
    .social-links {
        justify-content: center;
        text-align: center;
    }
    
    .footer-map {
        text-align: center;
        margin: 0 auto;
    }
    
    .footer-map iframe {
        height: 200px;
        border-radius: 10px;
        margin: 0 auto;
        display: block;
    }
    
    .footer-bottom {
        text-align: center;
        margin-top: 2rem;
    }
    
    .footer-bottom p {
        text-align: center;
        font-size: 0.8rem;
    }
    
    /* WhatsApp Float Button Mobile */
    .whatsapp-float {
        width: 60px;
        height: 60px;
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-icon {
        width: 35px;
        height: 35px;
    }
    
    /* Disable complex animations on mobile for better performance */
    .float-gentle {
        animation: none;
    }
    
    .scroll-animate,
    .scroll-animate-left,
    .scroll-animate-right,
    .scroll-animate-scale,
    .scroll-animate-rotate {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .scroll-animate.animate,
    .scroll-animate-left.animate,
    .scroll-animate-right.animate,
    .scroll-animate-scale.animate,
    .scroll-animate-rotate.animate {
        opacity: 1;
        transform: none;
    }
    
    /* Hide floating shapes on mobile for better performance */
    .floating-shapes {
        display: none;
    }
    
    /* Touch-friendly interactions */
    .btn,
    .nav-link,
    .whatsapp-float {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    /* Prevent zoom on input focus */
    input,
    textarea,
    select {
        font-size: 16px;
    }
    
    /* Smooth scrolling for mobile */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        overflow-x: hidden;
    }
    
    /* Ensure all containers allow scrolling */
    * {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Fix any potential scroll blocking */
    .container,
    section,
    .hero,
    .about,
    .doctors,
    .testimonials,
    .contact {
        overflow: visible;
        position: relative;
    }
    
    /* Optimize video for mobile */
    .hero-video,
    .about-video {
        object-fit: cover;
        object-position: center;
    }
    
    .services-page {
        padding: 2rem 0 3rem;
    }
    
    .services-page .container {
        padding: 0 1.25rem;
    }
    
    .contact-whatsapp {
        padding: 2rem 1rem;
    }
    
    .international-hero {
        padding-top: 80px;
        min-height: 100vh;
    }
    
    .international-hero-content h1 {
        font-size: 2rem;
    }
    
    .international-hero-content p {
        font-size: 1rem;
    }
    
    .international-hero .hero-buttons {
        flex-direction: column;
        max-width: 280px;
        margin: 0 auto;
    }
    
    .international-hero .hero-buttons .btn {
        width: 100%;
    }
    
    /* Mobile text sizing */
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.4rem; }
    h4 { font-size: 1.2rem; }
    p { font-size: 0.95rem; line-height: 1.6; }
}

/* Extra small devices (phones, 480px and down) */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero-container,
    .hero-content {
        text-align: center;
    }
    
    .hero-title {
        font-size: 1.75rem;
        text-align: center;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        padding: 0 0.5rem;
        text-align: center;
    }
    
    .hero-buttons {
        align-items: center;
        justify-content: center;
    }
    
    .btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        text-align: center;
        min-height: 48px;
        padding: 14px 20px;
    }
    
    .section-header,
    .section-header h2,
    .section-header p {
        text-align: center;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .section-header p {
        font-size: 0.9rem;
    }
    
    .about-images-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .about-rect-image {
        min-height: 240px;
    }
    
    .doctor-card {
        padding: 1rem;
    }
    
    .testimonial-card {
        padding: 1rem;
    }
    
    .service-card {
        padding: 1rem;
        height: 260px;
        min-height: 260px;
        max-height: 260px;
        overflow-y: auto;
    }
    
    .service-image {
        height: 260px;
        min-height: 260px;
        max-height: 260px;
    }
    
    .service-image-split {
        height: 260px;
        min-height: 260px;
        max-height: 260px;
    }
    
    .whatsapp-content h3 {
        font-size: 1.5rem;
    }
    
    .whatsapp-btn-large {
        font-size: 1rem;
        padding: 12px 24px;
    }
    
    .btn {
        min-height: 48px;
        padding: 14px 20px;
    }
    
    .before-after-slider {
        max-width: 100%;
    }
    
    .before-after-cta-box {
        padding: 1rem 0.5rem;
    }
    
    .contact {
        padding: 3rem 0;
    }
    
    .footer-map iframe {
        height: 180px;
    }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .nav-menu {
        height: calc(100vh - 60px);
        top: 60px;
    }
    
    .about-video-container {
        height: 200px;
    }
    
    .doctors-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-video,
    .about-video {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .floating-shapes {
        display: none;
    }
    
    .parallax-bg,
    .parallax-slow,
    .parallax-medium,
    .parallax-fast {
        transform: none !important;
    }
}

/* ========================================
   GLOBAL MOBILE HARDENING (2026 pass)
   Keeps existing design, fixes edge-case mobile issues site-wide.
   ======================================== */
@media (max-width: 768px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Prevent viewport jitter from 100vw sections */
    .before-after {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    /* Avoid horizontal scrollbar from viewport units in overlays */
    .nav-menu {
        width: 100% !important;
    }

    /* Better spacing for notched devices */
    .navbar {
        padding-top: max(15px, env(safe-area-inset-top));
    }

    .whatsapp-float {
        right: max(20px, env(safe-area-inset-right));
        bottom: max(20px, env(safe-area-inset-bottom));
    }

    /* Stop text clipping in service cards on smaller phones */
    .service-card {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow-y: visible;
    }

    .service-image,
    .service-image-split {
        height: min(70vw, 320px);
        min-height: 220px;
        max-height: 320px;
    }

    /* Keep long headings readable without wrap breakage */
    h1 {
        font-size: clamp(1.9rem, 7vw, 2.4rem);
        line-height: 1.2;
    }

    h2 {
        font-size: clamp(1.5rem, 5.8vw, 2rem);
        line-height: 1.25;
    }

    h3 {
        font-size: clamp(1.2rem, 4.8vw, 1.5rem);
        line-height: 1.3;
    }

    p {
        font-size: clamp(0.95rem, 3.8vw, 1rem);
    }

    /* Unify mobile button sizing/alignment across all sections */
    .hero-buttons,
    .cta-buttons,
    .international-hero .hero-buttons {
        align-items: center;
        justify-content: center;
    }

    .btn,
    .btn-primary,
    .btn-secondary,
    .btn-agendar-online,
    .btn-ver-servicio,
    .btn-inicia-cambio,
    .whatsapp-btn-large {
        width: auto !important;
        max-width: min(240px, 88vw) !important;
        min-height: 44px !important;
        padding: 12px 20px !important;
        font-size: 0.92rem !important;
        line-height: 1.2;
        margin-left: auto;
        margin-right: auto;
        align-self: center !important;
    }

    /* Home CTA under video: keep comfortable spacing before compare section */
    .about-image .btn-agendar-online {
        margin-bottom: 1.8rem !important;
    }
}

@media (max-width: 480px) {
    .service-image,
    .service-image-split {
        height: min(76vw, 270px);
        min-height: 210px;
    }

    .btn,
    .btn-primary,
    .btn-secondary,
    .btn-agendar-online,
    .btn-ver-servicio,
    .btn-inicia-cambio,
    .whatsapp-btn-large {
        max-width: min(220px, 86vw) !important;
        padding: 11px 18px !important;
        font-size: 0.88rem !important;
    }
}
