/* =========================================================
   موقع ممثلية المرجعية الدينية العليا في الكوت
   CSS احترافي - لوحة أزرق فيروزيّ + نمط إسلامي كلاسيكي
   ========================================================= */

/* ===== المتغيرات (CSS Variables) ===== */
:root {
    /* الأزرق الفيروزي الرئيسي */
    --brand-primary: #3BA5C4;
    --brand-primary-dark: #2A7A94;
    --brand-primary-darker: #1F5A6D;
    --brand-primary-light: #5DBFDD;
    --brand-primary-lighter: #A5DDEC;
    --brand-primary-pale: #E8F6FA;

    /* ألوان مساعدة (اللون الذهبي كلمسات صغيرة فقط) */
    --brand-accent: #F5C842;
    --brand-accent-dark: #D9A800;

    /* درجات محايدة */
    --brand-dark: #16394A;
    --brand-darker: #0F2833;
    --brand-slate: #244B5C;
    --brand-cream: #F0F9FC;
    --brand-paper: #FFFFFF;
    --brand-text: #2D3E48;
    --brand-muted: #6B8290;
    --brand-border: rgba(59, 165, 196, .15);

    /* الخطوط */
    --font-title: 'Aref Ruqaa', 'Traditional Arabic', serif;
    --font-body: 'Cairo', 'Segoe UI', 'Tahoma', sans-serif;
    --font-quran: 'Aref Ruqaa', 'Traditional Arabic', serif;

    /* الظلال (بلمحة زرقاء) */
    --shadow-sm: 0 2px 4px rgba(31, 90, 109, .08);
    --shadow-md: 0 4px 14px rgba(31, 90, 109, .12);
    --shadow-lg: 0 10px 30px rgba(31, 90, 109, .18);
    --shadow-glow: 0 0 25px rgba(93, 191, 221, .35);

    --radius: 10px;
    --radius-lg: 16px;

    /* نمط إسلامي زخرفي (نجمة ثمانية عربية) */
    --islamic-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1' stroke-opacity='0.09'%3E%3Cpath d='M40 5 L50 30 L75 40 L50 50 L40 75 L30 50 L5 40 L30 30 Z'/%3E%3Cpath d='M40 5 L30 30 L5 40 L30 50 L40 75 L50 50 L75 40 L50 30 Z'/%3E%3Ccircle cx='40' cy='40' r='12'/%3E%3Ccircle cx='40' cy='40' r='4'/%3E%3C/g%3E%3C/svg%3E");
}

/* ===== إعدادات أساسية ===== */
* {
    box-sizing: border-box;
}

html {
    font-size: 15px;
    /* تمرير فوري — بدون scroll-behavior:smooth حتى يبقى التصفح سريعاً كالطلقة */
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    background: var(--brand-paper);
    color: var(--brand-text);
    line-height: 1.75;
    direction: rtl;
    text-align: right;
    min-height: 100vh;
    overflow-x: hidden;
    font-weight: 400;
}

/* ===== شريط علوي رقيق ===== */
.topbar {
    background: var(--brand-darker);
    color: #d5eaf1;
    font-size: 13px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(93, 191, 221, .1);
}

.topbar a {
    color: #d5eaf1;
    text-decoration: none;
    margin: 0 10px;
    transition: color .2s;
}

.topbar a:hover {
    color: var(--brand-primary-lighter);
}

.topbar .lang-switcher {
    display: inline-flex;
    gap: 12px;
    padding-inline-start: 18px;
    border-inline-start: 1px solid rgba(93, 191, 221, .18);
    align-items: center;
}

.topbar .lang-switcher a.active {
    color: var(--brand-primary-light);
    font-weight: 600;
}

/* ===== أيقونات السوشيال ميديا (شريط علوي) ===== */
.topbar .social-icons {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .1);
    color: #d5eaf1;
    text-decoration: none;
    transition: all .3s ease;
    position: relative;
    overflow: hidden;
}

.social-icon svg {
    display: block;
    transition: transform .3s ease;
}

.social-icon:hover {
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, .3);
}

.social-icon:hover svg {
    transform: scale(1.1);
}

/* ألوان كل منصّة عند الـ hover */
.social-icon.social-facebook:hover  { background: #1877F2; }
.social-icon.social-youtube:hover   { background: #FF0000; }
.social-icon.social-telegram:hover  { background: #229ED9; }
.social-icon.social-whatsapp:hover  { background: #25D366; }
.social-icon.social-instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

/* نسخة كبيرة للفوتر */
.social-icon.social-icon-lg {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .1);
}

.social-icon.social-icon-lg svg {
    width: 20px;
    height: 20px;
}

/* حاوية السوشيال في الفوتر */
.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

/* ===== الهيدر الرئيسي (اللوقو + التنقل) ===== */
.main-header {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
    color: #fff;
    padding: 36px 0 30px;
    position: relative;
    overflow: hidden;
    border-bottom: 4px solid var(--brand-primary-darker);
}

/* توهّج علوي وسفلي */
.main-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at top, rgba(255, 255, 255, .12), transparent 60%),
        radial-gradient(ellipse at bottom, rgba(15, 40, 51, .3), transparent 60%);
    pointer-events: none;
}

/* شريط فيروزي فاتح رفيع أعلى الهيدر */
.main-header::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--brand-primary-lighter) 30%,
        var(--brand-accent) 50%,
        var(--brand-primary-lighter) 70%,
        transparent 100%);
    opacity: .7;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    position: relative;
    z-index: 2;
    min-height: 140px;
}

/* ===== اللوقو - أبيض ناصع على الأزرق ===== */
.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 10px 60px;
    position: relative;
    transition: transform .4s ease;
}

.brand-logo:hover {
    transform: scale(1.03);
}

.brand-logo-img {
    max-width: 100%;
    height: auto;
    max-height: 130px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
    transition: transform .25s ease;
}

.brand-logo:hover .brand-logo-img {
    transform: scale(1.02);
}

/* زخرفة نجمة على جانبَي اللوقو */
.brand-logo::before,
.brand-logo::after {
    content: "❋";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, .55);
    font-size: 24px;
    text-shadow: 0 0 12px rgba(255, 255, 255, .3);
}

.brand-logo::before { right: 10px; }
.brand-logo::after { left: 10px; }

/* ===== قائمة التنقل الرئيسية ===== */
.main-nav {
    background: var(--brand-primary-darker);
    box-shadow: 0 2px 8px rgba(15, 40, 51, .15);
    position: relative;
}

.main-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
    padding: 0;
    gap: 0;
}

.main-nav li {
    position: relative;
}

.main-nav li a {
    display: block;
    color: #eaf6fa;
    text-decoration: none;
    padding: 16px 22px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: .3px;
    transition: all .3s ease;
    position: relative;
}

.main-nav li a::before {
    content: "";
    position: absolute;
    bottom: 0;
    right: 50%;
    width: 0;
    height: 3px;
    background: var(--brand-accent);
    transition: all .3s ease;
    transform: translateX(50%);
}

.main-nav li a:hover,
.main-nav li a.active {
    color: #fff;
    background: rgba(93, 191, 221, .12);
}

.main-nav li a:hover::before,
.main-nav li a.active::before {
    width: 70%;
}

.main-nav li + li::before {
    content: "";
    position: absolute;
    right: 0;
    top: 30%;
    height: 40%;
    width: 1px;
    background: rgba(255, 255, 255, .1);
}

/* ===== مانشيت أحدث النشاطات المتحرّك ===== */
.activity-ticker {
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, var(--brand-darker), var(--brand-dark) 55%, var(--brand-primary-darker));
    border-top: 1px solid var(--brand-accent);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    overflow: hidden;
    position: relative;
    min-height: 34px;
}

.ticker-label {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--brand-accent);
    color: var(--brand-darker);
    font-weight: 800;
    font-size: 11px;
    padding: 7px 14px;
    white-space: nowrap;
    flex-shrink: 0;
    z-index: 2;
    box-shadow: 4px 0 10px -4px rgba(0, 0, 0, .3);
}

.ticker-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #E63946;
    display: inline-block;
    animation: ticker-pulse 1.4s ease-in-out infinite;
}

@keyframes ticker-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .4; transform: scale(.7); }
}

.ticker-viewport {
    flex: 1;
    overflow: hidden;
    position: relative;
    min-width: 0;
    /* اتجاه ثابت للدوران حتى لا ينكسر على صفحات RTL */
    direction: ltr;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 28px, #000 calc(100% - 16px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 28px, #000 calc(100% - 16px), transparent 100%);
}

.ticker-track {
    display: flex;
    align-items: center;
    white-space: nowrap;
    width: max-content;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    animation: ticker-scroll 50s linear infinite;
}

.ticker-track.ticker-css-fallback {
    animation: ticker-scroll 50s linear infinite;
}

.activity-ticker.is-paused .ticker-track {
    animation-play-state: paused;
}

@keyframes ticker-scroll {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-33.333%, 0, 0); }
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    color: #d5eaf1;
    text-decoration: none;
    font-size: 12px;
    transition: color .2s;
    direction: rtl;
    flex-shrink: 0;
}

a.ticker-item:hover {
    color: #fff;
}

.ticker-item .app-icon { font-size: 13px; }

.ticker-item-title {
    font-weight: 600;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticker-item-type {
    background: rgba(255, 255, 255, .1);
    color: var(--brand-primary-lighter);
    font-size: 9px;
    padding: 1px 7px;
    border-radius: 999px;
    white-space: nowrap;
}

.ticker-item-breaking .ticker-item-title { color: #FFD86B; }

.ticker-breaking-badge {
    background: #E63946;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 999px;
    white-space: nowrap;
}

.ticker-separator {
    color: rgba(255, 255, 255, .2);
    font-size: 7px;
    margin-inline-end: 2px;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .activity-ticker { min-height: 32px; }
    .ticker-label { padding: 6px 10px; font-size: 10px; }
    .ticker-item { padding: 5px 10px; font-size: 11px; }
    .ticker-item-title { max-width: 140px; }
    .ticker-viewport {
        -webkit-mask-image: none;
        mask-image: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ticker-live-dot { animation: none; }
}

/* ===== قسم البطل (Hero) — ديوان بعمودين ===== */
/* BUILD_MARKER: ALL-NEW-hero-lang-speed-20260725 */
.hero-section {
    background: linear-gradient(135deg, var(--brand-primary-light) 0%, var(--brand-primary) 55%, var(--brand-primary-dark) 100%);
    color: #fff;
    padding: 52px 0 46px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* عرض كامل بلا حشوة — الأعمدة تلصق حرفياً بأطراف الهيرو */
.hero-section > .container-main {
    max-width: none;
    width: 100%;
    padding: 0;
    position: relative;
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at center, rgba(255, 255, 255, .12), transparent 62%);
    pointer-events: none;
}

.hero-section::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--brand-accent), transparent);
}

.hero-diwan {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
    align-items: stretch;
    position: relative;
    z-index: 1;
}

.hero-diwan-has-panels {
    display: block;
    position: relative;
    width: 100%;
    min-height: 340px;
    /* مساحة الوسط حتى لا يتداخل النص مع الأعمدة الطرفية */
    padding-inline: clamp(230px, 22vw, 290px);
    box-sizing: border-box;
}

.hero-core {
    text-align: center;
    padding: 28px 24px;
    max-width: 760px;
    width: 100%;
    margin-inline: auto;
    position: relative;
    z-index: 1;
}

/* أعمدة ملتصقة بأقصى اليمين / أقصى اليسار */
.hero-pillar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    width: clamp(210px, 20vw, 268px);
    padding: 12px 10px;
    background: rgba(8, 30, 42, .42);
    border: 1px solid rgba(255, 255, 255, .18);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .1),
        0 10px 28px rgba(8, 30, 42, .22);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

/* الطرف الأيمن تماماً */
.hero-pillar-right {
    right: 0;
    left: auto;
    border-radius: 16px 0 0 16px;
    border-right: none;
    padding-right: 12px;
}

/* الطرف الأيسر تماماً */
.hero-pillar-left {
    left: 0;
    right: auto;
    border-radius: 0 16px 16px 0;
    border-left: none;
    padding-left: 12px;
}

.hero-tile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    text-decoration: none;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 12px;
    background: rgba(255, 255, 255, .12);
    transition: transform .12s ease, background .12s ease, border-color .12s ease;
    min-height: 52px;
}

a.hero-tile:hover {
    transform: translateY(-2px);
    background: rgba(10, 36, 48, .34);
    border-color: rgba(245, 200, 66, .55);
    color: #fff;
    text-decoration: none;
}

.hero-tile-static {
    cursor: default;
}

.hero-tile-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(145deg, rgba(245, 200, 66, .95), rgba(245, 200, 66, .65));
    color: var(--brand-darker);
    font-size: 15px;
    box-shadow: 0 4px 10px rgba(15, 40, 51, .2);
}

.hero-tile-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    line-height: 1.35;
}

.hero-tile-copy strong {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-tile-copy small {
    font-size: 11px;
    color: rgba(255, 255, 255, .78);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-title {
    font-family: var(--font-title);
    font-size: 42px;
    font-weight: 700;
    margin: 0 0 14px;
    color: #fff;
    text-shadow: 0 2px 18px rgba(15, 40, 51, .35);
    line-height: 1.3;
}

.hero-subtitle {
    font-size: 17px;
    color: rgba(255, 255, 255, .95);
    margin: 0 auto 22px;
    max-width: 560px;
    line-height: 1.75;
    font-weight: 400;
}

.hero-cta {
    display: inline-block;
    background: #fff;
    color: var(--brand-primary-darker);
    padding: 12px 34px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .3px;
    box-shadow: 0 6px 20px rgba(15, 40, 51, .3);
    transition: all .3s ease;
}

.hero-cta:hover {
    background: var(--brand-accent);
    color: var(--brand-darker);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(15, 40, 51, .4);
}

@media (max-width: 1100px) {
    .hero-diwan-has-panels {
        padding-inline: clamp(200px, 24vw, 240px);
        min-height: 300px;
    }
    .hero-pillar {
        width: clamp(180px, 22vw, 220px);
    }
    .hero-title { font-size: 34px; }
    .hero-subtitle { font-size: 15px; }
}

@media (max-width: 860px) {
    /* تخفيف الرسم على الموبايل: blur والنمط المكرر يسبّبان تعليق التمرير */
    .hero-pillar,
    .hero-tile,
    .content-card .card-badge {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .brand-logo-img,
    .brand-logo:hover .brand-logo-img {
        filter: brightness(0) invert(1);
    }

    .hero-section {
        background-image: linear-gradient(135deg, var(--brand-primary-light) 0%, var(--brand-primary) 55%, var(--brand-primary-dark) 100%);
        background-size: cover;
    }

    .main-header {
        background-image: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
        background-size: cover;
    }

    .main-footer {
        background-image: linear-gradient(180deg, var(--brand-primary-dark), var(--brand-darker) 80%);
        background-size: cover;
    }

    .pattern-divider {
        display: none;
    }

    .hero-section > .container-main {
        padding-inline: 14px;
    }
    .hero-diwan-has-panels {
        display: grid;
        grid-template-columns: 1fr;
        text-align: center;
        gap: 16px;
        min-height: 0;
        padding-inline: 0;
    }
    .hero-pillar,
    .hero-pillar-right,
    .hero-pillar-left {
        position: static;
        transform: none;
        width: 100%;
        border-radius: 14px;
        border: 1px solid rgba(255, 255, 255, .18);
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 10px;
    }
    .hero-pillar:empty { display: none; }

    /*
     * إذا عدد الحقول فردي: الحقل الأخير يمتد على الصف كامل ويتوسّط.
     * إذا العدد زوجي: القاعدة لا تنطبق والشبكة تبقى منتظمة.
     */
    .hero-pillar > .hero-tile:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        width: min(72%, 260px);
        max-width: 260px;
        justify-self: center;
        margin-inline: auto;
        justify-content: center;
        text-align: center;
        padding-inline: 18px;
        background: rgba(255, 255, 255, .14);
        border-color: rgba(245, 200, 66, .35);
    }

    .hero-pillar > .hero-tile:last-child:nth-child(odd) .hero-tile-copy {
        align-items: center;
        text-align: center;
    }

    .hero-core {
        order: -1;
        max-width: none;
        padding: 8px 6px;
    }
}

/* ===== أقسام الموقع ===== */
.section {
    padding: 65px 0 45px;
    content-visibility: auto;
    contain-intrinsic-size: 1px 480px;
}

.section-alt {
    background: var(--brand-cream);
}

.section-title {
    text-align: center;
    font-family: var(--font-title);
    font-size: 36px;
    color: var(--brand-primary-dark);
    margin: 0 0 45px;
    position: relative;
    padding-bottom: 22px;
    font-weight: 700;
}

.section-title::after {
    content: "❋";
    display: block;
    color: var(--brand-primary);
    font-size: 20px;
    margin-top: 10px;
    letter-spacing: 32px;
    text-indent: 32px;
    opacity: .7;
}

/* تلميح التمرير الأفقي يظهر فقط على الموبايل */
.folio-hint { display: none; }

/* ===== البطاقات (Cards) ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

/* شبكة موحّدة: كل البطاقات بنفس الارتفاع والترتيب */
@media (min-width: 901px) {
    .content-folio {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
        align-items: stretch;
    }

    .cards-grid-3.content-folio {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        max-width: none;
    }
}

.cards-grid,
.content-folio {
    align-items: stretch;
}

/* شبكة 3 أعمدة (لمركز الزهراء - 3 أقسام) */
.cards-grid.cards-grid-3 {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1100px;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .cards-grid.cards-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* ===== حالة القسم الفارغ (Empty State) ===== */
.empty-section {
    text-align: center;
    padding: 60px 30px;
    background: #fff;
    border: 2px dashed var(--brand-primary-light);
    border-radius: var(--radius-lg);
    color: var(--brand-muted);
    max-width: 640px;
    margin: 0 auto;
}

.empty-section-icon {
    font-size: 56px;
    margin-bottom: 20px;
    filter: grayscale(.2);
}

.empty-section h3 {
    font-family: var(--font-title);
    color: var(--brand-primary-dark);
    font-size: 24px;
    margin: 0 0 12px;
    font-weight: 700;
}

.empty-section p {
    font-size: 15px;
    line-height: 1.8;
    margin: 0;
    color: var(--brand-muted);
}

.content-card {
    background: #fff;
    border: 1px solid rgba(22, 57, 74, .1);
    border-radius: 16px;
    overflow: hidden;
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 4px 14px rgba(22, 57, 74, .05);
    height: 100%;
}

.content-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(22, 57, 74, .1);
    border-color: rgba(59, 165, 196, .35);
}

.content-card .card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--brand-primary);
    color: #fff;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    z-index: 3;
    box-shadow: 0 3px 8px rgba(59, 165, 196, .28);
}

.content-card .card-image {
    height: 112px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, .55);
    font-size: 34px;
}

.content-card .card-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, .16) 0%, transparent 70%);
}

.content-card .card-image .app-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .22);
    font-size: 26px;
    position: relative;
    z-index: 1;
}

.content-card .card-body {
    padding: 14px 15px 13px;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.content-card .card-meta {
    font-size: 11px;
    color: var(--brand-muted);
    margin-bottom: 6px;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.content-card .card-meta .duration {
    background: var(--brand-primary-pale);
    padding: 2px 8px;
    border-radius: 999px;
    color: var(--brand-primary-dark);
    font-weight: 600;
    font-size: 10px;
}

.content-card .card-title {
    font-family: var(--font-title);
    font-size: 17px;
    color: var(--brand-dark);
    margin: 0 0 6px;
    line-height: 1.4;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.content-card .card-summary {
    color: var(--brand-muted);
    font-size: 12.5px;
    line-height: 1.65;
    margin-bottom: 10px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.content-card .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid rgba(22, 57, 74, .08);
    font-size: 12px;
    gap: 8px;
    margin-top: auto;
}

.content-card .card-footer > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 58%;
    color: var(--brand-muted);
}

.content-card .read-more {
    color: var(--brand-primary-dark);
    text-decoration: none;
    font-weight: 700;
    transition: color .2s;
    white-space: nowrap;
}

.content-card .read-more:hover {
    color: var(--brand-primary);
}

/* ===== قائمة الاستفتاءات ===== */
.fatwa-list {
    display: grid;
    gap: 18px;
}

.fatwa-item {
    background: #fff;
    padding: 24px 28px;
    border-right: 5px solid var(--brand-primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: all .3s ease;
}

.fatwa-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(-4px);
    border-right-color: var(--brand-accent);
}

.fatwa-question {
    font-family: var(--font-title);
    font-size: 20px;
    color: var(--brand-primary-dark);
    margin: 0 0 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.fatwa-question::before {
    content: "؟";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: var(--brand-primary);
    color: #fff;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 900;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(59, 165, 196, .35);
}

.fatwa-preview {
    color: var(--brand-muted);
    line-height: 1.9;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== قائمة الكتب ===== */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 26px;
}

.book-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all .3s;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--brand-border);
}

.book-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-primary-light);
}

.book-cover {
    height: 260px;
    background: linear-gradient(135deg, var(--brand-primary-dark), var(--brand-primary-darker));
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, .95);
    font-family: var(--font-title);
    font-size: 22px;
    text-align: center;
    padding: 22px;
    position: relative;
    line-height: 1.4;
}

.book-cover::before {
    content: "";
    position: absolute;
    inset: 14px;
    border: 2px solid rgba(255, 255, 255, .22);
    border-radius: 4px;
}

.book-info {
    padding: 18px;
    text-align: center;
}

.book-title {
    font-weight: 700;
    color: var(--brand-dark);
    margin: 0 0 6px;
    font-size: 15px;
}

.book-author {
    color: var(--brand-muted);
    font-size: 13px;
}

/* ===== قسم الأخبار ===== */
.news-list {
    display: grid;
    gap: 16px;
}

.news-item {
    display: flex;
    gap: 18px;
    background: #fff;
    padding: 18px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: all .3s;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--brand-border);
}

.news-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    color: inherit;
    border-color: var(--brand-primary-light);
}

.news-date-badge {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
    color: #fff;
    text-align: center;
    padding: 14px 16px;
    border-radius: var(--radius);
    min-width: 82px;
    font-family: var(--font-title);
    box-shadow: 0 4px 12px rgba(59, 165, 196, .25);
}

.news-date-badge .day {
    font-size: 28px;
    font-weight: 700;
    display: block;
    line-height: 1;
}

.news-date-badge .month {
    font-size: 13px;
    display: block;
    margin-top: 4px;
}

.news-content h4 {
    margin: 0 0 6px;
    font-family: var(--font-title);
    font-size: 18px;
    color: var(--brand-dark);
}

.news-content p {
    margin: 0;
    color: var(--brand-muted);
    font-size: 14px;
    line-height: 1.7;
}

/* ===== الفوتر ===== */
.main-footer {
    background: linear-gradient(180deg, var(--brand-primary-dark), var(--brand-darker) 80%);
    color: #cfe4ec;
    padding: 55px 0 20px;
    margin-top: 60px;
    border-top: 4px solid var(--brand-primary);
    position: relative;
}

.main-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: radial-gradient(ellipse at top, rgba(93, 191, 221, .1), transparent 60%);
    pointer-events: none;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.footer-col h5 {
    font-family: var(--font-title);
    color: #fff;
    font-size: 19px;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--brand-primary);
    font-weight: 700;
    display: inline-block;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    color: #cfe4ec;
    text-decoration: none;
    transition: all .2s;
    font-size: 14px;
    padding-right: 10px;
    position: relative;
}

.footer-col a::before {
    content: "◂";
    position: absolute;
    right: 0;
    color: var(--brand-primary-light);
    opacity: 0;
    transition: opacity .2s;
}

.footer-col a:hover {
    color: #fff;
    padding-right: 16px;
}

.footer-col a:hover::before {
    opacity: 1;
}

.footer-col p {
    line-height: 1.9;
    font-size: 14px;
    color: #b0cbd6;
}

/* لوقو الفوتر - أبيض ناصع */
.footer-logo {
    max-width: 100%;
    max-height: 80px;
    height: auto;
    display: block;
    margin: 0 auto 20px;
    transform: rotate(-1.2deg);
    transform-origin: center center;
    filter:
        brightness(0)
        invert(1)
        drop-shadow(0 2px 6px rgba(0, 0, 0, .25))
        drop-shadow(0 0 12px rgba(255, 255, 255, .15));
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    font-size: 13px;
    color: #a5c3d0;
    position: relative;
    z-index: 1;
}

/* ===== حاوية عامة ===== */
.container-main {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== زر عرض المزيد ===== */
.view-all-wrap {
    text-align: center;
    margin-top: 40px;
}

.btn-view-all {
    display: inline-block;
    padding: 13px 36px;
    background: transparent;
    color: var(--brand-primary-dark);
    border: 2px solid var(--brand-primary);
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    transition: all .3s;
    font-size: 14px;
}

.btn-view-all:hover {
    background: var(--brand-primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(59, 165, 196, .35);
}

/* ===== الاستجابة للأجهزة (Responsive) ===== */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .hero-title { font-size: 40px; }
}

@media (max-width: 768px) {
    .main-header { padding: 22px 0 20px; }
    .header-inner { flex-direction: column; gap: 15px; min-height: auto; }
    .brand-logo { padding: 6px 30px; }
    .brand-logo-img { max-height: 70px; }
    .brand-logo::before,
    .brand-logo::after { font-size: 16px; }
    .main-nav ul { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding: 0 10px; }
    .main-nav li a { padding: 12px 16px; font-size: 13px; white-space: nowrap; }
    .hero-section { padding: 36px 0 32px; }
    .hero-title { font-size: 26px; line-height: 1.4; margin-bottom: 12px; }
    .hero-subtitle { font-size: 14px; margin-bottom: 18px; line-height: 1.7; }
    .hero-cta { padding: 11px 26px; font-size: 13px; }
    .hero-pillar { grid-template-columns: 1fr 1fr; }
    .hero-tile { min-height: 48px; padding: 8px 9px; }
    .hero-tile-icon { width: 30px; height: 30px; font-size: 13px; }
    .hero-tile-copy strong { font-size: 12px; }
    .hero-tile-copy small { font-size: 10px; }

    /* تأكيد توسيط الحقل الفردي الأخير على شاشات الموبايل */
    .hero-pillar > .hero-tile:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        width: min(72%, 260px);
        max-width: 260px;
        justify-self: center;
        margin-inline: auto;
    }
    .section { padding: 34px 0 26px; }
    .section-title {
        font-size: 24px;
        text-align: start;
        margin: 0 0 18px;
        padding-bottom: 12px;
    }
    .section-title::after {
        content: "";
        width: 52px;
        height: 3px;
        margin: 10px 0 0;
        letter-spacing: 0;
        text-indent: 0;
        background: linear-gradient(90deg, var(--brand-primary), transparent);
        border-radius: 999px;
        opacity: 1;
    }
    .pattern-divider { height: 14px; opacity: .35; }
    .footer-grid { grid-template-columns: 1fr; }
    .topbar { font-size: 12px; }
    /* العنوان يُخفى فقط — مبدّل اللغات يظهر على الموبايل */
    .topbar .contact-info { display: none; }
    .topbar .lang-switcher {
        display: inline-flex;
        gap: 8px;
        padding-inline-start: 10px;
        border-inline-start: 1px solid rgba(93, 191, 221, .22);
        font-size: 12px;
        flex-shrink: 0;
    }
    .topbar .lang-switcher a {
        margin: 0;
        padding: 3px 6px;
        border-radius: 6px;
        white-space: nowrap;
    }
    .topbar .lang-switcher a.active {
        background: rgba(93, 191, 221, .18);
    }

    .folio-hint {
        display: block;
        margin: 0 0 10px;
        font-size: 12px;
        font-weight: 600;
        color: var(--brand-primary-dark);
        opacity: .75;
        letter-spacing: .02em;
    }

    /*
     * ديوان التمرير (Content Folio) — ترتيب موبايل خاص بالموقع:
     * بدل تكديس بطاقات طويلة، يصبح كل قسم «رفّ مخطوطات» يُمرَّر أفقياً
     * مع إظهار جزء من البطاقة التالية ليعرف الزائر أن هناك المزيد.
     */
    .content-folio {
        display: flex;
        grid-template-columns: none;
        gap: 12px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x proximity;
        scroll-padding-inline: 20px;
        padding: 2px 20px 20px;
        margin-inline: -20px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        overscroll-behavior-x: contain;
        touch-action: pan-x;
    }

    .content-folio::-webkit-scrollbar { display: none; }

    .content-folio::after {
        content: "";
        flex: 0 0 4px;
    }

    .content-folio .content-card {
        flex: 0 0 min(76vw, 290px);
        max-width: min(76vw, 290px);
        scroll-snap-align: start;
        scroll-snap-stop: normal;
        box-shadow: none;
        border: 1px solid rgba(22, 57, 74, .12);
        border-radius: 18px;
        transform: none;
        background:
            linear-gradient(180deg, #fff 0%, #f7fbfd 100%);
        position: relative;
    }

    .content-folio .content-card::before {
        content: "";
        position: absolute;
        inset-block: 10px;
        inset-inline-start: 0;
        width: 4px;
        border-radius: 0 4px 4px 0;
        background:
            repeating-linear-gradient(
                180deg,
                var(--brand-primary) 0 6px,
                transparent 6px 10px
            );
        opacity: .85;
        z-index: 2;
    }

    .content-folio .content-card:hover,
    .content-folio .content-card:active {
        transform: none;
        box-shadow: 0 10px 24px rgba(22, 57, 74, .12);
    }

    .content-folio .content-card .card-image {
        height: 108px;
        font-size: 38px;
        border-bottom: 1px solid rgba(255, 255, 255, .15);
    }

    .content-folio .content-card .card-badge {
        top: 10px;
        right: 10px;
        padding: 4px 10px;
        font-size: 10px;
    }

    .content-folio .content-card .card-body {
        padding: 14px 14px 12px 16px;
        gap: 0;
    }

    .content-folio .content-card .card-meta {
        font-size: 11px;
        margin-bottom: 6px;
        gap: 8px;
    }

    .content-folio .content-card .card-title {
        font-size: 17px;
        margin: 0 0 6px;
        line-height: 1.45;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .content-folio .content-card .card-summary {
        font-size: 12.5px;
        line-height: 1.65;
        margin-bottom: 10px;
        -webkit-line-clamp: 2;
    }

    .content-folio .content-card .card-footer {
        padding-top: 10px;
        font-size: 12px;
        gap: 8px;
    }

    .content-folio .content-card .card-footer > span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 55%;
    }

    .view-all-wrap { margin-top: 8px; }

    .news-list { gap: 10px; }
    .news-item {
        padding: 12px 12px;
        gap: 12px;
        border-radius: 14px;
    }
}

@media (max-width: 480px) {
    .brand-logo-img { max-height: 55px; }
    .brand-logo { padding: 4px 20px; }
    .brand-logo::before,
    .brand-logo::after { display: none; }
}

/* ===== فاصل زخرفي بنمط إسلامي ===== */
.pattern-divider {
    height: 10px;
    background: linear-gradient(90deg, transparent, var(--brand-primary-pale), transparent);
    opacity: .8;
    margin: 0;
}

/* ===== شريط التمرير المخصّص ===== */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--brand-primary-pale); }
::-webkit-scrollbar-thumb {
    background: var(--brand-primary);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover { background: var(--brand-primary-dark); }

/* ===== تحديد النص ===== */
::selection {
    background: var(--brand-primary);
    color: #fff;
}

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

/* ===== صفحات تفاصيل المحتوى (روابط دائمة قابلة للمشاركة) ===== */
.content-details-hero { padding: 60px 0 50px; text-align: center; }

.breadcrumb-back {
    display: inline-block;
    color: rgba(255, 255, 255, .8);
    text-decoration: none;
    font-size: 13px;
    margin-bottom: 16px;
    transition: color .2s;
}
.breadcrumb-back:hover { color: #fff; }

.content-details-title { font-size: 32px; }

.container-narrow { max-width: 820px; margin: 0 auto; }

.content-details-card {
    background: var(--brand-paper);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 34px 38px;
}

.content-details-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--brand-border);
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.btn-copy-link {
    background: var(--brand-primary-pale);
    color: var(--brand-primary-dark);
    border: 1px solid var(--brand-border);
    border-radius: 999px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
}
.btn-copy-link:hover { background: var(--brand-primary-lighter); }

.copy-link-feedback {
    font-size: 12px;
    color: var(--brand-muted);
    direction: ltr;
    word-break: break-all;
}

@media (max-width: 640px) {
    .content-details-card { padding: 24px 20px; }
    .content-details-title { font-size: 24px; }
}

/* ===== صفحة اتّصل بنا ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 30px;
    align-items: start;
}

.contact-form-card,
.contact-info-card {
    background: var(--brand-paper);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 30px;
}

.contact-info-card h3 {
    font-family: var(--font-title);
    color: var(--brand-primary-dark);
    margin: 0 0 18px;
    font-size: 20px;
}

.contact-info-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-info-list li,
.contact-info-list a {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--brand-text);
    text-decoration: none;
    line-height: 1.7;
    font-size: 14px;
}

.contact-info-list a:hover { color: var(--brand-primary-dark); }

.contact-info-icon {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--brand-primary-pale);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.contact-submit-btn {
    border: none;
    cursor: pointer;
    margin-top: 6px;
}

.alert-contact-success {
    background: #E8F8EF;
    color: #1E7E4E;
    border: 1px solid #B9E6CB;
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 20px;
    font-weight: 600;
}

.alert-contact-error {
    color: #A62E22;
    font-size: 13px;
}
.alert-contact-error:empty { display: none; }

/* حقل شرك مضادّ للسبام (Honeypot) - مخفيّ بصرياً عن المستخدم الحقيقي وقارئات الشاشة */
.honeypot-field {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    pointer-events: none;
}

/* ===== حقول النماذج على الموقع العامّ (اتّصل بنا وغيره) ===== */
.form-group {
    display: block;
    margin-bottom: 16px;
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--brand-primary-dark);
    font-size: 14px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 15px;
    color: var(--brand-text);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(59, 165, 196, .18);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.7;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.field-error {
    display: block;
    color: #A62E22;
    font-size: 12.5px;
    margin-top: 4px;
    min-height: 0;
}

/* منع تخطّي المحتوى عرض الشاشة (يُعالج مشكلة "التمرير أفقياً" على الموبايل) */
html, body { overflow-x: hidden; }
.contact-form-card, .contact-info-card { min-width: 0; }
.contact-form-card form { min-width: 0; }

@media (max-width: 560px) {
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .contact-form-card, .contact-info-card { padding: 20px 16px; }
    .form-input, .form-textarea, .form-select { font-size: 16px; } /* منع تكبير iOS التلقائي */
}

@media (max-width: 860px) {
    .contact-grid { grid-template-columns: 1fr; }
}

/* ===== صفحات الخطأ الودّية (404/403/...) ===== */
.status-code-section { text-align: center; padding: 90px 0; }
.status-code-icon { font-size: 64px; margin-bottom: 18px; opacity: .9; }
.status-code-trace {
    margin-top: 22px;
    font-size: 12px;
    color: rgba(255, 255, 255, .6);
}
.status-code-trace code { color: rgba(255, 255, 255, .85); }

/* ===== نظام الأيقونات التفاعلي (وسم <icon>) - مُبرمج بـ C# عبر IconTagHelper ===== */
.app-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: inherit;
    color: inherit;
    position: relative;
    z-index: 2;
}

.app-icon-sm { font-size: 14px; }
.app-icon-md { font-size: inherit; }
.app-icon-lg { font-size: inherit; }

.app-icon-clickable {
    cursor: pointer;
    transition: transform .2s ease, filter .2s ease;
}

.app-icon-clickable:hover,
.app-icon-clickable:focus-visible {
    transform: scale(1.15);
    filter: brightness(1.3);
}

.app-icon-clickable:focus-visible {
    outline: 2px solid rgba(255, 255, 255, .85);
    outline-offset: 4px;
    border-radius: 50%;
}

/* ===== شارات المرفقات (فيديو/صوت/مستند...) على البطاقات ===== */
.card-attachments-badges {
    font-size: 13px;
    letter-spacing: 1px;
    opacity: .85;
}

/* ===== نافذة تفاصيل المحتوى المنبثقة ===== */
#itemDetailsModal .modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

#itemDetailsModal .modal-header {
    border-bottom: none;
    padding: 14px 18px 0;
}

#itemDetailsModal .modal-body {
    padding: 10px 30px 34px;
}

.item-details-loading {
    text-align: center;
    color: var(--brand-muted);
    padding: 40px 0;
}

.item-details-title {
    font-family: var(--font-title);
    font-size: 24px;
    color: var(--brand-dark);
    margin-bottom: 6px;
}

.item-details-subtitle {
    color: var(--brand-muted);
    margin-bottom: 10px;
}

.item-details-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.item-details-meta span {
    background: var(--brand-primary-pale);
    color: var(--brand-primary-dark);
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 999px;
}

.item-details-body {
    line-height: 2;
    color: var(--brand-text);
}

.item-details-body img { max-width: 100%; border-radius: var(--radius); }

.dua-translation {
    color: var(--brand-muted);
    font-style: italic;
}

.item-details-attachments {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid var(--brand-border);
}

.item-details-attachments h4 {
    font-family: var(--font-title);
    color: var(--brand-primary-dark);
    margin-bottom: 14px;
}

.attachments-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.attachment-media-item {
    background: var(--brand-cream);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius);
    padding: 12px;
}

.attachment-media-title {
    font-weight: 700;
    color: var(--brand-dark);
    margin-bottom: 8px;
    font-size: 14px;
}

.video-embed-wrap {
    position: relative;
    padding-top: 56.25%;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
}

.video-embed-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.attachment-video-player,
.attachment-audio-player {
    width: 100%;
    border-radius: var(--radius);
}

.attachment-image {
    width: 100%;
    border-radius: var(--radius);
    object-fit: cover;
}

.attachment-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--brand-primary);
    color: #fff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    transition: background .2s;
}

.attachment-link-btn:hover {
    background: var(--brand-primary-dark);
    color: #fff;
}
