/* ════════════════════════════════════════════════════════════════
   PAGE-HERO.CSS — Page Hero + Static Page Shell Components
   Prefix: .pgh  (page hero)
           .sp-  (static page shell: legal/info pages)
   RTL-safe via CSS logical properties
════════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════════════
   PAGE HERO
════════════════════════════════════════════════════════════════ */

.pgh {
    position: relative;
    background: var(--color-primary);
    overflow: hidden;
    padding: clamp(3rem, 7vw, 4.5rem) 0 clamp(2.5rem, 5vw, 3.5rem);
}
.pgh__bg {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, var(--color-primary-active) 0%, var(--color-primary) 50%, var(--color-primary-hover) 100%);
}
.pgh__radial {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(var(--color-accent-rgb), .13) 0%, transparent 70%);
}
.pgh__texture {
    position: absolute; inset: 0;
    background-image: repeating-linear-gradient(
        -45deg,
        transparent 0px, transparent 28px,
        rgba(255,255,255,.018) 28px, rgba(255,255,255,.018) 29px
    );
}
.pgh__line-t {
    position: absolute; top: 0; inset-inline-start: 0; inset-inline-end: 0;
    height: 2px;
    background: linear-gradient(to right, transparent 0%, rgba(var(--color-accent-rgb), .55) 30%, rgba(var(--color-accent-rgb), .9) 50%, rgba(var(--color-accent-rgb), .55) 70%, transparent 100%);
}
.pgh__line-b {
    position: absolute; bottom: 0; inset-inline-start: 0; inset-inline-end: 0;
    height: 1px;
    background: linear-gradient(to right, transparent 0%, rgba(var(--color-accent-rgb), .22) 40%, rgba(var(--color-accent-rgb), .35) 50%, rgba(var(--color-accent-rgb), .22) 60%, transparent 100%);
}
.pgh__inner {
    position: relative; z-index: 1;
    max-width: 1280px; margin: 0 auto;
    padding: 0 1.5rem;
    display: flex; flex-direction: column; align-items: flex-start; gap: .6rem;
}
[dir="rtl"] .pgh__inner { align-items: flex-start; }

.pgh__breadcrumb {
    display: flex; align-items: center; gap: .45rem; flex-wrap: wrap;
    font-size: var(--fs-xs, .75rem);
}
.pgh__bc-link {
    color: rgba(255,255,255,.55); text-decoration: none;
    transition: color 140ms;
}
.pgh__bc-link:hover { color: var(--color-accent-light); }
.pgh__bc-sep { color: rgba(255,255,255,.28); }
.pgh__bc-cur { color: rgba(255,255,255,.82); font-weight: 500; }

.pgh__title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    color: var(--color-accent);
    font-family: var(--font-serif);
    letter-spacing: -.015em;
    line-height: 1.15; margin: 0;
    text-shadow: 0 0 48px rgba(var(--color-accent-rgb), .22);
}
html[dir="rtl"] .pgh__title {
    font-family: var(--font-arabic);
    letter-spacing: 0;
}
.pgh__subtitle {
    font-size: clamp(.875rem, 1.8vw, 1.05rem);
    color: rgba(255,255,255,.65);
    line-height: var(--lh-relaxed, 1.7);
    margin: 0; max-width: 56ch;
}
.pgh__title-line {
    width: 56px; height: 3px; border-radius: 2px;
    background: linear-gradient(to right, var(--color-accent), var(--color-accent-light));
    margin-top: .4rem;
}

/* ════════════════════════════════════════════════════════════════
   STATIC PAGE SHELL (Legal / Info pages)
   Used by: Privacy Policy, Terms of Service, Contact, etc.
════════════════════════════════════════════════════════════════ */

.sp-body {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3.5rem 1.5rem 5rem;
    background: var(--surface, var(--color-surface-2));
    counter-reset: sp-sec;
}
.sp-body--narrow { max-width: 820px; }

.sp-section {
    counter-increment: sp-sec;
    background: #fff;
    border: 1px solid var(--border, var(--color-border));
    border-radius: var(--r-md, 12px);
    padding: 2rem 2.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 6px rgba(0,0,0,.04);
    transition: box-shadow 200ms ease, transform 200ms ease;
    scroll-margin-top: 104px;
}
[dir="ltr"] .sp-section { border-left: 4px solid var(--color-accent); }
[dir="rtl"] .sp-section { border-right: 4px solid var(--color-accent); }
.sp-section:last-child { margin-bottom: 0; }
.sp-section:hover {
    box-shadow: 0 6px 28px rgba(var(--color-primary-rgb), .08);
    transform: translateY(-2px);
}

.sp-section-title {
    display: flex;
    align-items: center;
    gap: .7rem;
    font-size: clamp(1rem, 2vw, 1.22rem);
    font-weight: 700;
    color: var(--color-primary);
    font-family: var(--font-serif);
    letter-spacing: -.01em;
    line-height: 1.3;
    margin: 0 0 1.25rem;
    padding-bottom: .8rem;
    border-bottom: 1px solid rgba(var(--color-primary-rgb), .22);
}
.sp-section-title::before {
    content: counter(sp-sec, decimal-leading-zero);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .05em;
    color: var(--color-accent-text);
    font-family: var(--font-sans, system-ui, sans-serif);
    padding: .15rem .45rem;
    border: 1.5px solid rgba(var(--color-accent-rgb), .4);
    border-radius: 4px;
    background: rgba(var(--color-accent-rgb), .07);
    line-height: 1.4;
}
html[dir="rtl"] .sp-section-title { font-family: var(--font-arabic); letter-spacing: 0; }

.sp-prose {
    font-size: var(--fs-base, 1rem);
    color: var(--text-2, #374151);
    line-height: 1.75;
}
.sp-prose p { margin-bottom: 1.05rem; }
.sp-prose p:last-child { margin-bottom: 0; }

.sp-prose ul,
.sp-prose ol {
    list-style: none;
    padding-inline-start: 0;
    margin-bottom: 1.05rem;
}
.sp-prose li {
    position: relative;
    padding-inline-start: 1.55rem;
    margin-bottom: .6rem;
    line-height: 1.65;
}

.sp-prose ul > li::before {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: .58em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-accent);
    flex-shrink: 0;
}

.sp-prose ol { counter-reset: prose-ol; }
.sp-prose ol > li { counter-increment: prose-ol; }
.sp-prose ol > li::before {
    content: counter(prose-ol) '.';
    position: absolute;
    inset-inline-start: 0;
    color: var(--color-accent-text);
    font-weight: 600;
    font-size: .85em;
    line-height: 1.65;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 767px) {
    .sp-body { padding: 2rem 1rem 4rem; }
    .sp-section { padding: 1.5rem 1.25rem; }
}
@media (max-width: 480px) {
    .sp-section {
        padding: 1.25rem 1rem;
        border-radius: var(--r-sm, 8px);
        margin-bottom: 1rem;
    }
}

/* ── Reduced motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .sp-section { transition: none; }
    .sp-section:hover { transform: none; }
}

