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

:root {
    --primary-color: #1a4d6e;
    --secondary-color: #2c5f8d;
    --accent-color: #3d7ba8;
    --green-primary: #2d9a7a;
    --green-secondary: #4ab89a;
    --green-light: #6bc4a8;
    --green-dark: #1e7a5f;
    --text-dark: #1a1a1a;
    --text-light: #4a4a4a;
    --bg-light: #f5f5f5;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.12);
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    overflow-x: hidden;
}

body.loading {
    overflow: hidden;
}

/* Loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

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

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(45, 154, 122, 0.1);
    border-top-color: var(--green-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
    position: relative;
}

.loader-spinner::after {
    content: '';
    position: absolute;
    width: 44px;
    height: 44px;
    border: 3px solid transparent;
    border-top-color: var(--green-secondary);
    border-radius: 50%;
    top: 4px;
    left: 4px;
    animation: spin 0.8s linear infinite reverse;
}

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

.loader-text {
    color: var(--green-dark);
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 1px;
    margin-top: 1rem;
    animation: fadeInOut 1.5s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

.loader-logo {
    width: 80px;
    height: auto;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 0.9;
        transform: scale(1);
    }
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    letter-spacing: -0.5px;
}

/* Header y Navegación */
header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.5rem 0; /* Reducido el padding vertical */
    overflow: hidden; /* Evita desbordamiento */
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: row; /* Cambiado de column a row */
    align-items: center; /* Centrado verticalmente */
    padding: 0.5rem 2rem; /* Reducido el padding vertical */
    gap: 2rem; /* Aumentado el espacio entre el logo y los enlaces */
    position: relative;
    flex-wrap: nowrap; /* Evita saltos de línea */
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.logo img {
    height: 50px; /* Reducido de 60px a 50px */
    width: auto;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--green-dark);
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.2rem; /* Reducido de 2rem a 1.2rem */
    align-items: center;
    width: 100%;
    justify-content: flex-start; /* Cambiado de space-between a flex-start */
    flex-wrap: nowrap; /* Cambiado de wrap a nowrap */
    background: transparent; /* Eliminado el fondo para mejor integración */
    padding: 0.5rem 0; /* Reducido el padding */
    border-radius: 0;
    box-shadow: none;
    border: none;
    white-space: nowrap; /* Evita saltos de línea */
    overflow-x: auto; /* Permite scroll horizontal si es necesario */
    -webkit-overflow-scrolling: touch; /* Mejor desplazamiento en móviles */
    scrollbar-width: none; /* Oculta la barra de desplazamiento en Firefox */
}

/* Oculta la barra de desplazamiento en Chrome, Safari y Edge */
.nav-links::-webkit-scrollbar {
    display: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
    font-size: 0.9rem; /* Reducido el tamaño de fuente */
    white-space: nowrap; /* Evita saltos de línea en los enlaces */
    padding: 0.3rem 0.5rem; /* Añadido padding para mejor clic */
}

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

.whatsapp-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--green-primary);
    font-weight: 500;
    transition: color 0.3s;
}

.whatsapp-nav:hover {
    color: var(--green-secondary);
}

.whatsapp-nav svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.whatsapp-nav span {
    display: none;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1001;
    padding: 0.5rem;
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Overlay para menú móvil */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-primary) 100%);
    color: var(--white);
    padding: 0;
    position: relative;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    align-items: center;
    font-family: 'Poppins', sans-serif;
}

.hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    display: block;
}

.hero-slide.active {
    opacity: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 122, 95, 0.6) 0%, rgba(45, 154, 122, 0.4) 100%);
    z-index: 1;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 2rem;
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-text {
    text-align: left;
    max-width: 600px;
}

.hero h1 {
    font-size: 3.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    animation: fadeInLeft 1s ease;
    text-align: left;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero p {
    font-size: 1.4rem;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInLeft 1s ease 0.2s both;
    text-align: left;
}

.cta-button {
    display: inline-block;
    padding: 0.9rem 2.2rem;
    background: var(--green-primary);
    color: var(--white);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.5px;
    border: 2px solid var(--green-primary);
    transition: all 0.3s ease;
    animation: fadeInLeft 1s ease 0.4s both;
}

.cta-button:hover {
    background: var(--green-secondary);
    color: var(--white);
    border-color: var(--green-secondary);
}

/* Secciones */
section {
    padding: 5rem 2rem;
}

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

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--green-dark);
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--green-primary);
    margin: 1.5rem auto;
}

/* Misión y Visión */
.card {
    background: var(--white);
    padding: 1.75rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid rgba(45, 154, 122, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--green-primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(45, 154, 122, 0.15);
    transform: translateY(-4px);
    border-color: rgba(45, 154, 122, 0.2);
}

.card:hover::before {
    transform: scaleY(1);
}

.card-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--green-primary) 0%, var(--green-secondary) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(45, 154, 122, 0.2);
}

.card h3 {
    color: var(--green-dark);
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.card p {
    color: var(--text-light);
    line-height: 1.7;
    font-size: 0.95rem;
}

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

.service-card {
    background: var(--white);
    padding: 1.75rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    text-align: left;
    transition: all 0.3s ease;
    border: 1px solid rgba(45, 154, 122, 0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--green-primary) 0%, var(--green-secondary) 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover {
    box-shadow: 0 8px 24px rgba(45, 154, 122, 0.15);
    transform: translateY(-4px);
    border-color: rgba(45, 154, 122, 0.2);
}

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

.service-card .card-icon {
    margin: 0 0 1rem 0;
    font-size: 0.85rem;
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--green-primary) 0%, var(--green-secondary) 100%);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(45, 154, 122, 0.2);
}

.service-card h3 {
    color: var(--green-dark);
    margin: 0 0 0.75rem 0;
    font-size: 1.25rem;
    text-align: left;
    font-weight: 600;
}

.service-card p {
    color: var(--text-light);
    text-align: left;
    line-height: 1.65;
    font-size: 0.9rem;
    flex-grow: 1;
    margin-bottom: 0;
}

/* Por qué elegirnos */
.why-us {
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-primary) 100%);
    color: var(--white);
}

.why-us .section-title {
    color: var(--white);
}

.why-us .section-title::after {
    background: rgba(255,255,255,0.8);
}

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

.feature {
    text-align: left;
    padding: 2.5rem;
    background: rgba(255,255,255,0.08);
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.15);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

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

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

.feature:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.3);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.15) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.5px;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1;
}

.feature:hover .feature-icon {
    background: linear-gradient(135deg, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0.25) 100%);
    transform: rotate(5deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.feature h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    transition: color 0.3s ease;
    position: relative;
    z-index: 1;
}

.feature:hover h3 {
    color: rgba(255,255,255,1);
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.feature p {
    opacity: 0.9;
    line-height: 1.8;
    transition: opacity 0.3s ease;
    position: relative;
    z-index: 1;
}

.feature:hover p {
    opacity: 1;
}

/* Estadísticas */
.stats-section {
    background: var(--bg-light);
    padding: 4rem 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
    padding: 2rem;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: bold;
    color: var(--green-primary);
    font-family: 'Poppins', sans-serif;
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

.stat-number.animate {
    animation: statPulse 0.5s ease;
}

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

.stat-label {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Equipo Médico */
.team-section {
    background: var(--white);
}

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

.team-card {
    background: var(--white);
    padding: 1.75rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid rgba(45, 154, 122, 0.1);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--green-primary) 0%, var(--green-secondary) 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.team-card:hover {
    box-shadow: 0 8px 24px rgba(45, 154, 122, 0.15);
    transform: translateY(-4px);
    border-color: rgba(45, 154, 122, 0.2);
}

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

.team-card-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1.5rem;
    display: block;
    border: 4px solid var(--green-primary);
    box-shadow: 0 4px 12px rgba(45, 154, 122, 0.2);
    transition: transform 0.3s ease;
}

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

.team-card h3 {
    color: var(--green-dark);
    font-size: 1.3rem;
    margin: 0 0 0.5rem;
    font-weight: 600;
}

.team-card .specialty {
    color: var(--green-primary);
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.team-card .credentials {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Certificaciones */
.certifications-section {
    background: var(--bg-light);
}

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

.cert-item {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid rgba(45, 154, 122, 0.1);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cert-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--green-primary) 0%, var(--green-secondary) 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.cert-item:hover {
    box-shadow: 0 8px 24px rgba(45, 154, 122, 0.15);
    transform: translateY(-4px);
    border-color: rgba(45, 154, 122, 0.2);
}

.cert-item:hover::before {
    transform: scaleY(1);
}

.cert-item .card-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 0.75rem;
    font-size: 0.9rem;
}

.cert-item h4 {
    color: var(--green-dark);
    font-size: 1.1rem;
    margin-top: 0.75rem;
    font-weight: 600;
}

.cert-item p {
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Proceso */
.process-section {
    background: var(--white);
}

.process-steps {
    max-width: 900px;
    margin: 3rem auto 0;
}

.process-step {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: flex-start;
}

.process-step:nth-child(even) {
    flex-direction: row-reverse;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--green-primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 4px;
    border-left: 4px solid var(--green-primary);
}

.step-content h3 {
    color: var(--green-dark);
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--text-light);
    line-height: 1.7;
}

/* Testimonios */
.testimonials-section {
    background: var(--bg-light);
}

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

.testimonial-card {
    background: var(--white);
    padding: 1.75rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid rgba(45, 154, 122, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--green-primary) 0%, var(--green-secondary) 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.testimonial-card:hover {
    box-shadow: 0 8px 24px rgba(45, 154, 122, 0.15);
    transform: translateY(-4px);
    border-color: rgba(45, 154, 122, 0.2);
}

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

.testimonial-text {
    color: var(--text-light);
    font-style: italic;
    line-height: 1.7;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.testimonial-author {
    color: var(--green-dark);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Preguntas Frecuentes */
.faq-section {
    background: var(--white);
}

.faq-container {
    max-width: 800px;
    margin: 3rem auto 0;
}

.faq-item {
    background: var(--bg-light);
    margin-bottom: 1rem;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.faq-question {
    padding: 1.5rem;
    color: var(--green-dark);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.faq-question:hover {
    background: rgba(45, 154, 122, 0.1);
}

.faq-answer {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-light);
    line-height: 1.7;
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

/* Instalaciones */
.facilities-section {
    background: var(--bg-light);
}

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

.facility-item {
    background: var(--white);
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    text-align: center;
    border: 1px solid rgba(45, 154, 122, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.facility-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--green-primary) 0%, var(--green-secondary) 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    z-index: 2;
}

.facility-item:hover {
    box-shadow: 0 8px 24px rgba(45, 154, 122, 0.15);
    transform: translateY(-4px);
    border-color: rgba(45, 154, 122, 0.2);
}

.facility-item:hover::before {
    transform: scaleX(1);
}

.facility-item-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

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

.facility-item-content {
    padding: 1.5rem 1.75rem 1.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.facility-item h4 {
    color: var(--green-dark);
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.facility-item p {
    color: var(--text-light);
    margin-top: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Footer */
footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 3rem 2rem 1rem;
}

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

.footer-section h3 {
    margin-bottom: 1.25rem;
    color: var(--white);
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.footer-section p,
.footer-section a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    line-height: 2;
}

.footer-section a:hover {
    color: var(--white);
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
}

/* Formulario de Contacto */
.contact-form-section {
    background: var(--white);
    padding: 5rem 2rem;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-form {
    background: var(--bg-light);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--green-primary);
    box-shadow: 0 0 0 3px rgba(45, 154, 122, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-submit {
    background: var(--green-primary);
    color: var(--white);
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.form-submit:hover {
    background: var(--green-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 154, 122, 0.3);
}

.contact-info-box {
    background: var(--bg-light);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.contact-info-box h3 {
    color: var(--green-dark);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

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

.info-icon {
    width: 40px;
    height: 40px;
    background: var(--green-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    flex-shrink: 0;
}

.info-content h4 {
    color: var(--green-dark);
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.info-content p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Mapa */
.map-section {
    background: var(--bg-light);
    padding: 0;
    height: 450px;
}

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

/* Galería */
.gallery-section {
    background: var(--white);
}

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

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 4/3;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

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

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

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

.gallery-title {
    color: var(--white);
    font-weight: 600;
    font-size: 1.1rem;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.lightbox-content img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    font-weight: bold;
}

/* Botón Más Detalles en Tarjetas de Servicios y Tecnología */
.service-detail-btn,
.tech-detail-btn {
    margin-top: auto;
    padding: 0.6rem 1.5rem;
    background: var(--green-primary);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.service-detail-btn:hover,
.tech-detail-btn:hover {
    background: var(--green-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 154, 122, 0.3);
}

/* Modal de Servicios */
.service-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-modal.active {
    display: flex;
    opacity: 1;
}

.service-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.service-modal-content {
    position: relative;
    background: var(--white);
    border-radius: 16px;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    z-index: 10002;
}

.service-modal.active .service-modal-content {
    transform: scale(1);
}

.service-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: var(--text-dark);
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    font-weight: bold;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
}

.service-modal-close:hover {
    background: var(--bg-light);
    color: var(--green-primary);
}

.service-modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 2px solid var(--bg-light);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.service-modal-icon {
    width: 50px;
    height: 50px;
    background: var(--green-primary);
    color: var(--white);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.service-modal-header h2 {
    color: var(--green-dark);
    margin: 0;
    font-size: 1.75rem;
    line-height: 1.3;
}

.service-modal-body {
    padding: 2rem;
    color: var(--text-dark);
    line-height: 1.8;
}

.service-modal-body p {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.service-modal-body p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .service-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .service-modal-header {
        padding: 1.5rem 1rem 1rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .service-modal-header h2 {
        font-size: 1.4rem;
    }

    .service-modal-body {
        padding: 1.5rem 1rem;
    }

    .service-modal-close {
        top: 0.5rem;
        right: 0.5rem;
    }
}

/* Redes Sociales */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
}

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

.social-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Políticas */
.policies-section {
    background: var(--bg-light);
}

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

.policy-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(45, 154, 122, 0.1);
    transition: all 0.3s ease;
}

.policy-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.policy-card h3 {
    color: var(--green-dark);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.policy-card p {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.policy-link {
    color: var(--green-primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.policy-link:hover {
    color: var(--green-secondary);
}

/* Botón flotante WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    animation: whatsappSlideIn 0.6s ease-out, whatsappPulse 2s ease-in-out infinite 0.6s;
    overflow: visible;
}

.whatsapp-float::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #25D366;
    animation: whatsappRipple 2s ease-out infinite;
    z-index: -1;
}

.whatsapp-float::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #25D366;
    animation: whatsappRipple 2s ease-out infinite 0.5s;
    z-index: -1;
}

.whatsapp-float:hover {
    transform: scale(1.15);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.7);
    animation-play-state: paused;
}

.whatsapp-float svg {
    width: 35px;
    height: 35px;
    fill: white;
    position: relative;
    z-index: 1;
    animation: whatsappIconBounce 2s ease-in-out infinite 0.6s;
}

@keyframes whatsappSlideIn {
    from {
        transform: translateX(100px) scale(0.5);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes whatsappPulse {
    0% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.6), 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

@keyframes whatsappRipple {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

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

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

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

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

/* Animaciones avanzadas para tarjetas y secciones */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

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

/* Clases para animaciones al hacer scroll */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.animate-on-scroll-delay-1 {
    transition-delay: 0.1s;
}

.animate-on-scroll-delay-2 {
    transition-delay: 0.2s;
}

.animate-on-scroll-delay-3 {
    transition-delay: 0.3s;
}

.animate-on-scroll-delay-4 {
    transition-delay: 0.4s;
}

/* Mejoras en animaciones de tarjetas */
.card:not(.animated),
.service-card:not(.animated),
.team-card:not(.animated),
.cert-item:not(.animated),
.testimonial-card:not(.animated),
.facility-item:not(.animated),
.process-step:not(.animated),
.feature:not(.animated),
.stat-item:not(.animated),
.policy-card:not(.animated),
.faq-item:not(.animated) {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
}

.card,
.service-card,
.team-card,
.cert-item,
.testimonial-card,
.facility-item,
.process-step,
.feature,
.stat-item,
.policy-card,
.faq-item {
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card.animated,
.service-card.animated,
.team-card.animated,
.cert-item.animated,
.testimonial-card.animated,
.facility-item.animated,
.process-step.animated,
.feature.animated,
.stat-item.animated,
.policy-card.animated,
.faq-item.animated {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Efectos hover mejorados para tarjetas */
.card:hover,
.service-card:hover,
.team-card:hover,
.cert-item:hover,
.testimonial-card:hover,
.facility-item:hover {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 0 12px 40px rgba(45, 154, 122, 0.2);
}

/* Animación para secciones */
section:not(.animated) {
    opacity: 0;
    transform: translateY(30px);
}

section {
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

section.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Animación para títulos de sección */
.section-title:not(.animated) {
    opacity: 0;
    transform: translateY(-20px);
}

.section-title {
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.section-title.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Prevenir animaciones en carga inicial para elementos críticos */
.hero,
.hero *,
header,
header * {
    animation: none !important;
}

/* Responsive */
@media (max-width: 968px) {
    .hero-content {
        text-align: center;
    }

    .hero-text {
        text-align: center;
        max-width: 100%;
    }

    .hero h1,
    .hero p {
        text-align: center;
    }
}

@media (max-width: 1024px) {
    nav {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .nav-links {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        background: var(--white);
        width: 85%;
        max-width: 400px;
        height: 100vh;
        text-align: left;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
        padding: 5rem 0 2rem;
        z-index: 999;
        overflow-y: auto;
        justify-content: flex-start;
    }

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

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid rgba(45, 154, 122, 0.1);
    }

    .nav-links li:last-child {
        border-bottom: none;
        padding-top: 1rem;
        margin-top: 1rem;
        border-top: 2px solid rgba(45, 154, 122, 0.2);
    }

    .nav-links a {
        display: block;
        padding: 1.25rem 2rem;
        color: var(--text-dark);
        font-weight: 500;
        font-size: 1.05rem;
        transition: all 0.3s ease;
        position: relative;
    }

    .nav-links a::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: var(--green-primary);
        transform: scaleY(0);
        transition: transform 0.3s ease;
    }

    .nav-links a:hover,
    .nav-links a:active {
        background: rgba(45, 154, 122, 0.05);
        color: var(--green-primary);
        padding-left: 2.5rem;
    }

    .nav-links a:hover::before {
        transform: scaleY(1);
    }

    .nav-links .whatsapp-nav {
        justify-content: flex-start;
        padding: 1.25rem 2rem;
        color: var(--green-primary);
    }

    .nav-links .whatsapp-nav span {
        display: inline;
    }

    .nav-links .whatsapp-nav:hover {
        background: rgba(45, 154, 122, 0.05);
        padding-left: 2.5rem;
    }

    .menu-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {

    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-float svg {
        width: 30px;
        height: 30px;
    }

    .hero {
        min-height: auto;
    }

    .hero-content {
        padding: 4rem 1.5rem;
    }

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

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


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

    .services-grid,
    .features-grid,
    .stats-grid,
    .team-grid,
    .certs-grid,
    .testimonials-grid,
    .facilities-grid {
        grid-template-columns: 1fr;
    }

    .process-step {
        flex-direction: column !important;
    }

    .process-step:nth-child(even) {
        flex-direction: column !important;
    }

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

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

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

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

@media (max-width: 480px) {
    nav {
        padding: 0 1rem;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .hero {
        padding: 4rem 1rem;
    }

    section {
        padding: 3rem 1rem;
    }

    .card,
    .service-card {
        padding: 1.5rem;
    }

    .team-card-image {
        width: 120px;
        height: 120px;
    }
}
