/* 
   ULTRA MOBILE UX - TheLionAI Agent Pages
   "10x User Friendly" Enhancements
*/

/* ==========================================
   MOBILE TYPOGRAPHY & SPACING
   ========================================== */
@media (max-width: 768px) {
    :root {
        --container-padding: 1.25rem;
    }

    html {
        font-size: 16px; /* Ensure readable base size */
    }

    h1 {
        font-size: 2.75rem !important; /* Massive but readable */
        line-height: 1.1;
        letter-spacing: -0.03em;
    }

    h2 {
        font-size: 2rem !important;
    }

    p {
        font-size: 1.05rem;
        line-height: 1.6;
        color: rgba(255, 255, 255, 0.85); /* Higher contrast */
    }

    .container {
        padding-left: var(--container-padding);
        padding-right: var(--container-padding);
    }
}

/* ==========================================
   APP-LIKE NAVIGATION DOCK (iOS/Android Style)
   ========================================== */
.mobile-sticky-cta {
    display: none;
    position: fixed;
    bottom: 1.5rem; /* Floating effect */
    left: 1rem;
    right: 1rem;
    width: auto;
    padding: 0.75rem;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px; /* Pill shape */
    z-index: 1000;
    transform: translateY(150%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4), 
                0 0 0 1px rgba(255,255,255,0.05) inset;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px)); /* Safe area */
}

.mobile-sticky-cta.is-visible {
    transform: translateY(0);
}

.mobile-cta-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 0.75rem;
    align-items: center;
}

.btn-mobile-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 18px;
    height: 48px; /* Standard touch target */
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.btn-mobile-secondary:active {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0.96);
}

.btn-mobile-primary {
    background: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary));
    color: white;
    border: none;
    border-radius: 18px;
    height: 48px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    font-size: 1rem;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn-mobile-primary:active {
    transform: scale(0.96);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* ==========================================
   QUICK NAV PILLS (Instagram/Spotify Style)
   ========================================== */
.quick-nav-wrapper {
    position: sticky;
    top: 60px; /* Below header */
    z-index: 900;
    background: rgba(5, 5, 10, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.75rem 0;
    margin-bottom: 1rem;
    display: none; /* Hidden on desktop */
}

.quick-nav-scroll {
    display: flex;
    overflow-x: auto;
    padding: 0 1.25rem;
    gap: 0.75rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

.quick-nav-scroll::-webkit-scrollbar {
    display: none;
}

.nav-pill {
    flex: 0 0 auto;
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.nav-pill.active {
    background: var(--neon-primary);
    color: white;
    border-color: var(--neon-primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .mobile-sticky-cta {
        display: block;
    }
    .quick-nav-wrapper {
        display: block;
    }
    
    /* Adjust main container to not be hidden by nav */
    body {
        padding-bottom: 100px;
    }
}

/* ==========================================
   TOUCH RIPPLE EFFECT
   ========================================== */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ==========================================
   QUICK NAV PILLS (Sticky Top)
   ========================================== */
.quick-nav-wrapper {
    position: sticky;
    top: 0; /* Adjust based on header height */
    z-index: 900;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 0;
    margin-bottom: 2rem;
    display: none; /* Hidden on desktop by default, or show if desired */
}

@media (max-width: 768px) {
    .quick-nav-wrapper {
        display: block;
        top: 60px; /* Below main header */
    }
}

.quick-nav-scroll {
    display: flex;
    overflow-x: auto;
    gap: 0.75rem;
    padding: 0 var(--container-padding);
    scrollbar-width: none; /* Hide scrollbar Firefox */
    -ms-overflow-style: none;  /* Hide scrollbar IE */
}

.quick-nav-scroll::-webkit-scrollbar {
    display: none; /* Hide scrollbar Chrome */
}

.nav-pill {
    white-space: nowrap;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.nav-pill.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

/* ==========================================
   MOBILE HERO OPTIMIZATIONS
   ========================================== */
@media (max-width: 768px) {
    .agent-hero {
        padding-top: 6rem;
        text-align: left; /* Align left for better readability */
    }

    .agent-hero-content {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .agent-hero-icon {
        max-width: 280px;
        margin: 0 auto;
        order: 0; /* Image on top */
    }

    .agent-hero-text {
        order: 1;
    }

    .agent-meta {
        justify-content: flex-start;
        gap: 0.5rem;
    }

    .meta-item {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }
    
    /* Hide desktop buttons in hero since we have sticky bar */
    .agent-hero-actions {
        display: none;
    }
}

/* ==========================================
   BENTO GRID MOBILE
   ========================================== */
@media (max-width: 768px) {
    .metrics-grid {
        grid-template-columns: 1fr 1fr; /* 2x2 grid */
        gap: 1rem;
    }

    .metric-card {
        padding: 1.5rem 1rem;
    }

    .metric-icon {
        width: 50px;
        height: 50px;
        line-height: 50px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .metric-content h3 {
        font-size: 1.5rem;
    }
    
    .features-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   ACCORDION FAQ (Mobile Friendly)
   ========================================== */
.faq-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-question {
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.faq-item.open .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 1.25rem;
    color: var(--text-secondary);
}

.faq-item.open .faq-answer {
    padding-bottom: 1.25rem;
    max-height: 500px; /* Arbitrary large height */
}
