/* ==========================================================================
   JobNest Saudi Arabia — shared colour theme (index.php, foreign_jobs.php)
   Colours only: layout, sizes and spacing stay with the original JobNest
   styles. Dark green (Saudi Arabia's national colour) is the dominant
   accent, with JobNest Blue kept as a secondary shading in gradients.
   Mirrors the same override pattern as JobNest Qatar's qatar-theme.css.
   Load after base.css and the page's own inline styles.
   ========================================================================== */

:root {
    --sa-blue: #0B63BB;
    --sa-navy: #06344D;
    /* Official Saudi Arabia flag green, not the generic JobNest brand green. */
    --sa-green: #006C35;
    --sa-green-dark: color-mix(in srgb, var(--sa-green) 78%, #000);
    --sa-green-light: color-mix(in srgb, var(--sa-green) 10%, #fff);
}

/* ------------------------------------------------------------ hero search */
/* btn-search left at its original base.css navy - not themed here. */
.autocomplete-dropdown .suggestion-item:hover { color: var(--sa-green-dark); background: var(--sa-green-light); }

/* ------------------------------------------------------------ filter bar */
/* Dark green dominant, shading through JobNest blue toward the left edge */
.jobs-toolbar {
    background: linear-gradient(90deg, var(--sa-navy) 0%, var(--sa-blue) 30%, var(--sa-green-dark) 68%, var(--sa-green) 100%);
}
.jobs-toolbar .foreign-job-btn:hover { color: var(--sa-green-dark); }

/* ------------------------------------------------------------ categories */
.sidebar-head {
    background: linear-gradient(90deg, var(--sa-navy) 0%, var(--sa-blue) 35%, var(--sa-green-dark) 100%);
}

/* ------------------------------------------------------------ mobile */
@media (max-width: 768px) {
    .category-tab { background: #0f3950; }
}

/* ------------------------------------------------------------ job cards on phones */
/* The pages clamp titles to 2 lines and base.css to 3 with a different
   line-height, so part of a third line showed over the text below. One
   consistent 2-line clamp that breaks between words, not inside them.
   (This file loads before the pages' own <style>, hence "body #job-listings".) */
@media (max-width: 767px) {
    body #job-listings .job-title {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-height: 1.3;
        min-height: 2.6em;
        max-height: 2.6em;
        overflow: hidden;
        word-break: normal;
        overflow-wrap: break-word;
        hyphens: auto;
    }
}


/* ------------------------------------------------------------ logo strip on phones */
/* On desktop the logo strip overlays the bottom of the hero photo. On phones
   it used to sit below the hero on the plain white page, so pull it back
   onto the photo and give the hero room at the bottom for it. */
@media (max-width: 768px) {
    body section.hero { padding-bottom: 44px !important; }
    body section .slider {
        margin-top: -40px !important;
        margin-bottom: 0 !important;
        background: transparent !important;
    }
}
@media (max-width: 480px) {
    body section.hero { padding-bottom: 36px !important; }
    body section .slider { margin-top: -32px !important; }
}

/* ------------------------------------------------------------ logo strip on portrait tablets */
/* The page shrinks the hero to 24px bottom padding on portrait tablets
   (e.g. iPad Air 820x1180), but the 60px logo strip is still pulled 50px up
   into it, so the logos landed on the search box and button. Leave room for
   the strip below the search, the same gap as in landscape. */
@media (min-width: 769px) and (max-width: 1199px) and (orientation: portrait) {
    body section.hero { padding-bottom: 80px !important; }
}

/* ------------------------------------------------------------ approx. SAR salary */
/* Approximate SAR equivalent under a foreign job's original-currency salary
   (jobnest.lk's "Approx. LKR" line). Kept here because foreign_jobs.php gets reset. */
.job-salary-lkr {
    display: block;
    margin-top: 2px;
    color: #5f6b7a;
    font-size: 0.62rem;
    font-weight: 600;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

/* ------------------------------------------------------------ logo strip layering */
/* The strip is pulled up over the hero photo; foreign_jobs.php's .slider rule
   lacks index.php's position/z-index, so the photo covered the logos there. */
.slider {
    position: relative;
    z-index: 10;
}
/* foreign_jobs.php still pulls the logo section up 20px on phones (index.php
   no longer does), which tucked the logos under the search bar there. */
@media (max-width: 768px) {
    body section:has(> .slider) { margin-top: 0 !important; }
}
