/* =====================================================
   Job Application Form — Consteel
   هوية بصرية صناعية: رمادي فحمي + برتقالي تحذيري
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
    --ink:        #1C1F24;
    --steel:      #58595B;
    --steel-soft: #8A8B8D;
    --accent:     #A6192E;
    --accent-dark:#7D1222;
    --paper:      #F4F3F0;
    --card:       #FFFFFF;
    --line:       #E1DFDA;
    --danger:     #C0392B;
    --success:    #2E7D46;
    --radius:     4px;
}

* { box-sizing: border-box; }

body {
    background: var(--paper);
    color: var(--ink);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
    position: relative;
    overflow-x: hidden;
}

/* اللوجو كخلفية كاملة للصفحة */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url('assets/logo.png') no-repeat center center;
    background-size: min(70vw, 800px);
    opacity: 0.06;
    pointer-events: none;
    z-index: 0;
}

.page-wrap { position: relative; z-index: 1; }

.page-wrap {
    max-width: 880px;
    margin: 0 auto;
    padding: 56px 24px 80px;
}

/* ============ الرأس ============ */
.form-header {
    margin-bottom: 48px;
    padding-bottom: 24px;
    border-bottom: 3px solid var(--ink);
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.form-header .logo-mark { width: 64px; height: auto; flex-shrink: 0; }
.form-header .header-text { flex: 1; }

.form-header .eyebrow {
    font-family: 'Oswald', sans-serif;
    font-size: 13px;
    letter-spacing: .04em;
    color: var(--accent-dark);
    font-weight: 600;
    margin: 0 0 6px;
}

.form-header h1 {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 34px;
    margin: 0;
    color: var(--ink);
}

.form-header p {
    color: var(--steel-soft);
    margin: 8px 0 0;
    font-size: 15px;
}

/* ============ التنبيهات ============ */
.notice {
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 28px;
    font-size: 14px;
    border-right: 4px solid transparent;
}
.notice-success { background: #EAF5EC; border-color: var(--success); color: #1E5C31; }
.notice-danger  { background: #FBEAE8; border-color: var(--danger);  color: #8C2E22; }

/* ============ الأقسام (خط إنتاج مرقّم) ============ */
.section {
    position: relative;
    padding: 32px 56px 32px 0;
    border-bottom: 1px solid var(--line);
}
.section:last-of-type { border-bottom: none; }

.section::before {
    content: attr(data-step);
    position: absolute;
    right: 0;
    top: 32px;
    width: 40px;
    height: 40px;
    border: 2px solid var(--ink);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: 15px;
    color: var(--ink);
    background: var(--paper);
    z-index: 1;
}

.section::after {
    content: '';
    position: absolute;
    right: 19px;
    top: 72px;
    bottom: -32px;
    width: 2px;
    background: var(--line);
}
.section:last-of-type::after { display: none; }

.section h2 {
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: 20px;
    margin: 0 0 20px;
    color: var(--ink);
}

/* ============ حقول الفورم ============ */
.field-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 16px 18px;
}
.col-4  { grid-column: span 4; }
.col-6  { grid-column: span 6; }
.col-12 { grid-column: span 12; }

@media (max-width: 640px) {
    .col-4, .col-6 { grid-column: span 12; }
}

.field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--steel);
    margin-bottom: 6px;
}
.field label .req { color: var(--accent-dark); }

.field input,
.field select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    font-family: inherit;
    font-size: 14px;
    color: var(--ink);
    transition: border-color .15s ease;
}
.field input:focus,
.field select:focus {
    outline: none;
    border-color: var(--steel);
}
.field input.error,
.field select.error {
    border-color: var(--danger);
    background: #FDF4F3;
}
.field-error {
    color: var(--danger);
    font-size: 12.5px;
    margin-top: 5px;
}

/* ============ الصفوف المتكررة ============ */
.repeat-row {
    border: 1.5px dashed var(--line);
    border-radius: var(--radius);
    padding: 18px 18px 20px;
    margin-bottom: 14px;
    position: relative;
    background: #FBFAF8;
}

.btn-add {
    background: none;
    border: 1.5px solid var(--ink);
    color: var(--ink);
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    font-size: 13px;
    padding: 9px 18px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.btn-add:hover { background: var(--ink); color: #fff; }

.btn-remove {
    position: absolute;
    top: 12px;
    left: 12px;
    background: none;
    border: none;
    color: var(--danger);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
}
.btn-remove:hover { text-decoration: underline; }

/* ============ زرار الإرسال ============ */
.submit-wrap {
    padding: 40px 56px 0 0;
    text-align: center;
}

.btn-submit {
    background: var(--accent);
    color: #fff;
    border: none;
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: .02em;
    padding: 14px 48px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background .15s ease, transform .1s ease;
}
.btn-submit:hover  { background: var(--accent-dark); }
.btn-submit:active { transform: scale(.98); }

/* ============ إمكانية الوصول ============ */
:focus-visible {
    outline: 2.5px solid var(--accent);
    outline-offset: 2px;
}

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