/* Variables responsivas */
:root {
    --header-height: 80px;
    --mobile-header-height: 70px;
    --mobile-padding: 1rem;        /* 16px de espacio */
    --mobile-small-padding: 1.5rem;
}

/* Header responsive */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition-smooth);
    height: var(--header-height);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0.75rem;
    height: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: logoGlow 3s ease-in-out infinite alternate;
    z-index: 1001;
}

/* Menú desktop */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-link {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    position: relative;
    transition: var(--transition-smooth);
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: var(--medical-blue);
    transform: translateY(-2px);
}

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

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

/* Botón hamburguesa */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    transition: var(--transition-smooth);
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background: var(--medical-blue);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Animación del botón hamburguesa */
.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Menú móvil */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 2rem;
    gap: 2rem;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 500;
    padding: 1rem 2rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition-smooth);
    min-width: 200px;
    justify-content: flex-start;
}

.mobile-menu-link:hover {
    background: rgba(37, 99, 235, 0.3);
    transform: translateX(10px) scale(1.05);
    border-color: var(--medical-blue);
}

.mobile-menu-link i {
    font-size: 1.1rem;
    width: 20px;
}

/* Botón CTA en móvil */
.mobile-cta {
    margin-top: 1rem;
    min-width: 250px;
    justify-content: center;
    background: var(--gradient-primary) !important;
    border: none !important;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
}

.mobile-cta:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.4);
}

/* Redes sociales móvil */
.mobile-social {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.2rem;
    transition: var(--transition-smooth);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-social-link:hover {
    background: var(--medical-blue);
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

/* Clases de visibilidad */
.desktop-only {
    display: inline-flex;
}

.mobile-only {
    display: none;
}

/* RESPONSIVE BREAKPOINTS */

/* Tablets grandes (1024px y menos) */
@media (max-width: 1024px) {
    .container {
        padding: 0 2rem;
    }

    .nav-menu {
        gap: 1.5rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Tablets (768px y menos) */
@media (max-width: 768px) {
    :root {
        --header-height: var(--mobile-header-height);
    }

    .header {
        height: var(--mobile-header-height);
    }

    .nav {
        padding: 1rem 0.75rem;
    }

    .nav-menu {
        display: none;
    }

    .desktop-only {
        display: none;
    }

    .mobile-only {
        display: inline-flex;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .logo {
        font-size: 1.1rem;
    }

    /* Hero responsive */
    .hero {
        padding: 3rem 0;
        min-height: 70vh;
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }

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

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .floating-element {
        display: none; /* Ocultar elementos decorativos en móvil */
    }

    /* Secciones responsive */
    .services {
        padding: 3rem 0;
    }

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

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

    .service-card {
        margin: 0 1rem;
    }

    .service-card:hover {
        transform: translateY(-10px) scale(1.05) !important;
    }

    /* About responsive */
    .about {
        padding: 3rem 0;
    }

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

    .about-text h2 {
        font-size: 2rem;
    }

    .about-image {
        width: 200px;
        height: 200px;
    }

    .about-image i {
        font-size: 5rem;
    }
}

/* Móviles pequeños (480px y menos) */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .header {
        height: 60px;
    }

    .nav {
        padding: 1rem 0.75rem;
    }

    .logo {
        font-size: 1rem;
    }

    .mobile-menu-btn {
        width: 25px;
        height: 20px;
    }

    .hamburger-line {
        height: 2px;
    }

    .hero {
        padding: 2rem 0;
        min-height: 60vh;
    }

    .hero-title {
        font-size: clamp(1.5rem, 7vw, 2.5rem);
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .services {
        padding: 2rem 0;
    }

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

    .service-card {
        padding: 1.5rem;
        margin: 0;
    }

    .service-icon {
        font-size: 2.5rem;
    }

    .mobile-menu-content {
        gap: 1.5rem;
        padding: 1rem;
    }

    .mobile-menu-link {
        font-size: 1.1rem;
        padding: 0.75rem 1.5rem;
        min-width: 180px;
    }

    .mobile-cta {
        min-width: 200px;
        padding: 0.75rem 1rem;
    }
}

/* Móviles muy pequeños (320px y menos) */
@media (max-width: 320px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .nav {
        padding: 1rem 0.75rem;
    }

    .mobile-menu-link {
        min-width: 160px;
        font-size: 1rem;
    }

    .mobile-cta {
        min-width: 180px;
    }

    .service-card {
        padding: 1rem;
    }
}