/* פורטל משרות — Light / Dark Design System */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root,
html[data-theme="light"] {
    color-scheme: light;

    --brand: #0D7377;
    --brand-deep: #0B4F6C;
    --brand-soft: #14919B;
    --accent: #E85D4C;
    --accent-soft: #FF8A5B;
    --success: #1F8A70;
    --danger: #C0392B;
    --warning: #D97706;
    --info: #2A7F9E;

    --bg: #F3F7F8;
    --bg-top: #F7FBFC;
    --bg-bottom: #EEF5F6;
    --bg-elevated: #FFFFFF;
    --surface: #FFFFFF;
    --surface-muted: #E8F1F2;
    --surface-glass: rgba(255, 255, 255, 0.92);
    --text: #123038;
    --text-secondary: #4A6670;
    --text-muted: #7A939B;
    --border: #D5E3E6;
    --border-strong: #B7CDD2;
    --header-bg: rgba(243, 247, 248, 0.88);
    --footer-bg: #EAF2F3;
    --input-bg: #FFFFFF;
    --glow-teal: rgba(20, 145, 155, 0.12);
    --glow-coral: rgba(232, 93, 76, 0.08);
    --focus-ring: rgba(13, 115, 119, 0.14);
    --theme-meta: #0D7377;

    --alert-success-bg: #E8F7F1;
    --alert-success-text: #14604d;
    --alert-success-border: #B7E4D4;
    --alert-error-bg: #FCEDED;
    --alert-error-text: #8F2A22;
    --alert-error-border: #F0C2BD;
    --alert-info-bg: #EAF5F8;
    --alert-info-text: #1D5F74;
    --alert-info-border: #B9D8E3;
    --alert-warning-bg: #FFF6E8;
    --alert-warning-text: #8A5208;
    --alert-warning-border: #F3D5A2;

    --shadow-sm: 0 1px 2px rgba(11, 79, 108, 0.06);
    --shadow-md: 0 8px 24px rgba(11, 79, 108, 0.08);
    --shadow-lg: 0 18px 40px rgba(11, 79, 108, 0.12);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;

    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 40px;
    --space-2xl: 64px;

    --font: "Heebo", "Rubik", sans-serif;
    --font-display: "Rubik", "Heebo", sans-serif;
    --font-size: 16px;

    --primary-color: var(--brand);
    --primary-dark: var(--brand-deep);
    --primary-light: var(--brand-soft);
    --primary-glow: rgba(13, 115, 119, 0.18);
    --secondary-color: var(--accent);
    --secondary-glow: rgba(232, 93, 76, 0.2);
    --success-color: var(--success);
    --danger-color: var(--danger);
    --warning-color: var(--warning);
    --info-color: var(--info);
    --bg-color: var(--bg);
    --bg-gradient: var(--bg);
    --surface-color: var(--surface);
    --surface-elevated: var(--bg-elevated);
    --surface-hover: var(--surface-muted);
    --text-primary: var(--text);
    --border-color: var(--border);
    --border-glow: rgba(13, 115, 119, 0.25);
    --radius-full: 9999px;
    --spacing-xs: var(--space-xs);
    --spacing-sm: var(--space-sm);
    --spacing-md: var(--space-md);
    --spacing-lg: var(--space-lg);
    --spacing-xl: var(--space-xl);
    --spacing-2xl: var(--space-2xl);
    --font-family: var(--font);
    --shadow-xl: var(--shadow-lg);
    --shadow-glow: 0 0 0 transparent;
}

html[data-theme="dark"] {
    color-scheme: dark;

    --brand: #2BB8BE;
    --brand-deep: #7ED6DB;
    --brand-soft: #3DC8CE;
    --accent: #FF7A68;
    --accent-soft: #FF9B7A;
    --success: #3DCF9B;
    --danger: #F07167;
    --warning: #F0B429;
    --info: #5CB8D4;

    --bg: #0B161A;
    --bg-top: #0E1C21;
    --bg-bottom: #081116;
    --bg-elevated: #132228;
    --surface: #15262C;
    --surface-muted: #1C3138;
    --surface-glass: rgba(21, 38, 44, 0.92);
    --text: #E8F2F4;
    --text-secondary: #A8C0C7;
    --text-muted: #7F9AA2;
    --border: #2A4149;
    --border-strong: #3A5862;
    --header-bg: rgba(11, 22, 26, 0.88);
    --footer-bg: #0F1B20;
    --input-bg: #101C21;
    --glow-teal: rgba(43, 184, 190, 0.14);
    --glow-coral: rgba(255, 122, 104, 0.1);
    --focus-ring: rgba(43, 184, 190, 0.22);
    --theme-meta: #0B161A;

    --alert-success-bg: rgba(61, 207, 155, 0.12);
    --alert-success-text: #8FE8C4;
    --alert-success-border: rgba(61, 207, 155, 0.35);
    --alert-error-bg: rgba(240, 113, 103, 0.12);
    --alert-error-text: #FFB0A9;
    --alert-error-border: rgba(240, 113, 103, 0.35);
    --alert-info-bg: rgba(92, 184, 212, 0.12);
    --alert-info-text: #A9DDF0;
    --alert-info-border: rgba(92, 184, 212, 0.35);
    --alert-warning-bg: rgba(240, 180, 41, 0.12);
    --alert-warning-text: #F6D58A;
    --alert-warning-border: rgba(240, 180, 41, 0.35);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 44px rgba(0, 0, 0, 0.5);

    --primary-glow: rgba(43, 184, 190, 0.25);
    --secondary-glow: rgba(255, 122, 104, 0.25);
    --border-glow: rgba(43, 184, 190, 0.3);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background:
        radial-gradient(1200px 500px at 100% -10%, var(--glow-teal), transparent 55%),
        radial-gradient(900px 420px at -10% 20%, var(--glow-coral), transparent 50%),
        linear-gradient(180deg, var(--bg-top) 0%, var(--bg) 40%, var(--bg-bottom) 100%);
    color: var(--text);
    line-height: 1.7;
    font-size: var(--font-size);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    transition: background 0.25s ease, color 0.25s ease;
}

.skip-link {
    position: absolute;
    top: -48px;
    right: 16px;
    background: var(--brand);
    color: #fff;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    z-index: 10001;
    text-decoration: none;
}
.skip-link:focus {
    top: 12px;
}

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--brand-deep);
}

.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background:
        linear-gradient(135deg, var(--brand) 0%, var(--brand-soft) 60%, var(--accent-soft) 100%);
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.35);
    animation: markPulse 4s ease-in-out infinite;
}

.logo-text {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}

@keyframes markPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.nav-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
    color: var(--brand-deep);
    background: var(--surface-muted);
}

.nav-links a.nav-cta {
    background: var(--brand);
    color: #fff;
}

.nav-links a.nav-cta:hover {
    background: var(--brand-deep);
    color: #fff;
    transform: translateY(-1px);
}

html[data-theme="dark"] .nav-links a.nav-cta:hover {
    color: #0B161A;
}

.nav-toggle,
.theme-toggle {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--brand-deep);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.nav-toggle {
    display: none;
    flex-direction: column;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--brand-deep);
}

.theme-toggle:hover,
.nav-toggle:hover {
    background: var(--surface-muted);
    border-color: var(--border-strong);
    transform: translateY(-1px);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    width: 20px;
    height: 20px;
    display: none;
}

html[data-theme="light"] .theme-toggle .icon-moon { display: block; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

.nav-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero {
    position: relative;
    min-height: min(88vh, 720px);
    display: grid;
    align-items: end;
    overflow: hidden;
    isolation: isolate;
}

.hero-visual {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-skyline {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.hero-wave {
    fill: var(--bg);
    transition: fill 0.25s ease;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: clamp(48px, 10vw, 96px) 24px 56px;
    color: #fff;
    animation: riseIn 0.7s ease both;
}

.brand-lockup {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 7vw, 4.6rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 18px;
    text-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.hero-content h1 {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 3.2vw, 2rem);
    font-weight: 700;
    max-width: 18ch;
    margin-bottom: 12px;
    color: #fff;
    background: none;
    -webkit-text-fill-color: #fff;
}

.hero-lead {
    max-width: 36ch;
    color: rgba(255,255,255,0.92);
    font-size: 1.08rem;
    margin-bottom: 28px;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

@keyframes riseIn {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

main {
    min-height: calc(100vh - 220px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.home-sections {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-2xl);
}

.section {
    margin-bottom: var(--space-2xl);
    animation: riseIn 0.6s ease both;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.section-head h2 {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2rem);
    color: var(--brand-deep);
    margin: 0;
}

.text-link {
    color: var(--brand);
    font-weight: 700;
    text-decoration: none;
}
.text-link:hover { color: var(--accent); }

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--brand-deep);
    text-decoration: none;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.chip:hover {
    transform: translateY(-2px);
    border-color: var(--brand-soft);
}

.card,
.job-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
    position: relative;
}

.card {
    margin-bottom: var(--space-lg);
}

.card.glass {
    background: var(--surface-glass);
    backdrop-filter: blur(8px);
}

.card:hover,
.job-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}

.job-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--brand-deep);
}

.job-title a {
    color: inherit;
    text-decoration: none;
}
.job-title a:hover { color: var(--brand); }

.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 12px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.grid > * {
    animation: riseIn 0.55s ease both;
}
.grid > *:nth-child(1) { animation-delay: 0.05s; }
.grid > *:nth-child(2) { animation-delay: 0.1s; }
.grid > *:nth-child(3) { animation-delay: 0.15s; }
.grid > *:nth-child(4) { animation-delay: 0.2s; }

.btn {
    appearance: none;
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 22px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.btn:hover {
    background: var(--brand-deep);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

html[data-theme="dark"] .btn:hover {
    color: #0B161A;
}

.btn:active { transform: translateY(0); }

.btn-secondary {
    background: var(--surface);
    color: var(--brand-deep);
    border: 1px solid var(--border-strong);
}

.hero .btn-secondary {
    border-color: rgba(255,255,255,0.55);
    background: rgba(255,255,255,0.14);
    color: #fff;
    backdrop-filter: blur(6px);
}
.hero .btn-secondary:hover {
    background: rgba(255,255,255,0.24);
    color: #fff;
}

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(1.05); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.05); color: #fff; }

.btn-ghost {
    background: transparent;
    color: var(--brand);
    border: 1px solid var(--border-strong);
    box-shadow: none;
}
.btn-ghost:hover {
    background: var(--surface-muted);
    color: var(--brand-deep);
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.92rem;
}

.form-group { margin-bottom: 18px; }

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--text);
    font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font: inherit;
    background: var(--input-bg);
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--focus-ring);
}

textarea { min-height: 120px; resize: vertical; }

option {
    background: var(--surface);
    color: var(--text);
}

.alert {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    border: 1px solid;
}
.alert-success {
    background: var(--alert-success-bg);
    color: var(--alert-success-text);
    border-color: var(--alert-success-border);
}
.alert-error {
    background: var(--alert-error-bg);
    color: var(--alert-error-text);
    border-color: var(--alert-error-border);
}
.alert-info {
    background: var(--alert-info-bg);
    color: var(--alert-info-text);
    border-color: var(--alert-info-border);
}
.alert-warning {
    background: var(--alert-warning-bg);
    color: var(--alert-warning-text);
    border-color: var(--alert-warning-border);
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    line-height: 1.25;
    color: var(--brand-deep);
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 12px; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 12px; }
h3 { font-size: 1.2rem; margin-bottom: 10px; }

p { color: var(--text-secondary); }

.gradient-text {
    color: var(--brand-deep);
    background: none;
    -webkit-text-fill-color: currentColor;
    filter: none;
}

.score {
    font-size: 3.2rem;
    font-weight: 800;
    color: var(--brand);
    text-align: center;
    margin: 20px 0;
}

.ai-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.ai-btn {
    border: 0;
    border-radius: 999px;
    padding: 9px 14px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-soft) 100%);
    color: #fff;
    font: inherit;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
}
.ai-btn:hover { transform: translateY(-1px); filter: brightness(1.05); }

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

footer {
    margin-top: var(--space-2xl);
    border-top: 1px solid var(--border);
    background: var(--footer-bg);
    color: var(--text-secondary);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
}

.footer-brand {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--brand-deep);
    margin: 0;
}

.footer-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.footer-actions a {
    color: var(--brand-deep);
    text-decoration: none;
    font-weight: 600;
}
.donate-form { margin: 0; }

#accessibility-panel {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 10000;
}

#accessibility-toggle {
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

#accessibility-menu {
    position: absolute;
    bottom: 70px;
    left: 0;
    min-width: 260px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow-lg);
    direction: rtl;
    color: var(--text);
}

#accessibility-menu[hidden] { display: none !important; }

.accessibility-option { margin: 10px 0; }
.accessibility-option label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text);
}

#reset-accessibility {
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    border: 0;
    border-radius: var(--radius-md);
    background: var(--surface-muted);
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
}

#session-indicator {
    position: fixed;
    bottom: 100px;
    left: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    box-shadow: var(--shadow-md);
    z-index: 9999;
    min-width: 260px;
    font-weight: 600;
    color: var(--text);
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: var(--brand);
    color: #fff;
}
.badge-success { background: var(--success); }
.badge-warning { background: var(--warning); color: #1a1a1a; }
.badge-danger { background: var(--danger); }

body.large-text { font-size: 18px; }
body.high-contrast {
    background: #000 !important;
    color: #fff !important;
}
body.high-contrast .card,
body.high-contrast .job-card,
body.high-contrast header,
body.high-contrast footer {
    background: #111 !important;
    color: #fff !important;
    border-color: #fff !important;
}
body.readable-font { font-family: Arial, Helvetica, sans-serif; }

.auth-shell {
    max-width: 460px;
    margin: 40px auto;
}

.page-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    margin-bottom: 22px;
    color: var(--brand-deep);
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.empty-state {
    text-align: center;
    padding: 64px 24px;
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.55;
}

@media (max-width: 860px) {
    .nav-toggle { display: inline-flex; }
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding-top: 8px;
    }
    .nav-links.is-open { display: flex; }
    nav { flex-wrap: wrap; }
    .nav-tools { margin-inline-start: auto; }
    .hero { min-height: 78vh; }
    .btn { width: auto; }
}

@media (max-width: 640px) {
    .hero-content { padding-bottom: 40px; }
    .section-head { flex-direction: column; align-items: flex-start; }
    #session-indicator {
        left: 12px;
        right: 12px;
        min-width: 0;
        bottom: 90px;
    }
}

@media print {
    header, footer, .btn, #accessibility-panel, #session-indicator, .hero-visual, .theme-toggle { display: none !important; }
    body { background: #fff !important; color: #000 !important; }
    .card, .job-card { box-shadow: none; border: 1px solid #ccc; }
}
