/* Variables CSS médicas - Inspirado en Hospital Ángeles */
:root {
    /* Colores médicos principales */
    --medical-primary: #2563eb;
    --medical-secondary: #1e40af;
    --medical-accent: #3b82f6;
    --medical-light: #dbeafe;
    --medical-dark: #1e3a8a;
    /* Gradientes médicos */
    --medical-gradient: linear-gradient(135deg, var(--medical-primary), var(--medical-secondary));
    --medical-gradient-light: linear-gradient(135deg, var(--medical-light), #f8fafc);
    /* Colores neutros médicos */
    --white: #ffffff;
    --light-gray: #f8fafc;
    --gray: #64748b;
    --dark-gray: #334155;
    --darker: #0f172a;
    /* Sombras médicas profesionales */
    --medical-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.1), 0 2px 4px -1px rgba(37, 99, 235, 0.06);
    --medical-shadow-lg: 0 10px 15px -3px rgba(37, 99, 235, 0.1), 0 4px 6px -2px rgba(37, 99, 235, 0.05);
    /* Tipografía médica */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    /* Transiciones suaves */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset y base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--white);
    overflow-x: hidden;
}

/* Tipografía médica profesional */
.section-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--darker);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--gray);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.text-medical {
    color: var(--medical-primary) !important;
}

/* Navegación médica */
.medical-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(37, 99, 235, 0.1);
    padding: 1rem 0;
    transition: var(--transition);
}

    .medical-nav.scrolled {
        background: rgba(255, 255, 255, 0.98);
        box-shadow: var(--medical-shadow);
        padding: 0.5rem 0;
    }

.navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.brand-logo {
    height: 40px;
    margin-right: 0.75rem;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.doctor-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--medical-primary);
    line-height: 1;
}

.speciality {
    font-size: 0.8rem;
    color: var(--gray);
    line-height: 1;
}

.navbar-nav .nav-link {
    color: var(--dark-gray);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: var(--transition);
    position: relative;
}

    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link.active {
        color: var(--medical-primary);
    }

    .navbar-nav .nav-link::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 2px;
        background: var(--medical-gradient);
        transition: var(--transition);
        transform: translateX(-50%);
    }

    .navbar-nav .nav-link:hover::after,
    .navbar-nav .nav-link.active::after {
        width: 80%;
    }

/* Botones médicos */
.btn-medical {
    background: var(--medical-gradient);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--medical-shadow);
}

    .btn-medical:hover {
        background: linear-gradient(135deg, var(--medical-secondary), var(--medical-dark));
        transform: translateY(-2px);
        box-shadow: var(--medical-shadow-lg);
        color: white;
    }

.btn-outline-white {
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: var(--transition);
}

    .btn-outline-white:hover {
        background: white;
        color: var(--medical-primary);
        border-color: white;
        transform: translateY(-2px);
    }

/* Hero Section médica */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: white;
}

.hero-bg-parallax {
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9) 0%, rgba(30, 64, 175, 0.95) 50%, rgba(30, 58, 138, 0.9) 100%), url('https://images.unsplash.com/photo-1559757148-5c350d0d3c56?ixlib=rb-4.0.3&w=1920&q=80') center/cover no-repeat;
    background-attachment: fixed;
    z-index: -2;
}

    /* Patrón médico sutil */
    .hero-bg-parallax::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%), repeating-linear-gradient( 45deg, transparent, transparent 2px, rgba(255, 255, 255, 0.03) 2px, rgba(255, 255, 255, 0.03) 4px );
        z-index: 1;
    }

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}

.medical-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 0.9rem;
    font-weight: 500;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    margin: 2rem auto;
    max-width: 600px;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    display: block;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.9;
}

.hero-actions {
    margin-top: 2rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* About Section */
.about-image {
    position: relative;
}

.experience-badge {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: var(--medical-gradient);
    color: white;
    padding: 1rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: var(--medical-shadow-lg);
}

    .experience-badge .years {
        font-size: 1.5rem;
        font-weight: 700;
        display: block;
        line-height: 1;
    }

    .experience-badge .text {
        font-size: 0.75rem;
        opacity: 0.9;
    }

.credentials {
    list-style: none;
    padding: 0;
}

.credential-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

    .credential-item i {
        font-size: 1rem;
        flex-shrink: 0;
    }

/* Course Cards */
.course-filters {
    margin-bottom: 3rem;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--medical-light);
    color: var(--gray);
    padding: 0.5rem 1.25rem;
    border-radius: 2rem;
    margin: 0.25rem;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
}

    .filter-btn:hover,
    .filter-btn.active {
        background: var(--medical-gradient);
        border-color: var(--medical-primary);
        color: white;
    }

.course-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    position: relative;
    height: 100%;
}

    .course-card:hover {
        transform: translateY(-8px);
        box-shadow: var(--medical-shadow-lg);
    }

    .course-card.featured {
        border: 2px solid var(--medical-primary);
    }

.featured-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.course-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

    .course-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: var(--transition);
    }

.course-card:hover .course-image img {
    transform: scale(1.05);
}

.course-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--medical-gradient);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.course-price {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-weight: 700;
    font-size: 0.9rem;
}

.course-content {
    padding: 1.5rem;
}

.course-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--darker);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.course-description {
    color: var(--gray);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.course-details {
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--gray);
}

    .detail-item i {
        color: var(--medical-primary);
        font-size: 0.9rem;
        width: 16px;
    }

/* Registration Section */
.tech-bg-parallax {
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(30, 64, 175, 0.15) 100%), url('https://images.unsplash.com/photo-1576091160399-112ba8d25d1f?ixlib=rb-4.0.3&w=1920&q=80') center/cover no-repeat;
    opacity: 0.5;
    z-index: -1;
}

.registration-card {
    background: white;
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: var(--medical-shadow-lg);
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.form-control {
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: var(--transition);
    background-color: #fafafa;
}

    .form-control:focus {
        border-color: var(--medical-primary);
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
        outline: none;
        background-color: white;
    }

.form-label {
    font-weight: 600;
    color: var(--darker);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.payment-method {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 2px solid #e2e8f0;
}

.payment-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.payment-option {
    display: flex;
    align-items: center;
}

.payment-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
    margin-left: 0.5rem;
}

    .payment-label:hover {
        border-color: var(--medical-light);
        background: var(--light-gray);
    }

.payment-option input[type="radio"]:checked + .payment-label {
    background: var(--medical-light);
    border-color: var(--medical-primary);
    color: var(--medical-primary);
}

.payment-label img {
    height: 20px;
}

/* Testimonials */
.testimonials-carousel {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.testimonial-slide {
    display: none;
    padding: 2rem;
    background: white;
    border-radius: 1.5rem;
    box-shadow: var(--medical-shadow-lg);
    border-left: 5px solid var(--medical-primary);
}

    .testimonial-slide.active {
        display: block;
    }

.testimonial-image img {
    width: 120px;
    height: 120px;
    object-fit: cover;
}

.testimonial-content {
    padding-left: 2rem;
}

.stars {
    color: #fbbf24;
    font-size: 1.1rem;
}

.testimonial-content blockquote {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--gray);
    margin: 1rem 0;
    line-height: 1.6;
}

.testimonial-author strong {
    color: var(--darker);
    font-size: 1.05rem;
}

.testimonial-author span {
    display: block;
    color: var(--medical-primary);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.testimonial-indicators {
    text-align: center;
    margin-top: 2rem;
}

.indicator-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: #cbd5e1;
    margin: 0 0.25rem;
    cursor: pointer;
    transition: var(--transition);
}

    .indicator-dot.active,
    .indicator-dot:hover {
        background: var(--medical-primary);
    }

/* Contact Section */
.contact-bg-parallax {
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.95) 100%), url('https://images.unsplash.com/photo-1582750433449-648ed127bb54?ixlib=rb-4.0.3&w=1920&q=80') center/cover no-repeat;
    opacity: 0.8;
    z-index: -1;
}

.contact-info {
    height: 100%;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--medical-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-details h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.contact-details p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    line-height: 1.5;
}

.contact-form .form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

    .contact-form .form-control::placeholder {
        color: rgba(255, 255, 255, 0.7);
    }

    .contact-form .form-control:focus {
        background: rgba(255, 255, 255, 0.15);
        border-color: rgba(255, 255, 255, 0.4);
        box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
    }

/* Footer médico */
.bg-darker {
    background-color: var(--darker) !important;
}

.footer-brand {
    display: flex;
    align-items: center;
}

.footer-logo {
    height: 35px;
    filter: brightness(0) invert(1);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

    .footer-links a:hover {
        color: white;
        text-decoration: underline;
    }

.social-links a {
    display: inline-flex;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

    .social-links a:hover {
        background: var(--medical-primary);
        color: white;
        transform: translateY(-2px);
    }

/* Scroll to Top */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--medical-gradient);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    box-shadow: var(--medical-shadow-lg);
}

    .scroll-to-top.show {
        opacity: 1;
        visibility: visible;
    }

    .scroll-to-top:hover {
        background: linear-gradient(135deg, var(--medical-secondary), var(--medical-dark));
        transform: translateY(-3px);
    }

/* Responsive Design */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-stats {
        margin: 1.5rem auto;
    }

    .stat-item {
        margin-bottom: 1rem;
    }

    .testimonial-content {
        padding-left: 0;
        margin-top: 1.5rem;
    }

    .registration-card {
        padding: 1.5rem;
    }

    .payment-options {
        grid-template-columns: 1fr;
    }

    .experience-badge {
        position: static;
        margin-top: 1rem;
        display: inline-block;
    }

    .navbar-brand .brand-text {
        display: none;
    }

    .brand-logo {
        margin-right: 0;
    }

    /* Deshabilitar parallax en móviles para mejor rendimiento */
    .hero-bg-parallax,
    .tech-bg-parallax,
    .contact-bg-parallax {
        background-attachment: scroll !important;
        transform: none !important;
        background-size: cover !important;
        background-position: center center !important;
    }

    /* Ajustar fondos médicos en móvil */
    .hero-bg-parallax {
        background-image: linear-gradient(135deg, rgba(37, 99, 235, 0.9) 0%, rgba(30, 64, 175, 0.95) 100%), url('https://images.unsplash.com/photo-1559757148-5c350d0d3c56?ixlib=rb-4.0.3&w=800&q=60');
    }

    .tech-bg-parallax {
        background-image: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(30, 64, 175, 0.15) 100%), url('https://images.unsplash.com/photo-1576091160399-112ba8d25d1f?ixlib=rb-4.0.3&w=800&q=60');
    }

    .contact-bg-parallax {
        background-image: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.95) 100%), url('https://images.unsplash.com/photo-1582750433449-648ed127bb54?ixlib=rb-4.0.3&w=800&q=60');
    }
}

@media (max-width: 576px) {
    .hero-actions {
        flex-direction: column;
        gap: 1rem;
    }

        .hero-actions .btn {
            width: 100%;
            margin-right: 0 !important;
        }

    .course-filters .filter-btn {
        font-size: 0.85rem;
        padding: 0.4rem 1rem;
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
    }

    .scroll-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

/* Animaciones adicionales */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.animate {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Lazy loading para imágenes */
img[data-src] {
    filter: blur(5px);
    transition: filter 0.3s;
}

img.lazy {
    filter: blur(0);
}

/* Estados de carga */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .scroll-indicator {
        animation: none;
    }
}

/* Focus states para accesibilidad */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 3px solid rgba(37, 99, 235, 0.3);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --medical-primary: #0066cc;
        --medical-secondary: #004499;
        --gray: #333333;
        --dark-gray: #000000;
    }
}

/* Print styles */
@media print {
    .navbar,
    .scroll-to-top,
    .hero-bg-parallax,
    .tech-bg-parallax,
    .contact-bg-parallax {
        display: none !important;
    }

    .hero-section {
        min-height: auto;
        padding: 2rem 0;
    }

    .section-title {
        color: #000 !important;
    }
}
