/*
Theme Name: Click Jobly Jobs
Theme URI: https://clickjobly.com/
Description: Professional job listing theme - SEO optimized and resource friendly
Version: 3.8.0
Author: Click Jobly
Author URI: https://clickjobly.com/
Text Domain: naqra-theme
License: GPL v2 or later
*/

/* -----------------------------------------------------------
   1. VARIABLES & ROOT
----------------------------------------------------------- */
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

/* -----------------------------------------------------------
   2. RESET & BASE
----------------------------------------------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    direction: ltr;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* -----------------------------------------------------------
   3. CONTAINERS
----------------------------------------------------------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* -----------------------------------------------------------
   4. HEADER
----------------------------------------------------------- */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
}

.site-logo {
    font-size: 26px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.site-logo:hover {
    color: var(--primary-dark);
}

.site-logo svg {
    width: 32px;
    height: 32px;
    order: 1;
}

.site-logo span {
    order: 2;
}

/* -----------------------------------------------------------
   5. NAVIGATION DESKTOP
----------------------------------------------------------- */
.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-left: auto;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.main-nav a {
    color: var(--gray-700);
    font-weight: 500;
    font-size: 15px;
    padding: 8px 12px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
    background: var(--gray-100);
}

/* -----------------------------------------------------------
   6. CTA BUTTON
----------------------------------------------------------- */
.nav-cta {
    margin-left: 15px;
}

.btn-add-job {
    background: linear-gradient(135deg, #ff9800 0%, #f44336 100%) !important;
    color: #ffffff !important;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 900;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
    border: none !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
}

.btn-add-job:hover,
.btn-add-job:active,
.btn-add-job:focus {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px rgba(244, 67, 54, 0.5);
    background: linear-gradient(135deg, #fb8c00 0%, #d32f2f 100%) !important;
    color: #ffffff !important;
    text-decoration: none;
}

.btn-add-job svg {
    width: 18px;
    height: 18px;
    stroke-width: 4;
    color: #fff !important;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--gray-700);
}

.mobile-menu-toggle svg {
    width: 28px;
    height: 28px;
}

/* -----------------------------------------------------------
   7. HERO SECTION
----------------------------------------------------------- */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 60px 0;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.05)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-title {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.95;
    font-weight: 400;
}

/* -----------------------------------------------------------
   8. SEARCH BOX
----------------------------------------------------------- */
.search-box {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 35px;
    box-shadow: var(--shadow-xl);
    max-width: 900px;
    margin: 0 auto;
}

.search-form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 15px;
    align-items: end;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.form-control,
.form-select {
    padding: 14px 18px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition);
    background: var(--white);
    color: var(--gray-900);
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-select {
    cursor: pointer;
}

.btn-search {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 14px 35px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-search:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* -----------------------------------------------------------
   9. COUNTRIES SECTION
----------------------------------------------------------- */
.countries-section {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 34px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--gray-600);
}

.country-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.country-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.country-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--gray-100);
}

.country-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 12px;
}

.country-flag {
    font-size: 32px;
}

.country-count {
    background: var(--primary);
    color: var(--white);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
}

.view-all-link {
    color: var(--primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
}

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

/* -----------------------------------------------------------
   10. JOBS GRID & CARDS
----------------------------------------------------------- */
.jobs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.job-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.job-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    transform: scaleY(0);
    transition: var(--transition);
}

.job-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateX(3px);
}

.job-card:hover::before {
    transform: scaleY(1);
}

.job-header-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.job-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
    line-height: 1.4;
}

.job-title a { color: inherit; }
.job-title a:hover { color: var(--primary); }

.job-time {
    background: var(--success);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: var(--gray-600);
}

.job-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.job-meta-item svg {
    width: 16px;
    height: 16px;
    color: var(--gray-500);
}

.job-excerpt {
    color: var(--gray-700);
    line-height: 1.6;
    margin-bottom: 18px;
    font-size: 14px;
}

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

.days-remaining {
    font-size: 13px;
    color: var(--gray-600);
    font-weight: 600;
}

.days-remaining.urgent {
    color: var(--danger);
}

.btn-view {
    background: var(--primary);
    color: var(--white);
    padding: 8px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-view:hover {
    background: var(--primary-dark);
    transform: translateX(3px);
}

/* -----------------------------------------------------------
   11. EMPTY STATES & UTILITIES
----------------------------------------------------------- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-600);
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    color: var(--gray-400);
}

.empty-state h3 {
    font-size: 20px;
    color: var(--gray-700);
    margin-bottom: 8px;
}

/* -----------------------------------------------------------
   12. FOOTER STYLES
----------------------------------------------------------- */
.site-footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 50px 0 30px;
    margin-top: 80px;
    text-align: center;
}

.footer-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 15px;
}

.footer-text { margin-bottom: 10px; font-size: 15px; }

.footer-copyright {
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: var(--gray-500);
}

/* -----------------------------------------------------------
   13. RESPONSIVE & MOBILE
----------------------------------------------------------- */
@media (max-width: 992px) {
    .search-form { grid-template-columns: 1fr 1fr; }
    .btn-search { grid-column: 1 / -1; }
    .hero-title { font-size: 32px; }
}

@media (max-width: 768px) {
    .header-wrapper {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .mobile-menu-toggle {
        order: 2;
        display: block;
        margin-left: 0;
        margin-right: 0;
    }

    .site-logo {
        order: 1;
        flex-grow: 1;
        justify-content: flex-start;
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .site-logo span {
        order: 2;
        white-space: nowrap;
    }

    .site-logo svg {
        order: 1;
        margin-right: 0;
        margin-left: 8px;
    }

    .main-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        box-shadow: 5px 0 15px rgba(0,0,0,0.1);
        padding: 80px 20px 20px;
        transition: left 0.4s ease;
        z-index: 999;
        margin: 0;
        flex-direction: column;
        align-items: flex-start;
        display: flex;
    }

    .main-nav.active { left: 0; }

    .main-nav ul {
        flex-direction: column;
        width: 100%;
        gap: 10px;
        display: flex !important;
    }

    .main-nav a {
        width: 100%;
        display: block;
        padding: 15px 12px;
        border-bottom: 1px solid var(--gray-100);
        border-radius: 0;
        font-weight: 700;
    }

    .nav-cta {
        margin: 30px 0 0 0;
        width: 100%;
        padding: 0 5px;
    }

    .btn-add-job {
        width: 100%;
        justify-content: center;
        padding: 18px;
        font-size: 16px;
        border-radius: 12px;
    }

    .search-form { grid-template-columns: 1fr; }
    .jobs-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 28px; }
    .search-box { padding: 25px 20px; }
    .country-header { flex-direction: column; align-items: flex-start; gap: 15px; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 24px; }
    .section-title { font-size: 22px; }
    .job-card { padding: 18px; }
}

/* -----------------------------------------------------------
   14. SPINNER & LOADING
----------------------------------------------------------- */
.text-center { text-align: center; }
.spinner { border: 3px solid var(--gray-200); border-top-color: var(--primary); border-radius: 50%; width: 40px; height: 40px; animation: spin 0.8s linear infinite; margin: 20px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
img.loading { opacity: 0; transition: opacity 0.3s ease; }
img.loaded { opacity: 1; }
