/* responsive.css - Mobile first responsive utilities */

@media (max-width: 768px) {

    /* Ensure body uses full width */
    body {
        overflow-x: hidden;
    }

    /* --- Landing Layout Fixes --- */
    /* Tighter Hero Section */
    .hero {
        padding: 40px 15px !important;
    }

    .hero h1 {
        font-size: 32px !important;
        line-height: 1.2 !important;
        margin-bottom: 15px !important;
    }

    .hero p {
        font-size: 16px !important;
        margin-bottom: 25px !important;
        padding: 0 10px;
    }

    /* Tighter Pricing Section */
    .pricing-section {
        padding: 40px 15px !important;
    }

    /* Stack grid layouts safely */
    .stats-grid,
    .features-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
        gap: 15px;
        /* Tighter gap */
        padding: 0 15px;
    }

    /* Stack flex layouts */
    .pricing-card {
        width: 100% !important;
        margin: 0 auto 30px auto;
        padding: 30px 20px !important;
        /* Tighter card padding */
    }

    /* Dashboard Stats Stack */
    .stats-content {
        flex-direction: column !important;
        align-items: center !important;
    }

    .stats-metrics {
        margin-left: 0 !important;
        margin-top: 20px;
        width: 100%;
        text-align: center;
    }

    /* Adjust container padding */
    .container {
        padding: 15px;
        width: 100%;
    }

    /* Landing Nav Adjustments - CENTERED & TIGHT */
    nav {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .nav-links {
        display: flex;
        flex-direction: row;
        /* Horizontal row */
        flex-wrap: wrap;
        /* Allow wrapping if needed */
        justify-content: center;
        align-items: center;
        gap: 15px;
        width: 100%;
    }

    .nav-links a {
        margin-left: 0;
        font-size: 14px;
        /* Slightly smaller text for fit */
    }

    /* Make tables scrollable */
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Stack form fields */
    form .input-group,
    form .form-row {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    /* Adjust buttons to full width */
    button,
    .btn-primary,
    .btn-secondary {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
        display: flex !important;
        /* Ensure flex centering works if applicable */
        align-items: center !important;
    }

    /* Show Mobile Menu Button */
    .mobile-menu-btn {
        display: block !important;
    }

    /* Sidebar adjustments for mobile */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 280px;
        overflow-y: auto;
        padding-bottom: 30px;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar .nav-item.danger {
        margin-top: 0 !important;
        position: sticky;
        bottom: 0;
        background: #0F172A;
        padding: 12px 15px;
        border-top: 1px solid #334155;
    }
}