/* === LANDING PAGE: MEDICAL FUTURISM === */

/* --- BACKGROUND FX --- */
.hero-gradient {
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0) 70%);
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50%;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(circle at top center, black, transparent 80%);
}

/* --- NAV --- */
.nav-fixed {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1100px;
    height: 64px;
    background: rgba(255, 255, 255, 0.85);
    /* Premium Light Glass */
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 100px;
    box-shadow:
        0 10px 30px -10px rgba(0, 0, 0, 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    z-index: 1000;
    padding: 0 1.5rem 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    letter-spacing: -0.02em;
}

.brand-logo .medical-text {
    font-weight: 400;
    color: var(--text-body);
}

.logo-icon {
    font-size: 1.2rem;
    text-shadow: 0 0 15px rgba(96, 165, 250, 0.6);
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-item a {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-body);
    /* Dark text */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    padding: 0.5rem 0;
}

.nav-item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-item a:hover {
    color: var(--primary);
    /* Blue on hover */
}

.nav-item a:hover::after {
    width: 20px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-desktop-btn {
    padding: 0.6rem 1.25rem;
    font-size: 0.8rem;
    background: white;
    color: var(--primary-dark);
    font-weight: 700;
}

.nav-desktop-btn:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}

@media (max-width: 1024px) {
    .nav-menu {
        position: static;
        transform: none;
        left: auto;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .nav-fixed {
        width: 95%;
        top: 10px;
        padding: 0 1rem;
        height: 56px;
    }

    .nav-desktop-btn {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: rgba(15, 23, 42, 0.05);
        /* Light toggle */
        border: 1px solid rgba(15, 23, 42, 0.1);
        border-radius: 12px;
        color: var(--primary-dark);
        font-size: 1.2rem;
        cursor: pointer;
    }
}

.nav-fixed.scrolled {
    top: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.lang-select {
    background: rgba(15, 23, 42, 0.05);
    color: var(--primary-dark);
    border: 1px solid rgba(15, 23, 42, 0.1);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: all 0.3s;
}

.lang-select:hover {
    background: rgba(15, 23, 42, 0.1);
    border-color: rgba(15, 23, 42, 0.2);
}

.lang-select option {
    background: white;
    color: var(--primary-dark);
}

/* Mobile Menu Overlay Styles (Light) */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-overlay.active {
    right: 0;
}

.mobile-nav-list {
    list-style: none;
    text-align: center;
}

.mobile-nav-list li {
    margin: 1.5rem 0;
}

.mobile-nav-list li a {
    color: var(--primary-dark);
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-heading);
}

.mobile-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: transparent;
    border: none;
    color: var(--primary-dark);
    font-size: 2.5rem;
    cursor: pointer;
}

/* Device-Specific Logic (requested: "que distinga dispositivo") */
.is-mobile .hero-visual-3d {
    perspective: none;
}

.is-mobile .interface-mockup {
    transform: none !important;
    border-radius: var(--radius-lg);
}

.is-mobile .mockup-content {
    grid-template-columns: 1fr;
    height: auto;
    padding: 1rem;
}

.is-mobile .ui-sidebar {
    display: none;
}

.is-mobile .ui-main {
    grid-template-columns: 1fr;
}

/* Desktop-specific hover effects */
.is-desktop .interface-mockup:hover {
    box-shadow: 0 60px 120px -30px rgba(37, 99, 235, 0.2);
}

/* --- HERO SECTION --- */
.hero-section {
    padding-top: clamp(100px, 15vh, 180px);
    padding-bottom: clamp(50px, 10vh, 100px);
    text-align: center;
    text-align: center;
    position: relative;
    z-index: 50;
    /* Ensure on top */
}

.liquid-title {
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.2;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-body);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    animation: fadedown 0.8s ease-out;
}

.hero-title {
    font-size: 4.5rem;
    line-height: 1;
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
    letter-spacing: -0.04em;
    animation: fadeup 0.8s ease-out 0.2s backwards;
}

@media (max-width: 1024px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.75rem;
    }

    .hero-desc {
        font-size: 1.1rem;
    }
}

.hero-title span {
    background: linear-gradient(135deg, var(--primary) 0%, #3B82F6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.25rem;
    color: var(--text-body);
    max-width: 600px;
    margin: 0 auto 3rem;
    line-height: 1.6;
    animation: fadeup 0.8s ease-out 0.4s backwards;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 5rem;
    animation: fadeup 0.8s ease-out 0.6s backwards;
}

/* 3D INTERFACE PREVIEW */
.hero-visual-3d {
    perspective: 2000px;
    max-width: 1000px;
    margin: 0 auto;
    animation: fadeup 1s ease-out 0.8s backwards;
}

.interface-mockup {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1rem;
    box-shadow:
        0 50px 100px -20px rgba(50, 50, 93, 0.15),
        0 30px 60px -30px rgba(0, 0, 0, 0.2),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.6);
    transform: rotateX(20deg) scale(0.9);
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.hero-visual-3d:hover .interface-mockup {
    transform: rotateX(0deg) scale(1);
}

.mockup-header {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background: #F1F5F9;
    border-radius: 12px 12px 0 0;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border);
}

.dot-group {
    display: flex;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #CBD5E1;
}

.dot.red {
    background: #FDA4AF;
}

.dot.yellow {
    background: #FDE047;
}

.dot.green {
    background: #86EFAC;
}

.mockup-content {
    background: #0F172A;
    /* Contrast Interface */
    height: 400px;
    border-radius: 0 0 12px 12px;
    position: relative;
    padding: 2rem;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
}

/* Fake UI inside mockup */
.ui-sidebar {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    height: 100%;
}

.ui-line {
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-bottom: 1rem;
}

.ui-line.w-50 {
    width: 50%;
}

.ui-line.active {
    background: var(--primary);
    width: 80%;
}

.ui-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.ui-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.ui-value {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    color: white;
    display: block;
    margin-bottom: 0.5rem;
    font-family: 'Outfit';
}

.ui-label {
    font-size: 0.8rem;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ui-graph {
    height: 60px;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.3));
    border-bottom: 2px solid var(--primary);
    margin-top: 1rem;
    position: relative;
}

.ui-graph::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
    transform: translateY(50%);
}

/* --- SECTIONS --- */
.section-features {
    padding: 8rem 0;
    background: white;
    position: relative;
    z-index: 10;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(280px, auto);
    gap: 1.5rem;
    margin-top: 4rem;
}

@media (max-width: 968px) {
    .bento-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .bento-card.wide {
        grid-column: span 1;
    }
}

.bento-card {
    background: var(--bg-body);
    border-radius: var(--radius-xl);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border: 1px solid var(--border);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
}

.bento-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.bento-card.wide {
    grid-column: span 2;
    background: var(--primary-dark);
    color: white;
}

.bento-card.wide h3 {
    color: white;
}

.bento-card.wide p {
    color: #94A3B8;
}

.card-icon {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.bento-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.bento-desc {
    font-size: 1rem;
    color: var(--text-body);
}

@media (max-width: 968px) {
    .hero-title {
        font-size: 3rem;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .bento-card.wide {
        grid-column: span 1;
    }
}

/* --- LIQUID RESPONSIVE UTILITIES --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
}

.responsive-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 968px) {
    .responsive-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
}

.mobile-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

@media (max-width: 640px) {
    .mobile-stack {
        flex-direction: column;
        align-items: center;
    }
}

.bento-card-mobile-fix {
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .bento-card.wide {
        background-position: center !important;
        background-image: none !important;
        /* Remove heavy images in wide cards for mobile speed */
        background: var(--primary-dark) !important;
    }

    .bento-card.wide .card-content {
        max-width: 100% !important;
    }
}

@keyframes fadeup {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadedown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- FOOTER --- */
footer {
    position: relative;
    z-index: 10;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1.2fr 1.2fr;
    gap: 4rem;
    padding-bottom: 3rem;
}

.footer-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: block;
}

.footer-grid h4 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.footer-grid ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-grid ul li a {
    color: var(--text-body);
    font-size: 0.95rem;
    transition: color 0.2s;
}

.footer-grid ul li a:hover {
    color: var(--primary);
}

@media (max-width: 968px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-grid ul {
        align-items: center;
    }
}