/* ============================================
   RESPONSIVE STYLESHEET
   ============================================ */

/* ============================================
   MOBILE FIRST - BASE STYLES (320px+)
   ============================================ */

/* Already defined in main.css */

/* ============================================
   SMALL DEVICES (576px+)
   ============================================ */

@media (min-width: 576px) {
    .container {
        padding: 0 var(--space-6);
    }

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

/* ============================================
   TABLETS (768px+)
   ============================================ */

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }

    .container {
        padding: 0 var(--space-8);
    }

    /* Grid */
    .grid-md-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-md-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid-md-4 {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Typography */
    h1 {
        font-size: var(--text-5xl);
    }

    h2 {
        font-size: var(--text-4xl);
    }

    h3 {
        font-size: var(--text-3xl);
    }

    /* Navbar */
    .navbar-menu {
        flex-direction: row;
    }

    /* Job Card */
    .job-card-meta {
        flex-wrap: nowrap;
    }
}

/* ============================================
   DESKTOP (1024px+)
   ============================================ */

@media (min-width: 1024px) {

    /* Grid */
    .grid-lg-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid-lg-4 {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Sections */
    section {
        padding: var(--space-16) 0;
    }
}

/* ============================================
   LARGE DESKTOP (1280px+)
   ============================================ */

@media (min-width: 1280px) {
    .container {
        padding: 0 var(--space-4);
    }
}

/* ============================================
   MOBILE SPECIFIC (max-width: 767px)
   ============================================ */

@media (max-width: 767px) {

    /* Navbar Mobile */
    .navbar-nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column;
        background-color: var(--white);
        box-shadow: var(--shadow-xl);
        padding: var(--space-4);
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition-base);
    }

    .navbar-nav.active {
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .navbar-toggle {
        display: flex;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        width: 100%;
        padding: var(--space-3) var(--space-4);
    }

    .nav-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        margin-top: var(--space-2);
        padding-left: var(--space-4);
    }

    /* Search Bar */
    .search-bar {
        max-width: 100%;
    }

    /* Cards */
    .job-card {
        padding: var(--space-4);
    }

    .job-card-footer {
        flex-direction: column;
        gap: var(--space-2);
    }

    .job-card-footer .btn {
        width: 100%;
    }

    /* Category Cards */
    .category-card {
        padding: var(--space-6);
    }

    /* Quick Links */
    .quick-link-card {
        padding: var(--space-4);
    }

    .quick-link-icon {
        width: 50px;
        height: 50px;
        font-size: var(--text-xl);
    }

    /* Modal */
    .modal-content {
        max-width: 95%;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: var(--space-4);
    }

    /* Buttons */
    .btn-group {
        flex-direction: column;
        width: 100%;
    }

    .btn-group .btn {
        width: 100%;
    }

    /* Typography */
    h1 {
        font-size: var(--text-3xl);
    }

    h2 {
        font-size: var(--text-2xl);
    }

    h3 {
        font-size: var(--text-xl);
    }

    .section-title {
        font-size: var(--text-2xl);
    }

    /* Spacing */
    section {
        padding: var(--space-8) 0;
    }

    /* Pagination */
    .pagination {
        gap: var(--space-1);
    }

    .pagination-item {
        width: 36px;
        height: 36px;
        font-size: var(--text-xs);
    }

    /* Hide on mobile */
    .hide-mobile {
        display: none !important;
    }
}

/* ============================================
   TABLET SPECIFIC (768px - 1023px)
   ============================================ */

@media (min-width: 768px) and (max-width: 1023px) {
    .hide-tablet {
        display: none !important;
    }
}

/* ============================================
   DESKTOP ONLY (1024px+)
   ============================================ */

@media (min-width: 1024px) {
    .hide-desktop {
        display: none !important;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {

    /* Hide non-essential elements */
    .navbar,
    .navbar-toggle,
    .theme-toggle,
    .notification-ticker,
    .btn,
    .modal,
    footer,
    .no-print {
        display: none !important;
    }

    /* Reset colors for print */
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }

    /* Ensure content fits */
    body {
        margin: 0;
        padding: 20px;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    /* Page breaks */
    .job-card,
    .card {
        page-break-inside: avoid;
    }

    /* Show links */
    a[href]:after {
        content: " (" attr(href) ")";
    }

    /* Typography */
    h1 {
        font-size: 24pt;
    }

    h2 {
        font-size: 20pt;
    }

    h3 {
        font-size: 16pt;
    }

    body {
        font-size: 12pt;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Focus styles */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --primary: #000080;
        --accent: #ff4500;
        --neutral-600: #000000;
    }

    .btn,
    .card,
    .form-control {
        border-width: 3px;
    }
}

/* ============================================
   LANDSCAPE ORIENTATION
   ============================================ */

@media (max-width: 767px) and (orientation: landscape) {
    .navbar-nav.active {
        max-height: 50vh;
    }

    .modal-content {
        max-height: 80vh;
    }
}