/* =========================================================
   القرار — Alkarar News
   Palette: oxblood brand + brass hairline + warm paper
   ========================================================= */
:root {
    --ink: #1a1413;
    --oxblood: #410000;
    --oxblood-2: #631414;
    --signal: #c8102e;
    --brass: #b08d57;
    --brass-soft: #d9c2a3;
    --paper: #fbfaf7;
    --surface: #ffffff;
    --muted: #8a7e7c;
    --line: #ebe4df;
    --shadow: 0 14px 34px -18px rgba(65, 0, 0, .35);
    --radius: 10px;
    --maxw: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: 'Cairo', system-ui, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- TOP HEADER ---------- */
.top-header {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 24px;
}
.brand-logo { height: 64px; width: auto; }
.ad-slot {
    flex: 1;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
}
.ad-slot--header { max-height: 96px; }
.ad-slot--header img { width: 100%; height: 96px; object-fit: cover; }

/* ---------- NAVBAR ---------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--oxblood);
    background-image: linear-gradient(180deg, #4d0606, var(--oxblood));
    border-bottom: 3px solid var(--brass);
}
.nav-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-mobile-logo { display: none; }
.nav-mobile-logo img { height: 38px; }
.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}
.nav-menu a {
    display: block;
    color: #f3e3e3;
    font-weight: 600;
    font-size: 15px;
    padding: 16px 16px;
    position: relative;
    transition: color .18s, background .18s;
}
.nav-menu a::after {
    content: "";
    position: absolute;
    inset-inline: 16px;
    bottom: 10px;
    height: 2px;
    background: var(--brass);
    transform: scaleX(0);
    transition: transform .22s ease;
}
.nav-menu a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.nav-menu a:hover::after,
.nav-menu a.active::after { transform: scaleX(1); }
.nav-menu a.active { color: #fff; }

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 10px 0;
}
.hamburger span {
    width: 26px; height: 2px;
    background: #fff;
    transition: transform .25s, opacity .25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

main { display: block; }

/* ---------- MANCHETTE ---------- */
.manchette {
    margin: 28px 0 24px;
    padding: 22px 26px;
    background: var(--surface);
    border-radius: var(--radius);
    border-inline-start: 5px solid var(--oxblood);
    box-shadow: var(--shadow);
}
.manchette-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--brass);
    margin-bottom: 6px;
}
.manchette-title {
    display: block;
    font-size: clamp(22px, 3.4vw, 34px);
    font-weight: 900;
    line-height: 1.35;
    color: var(--ink);
    transition: color .18s;
}
.manchette-title:hover { color: var(--oxblood); }

/* ---------- HERO GRID ---------- */
.hero-grid {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 22px;
    margin-bottom: 28px;
}

/* live feed */
.live {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    align-self: start;
}
.live-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: var(--oxblood);
    color: #fff;
}
.live-head h3 { margin: 0; font-size: 17px; font-weight: 700; }
.live-dot {
    width: 11px; height: 11px;
    border-radius: 50%;
    background: var(--signal);
    box-shadow: 0 0 0 0 rgba(200, 16, 46, .6);
    animation: pulse 1.8s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(200, 16, 46, .55); }
    70% { box-shadow: 0 0 0 9px rgba(200, 16, 46, 0); }
    100% { box-shadow: 0 0 0 0 rgba(200, 16, 46, 0); }
}
.live-list { list-style: none; margin: 0; padding: 6px 0; max-height: 430px; overflow-y: auto; }
.live-item {
    display: flex;
    gap: 12px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--line);
}
.live-item:last-child { border-bottom: 0; }
.live-item time {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--oxblood);
    background: #f6eded;
    border-radius: 6px;
    padding: 2px 8px;
    height: fit-content;
}
.live-item a { font-size: 15px; font-weight: 600; transition: color .15s; }
.live-item a:hover { color: var(--signal); }

/* feature */
.feature {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 440px;
    display: flex;
    box-shadow: var(--shadow);
    background: #2a0606;
}
.feature-img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}
.feature:hover .feature-img { transform: scale(1.04); }
.feature-body {
    position: relative;
    margin-top: auto;
    width: 100%;
    padding: 28px 26px 24px;
    background: linear-gradient(180deg, transparent, rgba(20, 0, 0, .88) 60%);
    color: #fff;
}
.feature-title {
    margin: 12px 0 0;
    font-size: clamp(20px, 2.6vw, 30px);
    font-weight: 900;
    line-height: 1.4;
}

/* chips */
.chip {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: var(--oxblood);
    padding: 4px 11px;
    border-radius: 100px;
}
.chip--ghost { background: #f6eded; color: var(--oxblood); }

/* ---------- RAIL GRID (slider + videos) ---------- */
.rail-grid {
    display: grid;
    grid-template-columns: 1fr 330px;
    gap: 22px;
    margin-bottom: 34px;
}
.slider {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #2a0606;
}
.slides { display: flex; transition: transform .55s cubic-bezier(.4, 0, .2, 1); }
.slide {
    position: relative;
    min-width: 100%;
    height: 420px;
}
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-caption {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    padding: 40px 28px 26px;
    background: linear-gradient(180deg, transparent, rgba(20, 0, 0, .85));
    color: #fff;
}
.slide-caption h2 { margin: 0; font-size: clamp(18px, 2.4vw, 26px); font-weight: 800; }
.dots {
    position: absolute;
    bottom: 16px;
    inset-inline-start: 24px;
    display: flex;
    gap: 8px;
}
.dots button {
    width: 9px; height: 9px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, .45);
    cursor: pointer;
    padding: 0;
    transition: background .2s, width .2s;
}
.dots button.active { background: var(--brass); width: 22px; border-radius: 100px; }

.videos {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
}
.rail-title {
    margin: 4px 4px 12px;
    font-size: 17px;
    font-weight: 800;
    color: var(--oxblood);
    border-inline-start: 3px solid var(--brass);
    padding-inline-start: 10px;
}
.video-list { display: flex; flex-direction: column; gap: 12px; }
.video-item { display: flex; gap: 12px; align-items: center; }
.video-thumb {
    position: relative;
    width: 108px; height: 70px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #ddd;
}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 30px; height: 30px;
    display: grid;
    place-items: center;
    background: rgba(65, 0, 0, .82);
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
}
.video-meta p { margin: 6px 0 0; font-size: 14px; font-weight: 600; line-height: 1.45; }

/* ---------- SECTION + CARDS ---------- */
.section { margin-bottom: 40px; }
.section-head {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
}
.section-head h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 900;
    color: var(--ink);
    padding-inline-start: 12px;
    border-inline-start: 5px solid var(--oxblood);
}
.section-head h2 a { color: inherit; transition: color .15s; }
.section-head h2 a:hover { color: var(--oxblood); }
.section-head::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
    margin-inline-start: 16px;
}
.section-more {
    order: 1;                 /* sits after the hairline rule */
    white-space: nowrap;
    margin-inline-start: 16px;
    font-size: 14px;
    font-weight: 700;
    color: var(--oxblood);
    transition: color .15s;
}
.section-more:hover { color: var(--signal); }

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}
.cards--3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-media { position: relative; aspect-ratio: 16 / 10; background: #eee; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-chip { position: absolute; inset-block-start: 10px; inset-inline-start: 10px; }
.card-title {
    margin: 0;
    padding: 14px 16px 16px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
}
.card-date { display: block; padding: 0 16px 14px; font-size: 12px; color: var(--muted); }

.empty { color: var(--muted); padding: 20px 0; }

/* ---------- PAGINATION ---------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
}
.page-btn {
    padding: 9px 20px;
    background: var(--oxblood);
    color: #fff;
    border-radius: 100px;
    font-weight: 700;
    font-size: 14px;
    transition: background .2s;
}
.page-btn:hover { background: var(--oxblood-2); }
.page-info { font-weight: 700; color: var(--muted); }

/* ---------- ARTICLE ---------- */
.article {
    max-width: 820px;
    margin: 30px auto 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 34px clamp(20px, 4vw, 48px);
}
.article-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
}
.article-title {
    margin: 0 0 16px;
    font-size: clamp(24px, 3.6vw, 36px);
    font-weight: 900;
    line-height: 1.45;
}
.article-lead {
    font-size: 18px;
    font-weight: 600;
    color: #4a3f3d;
    padding-inline-start: 14px;
    border-inline-start: 3px solid var(--brass);
    margin-bottom: 8px;
}
.article-hero { margin: 22px 0; }
.article-hero img { width: 100%; border-radius: var(--radius); }
.article-body { font-size: 17px; line-height: 1.95; color: #2a2120; }
.article-body p { margin: 0 0 18px; }
.article-body img { border-radius: 8px; margin: 14px 0; }
.article-body a { color: var(--oxblood); font-weight: 700; text-decoration: underline; }

.article-video {
    position: relative;
    aspect-ratio: 16 / 9;
    margin: 22px 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
}
.article-video iframe,
.article-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin: 22px 0;
}
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }

.docs { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.doc {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f6eded;
    border-radius: 8px;
    color: var(--oxblood);
    font-weight: 700;
    font-size: 14px;
}

.article-foot {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    align-items: center;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}
.tags { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; margin-top: 4px; }
.tag { font-size: 13px; color: var(--oxblood); background: #f6eded; padding: 3px 10px; border-radius: 100px; }

/* ---------- CONTACT ---------- */
.contact-lead { color: var(--muted); margin-bottom: 22px; }
.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.contact-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-weight: 700;
}
.contact-card i { color: var(--oxblood); font-size: 20px; }

/* ---------- FOOTER ---------- */
.footer {
    margin-top: 50px;
    background: var(--oxblood);
    background-image: linear-gradient(180deg, #4d0606, #340000);
    color: #f1dddd;
}
.footer-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 42px 20px 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
}
.footer-brand { max-width: 320px; }
.footer-brand img { height: 56px; margin-bottom: 14px; filter: brightness(0) invert(1); }
.footer-tag { color: #d8b9b9; font-size: 14px; line-height: 1.7; }
.socials { display: flex; gap: 10px; margin-top: 14px; }
.socials a {
    width: 38px; height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 50%;
    color: #fff;
    transition: background .2s, border-color .2s;
}
.socials a:hover { background: var(--brass); border-color: var(--brass); }
.footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 36px;
    align-content: start;
}
.footer-links a { color: #e8c9c9; font-weight: 600; font-size: 15px; transition: color .15s; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding: 16px 20px;
    max-width: var(--maxw);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
    font-size: 13px;
    color: #cfa9a9;
}
.footer-bottom a { color: var(--brass-soft); font-weight: 700; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    .feature { min-height: 320px; }
    .rail-grid { grid-template-columns: 1fr; }
    .slide { height: 320px; }

    .top-header { flex-direction: column; gap: 12px; }
    .ad-slot--header { width: 100%; }

    .nav-inner { flex-wrap: wrap; }
    .nav-mobile-logo { display: block; }
    .hamburger { display: flex; }
    .nav-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s ease;
    }
    .nav-menu.open { max-height: 560px; }
    .nav-menu li { width: 100%; }
    .nav-menu a { padding: 14px 6px; border-top: 1px solid rgba(255, 255, 255, .08); }
    .nav-menu a::after { display: none; }
}

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