:root {
    --blue: #0056b3;
    --dark: #2c3e50;
    --light: #ffffff;
    --bg-gray: #f8f9fa;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0; color: var(--dark); background: var(--light);
}

.container { width: 90%; max-width: 1100px; margin: 0 auto; }

header { background: #fff; padding: 20px 0; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 1000; }
nav { display: flex; justify-content: space-between; align-items: center; }
nav ul { display: flex; list-style: none; gap: 25px; margin: 0; }
nav a { text-decoration: none; color: var(--dark); font-weight: 500; transition: 0.3s; }
nav a:hover, nav a.active { color: var(--blue); }

.hero { padding: 100px 0; text-align: center; background: radial-gradient(circle, #fff 0%, #f1f8ff 100%); }
.hero h1 { font-size: 3.5rem; margin: 0; color: var(--blue); }
.hero p { font-size: 1.2rem; color: #666; margin: 20px 0 40px; }

.intro-texto p {
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .section-padding { padding: 50px 0; }
    h1.accent-blue { font-size: 1.8rem !important; }
    .intro-texto { text-align: left !important; font-size: 1rem !important; }
}

/* Estilos Equipo */
.equipo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.fisio-card h3 {
    color: var(--blue);
    margin-bottom: 5px;
    font-size: 1.4rem;
}

.colegiado {
    display: inline-block;
    color: #888;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.lista-estudios {
    list-style: none;
    padding: 0;
}

.lista-estudios li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 12px;
    color: #555;
    line-height: 1.5;
}

/* El detalle azul de la lista */
.lista-estudios li::before {
    content: '•';
    color: var(--blue);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Separadores */
.separador-ligero {
    border: 0;
    border-top: 1px solid #eee;
    margin: 0;
}

/* Responsivo */
@media (max-width: 768px) {
    .equipo-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

.btn { 
    background: var(--blue); color: #fff; padding: 14px 30px; 
    border-radius: 50px; text-decoration: none; font-weight: bold; 
    display: inline-block; transition: 0.3s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,86,179,0.3); }

.lang-switch a { padding: 5px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 0.8rem; }
.lang-active { background: var(--blue); color: #fff !important; border-color: var(--blue); }
.contact-form {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

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

.form-group label { display: block; margin-bottom: 8px; font-weight: 500; }

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box; /* Importante para el ancho */
    font-family: inherit;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    text-align: center;
}
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
/* Grid de Galería */
.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.galeria-item {
    position: relative;
    height: 250px;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.galeria-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Para que todas las imágenes encajen perfectamente */
    transition: transform 0.5s ease;
}

/* Efecto Hover */
.galeria-item:hover img {
    transform: scale(1.1);
}

.overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0, 86, 179, 0.8));
    color: white;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
}

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

.overlay span {
    font-weight: bold;
    font-size: 1.1rem;
}

/* Ajuste para móviles */
@media (max-width: 600px) {
    .galeria-grid {
        grid-template-columns: 1fr;
    }
}
/* Footer Minimalista Renovado */
.main-footer {
    background: #ffffff;
    padding: 30px 0 15px; /* Más bajo en altura */
    border-top: 1px solid #f0f0f0;
    color: #666;
    font-size: 0.85rem;
}

/* Contenedor de columnas con Flexbox */
.footer-flex {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}

/* Cada columna ocupa un espacio proporcional */
.footer-col {
    flex: 1;
    min-width: 200px; /* Evita que se compriman demasiado */
    margin-bottom: 20px;
}

.footer-col.branding { flex: 1.2; } /* Un poco más ancha para el logo */
.footer-col.map-col { flex: 1.2; }  /* Un poco más ancha para el mapa */


.footer-bottom {
    margin-top: 30px;
    padding: 15px 0; /* Padding arriba y abajo */
    border-top: 1px solid #f9f9f9;
    width: 100%;
}

.footer-bottom-flex {
    display: flex !important;
    flex-direction: row !important; /* Fuerza la línea única */
    justify-content: space-between !important;
    align-items: center !important;
    width: 100%;
    font-size: 0.75rem;
    color: #bbb;
}

/* Evitamos que los párrafos o spans hereden márgenes que rompan la línea */
.footer-bottom-flex span, 
.footer-bottom-flex p {
    margin: 0 !important;
    padding: 0 !important;
    display: inline-block;
}

.creado-por a {
    color: #999;
    text-decoration: none;
    font-weight: 600;
}

/* En móviles muy pequeños, si no caben en una línea, se pondrán uno bajo otro */
@media (max-width: 480px) {
    .footer-bottom-flex {
        flex-direction: column !important;
        text-align: center;
        gap: 8px;
    }
}


/* Estilos para el Logo */
.logo img {
    display: block;
    transition: transform 0.3s ease;
}

.logo a:hover img {
    transform: scale(1.05); /* Un pequeño efecto al pasar el ratón */
}

.footer-logo img {
    margin-bottom: 15px;
    filter: brightness(0.9); /* Opcional: un poco más tenue para el footer */
}

/* Ajuste móvil */
@media (max-width: 600px) {
    .logo img {
        height: 50px; /* Un poco más pequeño en móviles */
    }
}

.footer-col h5 {
    color: #333;
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 15px;
    margin-top: 0;
    font-weight: 700;
}

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

.footer-links li { margin-bottom: 5px; }
.footer-links a { color: #777; text-decoration: none; transition: 0.3s; }
.footer-links a:hover { color: var(--blue); }

.info-text p { margin: 3px 0; line-height: 1.4; }

/* Mini Mapa Sutil */
.mini-map-container {
    border-radius: 8px;
    overflow: hidden;
    height: 100px;
    border: 1px solid #eee;
}

.footer-bottom {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f8f8f8;
    text-align: center;
    font-size: 0.75rem;
    color: #aaa;
}

/* Responsive: en móviles se apilan */
@media (max-width: 600px) {
    .footer-flex { flex-direction: column; text-align: center; }
    .footer-col { min-width: 100%; }
}

/* Cuadrícula de Tratamientos */
/* Cuadrícula de Tratamientos Forzada a 3 Columnas */
.tratamientos-grid {
    display: grid;
    /* Forzamos 3 columnas exactas en escritorio */
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px;
}

/* Ajustes de Responsividad */
@media (max-width: 992px) {
    /* En tablets pasamos a 2 columnas para que respire mejor */
    .tratamientos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    /* En móviles 1 sola columna */
    .tratamientos-grid {
        grid-template-columns: 1fr;
    }
}

.tratamiento-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.tratamiento-img {
    width: 100%;
    height: 200px; /* Reducimos un poco la altura para que las 3 fotos queden alineadas */
}

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

.tratamiento-info {
    padding: 25px;
    flex-grow: 1;
}

.tratamiento-info h3 {
    color: var(--blue);
    margin: 0 0 15px 0;
    font-size: 1.25rem;
}

.tratamiento-info p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* Ajuste móvil */
@media (max-width: 480px) {
    .tratamientos-grid {
        grid-template-columns: 1fr;
    }
}


/* Hero Slider con Texto Superpuesto */
.hero-slider {
    position: relative;
    height: 80vh; /* Ocupa el 80% de la altura de la pantalla */
    min-height: 500px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
}

.slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out; /* Transición suave de desvanecimiento */
}

.slide.active { opacity: 1; }

/* Capa oscura para que el texto se lea bien sobre las fotos */
.hero-slider::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Sombra suave */
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3; /* Por encima de las fotos y de la sombra */
    text-align: center;
    color: #fff;
    width: 100%;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    color: #fff !important; /* Forzamos blanco sobre el fondo oscuro */
}

.hero-content p {
    font-size: 1.4rem;
    margin: 20px 0 40px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* Responsivo */
@media (max-width: 768px) {
    .hero-content h1 { font-size: 2.2rem; }
    .hero-content p { font-size: 1.1rem; }
}
/* --- RESPONSIVE HEADER --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* Ocultar idiomas móvil en escritorio */
.mobile-lang { display: none; }

/* Menú Toggle (Hamburguesa) */
.menu-toggle {
    display: none; /* Oculto en escritorio */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.menu-toggle span {
    width: 30px;
    height: 3px;
    background: var(--blue);
    border-radius: 10px;
    transition: all 0.3s linear;
}

/* --- MÓVIL (Max 768px) --- */
@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    .lang-switch-desktop { display: none; }
    .mobile-lang { 
        display: flex; 
        gap: 15px; 
        padding-top: 20px; 
        border-top: 1px solid #eee;
        margin-top: 10px;
    }

    .nav-links {
        display: none; /* Oculto por defecto */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        z-index: 1000;
        box-sizing: border-box;
    }

    .nav-links.active { display: flex; } /* Clase que activaremos con JS */

    .nav-links li {
        margin: 10px 0;
        text-align: center;
    }
}
/* WhatsApp Header */
.whatsapp-header {
    display: inline-flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.whatsapp-header:hover {
    transform: scale(1.15); /* Crece un poquito al pasar el ratón */
}

/* Si quieres que en móvil también aparezca el icono de WhatsApp al lado del menú */
@media (max-width: 768px) {
    .lang-switch-desktop {
        display: flex; /* Lo mostramos pero solo el WhatsApp */
        border: none;
    }
    .lang-switch-desktop a:not(.whatsapp-header) {
        display: none; /* Ocultamos ES/EU que ya están en el menú hamburguesa */
    }
}
/* Botón Flotante WhatsApp - Versión Reforzada */
.whatsapp-float {
    position: fixed !important; /* Forzamos posición fija */
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    box-shadow: 2px 5px 15px rgba(0,0,0,0.3);
    /* Subimos el z-index al máximo para estar por encima de todo */
    z-index: 99999 !important; 
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.whatsapp-float img {
    width: 35px;
    height: 35px;
}

/* Ajuste específico para móviles */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 55px; /* Un poco más grande para que sea fácil de pulsar */
        height: 55px;
        bottom: 20px; /* Lo acercamos un poco más al borde */
        right: 20px;
        z-index: 999999 !important; /* Doble refuerzo para móvil */
    }
    
    .whatsapp-float img {
        width: 30px;
        height: 30px;
    }
}

/* Efecto de pulsación sutil */
@keyframes pulse-whatsapp {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.whatsapp-float {
    animation: pulse-whatsapp 2s infinite;
}

/* Ajuste para móviles (un poco más pequeño para no tapar contenido) */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    .whatsapp-float img {
        width: 28px;
        height: 28px;
    }
}
.footer-legal-links a {
    color: inherit;
    text-decoration: none;
    opacity: 0.75;
}
.footer-legal-links a:hover {
    opacity: 1;
    text-decoration: underline;
}