/* Variables CSS para Página Médica Profesional */
:root {
    --primary-color: #1B4D8C;         /* Azul médico profesional */
    --primary-light: #4A90E2;         /* Azul claro médico */
    --primary-dark: #0D2A5C;          /* Azul marino oscuro */
    --secondary-color: #2C5282;       /* Azul gris profesional */
    --secondary-light: #63B3ED;       /* Azul suave */
    --secondary-dark: #1A365D;        /* Azul corporativo */
    --white: #ffffff;
    --off-white: #FAFAFA;             /* Blanco ligeramente gris */
    --light-gray: #F7FAFC;            /* Gris muy claro */
    --gray-100: #EDF2F7;              /* Gris claro */
    --gray-300: #CBD5E0;              /* Gris medio */
    --gray-500: #718096;              /* Gris */
    --gray-700: #4A5568;              /* Gris oscuro */
    --glass-bg: rgba(255, 255, 255, 0.95);     /* Fondo glass profesional */
    --glass-border: rgba(27, 77, 140, 0.15);   /* Borde azul sutil */
    --text-dark: #2D3748;             /* Texto principal oscuro */
    --text-light: #718096;            /* Texto secundario */
    --text-medium: #4A5568;           /* Texto medio */
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.12);
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
    --gradient-background: linear-gradient(135deg, #F7FAFC 0%, #EDF2F7 50%, #E2E8F0 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Moved from :root block */
.section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--primary-color); /* Fallback para navegadores que no soportan background-clip */
}

/* Reset y configuración base */
* {
    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);
    min-height: 100vh;
    position: relative;
    background: linear-gradient(-45deg, #2E8B8B, #4A90E2, #20B2AA, #48CAE4);
    background-size: 400% 400%;
    animation: gradientShift 30s ease infinite;
    overflow-x: hidden;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(32, 178, 170, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(74, 144, 226, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(72, 202, 228, 0.08) 0%, transparent 50%);
    z-index: -2;
    pointer-events: none;
    animation: pulse 8s ease-in-out infinite alternate;
}

@keyframes pulse {
    0% {
        opacity: 0.3;
        transform: scale(1);
    }
    100% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 100% 50%;
    }
    50% {
        background-position: 100% 100%;
    }
    75% {
        background-position: 0% 100%;
    }
    100% {
        background-position: 0% 50%;
    }
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.3)"><animate attributeName="opacity" values="0.3;0.8;0.3" dur="3s" repeatCount="indefinite"/></circle><circle cx="80" cy="30" r="1.5" fill="rgba(255,255,255,0.2)"><animate attributeName="opacity" values="0.2;0.6;0.2" dur="4s" repeatCount="indefinite"/></circle><circle cx="60" cy="70" r="1" fill="rgba(255,255,255,0.4)"><animate attributeName="opacity" values="0.4;0.9;0.4" dur="2.5s" repeatCount="indefinite"/></circle><circle cx="30" cy="80" r="0.8" fill="rgba(255,255,255,0.3)"><animate attributeName="opacity" values="0.3;0.7;0.3" dur="3.5s" repeatCount="indefinite"/></circle></svg>') repeat;
    background-size: 200px 200px;
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
    animation: floatParticles 20s linear infinite;
}

@keyframes floatParticles {
    0% {
        transform: translateY(0px) translateX(0px);
    }
    25% {
        transform: translateY(-10px) translateX(5px);
    }
    50% {
        transform: translateY(-5px) translateX(-3px);
    }
    75% {
        transform: translateY(-15px) translateX(2px);
    }
    100% {
        transform: translateY(0px) translateX(0px);
    }
}

/* Clase base para el efecto Aero Glass */
.glass-container {
    background: var(--gradient-glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px var(--shadow-light);
    transition: all 0.3s ease;
}

.glass-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px var(--shadow-medium);
    border-color: var(--primary-light);
}

/* Contenedor principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navegación con efecto Aero Glass */
.glass-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(27, 77, 140, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo {
    height: 40px;
    width: auto;
}

.nav-title {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--white);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.hero-content {
    padding: 3rem;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
}

.hero-content h1 br {
    display: block;
    margin-bottom: 0.2rem;
}

.hero-content h1 strong {
    font-weight: 700;
    display: block;
    margin-top: 0.3rem;
}

.hero-content p {
    font-size: 1.3rem;
    color: var(--text-medium);
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Botones */
.btn-primary, .btn-secondary {
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 15px var(--shadow-light);
}

.btn-primary:hover {
    background: var(--gradient-secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-medium);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.25);
    color: var(--text-dark);
    border: 2px solid var(--primary-light);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--primary-light);
    color: var(--white);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Secciones */
.section {
    padding: 5rem 0;
}

.section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-content {
    padding: 3rem;
    margin: 2rem 0;
}

.section-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
    text-align: justify;
}

/* Grid de servicios */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.service-card {
    padding: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.service-card:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 50px rgba(27, 77, 140, 0.2);
}

.service-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.service-card:hover img {
    transform: scale(1.1);
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-content p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Grid de coberturas */
.coverage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.coverage-card {
    padding: 2rem;
    transition: all 0.3s ease;
}

.coverage-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.coverage-status {
    margin-bottom: 1rem;
    font-weight: 600;
}

.status-active {
    color: var(--primary-color);
    font-weight: 700;
}

.coverage-card p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Mapa */
.map-container {
    margin: 2rem 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.address-info {
    text-align: center;
    margin-top: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Grid de contacto */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.contact-card {
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.contact-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-card p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Footer */
footer {
    margin-top: 3rem;
    padding: 2rem;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo img {
    height: 30px;
    width: auto;
}

.footer-logo span {
    font-weight: 600;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-info p {
    margin: 0;
    color: var(--text-medium);
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(27, 77, 140, 0.15);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 1rem;
        border-radius: 0 0 15px 15px;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .section h2 {
        font-size: 2rem;
    }

    .services-grid,
    .coverage-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .section-content {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 1rem;
    }

    .hero-content {
        padding: 2rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .section-content {
        padding: 1.5rem;
    }

    .contact-card,
    .coverage-card {
        padding: 1.5rem;
    }
}

/* Animaciones adicionales */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-card,
.coverage-card,
.contact-card {
    animation: fadeInUp 0.6s ease forwards;
}

.service-card:nth-child(2) { animation-delay: 0.1s; }
.service-card:nth-child(3) { animation-delay: 0.2s; }
.service-card:nth-child(4) { animation-delay: 0.3s; }
.service-card:nth-child(5) { animation-delay: 0.4s; }
.service-card:nth-child(6) { animation-delay: 0.5s; }
.service-card:nth-child(7) { animation-delay: 0.6s; }
.service-card:nth-child(8) { animation-delay: 0.7s; }
.service-card:nth-child(9) { animation-delay: 0.8s; }

/* Efectos de scroll suave */
html {
    scroll-padding-top: 80px;
}

/* Mejoras en accesibilidad */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus states para accesibilidad */
.nav-menu a:focus,
.btn-primary:focus,
.btn-secondary:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}