/* ============================================
   RESPONSIVE DESIGN - Global Mobile Styles
   ============================================ */

/* ============================================
   Tablet Devices (768px and below)
   ============================================ */

@media (max-width: 768px) {
    /* General */
    .container {
        padding: 0 15px;
    }

    body {
        font-size: 14px;
    }

    h1, .h1 {
        font-size: 28px !important;
    }

    h2, .h2 {
        font-size: 24px !important;
    }

    h3, .h3 {
        font-size: 20px !important;
    }

    h4, .h4 {
        font-size: 18px !important;
    }

    h5, .h5 {
        font-size: 16px !important;
    }

    /* Hero sections and headers */
    .page-header,
    .page-hero,
    .section {
        padding: 40px 0 !important;
    }

    .page-header h1,
    .page-hero h1 {
        font-size: 24px !important;
        margin-bottom: 15px !important;
    }

    .page-header p,
    .page-hero p {
        font-size: 14px !important;
    }

    /* Buttons */
    .btn-lg {
        padding: 8px 16px !important;
        font-size: 14px !important;
    }

    .btn {
        padding: 8px 12px !important;
        font-size: 13px !important;
    }

    /* Forms */
    .form-control,
    .form-select,
    input,
    textarea,
    select {
        font-size: 16px !important;
    }

    .input-group {
        flex-direction: column;
    }

    .input-group-lg {
        width: 100% !important;
    }

    .input-group-lg .form-control,
    .input-group-lg .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    /* Cards */
    .card {
        margin-bottom: 20px !important;
    }

    .card-body {
        padding: 15px !important;
    }

    .card-header {
        padding: 15px !important;
    }

    /* Grid adjustments */
    .col-lg-8,
    .col-lg-4,
    .col-lg-3,
    .col-lg-6 {
        width: 100% !important;
        max-width: 100% !important;
    }

    .row {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }

    /* News/Article Cards */
    .card-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .card-grid > div {
        max-width: 100% !important;
    }

    /* Pagination */
    .pagination {
        flex-wrap: wrap;
    }

    .pagination .page-link {
        padding: 6px 8px !important;
        font-size: 12px !important;
    }

    .pagination-item {
        width: 30px !important;
        height: 30px !important;
        font-size: 12px !important;
    }

    /* Flex layouts */
    .d-flex {
        flex-direction: column;
    }

    .d-flex.flex-wrap {
        flex-direction: row;
    }

    .d-flex.align-items-center {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .gap-2 {
        gap: 10px !important;
    }

    .gap-3 {
        gap: 15px !important;
    }

    .gap-4 {
        gap: 15px !important;
    }

    /* Sidebar */
    .job-sidebar {
        margin-top: 20px !important;
    }

    /* Newsletter section */
    .newsletter-section {
        padding: 40px 0 !important;
    }

    .newsletter-section form {
        flex-direction: column !important;
    }

    .newsletter-section input {
        width: 100% !important;
    }

    .newsletter-section button {
        width: 100% !important;
    }

    /* Tables */
    table {
        font-size: 12px !important;
    }

    thead th {
        padding: 8px !important;
    }

    tbody td {
        padding: 10px !important;
    }

    /* Navigation */
    .navbar {
        padding: 10px 0 !important;
    }

    .navbar-brand {
        font-size: 18px !important;
    }

    /* Header styling */
    section[style*="padding: 80px 0"],
    section[style*="padding: 60px 0"] {
        padding: 40px 0 !important;
    }

    /* Filter sections */
    .category-filter {
        font-size: 12px !important;
        padding: 6px 12px !important;
        margin-bottom: 8px !important;
    }

    /* Text utilities */
    .fw-bold {
        font-weight: 600 !important;
    }

    .text-center {
        text-align: center;
    }

    /* Badges */
    .badge {
        font-size: 11px !important;
        padding: 5px 8px !important;
    }

    /* Margin/Padding utilities */
    .mb-5 {
        margin-bottom: 20px !important;
    }

    .mb-4 {
        margin-bottom: 15px !important;
    }

    .mb-3 {
        margin-bottom: 12px !important;
    }

    .py-5 {
        padding: 40px 0 !important;
    }

    .py-4 {
        padding: 30px 0 !important;
    }

    .px-4 {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .max-width {
        max-width: 100% !important;
    }

    /* Alert boxes */
    .alert {
        padding: 12px !important;
        font-size: 13px !important;
        margin-bottom: 15px !important;
    }

    .alert h4 {
        font-size: 16px !important;
    }

    /* Search form */
    .search-form {
        flex-direction: column !important;
        width: 100%;
    }

    .search-form input {
        width: 100% !important;
        margin-bottom: 10px !important;
    }

    .search-form button {
        width: 100% !important;
    }

    /* Contact info */
    .contact-info {
        font-size: 13px !important;
    }

    /* Social links */
    .social-links {
        justify-content: center !important;
        gap: 10px !important;
    }

    .social-link {
        width: 36px !important;
        height: 36px !important;
        font-size: 14px !important;
    }

    /* List styles */
    .list-unstyled li {
        margin-bottom: 10px !important;
    }

    /* Process cards */
    .process-icon {
        width: 60px !important;
        height: 60px !important;
        font-size: 24px !important;
    }

    /* Icon sizes */
    .fa-3x {
        font-size: 2em !important;
    }

    .fa-2x {
        font-size: 1.5em !important;
    }

    /* Utility overrides for mobile */
    .d-md-flex {
        display: flex !important;
        flex-direction: column !important;
    }

    .justify-content-md-center {
        justify-content: flex-start !important;
    }

    .justify-content-center {
        justify-content: center !important;
    }

    /* Image containers */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Overflow handling */
    .overflow-hidden {
        overflow: hidden;
    }

    /* Position utilities */
    .position-relative {
        position: relative;
    }
}

/* ============================================
   Mobile Devices (480px and below)
   ============================================ */

@media (max-width: 480px) {
    /* General */
    body {
        font-size: 13px;
    }

    .container {
        padding: 0 12px;
    }

    h1, .h1 {
        font-size: 22px !important;
    }

    h2, .h2 {
        font-size: 20px !important;
    }

    h3, .h3 {
        font-size: 18px !important;
    }

    h4, .h4 {
        font-size: 16px !important;
    }

    h5, .h5 {
        font-size: 14px !important;
    }

    /* Sections */
    .section,
    .page-header,
    .page-hero {
        padding: 30px 0 !important;
    }

    .page-header h1,
    .page-hero h1 {
        font-size: 20px !important;
    }

    .page-header p,
    .page-hero p {
        font-size: 13px !important;
    }

    /* Buttons */
    .btn-lg {
        padding: 6px 12px !important;
        font-size: 13px !important;
    }

    .btn {
        padding: 6px 10px !important;
        font-size: 12px !important;
    }

    .btn-sm {
        padding: 4px 8px !important;
        font-size: 11px !important;
    }

    /* Forms */
    .form-control,
    .form-select,
    input,
    textarea,
    select {
        font-size: 16px !important;
        padding: 8px !important;
    }

    /* Card adjustments */
    .card {
        margin-bottom: 15px !important;
    }

    .card-body {
        padding: 12px !important;
    }

    .card-header {
        padding: 12px !important;
    }

    .card-img-top,
    .card-img-bottom {
        height: 150px !important;
    }

    /* Grid */
    .col-md-6,
    .col-md-4,
    .col-md-3 {
        width: 100% !important;
    }

    .row {
        --bs-gutter-x: 0.5rem;
        --bs-gutter-y: 0.5rem;
    }

    /* Grid for news/formations */
    .card-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    /* Pagination */
    .pagination-item {
        width: 28px !important;
        height: 28px !important;
        font-size: 11px !important;
    }

    .pagination .page-link {
        padding: 4px 6px !important;
        font-size: 11px !important;
    }

    /* Flex adjustments */
    .flex-column {
        flex-direction: column;
    }

    .gap-2 {
        gap: 8px !important;
    }

    .gap-3 {
        gap: 12px !important;
    }

    /* Newsletter */
    .newsletter-section form {
        gap: 8px !important;
    }

    .newsletter-section input,
    .newsletter-section button {
        width: 100% !important;
        margin-bottom: 10px !important;
    }

    /* Contact page */
    .contact-info {
        font-size: 12px !important;
    }

    .contact-info li {
        margin-bottom: 12px !important;
    }

    .icon-box {
        width: 32px !important;
        height: 32px !important;
        font-size: 14px !important;
    }

    /* Social links */
    .social-links {
        gap: 8px !important;
    }

    .social-link {
        width: 32px !important;
        height: 32px !important;
        font-size: 12px !important;
    }

    /* Tables */
    table {
        font-size: 11px !important;
    }

    thead th {
        padding: 6px !important;
    }

    tbody td {
        padding: 8px !important;
    }

    /* Alerts */
    .alert {
        padding: 10px !important;
        font-size: 12px !important;
    }

    .alert h4 {
        font-size: 14px !important;
    }

    /* Badges */
    .badge {
        font-size: 10px !important;
        padding: 4px 6px !important;
    }

    /* Margins and padding */
    .mb-5 {
        margin-bottom: 15px !important;
    }

    .mb-4 {
        margin-bottom: 12px !important;
    }

    .mb-3 {
        margin-bottom: 10px !important;
    }

    .py-5 {
        padding: 30px 0 !important;
    }

    .py-4 {
        padding: 20px 0 !important;
    }

    .px-4 {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .mx-auto {
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* Process cards */
    .process-icon {
        width: 50px !important;
        height: 50px !important;
        font-size: 20px !important;
    }

    .process-icon span {
        font-size: 18px !important;
    }

    /* Icon utilities */
    .fa-3x {
        font-size: 1.5em !important;
    }

    .fa-2x {
        font-size: 1.2em !important;
    }

    /* Header/Navbar */
    .navbar-brand {
        font-size: 16px !important;
    }

    .navbar {
        padding: 8px 0 !important;
    }

    /* Modal adjustments */
    .modal-dialog {
        width: 95vw !important;
        margin: 10px auto !important;
    }

    .modal-content {
        border-radius: 8px;
    }

    .modal-body {
        padding: 12px !important;
    }

    /* Utility overrides */
    .d-none {
        display: none !important;
    }

    .d-block {
        display: block !important;
    }

    .d-flex {
        display: flex;
    }

    .text-center {
        text-align: center;
    }

    .text-start {
        text-align: start;
    }

    .overflow-auto {
        overflow: auto;
    }

    /* Spinner/Loading */
    .spinner-border {
        width: 30px !important;
        height: 30px !important;
    }

    /* Full width elements */
    .w-100 {
        width: 100% !important;
    }

    /* Display utilities */
    .display-1,
    .display-2,
    .display-3,
    .display-4,
    .display-5,
    .display-6 {
        font-size: 24px !important;
        line-height: 1.2;
    }

    /* Lead */
    .lead {
        font-size: 14px !important;
    }

    /* Grid system overrides for extra small */
    .col-12 {
        width: 100%;
    }

    /* Prevent horizontal scrolling */
    html, body {
        overflow-x: hidden;
    }

    /* Touch-friendly elements */
    a, button, input[type="button"], input[type="submit"] {
        min-height: 44px;
        min-width: 44px;
    }

    /* Text selection */
    .user-select-none {
        user-select: none;
    }

    .user-select-all {
        user-select: all;
    }
}

/* ============================================
   Extra Small Devices (320px and below)
   ============================================ */

@media (max-width: 320px) {
    .container {
        padding: 0 8px;
    }

    h1, .h1 {
        font-size: 18px !important;
    }

    h2, .h2 {
        font-size: 16px !important;
    }

    h3, .h3 {
        font-size: 14px !important;
    }

    .btn {
        padding: 4px 8px !important;
        font-size: 11px !important;
    }

    .process-icon {
        width: 40px !important;
        height: 40px !important;
    }
}

/* ============================================
   Landscape Mode (Height < 600px)
   ============================================ */

@media (max-height: 600px) and (orientation: landscape) {
    .section,
    .page-header,
    .page-hero {
        padding: 20px 0 !important;
    }

    .page-header h1,
    .page-hero h1 {
        margin-bottom: 10px !important;
    }

    .process-icon {
        width: 60px !important;
        height: 60px !important;
    }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .navbar,
    .footer,
    .pagination,
    .btn-print-hide,
    .no-print {
        display: none !important;
    }

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

    body {
        font-size: 12pt;
        color: #000;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}

/* ============================================
   Accessibility Enhancements
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: #1e1e1e;
        color: #e0e0e0;
    }

    .card,
    .card-body {
        background-color: #2d2d2d !important;
        color: #e0e0e0 !important;
    }

    .form-control,
    .form-select {
        background-color: #2d2d2d !important;
        color: #e0e0e0 !important;
        border-color: #444 !important;
    }

    .alert {
        background-color: #3d3d3d !important;
        color: #e0e0e0 !important;
    }
}
