/* Reset y Variables CSS */
:root {
    --primary-color: #4A90E2;
    --primary-dark: #357ABD;
    --secondary-color: #6C7B7F;
    --accent-color: #00C851;
    --text-dark: #2C3E50;
    --text-light: #6C757D;
    --background-light: #F8F9FA;
    --background-white: #FFFFFF;
    --border-light: #E9ECEF;
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-white);
}

/* Justificación de texto para párrafos */
p {
    text-align: justify;
    text-justify: inter-word;
}

/* Excepciones - elementos que NO deben estar justificados */
h1, h2, h3, h4, h5, h6,
.nav-link,
.btn,
.hero-title,
.hero-subtitle,
.section-title,
.section-subtitle,
.card-title,
.card-doctor,
.doctor-name,
.author-name,
.author-service,
.footer-title,
.contact-item,
.stat-label,
.stat-text,
.badge-text,
.apertura-badge,
.testimonios-header p,
.servicios-header p,
.section-header p,
.cta-title,
.cta-subtitle,
.hero.internal-page .hero-subtitle {
    text-align: inherit;
}

/* Justificación para listas con texto largo */
li {
    text-align: justify;
    text-justify: inter-word;
}

/* Excepciones para listas de navegación */
.nav-menu li,
.footer-links li,
.servicios-tabs li {
    text-align: inherit;
}

/* Excepciones para elementos centrados */
.text-center,
.text-center p,
.text-center li,
.hero.internal-page .hero-content,
.testimonios-header,
.servicios-header,
.section-header,
.cta-content,
.apertura-content {
    text-align: center;
}

.text-center p,
.text-center li {
    text-align: center !important;
}

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



/* Header y Navegación */
.header {
    background: var(--background-white);
    box-shadow: var(--shadow-light);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition);
}



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

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

.logo {
    height: 40px;
    width: auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 3px 0;
    transition: var(--transition);
}

/* Hero Section - Nuevo Diseño */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #f8f9fa 100%);
    padding-top: 80px; /* Espacio para header */
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(74, 144, 226, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(74, 144, 226, 0.05) 0%, transparent 50%);
    background-size: 400px 400px;
    animation: float 20s ease-in-out infinite;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(74, 144, 226, 0.2);
    margin-bottom: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-color);
}

.badge-icon {
    font-size: 1.2rem;
}

.hero-title {
    margin-bottom: 2rem;
}

.title-highlight {
    display: block;
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.title-main {
    display: block;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.1;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.stat-text {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
    margin-top: 0.25rem;
}

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

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 4px 20px rgba(74, 144, 226, 0.3);
    transition: all 0.3s ease;
}

.btn-cta:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(74, 144, 226, 0.4);
}

.btn-phone {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    color: var(--text-dark);
    padding: 1rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    border: 2px solid var(--border-light);
    transition: all 0.3s ease;
}

.btn-phone:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
}

.medical-cross {
    position: relative;
    width: 120px;
    height: 120px;
}

.cross-vertical, .cross-horizontal {
    position: absolute;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 10px;
}

.cross-vertical {
    width: 30px;
    height: 120px;
    left: 50%;
    transform: translateX(-50%);
}

.cross-horizontal {
    width: 120px;
    height: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
}

.element {
    position: absolute;
    font-size: 2rem;
    animation: float 6s ease-in-out infinite;
}

.element-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.element-2 {
    top: 20%;
    right: 10%;
    animation-delay: 1.5s;
}

.element-3 {
    bottom: 20%;
    left: 20%;
    animation-delay: 3s;
}

.element-4 {
    bottom: 10%;
    right: 20%;
    animation-delay: 4.5s;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

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

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

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

.btn-outline:hover {
    background: var(--background-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

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

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
}

/* Hero para páginas internas */
.hero.internal-page {
    min-height: 60vh;
    padding: 120px 0 60px;
}

.hero.internal-page .hero-content {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero.internal-page .hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero.internal-page .hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 0;
}

.hero.internal-page .hero-image {
    text-align: center;
}

.hero.internal-page .hero-image img {
    width: 100%;
    max-width: 500px;
    height: 300px;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
}

.hero.internal-page .hero-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* Stats Section */
.stats {
    padding: 60px 0;
    background: var(--primary-color);
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 1rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

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

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

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Servicios Destacados - Nuevo Diseño */
.servicios-destacados {
    padding: 80px 0;
    background: var(--background-white);
}

.servicios-header {
    text-align: center;
    margin-bottom: 3rem;
}

.servicios-header h2 {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.servicios-header p {
    font-size: 1.2rem;
    color: var(--text-light);
}

.servicios-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: white;
    border: 2px solid var(--border-light);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn:hover,
.tab-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.servicios-content {
    max-width: 800px;
    margin: 0 auto;
    min-height: 300px;
    position: relative;
}

.tab-content {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.tab-content.active {
    display: block;
    position: relative;
    opacity: 1;
    transform: translateY(0);
}

.tab-content.initial-load {
    animation: fadeInUp 0.5s ease-out;
}

.tab-content.fade-in {
    animation: slideInRight 0.4s ease-out;
}

.tab-content.fade-out {
    animation: fadeOut 0.3s ease-in;
}

.servicio-item {
    background: var(--background-light);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

.servicio-item:hover {
    background: white;
    box-shadow: var(--shadow-light);
    transform: translateX(5px);
}

.servicio-info h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.servicio-info p {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.doctor-name {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 500;
}

.btn-servicio {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-servicio:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

/* Próxima Apertura */
.proxima-apertura {
    padding: 60px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    text-align: center;
}

.apertura-content {
    max-width: 600px;
    margin: 0 auto;
}

.apertura-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

.apertura-content h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.apertura-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.apertura-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.8;
}

.apertura-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

/* Testimonios */
.testimonios {
    padding: 80px 0;
    background: var(--background-light);
}

.testimonios-header {
    text-align: center;
    margin-bottom: 4rem;
}

.testimonios-header h2 {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.testimonios-header p {
    font-size: 1.2rem;
    color: var(--text-light);
}

.testimonios-slider {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    min-height: 280px;
    padding: 0 1rem;
}

.testimonio {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.5s ease;
}

.testimonio.active {
    opacity: 1;
    transform: translateX(0);
}

.testimonio-content {
    background: white;
    padding: 2.5rem 2.5rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.testimonio-content:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.testimonio-text {
    font-size: 1.2rem;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 2.5rem;
    font-style: italic;
}

.testimonio-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.author-avatar {
    font-size: 3rem;
    width: 60px;
    height: 60px;
    background: var(--background-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.author-service {
    font-size: 0.9rem;
    color: var(--primary-color);
}

.testimonios-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    margin-top: 2.5rem;
    padding: 0 2rem;
}

.control-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.2);
}

.control-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.control-btn:active {
    transform: translateY(0);
}

.control-dots {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-light);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.dot:hover {
    background: var(--primary-color);
    opacity: 0.7;
}

.dot.active {
    background: var(--primary-color);
    transform: scale(1.3);
    border-color: rgba(74, 144, 226, 0.3);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.testimonios-actions {
    text-align: center;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.testimonios-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 30px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.testimonios-actions .btn-outline {
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    background: transparent;
}

.testimonios-actions .btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.testimonios-actions .btn-outline:active {
    transform: translateY(-1px);
}

/* Equipo Médico */
.equipo {
    padding: 80px 0;
    background: var(--background-light);
}

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

.doctor-card {
    background: var(--background-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

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

.doctor-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
}

.doctor-info {
    padding: 1.5rem;
    text-align: center;
}

.doctor-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.doctor-specialty {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 1rem;
}

.doctor-description {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Instalaciones Gallery */
.instalaciones {
    padding: 80px 0;
    background: var(--background-light);
}

.instalaciones-gallery {
    margin-top: 3rem;
}

.gallery-main {
    position: relative;
    margin-bottom: 2rem;
}

.gallery-container {
    width: 100%;
    height: 600px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    position: relative;
}

.gallery-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease;
}

.gallery-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
}

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

.gallery-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    pointer-events: none;
}

.gallery-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: var(--primary-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: all;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.gallery-btn:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.gallery-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.gallery-thumbnails {
    margin-bottom: 1.5rem;
}

.thumbnails-container {
    overflow: hidden;
    border-radius: 10px;
}

.thumbnails-track {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.thumbnails-track::-webkit-scrollbar {
    height: 6px;
}

.thumbnails-track::-webkit-scrollbar-track {
    background: var(--background-light);
    border-radius: 3px;
}

.thumbnails-track::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.thumbnail {
    min-width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.thumbnail:hover {
    transform: scale(1.05);
    border-color: var(--primary-color);
}

.thumbnail.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.3);
}

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

.gallery-counter {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 500;
}

.gallery-counter span {
    color: var(--primary-color);
    font-weight: 600;
}

/* CTA Section */
.cta {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    text-align: center;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

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

.cta .btn-primary {
    background: white;
    color: var(--primary-color);
    border-color: white;
}

.cta .btn-primary:hover {
    background: var(--background-light);
    transform: translateY(-2px);
}

.cta .btn-outline {
    color: white;
    border-color: white;
}

.cta .btn-outline:hover {
    background: white;
    color: var(--primary-color);
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 60px 0 20px;
}

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

.footer-section h3.footer-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: white;
}

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

.footer-logo .logo-text {
    color: white;
}

.footer-description {
    color: #B0BEC5;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: #B0BEC5;
}

.contact-item i {
    color: var(--primary-color);
    margin-top: 0.2rem;
    width: 16px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: #B0BEC5;
    text-decoration: none;
    transition: var(--transition);
}

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

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

.footer-quote {
    margin-top: 0.5rem;
    font-style: italic;
    font-size: 0.9rem;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

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

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--background-white);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: var(--shadow-light);
        padding: 2rem 0;
        gap: 1rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

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

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

    .hero-description {
        font-size: 1.1rem;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        height: 300px;
    }

    .medical-cross {
        width: 80px;
        height: 80px;
    }

    .cross-vertical {
        width: 20px;
        height: 80px;
    }

    .cross-horizontal {
        width: 80px;
        height: 20px;
    }

    .servicios-tabs {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        max-width: 600px;
        margin: 0 auto;
    }

    .tab-btn {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .servicios-content {
        min-height: 250px;
    }

    .servicio-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .testimonios-controls {
        gap: 1.5rem;
        margin-top: 2rem;
        padding: 0 1rem;
    }

    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .testimonios-slider {
        padding: 0 0.5rem;
        min-height: 320px;
    }

    .testimonio-content {
        padding: 1.5rem;
    }

    .testimonios-actions {
        margin-top: 2rem;
        padding-top: 1rem;
    }

    .testimonios-actions .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    /* Hero páginas internas responsive */
    .hero.internal-page .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

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

    .hero.internal-page .hero-image img {
        height: 250px;
    }

    .hero.internal-page .hero-buttons {
        justify-content: center;
    }

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

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

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

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

    .gallery-container {
        height: 400px;
    }

    .gallery-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .thumbnail {
        min-width: 60px;
        height: 45px;
    }

    .gallery-counter {
        font-size: 1rem;
    }

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

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

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

    .footer-social {
        justify-content: center;
    }

    .contact-item {
        justify-content: center;
    }
}

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

    .nav-container {
        padding: 0 15px;
    }

    .hero {
        padding: 100px 0 60px;
    }

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

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

    .stat-number {
        font-size: 2.5rem;
    }

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

    .especialidad-card,
    .doctor-card {
        margin: 0 10px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .servicios-tabs {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .tab-btn {
        font-size: 0.85rem;
        padding: 0.6rem 1rem;
    }

    .servicios-content {
        min-height: 200px;
    }


}

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

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

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

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

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

/* Utilidades */
.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* Estados de carga */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Accesibilidad */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus states para accesibilidad */
.btn:focus,
.nav-link:focus,
.social-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Smooth scrolling para navegadores que no lo soportan */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}
