/* ============================================
   TALEY DESIGN SYSTEM - RESPONSIVE DESIGN
   Media Queries & Mobile Optimization
   Extracted from animations.css
============================================ */

/* ============================================
   TABLET (max-width: 768px)
============================================ */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .mobile-nav {
        display: flex;
    }

    nav {
        justify-content: space-between;
    }

    /* Hero Section - Better mobile spacing */
    .hero {
        padding: 90px 20px 40px;
        min-height: auto;
    }

    .hero-content {
        padding: 0 8px;
    }

    .hero h1 {
        font-size: clamp(28px, 8vw, 40px);
        line-height: 1.15;
    }

    .hero p {
        font-size: 16px;
        line-height: 1.5;
        padding: 0 4px;
    }

    /* General sections - tighter on mobile */
    section {
        padding: 32px 16px;
    }

    .section-header {
        margin-bottom: 20px;
    }

    .section-header h2 {
        font-size: clamp(22px, 6vw, 32px);
    }

    .section-header p {
        font-size: 15px;
    }

    /* Features grid - single column */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .feature-card {
        padding: 20px;
    }

    /* Feature card glow - reduce on mobile */
    .feature-card::before {
        opacity: 0.3 !important;
        filter: blur(15px) !important;
    }

    /* Communities grid - single column on mobile */
    .communities-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .community-card {
        padding: 24px 20px;
    }

    .community-card h3 {
        font-size: 20px;
    }

    .community-card p {
        font-size: 14px;
    }

    /* QR code - HIDE on mobile (users can't scan their own screen) */
    .qr-frame {
        display: none;
    }

    /* Make CTA button more prominent when QR is hidden */
    .community-card .cta-button {
        margin-top: 16px;
        width: 100%;
        justify-content: center;
    }

    /* Community benefits - more compact */
    .community-benefits {
        gap: 6px;
        margin-top: 12px;
    }

    .benefit-tag {
        font-size: 11px;
        padding: 4px 8px;
    }

    /* Testimonials - tighter spacing */
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 8px;
        /* Add horizontal padding */
    }

    .testimonial-card {
        padding: 20px;
        margin: 0 4px;
        /* Prevent text touching edges */
    }

    .testimonial-card p {
        font-size: 14px;
    }

    .testimonial-card cite {
        font-size: 12px;
    }

    /* Pain points grid - add horizontal padding */
    .pain-points-grid {
        padding: 0 8px;
    }

    /* Footer - stack content */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 16px;
    }

    /* Improve tap targets for footer links */
    .footer-links a {
        padding: 12px 8px;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* Footer - add padding to prevent sticky CTA overlap */
    footer {
        padding-bottom: 90px;
    }

    /* CRITICAL FIX: Floating buttons - avoid collision */
    .sticky-cta {
        bottom: 16px;
        right: 16px;
        padding: 12px 18px;
        font-size: 13px;
        max-width: calc(100% - 80px);
        /* Leave room for back-to-top */
    }

    .back-to-top {
        bottom: 16px;
        left: 16px;
        right: auto;
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    /* Waitlist form - stack vertically */
    .waitlist-form {
        flex-direction: column;
        gap: 12px;
        padding: 0 4px;
    }

    .waitlist-form input {
        min-width: 100%;
        padding: 14px 16px;
        font-size: 16px;
    }

    .waitlist-form button {
        width: 100%;
        padding: 14px 20px;
    }

    /* Consent checkbox - better readability */
    .consent-checkbox label {
        font-size: 13px !important;
        line-height: 1.5 !important;
    }

    /* CRITICAL FIX: Hide speech bubbles on mobile - they cause clutter */
    .speech-bubble {
        display: none !important;
    }

    /* Mascot - smaller and subtle on mobile */
    .taley-mascot {
        display: block !important;
        max-width: 60px;
        opacity: 0.7;
    }

    .mascot-hero {
        position: absolute;
        bottom: -15px;
        right: 5px;
        width: 50px;
    }

    .mascot-signup {
        position: absolute;
        top: -25px;
        right: 15px;
        width: 50px;
    }

    /* Updates grid - single column */
    .updates-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .update-card {
        padding: 16px;
    }

    /* Download section */
    .download {
        padding: 40px 16px;
    }

    .download .section-header h2 {
        font-size: clamp(20px, 5vw, 28px);
    }

    .download .section-header p {
        font-size: 14px;
        line-height: 1.5;
    }

    /* Coming soon badge */
    .coming-soon-badge {
        font-size: 12px;
        padding: 6px 14px;
    }
}

/* ============================================
   SMALL MOBILE (max-width: 480px)
============================================ */
@media (max-width: 480px) {

    /* Even tighter hero */
    .hero {
        padding: 85px 16px 35px;
    }

    .hero h1 {
        font-size: 26px;
    }

    .hero p {
        font-size: 15px;
    }

    /* CTA button - full width on small mobile */
    .cta-button {
        display: block;
        width: 100%;
        text-align: center;
        padding: 16px 24px;
        font-size: 15px;
    }

    /* Sections - minimal padding */
    section {
        padding: 24px 12px;
    }

    /* Community card - even more compact */
    .community-card {
        padding: 20px 16px;
    }

    /* Trust badges - 2 per row */
    .trust-badges {
        gap: 6px;
        padding: 12px 8px;
    }

    .trust-badges .badge {
        font-size: 11px;
        padding: 6px 10px;
        min-width: calc(50% - 6px);
        justify-content: center;
        text-align: center;
    }

    /* Hide mascot on very small screens */
    .taley-mascot {
        display: none !important;
    }

    /* Footer links - even smaller gap */
    .footer-links {
        gap: 8px 16px;
        font-size: 13px;
    }

    /* Sticky CTA - smaller */
    .sticky-cta {
        padding: 10px 14px;
        font-size: 12px;
    }
}

/* Mobile Language Switcher */
.mobile-language-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 0;
    font-size: 16px;
    color: var(--gray-600);
    border-bottom: none;
}

.mobile-language-switcher a {
    color: var(--gray-500);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    min-height: auto;
}

.mobile-language-switcher a.active {
    color: var(--gray-900);
    font-weight: 600;
}

.mobile-language-switcher a:hover {
    color: var(--green-primary);
}

/* ============================================
   LANDSCAPE MOBILE (max-height: 500px)
   Optimization for wide but short screens
============================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding-top: 80px;
        padding-bottom: 20px;
        min-height: auto;
    }

    .hero h1 {
        font-size: clamp(22px, 5vw, 28px);
        margin-bottom: 12px;
    }

    .hero p {
        font-size: 15px;
        margin-bottom: 20px;
    }

    .sticky-cta {
        padding: 8px 12px;
        bottom: 12px;
        right: 12px;
        font-size: 12px;
        max-width: 200px;
    }

    .back-to-top {
        bottom: 12px;
        left: 12px;
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .taley-mascot {
        transform: scale(0.6);
        transform-origin: bottom right;
        opacity: 0.5;
        bottom: 0;
    }

    .footer-links {
        gap: 8px 16px;
    }
}