/* ════════════════════════════════════════════════════════════════
   CATEGORY-HERO.CSS — Category Hero Component
   Prefix: .cat-hero, .cat-chip
   5-layer background system: gradient + radial glow + texture +
   top/bottom gold accent lines
   RTL-safe
════════════════════════════════════════════════════════════════ */

/* ── Shell ───────────────────────────────────────────────────── */
.cat-hero {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: clamp(2.8rem, 6vw, 5rem) 0 clamp(2.2rem, 5vw, 4rem);
}

/* ── Layer 1: maroon gradient base ──────────────────────────── */
.cat-hero__bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to left,
        var(--color-primary-active) 0%,
        var(--color-primary) 50%,
        var(--color-primary-hover) 100%
    );
    z-index: 0;
}

/* ── Layer 2: radial gold ambient glow ──────────────────────── */
.cat-hero__radial {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 65% 130% at 85% 40%,
            rgba(var(--color-accent-rgb), .12) 0%, transparent 65%),
        radial-gradient(ellipse 45% 90% at 15% 75%,
            rgba(var(--color-accent-rgb), .07) 0%, transparent 55%);
    z-index: 1;
}

/* ── Layer 3: diagonal micro-texture ────────────────────────── */
.cat-hero__texture {
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        -45deg,
        transparent               0px,
        transparent               32px,
        rgba(255,255,255,.022)    32px,
        rgba(255,255,255,.022)    33px
    );
    z-index: 2;
}

/* ── Layer 4: top gold accent line ──────────────────────────── */
.cat-hero__line-t {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 2px;
    background: linear-gradient(
        to right,
        transparent             0%,
        rgba(var(--color-accent-rgb), .25)    12%,
        var(--color-accent)             42%,
        rgba(var(--color-accent-rgb), .35)    72%,
        transparent             100%
    );
    z-index: 3;
}

/* ── Layer 5: bottom gold accent line ───────────────────────── */
.cat-hero__line-b {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 1px;
    background: linear-gradient(
        to right,
        transparent             0%,
        rgba(var(--color-accent-rgb), .18)    20%,
        rgba(var(--color-accent-rgb), .32)    50%,
        rgba(var(--color-accent-rgb), .18)    80%,
        transparent             100%
    );
    z-index: 3;
}

/* ── Content wrapper ─────────────────────────────────────────── */
.cat-hero__inner {
    position: relative;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-4);
}

/* ── Breadcrumb ──────────────────────────────────────────────── */
.cat-hero__nav .breadcrumb {
    padding: 0;
    background: transparent;
    font-size: var(--fs-sm);
    flex-wrap: wrap;
    align-items: center;
    gap: .05rem;
}
.cat-hero__nav .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,.28);
    font-size: .7rem;
}
html[dir="rtl"] .cat-hero__nav .breadcrumb-item + .breadcrumb-item::before {
    content: "\\";
    display: inline-block;
    transform: scaleX(-1);
}
.cat-hero__crumb-link {
    color: rgba(255,255,255,.55);
    text-decoration: none;
    font-weight: var(--fw-normal, 400);
    line-height: 1.5;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    transition: color var(--t);
}
.cat-hero__crumb-link:hover,
.cat-hero__crumb-link:focus-visible {
    color: var(--color-accent-light);
    text-decoration: none;
    outline-offset: 3px;
}
.cat-hero__crumb-active {
    color: rgba(255,255,255,.82);
    font-weight: var(--fw-medium, 500);
}

/* ── Hero body row: icon + text ──────────────────────────────── */
.cat-hero__body {
    display: flex;
    align-items: center;
    gap: var(--sp-5);
}

/* ── Icon circle ─────────────────────────────────────────────── */
.cat-hero__icon {
    width: 72px;
    height: 72px;
    border-radius: var(--r-lg, 18px);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.08);
    border: 1.5px solid rgba(var(--color-accent-rgb), .35);
    transition: border-color var(--t), background var(--t);
}
.cat-hero__icon--img {
    overflow: hidden;
    padding: 10px;
}
.cat-hero__icon--img img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    display: block;
    filter: brightness(1.08) drop-shadow(0 2px 8px rgba(0,0,0,.3));
}
.cat-hero__icon--svg { color: var(--color-accent); }

/* ── Title ───────────────────────────────────────────────────── */
.cat-hero__title {
    margin: 0 0 .35rem;
    color: var(--color-accent);
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 600;
    line-height: var(--lh-tight, 1.15);
    letter-spacing: -0.01em;
    text-shadow: 0 0 48px rgba(var(--color-accent-rgb), .28);
}
html[dir="rtl"] .cat-hero__title {
    font-family: var(--font-arabic);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.22;
}

/* ── Description ─────────────────────────────────────────────── */
.cat-hero__desc {
    color: rgba(255,255,255,.62);
    font-size: var(--fs-sm);
    margin: 0;
    line-height: var(--lh-relaxed, 1.7);
    max-width: 520px;
}
html[dir="rtl"] .cat-hero__desc { font-family: var(--font-arabic); }

/* ── Gold underline rule ─────────────────────────────────────── */
.cat-hero__title-line {
    width: 56px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(to right, var(--color-accent), rgba(var(--color-accent-rgb), .3));
    margin-top: calc(var(--sp-2) * -1);
}
html[dir="rtl"] .cat-hero__title-line {
    background: linear-gradient(to left, var(--color-accent), rgba(var(--color-accent-rgb), .3));
}

/* ── Sub-categories strip ────────────────────────────────────── */
.cat-hero__subcats {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    flex-wrap: wrap;
    margin-top: var(--sp-2);
}
.cat-hero__subcats-label {
    font-size: var(--fs-xs);
    color: rgba(255,255,255,.45);
    font-weight: var(--fw-medium, 500);
    white-space: nowrap;
}
.cat-hero__chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
}

/* ── Sub-category chips ──────────────────────────────────────── */
.cat-chip {
    display: inline-flex;
    align-items: center;
    padding: .3rem .9rem;
    border-radius: var(--r-full, 999px);
    border: 1.5px solid rgba(var(--color-primary-rgb), .32);
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium, 500);
    color: rgba(255,255,255,.72);
    text-decoration: none;
    background: rgba(255,255,255,.06);
    transition: border-color var(--t), color var(--t), background var(--t);
    cursor: pointer;
    min-height: 32px;
}
.cat-chip:hover,
.cat-chip:focus-visible {
    border-color: var(--color-primary);
    color: var(--color-primary-hover);
    background: rgba(var(--color-primary-rgb), .1);
    text-decoration: none;
    outline-offset: 3px;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 767.98px) {
    .cat-hero {
        padding: clamp(2rem, 7vw, 3rem) 0 clamp(1.8rem, 6vw, 2.5rem);
    }
    .cat-hero__title { font-size: clamp(1.7rem, 7vw, 2.3rem); }
    .cat-hero__title-line { width: 44px; }
    .cat-hero__icon       { width: 58px; height: 58px; }
    .cat-hero__icon--img img { width: 40px; height: 40px; }
}

@media (max-width: 575px) {
    .cat-hero__inner { gap: var(--sp-3); }
    .cat-hero__nav .breadcrumb { font-size: var(--fs-xs); }
    .cat-hero__body { gap: var(--sp-3); }
    .cat-hero__icon { width: 52px; height: 52px; }
    .cat-hero__icon--img img { width: 34px; height: 34px; }
}

/* ── Reduced motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .cat-hero__crumb-link,
    .cat-hero__icon,
    .cat-chip { transition: none; }
}

