/* ============================================================
   Beauty Profiles Lite — עיצוב מרכזי
   RTL, פונטים Heebo/Assistant, ערכות כהה ובהיר, אקסנט ורוד-אדום
   ============================================================ */

:root {
    --bg: #f7f8fa;
    --surface: #ffffff;
    --surface-2: #f0f1f5;
    --text: #17181c;
    --muted: #6b7280;
    --border: #e4e6ec;
    --primary: #e91e63;
    --primary-strong: #c2185b;
    --primary-soft: rgba(233, 30, 99, 0.1);
    --gradient: linear-gradient(135deg, #e91e63 0%, #ff5e57 100%);
    --shadow-sm: 0 1px 3px rgba(20, 22, 28, 0.08);
    --shadow-md: 0 6px 18px rgba(20, 22, 28, 0.1);
    --shadow-lg: 0 14px 34px rgba(20, 22, 28, 0.16);
    --radius: 14px;
    --radius-sm: 9px;
    --topbar-h: 64px;
    --font: 'Heebo', 'Assistant', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

html[data-theme='dark'] {
    --bg: #0f1014;
    --surface: #181a20;
    --surface-2: #20232b;
    --text: #eceef2;
    --muted: #9aa0ac;
    --border: #2a2e38;
    --primary: #ff4f8b;
    --primary-strong: #ff6d9e;
    --primary-soft: rgba(255, 79, 139, 0.14);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 14px 34px rgba(0, 0, 0, 0.5);
}

/* ---------- איפוס ובסיס ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.7;
    background: var(--bg);
    color: var(--text);
    text-align: right;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .6em; font-weight: 800; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1em; }
a  { color: var(--primary); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--primary-strong); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0 0 1em; padding-inline-start: 1.4em; }

::selection { background: var(--primary); color: #fff; }

:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

.container {
    width: 100%;
    max-width: 1220px;
    margin-inline: auto;
    padding-inline: 20px;
}

.skip-link {
    position: absolute;
    inset-inline-start: -9999px;
    top: 0;
    background: var(--primary);
    color: #fff;
    padding: 10px 18px;
    z-index: 200;
    border-radius: 0 0 8px 8px;
}
.skip-link:focus { inset-inline-start: 0; }

/* ---------- כפתורים ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }

.btn--primary {
    background: var(--gradient);
    border: none;
    color: #fff;
}
.btn--primary:hover { opacity: .92; color: #fff; }

.btn--outline {
    border-color: var(--primary);
    color: var(--primary);
    background: transparent;
}
.btn--outline:hover { background: var(--primary-soft); }

.btn--danger {
    background: transparent;
    border-color: #e5484d;
    color: #e5484d;
}
.btn--danger:hover { background: rgba(229, 72, 77, .1); }

.btn--sm  { padding: 5px 12px; font-size: .85rem; }
.btn--lg  { padding: 13px 28px; font-size: 1.02rem; }
.btn--block { width: 100%; }

.icon-btn {
    display: inline-flex;
    padding: 6px;
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    border-radius: 8px;
    transition: color .15s ease, transform .15s ease;
}
.icon-btn:hover { transform: scale(1.15); }
.icon-btn.is-active { color: #f5b301; }

/* ---------- טפסים ---------- */
.form__group { margin-bottom: 16px; }
.form__label {
    display: block;
    font-weight: 700;
    font-size: .92rem;
    margin-bottom: 6px;
}
.form__input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: .98rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form__input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}
.form__input--sm { padding: 7px 10px; font-size: .9rem; width: auto; }
.form__input--code { font-family: ui-monospace, 'Courier New', monospace; font-size: .9rem; direction: ltr; text-align: left; }
.form__hint { font-size: .82rem; color: var(--muted); margin: 5px 0 0; }
.form__error { font-size: .85rem; color: #e5484d; margin: 5px 0 0; font-weight: 700; }
.form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.form__check { display: flex; }
.form__check label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: .95rem; }
.form__check input[type='checkbox'] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }

.honeypot {
    position: absolute !important;
    inset-inline-start: -9999px !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* ---------- התראות ---------- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
    font-size: .95rem;
    border: 1px solid transparent;
}
.alert--success { background: rgba(46, 160, 91, .12); border-color: rgba(46, 160, 91, .4); color: #2ea05b; }
.alert--error   { background: rgba(229, 72, 77, .1);  border-color: rgba(229, 72, 77, .4);  color: #e5484d; }
.alert--info    { background: var(--primary-soft);    border-color: var(--primary);        color: var(--primary-strong); }
html[data-theme='dark'] .alert--success { color: #6ed49a; }
html[data-theme='dark'] .alert--error { color: #ff8a8d; }
html[data-theme='dark'] .alert--info { color: var(--primary-strong); }
.flash-zone:empty { display: none; }

/* ---------- כותרת עליונה ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.topbar__inner {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: var(--topbar-h);
    flex-wrap: wrap;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-weight: 800;
    font-size: 1.18rem;
    color: var(--text);
    white-space: nowrap;
}
.brand__icon { color: var(--primary); flex-shrink: 0; }
.brand__logo { max-height: 40px; width: auto; }
.brand__name {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav__link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-weight: 600;
    font-size: .98rem;
    border: none;
    background: none;
    font-family: inherit;
    cursor: pointer;
}
.nav__link:hover { background: var(--surface-2); color: var(--primary); }
.nav__link--btn { border: none; background: none; font-family: inherit; }

.nav__item--dropdown { position: relative; }
.dropdown {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    min-width: 240px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    padding: 8px;
    display: none;
    z-index: 110;
}
.nav__item--dropdown:hover .dropdown,
.nav__item--dropdown:focus-within .dropdown { display: block; }
.dropdown a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--text);
    font-size: .93rem;
}
.dropdown a:hover { background: var(--primary-soft); color: var(--primary); }
.dropdown__count {
    font-size: .8rem;
    background: var(--surface-2);
    border-radius: 20px;
    padding: 1px 9px;
    color: var(--muted);
}
.dropdown__empty { display: block; padding: 10px 12px; color: var(--muted); font-size: .9rem; }

.search-form {
    display: flex;
    align-items: center;
    margin-inline-start: auto;
    background: var(--surface-2);
    border-radius: 30px;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.search-form:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.search-form input {
    border: none;
    background: transparent;
    padding: 9px 16px;
    font-family: inherit;
    font-size: .92rem;
    color: var(--text);
    width: 210px;
}
.search-form input:focus { outline: none; }
.search-form button {
    border: none;
    background: transparent;
    color: var(--muted);
    padding: 8px 14px 8px 8px;
    cursor: pointer;
    display: inline-flex;
}
.search-form button:hover { color: var(--primary); }

.theme-toggle {
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .2s ease, color .2s ease;
    flex-shrink: 0;
}
.theme-toggle:hover { transform: rotate(15deg); color: var(--primary); }
.icon-moon { display: none; }
html[data-theme='dark'] .icon-moon { display: block; }
html[data-theme='dark'] .icon-sun { display: none; }

.nav-toggle { display: none; }

/* ---------- Hero (מומלצים) ---------- */
.hero { margin-top: 22px; }
.hero__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.hero-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 210px;
    display: flex;
    align-items: flex-end;
    box-shadow: var(--shadow-md);
    background: var(--surface-2);
    transition: transform .22s ease, box-shadow .22s ease;
}
.hero-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.hero-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.hero-card:hover .hero-card__img { transform: scale(1.06); }
.hero-card__img--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
}
.hero-card__img--empty span {
    font-size: 4rem;
    font-weight: 800;
    color: rgba(255, 255, 255, .85);
}
.hero-card__body {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 18px;
    background: linear-gradient(to top, rgba(10, 10, 14, .92) 0%, rgba(10, 10, 14, .65) 55%, transparent 100%);
    color: #fff;
}
.hero-card__title { font-size: 1.08rem; margin: 6px 0; color: #fff; }
.hero-card__meta { font-size: .85rem; color: rgba(255, 255, 255, .75); }
.hero-card__badge {
    display: inline-block;
    font-size: .76rem;
    font-weight: 800;
    padding: 3px 12px;
    border-radius: 20px;
    background: var(--gradient);
    color: #fff;
}

/* ---------- מבנה עמוד ---------- */
.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 30px;
    padding-block: 30px 40px;
    align-items: start;
}
.main-content { min-width: 0; }

.section-title {
    position: relative;
    padding-inline-start: 14px;
    margin-bottom: 20px;
    font-size: 1.4rem;
}
.section-title::before {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: 4px;
    bottom: 4px;
    width: 5px;
    border-radius: 4px;
    background: var(--gradient);
}

.ad-slot { margin-bottom: 22px; }
.ad-slot:empty { display: none; margin: 0; }
.ad { display: block; text-align: center; }
.ad__image { margin-inline: auto; border-radius: var(--radius-sm); }
.ad--in-post { margin: 26px 0; padding: 14px; background: var(--surface-2); border-radius: var(--radius); }

/* ---------- כרטיסי פוסטים ---------- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 26px;
}
.cards-grid--3 { grid-template-columns: repeat(3, 1fr); }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}
.card__thumb-link { display: block; overflow: hidden; }
.card__img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform .35s ease;
}
.card:hover .card__img { transform: scale(1.07); }
.card__thumb--empty {
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e91e63 0%, #ff7b54 100%);
}
.card__thumb--empty span {
    font-size: 3.4rem;
    font-weight: 800;
    color: rgba(255, 255, 255, .85);
}
.card__body { padding: 15px 17px 17px; display: flex; flex-direction: column; flex: 1; }
.card__title { font-size: 1.05rem; margin: 0 0 8px; }
.card__title a { color: var(--text); }
.card__title a:hover { color: var(--primary); }
.card__excerpt {
    font-size: .9rem;
    color: var(--muted);
    margin: 0 0 12px;
    flex: 1;
}
.card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: .82rem;
    color: var(--muted);
    border-top: 1px dashed var(--border);
    padding-top: 10px;
    margin-top: auto;
}
.meta-item { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- סרגל צד ---------- */
.sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: calc(var(--topbar-h) + 16px); }
.widget {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
}
.widget__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.02rem;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-soft);
    color: var(--text);
}
.widget__title svg { color: var(--primary); }
.widget--ad { padding: 10px; }
.widget--ad:empty { display: none; }
.widget__popular { list-style: none; padding: 0; margin: 0; counter-reset: pop; }
.widget__popular li {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border);
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.widget__popular li:last-child { border-bottom: none; }
.widget__popular li::before {
    counter-increment: pop;
    content: counter(pop);
    display: inline-flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gradient);
    color: #fff;
    font-size: .78rem;
    font-weight: 800;
    margin-inline-end: 8px;
    float: right;
    margin-top: 2px;
}
.widget__popular a { color: var(--text); font-weight: 600; font-size: .92rem; }
.widget__popular a:hover { color: var(--primary); }
.widget__views { font-size: .8rem; color: var(--muted); }
.widget__list { list-style: none; padding: 0; margin: 0; }
.widget__list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px dashed var(--border);
}
.widget__list li:last-child { border-bottom: none; }
.widget__list a { color: var(--text); font-weight: 600; font-size: .93rem; }
.widget__list a:hover { color: var(--primary); }
.widget__count {
    background: var(--primary-soft);
    color: var(--primary);
    font-size: .8rem;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 20px;
}
.widget__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    display: inline-block;
    padding: 4px 13px;
    border-radius: 20px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: .85rem;
    font-weight: 600;
    transition: all .15s ease;
}
.chip:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}
.widget__empty { color: var(--muted); font-size: .88rem; }

/* ---------- כותרת רשימה / breadcrumb ---------- */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: .86rem;
    color: var(--muted);
    margin-bottom: 18px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.list-header { margin-bottom: 24px; }
.list-header h1 { font-size: 1.75rem; }
.list-header__desc { color: var(--muted); font-size: 1rem; margin-bottom: 4px; }
.list-header__count { color: var(--muted); font-size: .9rem; font-weight: 700; }

/* ---------- עימוד ---------- */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 26px 0 8px;
}
.pagination__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 700;
    font-size: .92rem;
    transition: all .15s ease;
}
.pagination__item:hover { border-color: var(--primary); color: var(--primary); }
.pagination__item--current {
    background: var(--gradient);
    border-color: transparent;
    color: #fff;
}
.pagination__item--disabled { opacity: .45; cursor: default; }
.pagination__item--gap { border: none; background: none; }

/* ---------- עמוד כתבה ---------- */
.single { padding-block: 26px 10px; max-width: 860px; }
.single__header { margin-bottom: 20px; }
.single__title { font-size: 2.1rem; margin-bottom: 14px; }
.single__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--muted);
    font-size: .9rem;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.single__figure { margin: 0 0 22px; }
.single__image {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}
.single__content {
    font-size: 1.06rem;
    line-height: 1.9;
    color: var(--text);
}
.single__content p { margin-bottom: 1.15em; }
.single__content h2, .single__content h3, .single__content h4 { margin-top: 1.4em; color: var(--text); }
.single__content a { text-decoration: underline; text-underline-offset: 3px; }
.single__content img { border-radius: var(--radius-sm); margin: 18px 0; }
.single__content blockquote {
    margin: 20px 0;
    padding: 14px 20px;
    border-inline-start: 4px solid var(--primary);
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    font-style: italic;
    color: var(--muted);
}
.single__content iframe { max-width: 100%; border-radius: var(--radius-sm); margin: 18px 0; }

.share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 26px 0;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.share__label { font-weight: 800; font-size: .95rem; }
.share__buttons { display: flex; flex-wrap: wrap; gap: 9px; }
.share__btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 24px;
    color: #fff;
    font-size: .88rem;
    font-weight: 700;
    transition: transform .15s ease, opacity .15s ease;
}
.share__btn:hover { transform: translateY(-2px); color: #fff; opacity: .9; }
.share__btn--whatsapp { background: #25d366; }
.share__btn--telegram { background: #2aabee; }
.share__btn--facebook { background: #1877f2; }
.share__btn--x        { background: #17181c; }
html[data-theme='dark'] .share__btn--x { background: #3a3d45; }

.tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 24px;
}

.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 26px 0 34px;
}
.post-nav__item {
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: border-color .15s ease, transform .15s ease;
}
.post-nav__item:hover { border-color: var(--primary); transform: translateY(-2px); }
span.post-nav__item:empty { visibility: hidden; }
.post-nav__item--prev { text-align: right; align-items: flex-start; }
.post-nav__item--next { text-align: left; align-items: flex-end; }
.post-nav__dir { font-size: .8rem; color: var(--primary); font-weight: 800; }
.post-nav__title { font-weight: 700; color: var(--text); font-size: .95rem; }

.related { padding-bottom: 30px; }

/* ---------- מצב ריק ---------- */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--muted);
}
.empty-state h3 { color: var(--text); }

/* ---------- פורם חיפוש בעמוד ---------- */
.search-page-form { display: flex; gap: 10px; max-width: 520px; margin-bottom: 12px; }
.search-page-form input { flex: 1; }

/* ---------- צור קשר ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 30px;
    padding-block: 30px 40px;
    align-items: start;
}
.contact-main { min-width: 0; }
.contact-form, .contact-info { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.contact-info__list { list-style: none; padding: 0; margin: 0; }
.contact-info__list li {
    padding: 12px 0;
    border-bottom: 1px dashed var(--border);
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.contact-info__list li:last-child { border-bottom: none; }
.contact-info__label { font-size: .8rem; color: var(--muted); font-weight: 800; }

/* ---------- פוטר ---------- */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    margin-top: 30px;
}
.footer__ad { padding-block: 18px 4px; }
.footer__ad:empty { display: none; }
.footer__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 26px;
    padding-block: 30px;
}
.footer__col h4 { margin-bottom: 12px; font-size: 1.02rem; }
.footer__col ul { list-style: none; padding: 0; margin: 0; }
.footer__col li { margin-bottom: 8px; }
.footer__col a { color: var(--muted); font-size: .92rem; }
.footer__col a:hover { color: var(--primary); }
.footer__about { color: var(--muted); font-size: .92rem; }
.footer__bottom {
    border-top: 1px solid var(--border);
    padding-block: 16px;
    text-align: center;
    color: var(--muted);
    font-size: .86rem;
}

.back-to-top {
    position: fixed;
    bottom: 24px;
    inset-inline-start: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--gradient);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all .25s ease;
    z-index: 90;
    box-shadow: var(--shadow-md);
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }

/* ---------- עמוד תחזוקה ---------- */
.maintenance-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.maintenance { text-align: center; }
.maintenance__box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 44px 36px;
    max-width: 480px;
    box-shadow: var(--shadow-md);
}
.maintenance__icon { color: var(--primary); margin: 0 auto 16px; }
.maintenance__box h1 { font-size: 1.6rem; }
.maintenance__box p { color: var(--muted); }

/* ============================================================
   לוח ניהול
   ============================================================ */
.admin-body { background: var(--bg); }

.admin-layout { display: flex; min-height: 100vh; }

.admin-sidebar {
    width: 250px;
    flex-shrink: 0;
    background: var(--surface);
    border-inline-end: 1px solid var(--border);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.admin-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 1.05rem;
    flex-wrap: wrap;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.admin-brand svg { color: var(--primary); }
.admin-brand__role {
    font-size: .74rem;
    background: var(--gradient);
    color: #fff;
    padding: 2px 10px;
    border-radius: 12px;
    width: 100%;
    text-align: center;
}
.admin-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.admin-nav a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-weight: 600;
    font-size: .95rem;
    transition: all .15s ease;
}
.admin-nav a:hover { background: var(--surface-2); color: var(--primary); }
.admin-nav a.active {
    background: var(--gradient);
    color: #fff;
}
.admin-nav__badge {
    background: #e5484d;
    color: #fff;
    font-size: .74rem;
    font-weight: 800;
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding-inline: 6px;
}
.admin-nav a.active .admin-nav__badge { background: rgba(255, 255, 255, .3); }
.admin-sidebar__footer {
    border-top: 1px solid var(--border);
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: .9rem;
}
.admin-sidebar__footer a { color: var(--muted); text-align: center; }
.admin-sidebar__footer a:hover { color: var(--primary); }

.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.admin-topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}
.admin-topbar__title { font-size: 1.3rem; margin: 0; }
.admin-user { margin-inline-start: auto; color: var(--muted); font-size: .93rem; }
.admin-user strong { color: var(--text); }
.admin-nav-toggle {
    display: none;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    border-radius: 8px;
    padding: 7px 10px;
    cursor: pointer;
}

.admin-content { padding: 24px; flex: 1; }

.admin-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 22px;
}
.admin-card__title {
    font-size: 1.1rem;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-soft);
}
.admin-card__note {
    margin-top: 16px;
    padding: 12px 14px;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    font-size: .9rem;
    color: var(--muted);
}
.admin-empty { color: var(--muted); }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    color: var(--text);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.stat-card__value {
    font-size: 1.85rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.2;
}
.stat-card__label { font-size: .88rem; color: var(--muted); font-weight: 600; }

.admin-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    align-items: start;
}
.admin-grid-2--editor { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }

.admin-form__link { font-size: .9rem; color: var(--muted); margin-bottom: 14px; }
.admin-form__actions { display: flex; gap: 12px; margin-top: 6px; flex-wrap: wrap; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th {
    text-align: right;
    padding: 10px 12px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: .82rem;
    font-weight: 800;
    white-space: nowrap;
    border-bottom: 2px solid var(--border);
}
.table td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--surface-2); }
.cell-title strong { display: block; }
.cell-sub { display: block; font-size: .8rem; color: var(--muted); }
.cell-message details p { margin: 8px 0 0; max-width: 380px; }
.cell-message summary { cursor: pointer; color: var(--primary); font-weight: 700; font-size: .88rem; }
.row-unread { background: var(--primary-soft); }
.actions-cell { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; white-space: nowrap; }
.actions-cell form { display: inline-flex; }

.badge {
    display: inline-block;
    padding: 3px 11px;
    border-radius: 14px;
    font-size: .78rem;
    font-weight: 800;
    white-space: nowrap;
}
.badge--published { background: rgba(46, 160, 91, .15); color: #2ea05b; }
.badge--draft     { background: rgba(245, 179, 1, .15); color: #b98300; }
.badge--unread    { background: var(--primary); color: #fff; }
.badge--views     { background: var(--primary-soft); color: var(--primary); }
.badge--placement { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.toolbar__filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar__info { color: var(--muted); font-size: .9rem; font-weight: 700; }

.admin-msg-list { list-style: none; padding: 0; margin: 0; }
.admin-msg-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 4px;
    border-bottom: 1px dashed var(--border);
    flex-wrap: wrap;
    font-size: .9rem;
}
.admin-msg-list li:last-child { border-bottom: none; }
.admin-msg-list li.is-unread strong::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    margin-inline-end: 7px;
}
.admin-msg-list span { color: var(--muted); }
.admin-msg-list__date { margin-inline-start: auto; font-size: .8rem; }

.admin-popular { list-style: none; padding: 0; margin: 0; counter-reset: popa; }
.admin-popular li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--border);
}
.admin-popular li::before {
    counter-increment: popa;
    content: counter(popa);
    color: var(--primary);
    font-weight: 800;
}
.admin-popular a { color: var(--text); font-size: .92rem; flex: 1; }
.admin-popular a:hover { color: var(--primary); }

.admin-sysinfo { list-style: none; padding: 0; margin: 0; }
.admin-sysinfo li {
    display: flex;
    justify-content: space-between;
    padding: 9px 0;
    border-bottom: 1px dashed var(--border);
    font-size: .92rem;
}
.admin-sysinfo li:last-child { border-bottom: none; }
.admin-sysinfo span { color: var(--muted); }

.check-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
}
.check-list--compact { grid-template-columns: 1fr; max-height: 180px; }
.check-list__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--surface);
    border-radius: 7px;
    font-size: .9rem;
    cursor: pointer;
}
.check-list__item input { accent-color: var(--primary); }

.thumb-preview {
    margin-top: 10px;
    max-height: 150px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

/* ---------- עמוד התחברות ---------- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(233, 30, 99, .12) 0%, rgba(255, 94, 87, .1) 100%), var(--bg);
    padding: 20px;
}
.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    padding: 36px 32px;
    width: 100%;
    max-width: 420px;
}
.login-card__brand { text-align: center; margin-bottom: 24px; }
.login-card__brand svg { color: var(--primary); margin: 0 auto 8px; }
.login-card__brand h1 { font-size: 1.45rem; margin-bottom: 4px; }
.login-card__brand p { color: var(--muted); margin: 0; }
.login-card__hint { font-size: .84rem; color: var(--muted); margin-top: 16px; text-align: center; }
.login-card__back { display: block; text-align: center; margin-top: 10px; font-size: .9rem; }

/* ============================================================
   רספונסיביות
   ============================================================ */
@media (max-width: 1024px) {
    .hero__grid { grid-template-columns: 1fr 1fr; }
    .hero__grid .hero-card:first-child { grid-column: 1 / -1; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-grid-2, .admin-grid-2--editor { grid-template-columns: 1fr; }

    /* סרגל ניהול בנייד */
    .admin-sidebar {
        position: fixed;
        inset-inline-end: -280px;
        top: 0;
        z-index: 300;
        transition: inset-inline-end .25s ease;
        box-shadow: var(--shadow-lg);
    }
    .admin-sidebar.open { inset-inline-end: 0; }
    .admin-nav-toggle { display: inline-flex; }
}

@media (max-width: 900px) {
    .layout, .contact-grid { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .nav-toggle { display: inline-flex; }

    /* תפריט ניווט בנייד */
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        inset-inline: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: stretch;
        padding: 12px 20px 18px;
        box-shadow: var(--shadow-md);
        z-index: 99;
    }
    .nav.open { display: flex; }
    .nav__link { width: 100%; justify-content: space-between; padding: 12px 10px; }
    .dropdown {
        position: static;
        display: block;
        box-shadow: none;
        border: none;
        background: var(--surface-2);
        margin-top: 6px;
    }
    .search-form { order: 5; width: 100%; margin-inline-start: 0; }
    .search-form input { width: 100%; flex: 1; }

    .footer__grid { grid-template-columns: 1fr 1fr; }
    .cards-grid--3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    h1 { font-size: 1.55rem; }
    .single__title { font-size: 1.6rem; }
    .hero__grid { grid-template-columns: 1fr; }
    .cards-grid, .cards-grid--3 { grid-template-columns: 1fr; }
    .footer__grid { grid-template-columns: 1fr; }
    .form__row { grid-template-columns: 1fr; }
    .post-nav { grid-template-columns: 1fr; }
    .post-nav__item--next { text-align: right; align-items: flex-start; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .admin-content { padding: 14px; }
    .actions-cell { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================================
   עורך תוכן עשיר (WYSIWYG) — admin/post_edit.php
   ============================================================ */

.editor {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    overflow: hidden;
}

.editor__toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
}

.editor-btn {
    appearance: none;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text);
    font-family: var(--font);
    font-size: .82rem;
    font-weight: 600;
    line-height: 1;
    padding: 7px 9px;
    border-radius: 7px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
    white-space: nowrap;
}
.editor-btn:hover { background: var(--primary-soft); color: var(--primary-strong); }
.editor-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.editor-btn--bold      { font-weight: 800; min-width: 34px; text-align: center; }
.editor-btn--italic    { font-style: italic; font-family: Georgia, serif; min-width: 34px; text-align: center; }
.editor-btn--underline { text-decoration: underline; min-width: 34px; text-align: center; }
.editor-btn--strike    { text-decoration: line-through; min-width: 34px; text-align: center; }
.editor-btn--toggle-source { font-family: ui-monospace, 'Courier New', monospace; font-size: .78rem; }

.editor-sep {
    width: 1px;
    align-self: stretch;
    margin: 2px 3px;
    background: var(--border);
}

.editor__area {
    min-height: 340px;
    max-height: 65vh;
    overflow-y: auto;
    padding: 18px 20px;
    line-height: 1.8;
    font-size: 1rem;
    outline: none;
    background: var(--surface);
    color: var(--text);
    direction: rtl;
    text-align: right;
    word-break: break-word;
}
.editor__area:focus { box-shadow: inset 0 0 0 2px var(--primary-soft); }
.editor__area img { border-radius: var(--radius-sm); margin: .5em 0; }
.editor__area blockquote {
    margin: 0 0 1em;
    padding: 10px 16px;
    border-inline-start: 4px solid var(--primary);
    background: var(--surface-2);
    border-radius: var(--radius-sm);
}
.editor__area h2, .editor__area h3, .editor__area h4 { margin: 1.1em 0 .5em; }

.editor__area .video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-sm);
    margin: 0 0 1em;
    background: #000;
}
.editor__area .video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.editor__source {
    width: 100%;
    min-height: 340px;
    padding: 14px 16px;
    border: 0;
    background: var(--surface);
    color: var(--text);
    font-size: .88rem;
    line-height: 1.6;
    outline: none;
    resize: vertical;
}

.editor__status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 12px;
    background: var(--surface-2);
    border-top: 1px solid var(--border);
    font-size: .8rem;
    color: var(--muted);
}
.editor__hint--error { color: #e5484d; font-weight: 600; }

/* הטמעת סרטון בעמוד הפוסט (פרונט) */
.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-sm);
    margin: 0 0 1.2em;
    background: #000;
}
.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ============================================================
   מודעת טקסט (פרסומת בלי באנר ובלי HTML)
   ============================================================ */

.ad--text {
    display: block;
    padding: 14px 18px;
    border: 1px dashed var(--primary);
    border-radius: var(--radius-sm);
    background: var(--primary-soft);
    color: var(--primary-strong);
    font-weight: 700;
    text-align: center;
    transition: background .18s ease;
}
.ad--text:hover { background: rgba(233, 30, 99, .16); color: var(--primary-strong); }

/* ============================================================
   גיבוי ושחזור — admin/backup.php
   ============================================================ */

.admin-card__title--sub {
    font-size: 1rem;
    margin-top: 1.6em;
    color: var(--muted);
}
.admin-card .table code {
    font-size: .78rem;
    color: var(--muted);
    margin-inline-start: 6px;
}

/* ============================================================
 |  וידאו חיצוני מוטמע בכתבה
 * ============================================================ */
.video-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 22px 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow-md);
}
.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.video-link { margin: 22px 0; text-align: center; }

/* ============================================================
 |  גלריית תמונות בכתבה
 * ============================================================ */
.gallery { margin: 30px 0; }
.gallery__title {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 0 14px;
    color: var(--text);
}
.gallery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
}
.gallery__item {
    margin: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: box-shadow .18s ease, transform .18s ease;
}
.gallery__item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.gallery__link { display: block; cursor: zoom-in; }
.gallery__link img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}
.gallery__caption {
    padding: 8px 10px;
    font-size: .82rem;
    color: var(--muted);
    line-height: 1.4;
}

/* ============================================================
 |  נגן תמונות (lightbox)
 * ============================================================ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 9, 12, .88);
    padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox__img {
    max-width: min(92vw, 1100px);
    max-height: 82vh;
    border-radius: var(--radius-sm);
    box-shadow: 0 18px 60px rgba(0, 0, 0, .55);
    object-fit: contain;
}
.lightbox__caption {
    position: absolute;
    bottom: 20px;
    inset-inline: 0;
    text-align: center;
    color: #e7e9ee;
    font-size: .95rem;
    padding: 0 40px;
}
.lightbox__close,
.lightbox__prev,
.lightbox__next {
    position: absolute;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease;
}
.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover { background: rgba(255, 255, 255, .26); }
.lightbox__close { top: 18px; inset-inline-end: 18px; }
.lightbox__prev { inset-inline-start: 18px; top: 50%; transform: translateY(-50%); }
.lightbox__next { inset-inline-end: 18px; top: 50%; transform: translateY(-50%); }

/* ============================================================
 |  ניהול גלריה בלוח הניהול
 * ============================================================ */
.gallery-manage { margin: 8px 0 18px; }
.gallery-manage__item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    background: var(--surface-2);
}
.gallery-manage__thumb {
    width: 92px;
    height: 70px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}
.gallery-manage__controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}
.gallery-manage__controls .form__input { font-size: .88rem; }
.gallery-manage__remove {
    font-size: .82rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    width: fit-content;
}
.gallery-manage__remove input { accent-color: var(--primary); }

@media (max-width: 640px) {
    .gallery__grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
    .gallery-manage__item { flex-direction: column; }
    .gallery-manage__thumb { width: 100%; height: 140px; }
}
