/* ============================================================
   Ibnbattouta Recruitment Portal - Frontend Styles
   Modern Arabic RTL Recruitment Portal
   ============================================================ */

/* === GLOBAL === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--text-primary);
    background-color: var(--bg-body);
    overflow-x: hidden;
}

/* Direction inherited from <html dir="rtl|ltr"> */
html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}
html[dir="ltr"] body {
    direction: ltr;
    text-align: left;
}

a {
    color: var(--text-link);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover {
    color: var(--text-link-hover);
}

img {
    max-width: 100%;
    height: auto;
}

/* === SELECTION === */
::selection {
    background: var(--primary);
    color: var(--white);
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--gray-100);
}
::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* === HEADER / NAVBAR === */
/* === TOPBAR === */
.topbar {
    background: #151b5d;
    color: rgba(255,255,255,0.85);
    font-size: 12px;
    padding: 6px 0;
    transition: opacity 0.2s ease;
    max-height: 40px;
    overflow: hidden;
}
.main-header.scrolled .topbar {
    max-height: 0;
    padding: 0;
    opacity: 0;
}
.topbar a { color: rgba(255,255,255,0.85); text-decoration: none; transition: color 0.2s; }
.topbar a:hover { color: #fff; }
.topbar-contact { display: flex; align-items: center; gap: 16px; }
.topbar-contact i { margin-left: 6px; font-size: 11px; }
[dir="ltr"] .topbar-contact i { margin-left: 0; margin-right: 6px; }
.topbar-divider { width: 1px; height: 14px; background: rgba(255,255,255,0.25); }
.topbar-social { display: flex; gap: 8px; }
.topbar-social a {
    width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    font-size: 11px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.topbar-social a::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #fff;
    transform: scale(0);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.topbar-social a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.topbar-social a:hover::before { transform: scale(1); }
.topbar-social a:hover::after {
    width: 100%;
    left: 0;
}
.topbar-social a:hover {
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}
.topbar-social a i { position: relative; z-index: 1; }

/* === HEADER & NAVBAR === */
.main-header {
    background: #fff;
    box-shadow: none;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    transition: box-shadow 0.25s ease, border-bottom-color 0.25s ease;
}

.main-header.scrolled {
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border-bottom-color: transparent;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.navbar-brand img {
    max-height: 53px;
    transition: max-height 0.25s ease;
}

.main-header.scrolled .navbar-brand img {
    max-height: 34px;
}

.navbar-nav {
    gap: 5px;
}

.nav-link {
    font-weight: 500;
    color: #475569 !important;
    padding: 8px 14px !important;
    border-radius: 0;
    transition: all 0.2s ease;
    font-size: 14px;
    position: relative;
}
.nav-link i { opacity: 0.6; font-size: 13px; }

.nav-link:hover {
    color: var(--primary) !important;
    background: rgba(var(--primary-rgb), 0.05);
}
.nav-link:hover i { opacity: 1; }

.nav-link.active {
    color: var(--primary) !important;
    background: rgba(var(--primary-rgb), 0.08);
    font-weight: 600;
}
.nav-link.active i { opacity: 1; }

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 14px;
    left: 14px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

/* Navbar buttons */
.btn-lang {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    font-weight: 700;
    font-size: 12px;
    border-radius: 20px;
    padding: 6px 14px;
    gap: 5px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-lang i {
    font-size: 13px;
}
.btn-lang:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.05);
}

.btn-nav-login {
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 7px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex; align-items: center; gap: 6px;
}
.btn-nav-login:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.04);
}

.btn-nav-register {
    background: var(--primary);
    color: #fff;
    padding: 7px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex; align-items: center; gap: 6px;
}
.btn-nav-register:hover {
    background: var(--primary-light);
    color: #fff;
    box-shadow: 0 2px 8px rgba(26,35,126,0.2);
}

/* Logged-in user dropdown */
.rounded-pill {
    border-radius: var(--bs-border-radius-pill) !important;
    color: #ffffff;
    background-color: #192074;
    border-color: #192074;
}
.rounded-pill:hover {
    background-color: #131a5e;
    border-color: #131a5e;
    color: #fff;
}

.btn-post-job {
    background: var(--accent);
    color: var(--white) !important;
    border: none;
    padding: 8px 24px;
    border-radius: var(--border-radius-pill);
    font-weight: var(--font-weight-semibold);
    transition: all var(--transition);
}

.btn-post-job:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 111, 0, 0.3);
}

.country-selector .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-pill);
    font-size: var(--font-size-sm);
    background: var(--white);
}

.country-selector .flag-icon {
    font-size: 18px;
}

/* === HERO SECTION === */
.hero-section {
    background: linear-gradient(135deg, #0a1628 0%, #1a237e 45%, #283593 100%);
    padding: 80px 0 100px;
    position: relative;
    overflow: hidden;
}

/* Decorative circles removed to fix mobile overflow */

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: var(--font-size-hero);
    font-weight: var(--font-weight-bold);
    color: var(--white);
    margin-bottom: 16px;
    line-height: 1.3;
}

.hero-subtitle {
    font-size: var(--font-size-lg);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
}

/* Hero selects row (country + category side by side on mobile) */
.search-selects-row { display: contents; }

/* Hero Search Bar */
.hero-search {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.2);
    max-width: 1050px;
    margin: 0 auto 40px;
    position: relative;
    z-index: 2;
}

.hero-search .search-field {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 16px;
    flex: 1;
    min-width: 0;
    border-radius: 12px;
    transition: background var(--transition-fast);
    cursor: pointer;
}

.hero-search .search-field:hover {
    background: rgba(var(--primary-rgb), 0.04);
}

.hero-search .search-field-main {
    flex: 1.4;
}

.hero-search .search-field-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.08) 0%, rgba(var(--primary-rgb), 0.15) 100%);
    border-radius: 12px;
    color: var(--primary);
    font-size: 15px;
    flex-shrink: 0;
    transition: all var(--transition);
}

.hero-search .search-field:hover .search-field-icon {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.12) 0%, rgba(var(--primary-rgb), 0.22) 100%);
    transform: scale(1.05);
}

.hero-search .search-field-body {
    flex: 1;
    min-width: 0;
}

.hero-search .search-field-label {
    display: block;
    font-size: 11px;
    font-weight: var(--font-weight-semibold);
    color: var(--gray-500);
    letter-spacing: 0.3px;
    margin-bottom: 1px;
    line-height: 1.2;
}

.hero-search .form-control,
.hero-search .form-select {
    border: none;
    height: 26px;
    font-size: 14px;
    padding: 0;
    background: transparent;
    color: var(--text-primary);
    font-weight: var(--font-weight-medium);
    line-height: 26px;
}

.hero-search .form-control:focus,
.hero-search .form-select:focus {
    box-shadow: none;
    outline: none;
}

.hero-search .form-control::placeholder {
    color: var(--gray-400);
    font-weight: var(--font-weight-normal);
}

.hero-search .form-select {
    cursor: pointer;
}

.hero-search .btn-search {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    border: none;
    border-radius: 14px;
    width: 52px;
    height: 52px;
    font-size: 18px;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.35);
    cursor: pointer;
}

.hero-search .btn-search:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.45);
}

.hero-search .btn-search:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(var(--primary-rgb), 0.3);
}

/* Select2 inside hero search */
.hero-search .select2-container {
    width: 100% !important;
}

.hero-search .select2-container .select2-selection--single {
    border: none !important;
    background: transparent !important;
    height: 26px !important;
    padding: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}

.hero-search .select2-container .select2-selection--single .select2-selection__rendered {
    padding: 0 !important;
    padding-left: 20px !important;
    line-height: 26px !important;
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    white-space: nowrap;
}

.hero-search .select2-container .select2-selection--single .select2-selection__arrow {
    height: 26px !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
}

.hero-search .select2-container .select2-selection--single .select2-selection__arrow b {
    border-color: var(--gray-400) transparent transparent transparent !important;
}

/* Select2 dropdown animation */
.select2-container--open .select2-dropdown {
    animation: s2SlideDown 0.25s ease-out;
    width: max-content !important;
    min-width: 0 !important;
}

@keyframes s2SlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero select dropdown anchored to field */
.hero-search .search-field { position: relative; }
.hero-search .search-field .select2-container--open .select2-dropdown {
    min-width: 200px !important;
    width: max-content !important;
}

.hero-search .search-divider {
    width: 1px;
    height: 36px;
    background: var(--gray-300);
    flex-shrink: 0;
    margin: 0 4px;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.hero-stat {
    text-align: center;
    color: var(--white);
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 20px 28px;
    transition: transform 0.3s, background 0.3s;
    min-width: 130px;
}

.hero-stat:hover {
    transform: translateY(-4px);
    background: rgba(255,255,255,0.14);
}

.hero-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(99,102,241,0.2);
    color: #a78bfa;
    margin: 0 auto 10px;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.85);
    transition: all var(--transition);
}

.hero-stat:hover .hero-stat-icon {
    color: var(--white);
    transform: translateY(-2px);
}

.hero-stat-number {
    font-size: 32px;
    font-weight: var(--font-weight-bold);
    display: block;
}

.hero-stat-label {
    font-size: var(--font-size-sm);
    opacity: 0.8;
}

/* === SECTION COMMON === */
.section {
    padding: var(--section-padding) 0;
}

.section-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header .view-all {
    color: var(--primary);
    font-weight: var(--font-weight-medium);
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-header .view-all:hover {
    gap: 10px;
}

/* Quick action cards styles moved to inline in home/index.php */

/* === JOB CARDS === */
.job-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    height: 100%;
}

.job-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(var(--primary-rgb), 0.3);
}

.job-card .badge-featured {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--accent);
    color: var(--white);
    padding: 4px 12px;
    border-radius: var(--border-radius-pill);
    font-size: 11px;
    font-weight: var(--font-weight-semibold);
}

.job-card .badge-urgent {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--danger);
    color: var(--white);
    padding: 4px 12px;
    border-radius: var(--border-radius-pill);
    font-size: 11px;
}

.job-card-header {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.job-card-logo {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius);
    object-fit: cover;
    border: 1px solid var(--gray-200);
    flex-shrink: 0;
}

.job-card-title {
    font-size: 16px;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.job-card-company {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.job-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.job-card-meta i {
    color: var(--primary);
    margin-left: 4px;
    width: 16px;
}

.job-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

.job-card-salary {
    font-weight: var(--font-weight-semibold);
    color: var(--success);
}

.job-card-time {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.job-card .btn-save {
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: 18px;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.job-card .btn-save:hover,
.job-card .btn-save.saved {
    color: var(--danger);
}

/* Category cards styles moved to inline in home/index.php */

/* === COUNTRIES SECTION === */
.countries-section {
    padding: var(--section-padding) 0;
    background: linear-gradient(160deg, #0a1628 0%, #0d2137 40%, #0f2847 100%);
    position: relative;
    overflow: hidden;
}
.countries-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(26,35,126,0.08) 0%, transparent 70%);
    pointer-events: none;
}
.countries-section::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -15%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,111,0,0.06) 0%, transparent 70%);
    pointer-events: none;
}
.countries-header {
    margin-bottom: 36px;
}
.countries-header-content {
    display: flex;
    align-items: center;
    gap: 16px;
}
.countries-header-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgb(202 206 243 / 15%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #ffffff;
    flex-shrink: 0;
}
.countries-header-content h2 {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 4px;
}
.countries-header-content p {
    font-size: 14px;
    color: rgba(255,255,255,0.55);
    margin: 0;
}

/* Country Card */
.country-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 8px 22px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 20px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    position: relative;
    backdrop-filter: blur(4px);
}
.country-card:hover {
    transform: translateY(-6px);
    background: rgba(255,255,255,0.08);
    border-color: rgba(26,35,126,0.3);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 0 20px rgba(26,35,126,0.1);
}

/* Flag Circle */
.country-flag-circle {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    position: relative;
    padding-top: 0;
}
.country-flag-emoji {
    font-size: 42px;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.country-card:hover .country-flag-emoji {
    transform: scale(1.15);
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
}
.country-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.1);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.country-card:hover .country-ring {
    border-color: rgb(78 216 240);
    box-shadow: 0 0 16px rgb(76 211 234), inset 0 0 12px rgba(26, 35, 126, 0.08);
    transform: scale(1.06);
    background-color: #4cd3ea8c;
}

/* Country Info */
.country-card .country-name {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    margin-bottom: 8px;
    line-height: 1.3;
    transition: var(--transition);
}
.country-card:hover .country-name {
    color: #fff;
}
.country-jobs-badge {
    font-size: 11px;
    color: #475f7d;
    background: rgba(26,35,126,0.12);
    padding: 3px 12px;
    border-radius: 20px;
    font-weight: 600;
    border: 1px solid rgba(26,35,126,0.15);
    transition: var(--transition);
}
.country-card:hover .country-jobs-badge {
    background: rgba(26,35,126,0.2);
    border-color: rgba(26,35,126,0.35);
    color: #4dd8f0;
}

/* Browse More */
.countries-browse-btn {
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50px;
    padding: 10px 28px;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    background: transparent;
}
.countries-browse-btn:hover {
    background: rgba(26,35,126,0.15);
    border-color: rgba(26,35,126,0.4);
    color: #4dd8f0;
}

@media (min-width: 1200px) {
    #countriesGrid .country-item { flex: 0 0 12.5%; max-width: 12.5%; }
}
@media (max-width: 576px) {
    .country-flag-circle { width: 60px; height: 60px; }
    .country-flag-emoji { font-size: 32px; }
    .country-card { padding: 18px 6px 16px; border-radius: 14px; }
    .country-card .country-name { font-size: 11px; }
}

/* === JOB LISTING PAGE === */
.filters-sidebar {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.filter-group {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--gray-200);
}

.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-group h5 {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    margin-bottom: 16px;
    color: var(--text-primary);
}

/* Sidebar filter links (used in global sidebar + search page) */
.filter-search-input {
    margin-bottom: 12px;
    border-radius: 8px;
    font-size: 13px;
    border: 1px solid var(--gray-300, #e0e0e0);
    padding: 8px 12px;
}
.filter-search-input:focus {
    border-color: var(--primary, #1a237e);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 26, 35, 126), 0.08);
}
.filter-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.filter-links-list li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-secondary, #616161);
    text-decoration: none;
    transition: all 0.2s ease;
}
.filter-links-list li a:hover {
    background: rgba(var(--primary-rgb, 26, 35, 126), 0.06);
    color: var(--primary, #1a237e);
}
.filter-links-list li a.active {
    background: rgba(var(--primary-rgb, 26, 35, 126), 0.1);
    color: var(--primary, #1a237e);
    font-weight: 600;
}
.filter-count {
    font-size: 12px;
    background: var(--gray-100, #f5f5f5);
    color: var(--text-muted, #9e9e9e);
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 28px;
    text-align: center;
}
.filter-links-list li a.active .filter-count {
    background: var(--primary, #1a237e);
    color: #fff;
}
.btn-load-more {
    display: block;
    width: 100%;
    background: none;
    border: 1px dashed var(--gray-300, #e0e0e0);
    border-radius: 8px;
    padding: 8px;
    font-size: 13px;
    color: var(--primary, #1a237e);
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s ease;
}
.btn-load-more:hover {
    background: rgba(var(--primary-rgb, 26, 35, 126), 0.04);
    border-color: var(--primary, #1a237e);
}

/* Global content with sidebar layout */
.global-content-with-sidebar {
    background: var(--bg-light, #f8f9fa);
    min-height: 400px;
}

.view-toggle .btn {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background: var(--white);
    color: var(--text-secondary);
}

.view-toggle .btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

/* === JOB DETAIL PAGE === */
.job-detail-header {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.job-detail-header .company-logo {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius);
    border: 2px solid var(--gray-200);
}

.btn-apply {
    background: var(--primary);
    color: var(--white);
    padding: 14px 40px;
    border: none;
    border-radius: var(--border-radius-pill);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    transition: all var(--transition);
}

.btn-apply:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    color: var(--white);
}

.btn-apply-sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 16px 24px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    z-index: var(--z-sticky);
    display: none;
}

/* === FOOTER === */
.main-footer {
    background: var(--bg-footer);
    color: rgba(255, 255, 255, 0.8);
    padding: 60px 0 0;
}

.main-footer h5 {
    color: var(--white);
    font-weight: var(--font-weight-semibold);
    margin-bottom: 20px;
    font-size: var(--font-size-base);
}

.main-footer a {
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--transition-fast);
}

.main-footer a:hover {
    color: #ffffff !important;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links li a {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links li a i {
    font-size: 10px;
    color: #9ba7f5;
}

.newsletter-input {
    display: flex;
    gap: 8px;
}

.newsletter-input .form-control {
    border-radius: var(--border-radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    padding: 10px 20px;
}

.newsletter-input .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.newsletter-input .btn {
    border-radius: var(--border-radius-pill);
    background: #3145d0;
    color: var(--white);
    border: none;
    padding: 3px 16px;
    white-space: nowrap;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    margin-top: 40px;
    font-size: var(--font-size-sm);
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-circle);
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    margin-left: 8px;
    transition: all var(--transition-fast);
    font-size: 16px;
}

.social-links a:hover {
    background: #3045cf;
    transform: translateY(-3px);
}

/* === PROFILE/DASHBOARD === */
.profile-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: var(--border-radius-circle);
    border: 4px solid var(--primary);
    object-fit: cover;
}

.progress-bar-completeness {
    height: 8px;
    border-radius: 4px;
    background: var(--gray-200);
}

.progress-bar-completeness .progress-bar {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
}

.status-badge {
    padding: 6px 14px;
    border-radius: var(--border-radius-pill);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
}

.status-pending { background: #fff3e0; color: #e65100; }
.status-reviewed { background: #e3f2fd; color: #1565c0; }
.status-shortlisted { background: #e8f5e9; color: #2e7d32; }
.status-interviewed { background: #f3e5f5; color: #7b1fa2; }
.status-offered { background: #e0f7fa; color: #00695c; }
.status-hired { background: #e8f5e9; color: #1b5e20; }
.status-rejected { background: #ffebee; color: #b71c1c; }

/* === AUTH PAGES === */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hero);
    padding: 40px 20px;
}

.auth-card {
    background: var(--white);
    border-radius: var(--border-radius-xl);
    padding: 48px;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-xl);
}

.auth-card .logo {
    max-height: 50px;
    margin-bottom: 32px;
}

.auth-card h2 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: 8px;
}

.auth-card .subtitle {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* Role Selector Cards */
.role-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 28px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8fafc;
    min-width: 140px;
}
.role-card:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}
.role-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #94a3b8;
    transition: all 0.3s ease;
}
.role-card span {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    transition: color 0.3s ease;
}
.btn-check:checked + .role-card {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.04);
    box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.12);
}
.btn-check:checked + .role-card .role-icon {
    background: var(--primary);
    color: #fff;
}
.btn-check:checked + .role-card span {
    color: var(--primary);
}

/* === BUTTONS === */
.btn-primary-custom {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 12px 32px;
    border-radius: var(--border-radius);
    font-weight: var(--font-weight-semibold);
    transition: all var(--transition);
}

.btn-primary-custom:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    color: var(--white);
}

.btn-outline-custom {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 10px 30px;
    border-radius: var(--border-radius);
    font-weight: var(--font-weight-semibold);
    transition: all var(--transition);
}

.btn-outline-custom:hover {
    background: var(--primary);
    color: var(--white);
}

/* === LOADING STATES === */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    backdrop-filter: blur(4px);
}

/* Ibnbattouta branded search-lens loader */
.ibn-loader {
    width: 56px;
    height: 56px;
    animation: ibnSearch 1.8s ease-in-out infinite;
    filter: drop-shadow(0 2px 8px rgba(0, 171, 211, 0.3));
}
.ibn-loader.ibn-loader-sm { width: 32px; height: 32px; }
.ibn-loader.ibn-loader-lg { width: 80px; height: 80px; }
.ibn-loader .lens-glass {
    animation: ibnPulse 1.8s ease-in-out infinite;
    transform-origin: center;
}

@keyframes ibnSearch {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    25%      { transform: translateX(8px) rotate(-8deg); }
    50%      { transform: translateX(-4px) rotate(4deg); }
    75%      { transform: translateX(6px) rotate(-5deg); }
}
@keyframes ibnPulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.6; }
}

/* Legacy spinner fallback */
.spinner-custom {
    width: 48px;
    height: 48px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: var(--border-radius-circle);
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Page preloader */
.page-preloader {
    position: fixed;
    inset: 0;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.4s, visibility 0.4s;
}
.page-preloader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.page-preloader .preloader-text {
    margin-top: 16px;
    color: var(--gray-500);
    font-size: 14px;
    animation: ibnPulse 1.8s ease-in-out infinite;
}

/* SweetAlert2 branded loader */
.swal2-ibn-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 20px 0;
}

/* === RESPONSIVE === */
@media (max-width: 991px) {
    .hero-title {
        font-size: 32px;
    }
    .hero-search {
        flex-direction: column;
        padding: 14px;
        gap: 6px;
        border-radius: 18px;
        align-self: center;
        margin-bottom: 52px;
        box-shadow: 0 12px 40px rgba(0,0,0,0.1), 0 0 0 1px rgba(255,255,255,0.15);
    }
    .hero-search .search-field {
        padding: 10px 12px;
        border-radius: 12px;
        background: var(--gray-50);
        border: 1px solid transparent;
        transition: all 0.25s ease;
    }
    .hero-search .search-field:hover,
    .hero-search .search-field:focus-within {
        background: #fff;
        border-color: rgba(var(--primary-rgb), 0.2);
        box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.06);
    }
    .hero-search .search-field-label {
        display: none;
    }
    .hero-search .search-field-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        font-size: 14px;
    }
    .hero-search .search-field-main {
        flex: none;
        width: 100%;
    }
    .hero-search .search-divider {
        display: none;
    }
    .search-selects-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        width: 100%;
    }
    .search-selects-row .search-field {
        flex: none;
        width: 100% !important;
        min-width: 0;
    }
    .hero-search .form-select,
    .hero-search .form-control {
        font-size: 13px;
        height: 24px;
        line-height: 24px;
    }
    .hero-search .btn-search {
        width: 100%;
        height: 48px !important;
        border-radius: 12px;
        margin-top: 2px;
        padding: 12px 20px;
        font-size: 18px;
        margin-bottom: 0;
        background: linear-gradient(135deg, #ff7701, #ff9a3c);
        box-shadow: 0 4px 16px rgba(255,119,1,0.3);
    }
    .hero-search .btn-search:active {
        transform: scale(0.98);
    }
    .hero-stats {
        gap: 10px;
        justify-content: center;
        flex-wrap: wrap;
    }
    .hero-stat {
        padding: 12px 16px;
        border-radius: 12px;
    }
    .section {
        padding: 50px 0;
    }
    .filters-sidebar {
        position: static;
        margin-bottom: 24px;
    }
    /* Mobile: Select2 replaced by fullscreen modal */
    .hero-search {
        position: relative;
        overflow: visible;
    }
}

@media (max-width: 767px) {
    .hero-title {
        font-size: 26px;
    }
    .hero-stat-number {
        font-size: 22px;
    }
    .hero-stat {
        padding: 10px 14px;
    }
    .hero-stats {
        flex-wrap: wrap;
        gap: 8px;
    }
    .hero-section {
        padding: 50px 0 70px;
    }
    .job-detail-header {
        padding: 24px;
    }
    .auth-card {
        padding: 32px 24px;
    }
    .btn-apply-sticky {
        display: block;
    }
    /* Newsletter stacking */
    .newsletter-input {
        flex-direction: row;
    }
    .newsletter-input .form-control,
    .newsletter-input .btn {
    }
    /* Section header stacking */
    .section-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 12px;
    }
    /* Floating apply safe-area */
    .btn-apply-sticky,
    .floating-apply {
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }
    .main-footer {
        padding: 40px 0 0;
    }
}

@media (max-width: 575px) {
    .hero-stats {
        display: flex;
        flex-wrap: nowrap;
        gap: 6px;
        justify-content: center;
    }
    .hero-stat {
        padding: 8px 10px;
        border-radius: 10px;
        flex: 1 1 0;
        min-width: 0;
    }
    .hero-stat-icon {
        width: 26px;
        height: 26px;
        font-size: 12px;
        margin-bottom: 2px;
    }
    .hero-stat-number {
        font-size: 17px;
    }
    .hero-stat-label {
        font-size: 9px;
    }
    .job-card {
        padding: 16px;
    }
    .section-title {
        font-size: 20px;
    }
    .section-subtitle {
        font-size: 14px;
    }
    .section {
        padding: 40px 0;
    }
    .auth-card {
        padding: 24px 16px;
    }
}

@media (max-width: 480px) {
    /* Hero */
    .hero-section {
        padding: 36px 0 56px;
    }
    .hero-title {
        font-size: 22px;
    }
    .hero-subtitle {
        font-size: 14px;
    }
    .hero-stats {
        gap: 4px;
    }
    .hero-stat {
        padding: 6px 6px;
    }
    .hero-stat-icon {
        width: 22px;
        height: 22px;
        font-size: 10px;
    }
    .hero-stat-number {
        font-size: 15px;
    }
    .hero-stat-label {
        font-size: 8px;
    }
    .hero-search {
        padding: 10px;
        border-radius: 14px;
    }
    .hero-search .search-field {
        padding: 7px 8px;
        gap: 8px;
    }
    .hero-search .search-field-icon {
        width: 32px;
        height: 32px;
        font-size: 12px;
        border-radius: 8px;
    }
    .hero-search .form-select,
    .hero-search .form-control {
        font-size: 12px;
        height: 22px;
        line-height: 22px;
    }
    .hero-search .btn-search {
        height: 44px !important;
        font-size: 16px;
        border-radius: 10px;
    }
    /* Country cards */
    .country-card {
        padding: 14px 4px 12px;
    }
    .country-flag-circle {
        width: 50px;
        height: 50px;
    }
    .country-flag-emoji {
        font-size: 26px;
    }
    .country-card .country-name {
        font-size: 10px;
    }
    .country-jobs-badge {
        font-size: 9px;
        padding: 2px 8px;
    }
    /* Job cards */
    .job-card-footer {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    .job-detail-header {
        padding: 16px;
    }
    /* Footer */
    .social-links a {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    .main-footer {
        padding: 30px 0 0;
    }
    .footer-bottom {
        font-size: 12px;
        padding: 16px 0;
    }
}

/* ── Employer Limits Progress Bars ── */
.limits-bars {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    padding: 14px 18px;
    border: 1px solid rgba(255,255,255,0.1);
    flex: 1;
    min-width: 0;
}
.limits-bars-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.85);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.limits-bars-title i { font-size: 15px; opacity: 0.7; }
.limits-bars-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.limits-bar-item {}
.limits-bar-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
}
.limits-bar-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}
.limits-bar-label {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
}
.limits-bar-track {
    height: 26px;
    background: rgba(255,255,255,0.1);
    border-radius: 13px;
    overflow: hidden;
    position: relative;
}
.limits-bar-fill {
    height: 100%;
    width: var(--bar-pct);
    border-radius: 13px;
    background: var(--bar-color);
    position: absolute;
    top: 0;
    right: 0;
    animation: barGrow 1.2s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
    box-shadow: 0 0 10px var(--bar-color);
}
.limits-bar-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 30%, rgba(255,255,255,0.25));
    border-radius: 13px;
}
.limits-bar-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    z-index: 1;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    letter-spacing: 0.5px;
}
@keyframes barGrow {
    from { width: 0; }
    to { width: var(--bar-pct); }
}
/* Add Job Button */
.btn-add-job {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(34,197,94,0.35);
    transition: all 0.25s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}
.btn-add-job:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(34,197,94,0.45);
}
.btn-add-job:active { transform: translateY(0); }
.btn-add-job-sm {
    padding: 7px 14px !important;
    font-size: 12px !important;
    border-radius: 10px !important;
    box-shadow: 0 3px 10px rgba(34,197,94,0.3) !important;
}
/* Limits accordion arrow — hidden on desktop */
.limits-bars-arrow { display: none; }
.limits-bars-title { cursor: default; }
@media (max-width: 991px) {
    .limits-bars-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .limits-bars { padding: 12px 14px; }
    /* Accordion on mobile */
    .limits-bars-arrow {
        display: inline-block;
        margin-right: auto;
        font-size: 12px;
        transition: transform 0.3s;
        opacity: 0.6;
    }
    .limits-bars-title { cursor: pointer; }
    .limits-bars-body {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
    }
    .limits-bars.limits-open .limits-bars-body {
        max-height: 300px;
    }
    .limits-bars.limits-open .limits-bars-arrow {
        transform: rotate(180deg);
    }
    .limits-bars-title {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }
    .limits-bars.limits-open .limits-bars-title {
        margin-bottom: 12px;
        padding-bottom: 8px;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
}

/* --- Custom Interview Icon (replaces fa-robot) --- */
.icon-interview {
    display: inline-block;
    width: 1.2em;
    height: 1em;
    background-color: currentColor;
    -webkit-mask-image: url('../img/interview_icon.svg');
    mask-image: url('../img/interview_icon.svg');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    vertical-align: -0.125em;
}
