/* ================= CAREERS PAGE ================= */
:root {
    --choco-dark: #3b2116;
    --choco: #6b3e26;
    --choco-light: #a0673f;
    --gold: #c8964f;
    --cream: #faf6f1;
    --text: #555;
    --border: #eee3d8;
    --hero-blur: 5px;   /* درجة التغبيش في خلفية الـ Hero: زودها أو قللها */
}
.main-navbar {
    padding: 10px 0;
    border-bottom: 1px solid #f2f2f2;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease, transform 0.38s cubic-bezier(0.4,0,0.2,1);
    background-image: linear-gradient(180deg, #ffffff 0%, #fdf8f1 100%);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}
.main-navbar.scrolled { box-shadow: 0 4px 25px rgba(0,0,0,0.1); }
.main-navbar::after {
    content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, #d4af37 20%, #b02a26 50%, #d4af37 80%, transparent);
    background-size: 200% 100%;
    animation: shimmerMove 6s linear infinite;
}

.main-navbar .navbar-brand img { height: 42px; width: auto; object-fit: contain; }
.main-navbar .navbar-brand { transition: opacity 0.2s ease; }
.main-navbar .navbar-brand:hover { opacity: 0.85; }

.main-navbar .nav-link {
    color: #2b2b2b !important; font-weight: 600; text-transform: uppercase;
    font-size: 0.85rem; letter-spacing: 0.8px; padding: 8px 0 !important;
    display: inline-flex; align-items: center; gap: 4px;
    transition: color 0.2s ease; white-space: nowrap;
}
.main-navbar .nav-link:hover,
.main-navbar .nav-link.active { color: #b02a26 !important; }
.main-navbar .nav-link::after { display: none !important; }

.main-navbar .navbar-toggler {
    border: 1.5px solid #ecdccb !important; border-radius: 8px;
    padding: 7px 10px !important; flex-shrink: 0;
}
.main-navbar .navbar-toggler:focus { box-shadow: none !important; }
.main-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba%2874,44,17,0.85%29' stroke-width='2.4' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E") !important;
    width: 22px; height: 22px;
}
.main-navbar .social-icons a {
    color: #555; font-size: 1rem;
    transition: color 0.2s ease, transform 0.2s ease; display: inline-block;
}
.main-navbar .social-icons a:hover { color: #b02a26; transform: translateY(-2px); }

/* ── Dropdown toggle arrows ── */
.products-dropdown .nav-link.dropdown-toggle,
.new-dropdown .nav-link.dropdown-toggle { display: inline-flex; align-items: center; gap: 6px; }
.products-dropdown .nav-link.dropdown-toggle::before,
.new-dropdown .nav-link.dropdown-toggle::before {
    content: '▾'; font-size: 0.85rem; line-height: 1; transition: transform 0.25s ease;
}
.products-dropdown.show .nav-link.dropdown-toggle::before,
.new-dropdown.show .nav-link.dropdown-toggle::before { transform: rotate(180deg); }

/* ── BRANDS dropdown ── */
.products-dropdown-menu {
    border: none; border-radius: 14px; padding: 4px 0;
    margin-top: 12px !important; min-width: 220px; max-width: 220px;
    background-color: #fff;
    box-shadow: 0 16px 45px rgba(44,26,14,0.18), 0 0 0 1px rgba(44,26,14,0.06);
    overflow: hidden; animation: fadeDownMenu 0.22s cubic-bezier(0.22,1,0.36,1);
}
.products-dropdown-menu li { border-bottom: 1px solid #f3ebe1; }
.products-dropdown-menu li:last-child { border-bottom: none; }
.products-dropdown-menu .dropdown-item {
    padding: 1px 10px; display: flex; align-items: center; justify-content: center;
    transition: background-color 0.2s ease;
}
.products-dropdown-menu .dropdown-item:hover,
.products-dropdown-menu .dropdown-item:focus { background-color: #fdf6ee; }
.products-dropdown-menu .dropdown-item img {
    max-height: var(--logo-h, 52px); max-width: var(--logo-w, 160px);
    width: auto; height: auto; object-fit: contain; display: block;
    mix-blend-mode: multiply;
    transition: transform 0.25s ease;
}
.products-dropdown-menu .dropdown-item:hover img { transform: scale(1.05); }

@media (min-width: 992px) {
    .products-dropdown-menu { left: 50%; margin-left: -110px; margin-top: 12px; }
    .products-dropdown:hover .products-dropdown-menu {
        display: block; animation: fadeDownMenu 0.22s cubic-bezier(0.22,1,0.36,1);
    }
}

/* ── NEW dropdown ── */
.new-dropdown-menu {
    border: none; border-radius: 14px; padding: 6px 0;
    margin-top: 14px !important; min-width: 360px; background-color: #fff;
    box-shadow: 0 16px 45px rgba(44,26,14,0.18), 0 0 0 1px rgba(44,26,14,0.05);
    overflow: hidden; list-style: none;
    animation: fadeDownMenu 0.22s cubic-bezier(0.22,1,0.36,1);
}
.new-dropdown-item { border-bottom: 1px solid #f5ede4; }
.new-dropdown-item:last-child { border-bottom: none; }
.new-dropdown-link {
    display: flex; align-items: center; justify-content: space-between;
    gap: 18px; padding: 16px 28px; text-decoration: none; transition: background-color 0.2s ease;
}
.new-dropdown-link:hover { background-color: #fdf6ee; }
.new-dropdown-logo { max-height: 38px; max-width: 170px; object-fit: contain; flex-shrink: 0; }
.new-badge-img     { width: 60px; height: auto; object-fit: contain; flex-shrink: 0; }

@media (min-width: 992px) {
    .new-dropdown-menu { left: 50%; margin-left: -180px; margin-top: 14px; }
    .new-dropdown:hover .new-dropdown-menu {
        display: block; animation: fadeDownMenu 0.22s cubic-bezier(0.22,1,0.36,1);
    }
}

/* ── Responsive ── */
@media (max-width: 991.98px) {
    .main-navbar .container {
        display: flex; flex-wrap: wrap; align-items: center;
        justify-content: space-between; padding: 0 clamp(10px, 3vw, 14px); gap: 0;
    }
    .main-navbar .navbar-brand { flex: 0 0 auto; order: 1; margin: 0; }
    .main-navbar .navbar-brand img { height: clamp(34px, 8vw, 38px); }
    .main-navbar .d-flex.align-items-center {
        flex: 0 0 auto; order: 2; margin-inline-start: auto !important;
        display: flex; align-items: center; gap: 8px !important;
    }
    .main-navbar .social-icons { display: flex; gap: 6px !important; }
    .main-navbar .social-icons a {
        width: 34px; height: 34px; display: inline-flex; align-items: center;
        justify-content: center; border-radius: 50%; background: rgba(74,44,17,0.07);
        color: #555; font-size: 0.9rem; transition: background 0.2s ease, color 0.2s ease;
        text-decoration: none;
    }
    .main-navbar .social-icons a:hover { background: rgba(176,42,38,0.1); color: #b02a26; }
    .main-navbar .navbar-toggler { padding: 6px 9px !important; flex-shrink: 0; }
    .main-navbar .navbar-collapse {
        order: 3; flex: 0 0 100%; width: 100%; overflow: visible;
        background: linear-gradient(160deg, #ffffff 0%, #fdf8f2 100%);
        border-radius: 16px; margin-top: 10px; margin-bottom: 4px;
        border: 1px solid #ede3d8;
        box-shadow: 0 16px 40px rgba(44,26,14,0.12), 0 0 0 1px rgba(236,220,203,0.6);
        padding: 4px 12px 14px;
    }
    .main-navbar .navbar-nav {
        flex-direction: column; align-items: stretch; gap: 0; width: 100%; padding: 0; margin: 0;
    }
    .main-navbar .nav-item { width: 100%; }
    .main-navbar .nav-link {
        display: flex; align-items: center; justify-content: center; gap: 6px;
        font-size: 0.8rem !important; font-weight: 700; letter-spacing: 1.2px;
        padding: 13px 8px !important; width: 100%; border-radius: 0;
        border-bottom: 1px solid rgba(237,219,203,0.8); color: #3d1f0a !important;
        white-space: nowrap; transition: color 0.2s ease, background 0.2s ease, border-radius 0.2s ease;
    }
    .main-navbar .nav-link:hover,
    .main-navbar .nav-link.active { color: #b02a26 !important; background: rgba(176,42,38,0.04); border-radius: 10px; }
    .main-navbar .nav-item:last-child > .nav-link { border-bottom: none; }
    .products-dropdown-menu, .new-dropdown-menu {
        position: static !important; float: none !important; inset: auto !important;
        margin: 0 0 8px !important; transform: none !important; width: 100% !important;
        min-width: 0 !important; max-width: 100% !important; background: #fdf9f4 !important;
        border: 1px solid rgba(237,219,203,0.9) !important; border-radius: 14px !important;
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.9) !important;
        overflow: hidden !important; padding: 4px 6px !important; animation: none !important;
    }
    .products-dropdown-menu li { border-bottom: 1px solid rgba(237,219,203,0.7); }
    .products-dropdown-menu li:last-child { border-bottom: none; }
    .products-dropdown-menu .dropdown-item {
        padding: 10px 16px;  display: flex; align-items: center; justify-content: center;
        border-radius: 10px; transition: background 0.18s ease;
    }
    .products-dropdown-menu .dropdown-item:hover { background: rgba(176,42,38,0.05) !important; }
    .products-dropdown-menu .dropdown-item img { max-height: 46px !important; max-width: 160px !important; }
    .new-dropdown-item { border-bottom: 1px solid rgba(237,219,203,0.7); }
    .new-dropdown-item:last-child { border-bottom: none; }
    .new-dropdown-link { padding: 12px 20px; gap: 16px; justify-content: center; }
    .new-dropdown-logo { max-height: 32px !important; max-width: 130px !important; }
    .new-badge-img     { width: 44px !important; }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .main-navbar .navbar-collapse { padding: 6px 20px 18px; }
    .main-navbar .nav-link { font-size: 0.82rem !important; padding: 14px 10px !important; }
    .products-dropdown-menu .dropdown-item img { max-height: 50px !important; }
}

@media (max-width: 767.98px) {
    .main-navbar .navbar-collapse { padding: 4px 10px 12px; }
}

@media (max-width: 480px) {
    body { padding-top: 54px; }
    .main-navbar .container        { padding: 0 10px; }
    .main-navbar .navbar-brand img { height: 34px !important; }
    .main-navbar .social-icons a   { width: 30px; height: 30px; font-size: 0.82rem; }
    .main-navbar .navbar-toggler   { padding: 5px 8px !important; }
    .main-navbar .nav-link         { font-size: 0.75rem !important; padding: 11px 6px !important; letter-spacing: 1px !important; }
    .products-dropdown-menu .dropdown-item img { height: 40px !important; max-width: 130px !important; }
    .new-dropdown-logo { max-height: 28px !important; max-width: 110px !important; }
}

html, body { overflow-x: hidden; }
.main-navbar { max-width: 100%; }

/* ---------- Hero (صورة خلفية متغبشة) ---------- */
.careers-hero {
    position: relative;
    min-height: 340px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--choco-dark);
}
/* الصورة بتتحط من careers.html في <img class="careers-hero-bg"> */
.careers-hero-bg {
    position: absolute;
    top: -30px;
    left: -30px;
    width: calc(100% + 60px);         /* أكبر من السكشن عشان أطراف التغبيش متبانش */
    height: calc(100% + 60px);
    object-fit: cover;
    filter: blur(var(--hero-blur));
    z-index: 0;
}
.careers-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(135deg, rgba(43, 22, 12, .72), rgba(107, 62, 38, .5));
}
.careers-hero .container { z-index: 2; }
.careers-hero-title {
    color: #fff;
    font-size: clamp(2.4rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 12px;
    text-shadow: 0 4px 18px rgba(0, 0, 0, .35);
}
.careers-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    border-radius: 50px;
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, .18);
    color: rgba(255, 255, 255, .9);
    font-size: .95rem;
}
.careers-breadcrumb a { color: var(--gold); text-decoration: none; }
.careers-breadcrumb i { font-size: .7rem; }

/* ---------- Section ---------- */
.careers-section {
    background: var(--cream);
    padding: 80px 0;
}
.careers-heading { max-width: 640px; margin: 0 auto 50px; }
.careers-badge {
    display: inline-block;
    padding: 6px 18px;
    border: 1px solid var(--border);
    border-radius: 50px;
    background: #fff;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--choco);
    margin-bottom: 16px;
}
.careers-heading h2 {
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    font-weight: 800;
    color: var(--choco-dark);
    margin-bottom: 14px;
}
.careers-heading h2 span { color: var(--gold); }
.careers-heading p { color: var(--text); line-height: 1.8; }

/* ---------- Job cards ---------- */
.job-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 28px 24px;
    box-shadow: 0 8px 24px rgba(59, 33, 22, .06);
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.job-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(59, 33, 22, .12);
    border-color: var(--gold);
}
.job-type {
    font-size: .75rem;
    font-weight: 700;
    color: var(--choco-light);
    text-transform: uppercase;
    letter-spacing: .5px;
}
.job-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--choco-dark);
    margin: 8px 0 12px;
}
.job-card p { color: var(--text); font-size: .93rem; line-height: 1.7; flex-grow: 1; }
.job-meta {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: .85rem;
    color: var(--choco);
}
.job-meta i { color: var(--gold); margin-inline-end: 4px; }

.btn-apply {
    align-self: flex-start;
    border: none;
    background: var(--choco);
    color: #fff;
    font-weight: 600;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 11px 24px;
    border-radius: 50px;
    transition: background .3s ease, gap .3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-apply:hover { background: var(--gold); gap: 12px; }

/* ---------- Apply form ---------- */
.apply-card {
    position: sticky;
    top: 100px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 12px 32px rgba(59, 33, 22, .1);
    transition: box-shadow .4s ease;
}
.apply-card.highlight { box-shadow: 0 0 0 4px rgba(200, 150, 79, .45), 0 12px 32px rgba(59, 33, 22, .1); }
.apply-card-header {
    background: var(--choco-dark);
    color: #fff;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 14px;
    border-radius: 50px;
    margin-bottom: 22px;
}
.field { margin-bottom: 14px; }
.apply-card input,
.apply-card select,
.apply-card textarea {
    width: 100%;
    border: 1px solid var(--border);
    background: var(--cream);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: .92rem;
    color: #333;
    outline: none;
    transition: border-color .3s ease, background .3s ease;
}
.apply-card textarea { resize: vertical; }
.apply-card input:focus,
.apply-card select:focus,
.apply-card textarea:focus { border-color: var(--gold); background: #fff; }

.cv-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 18px 12px;
    border: 2px dashed var(--border);
    border-radius: 14px;
    background: var(--cream);
    cursor: pointer;
    text-align: center;
    transition: border-color .3s ease, background .3s ease;
}
.cv-upload:hover { border-color: var(--gold); background: #fff; }
.cv-upload i { font-size: 1.6rem; color: var(--gold); }
.cv-upload span { font-weight: 600; color: var(--choco-dark); font-size: .9rem; word-break: break-all; }
.cv-upload small { color: #999; font-size: .75rem; }
.cv-upload.has-file { border-style: solid; border-color: var(--choco-light); }
.cv-upload.has-file i { color: #2e9e5b; }

.error-msg { display: none; color: #d64545; font-size: .78rem; margin-top: 4px; padding-inline-start: 6px; }
.field.invalid input,
.field.invalid select,
.field.invalid .cv-upload { border-color: #d64545; }
.field.invalid .error-msg { display: block; }

.btn-send {
    width: 100%;
    border: none;
    background: linear-gradient(135deg, var(--choco), var(--choco-light));
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 14px;
    border-radius: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: opacity .3s ease, transform .2s ease;
}
.btn-send:hover { transform: translateY(-2px); }
.btn-send:disabled { opacity: .7; cursor: not-allowed; transform: none; }

/* ---------- Success alert ---------- */
.careers-success {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #ecf8f0;
    border: 1px solid #b9e4c9;
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 40px;
    position: relative;
}
.careers-success > i { font-size: 1.6rem; color: #2e9e5b; }
.careers-success strong { color: #1f6b3d; }
.careers-success p { margin: 4px 0 0; color: #3d7a55; font-size: .9rem; }
.careers-success-close {
    position: absolute;
    top: 8px;
    inset-inline-end: 14px;
    border: none;
    background: none;
    font-size: 1.4rem;
    color: #3d7a55;
}

/* رسالة الخطأ: نفس شكل رسالة النجاح بس أحمر */
.careers-error { background: #fdeeee; border-color: #f2c4c4; }
.careers-error > i { color: #d64545; }
.careers-error strong { color: #9b2c2c; }
.careers-error p, .careers-error .careers-success-close { color: #a94747; }

/* ---------- زرار تغيير اللغة (ثابت) ---------- */
.lang-toggle {
    position: fixed;
    left: 22px;
    bottom: 22px;
    z-index: 1100;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border: 2px solid rgba(255, 255, 255, .25);
    border-radius: 50px;
    background: linear-gradient(135deg, var(--choco-dark), var(--choco));
    color: #fff;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: .95rem;
    box-shadow: 0 10px 28px rgba(43, 22, 12, .35);
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.lang-toggle i { color: var(--gold); font-size: 1.05rem; transition: transform .5s ease; }
.lang-toggle:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(43, 22, 12, .45);
}
.lang-toggle:hover i { transform: rotate(180deg); }

/* ---------- العربي (RTL) ---------- */
/* الخط العربي على الصفحة كلها ما عدا الناف بار */
html[lang="ar"] .careers-hero :not(i),
html[lang="ar"] .careers-section :not(i) {
    font-family: 'Cairo', sans-serif;
    letter-spacing: 0 !important;     /* المسافات بين الحروف بتكسر الكتابة العربي */
}
/* الناف بار يفضل زي ما هو في الوضعين */
html[dir="rtl"] .main-navbar { direction: ltr; }
html[lang="ar"] .careers-hero-title { font-weight: 800; }
html[lang="ar"] .careers-heading p,
html[lang="ar"] .job-card p { line-height: 1.9; }
html[dir="rtl"] .btn-apply i,
html[dir="rtl"] .careers-breadcrumb i { transform: scaleX(-1); }
html[dir="rtl"] .apply-card input[type="email"],
html[dir="rtl"] .apply-card input[type="tel"] { direction: ltr; text-align: right; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .apply-card { position: static; }
    .careers-section { padding: 60px 0; }
}
@media (max-width: 575px) {
    .careers-hero { min-height: 260px; }
    .job-card { padding: 22px 18px; }
    .lang-toggle { left: 14px; bottom: 14px; padding: 9px 16px; font-size: .85rem; }
}