/* Mobile Navigation Improvements for ChirpBot */
/* This CSS file enhances mobile usability with larger touch targets */

/* Mobile and Tablet Styles */
@media (max-width: 768px) {
    /* Increase base font size for mobile readability */
    body {
        font-size: 18px !important;
    }

    /* Make navigation more prominent and accessible */
    nav.nav-bar,
    .nav-bar {
        padding: 1rem 0.5rem !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        overflow: hidden !important;
    }

    /* Hide animated rays on mobile for cleaner layout */
    .nav-bar::before,
    .nav-bar::after,
    .rays-layer-3 {
        display: none !important;
    }

    nav.nav-bar ul.nav-links,
    .nav-bar ul.nav-links,
    .nav-bar ul,
    ul.nav-links,
    .nav-links {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.6rem !important;
        justify-content: center !important;
        padding: 0.5rem !important;
        width: 100% !important;
        max-width: 400px !important;
        margin: 0 auto !important;
        height: auto !important;
        overflow: visible !important;
        flex-direction: unset !important;
        flex-wrap: unset !important;
    }

    .nav-links li,
    .nav-bar ul li,
    ul.nav-links li {
        display: flex !important;
        justify-content: center !important;
        list-style: none !important;
        width: 100% !important;
    }

    /* LARGER TOUCH TARGETS FOR MOBILE */
    .nav-links a,
    .nav-links li a,
    .nav-bar ul li a,
    ul.nav-links li a {
        padding: 0.9rem 0.5rem !important;
        font-size: 0.95rem !important;
        font-weight: 700 !important;
        min-height: 50px !important;
        width: 100% !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        white-space: nowrap !important;
        border-width: 2.5px !important;
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15) !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    .nav-links a:active {
        transform: translateY(0) !important;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
    }

    /* Language selector improvements */
    #language-selector {
        padding: 0.875rem 1.25rem !important;
        font-size: 1.05rem !important;
        min-height: 48px !important;
        min-width: 100px !important;
        font-weight: 600 !important;
    }

    .language-dropdown {
        font-size: 1rem !important;
        max-height: 70vh !important;
    }

    .language-dropdown div {
        padding: 1rem 1.25rem !important;
        min-height: 48px !important;
        display: flex !important;
        align-items: center !important;
    }

    /* Increase text sizes for better mobile readability */
    p, li {
        font-size: 1.05rem !important;
        line-height: 1.7 !important;
    }

    h1 {
        font-size: 2rem !important;
    }

    h2 {
        font-size: 1.6rem !important;
    }

    h3 {
        font-size: 1.3rem !important;
    }

    h4 {
        font-size: 1.15rem !important;
    }

    /* Better spacing for hero section */
    .hero {
        padding: 2rem 1rem !important;
    }

    /* Improve button sizes in hero section */
    .btn, .btn-primary, .btn-secondary {
        padding: 1rem 2rem !important;
        font-size: 1.1rem !important;
        min-height: 48px !important;
    }

    /* Better spacing for sections */
    .features, .screenshots {
        padding: 3rem 1rem !important;
    }

    /* Improve feature cards on mobile */
    .feature-card {
        padding: 1.5rem !important;
        margin: 0.5rem !important;
    }

    /* Improve form inputs on mobile */
    input, button, select, textarea {
        font-size: 16px !important;
        min-height: 48px !important;
    }

    /* Better modal behavior on mobile */
    .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        margin: 2% auto !important;
    }

    /* Footer fixes */
    footer {
        padding: 2rem 1.5rem 1.5rem !important;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.75rem 1rem !important;
        margin-bottom: 1rem !important;
    }

    .footer-section:first-child {
        grid-column: 1 / -1 !important;
        text-align: center !important;
        margin-bottom: 0.5rem !important;
    }

    .footer-section {
        padding: 0 !important;
    }

    .footer-logo {
        justify-content: center !important;
    }

    .footer-section h4 {
        margin-bottom: 0.4rem !important;
        font-size: 1.1rem !important;
    }

    .footer-section a {
        margin-bottom: 0.25rem !important;
        display: block !important;
        font-size: 1rem !important;
    }

    .footer-section p {
        font-size: 1rem !important;
    }

    .footer-bottom {
        padding-top: 1rem !important;
    }

    .footer-bottom p {
        font-size: 0.95rem !important;
    }
}

/* Very small screens (phones) */
@media (max-width: 480px) {
    .nav-links {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.5rem !important;
        padding: 0.4rem !important;
        max-width: 340px !important;
    }

    .nav-links a {
        padding: 0.8rem 0.4rem !important;
        font-size: 0.85rem !important;
        min-height: 48px !important;
    }

    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
        text-align: center !important;
    }

    .footer-section {
        text-align: center !important;
    }

    .footer-logo {
        justify-content: center !important;
    }
}

/* Tablet-specific improvements */
@media (min-width: 769px) and (max-width: 1024px) {
    .nav-links a {
        padding: 0.875rem 1.75rem !important;
        font-size: 1.05rem !important;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .nav-links a {
        border-width: 3px !important;
        font-weight: 800 !important;
    }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
    .nav-links a:hover {
        transform: none !important;
    }

    .nav-links a:active {
        opacity: 0.8 !important;
        transform: scale(0.98) !important;
    }

    a, button, input, select, textarea, [role="button"] {
        min-height: 44px !important;
    }
}
