/* AI Tool Finder - Mobile Specific Styles */

/* Table responsiveness (can be general or within media query if preferred) */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

table.responsive { /* Apply this class to tables needing responsiveness */
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

table.responsive th,
table.responsive td {
    padding: 0.75rem;
    text-align: right;
    border-bottom: 1px solid #e2e8f0;
}

table.responsive th {
    background-color: #f8fafc;
    font-weight: 600;
}

@media (max-width: 768px) {
    body {
        padding-top: 60px !important; /* Ensure override */
    }

    .header {
        height: 60px !important;
    }

    .navbar {
        padding: 0.5rem 1rem !important;
    }

    .logo {
        font-size: 1.1rem !important;
    }

    .nav-menu {
        position: fixed !important;
        top: 60px !important;
        right: -100% !important;
        width: 80% !important;
        max-width: 300px !important;
        height: calc(100vh - 60px) !important;
        background: white !important;
        flex-direction: column !important;
        padding: 2rem !important;
        box-shadow: var(--shadow-lg) !important;
        transition: var(--transition-normal) !important;
        z-index: 1000 !important;
        overflow-y: auto !important;
    }

    .nav-menu.active {
        right: 0 !important;
    }

    .mobile-toggle {
        display: block !important;
    }

    .nav-search input {
        width: 150px !important;
    }

    .nav-search input:focus {
        width: 150px !important;
    }

    .hero {
        padding: 5rem 0 3rem !important;
        min-height: auto !important;
    }

    .tools-hero { /* If this class is used on other pages */
        padding: 2.5rem 0 !important;
    }

    .tools-stats { /* If this class is used on other pages */
        gap: 1rem !important;
    }

    .tools-stat { /* If this class is used on other pages */
        padding: 1rem !important;
        min-width: 120px !important;
    }

    .filter-form { /* If this class is used on other pages */
        flex-direction: column !important;
    }

    .filter-group { /* If this class is used on other pages */
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem !important;
    }

    .hero-title {
        font-size: 1.7rem !important;
    }

    .stat-item {
        min-width: 100% !important;
        padding: 1rem !important;
    }

    .grid {
        gap: 1rem !important;
    }

    .section {
        padding: 2rem 0 !important;
    }

    .tool-actions {
        flex-direction: column !important;
    }

    .newsletter-form {
        flex-direction: column !important;
    }

    .btn {
        padding: 0.8rem 1.5rem !important;
        font-size: 0.9rem !important;
    }

    .footer-content {
        grid-template-columns: 1fr !important;
        text-align: center !important;
    }
    .footer-section ul {
        padding-right: 0 !important;
    }
}