/*
 * Landing module — public pages (home, news archive, news detail).
 * Theme colours come from «تنظیمات سایت» as CSS custom properties printed in
 * <head> (--lp-primary, --lp-dark, …); everything else derives from them.
 * RTL first: logical properties (inline-start/end) throughout.
 */

:root {
    --lp-primary: #F7A21B;
    --lp-primary-rgb: 247 162 27;
    --lp-on-primary: #1E2230;
    --lp-dark: #1E2230;
    --lp-dark-rgb: 30 34 48;

    --lp-primary-strong: color-mix(in srgb, var(--lp-primary) 78%, #000);
    --lp-primary-soft: color-mix(in srgb, var(--lp-primary) 14%, #fff);
    --lp-cream: #FFF8EE;
    --lp-surface: #FFFFFF;
    --lp-bg: #FBFAF8;
    --lp-text: #1E2230;
    --lp-muted: #646a7d;
    --lp-border: #EDE7DD;

    --lp-radius-sm: 12px;
    --lp-radius: 20px;
    --lp-radius-lg: 28px;
    --lp-shadow-sm: 0 2px 10px -4px rgb(var(--lp-dark-rgb) / .12);
    --lp-shadow: 0 18px 40px -22px rgb(var(--lp-dark-rgb) / .35);
    --lp-shadow-lg: 0 30px 70px -30px rgb(var(--lp-dark-rgb) / .45);
    --lp-ease: cubic-bezier(.22, .61, .36, 1);
    --lp-header-h: 84px;
    --lp-autoplay: 7000ms;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body.lp-body {
    margin: 0;
    font-family: "Vazirmatn FD", Vazirmatn, Tahoma, sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: var(--lp-text);
    background: var(--lp-bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.5; margin: 0; }
p { margin: 0; }

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

.lp-container { width: min(1240px, 100% - 2.5rem); margin-inline: auto; }

.lp-visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.lp-skip {
    position: fixed; inset-inline-start: 1rem; top: -100px; z-index: 100;
    background: var(--lp-dark); color: #fff; padding: .6rem 1.1rem; border-radius: var(--lp-radius-sm);
    transition: top .2s;
}
.lp-skip:focus { top: 1rem; }

#main:focus { outline: none; }

/* ---------- Icons ---------- */
.lp-icon { width: 22px; height: 22px; flex: none; }
.lp-icon--xs { width: 15px; height: 15px; }
.lp-icon--sm { width: 18px; height: 18px; }
.lp-icon--xl { width: 48px; height: 48px; }

/* ---------- Buttons & chips ---------- */
.lp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
    padding: .85rem 1.6rem; border-radius: 14px; border: 2px solid transparent;
    font-weight: 700; font-size: .975rem; line-height: 1.4; cursor: pointer; white-space: nowrap;
    transition: transform .25s var(--lp-ease), box-shadow .25s var(--lp-ease), background-color .25s, color .25s, border-color .25s;
}
.lp-btn:hover { transform: translateY(-2px); }
.lp-btn:active { transform: translateY(0); }
.lp-btn--sm { padding: .6rem 1.15rem; font-size: .9rem; border-radius: 12px; }

.lp-btn--primary {
    background: var(--lp-primary); color: var(--lp-on-primary);
    box-shadow: 0 12px 26px -12px rgb(var(--lp-primary-rgb) / .9);
}
.lp-btn--primary:hover { background: color-mix(in srgb, var(--lp-primary) 88%, #fff); box-shadow: 0 16px 30px -12px rgb(var(--lp-primary-rgb) / 1); }

.lp-btn--ghost { background: transparent; color: var(--lp-text); border-color: rgb(var(--lp-dark-rgb) / .14); }
.lp-btn--ghost:hover { border-color: var(--lp-primary); color: var(--lp-primary-strong); }

.lp-btn--outline { background: var(--lp-surface); color: var(--lp-text); border-color: var(--lp-border); }
.lp-btn--outline:hover { border-color: var(--lp-primary); color: var(--lp-primary-strong); }

.lp-chip {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .3rem .85rem; border-radius: 999px; font-size: .82rem; font-weight: 600;
    background: var(--lp-primary-soft); color: var(--lp-primary-strong);
    border: 1px solid rgb(var(--lp-primary-rgb) / .25);
    transition: background-color .2s, color .2s, border-color .2s;
}
.lp-chip:hover { background: var(--lp-primary); color: var(--lp-on-primary); }
.lp-chip.is-active { background: var(--lp-dark); color: #fff; border-color: var(--lp-dark); }
.lp-chip__count {
    display: inline-grid; place-items: center; min-width: 1.5rem; height: 1.5rem; padding-inline: .35rem;
    border-radius: 999px; font-size: .75rem; background: rgb(var(--lp-dark-rgb) / .08);
}
.lp-chip.is-active .lp-chip__count { background: rgb(255 255 255 / .18); }

.lp-round-btn {
    display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
    background: rgb(255 255 255 / .14); color: #fff; border: 1px solid rgb(255 255 255 / .35);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    cursor: pointer; transition: background-color .25s, color .25s, transform .25s var(--lp-ease);
}
.lp-round-btn:hover { background: var(--lp-primary); color: var(--lp-on-primary); border-color: var(--lp-primary); transform: scale(1.06); }

/* ---------- Brand ---------- */
.lp-brand { display: inline-flex; align-items: center; gap: .7rem; }
.lp-brand__logo { height: 56px; width: auto; max-width: 220px; object-fit: contain; }
.lp-brand__mark {
    display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
    background: var(--lp-primary); color: var(--lp-on-primary); font-weight: 800; font-size: 1.35rem;
}
.lp-brand__name { font-weight: 800; font-size: 1.1rem; }
.lp-brand__logo--on-light { display: none; }

/* ---------- Header ---------- */
.lp-header {
    position: sticky; top: 0; z-index: 50; height: var(--lp-header-h);
    background: rgb(255 255 255 / .92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgb(var(--lp-dark-rgb) / .06);
    transition: background-color .35s, box-shadow .35s, border-color .35s;
}
.lp-header.is-overlay {
    position: fixed; inset-inline: 0; background: transparent; border-color: transparent;
    backdrop-filter: none; -webkit-backdrop-filter: none; color: #fff;
}
.lp-header.is-overlay::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(to bottom, rgb(var(--lp-dark-rgb) / .55), transparent);
    transition: opacity .35s;
}
.lp-header.is-overlay.is-scrolled {
    background: rgb(255 255 255 / .94); color: var(--lp-text); box-shadow: var(--lp-shadow-sm);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-color: rgb(var(--lp-dark-rgb) / .06);
}
.lp-header.is-overlay.is-scrolled::before { opacity: 0; }
.lp-header.is-overlay.is-scrolled .lp-brand__logo--on-dark { display: none; }
.lp-header.is-overlay.is-scrolled .lp-brand__logo--on-light { display: block; }

.lp-header__inner { height: 100%; display: flex; align-items: center; gap: 2rem; }
.lp-header__brand { flex: none; }
.lp-header__actions { display: flex; align-items: center; gap: .75rem; margin-inline-start: auto; }

.lp-nav { display: flex; align-items: center; }
.lp-nav__list { list-style: none; display: flex; gap: .35rem; margin: 0; padding: 0; }
.lp-nav__link {
    position: relative; display: block; padding: .5rem .95rem; border-radius: 10px; font-weight: 600; font-size: .98rem;
    opacity: .92; transition: opacity .2s, color .2s, background-color .2s;
}
.lp-nav__link::after {
    content: ""; position: absolute; inset-inline: .95rem; bottom: .2rem; height: 2px; border-radius: 2px;
    background: var(--lp-primary); transform: scaleX(0); transition: transform .3s var(--lp-ease);
}
.lp-nav__link:hover, .lp-nav__link.is-active { opacity: 1; color: var(--lp-primary); }
.lp-header.is-solid .lp-nav__link:hover, .lp-header.is-solid .lp-nav__link.is-active,
.lp-header.is-scrolled .lp-nav__link:hover, .lp-header.is-scrolled .lp-nav__link.is-active { color: var(--lp-primary-strong); }
.lp-nav__link:hover::after, .lp-nav__link.is-active::after { transform: scaleX(1); }
.lp-nav__cta-mobile { display: none; }

/* Submenus (menu built in the CMS «منوی سایت») */
.lp-nav__item { position: relative; }
.lp-nav__parent { display: flex; align-items: center; }
.lp-nav__parent .lp-nav__link { padding-inline-end: .35rem; }
.lp-nav__toggle {
    display: inline-grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 8px;
    background: transparent; color: inherit; cursor: pointer; opacity: .85; transition: transform .25s var(--lp-ease), background-color .2s;
}
.lp-nav__toggle:hover { background: rgb(var(--lp-primary-rgb) / .15); }
.lp-nav__sub {
    list-style: none; margin: 0; padding: .5rem; position: absolute; top: calc(100% + .35rem); inset-inline-start: 0; z-index: 60;
    min-width: 230px; display: grid; gap: .15rem; background: var(--lp-surface); color: var(--lp-text);
    border: 1px solid var(--lp-border); border-radius: var(--lp-radius-sm); box-shadow: var(--lp-shadow);
    opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .2s, transform .25s var(--lp-ease), visibility 0s .25s;
}
.lp-nav__sub::before { content: ""; position: absolute; inset-inline: 0; top: -.6rem; height: .6rem; }
.lp-nav__item:hover > .lp-nav__sub, .lp-nav__item:focus-within > .lp-nav__sub, .lp-nav__item.is-open > .lp-nav__sub {
    opacity: 1; visibility: visible; transform: none; transition: opacity .2s, transform .25s var(--lp-ease), visibility 0s;
}
.lp-nav__item.is-open .lp-nav__toggle { transform: rotate(180deg); }
.lp-nav__sublink { display: block; padding: .55rem .85rem; border-radius: 9px; font-size: .93rem; font-weight: 600; transition: background-color .2s, color .2s; }
.lp-nav__sublink:hover, .lp-nav__sublink.is-active { background: var(--lp-primary-soft); color: var(--lp-primary-strong); }

.lp-menu-toggle {
    display: none; width: 46px; height: 46px; border-radius: 12px; border: 1px solid currentColor;
    background: transparent; cursor: pointer; place-items: center; opacity: .9;
}
.lp-menu-toggle__close { display: none; }

/* ---------- Hero slider ---------- */
.lp-hero {
    position: relative; isolation: isolate; overflow: hidden; color: #fff;
    height: 100vh; height: 100svh; min-height: 640px; max-height: 980px;
    background: var(--lp-dark);
}
.lp-hero__track { position: absolute; inset: 0; }

.lp-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1s var(--lp-ease), visibility 0s 1s; }
.lp-slide.is-active { opacity: 1; visibility: visible; transition: opacity 1s var(--lp-ease), visibility 0s; z-index: 1; }

.lp-slide__bg { position: absolute; inset: 0; z-index: -2; }
.lp-slide__bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 8s linear; }
.lp-slide.is-active .lp-slide__bg img { transform: scale(1); }

.lp-slide__shade {
    position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(to left, rgb(var(--lp-dark-rgb) / .78) 0%, rgb(var(--lp-dark-rgb) / .38) 48%, rgb(var(--lp-dark-rgb) / .08) 100%),
        linear-gradient(to top, rgb(var(--lp-dark-rgb) / .7) 0%, transparent 32%);
}

.lp-slide__layout { height: 100%; display: flex; align-items: center; padding-top: var(--lp-header-h); padding-bottom: 96px; }

.lp-slide__card {
    position: relative; max-width: 580px; color: var(--lp-text);
    background: rgb(255 255 255 / .95); border-radius: var(--lp-radius-lg);
    padding: 2.6rem 2.8rem 2.4rem; box-shadow: var(--lp-shadow-lg);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.lp-slide__card::before {
    content: ""; position: absolute; inset-block-start: 0; inset-inline-start: 2.8rem; width: 72px; height: 5px;
    border-radius: 0 0 6px 6px; background: var(--lp-primary);
}

.lp-slide__ribbon {
    /* Physical offset: with a vertical writing-mode, logical insets resolve
       against the ribbon's own axis. The pages are always RTL. */
    position: absolute; right: -54px; top: 50%; transform: translateY(-50%);
    writing-mode: vertical-rl; padding: 1.4rem .65rem; border-radius: 0 999px 999px 0;
    background: rgb(255 255 255 / .9); color: var(--lp-dark); font-weight: 700; font-size: .85rem; line-height: 1.6;
    box-shadow: var(--lp-shadow); max-height: 82%; overflow: hidden;
}
.lp-slide__card:has(.lp-slide__ribbon) { margin-inline-start: 54px; }

.lp-slide__overline {
    display: inline-flex; align-items: center; gap: .6rem; margin-bottom: .75rem;
    color: var(--lp-primary-strong); font-weight: 700; font-size: .95rem;
}
.lp-slide__overline::before { content: ""; width: 26px; height: 2px; border-radius: 2px; background: currentColor; }
.lp-slide__title { font-size: clamp(1.65rem, 1.1rem + 2vw, 2.65rem); font-weight: 800; line-height: 1.45; color: var(--lp-dark); }
.lp-slide__subtitle { margin-top: .7rem; font-size: 1.08rem; font-weight: 600; color: #3b4152; }
.lp-slide__text { margin-top: .9rem; color: var(--lp-muted); font-size: .98rem; line-height: 2.05; }
.lp-slide__actions { margin-top: 1.7rem; display: flex; flex-wrap: wrap; gap: .75rem; }

.lp-slide.is-active .lp-slide__card > :not(.lp-slide__ribbon) { animation: lp-rise .9s var(--lp-ease) both; }
.lp-slide.is-active .lp-slide__card > :nth-child(2) { animation-delay: .08s; }
.lp-slide.is-active .lp-slide__card > :nth-child(3) { animation-delay: .16s; }
.lp-slide.is-active .lp-slide__card > :nth-child(4) { animation-delay: .24s; }
.lp-slide.is-active .lp-slide__card > :nth-child(5) { animation-delay: .32s; }
.lp-slide.is-active .lp-slide__card > :nth-child(6) { animation-delay: .4s; }
.lp-slide.is-active .lp-slide__card { animation: lp-card-in 1s var(--lp-ease) both; }

@keyframes lp-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes lp-card-in { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }

.lp-hero__controls {
    position: absolute; inset-inline: 0; bottom: 34px; z-index: 5;
    display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.lp-hero__dots { display: flex; gap: .55rem; }
.lp-hero__dot { padding: .7rem 0; background: none; border: 0; cursor: pointer; }
.lp-hero__dot-bar { display: block; width: 46px; height: 4px; border-radius: 4px; background: rgb(255 255 255 / .32); overflow: hidden; }
.lp-hero__dot-fill { display: block; height: 100%; width: 0; background: var(--lp-primary); border-radius: inherit; }
.lp-hero__dot.is-active .lp-hero__dot-fill { width: 100%; }
.lp-hero.is-playing .lp-hero__dot.is-active .lp-hero__dot-fill { width: 0; animation: lp-progress var(--lp-autoplay) linear forwards; }
.lp-hero.is-paused .lp-hero__dot.is-active .lp-hero__dot-fill { animation-play-state: paused; }
@keyframes lp-progress { to { width: 100%; } }

.lp-hero__nav { display: flex; align-items: center; gap: .6rem; }
.lp-hero__counter { font-size: .95rem; color: rgb(255 255 255 / .75); margin-inline-end: .5rem; letter-spacing: .05em; }
.lp-hero__counter b { color: #fff; font-size: 1.25rem; }
.lp-play-icon { display: none; }
.lp-hero.is-paused .lp-pause-icon { display: none; }
.lp-hero.is-paused .lp-play-icon { display: inline; }

.lp-hero__scroll {
    position: absolute; bottom: 28px; inset-inline-start: 50%; transform: translateX(50%); z-index: 4;
    width: 28px; height: 46px; border: 2px solid rgb(255 255 255 / .55); border-radius: 999px;
}
.lp-hero__scroll span { position: absolute; top: 8px; left: 50%; width: 4px; height: 9px; margin-left: -2px; border-radius: 4px; background: #fff; animation: lp-scroll 1.8s ease-in-out infinite; }
@keyframes lp-scroll { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
.lp-hero:has(.lp-hero__controls) .lp-hero__scroll { display: none; }

.lp-hero--empty {
    background:
        radial-gradient(1000px 520px at 85% 15%, rgb(var(--lp-primary-rgb) / .35), transparent 60%),
        radial-gradient(800px 600px at 10% 90%, rgb(var(--lp-primary-rgb) / .18), transparent 60%),
        var(--lp-dark);
}
.lp-hero--empty .lp-slide__card { animation: lp-card-in 1s var(--lp-ease) both; }
.lp-hero__pattern, .lp-page-head__pattern {
    position: absolute; inset: 0; z-index: -1; opacity: .5; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='200' viewBox='0 0 600 200'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.09' stroke-width='1.2'%3E%3Cpath d='M0 40 Q150 0 300 40 T600 40'/%3E%3Cpath d='M0 70 Q150 30 300 70 T600 70'/%3E%3Cpath d='M0 100 Q150 60 300 100 T600 100'/%3E%3Cpath d='M0 130 Q150 90 300 130 T600 130'/%3E%3Cpath d='M0 160 Q150 120 300 160 T600 160'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 600px 200px;
}

/* ---------- Sections ---------- */
.lp-section { position: relative; padding-block: clamp(3.5rem, 2rem + 5vw, 6.5rem); }
.lp-section--tight { padding-block: clamp(2.5rem, 1.5rem + 3vw, 4rem); }
.lp-section--cream { background: var(--lp-cream); overflow: hidden; }
.lp-waves {
    position: absolute; top: -40px; inset-inline-end: -80px; width: 520px; height: 300px; pointer-events: none; opacity: .9;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='300' viewBox='0 0 520 300'%3E%3Cg fill='none' stroke='%23e9c48c' stroke-opacity='.45' stroke-width='1.3'%3E%3Cpath d='M0 120 C120 40 220 200 520 60'/%3E%3Cpath d='M0 140 C120 60 220 220 520 80'/%3E%3Cpath d='M0 160 C120 80 220 240 520 100'/%3E%3Cpath d='M0 180 C120 100 220 260 520 120'/%3E%3Cpath d='M0 200 C120 120 220 280 520 140'/%3E%3C/g%3E%3C/svg%3E");
}
.lp-section__head { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2.4rem; flex-wrap: wrap; }
.lp-eyebrow { display: inline-flex; align-items: center; gap: .5rem; color: var(--lp-primary-strong); font-weight: 700; font-size: .92rem; margin-bottom: .35rem; }
.lp-eyebrow::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--lp-primary); box-shadow: 0 0 0 5px rgb(var(--lp-primary-rgb) / .18); }
.lp-section__title { font-size: clamp(1.45rem, 1.1rem + 1.3vw, 2.1rem); font-weight: 800; color: var(--lp-dark); }

.lp-empty {
    display: grid; place-items: center; gap: .8rem; text-align: center; padding: 3.5rem 1rem; color: var(--lp-muted);
    background: var(--lp-surface); border: 1px dashed var(--lp-border); border-radius: var(--lp-radius);
}
.lp-empty .lp-icon { color: rgb(var(--lp-primary-rgb) / .8); }

/* ---------- News cards ---------- */
.lp-card {
    position: relative; display: flex; flex-direction: column; overflow: hidden;
    background: var(--lp-surface); border-radius: var(--lp-radius); border: 1px solid var(--lp-border);
    box-shadow: var(--lp-shadow-sm); transition: transform .35s var(--lp-ease), box-shadow .35s var(--lp-ease), border-color .35s;
}
.lp-card:hover { transform: translateY(-6px); box-shadow: var(--lp-shadow); border-color: rgb(var(--lp-primary-rgb) / .35); }
.lp-card__media { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 3; background: var(--lp-primary-soft); }
.lp-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--lp-ease); }
.lp-card:hover .lp-card__media img { transform: scale(1.06); }
.lp-card__placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: rgb(var(--lp-primary-rgb) / .7); }
.lp-card__placeholder .lp-icon { width: 44px; height: 44px; }
.lp-card__body { display: flex; flex-direction: column; gap: .65rem; padding: 1.3rem 1.4rem 1.4rem; flex: 1; }
.lp-card__chip { align-self: flex-start; }
.lp-card__title { font-size: 1.08rem; font-weight: 700; line-height: 1.75; }
.lp-card__title a { background-image: linear-gradient(var(--lp-primary), var(--lp-primary)); background-size: 0 2px; background-position: 100% 100%; background-repeat: no-repeat; transition: background-size .4s var(--lp-ease), color .2s; }
.lp-card__title a:hover { color: var(--lp-primary-strong); background-size: 100% 2px; }
.lp-card__excerpt { color: var(--lp-muted); font-size: .92rem; line-height: 1.95; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lp-card__meta { margin-top: auto; padding-top: .6rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; color: var(--lp-muted); font-size: .84rem; }
.lp-card__meta > span { display: inline-flex; align-items: center; gap: .35rem; }
.lp-card__more { display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; color: var(--lp-primary-strong); }
.lp-card__more .lp-icon { transition: transform .3s var(--lp-ease); }
.lp-card__more:hover .lp-icon { transform: translateX(-4px); }

/* lead: the big card of the home spotlight, text over the image */
.lp-card--lead { min-height: 480px; color: #fff; border: 0; }
.lp-card--lead .lp-card__media { position: absolute; inset: 0; aspect-ratio: auto; }
.lp-card--lead .lp-card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(var(--lp-dark-rgb) / .92) 8%, rgb(var(--lp-dark-rgb) / .35) 55%, rgb(var(--lp-dark-rgb) / .05)); }
.lp-card--lead .lp-card__body { position: relative; justify-content: flex-end; padding: 2rem; z-index: 1; }
.lp-card--lead .lp-card__title { font-size: clamp(1.25rem, 1rem + .9vw, 1.65rem); line-height: 1.7; }
.lp-card--lead .lp-card__title a:hover { color: #fff; }
.lp-card--lead .lp-card__excerpt { color: rgb(255 255 255 / .82); }
.lp-card--lead .lp-card__meta { color: rgb(255 255 255 / .8); }
.lp-card--lead .lp-card__more { color: var(--lp-primary); }
.lp-card--lead .lp-chip { background: var(--lp-primary); color: var(--lp-on-primary); border-color: transparent; }

/* row: compact card with a thumbnail beside the text */
.lp-card--row { flex-direction: row; align-items: stretch; }
.lp-card--row .lp-card__media { flex: 0 0 150px; aspect-ratio: auto; min-height: 128px; }
.lp-card--row .lp-card__body { padding: 1rem 1.15rem; gap: .45rem; }
.lp-card--row .lp-card__title { font-size: 1rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lp-card--row .lp-card__chip { font-size: .75rem; padding: .15rem .65rem; }

.lp-news-spotlight { position: relative; display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.5rem; }
.lp-news-spotlight__list { display: grid; gap: 1.1rem; align-content: start; }

.lp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem; }

/* ---------- Inner page header ---------- */
.lp-page-head {
    position: relative; isolation: isolate; overflow: hidden; color: #fff;
    padding-block: 3.2rem 3.6rem;
    background:
        radial-gradient(700px 320px at 90% -10%, rgb(var(--lp-primary-rgb) / .38), transparent 65%),
        radial-gradient(520px 300px at 0% 120%, rgb(var(--lp-primary-rgb) / .2), transparent 65%),
        var(--lp-dark);
}
.lp-page-head__title { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); font-weight: 800; margin-top: .9rem; }
.lp-page-head__subtitle { margin-top: .4rem; color: rgb(255 255 255 / .72); }

.lp-breadcrumb { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; font-size: .88rem; color: rgb(255 255 255 / .7); }
.lp-breadcrumb li { display: inline-flex; align-items: center; gap: .35rem; }
.lp-breadcrumb a { display: inline-flex; align-items: center; gap: .35rem; transition: color .2s; }
.lp-breadcrumb a:hover { color: var(--lp-primary); }
.lp-breadcrumb [aria-current] { color: var(--lp-primary); }
.lp-breadcrumb__sep { opacity: .5; }

/* ---------- Archive toolbar ---------- */
.lp-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.3rem; }
.lp-search { position: relative; display: flex; align-items: center; background: var(--lp-surface); border: 1.5px solid var(--lp-border); border-radius: 14px; transition: border-color .2s, box-shadow .2s; }
.lp-search:focus-within { border-color: var(--lp-primary); box-shadow: 0 0 0 4px rgb(var(--lp-primary-rgb) / .16); }
.lp-search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: .8rem 1.1rem; outline: none; }
.lp-search button { display: grid; place-items: center; width: 46px; height: 46px; margin: 3px; border: 0; border-radius: 11px; cursor: pointer; background: var(--lp-dark); color: #fff; transition: background-color .2s; }
.lp-search button:hover { background: var(--lp-primary); color: var(--lp-on-primary); }
.lp-search--wide { flex: 1 1 420px; max-width: 560px; }

.lp-sort { display: flex; align-items: center; gap: .6rem; color: var(--lp-muted); font-size: .92rem; }
.lp-sort select { padding: .7rem 1rem; border-radius: 12px; border: 1.5px solid var(--lp-border); background: var(--lp-surface); cursor: pointer; }

.lp-chips { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 2rem; }
.lp-result-line { margin: -0.8rem 0 1.6rem; color: var(--lp-muted); font-size: .92rem; }
.lp-result-line a { color: var(--lp-primary-strong); font-weight: 700; margin-inline-start: .5rem; }

/* ---------- Pagination ---------- */
.lp-pagination { display: flex; align-items: center; justify-content: center; gap: .6rem; margin-top: 3rem; flex-wrap: wrap; }
.lp-pagination__pages { list-style: none; display: flex; gap: .4rem; margin: 0; padding: 0; }
.lp-pagination__page, .lp-pagination__step, .lp-pagination__gap {
    display: inline-flex; align-items: center; justify-content: center; gap: .3rem; min-width: 44px; height: 44px; padding-inline: .8rem;
    border-radius: 12px; background: var(--lp-surface); border: 1px solid var(--lp-border); font-weight: 600; transition: all .2s;
}
.lp-pagination a:hover { border-color: var(--lp-primary); color: var(--lp-primary-strong); }
.lp-pagination__page.is-current { background: var(--lp-primary); border-color: var(--lp-primary); color: var(--lp-on-primary); }
.lp-pagination__step.is-disabled { opacity: .45; }
.lp-pagination__gap { border-color: transparent; background: transparent; }

/* ---------- Article ---------- */
.lp-article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2.2rem; align-items: start; }
.lp-article { background: var(--lp-surface); border-radius: var(--lp-radius-lg); border: 1px solid var(--lp-border); padding: clamp(1.2rem, .8rem + 2vw, 2.4rem); box-shadow: var(--lp-shadow-sm); }
.lp-article__cover { margin: 0 0 1.8rem; border-radius: var(--lp-radius); overflow: hidden; background: var(--lp-primary-soft); }
.lp-article__cover img { width: 100%; max-height: 560px; object-fit: cover; }
.lp-article__chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .9rem; }
.lp-article__title { font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2.15rem); font-weight: 800; line-height: 1.6; color: var(--lp-dark); }
.lp-article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.4rem; margin-top: 1.1rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--lp-border); color: var(--lp-muted); font-size: .9rem; }
.lp-article__meta > span { display: inline-flex; align-items: center; gap: .4rem; }
.lp-article__author b { color: var(--lp-primary-strong); font-weight: 700; }
.lp-avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--lp-dark); color: #fff; font-weight: 700; font-size: .9rem; }
.lp-article__lead {
    margin-top: 1.6rem; padding: 1.1rem 1.4rem; border-radius: var(--lp-radius-sm);
    background: var(--lp-cream); border-inline-start: 4px solid var(--lp-primary);
    font-weight: 600; line-height: 2.05; color: #3b4152;
}
.lp-article__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--lp-border); }
.lp-article__share-label { font-weight: 700; color: var(--lp-muted); font-size: .92rem; }
.lp-share { display: flex; gap: .5rem; }
.lp-share__btn {
    position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; cursor: pointer;
    background: var(--lp-bg); border: 1px solid var(--lp-border); color: var(--lp-text); transition: all .2s;
}
.lp-share__btn:hover { background: var(--lp-primary); border-color: var(--lp-primary); color: var(--lp-on-primary); }
.lp-share__done {
    position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(4px);
    background: var(--lp-dark); color: #fff; font-size: .75rem; padding: .25rem .6rem; border-radius: 8px; white-space: nowrap;
    opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.lp-share__btn.is-copied .lp-share__done { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Rich text from the editor */
.lp-prose { margin-top: 1.8rem; font-size: 1.03rem; line-height: 2.15; color: #2e3344; overflow-wrap: anywhere; }
.lp-prose > * + * { margin-top: 1.1em; }
.lp-prose h2, .lp-prose h3, .lp-prose h4 { color: var(--lp-dark); font-weight: 800; margin-top: 1.8em; }
.lp-prose h2 { font-size: 1.45rem; }
.lp-prose h3 { font-size: 1.22rem; }
.lp-prose h4 { font-size: 1.08rem; }
.lp-prose a { color: var(--lp-primary-strong); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.lp-prose ul, .lp-prose ol { padding-inline-start: 1.5rem; }
.lp-prose li + li { margin-top: .4em; }
.lp-prose li::marker { color: var(--lp-primary); }
.lp-prose blockquote {
    margin-inline: 0; padding: 1rem 1.4rem; border-radius: var(--lp-radius-sm);
    background: var(--lp-cream); border-inline-start: 4px solid var(--lp-primary); color: #3b4152;
}
.lp-prose img { border-radius: var(--lp-radius-sm); margin-inline: auto; }
.lp-prose figure { margin: 1.5em 0; }
.lp-prose figcaption { text-align: center; font-size: .88rem; color: var(--lp-muted); margin-top: .5rem; }
.lp-prose hr { border: 0; height: 1px; background: var(--lp-border); margin-block: 2em; }
.lp-prose table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: .94rem; }
.lp-prose th, .lp-prose td { border: 1px solid var(--lp-border); padding: .6rem .9rem; text-align: start; }
.lp-prose th { background: var(--lp-cream); font-weight: 700; }
.lp-prose pre { background: var(--lp-dark); color: #f3f4f6; padding: 1rem; border-radius: var(--lp-radius-sm); overflow-x: auto; direction: ltr; text-align: left; }
.lp-prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }
.lp-prose mark { background: rgb(var(--lp-primary-rgb) / .3); padding-inline: .2em; border-radius: 4px; }
.lp-prose details { border: 1px solid var(--lp-border); border-radius: var(--lp-radius-sm); padding: .8rem 1.1rem; }
.lp-prose summary { cursor: pointer; font-weight: 700; }

/* ---------- Sidebar ---------- */
.lp-sidebar { position: sticky; top: calc(var(--lp-header-h) + 1.2rem); display: grid; gap: 1.4rem; }
.lp-widget { background: var(--lp-surface); border: 1px solid var(--lp-border); border-radius: var(--lp-radius); padding: 1.4rem; box-shadow: var(--lp-shadow-sm); }
.lp-widget .lp-search { border-color: var(--lp-border); }
.lp-widget__title { position: relative; font-size: 1.1rem; font-weight: 800; padding-bottom: .8rem; margin-bottom: 1.1rem; }
.lp-widget__title::after { content: ""; position: absolute; bottom: 0; inset-inline-start: 0; width: 38px; height: 4px; border-radius: 4px; background: var(--lp-primary); }
.lp-mini-list, .lp-cat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.lp-mini { display: grid; grid-template-columns: 76px 1fr; gap: .85rem; align-items: center; }
.lp-mini__thumb { display: grid; place-items: center; width: 76px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--lp-primary-soft); color: var(--lp-primary-strong); }
.lp-mini__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--lp-ease); }
.lp-mini:hover .lp-mini__thumb img { transform: scale(1.08); }
.lp-mini__body { display: grid; gap: .25rem; }
.lp-mini__title { font-weight: 700; font-size: .92rem; line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color .2s; }
.lp-mini:hover .lp-mini__title { color: var(--lp-primary-strong); }
.lp-mini__date { display: inline-flex; align-items: center; gap: .3rem; color: var(--lp-muted); font-size: .8rem; }
.lp-cat-list { gap: .35rem; }
.lp-cat-list a { display: flex; align-items: center; justify-content: space-between; padding: .55rem .8rem; border-radius: 10px; transition: background-color .2s, color .2s; }
.lp-cat-list a:hover { background: var(--lp-primary-soft); color: var(--lp-primary-strong); }

/* ---------- Footer ---------- */
.lp-footer { position: relative; isolation: isolate; overflow: hidden; background: var(--lp-dark); color: rgb(255 255 255 / .78); padding-top: 4.5rem; }
.lp-footer__glow { position: absolute; z-index: -1; width: 620px; height: 620px; border-radius: 50%; top: -360px; inset-inline-start: -200px; background: radial-gradient(circle, rgb(var(--lp-primary-rgb) / .28), transparent 65%); }
.lp-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr; gap: 3rem; padding-bottom: 3.2rem; }
.lp-footer .lp-brand { color: #fff; }
.lp-footer__text { margin-top: 1.2rem; line-height: 2.1; font-size: .94rem; max-width: 44ch; }
.lp-footer__title { position: relative; color: #fff; font-size: 1.12rem; font-weight: 800; padding-bottom: .8rem; margin-bottom: 1.2rem; }
.lp-footer__title::after { content: ""; position: absolute; bottom: 0; inset-inline-start: 0; width: 38px; height: 3px; border-radius: 3px; background: var(--lp-primary); }
.lp-footer__links, .lp-footer__contacts { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; font-size: .95rem; }
.lp-footer__links a { display: inline-flex; align-items: center; gap: .4rem; transition: color .2s, transform .2s; }
.lp-footer__links a:hover { color: var(--lp-primary); transform: translateX(-4px); }
.lp-footer__contacts li { display: flex; align-items: flex-start; gap: .75rem; line-height: 1.9; }
.lp-footer__contacts a:hover { color: var(--lp-primary); }
.lp-footer__contact-icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgb(255 255 255 / .07); color: var(--lp-primary); }
.lp-footer__bottom { border-top: 1px solid rgb(255 255 255 / .08); padding-block: 1.3rem; font-size: .86rem; text-align: center; color: rgb(255 255 255 / .55); }

.lp-to-top {
    position: fixed; bottom: 1.4rem; inset-inline-end: 1.4rem; z-index: 40;
    display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; border: 0; cursor: pointer;
    background: var(--lp-primary); color: var(--lp-on-primary); box-shadow: 0 12px 26px -12px rgb(var(--lp-primary-rgb) / .9);
    opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .3s, transform .3s var(--lp-ease);
}
.lp-to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.lp-to-top:hover { transform: translateY(-3px); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .lp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lp-news-spotlight { grid-template-columns: 1fr; }
    .lp-article-layout { grid-template-columns: 1fr; }
    .lp-sidebar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lp-sidebar > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
    :root { --lp-header-h: 72px; }
    .lp-brand__logo { height: 46px; }
    .lp-menu-toggle { display: grid; }
    .lp-header__cta { display: none; }
    .lp-nav {
        position: fixed; inset-block: 0; inset-inline-start: 0; width: min(330px, 86vw); z-index: 60;
        flex-direction: column; align-items: stretch; gap: 1.4rem; padding: calc(var(--lp-header-h) + 1rem) 1.4rem 1.5rem;
        background: var(--lp-surface); color: var(--lp-text); box-shadow: var(--lp-shadow-lg);
        transform: translateX(100%); visibility: hidden; transition: transform .4s var(--lp-ease), visibility 0s .4s;
        overflow-y: auto; overscroll-behavior: contain;
    }
    /* A backdrop-filter makes the header the containing block of the fixed
       drawer (clipping it to the header's height); drop it while open. */
    .lp-header.is-menu-open, .lp-header.is-overlay.is-scrolled.is-menu-open { backdrop-filter: none; -webkit-backdrop-filter: none; }
    .lp-header.is-menu-open .lp-nav { transform: none; visibility: visible; transition: transform .4s var(--lp-ease), visibility 0s; }
    .lp-header.is-menu-open::after { content: ""; position: fixed; inset: 0; z-index: 55; background: rgb(var(--lp-dark-rgb) / .45); }
    .lp-header.is-menu-open .lp-menu-toggle { position: relative; z-index: 70; color: var(--lp-text); }
    .lp-header.is-menu-open .lp-menu-toggle__open { display: none; }
    .lp-header.is-menu-open .lp-menu-toggle__close { display: inline; }
    .lp-nav__list { flex-direction: column; gap: .2rem; }
    .lp-nav__link { padding: .85rem 1rem; font-size: 1.05rem; color: var(--lp-text) !important; }
    .lp-nav__link.is-active { background: var(--lp-primary-soft); }
    .lp-nav__link::after { display: none; }
    .lp-nav__cta-mobile { display: inline-flex; }
    .lp-nav__parent { justify-content: space-between; }
    .lp-nav__parent .lp-nav__link { flex: 1; }
    .lp-nav__toggle { width: 40px; height: 40px; color: var(--lp-text); }
    .lp-nav__sub {
        position: static; min-width: 0; box-shadow: none; border: 0; border-inline-start: 2px solid var(--lp-primary-soft);
        border-radius: 0; margin-inline-start: 1rem; padding: 0 .5rem 0 0; transform: none; display: none;
        opacity: 1; visibility: visible; transition: none;
    }
    .lp-nav__item:hover > .lp-nav__sub, .lp-nav__item:focus-within > .lp-nav__sub { display: none; }
    .lp-nav__item.is-open > .lp-nav__sub { display: grid; }
    .lp-nav__sub::before { display: none; }

    .lp-slide__layout { align-items: flex-end; padding-bottom: 110px; }
    .lp-slide__card { padding: 1.7rem 1.5rem 1.6rem; border-radius: 22px; max-width: none; width: 100%; }
    .lp-slide__card::before { inset-inline-start: 1.5rem; }
    .lp-slide__ribbon { display: none; }
    .lp-slide__card:has(.lp-slide__ribbon) { margin-inline-start: 0; }
    .lp-slide__shade { background: linear-gradient(to top, rgb(var(--lp-dark-rgb) / .85) 10%, rgb(var(--lp-dark-rgb) / .2) 60%, rgb(var(--lp-dark-rgb) / .35)); }
    .lp-slide__text { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
    .lp-hero__controls { bottom: 26px; }
    .lp-hero__counter, .lp-hero__nav [data-lp-pause] { display: none; }
    .lp-round-btn { width: 42px; height: 42px; }
    .lp-hero__dot-bar { width: 28px; }

    .lp-footer__grid { grid-template-columns: 1fr 1fr; gap: 2.2rem; }
    .lp-footer__about { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    .lp-container { width: calc(100% - 2rem); }
    .lp-grid { grid-template-columns: 1fr; }
    .lp-sidebar { grid-template-columns: 1fr; }
    .lp-card--lead { min-height: 400px; }
    .lp-card--lead .lp-card__body { padding: 1.4rem; }
    .lp-card--row .lp-card__media { flex-basis: 112px; min-height: 108px; }
    .lp-footer__grid { grid-template-columns: 1fr; }
    .lp-slide__title { font-size: 1.45rem; }
    .lp-slide__actions .lp-btn { flex: 1 1 auto; }
    .lp-toolbar { flex-direction: column; align-items: stretch; }
    .lp-search--wide { max-width: none; flex-basis: auto; }
    .lp-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .4rem; scrollbar-width: thin; }
    .lp-chips .lp-chip { flex: none; }
    .lp-pagination__step { padding-inline: .6rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
    .lp-slide__bg img { transform: none !important; }
}

@media print {
    .lp-header, .lp-footer, .lp-sidebar, .lp-to-top, .lp-article__foot { display: none !important; }
    .lp-article-layout { display: block; }
}

/* ======================================================================
   «اطلس مراکز» — full-screen map with a floating glass panel (desktop)
   and a bottom sheet (mobile).
   ====================================================================== */
.lp-body--atlas .lp-to-top { display: none; }

.lp-atlas {
    position: relative; isolation: isolate; overflow: hidden;
    height: calc(100vh - var(--lp-header-h)); height: calc(100svh - var(--lp-header-h)); min-height: 560px;
    background: #e9e5dc;
}
.lp-atlas__map { position: absolute; inset: 0; z-index: 0; }
.lp-atlas__map-state {
    position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .8rem;
    color: var(--lp-muted); font-weight: 600; text-align: center; padding: 2rem;
    background:
        radial-gradient(600px 380px at 30% 40%, rgb(var(--lp-primary-rgb) / .14), transparent 70%),
        repeating-linear-gradient(45deg, rgb(var(--lp-dark-rgb) / .03) 0 12px, transparent 12px 24px), #efebe3;
}
.lp-atlas__map-state .lp-icon { color: rgb(var(--lp-primary-rgb) / .85); }
.lp-atlas__map.is-ready .lp-atlas__map-state { display: none; }
.lp-atlas__spinner { width: 38px; height: 38px; border-radius: 50%; border: 4px solid rgb(var(--lp-primary-rgb) / .25); border-top-color: var(--lp-primary); animation: lp-spin 1s linear infinite; }
@keyframes lp-spin { to { transform: rotate(360deg); } }

/* Panel */
.lp-atlas__panel {
    position: absolute; z-index: 20; top: 1.25rem; bottom: 1.25rem; right: 1.25rem; width: 410px;
    display: flex; flex-direction: column; overflow: hidden;
    background: rgb(255 255 255 / .9); border: 1px solid rgb(255 255 255 / .7); border-radius: var(--lp-radius-lg);
    box-shadow: 0 30px 60px -28px rgb(var(--lp-dark-rgb) / .55), 0 2px 8px -2px rgb(var(--lp-dark-rgb) / .12);
    backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
    transition: transform .45s var(--lp-ease), opacity .3s;
}
.lp-atlas__panel:not(.is-open) { transform: translateX(calc(100% + 2rem)); opacity: 0; pointer-events: none; }
.lp-atlas__handle { display: none; }

.lp-atlas__head { display: flex; align-items: flex-start; gap: .9rem; padding: 1.4rem 1.4rem .9rem; }
.lp-atlas__head > div:first-child { flex: 1; min-width: 0; }
.lp-atlas__head .lp-eyebrow { font-size: .8rem; margin-bottom: .1rem; }
.lp-atlas__title { font-size: 1.45rem; font-weight: 800; color: var(--lp-dark); line-height: 1.5; }
.lp-atlas__count {
    display: grid; justify-items: center; min-width: 64px; padding: .4rem .7rem; border-radius: 16px;
    background: var(--lp-primary); color: var(--lp-on-primary); line-height: 1.3; box-shadow: 0 10px 22px -12px rgb(var(--lp-primary-rgb) / .9);
}
.lp-atlas__count b { font-size: 1.35rem; font-weight: 800; }
.lp-atlas__count span { font-size: .75rem; font-weight: 600; }
.lp-atlas__collapse {
    display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 12px; cursor: pointer;
    border: 1px solid var(--lp-border); background: var(--lp-surface); color: var(--lp-text); transition: all .2s;
}
.lp-atlas__collapse:hover { border-color: var(--lp-primary); color: var(--lp-primary-strong); }
.lp-atlas__desc { padding: 0 1.4rem .6rem; color: var(--lp-muted); font-size: .88rem; line-height: 1.9; }

.lp-atlas__filters { display: grid; gap: .6rem; padding: .2rem 1.4rem 1rem; border-bottom: 1px solid rgb(var(--lp-dark-rgb) / .07); }
.lp-search--atlas { background: var(--lp-surface); }
.lp-search--atlas input { padding: .7rem 1rem; }
.lp-search--atlas button { width: 42px; height: 42px; }
.lp-atlas__selects { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.lp-select { position: relative; display: block; }
.lp-select::after {
    content: ""; position: absolute; left: .9rem; top: 50%; width: 8px; height: 8px; margin-top: -6px; pointer-events: none;
    border-right: 2px solid var(--lp-muted); border-bottom: 2px solid var(--lp-muted); transform: rotate(45deg);
}
.lp-select select {
    width: 100%; appearance: none; -webkit-appearance: none; cursor: pointer;
    padding: .7rem .9rem .7rem 2.2rem; border-radius: 12px; border: 1.5px solid var(--lp-border); background: var(--lp-surface);
    font-size: .9rem; transition: border-color .2s, box-shadow .2s;
}
.lp-select select:focus { outline: none; border-color: var(--lp-primary); box-shadow: 0 0 0 4px rgb(var(--lp-primary-rgb) / .16); }
.lp-select select:disabled { opacity: .55; cursor: not-allowed; }
.lp-atlas__filter-foot { display: flex; justify-content: space-between; align-items: center; min-height: 0; }
.lp-atlas__filter-foot:empty { display: none; }
.lp-atlas__reset { font-size: .85rem; font-weight: 700; color: var(--lp-primary-strong); }
.lp-atlas__reset[hidden] { display: none; }

.lp-atlas__list { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: .9rem 1rem 1.2rem; display: grid; align-content: start; gap: .65rem; scrollbar-width: thin; }
.lp-atlas__list[aria-busy="true"] { opacity: .55; transition: opacity .2s; }
.lp-atlas__more { justify-self: center; margin-top: .4rem; }
.lp-atlas__empty { display: grid; place-items: center; gap: .6rem; padding: 2.5rem 1rem; color: var(--lp-muted); text-align: center; }
.lp-atlas__empty .lp-icon { color: rgb(var(--lp-primary-rgb) / .8); }

/* Centre card */
.lp-center {
    position: relative; display: grid; grid-template-columns: 40px 1fr; gap: .8rem; padding: .95rem 1rem;
    background: var(--lp-surface); border: 1px solid var(--lp-border); border-radius: 18px; cursor: default;
    transition: border-color .25s, box-shadow .25s, transform .25s var(--lp-ease);
}
.lp-center[data-center-located] { cursor: pointer; }
.lp-center[data-center-located]:hover { border-color: rgb(var(--lp-primary-rgb) / .5); box-shadow: var(--lp-shadow-sm); transform: translateY(-2px); }
.lp-center.is-active { border-color: var(--lp-primary); box-shadow: 0 0 0 3px rgb(var(--lp-primary-rgb) / .22), var(--lp-shadow-sm); }
.lp-center__mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--lp-primary-soft); color: var(--lp-primary-strong); }
.lp-center.is-active .lp-center__mark { background: var(--lp-primary); color: var(--lp-on-primary); }
/* A centre picked on the map that was not in the loaded page of the list (atlas.js showPicked). */
.lp-center.is-picked { position: relative; padding-top: 2.1rem; }
.lp-center.is-picked::before { content: 'انتخاب‌شده روی نقشه'; position: absolute; top: .55rem; inset-inline-start: 1rem; font-size: .74rem; font-weight: 800; color: var(--lp-primary-strong); }
.lp-center:not([data-center-located]) .lp-center__mark { background: rgb(var(--lp-dark-rgb) / .05); color: var(--lp-muted); }
.lp-center__body { min-width: 0; display: grid; gap: .25rem; }
.lp-center__name { font-size: 1rem; font-weight: 800; line-height: 1.7; color: var(--lp-dark); }
.lp-center__name button { all: unset; cursor: pointer; }
.lp-center__name button:focus-visible { outline: 3px solid var(--lp-primary); outline-offset: 3px; border-radius: 6px; }
.lp-center__name button:hover { color: var(--lp-primary-strong); }
.lp-center__place { font-size: .82rem; font-weight: 700; color: var(--lp-primary-strong); }
.lp-center__address { font-size: .85rem; color: var(--lp-muted); line-height: 1.9; }
.lp-center__phones { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .25rem; }
.lp-center__phones a {
    display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .7rem; border-radius: 999px; font-size: .82rem; font-weight: 600;
    background: var(--lp-bg); border: 1px solid var(--lp-border); transition: all .2s;
}
.lp-center__phones a:hover { background: var(--lp-primary); border-color: var(--lp-primary); color: var(--lp-on-primary); }

/* Floating tools on the map */
.lp-atlas__tools { position: absolute; z-index: 15; left: 1.25rem; bottom: 1.6rem; display: flex; flex-direction: column; gap: .5rem; }
.lp-atlas__tool {
    display: inline-flex; align-items: center; gap: .45rem; padding: .65rem 1rem; border-radius: 14px; cursor: pointer; font-weight: 700; font-size: .88rem;
    background: rgb(255 255 255 / .92); border: 1px solid rgb(255 255 255 / .8); color: var(--lp-dark);
    box-shadow: 0 14px 30px -18px rgb(var(--lp-dark-rgb) / .6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    transition: all .2s;
}
.lp-atlas__tool:hover { background: var(--lp-primary); color: var(--lp-on-primary); }
.lp-atlas__tool[hidden] { display: none; }

/* Logo pins (Leaflet divIcon) */
.lp-pin-wrap { background: none !important; border: 0 !important; }
.lp-pin { position: relative; width: 48px; height: 58px; filter: drop-shadow(0 8px 10px rgb(var(--lp-dark-rgb) / .35)); transition: transform .25s var(--lp-ease); transform-origin: 50% 100%; }
.lp-pin::after {
    content: ""; position: absolute; left: 50%; bottom: 2px; width: 16px; height: 16px; margin-left: -8px;
    background: #fff; border-right: 3px solid var(--lp-primary); border-bottom: 3px solid var(--lp-primary); transform: rotate(45deg); border-radius: 0 0 4px 0;
}
.lp-pin__badge {
    position: relative; z-index: 1; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; overflow: hidden;
    background: #fff; border: 3px solid var(--lp-primary);
}
.lp-pin__badge img { width: 34px; height: 34px; object-fit: contain; }
.lp-pin__dot { width: 16px; height: 16px; border-radius: 50%; background: var(--lp-primary); }
.lp-pin:hover, .lp-pin.is-active { transform: scale(1.18); }
.lp-pin.is-active .lp-pin__badge { border-color: var(--lp-dark); }
.lp-pin.is-active::after { border-color: var(--lp-dark); }

/* Popup */
.lp-atlas .leaflet-popup-content-wrapper { border-radius: 18px; box-shadow: var(--lp-shadow); padding: 0; }
.lp-atlas .leaflet-popup-content { margin: 0; width: 270px !important; font-family: inherit; }
.lp-atlas .lp-popup p { margin: 0; }
.lp-popup { direction: rtl; text-align: right; padding: 1rem 1.1rem; display: grid; gap: .35rem; font-family: "Vazirmatn FD", Vazirmatn, Tahoma, sans-serif; }
.lp-popup__name { font-size: 1rem; font-weight: 800; color: var(--lp-dark); line-height: 1.7; margin: 0; }
.lp-popup__place { font-size: .8rem; font-weight: 700; color: var(--lp-primary-strong); margin: 0; }
.lp-popup__address { font-size: .82rem; color: var(--lp-muted); line-height: 1.9; margin: 0; }
.lp-popup__phones { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .2rem; }
.lp-popup__phones a { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .65rem; border-radius: 999px; background: var(--lp-primary-soft); color: var(--lp-primary-strong) !important; font-weight: 700; font-size: .8rem; }

/* No map (no key / SDK unreachable): the list takes the page */
.lp-atlas.is-map-off { height: auto; min-height: 0; background: var(--lp-bg); padding: 2rem 0 3rem; }
.lp-atlas.is-map-off .lp-atlas__map { position: relative; height: 140px; width: min(1240px, 100% - 2.5rem); margin: 0 auto 1.25rem; border-radius: var(--lp-radius-lg); overflow: hidden; }
.lp-atlas.is-map-off .lp-atlas__panel { position: relative; inset: auto; width: min(1240px, 100% - 2.5rem); margin: 0 auto; transform: none; opacity: 1; pointer-events: auto; }
.lp-atlas.is-map-off .lp-atlas__list { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); overflow: visible; }
.lp-atlas.is-map-off .lp-atlas__more { grid-column: 1 / -1; }
.lp-atlas.is-map-off .lp-atlas__collapse, .lp-atlas.is-map-off .lp-atlas__tools { display: none; }

@media (max-width: 900px) {
    .lp-atlas { height: calc(100svh - var(--lp-header-h)); }
    .lp-atlas__panel {
        top: auto; right: 0; left: 0; bottom: 0; width: auto; height: 82%;
        border-radius: 26px 26px 0 0; border-bottom: 0;
        transform: translateY(calc(100% - var(--lp-sheet-peek, 172px))); opacity: 1; pointer-events: auto;
    }
    .lp-atlas__panel.is-open { transform: translateY(0); }
    .lp-atlas__panel:not(.is-open) { opacity: 1; pointer-events: auto; transform: translateY(calc(100% - var(--lp-sheet-peek, 172px))); }
    .lp-atlas__panel.is-dragging { transition: none; }
    .lp-atlas__handle { display: grid; place-items: center; width: 100%; height: 26px; padding: 0; border: 0; background: transparent; cursor: grab; touch-action: none; flex: none; }
    .lp-atlas__grip { width: 44px; height: 5px; border-radius: 5px; background: rgb(var(--lp-dark-rgb) / .22); }
    .lp-atlas__head { padding: .2rem 1.1rem .7rem; }
    .lp-atlas__title { font-size: 1.2rem; }
    .lp-atlas__collapse, .lp-atlas__desc { display: none; }
    .lp-atlas__filters { padding: .2rem 1.1rem .8rem; }
    .lp-atlas__tools { left: 1rem; bottom: calc(var(--lp-sheet-peek, 172px) + 1rem); }
    .lp-atlas__tool span { display: none; }
    .lp-atlas__tool { padding: .7rem; }
    .lp-atlas.is-map-off .lp-atlas__map { height: 110px; }
    .lp-atlas.is-map-off .lp-atlas__panel { position: relative; height: auto; transform: none; border-radius: var(--lp-radius-lg); border-bottom: 1px solid rgb(255 255 255 / .7); }
    .lp-atlas.is-map-off .lp-atlas__handle { display: none; }
    .lp-atlas.is-map-off .lp-atlas__list { grid-template-columns: 1fr; }
}

/* ======================================================================
   Centre page (/atlas/{id}) — profile layout (option A)
   ====================================================================== */
.lp-center__more, .lp-popup__more {
    display: inline-flex; align-items: center; gap: .3rem; margin-top: .35rem; justify-self: start;
    font-size: .84rem; font-weight: 800; color: var(--lp-primary-strong);
}
.lp-center__more:hover, .lp-popup__more:hover { color: var(--lp-dark); }
.lp-center__more .lp-icon, .lp-popup__more .lp-icon { transition: transform .25s var(--lp-ease); }
.lp-center__more:hover .lp-icon { transform: translateX(-3px); }
.lp-atlas .lp-popup__more { color: var(--lp-primary-strong) !important; margin-top: .4rem; }

.lp-center-head { padding-block: 2.6rem 2.8rem; }
.lp-center-head__main { display: flex; align-items: center; gap: 1.4rem; margin-top: 1.4rem; flex-wrap: wrap; }
.lp-center-head__logo {
    flex: none; display: grid; place-items: center; width: 92px; height: 92px; border-radius: 26px; overflow: hidden;
    background: #fff; border: 4px solid var(--lp-primary); color: var(--lp-primary-strong);
    box-shadow: 0 18px 40px -18px rgb(0 0 0 / .6);
}
.lp-center-head__logo img { width: 64px; height: 64px; object-fit: contain; }
.lp-center-head__text { flex: 1; min-width: 240px; }
.lp-center-head .lp-page-head__title { margin-top: 0; }
.lp-center-head__chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.lp-chip--on-dark { background: rgb(255 255 255 / .1); color: #fff; border-color: rgb(255 255 255 / .18); }
.lp-chip--on-dark:hover { background: rgb(255 255 255 / .18); color: #fff; }
.lp-chip--verified { background: rgb(34 197 94 / .16); color: #bbf7d0; border-color: rgb(34 197 94 / .35); }
.lp-chip--verified:hover { background: rgb(34 197 94 / .16); color: #bbf7d0; }
.lp-center-head__actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.lp-btn--glass { background: rgb(255 255 255 / .1); color: #fff; border-color: rgb(255 255 255 / .25); }
.lp-btn--glass:hover { background: #fff; color: var(--lp-dark); }

.lp-center-main { display: grid; gap: 1.4rem; align-content: start; }
.lp-panel { background: var(--lp-surface); border: 1px solid var(--lp-border); border-radius: var(--lp-radius-lg); padding: clamp(1.2rem, .9rem + 1.2vw, 1.9rem); box-shadow: var(--lp-shadow-sm); }
.lp-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.lp-panel__title { position: relative; font-size: 1.2rem; font-weight: 800; color: var(--lp-dark); padding-inline-start: 1rem; margin-bottom: 1.1rem; }
.lp-panel__head .lp-panel__title { margin-bottom: 0; }
.lp-panel__head { margin-bottom: 1.1rem; }
.lp-panel__title::before { content: ""; position: absolute; inset-inline-start: 0; top: .3em; bottom: .3em; width: 4px; border-radius: 4px; background: var(--lp-primary); }
.lp-panel__subtitle { font-size: 1.02rem; font-weight: 800; color: var(--lp-dark); margin: 1.2rem 0 .8rem; }

.lp-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .8rem; margin: 0; }
.lp-facts__item { padding: .85rem 1rem; border-radius: 14px; background: var(--lp-bg); border: 1px solid var(--lp-border); }
.lp-facts dt { font-size: .8rem; font-weight: 700; color: var(--lp-muted); }
.lp-facts dd { margin: .2rem 0 0; font-weight: 700; color: var(--lp-dark); line-height: 1.9; overflow-wrap: anywhere; }

.lp-people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .8rem; }
.lp-person { display: flex; align-items: center; gap: .8rem; padding: .85rem 1rem; border-radius: 16px; background: var(--lp-cream); border: 1px solid rgb(var(--lp-primary-rgb) / .2); }
.lp-person .lp-avatar { flex: none; width: 44px; height: 44px; background: var(--lp-primary); color: var(--lp-on-primary); font-size: 1.05rem; }
.lp-person__body { display: grid; gap: .1rem; min-width: 0; }
.lp-person__body b { font-weight: 800; color: var(--lp-dark); }
.lp-person__body > span { font-size: .84rem; color: var(--lp-muted); }
.lp-person__label { font-weight: 700; }

.lp-comments { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.lp-comment { display: flex; gap: .85rem; padding: 1rem 1.1rem; border-radius: 16px; background: var(--lp-bg); border: 1px solid var(--lp-border); }
.lp-avatar--soft { flex: none; background: var(--lp-primary-soft); color: var(--lp-primary-strong); width: 40px; height: 40px; }
.lp-comment__body { min-width: 0; flex: 1; }
.lp-comment__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; font-size: .84rem; color: var(--lp-muted); margin-bottom: .3rem; }
.lp-comment__meta b { color: var(--lp-dark); }
.lp-comment p { line-height: 2; color: #2e3344; overflow-wrap: anywhere; }
.lp-comments__empty { color: var(--lp-muted); padding: .4rem 0 .2rem; }
.lp-comments + .lp-pagination { margin-top: 1.4rem; }

.lp-comment-form { margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px dashed var(--lp-border); display: grid; gap: .5rem; }
.lp-comment-form .lp-panel__subtitle { margin-top: 0; }
.lp-field-label { font-weight: 700; font-size: .92rem; }
.lp-comment-form textarea {
    width: 100%; min-height: 130px; resize: vertical; padding: .9rem 1rem; border-radius: 14px; line-height: 2;
    border: 1.5px solid var(--lp-border); background: var(--lp-surface); transition: border-color .2s, box-shadow .2s;
}
.lp-comment-form textarea:focus { outline: none; border-color: var(--lp-primary); box-shadow: 0 0 0 4px rgb(var(--lp-primary-rgb) / .16); }
.lp-comment-form textarea.is-invalid { border-color: #dc2626; box-shadow: 0 0 0 4px rgb(220 38 38 / .12); }
.lp-field-error { color: #b91c1c; font-size: .86rem; font-weight: 700; }
.lp-comment-form__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; }
.lp-field-help { font-size: .82rem; color: var(--lp-muted); max-width: 46ch; line-height: 1.9; }
.lp-counter { display: inline-block; margin-inline-start: .4rem; font-weight: 700; direction: ltr; }
.lp-alert { display: flex; align-items: center; gap: .5rem; padding: .8rem 1rem; border-radius: 14px; font-weight: 700; font-size: .92rem; }
.lp-alert--success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.lp-btn__busy { display: none; }
.lp-btn.is-busy { opacity: .7; cursor: progress; transform: none; }
.lp-btn.is-busy .lp-btn__label { display: none; }
.lp-btn.is-busy .lp-btn__busy { display: inline; }
.lp-hp { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

.lp-contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.lp-contact-list li { display: flex; gap: .75rem; align-items: flex-start; line-height: 1.9; }
.lp-contact-list small { display: block; font-size: .78rem; font-weight: 700; color: var(--lp-muted); line-height: 1.6; }
.lp-contact-list a { font-weight: 700; color: var(--lp-dark); }
.lp-contact-list a:hover { color: var(--lp-primary-strong); }
.lp-contact-list__icon { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--lp-primary-soft); color: var(--lp-primary-strong); }
.lp-center-map { position: relative; height: 260px; border-radius: 16px; overflow: hidden; background: #efebe3; isolation: isolate; }
.lp-center-map.is-ready .lp-atlas__map-state { display: none; }
.lp-center-map .leaflet-popup-content-wrapper { border-radius: 14px; padding: 0; }
.lp-center-map .leaflet-popup-content { margin: 0; }
.lp-center-map .lp-popup p { margin: 0; }
.lp-widget__cta { width: 100%; margin-top: 1rem; }

@media (max-width: 640px) {
    .lp-center-head__logo { width: 72px; height: 72px; border-radius: 20px; }
    .lp-center-head__logo img { width: 50px; height: 50px; }
    .lp-center-head__actions { width: 100%; }
    .lp-center-head__actions .lp-btn { flex: 1 1 auto; }
    .lp-comment-form__foot .lp-btn { width: 100%; }
}

/* A centre that is not active on the atlas (atlas/inactive.blade.php). */
.lp-center-status { display: flex; gap: 1rem; align-items: flex-start; border-inline-start-width: 5px; }
.lp-center-status__icon { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; }
.lp-center-status__title { margin: 0 0 .35rem; font-size: 1.15rem; font-weight: 800; }
.lp-center-status__text { margin: 0; line-height: 2; color: var(--lp-muted); }
.lp-center-status__dates { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .5rem 1.5rem; margin: .9rem 0 0; }
.lp-center-status__dates div { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--lp-border); }
.lp-center-status__dates dt { color: var(--lp-muted); font-weight: 700; font-size: .88rem; }
.lp-center-status__dates dd { margin: 0; font-weight: 800; }
.lp-center-status--warning { border-inline-start-color: #d97706; }
.lp-center-status--warning .lp-center-status__icon { background: #fef3c7; color: #b45309; }
.lp-center-status--warning .lp-center-status__title { color: #92400e; }
.lp-center-status--danger { border-inline-start-color: #dc2626; }
.lp-center-status--danger .lp-center-status__icon { background: #fee2e2; color: #b91c1c; }
.lp-center-status--danger .lp-center-status__title { color: #991b1b; }
.lp-center-status--info { border-inline-start-color: #2563eb; }
.lp-center-status--info .lp-center-status__icon { background: #dbeafe; color: #1d4ed8; }
.lp-center-status--info .lp-center-status__title { color: #1e40af; }
@media (max-width: 560px) { .lp-center-status { flex-direction: column; } }
