/* ===== MOBILE RESPONSIVE STYLES ===== */

/* Small devices (phones, 576px and down) */
@media (max-width: 576px) {
    .container {
        padding: 0 0.75rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }

    .navbar-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .navbar-nav {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .dashboard {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        z-index: 1001;
        transition: left 0.3s ease;
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .opportunity-card {
        padding: 1rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .btn-group {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Medium devices (tablets, 768px and down) */
@media (max-width: 768px) {
    .row {
        margin: 0 -0.5rem;
    }

    .col {
        padding: 0 0.5rem;
    }

    .navbar-nav {
        gap: 1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .opportunity-header {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-700);
    cursor: pointer;
}

@media (max-width: 576px) {
    .mobile-menu-toggle {
        display: block;
    }
}

/* Overlay for mobile menu */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
}

.mobile-overlay.active {
    display: block;
}

/* PWA Install Prompt */
.pwa-prompt {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 1.5rem;
    z-index: 1002;
    max-width: 320px;
}

.pwa-prompt-content {
    text-align: center;
}

.pwa-prompt-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Touch-friendly elements */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .navbar-nav a,
    .sidebar-nav a {
        min-height: 44px;
        min-width: 44px;
    }

    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Safe area insets for notch devices */
@supports(padding: max(0px)) {
    .container {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
}
