/* ============================================
   MODERN DESIGN 2025 - VETERINARIA CASTELLBISBAL
   ============================================ */

/* Root Variables */
:root {
    --primary-color: #0cb8b6;
    --primary-dark: #0a9a98;
    --secondary-color: #0083ff;
    --accent-color: #ffb737;
    --gradient-primary: linear-gradient(135deg, #0cb8b6 0%, #0083ff 100%);
    --gradient-secondary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-hero: linear-gradient(135deg, rgba(12, 184, 182, 0.9) 0%, rgba(0, 131, 255, 0.9) 100%);
    --text-dark: #222222;
    --text-light: #999999;
    --text-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Poppins', sans-serif;
    /* Tamaño del logo del hero por defecto (desktop) */
    --hero-logo-size: 920px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-primary);
    line-height: 1.8;
    color: var(--text-light);
    font-size: 16px;
    overflow-x: hidden;
    scroll-behavior: smooth;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

/* Prevenir overflow horizontal en móvil */
.container,
.container-fluid {
    overflow-x: hidden;
    max-width: 100%;
}

.row {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
}

.row > * {
    padding-left: 12px;
    padding-right: 12px;
}

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

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

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

img {
    max-width: 100%;
    height: auto;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Section Padding */
.section-padding {
    padding: 100px 0;
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    .section-padding {
        padding: 60px 0;
    }
    
    /* Mejorar diseño móvil con más color */
    #service {
        background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
    }
    
    .service-card {
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
        border: 2px solid rgba(12, 184, 182, 0.2);
        box-shadow: 0 4px 15px rgba(12, 184, 182, 0.15);
    }
    
    .service-card:hover {
        border-color: var(--primary-color);
        box-shadow: 0 6px 25px rgba(12, 184, 182, 0.3);
    }
    
    .about-section {
        background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    }
    
    .info-box {
        background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
        border-left: 4px solid var(--primary-color);
    }
    
    .gallery-section {
        background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    }
    
    .contact-section {
        background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    }
    
    .contact-form-wrapper {
        background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
        border: 2px solid rgba(12, 184, 182, 0.2);
    }
}

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

.hero-banner {
    position: relative;
    min-height: auto;
    background: url('../img/bg-fondo.jpg') center center/cover no-repeat fixed;
    display: flex;
    align-items: flex-start;
    overflow: visible;
    z-index: 0;
    width: 100%;
    max-width: 100%;
    padding-top: 80px;
}

/* Desktop: el hero se ajusta al contenido (no pantalla completa) */
@media (min-width: 992px) {
    .hero-banner {
        min-height: auto;
    }
}

.hero-banner {
    position: relative;
    min-height: auto;
    background: url('../img/bg-fondo.jpg') center center/cover no-repeat fixed;
    display: flex;
    align-items: flex-start;
    overflow: visible;
    z-index: 0;
    width: 100%;
    max-width: 100%;
    will-change: transform;
    contain: layout style paint;
    padding-top: 80px;
}

@media (max-width: 768px) {
    .hero-banner {
        background-attachment: scroll;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradiente teal más profundo basado en #3f929a */
    background: linear-gradient(135deg,
        rgba(63, 146, 154, 0.92) 0%,   /* #3f929a */
        rgba(58, 132, 141, 0.90) 25%,  /* tono ligeramente más oscuro */
        rgba(52, 120, 128, 0.88) 50%,  /* transición media */
        rgba(46, 111, 117, 0.88) 75%,  /* más profundidad */
        rgba(40, 98, 104, 0.90) 100%   /* cierre más oscuro */
    );
    /* Capa adicional para profundidad */
    box-shadow: inset 0 0 220px rgba(63, 146, 154, 0.35);
    z-index: 1;
}

.hero-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Suavizamos el overlay para mantener un azul celeste luminoso */
    background: radial-gradient(circle at center,
        rgba(255, 255, 255, 0.10) 0%,
        rgba(255, 255, 255, 0.00) 70%);
    z-index: 1;
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: particles 20s ease-in-out infinite;
    z-index: 2;
    opacity: 0.5;
}

@keyframes particles {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.hero-container {
    position: relative;
    z-index: 10;
    padding-top: 0;
    padding-bottom: 16px;
    width: 100%;
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
    overflow: visible;
}

.hero-content {
    position: relative;
    overflow: visible;
    padding-top: calc(min(var(--hero-logo-size), 85vw) * 0.70);
}

.hero-row {
    min-height: auto;
    padding: 0;
    overflow: visible;
}

.hero-logo {
    margin-bottom: 0.5rem;
    margin-top: 0;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    line-height: 0;
    width: auto;
    height: auto;
    /* Mover la sombra al contenedor evita rasterizar el SVG y reduce pixelado */
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.2));
}

.hero-logo-img {
    width: var(--hero-logo-size);
    max-width: 85vw;
    height: auto;
    display: block;
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    margin: 0 auto 0 auto;
    z-index: 10;
    animation: logoDrop 600ms ease-out both;
    image-rendering: auto;
    aspect-ratio: 1 / 1;
    shape-rendering: geometricPrecision;
    vector-effect: non-scaling-stroke;
    pointer-events: none;
}


@keyframes heartbeat {
    0% { transform: scale(2.7); }
    14% { transform: scale(2.78); }
    28% { transform: scale(2.7); }
    42% { transform: scale(2.78); }
    70% { transform: scale(2.7); }
    100% { transform: scale(2.7); }
}

@keyframes logoDrop {
    0% { opacity: 0; transform: translate(-50%, -12px); }
    100% { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes glow {
    0% {
        filter: drop-shadow(0 20px 60px rgba(12, 184, 182, 0.4)) 
                drop-shadow(0 10px 30px rgba(0, 131, 255, 0.3))
                drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
    }
    100% {
        filter: drop-shadow(0 25px 70px rgba(12, 184, 182, 0.6)) 
                drop-shadow(0 15px 40px rgba(0, 131, 255, 0.5))
                drop-shadow(0 8px 20px rgba(255, 183, 55, 0.3));
    }
}

.hero-title {
    color: var(--text-white);
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    margin-top: 0;
    position: relative;
    text-shadow: 
        0 4px 30px rgba(0, 0, 0, 0.8), 
        0 2px 15px rgba(0, 0, 0, 0.6),
        0 0 10px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(8px);
    animation: heroFadeUp 420ms ease-out 120ms forwards;
    will-change: transform, opacity;
}

.hero-title-main {
    display: block;
    font-size: 3.5rem;
}

.hero-title-sub {
    display: block;
    font-size: 3rem;
    color: var(--accent-color);
    opacity: 0;
    transform: translateY(8px);
    animation: heroFadeUp 420ms ease-out 220ms forwards;
}

.hero-title-sub.seo-only {
    display: none !important;
}

.hero-subtitle {
    color: var(--text-white);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    margin-top: 0;
    text-shadow: 
        0 2px 15px rgba(0, 0, 0, 0.7),
        0 0 8px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(8px);
    animation: heroFadeUp 420ms ease-out 300ms forwards;
}

.hero-description {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 0.75rem !important;
    text-shadow: 
        0 2px 12px rgba(0, 0, 0, 0.6),
        0 0 6px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(8px);
    animation: heroFadeUp 420ms ease-out 380ms forwards;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(8px);
    animation: heroFadeUp 420ms ease-out 460ms forwards;
}

.hero-scroll {
    margin-top: 3rem;
}

.scroll-indicator {
    color: var(--text-white);
    font-size: 2rem;
    animation: bounce 2s infinite;
    display: inline-block;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    position: relative;
    z-index: 2;
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}


/* ============================================
   NAVBAR
   ============================================ */

.navbar {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 0;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease, padding 0.3s ease, opacity 0.25s ease;
    z-index: 1000;
    transform: translateY(0);
    opacity: 1;
    width: 100%;
    max-width: 100%;
    left: 0;
    right: 0;
    position: fixed;
    top: 0;
}

.navbar.navbar-hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
    padding: 0.5rem 0;
}

.navbar.scrolled .navbar-brand,
.navbar.scrolled .nav-link {
    color: var(--text-dark);
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-white);
    transition: var(--transition);
}

.navbar-brand-text {
    text-decoration: none;
}

.navbar-brand-name {
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
    font-weight: 700;
    font-size: 1.1rem;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .navbar-brand-name {
        white-space: normal;
        line-height: 1.2;
        max-width: 180px;
    }
}

.navbar.scrolled .navbar-brand-name {
    font-size: 0.95rem;
}

@media (max-width: 992px) {
    :root { --hero-logo-size: 840px; }
    .navbar-brand-name {
        font-size: 0.85rem;
        letter-spacing: 0.3px;
    }
    
    .navbar.scrolled .navbar-brand-name {
        font-size: 0.8rem;
    }
}

.navbar-logo {
    height: 50px;
    width: auto;
    transition: var(--transition);
}

.navbar.scrolled .navbar-logo {
    height: 40px;
}

.navbar-nav .nav-link {
    color: var(--text-white);
    font-weight: 500;
    padding: 0.5rem 1.5rem !important;
    position: relative;
    transition: var(--transition);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

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

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar.scrolled .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2834, 34, 34, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-gradient {
    background: var(--gradient-primary);
    color: var(--text-white);
    box-shadow: var(--shadow-md);
}

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

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

.btn-gradient:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: var(--text-white);
}

.btn-outline-light {
    border: 2px solid var(--text-white);
    color: var(--text-white);
    background: transparent;
}

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

.btn-lg {
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* ============================================
   SECTIONS
   ============================================ */

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-dark);
    text-align: center;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 3rem;
}

.title-divider {
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border: none;
    margin: 1rem auto 2rem;
    border-radius: 2px;
}

/* ============================================
   SERVICE CARDS
   ============================================ */

/* ============================================
   SERVICES SECTION - Fix scroll issues
   ============================================ */

#service {
    position: relative;
    z-index: 1;
    background: var(--bg-white);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.service-card {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    border: 1px solid rgba(12, 184, 182, 0.1);
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
    contain: layout style;
    display: flex;
    flex-direction: column;
}

.service-card-with-image {
    padding: 0;
    overflow: visible;
}

.service-image-wrapper {
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    position: relative;
}

.service-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    transform: scale(1);
}

.service-card-with-image:hover .service-image {
    transform: scale(1.1);
}

.service-card-with-image .service-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
    margin-bottom: 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.service-card-with-image .service-title,
.service-card-with-image .service-description,
.service-card-with-image .service-features {
    padding: 0 2.5rem;
}

.service-card-with-image .service-title {
    padding-top: 2rem;
    margin-top: -60px;
    position: relative;
    z-index: 1;
    background: linear-gradient(to bottom, transparent 0%, var(--bg-white) 20%);
    padding-bottom: 1rem;
}

.service-card-with-image .service-description {
    padding-top: 0;
}

.service-card-with-image .service-features {
    padding-bottom: 2.5rem;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(12, 184, 182, 0.3);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: var(--text-white);
    transition: var(--transition);
    flex-shrink: 0;
}

.service-card:hover .service-icon {
    transform: rotate(5deg) scale(1.1);
    box-shadow: 0 10px 30px rgba(12, 184, 182, 0.3);
}

.service-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.service-description {
    color: var(--text-light);
    line-height: 1.8;
    margin: 0 0 1.5rem 0;
}

.service-description strong {
    color: var(--primary-color);
    font-weight: 700;
}

.service-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.service-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.6;
    transition: var(--transition);
}

.service-features li:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.service-features li i {
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.service-features li strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* ============================================
   CTA SECTIONS
   ============================================ */

.cta-section {
    background: var(--gradient-primary);
    color: var(--text-white);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

.cta-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    height: 100%;
    min-height: 380px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: 70px 80px 1fr;
    align-items: center;
    justify-items: center;
    gap: 0;
}

.cta-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-lg);
}

.cta-content-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 0.5rem;
    min-height: 120px;
    padding-top: 1rem;
}

.cta-icon {
    font-size: 3rem;
    color: var(--accent-color);
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    width: 100%;
}

.cta-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-white);
    text-align: center;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.3;
    margin-bottom: 0;
    padding: 0 1rem;
    width: 100%;
}

.cta-text {
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
    width: 100%;
}

.cta-text i {
    color: var(--accent-color);
}

.cta-link {
    color: var(--text-white);
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cta-link:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

.cta-card-horizontal {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 2.5rem;
    min-height: 380px;
    grid-template-rows: none;
    max-width: 100%;
    overflow: hidden;
}

.cta-card-horizontal .cta-icon {
    flex-shrink: 0;
    margin-bottom: 0;
    height: 70px;
    width: 70px;
    font-size: 2.5rem;
}

.cta-card-horizontal .cta-title {
    margin-bottom: 0;
    height: auto;
    padding: 0;
    flex-shrink: 0;
    min-width: 180px;
    max-width: 180px;
    font-size: 1.4rem;
    text-align: left;
}

.cta-card-horizontal .schedule-modern {
    flex: 1;
    flex-direction: row;
    gap: 1rem;
    padding-top: 0;
    margin-top: 0;
    align-items: stretch;
    min-width: 0;
}

.cta-card-horizontal .schedule-item {
    flex: 1;
    margin: 0;
    padding: 1rem 1.25rem;
    min-width: 0;
}

.cta-card-horizontal .schedule-item-header {
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    font-size: 0.9rem;
}

.cta-card-horizontal .schedule-item-day {
    font-size: 0.95rem;
}

.cta-card-horizontal .schedule-item-time {
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.cta-card-horizontal .schedule-item-time i {
    font-size: 0.85rem;
}

@media (max-width: 992px) {
    .cta-card-horizontal {
        flex-direction: column;
        gap: 1.5rem;
        padding: 2rem;
        min-height: auto;
    }
    
    .cta-card-horizontal .cta-icon {
        height: 60px;
        width: 60px;
        font-size: 2rem;
    }
    
    .cta-card-horizontal .cta-title {
        min-width: auto;
        max-width: none;
        text-align: center;
        font-size: 1.3rem;
    }
    
    .cta-card-horizontal .schedule-modern {
        flex-direction: column;
        width: 100%;
    }
    
    .cta-card-horizontal .schedule-item {
        width: 100%;
    }
}

.schedule-modern {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    min-height: 120px;
    justify-content: center;
    align-items: stretch;
    padding-top: 1rem;
}

.schedule-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.schedule-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
    border-color: rgba(255, 255, 255, 0.25);
}

.schedule-item-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.schedule-item-header i {
    color: var(--accent-color);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.schedule-item-day {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-white);
    flex: 1;
}

.schedule-item-time {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.95rem;
    font-weight: 500;
}

.schedule-item-time i {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.schedule-item-time.special {
    color: var(--accent-color);
    font-weight: 600;
}

.schedule-item-time.special i {
    color: var(--accent-color);
}

.schedule-item-time.closed {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.schedule-item-time.closed i {
    color: rgba(255, 255, 255, 0.5);
}

.schedule-simple {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    min-height: 120px;
    justify-content: center;
    align-items: center;
    padding-top: 1rem;
}

.schedule-line {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    gap: 1.5rem;
}

.schedule-line:last-child {
    border-bottom: none;
}

.schedule-line:hover {
    padding-left: 0.5rem;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.schedule-day {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-white);
    text-align: left;
    line-height: 1.4;
}

.schedule-time {
    font-weight: 500;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    text-align: right;
    white-space: nowrap;
    line-height: 1.4;
}

.schedule-time.special {
    color: var(--accent-color);
    font-weight: 600;
}

.schedule-time.closed {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.cta-section-2 {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: var(--text-white);
}

.cta-title-2 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-white);
}

.cta-text-2 {
    font-size: 1.2rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
}

.cta-image-wrapper {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.cta-image-wrapper:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.cta-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.contact-image-card {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    height: 100%;
}

.contact-image-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.contact-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

.contact-image-card:hover .contact-image {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .cta-title-2 {
        font-size: 2rem;
    }
    .cta-text-2 {
        font-size: 1rem;
    }
    .cta-image {
        height: 300px;
    }
    .contact-image {
        height: 250px;
    }
    .service-image-wrapper {
        height: 200px;
    }
    .service-card-with-image .service-title {
        margin-top: -50px;
        padding-top: 1.5rem;
    }
    .service-card-with-image .service-title,
    .service-card-with-image .service-description,
    .service-card-with-image .service-features {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    .service-card-with-image .service-features {
        padding-bottom: 1.5rem;
    }
}

/* ============================================
   ABOUT SECTION
   ============================================ */

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

.about-content {
    padding: 2rem 0;
}

.about-text {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.about-text strong {
    color: var(--primary-color);
    font-weight: 700;
}

/* ============================================
   OPHTHALMOLOGY SECTION - SPECTACULAR DESIGN
   ============================================ */

.ophthalmology-section {
    background: linear-gradient(135deg, #0CB8B6 0%, #0A9A98 50%, #0CB8B6 100%);
    position: relative;
    overflow: hidden;
    padding: 80px 0;
}

.ophthalmology-bg-decoration {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: float-decoration 20s ease-in-out infinite;
    z-index: 0;
}

@keyframes float-decoration {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(-50px, 50px) scale(1.1);
    }
}

.ophthalmology-section .container {
    position: relative;
    z-index: 1;
}

.ophthalmology-main-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: pulse-badge 3s ease-in-out infinite;
}

.ophthalmology-main-badge i {
    font-size: 1.3rem;
    color: var(--accent-color);
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    }
}

.ophthalmology-main-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 2rem;
    line-height: 1.2;
    text-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.ophthalmology-main-intro {
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.9;
    margin-bottom: 0;
    font-size: 1.15rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.ophthalmology-main-intro strong {
    color: var(--text-white);
    font-weight: 700;
    font-size: 1.2rem;
}

.ophthalmology-stat-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 2.5rem 2rem;
    border-radius: 25px;
    text-align: center;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.ophthalmology-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.ophthalmology-stat-card:hover::before {
    transform: scaleX(1);
}

.ophthalmology-stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.ophthalmology-stat-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 30px rgba(12, 184, 182, 0.4);
    transition: var(--transition);
}

.ophthalmology-stat-card:hover .ophthalmology-stat-icon {
    transform: rotate(10deg) scale(1.1);
    box-shadow: 0 15px 40px rgba(12, 184, 182, 0.5);
}

.ophthalmology-stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 0.75rem;
}

.ophthalmology-stat-label {
    font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: 600;
}

.ophthalmology-feature-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 0;
    border-radius: 25px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.ophthalmology-feature-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.ophthalmology-feature-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.ophthalmology-feature-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(12, 184, 182, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: var(--transition);
}

.ophthalmology-feature-card:hover::after {
    opacity: 1;
}

.ophthalmology-feature-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.3);
}

.ophthalmology-feature-card:hover .ophthalmology-feature-img {
    transform: scale(1.15);
}

.ophthalmology-feature-icon-wrapper {
    margin: -60px auto 2rem;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.ophthalmology-feature-icon {
    width: 120px;
    height: 120px;
    background: var(--gradient-primary);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 3.5rem;
    box-shadow: 0 15px 40px rgba(12, 184, 182, 0.4);
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.ophthalmology-feature-card:hover .ophthalmology-feature-icon {
    transform: rotate(15deg) scale(1.15);
    box-shadow: 0 20px 50px rgba(12, 184, 182, 0.6);
}

.ophthalmology-feature-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 1;
    padding: 0 2rem;
}

.ophthalmology-feature-text {
    color: var(--text-light);
    line-height: 1.8;
    margin: 0;
    font-size: 1.05rem;
    position: relative;
    z-index: 1;
    flex: 1;
    padding: 0 2rem 2.5rem;
}

.ophthalmology-services-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 4rem 3rem;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
}

.ophthalmology-services-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: var(--gradient-primary);
}

.ophthalmology-services-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

.ophthalmology-services-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 2.5rem;
    box-shadow: 0 10px 30px rgba(12, 184, 182, 0.4);
}

.ophthalmology-services-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.ophthalmology-services-list {
    list-style: none;
    padding: 0;
    margin: 0 0 3rem 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.ophthalmology-services-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(12, 184, 182, 0.08) 0%, rgba(12, 184, 182, 0.03) 100%);
    border-radius: 15px;
    border-left: 4px solid var(--accent-color);
    transition: var(--transition);
}

.ophthalmology-services-list li:hover {
    background: linear-gradient(135deg, rgba(12, 184, 182, 0.15) 0%, rgba(12, 184, 182, 0.08) 100%);
    transform: translateX(10px);
    box-shadow: 0 5px 20px rgba(12, 184, 182, 0.2);
}

.ophthalmology-services-list li i {
    color: var(--accent-color);
    font-size: 1.3rem;
    flex-shrink: 0;
}

.ophthalmology-services-list li span {
    color: var(--text-dark);
    font-size: 1.05rem;
    font-weight: 500;
}

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

.ophthalmology-cta .btn {
    padding: 18px 50px;
    font-size: 1.2rem;
    box-shadow: 0 10px 40px rgba(12, 184, 182, 0.4);
}

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

.info-box {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--bg-white);
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.info-box:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
}

.info-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.info-content p {
    color: var(--text-light);
    line-height: 1.8;
    margin: 0;
}

/* ============================================
   GALLERY
   ============================================ */

.gallery-section {
    background: var(--bg-white);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    aspect-ratio: 4/3;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

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

.gallery-item:hover .gallery-img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 184, 182, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    font-size: 3rem;
    color: var(--text-white);
}

/* ============================================
   CONTACT SECTION
   ============================================ */

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

.contact-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.map-container {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.map-container iframe {
    width: 100%;
    height: 300px;
    border: none;
}

.contact-info-item {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
}

.contact-link {
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.contact-link:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.contact-link i {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-top: 0.2rem;
}

.contact-form-wrapper {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
}

.form-control {
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    padding: 12px 20px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(12, 184, 182, 0.25);
    outline: none;
}

.form-control-lg {
    padding: 15px 25px;
    font-size: 1.1rem;
}

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

.validation {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.validation.show {
    display: block;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(12, 184, 182, 0.25);
}

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

.footer {
    background: linear-gradient(135deg, #1c375a 0%, #2b3a49 100%);
    color: var(--text-white);
}

.footer-top {
    padding: 64px 0 32px;
}

/* Nuevo layout footer */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
    align-items: start;
}

.footer-col .footer-logo {
    width: 52px;
    height: 52px;
    margin-bottom: 12px;
}

.footer-col.footer-hours span {
    color: rgba(255,255,255,.85);
}

.footer-col { padding-right: 16px; }
.footer-col:not(:last-child) { border-right: 1px solid rgba(255,255,255,.08); }

.footer-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 14px;
    color: var(--text-white);
    letter-spacing: .2px;
}

.footer-text {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.9;
    margin-bottom: 12px;
    font-size: .95rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li { margin-bottom: 8px; }

.footer-links a {
    color: rgba(255, 255, 255, 0.85);
    transition: var(--transition);
    display: flex;
    align-items: center;
    padding: 4px 0;
    text-decoration: none;
}

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

.footer-links i { font-size: 6px; margin-right: 8px; }

.social-links { display: flex; gap: 12px; flex-wrap: wrap; }

.social-link {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 1.25rem;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.1);
}

.social-link:hover {
    transform: translateY(-5px) scale(1.1);
    color: var(--text-white);
}

.social-link.youtube:hover { background: #E74C3C; }
.social-link.instagram:hover { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.social-link.linkedin:hover { background: #2C3E50; }
.social-link.whatsapp:hover { background: #25D366; }

.footer-bottom { padding: 28px 0; border-top: 1px solid rgba(255, 255, 255, 0.08); }

.footer-meta { display: grid; gap: 6px; justify-items: center; }

.footer-copyright { color: rgba(255, 255, 255, 0.75); margin: 0; }

/* Responsivo footer */
@media (max-width: 992px) {
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
    .footer-col:not(:last-child) { border-right: none; }
}

@media (max-width: 576px) {
    :root { --hero-logo-size: 680px; }
    .footer-grid { grid-template-columns: 1fr; gap: 20px; }
    .footer-top { padding: 48px 0 24px; }
}

/* ============================================
   WHATSAPP FLOAT BUTTON
   ============================================ */

.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    left: 30px !important;
    right: auto !important;
    background: #25D366;
    color: var(--text-white);
    border-radius: 50%;
    text-align: center;
    font-size: 2rem;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 40px rgba(37, 211, 102, 0.5);
    color: var(--text-white);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */

.scroll-to-top {
    position: fixed;
    width: 50px;
    height: 50px;
    bottom: 110px;
    right: 30px;
    background: var(--gradient-primary);
    color: var(--text-white);
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    box-shadow: var(--shadow-md);
    z-index: 999;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

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

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 992px) {
    .section-title {
        font-size: 2rem;
    }
    
    .service-card {
        padding: 2rem;
    }
    
    .service-features {
        gap: 0.5rem;
    }
    
    .service-features li {
        font-size: 0.9rem;
    }
    
    .service-features li i {
        font-size: 1rem;
    }
    
    .cta-card {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    /* Prevenir overflow horizontal */
    .container,
    .container-fluid {
        max-width: 100%;
        overflow-x: hidden;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    [class*="col-"] {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .navbar-brand-name {
        font-size: 0.75rem;
        letter-spacing: 0.5px;
        line-height: 1.3;
        font-weight: 700;
        white-space: normal;
        text-align: center;
    }
    
    .navbar {
        padding: 0.5rem 0;
        background: linear-gradient(135deg,
            rgba(63, 146, 154, 0.78) 0%,
            rgba(58, 132, 141, 0.78) 100%
        ) !important;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        width: 100%;
        max-width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    
    .navbar.scrolled {
        background: linear-gradient(135deg,
            rgba(63, 146, 154, 0.92) 0%,
            rgba(58, 132, 141, 0.92) 100%
        ) !important;
        padding: 0.5rem 0;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    }
    
    .navbar.scrolled .navbar-brand-name {
        color: var(--text-white);
        font-size: 0.7rem;
    }

    /* Mantener hamburguesa blanca también al hacer scroll */
    .navbar.scrolled .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }
    
    .navbar-logo {
        height: 40px;
    }
    
    .navbar.scrolled .navbar-logo {
        height: 35px;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        font-size: 0.95rem;
    }
    
    /* Asegurar que el navbar no cause overflow */
    .navbar .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .hero-logo-img {
        width: var(--hero-logo-size);
        animation: logoDropTablet 520ms ease-out both;
    }
    
    @keyframes heartbeat-tablet {
        0% { transform: scale(2.3); }
        14% { transform: scale(2.37); }
        28% { transform: scale(2.3); }
        42% { transform: scale(2.37); }
        70% { transform: scale(2.3); }
        100% { transform: scale(2.3); }
    }

    @keyframes logoDropTablet {
        0% { opacity: 0; transform: translate(-50%, -10px); }
        100% { opacity: 1; transform: translate(-50%, 0); }
    }
    
    .hero-logo {
        margin-bottom: 0.75rem;
        margin-top: 0;
    }
    
    .hero-container {
        padding-top: 0;
        padding-bottom: 20px;
    }
    
    .hero-row {
        padding: 0;
    }
    
    .hero-title {
        font-size: 2.2rem;
        margin-bottom: 1rem;
    }
    
    .hero-title-main {
        font-size: 2.2rem;
        display: block;
    }
    
    .hero-title-sub {
        font-size: 1.8rem;
        display: block;
        margin-top: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        padding: 0.75rem 1.5rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .contact-form-wrapper {
        padding: 1.5rem;
    }
    
    /* Prevenir overflow en imágenes y elementos */
    img,
    video,
    iframe,
    embed,
    object {
        max-width: 100%;
        height: auto;
    }
    
    /* Asegurar que los mapas no causen overflow */
    .map-container {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    
    .map-container iframe {
        width: 100% !important;
        max-width: 100%;
    }
    
    /* Mejorar visualización de cards en móvil */
    .cta-card {
        background: rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(15px);
        border: 2px solid rgba(255, 255, 255, 0.3);
    }
    
    /* Añadir más contraste visual en móvil */
    .section-title {
        background: linear-gradient(135deg, var(--text-dark) 0%, var(--primary-color) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    /* Mejorar visualización de botones en móvil */
    .btn {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Asegurar que los textos largos no causen overflow */
    p, span, div, h1, h2, h3, h4, h5, h6 {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .whatsapp-float {
        width: 55px;
        height: 55px;
        font-size: 1.5rem;
        bottom: 20px;
        left: 20px !important;
        right: auto !important;
    }
    
    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 85px;
        right: 20px;
    }
    
    .cta-card {
        padding: 1.5rem;
        min-height: 320px;
    }
    
    .cta-icon {
        font-size: 2.5rem;
        height: 60px;
    }
    
    .cta-title {
        font-size: 1.25rem;
        height: 70px;
        padding: 0 0.5rem;
    }
    
    .cta-content-centered {
        min-height: 100px;
    }
    
    .schedule-simple {
        min-height: 100px;
    }
    
    .schedule-modern {
        gap: 1.25rem;
        padding-top: 0.5rem;
    }
    
    .schedule-item {
        padding: 1.25rem;
    }
    
    .schedule-item-header {
        gap: 0.5rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
    }
    
    .schedule-item-time {
        padding: 0.6rem 0;
    }
    
    .schedule-item-header i {
        font-size: 1rem;
    }
    
    .schedule-item-day {
        font-size: 0.9rem;
    }
    
    .schedule-item-time {
        font-size: 0.85rem;
        padding: 0.4rem 0;
    }
    
    .schedule-item-time i {
        font-size: 0.9rem;
    }
    
    .schedule-line {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 0.75rem 0;
    }
    
    .schedule-day {
        width: 100%;
        margin-bottom: 0.25rem;
    }
    
    .schedule-time {
        text-align: left;
        width: 100%;
    }
    
    .services-list {
        grid-template-columns: 1fr;
    }
    
    .ophthalmology-features {
        gap: 1rem;
        margin: 1.5rem 0;
    }
    
    .ophthalmology-feature {
        flex-direction: column;
        padding: 1rem;
    }
    
    .ophthalmology-icon {
        width: 45px;
        height: 45px;
        min-width: 45px;
        font-size: 1.3rem;
    }
    
    .ophthalmology-content h4 {
        font-size: 1rem;
    }
    
    .ophthalmology-content p {
        font-size: 0.9rem;
    }
    
    .ophthalmology-services-list {
        padding: 1rem;
        margin-top: 1.5rem;
    }
    
    .services-list-title {
        font-size: 1.1rem;
    }
    
    .specialty-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .ophthalmology-hero {
        padding: 2rem;
        margin-bottom: 2rem;
    }
    
    .ophthalmology-title {
        font-size: 1.6rem;
    }
    
    .ophthalmology-stats {
        flex-direction: column;
        gap: 1rem;
        padding: 1.25rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .ophthalmology-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .ophthalmology-card {
        padding: 1.5rem;
    }
    
    .ophthalmology-card-icon {
        width: 60px;
        height: 60px;
        font-size: 1.7rem;
        margin-bottom: 1.25rem;
    }
    
    .ophthalmology-card-title {
        font-size: 1.2rem;
    }
    
    .ophthalmology-card.services-card {
        padding: 2rem;
    }
    
    .ophthalmology-services {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .ophthalmology-section {
        padding: 60px 0;
    }
    
    .ophthalmology-main-title {
        font-size: 2.2rem;
    }
    
    .ophthalmology-main-intro {
        font-size: 1rem;
    }
    
    .ophthalmology-stat-card {
        padding: 2rem 1.5rem;
    }
    
    .ophthalmology-stat-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
    
    .ophthalmology-stat-number {
        font-size: 2.5rem;
    }
    
    .ophthalmology-feature-card {
        padding: 0;
    }
    
    .ophthalmology-feature-image {
        height: 180px;
    }
    
    .ophthalmology-feature-icon-wrapper {
        margin: -50px auto 1.5rem;
    }
    
    .ophthalmology-feature-icon {
        width: 100px;
        height: 100px;
        font-size: 3rem;
    }
    
    .ophthalmology-feature-title {
        font-size: 1.4rem;
        padding: 0 1.5rem;
    }
    
    .ophthalmology-feature-text {
        font-size: 1rem;
        padding: 0 1.5rem 2rem;
    }
    
    .ophthalmology-services-card {
        padding: 3rem 2rem;
    }
    
    .ophthalmology-services-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .ophthalmology-services-title {
        font-size: 1.8rem;
    }
    
    .ophthalmology-services-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .ophthalmology-services-list li {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    /* Asegurar que no haya overflow en pantallas pequeñas */
    html, body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }
    
    .navbar-brand-name {
        font-size: 0.65rem;
        line-height: 1.2;
    }
    
    .hero-logo-img {
        width: var(--hero-logo-size);
        animation: logoDropMobile 480ms ease-out both;
    }
    
    @keyframes heartbeat-mobile {
        0% { transform: scale(2); }
        14% { transform: scale(2.06); }
        28% { transform: scale(2); }
        42% { transform: scale(2.06); }
        70% { transform: scale(2); }
        100% { transform: scale(2); }
    }

    @keyframes logoDropMobile {
        0% { opacity: 0; transform: translate(-50%, -8px); }
        100% { opacity: 1; transform: translate(-50%, 0); }
    }
    
    .hero-title {
        font-size: 1.9rem;
        margin-top: -0.5rem;
    }
    
    .hero-title-main {
        font-size: 1.9rem;
    }
    
    .hero-title-sub {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .info-box {
        flex-direction: column;
        text-align: center;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .cta-title {
        font-size: 1.1rem;
    }
    
    /* Mejorar padding en móvil pequeño */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .section-padding {
        padding: 40px 0;
    }
    
    /* Añadir más elementos visuales en móvil pequeño */
    .service-icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
    
    .service-features {
        gap: 0.6rem;
    }
    
    .service-features li {
        font-size: 0.85rem;
        line-height: 1.5;
    }
    
    .service-features li i {
        font-size: 0.95rem;
    }
    
    .service-description {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }
    
    .service-title {
        font-size: 1.3rem;
    }
}

/* ============================================
   UTILITIES
   ============================================ */

/* Prevenir overflow en todos los elementos principales */
section {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* ============================================
   SEO ONLY CONTENT (Hidden visually, visible for SEO)
   ============================================ */

.seo-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    /* Mantiene el contenido accesible para buscadores pero invisible visualmente */
    /* Los buscadores pueden leer el contenido pero los usuarios no lo ven */
}

/* ============================================
   LEGAL PAGES STYLES
   ============================================ */

.legal-header {
    min-height: 40vh;
    background: url('../img/bg-fondo.jpg') center center/cover no-repeat;
    display: flex;
    align-items: center;
    position: relative;
    margin-top: 70px;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

.legal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.75) 0%, rgba(28, 55, 90, 0.8) 25%, rgba(12, 184, 182, 0.65) 50%, rgba(0, 131, 255, 0.7) 75%, rgba(0, 0, 0, 0.85) 100%);
    z-index: 1;
}

.legal-content {
    position: relative;
    z-index: 10;
    padding: 80px 0 40px;
    width: 100%;
    max-width: 100%;
}

.legal-text {
    color: var(--text-dark);
    line-height: 1.8;
    font-size: 1.05rem;
}

.legal-text h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.legal-text h3 {
    color: var(--text-dark);
    font-size: 1.4rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.legal-text h4 {
    color: var(--text-dark);
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.legal-text p {
    margin-bottom: 1rem;
    text-align: justify;
}

.legal-text ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.legal-text li {
    margin-bottom: 0.5rem;
}

.legal-text a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.legal-text a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.legal-text strong {
    color: var(--text-dark);
    font-weight: 600;
}

@media (max-width: 768px) {
    .legal-header {
        min-height: 30vh;
        margin-top: 60px;
    }
    
    .legal-content {
        padding: 60px 0 30px;
    }
    
    .legal-text {
        font-size: 0.95rem;
    }
    
    .legal-text h2 {
        font-size: 1.5rem;
    }
    
    .legal-text h3 {
        font-size: 1.25rem;
    }
    
    .legal-text h4 {
        font-size: 1.1rem;
    }
    
    .legal-text p {
        text-align: left;
    }
}

/* Footer Legal Links */
.footer-legal-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.footer-legal-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

[class*="col-"] {
    max-width: 100%;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.shadow-custom {
    box-shadow: var(--shadow-lg);
}

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

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