* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    max-width: 100%;
}

:root {
    --primary-cyan: #4FD1FF;
    --primary-purple: #A855F7;
    --primary-blue: #3B82F6;
    --bg-color: #F8F9FC;
    --text-dark: #111;
    --text-muted: #666;
    --white: #fff;
    --shadow-light: rgba(0, 0, 0, 0.05);
    --shadow-medium: rgba(0, 0, 0, 0.1);
    --shadow-heavy: rgba(79, 209, 255, 0.2);
}

a { text-decoration: none; }

body {
    margin: 0;
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    overflow-x: hidden;
    direction: rtl;
}

/* ===== HEADER ===== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 75px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px var(--shadow-light);
    z-index: 2000;
}

.logo img { height: 35px; }

.menu-btn {
    position: absolute;
    right: 25px;
    font-size: 26px;
    background: none;
    border: none;
    color: var(--primary-cyan);
    cursor: pointer;
    transition: 0.3s;
}
.menu-btn:hover { color: var(--primary-purple); }

/* ===== SIDEBAR ===== */
.overlay {
    position: fixed;
    top: 75px;
    left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
    z-index: 9000;
}
.overlay.active { opacity: 1; visibility: visible; }

.art-sidebar {
    position: fixed;
    top: 75px;
    right: 0;
    width: 380px;
    height: calc(100vh - 75px);
    background: transparent;
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(.77,0,.18,1);
    z-index: 9001;
}
.art-sidebar.active { transform: translateX(0); }

.close-btn {
    position: absolute;
    top: 40%;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: #eeeeee;
    font-size: 20px;
    cursor: pointer;
    transition: 0.3s;
}
.close-btn:hover { background: #ddd; }

.menu-item {
    position: absolute;
    background: white;
    padding: 8px 18px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    border-radius: 4px;
    box-shadow: 0 5px 15px var(--shadow-light);
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.4s ease;
    white-space: nowrap;
}
.menu-item:hover { transform: scale(1.05) !important; }

.art-sidebar.active .menu-item { opacity: 1; transform: translateX(0); }
.art-sidebar.active .item1 { transition-delay: 0.1s; }
.art-sidebar.active .item2 { transition-delay: 0.2s; }
.art-sidebar.active .item3 { transition-delay: 0.3s; }
.art-sidebar.active .item4 { transition-delay: 0.4s; }
.art-sidebar.active .item5 { transition-delay: 0.5s; }

.item1 { top: 8%;  right: 60px; }
.item2 { top: 22%; right: 150px; }
.item3 { top: 40%; right: 210px; }
.item4 { top: 58%; right: 150px; }
.item5 { top: 75%; right: 60px; }

/* ===== BOTTOM TABS ===== */
.content-tabs {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 -4px 24px rgba(0,0,0,0.08), 0 -1px 0 rgba(79,209,255,0.12);
    position: fixed;
    bottom: 0;
    left: 0; right: 0;
    height: 70px;
    z-index: 9999;
    border-top: 1px solid rgba(79,209,255,0.1);
}

.tabs-container {
    max-width: 100%;
    height: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none;
}
.tabs-container::-webkit-scrollbar { display: none; }

.tab-btn {
    flex: 1;
    height: 100%;
    min-width: auto;
    max-width: 120px;
    padding: 10px 8px;
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    position: relative;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: var(--text-muted);
    transform-origin: center bottom;
}

.tab-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-cyan), var(--primary-purple));
    border-radius: 0 0 3px 3px;
    transform: scaleX(0);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tab-btn.active::after { transform: scaleX(1); }

/* عند الـ initial load — بدون animation */
.tab-btn.no-transition::after,
.tab-btn.no-transition { transition: none !important; }

/* التاب النشط — نفس style الـ ::after بس على الأيقونة والنص */
.tab-btn.active {
    color: var(--primary-cyan);
    transform: none;
    max-width: 120px;
}

.tab-icon {
    width: 22px;
    height: 22px;
    transition: all 0.35s ease;
}

.tab-btn:not(.active) .tab-icon {
    width: 22px;
    height: 22px;
    opacity: 0.5;
}

.tab-btn.active .tab-icon {
    width: 22px;
    height: 22px;
    /* نفس الـ gradient colors بتاعت الـ ::after على الأيقونة */
    filter: drop-shadow(0 0 4px rgba(79,209,255,0.6));
    stroke: url(#tab-gradient) var(--primary-cyan);
}

.tab-btn span {
    font-size: 0.68rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.35s ease;
}

.tab-btn:not(.active) span {
    font-size: 0.68rem;
    opacity: 0.5;
    font-weight: 400;
}

.tab-btn.active span {
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary-cyan), var(--primary-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* زرار الرئيسي في المنتصف — نفس الباقي */
.tab-btn-center {
    max-width: 120px;
    flex: 1.2;
}

.tab-btn-center .tab-icon {
    width: 22px;
    height: 22px;
}

.tab-btn-center.active {
    transform: none;
}

/* ===== PAGE WRAPPER ===== */
.publisher-page {
    padding-top: 75px;
    padding-bottom: 80px;
    min-height: 100vh;
}

/* ===== PUBLISHER HERO ===== */
.publisher-hero {
    padding: 60px 10px 40px;
    background: linear-gradient(135deg, #f0f9ff 0%, #faf5ff 100%);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.publisher-hero::before {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(79, 209, 255, 0.1) 0%, transparent 70%);
    animation: float 8s ease-in-out infinite;
}

.publisher-hero::after {
    content: '';
    position: absolute;
    bottom: -30%; left: -10%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.1) 0%, transparent 70%);
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(5deg); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Publisher Logo */
.publisher-logo-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 30px;
}

/* الدائرة الخارجية الدوارة — تشتغل على أي خلفية */
.rotating-border {
    position: absolute;
    top: -6px; left: -6px; right: -6px; bottom: -6px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--primary-cyan), var(--primary-purple), var(--primary-blue), transparent 60%, var(--primary-cyan));
    animation: rotate 3s linear infinite;
    z-index: 0;
    /* mask يخلي الـ border يظهر فقط في الحواف */
    -webkit-mask:
        radial-gradient(farthest-side, transparent calc(100% - 6px), #fff calc(100% - 5px));
    mask:
        radial-gradient(farthest-side, transparent calc(100% - 6px), #fff calc(100% - 5px));
}

/* مش محتاجين الـ ::after بعد كده */
.rotating-border::after { display: none; }

/* دوائر الـ glow خلف الصورة */
.rotating-glow {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 240px; height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79,209,255,0.18) 0%, rgba(168,85,247,0.12) 50%, transparent 70%);
    animation: pulseGlow 3s ease-in-out infinite;
    pointer-events: none;
}

.rotating-glow-2 {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 280px; height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, transparent 40%, rgba(79,209,255,0.07) 60%, transparent 75%);
    animation: pulseGlow 3s ease-in-out infinite reverse;
    pointer-events: none;
}

@keyframes pulseGlow {
    0%, 100% { transform: translate(-50%,-50%) scale(1); opacity: 0.7; }
    50%       { transform: translate(-50%,-50%) scale(1.1); opacity: 1; }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.publisher-logo-img {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 188px;
    height: 188px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--white);
    box-shadow: 0 10px 40px var(--shadow-heavy);
    z-index: 1;
}

.publisher-logo-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.publisher-name {
    font-family: 'Amiri', serif;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease-out;
}

.publisher-slogan {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.6;
    animation: fadeInUp 0.9s ease-out;
}

/* ===== PUBLISHER STATS GRID ===== */
.publisher-stats-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 28px;
    animation: fadeInUp 1s ease-out;
    width: 100%;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 15px 19px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px var(--shadow-light);
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    min-height: 0;
    flex: 1 1 120px;
    max-width: 200px;
}

/* الخط الملون على الحواف */
.stat-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-purple), var(--primary-blue));
    z-index: -1;
    opacity: 0.2;
    transition: opacity 0.25s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow-heavy);
}

.stat-card:hover::before {
    opacity: 0.6;
}

/* Live cards */
.stat-card-live::before {
    opacity: 0.2;
}

.stat-num {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    line-height: 1.15;
}

.stat-lbl {
    font-size: 13px;
    color: #555;
    font-weight: 500;
    margin-top: 6px;
    line-height: 1.4;
    white-space: nowrap;
}

/* ===== TAB CONTENT ===== */
.tab-content {
    display: none;
    animation: fadeInUp 0.4s ease-out;
}
.tab-content.active { display: block; }

/* ===== SECTION HEADER ===== */
.section-header {
    text-align: center;
    padding: 28px 10px 14px;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    width: 100%;
}

.section-title {
    font-family: 'Amiri', serif;
    font-size: 1.7rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    word-break: break-word;
    overflow-wrap: break-word;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===== FILTER TABS ===== */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 0 10px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.filter-btn {
    padding: 8px 20px;
    border: 2px solid rgba(79, 209, 255, 0.3);
    background: white;
    color: var(--text-muted);
    border-radius: 25px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-purple));
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 209, 255, 0.3);
}

/* ===== LOADING STATE ===== */
.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(79, 209, 255, 0.2);
    border-top-color: var(--primary-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    display: block;
    opacity: 0.3;
}

/* ===== MODAL ===== */
.modal-overlay-bg {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay-bg.active {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: white;
    border-radius: 20px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-box.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    background: #f0f0f0;
    cursor: pointer;
    font-size: 16px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-close-btn:hover { background: #ddd; }

/* ===== DARK MODE ===== */
body.dark-mode {
    --bg-color: #0f172a;
    --text-dark: #f1f5f9;
    --text-muted: #94a3b8;
    --white: #1e293b;
    --shadow-light: rgba(0, 0, 0, 0.3);
    --shadow-medium: rgba(0, 0, 0, 0.4);
}

body.dark-mode .main-header,
body.dark-mode .content-tabs {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(255,255,255,0.05);
}

body.dark-mode .publisher-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1a0a2e 100%);
}

body.dark-mode .stat-item,
body.dark-mode .stat-card,
body.dark-mode .menu-item,
body.dark-mode .filter-btn,
body.dark-mode .modal-box {
    background: #1e293b;
    color: var(--text-dark);
}

body.dark-mode .close-btn { background: #2d3748; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .publisher-name { font-size: 2.2rem; }
    .publisher-logo-wrapper { width: 150px; height: 150px; }

    .publisher-stats-grid { gap: 10px; }
    .stat-card { padding: 16px 16px; min-width: 86px; }
    .stat-num { font-size: 26px; }
    .stat-lbl { font-size: 13px; }
    .art-sidebar { width: 100%; }
}

@media (max-width: 480px) {
    .publisher-name { font-size: 1.8rem; }
    .tab-btn span { font-size: 0.65rem; }
    .section-title { font-size: 1.6rem; }
    .publisher-stats-grid { gap: 8px; }
    .stat-card { padding: 14px 12px; min-width: 78px; min-height: 78px; }
    .stat-num { font-size: 22px; }
    .stat-lbl { font-size: 12px; }
}

/* ===== MOVED FROM HTML ===== */

    /* ===== ANNOUNCEMENTS ===== */
    .announcements-grid {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 10px 40px;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .announcement-card {
        background: white;
        border-radius: 18px;
        padding: 25px;
        box-shadow: 0 5px 20px var(--shadow-light);
        border: 1px solid rgba(79, 209, 255, 0.1);
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }

    .announcement-card::before {
        content: '';
        position: absolute;
        top: 0; right: 0;
        width: 4px; height: 100%;
        background: linear-gradient(180deg, var(--primary-cyan), var(--primary-purple));
        border-radius: 0 18px 18px 0;
    }

    .announcement-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 35px var(--shadow-heavy);
        border-color: rgba(79, 209, 255, 0.3);
    }

    /* ROW 1 — أيقونة + badge يمين / مشاركة شمال */
    .ann-top-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 12px;
    }

    .ann-top-right {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .ann-icon {
        flex-shrink: 0;
        width: 42px; height: 42px;
        background: linear-gradient(135deg, #f0f9ff, #faf5ff);
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(79, 209, 255, 0.2);
    }

    .ann-icon svg { width: 20px; height: 20px; stroke: var(--primary-cyan); fill: none; }

    .ann-badge {
        display: inline-block;
        padding: 3px 12px;
        border-radius: 20px;
        font-size: 0.75rem;
        font-weight: 700;
    }

    .badge-cyan   { background: linear-gradient(135deg,#4FD1FF,#3B82F6); color:#fff; }
    .badge-purple { background: linear-gradient(135deg,#A855F7,#7C3AED); color:#fff; }
    .badge-blue   { background: linear-gradient(135deg,#3B82F6,#4FD1FF); color:#fff; }
    .badge-green  { background: linear-gradient(135deg,#10B981,#059669); color:#fff; }
    .badge-gold   { background: linear-gradient(135deg,#F59E0B,#D97706); color:#fff; }

    .ann-title {
        font-family: 'Cairo', sans-serif;
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--text-dark);
        margin: 0 0 14px 0;
        line-height: 1.4;
        text-align: right;
    }

    .ann-content {
        color: var(--text-muted);
        font-family: 'Tajawal', sans-serif;
        font-size: 0.93rem;
        line-height: 1.8;
        white-space: pre-line;
        margin-bottom: 8px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        transition: none;
    }

    .ann-content.expanded {
        display: block;
        -webkit-line-clamp: unset;
        overflow: visible;
    }


    /* زر اقرأ المزيد تحت النص مباشرة */
    .read-more-btn {
        display: block;
        margin-bottom: 12px;
    }

    .ann-footer {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    .ann-date {
        font-size: 0.78rem;
        color: var(--text-muted);
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .ann-date svg { width:13px; height:13px; stroke:var(--text-muted); fill:none; }

    .ann-deadline {
        font-size: 0.78rem;
        color: #ef4444;
        font-weight: 600;
        background: #fef2f2;
        padding: 4px 12px;
        border-radius: 20px;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .ann-deadline svg { width:12px; height:12px; stroke:#ef4444; fill:none; }

    .read-more-btn {
        background: none;
        border: none;
        color: var(--primary-cyan);
        font-family: 'Cairo', sans-serif;
        font-size: 0.83rem;
        font-weight: 600;
        cursor: pointer;
        padding: 0;
        transition: 0.2s;
        text-align: right;
    }
    .read-more-btn:hover { color: var(--primary-purple); }

    /* ===== HOME TAB ===== */
    .home-publisher-name {
        text-align: center;
        padding: 30px 20px 15px;
        max-width: 680px;
        margin: 0 auto;
    }

    .home-publisher-name h2 {
        font-family: 'Amiri', serif;
        font-size: 1.9rem;
        font-weight: 700;
        background: linear-gradient(135deg, var(--primary-cyan), var(--primary-purple));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin-bottom: 5px;
    }

    .home-publisher-name p {
        font-size: 0.9rem;
        color: var(--text-muted);
    }

    .home-sections-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
        max-width: 680px;
        margin: 0 auto;
        padding: 0 10px 28px;
    }

    .home-section-card {
        background: white;
        border-radius: 18px;
        padding: 22px 16px;
        text-align: center;
        box-shadow: 0 5px 20px var(--shadow-light);
        border: 2px solid transparent;
        cursor: pointer;
        transition: all 0.3s ease;
        text-decoration: none;
        color: var(--text-dark);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .home-section-card:hover {
        border-color: var(--primary-cyan);
        transform: translateY(-5px);
        box-shadow: 0 12px 35px var(--shadow-heavy);
    }

    .home-section-icon {
        width: 56px; height: 56px;
        border-radius: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .home-section-icon svg { width: 26px; height: 26px; fill: none; }

    .icon-cyan   { background: linear-gradient(135deg,#e0f7ff,#f0f9ff); }
    .icon-cyan   svg { stroke: #4FD1FF; }
    .icon-purple { background: linear-gradient(135deg,#f5f0ff,#faf5ff); }
    .icon-purple svg { stroke: #A855F7; }
    .icon-blue   { background: linear-gradient(135deg,#eff6ff,#f0f9ff); }
    .icon-blue   svg { stroke: #3B82F6; }
    .icon-green  { background: linear-gradient(135deg,#f0fdf4,#ecfdf5); }
    .icon-green  svg { stroke: #10B981; }

    .home-section-name  { font-weight:700; font-size:0.95rem; }
    .home-section-count { font-size:0.77rem; color:var(--text-muted); }

    /* Books preview */
    .books-preview-section {
        max-width: 1200px;
        margin: 0 auto;
        padding: 24px 10px 28px;
    }

    .preview-section-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 20px;
        padding-bottom: 14px;
        border-bottom: 2px solid rgba(79,209,255,0.15);
    }

    .preview-section-title {
        font-family: 'Amiri', serif;
        font-size: 1.7rem;
        font-weight: 700;
        color: var(--text-dark);
        display: flex;
        align-items: center;
        gap: 9px;
        margin: 0;
        padding: 0;
        border: none;
    }

    .preview-section-title svg { width:22px; height:22px; stroke:var(--primary-cyan); fill:none; flex-shrink:0; }

    .preview-section-title span {
        background: linear-gradient(135deg, var(--primary-cyan), var(--primary-purple));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .see-more-btn {
        display: flex;
        align-items: center;
        gap: 5px;
        padding: 7px 15px;
        background: transparent;
        border: 1.5px solid rgba(79,209,255,0.3);
        border-radius: 25px;
        color: var(--primary-cyan);
        font-family: 'Cairo', sans-serif;
        font-size: 0.78rem;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
        white-space: nowrap;
        flex-shrink: 0;
        text-decoration: none;
    }

    .see-more-btn svg {
        width: 14px; height: 14px;
        stroke: var(--primary-cyan); fill: none;
        transition: transform 0.25s ease;
    }

    .see-more-btn:hover {
        background: linear-gradient(135deg, var(--primary-cyan), var(--primary-purple));
        border-color: transparent;
        color: white;
        transform: translateX(-3px) scale(1.04);
        box-shadow: 0 4px 16px rgba(79,209,255,0.3);
    }

    .see-more-btn:hover svg { stroke: white; transform: translateX(-3px); }

    body.dark-mode .see-more-btn { border-color: rgba(79,209,255,0.25); }


    /* ===== SLIDER NAV ===== */
    .slider-wrapper { display: flex; flex-direction: column; gap: 14px; }

    .slider-nav {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
    }

    .slider-arrow {
        width: 36px; height: 36px;
        border-radius: 50%;
        border: 1.5px solid rgba(79,209,255,0.3);
        background: linear-gradient(135deg, rgba(79,209,255,0.06), rgba(168,85,247,0.06));
        display: flex; align-items: center; justify-content: center;
        cursor: pointer;
        transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
        flex-shrink: 0;
    }
    .slider-arrow svg { width:16px; height:16px; stroke:var(--primary-cyan); transition: transform 0.2s ease; }
    .slider-arrow:hover {
        background: linear-gradient(135deg, var(--primary-cyan), var(--primary-purple));
        border-color: transparent;
        transform: scale(1.12);
        box-shadow: 0 4px 14px rgba(79,209,255,0.3);
    }
    .slider-arrow:hover svg { stroke: white; }
    .slider-arrow:active { transform: scale(0.95); }

    .slider-counter {
        font-family: 'Cairo', sans-serif;
        font-size: 0.82rem;
        font-weight: 700;
        padding: 4px 14px;
        border-radius: 20px;
        background: linear-gradient(135deg, rgba(79,209,255,0.08), rgba(168,85,247,0.08));
        border: 1.5px solid rgba(79,209,255,0.2);
        color: var(--primary-cyan);
        min-width: 54px;
        text-align: center;
        letter-spacing: 0.05em;
    }

    body.dark-mode .slider-arrow { border-color: rgba(79,209,255,0.2); background: rgba(79,209,255,0.04); }
    body.dark-mode .slider-counter { border-color: rgba(79,209,255,0.2); background: rgba(79,209,255,0.05); }

    /* ===== REVIEWS ===== */
    .reviews-scroll-row {
        display: flex; gap: 14px;
        overflow-x: auto; padding-bottom: 8px;
        scrollbar-width: thin;
        scrollbar-color: rgba(79,209,255,0.3) transparent;
    }
    .reviews-scroll-row::-webkit-scrollbar { height: 4px; }
    .reviews-scroll-row::-webkit-scrollbar-thumb { background: rgba(79,209,255,0.4); border-radius: 10px; }

    .review-card {
        flex-shrink: 0; width: 270px;
        background: white; border-radius: 20px;
        padding: 20px; display: flex; flex-direction: column; gap: 12px;
        border: 1.5px solid rgba(79,209,255,0.12);
        box-shadow: 0 4px 18px var(--shadow-light);
        position: relative; overflow: hidden;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    .review-card::before {
        content: '"'; position: absolute;
        top: -10px; left: 14px;
        font-size: 7rem; font-family: 'Amiri', serif;
        color: rgba(79,209,255,0.07); line-height: 1; pointer-events: none;
    }
    .review-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 16px 36px var(--shadow-heavy);
        border-color: rgba(79,209,255,0.28);
    }
    /* ===== STARS — shared ===== */
    .pub-star {
        font-size: 1.2rem;
        line-height: 1;
        display: inline-block;
        animation: pubStarShine 3s ease-in-out infinite;
    }
    .pub-star--on  { color: #f59e0b; }
    .pub-star--off { color: #e2c97e; opacity: 0.45; }

    @keyframes pubStarShine {
        0%,70%,100% { filter: brightness(1);   transform: scale(1);   }
        80%         { filter: brightness(1.9) drop-shadow(0 0 4px #f59e0b); transform: scale(1.2); }
    }

    .review-stars { display: flex; gap: 3px; flex-direction: row; margin-bottom: 10px; }
    .review-comment {
        font-family: 'Amiri', serif; font-size: 0.97rem; line-height: 1.75;
        color: var(--text-dark); margin: 0; flex: 1;
        display: -webkit-box; -webkit-line-clamp: 4;
        -webkit-box-orient: vertical; overflow: hidden;
    }
    .review-footer {
        display: flex; align-items: center; gap: 10px;
        padding-top: 10px; border-top: 1px solid rgba(79,209,255,0.1);
    }
    .review-avatar {
        width: 36px; height: 36px; border-radius: 50%;
        background: linear-gradient(135deg, var(--primary-cyan), var(--primary-purple));
        display: flex; align-items: center; justify-content: center;
        font-family: 'Cairo', sans-serif; font-size: 0.9rem; font-weight: 700;
        color: white; flex-shrink: 0;
    }
    .review-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
    .review-name {
        font-family: 'Cairo', sans-serif; font-size: 0.82rem; font-weight: 700;
        color: var(--text-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .review-book {
        display: flex; align-items: center; gap: 4px;
        font-family: 'Cairo', sans-serif; font-size: 0.72rem;
        color: var(--primary-cyan); font-weight: 600;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .review-book svg { stroke: var(--primary-cyan); flex-shrink: 0; }

    body.dark-mode .review-card  { background: #1e293b; border-color: rgba(79,209,255,0.08); }

    /* ===== QUOTES — CHAT BUBBLES ===== */
    .quotes-chat-container {
        display: flex;
        flex-direction: column;
        gap: 14px;
        padding: 4px 6px 16px;
    }

    .quote-bubble-row {
        display: flex;
        width: 100%;
    }

    /* رسالة يمين — gradient سيان/بنفسجي */
    .quote-bubble--right {
        justify-content: flex-end;
    }
    .quote-bubble--right .quote-bubble {
        background: linear-gradient(135deg, rgba(79,209,255,0.13), rgba(168,85,247,0.13));
        border: 1.5px solid rgba(79,209,255,0.28);
        border-bottom-right-radius: 6px;
    }

    /* رسالة شمال — أبيض عادي */
    .quote-bubble--left {
        justify-content: flex-start;
    }
    .quote-bubble--left .quote-bubble {
        background: #f8fafc;
        border: 1.5px solid rgba(168,85,247,0.2);
        border-bottom-left-radius: 6px;
    }

    .quote-bubble {
        max-width: 82%;
        border-radius: 18px;
        padding: 14px 16px 12px;
        display: flex;
        flex-direction: column;
        gap: 10px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.06);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
        position: relative;
    }
    .quote-bubble:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    }

    .quote-text {
        font-family: 'Cairo', sans-serif;
        font-size: 0.9rem;
        line-height: 1.8;
        color: var(--text-main);
        text-align: right;
        direction: rtl;
        margin: 0;
    }

    .quote-bubble-footer {
        display: flex;
        align-items: center;
        gap: 8px;
        direction: rtl;
        border-top: 1px solid rgba(0,0,0,0.06);
        padding-top: 10px;
    }

    .quote-author-img {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid rgba(79,209,255,0.35);
        flex-shrink: 0;
    }

    .quote-author-fallback {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--primary-cyan), var(--primary-purple));
        color: white;
        font-weight: 700;
        font-size: 0.95rem;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        font-family: 'Cairo', sans-serif;
    }

    .quote-author-meta {
        display: flex;
        flex-direction: column;
        gap: 2px;
        flex: 1;
        min-width: 0;
    }

    .quote-author-name {
        font-family: 'Cairo', sans-serif;
        font-size: 0.8rem;
        font-weight: 700;
        color: var(--text-main);
    }

    .quote-book-title {
        font-family: 'Cairo', sans-serif;
        font-size: 0.7rem;
        color: var(--text-muted);
        display: flex;
        align-items: center;
        gap: 3px;
    }

    .quote-copy-btn {
        flex-shrink: 0;
        margin-right: auto;
        width: 32px;
        height: 32px;
        border-radius: 9px;
        border: 1.5px solid rgba(79,209,255,0.3);
        background: rgba(79,209,255,0.07);
        color: var(--primary-cyan);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    .quote-copy-btn svg { width: 14px; height: 14px; }
    .quote-copy-btn:hover {
        background: linear-gradient(135deg, var(--primary-cyan), var(--primary-purple));
        border-color: transparent;
        transform: scale(1.1);
    }
    .quote-copy-btn:hover svg { stroke: white; }
    .quote-copy-btn.copied {
        background: linear-gradient(135deg, #10b981, #059669);
        border-color: transparent;
    }
    .quote-copy-btn.copied svg { stroke: white; }

    body.dark-mode .quote-bubble--left .quote-bubble  { background: #1e293b; border-color: rgba(168,85,247,0.2); }
    body.dark-mode .quote-bubble--right .quote-bubble { background: linear-gradient(135deg, rgba(79,209,255,0.1), rgba(168,85,247,0.1)); }
    body.dark-mode .quote-copy-btn { background: rgba(79,209,255,0.1); }


    body.dark-mode .review-card::before { color: rgba(79,209,255,0.05); }

    .books-scroll-row {
        display: flex;
        gap: 14px;
        overflow-x: auto;
        padding-bottom: 8px;
        scrollbar-width: thin;
        scrollbar-color: rgba(79,209,255,0.3) transparent;
    }

    .books-scroll-row::-webkit-scrollbar { height: 4px; }
    .books-scroll-row::-webkit-scrollbar-thumb { background:rgba(79,209,255,0.4); border-radius:10px; }

    /* Animated border — GPU only via background-position, zero layout cost */
    @keyframes cardBorderFlow {
        0%   { background-position: 0% 50%;   }
        50%  { background-position: 100% 50%; }
        100% { background-position: 0% 50%;   }
    }

    .mini-book-card-wrap {
        flex-shrink: 0;
        width: 250px;
        border-radius: 24px;
        padding: 2.5px;
        /* شفافية 65% — ملحوظة بدون ما تكون ثقيلة */
        background: linear-gradient(
            135deg,
            rgba(79, 209, 255, 0.25),
            rgba(168, 85,  247, 0.25),
            rgba(59,  130, 246, 0.25),
            rgba(79,  209, 255, 0.25)
        );
        background-size: 300% 300%;
        /* will-change يخلي المتصفح يحضر layer جاهز على GPU */
        will-change: background-position;
        animation: cardBorderFlow 4s ease infinite;
        text-decoration: none;
        display: block;
        transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1),
                    box-shadow 0.38s ease;
                    
    }

    .mini-book-card-wrap:hover {
        transform: translateY(-10px) scale(1.02);
        box-shadow: 0 24px 50px var(--shadow-heavy);
    }

    .mini-book-card {
        flex-shrink: 0;
        width: 100%;
        background: white;
        border-radius: 22px;
        overflow: hidden;
        cursor: pointer;
        text-decoration: none;
        color: var(--text-dark);
        display: flex;
        flex-direction: column;
        position: relative;
    }

    .mini-book-cover {
        aspect-ratio: 2/3;
        width: 100%;
        background: linear-gradient(145deg, #e8f4ff, #f3e8ff);
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        position: relative;
        flex-shrink: 0;
    }

    .mini-book-cover img {
        width: 100%; height: 100%;
        object-fit: cover;
        transition: transform 0.45s ease;
    }

    .mini-book-card-wrap:hover .mini-book-cover img { transform: scale(1.06); }

    .mini-book-cover svg {
        width: 55px; height: 55px;
        stroke: rgba(79,209,255,0.2); fill: none;
    }

    /* badge فوق الصورة */
    .mini-book-badge {
        position: absolute;
        top: 12px; right: 12px;
        padding: 5px 13px;
        font-family: 'Cairo', sans-serif;
        font-size: 0.65rem;
        font-weight: 700;
        border-radius: 20px;
        z-index: 2;
        backdrop-filter: blur(8px);
    }

    .badge-bestseller { background: rgba(251,191,36,0.93); color: #78350f; }
    .badge-free       { background: rgba(52,211,153,0.93); color: #064e3b; }
    .badge-new        { background: rgba(99,102,241,0.93); color: white;   }

    .mini-book-info {
        padding: 14px;
        display: flex;
        flex-direction: column;
        flex: 1;
        gap: 9px;
    }

    .mini-book-title {
        font-size: 0.95rem;
        font-weight: 700;
        line-height: 1.45;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        color: var(--text-dark);
    }

    /* السعر يمين — النوع شمال */
    .mini-book-meta {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .mini-book-price {
        font-family: 'Cairo', sans-serif;
        font-size: 0.88rem;
        font-weight: 800;
        color: var(--primary-cyan);
    }

    .mini-book-price.free-price { color: #059669; }

    .mini-book-type {
        padding: 4px 11px;
        font-family: 'Cairo', sans-serif;
        font-size: 0.63rem;
        font-weight: 700;
        border-radius: 20px;
    }

    .type-solo       { background: #f1f5f9; color: #64748b; }
    .type-collective { background: rgba(168,85,247,0.12); color: #9333ea; }

    .mini-book-footer { margin-top: auto; }

    .mini-book-rating {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        margin-top: 8px;
        margin-bottom: 10px;
        direction: ltr;
    }

    .mini-rating-stars {
        display: flex;
        gap: 1px;
        align-items: center;
        direction: ltr;
    }
    .mini-rating-stars .pub-star { font-size: 1.25rem; }

    .mini-rating-num {
        font-size: 0.9rem;
        font-weight: 700;
        color: var(--text-muted);
        line-height: 1;
    }

    .mini-book-details-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        width: 100%;
        padding: 10px 0;
        border-radius: 13px;
        background: linear-gradient(135deg, rgba(79,209,255,0.09), rgba(168,85,247,0.09));
        border: 1.5px solid rgba(79,209,255,0.22);
        color: var(--primary-cyan);
        font-family: 'Cairo', sans-serif;
        font-size: 0.78rem;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.25s ease;
    }

    .mini-book-details-btn svg {
        width: 13px; height: 13px;
        stroke: var(--primary-cyan); fill: none;
        transition: transform 0.25s ease;
    }

    .mini-book-card-wrap:hover .mini-book-details-btn {
        background: linear-gradient(135deg, var(--primary-cyan), var(--primary-purple));
        border-color: transparent;
        color: white;
    }

    .mini-book-card-wrap:hover .mini-book-details-btn svg { stroke: white; transform: translateX(-3px); }

    body.dark-mode .mini-book-card-wrap { background: linear-gradient(135deg, rgba(79,209,255,0.55), rgba(168,85,247,0.55), rgba(59,130,246,0.55), rgba(79,209,255,0.55)); background-size:300% 300%; will-change:background-position; animation: cardBorderFlow 4s ease infinite; }
    body.dark-mode .mini-book-card      { background: #1e293b; }
    body.dark-mode .mini-book-cover { background: linear-gradient(145deg, #1a2744, #1a0f2e); }
    body.dark-mode .type-solo       { background: #2d3748; color: #94a3b8; }

    /* ===== BOOKS GRID ===== */
    .publisher-books-grid {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 10px;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 14px;
    }

    @media (min-width: 480px) {
        .publisher-books-grid {
            grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        }
    }

    @media (min-width: 768px) {
        .publisher-books-grid {
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 18px;
        }
    }

    /* ===== BOOKS TAB CARD ===== */
    .books-tab-card-wrap {
        border-radius: 22px;
        padding: 2.5px;
        background: linear-gradient(
            135deg,
            rgba(79, 209, 255, 0.22),
            rgba(168, 85,  247, 0.22),
            rgba(59,  130, 246, 0.22),
            rgba(79,  209, 255, 0.22)
        );
        background-size: 300% 300%;
        will-change: background-position;
        animation: cardBorderFlow 4s ease infinite;
        text-decoration: none;
        /* flex عشان الكارت يملا الارتفاع كامل */
        display: flex;
        flex-direction: column;
        transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1),
                    box-shadow 0.38s ease;
    }
    .books-tab-card-wrap:hover {
        transform: translateY(-10px) scale(1.02);
        box-shadow: 0 22px 45px rgba(0,0,0,0.14), 0 6px 16px rgba(79,209,255,0.13);
    }

    .books-tab-card {
        width: 100%;
        background: white;
        border-radius: 20px;
        overflow: hidden;
        cursor: pointer;
        text-decoration: none;
        display: flex;
        flex-direction: column;
        flex: 1; /* يملا ارتفاع الـ wrap */
    }

    .books-tab-cover {
        aspect-ratio: 2/3;
        width: 100%;
        background: linear-gradient(145deg, #e8f4ff, #f3e8ff);
        position: relative;
        overflow: hidden;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .books-tab-cover img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.4s ease;
    }
    .books-tab-card-wrap:hover .books-tab-cover img { transform: scale(1.06); }

    .books-tab-badges {
        position: absolute;
        top: 8px; right: 8px;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .books-tab-info {
        padding: 10px 12px 12px;
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .books-tab-title {
        font-family: 'Cairo', sans-serif;
        font-size: 0.9rem;
        font-weight: 700;
        color: var(--text-dark);
        margin-bottom: 6px;
        line-height: 1.4;
        direction: rtl;
        text-align: right;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        /* ثابت بـ سطرين دايماً */
        min-height: calc(1.4em * 2);
    }

    .books-tab-meta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        direction: rtl;
        margin-bottom: 4px;
    }

    body.dark-mode .books-tab-card      { background: #1e293b; }
    body.dark-mode .books-tab-card-wrap { background: linear-gradient(135deg, rgba(79,209,255,0.5), rgba(168,85,247,0.5), rgba(59,130,246,0.5), rgba(79,209,255,0.5)); background-size:300% 300%; animation: cardBorderFlow 4s ease infinite; }

    /* ===== MEMORIES — STUDIO STYLE ===== */
    .memories-grid {
        max-width: 1100px;
        margin: 0 auto;
        padding: 0 8px 60px;
        display: flex;
        flex-direction: column;
        gap: 32px;
    }

    /* ---- Album ---- */
    .studio-album {}

    .studio-album-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        padding: 0 4px 12px;
        border-bottom: 1.5px solid rgba(79,209,255,0.12);
        margin-bottom: 12px;
    }

    .studio-album-meta { display:flex; flex-direction:column; gap:3px; }

    .studio-album-category {
        font-size: 0.7rem;
        font-weight: 700;
        color: var(--primary-cyan);
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }

    .studio-album-title {
        font-family: 'Cairo', sans-serif;
        font-size: 1rem;
        font-weight: 700;
        color: var(--text-dark);
        margin: 0;
    }

    .studio-album-date {
        font-size: 0.72rem;
        color: var(--text-muted);
    }

    .studio-album-count {
        font-size: 0.75rem;
        font-weight: 600;
        color: var(--text-muted);
        background: rgba(79,209,255,0.08);
        padding: 4px 10px;
        border-radius: 20px;
        white-space: nowrap;
        align-self: center;
    }

    /* ---- Photo Grid (3 columns like phone studio) ---- */
    .studio-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 3px;
    }

    .studio-photo {
        position: relative;
        aspect-ratio: 1 / 1;
        overflow: hidden;
        cursor: pointer;
        background: linear-gradient(135deg, #f0f9ff, #faf5ff);
        animation: studioFadeIn 0.35s ease both;
    }

    @keyframes studioFadeIn {
        from { opacity: 0; transform: scale(0.97); }
        to   { opacity: 1; transform: scale(1); }
    }

    .studio-photo img {
        width: 100%; height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.35s ease;
    }

    .studio-photo:hover img { transform: scale(1.06); }

    /* Overlay on hover */
    /* Animated border على حواف الصورة */
    .studio-photo::before {
        content: '';
        position: absolute;
        inset: 0;
        z-index: 2;
        padding: 2px;
        background: linear-gradient(135deg,
            rgba(79,209,255,0.45),
            rgba(168,85,247,0.45),
            rgba(79,209,255,0.45),
            rgba(168,85,247,0.45)
        );
        background-size: 300% 300%;
        animation: studioBorderFlow 3s ease infinite;
        -webkit-mask:
            linear-gradient(#fff 0 0) content-box,
            linear-gradient(#fff 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        pointer-events: none;
    }

    @keyframes studioBorderFlow {
        0%   { background-position: 0% 50%; }
        50%  { background-position: 100% 50%; }
        100% { background-position: 0% 50%; }
    }

    /* Gradient overlay — أكثر وضوحاً */
    .studio-photo-overlay {
        position: absolute;
        inset: 0;
        z-index: 3;
        background: linear-gradient(135deg,
            rgba(79, 209, 255, 0.22) 0%,
            rgba(168, 85, 247, 0.22) 100%
        );
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
        padding-bottom: 8px;
        transition: background 0.25s ease;
        pointer-events: none;
    }

    .studio-photo:hover .studio-photo-overlay {
        background: linear-gradient(135deg,
            rgba(79, 209, 255, 0.35) 0%,
            rgba(168, 85, 247, 0.35) 100%
        );
    }

    /* كلمة hroof — أكبر */
    .studio-photo-watermark {
        font-family: 'Cairo', sans-serif;
        font-size: 1rem;
        font-weight: 800;
        letter-spacing: 0.18em;
        color: rgba(255, 255, 255, 0.88);
        text-shadow: 0 1px 6px rgba(0,0,0,0.45);
        text-transform: lowercase;
        user-select: none;
    }

    .studio-tap-hint {
        position: absolute;
        inset: 0;
        z-index: 10;
        display: flex;
        align-items: center;
        justify-content: center;
        pointer-events: none;
        animation: tapHintFadeOut 0.5s ease 3.8s forwards;
    }

    /* الدوائر المتموجة */
    .tap-ripple {
        position: absolute;
        width: 52px;
        height: 52px;
        border-radius: 50%;
        background: rgba(255,255,255,0.25);
        animation: tapRippleGrow 1.1s ease-out infinite;
    }
    .tap-ripple:nth-child(2) { animation-delay: 0.37s; }
    .tap-ripple:nth-child(3) { animation-delay: 0.74s; }

    @keyframes tapRippleGrow {
        0%   { transform: scale(0.3); opacity: 0.7; }
        100% { transform: scale(2.2); opacity: 0; }
    }

    /* أيقونة الإيد — SVG */
    .tap-hand {
        position: relative;
        z-index: 1;
        width: 36px;
        height: 36px;
        filter: drop-shadow(0 2px 8px rgba(0,0,0,0.45));
        animation: tapHandPress 1.1s ease-in-out infinite;
    }

    .tap-hand svg {
        width: 100%;
        height: 100%;
    }

    @keyframes tapHandPress {
        0%   { transform: scale(1)    translateY(0);    }
        40%  { transform: scale(0.88) translateY(5px);  }
        70%  { transform: scale(1.05) translateY(-3px); }
        100% { transform: scale(1)    translateY(0);    }
    }

    @keyframes tapHintFadeOut {
        from { opacity: 1; }
        to   { opacity: 0; }
    }
    .studio-photo--error {
        background: linear-gradient(135deg,#f0f9ff,#faf5ff);
    }
    .studio-photo--error::after {
        content: '📷';
        position:absolute; inset:0;
        display:flex; align-items:center; justify-content:center;
        font-size: 2rem; opacity: 0.3;
    }

    /* Lightbox */
    .lightbox {
        position:fixed; inset:0;
        background:rgba(0,0,0,0.92);
        z-index:20000;
        display:flex; flex-direction:column;
        align-items:center; justify-content:center;
        opacity:0; visibility:hidden;
        transition:all 0.3s ease;
    }

    .lightbox.active { opacity:1; visibility:visible; }

    .lightbox-img-wrapper { max-width:90vw; max-height:75vh; }

    .lightbox-img {
        max-width:90vw; max-height:75vh;
        object-fit:contain; border-radius:10px;
        box-shadow:0 20px 60px rgba(0,0,0,0.5);
    }

    .lightbox-caption {
        color:white; text-align:center;
        padding:12px 20px; font-size:0.91rem;
        max-width:580px;
    }

    .lightbox-nav { display:flex; gap:20px; margin-top:8px; }

    .lightbox-btn {
        width:43px; height:43px; border-radius:50%;
        background:rgba(255,255,255,0.15);
        border:none; color:white;
        cursor:pointer; transition:0.3s;
        display:flex; align-items:center; justify-content:center;
    }

    .lightbox-btn svg { width:20px; height:20px; stroke:white; fill:none; stroke-width:2.5; }
    .lightbox-btn:hover { background:rgba(255,255,255,0.3); }

    .lightbox-close {
        position:absolute; top:20px; left:20px;
        width:40px; height:40px; border-radius:50%;
        background:rgba(255,255,255,0.15);
        border:none; cursor:pointer; transition:0.3s;
        display:flex; align-items:center; justify-content:center;
    }

    .lightbox-close svg { width:17px; height:17px; stroke:white; fill:none; stroke-width:2.5; }
    .lightbox-close:hover { background:rgba(255,255,255,0.3); }
    .lightbox-counter { color:rgba(255,255,255,0.5); font-size:0.8rem; margin-top:6px; }

    /* ===== INFO TAB ===== */
    .info-content {
        padding: 0 0 40px;
    }

    .info-about-card {
        background: white;
        border-radius: 18px;
        padding: 26px;
        box-shadow: 0 5px 20px var(--shadow-light);
        border: 1px solid rgba(79,209,255,0.1);
        margin: 0 auto 18px;
        max-width: 1200px;
        width: calc(100% - 20px);
    }

    .info-card-title {
        font-family: 'Amiri', serif;
        font-size: 1.4rem;
        font-weight: 700;
        background: linear-gradient(135deg,var(--primary-cyan),var(--primary-purple));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin-bottom: 14px;
        display: flex;
        align-items: center;
        gap: 9px;
    }

    .info-card-icon {
        width: 28px; height: 28px;
        background: linear-gradient(135deg,var(--primary-cyan),var(--primary-purple));
        border-radius: 8px;
        display: flex; align-items: center; justify-content: center;
        flex-shrink: 0;
    }

    .info-card-icon svg { width:15px; height:15px; stroke:white; fill:none; }

    .info-description {
        font-family: 'Tajawal', sans-serif;
        font-size: 1rem;
        color: var(--text-muted);
        line-height: 1.9;
        text-align: justify;
    }

    .info-details-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit,minmax(165px,1fr));
        gap: 11px;
        margin-top: 18px;
    }

    .info-detail-item {
        display: flex;
        align-items: center;
        gap: 11px;
        padding: 11px 13px;
        background: linear-gradient(135deg,#f0f9ff,#faf5ff);
        border-radius: 12px;
        border: 1px solid rgba(79,209,255,0.2);
    }

    .info-detail-icon-wrap {
        width: 34px; height: 34px;
        background: white;
        border-radius: 9px;
        display: flex; align-items: center; justify-content: center;
        flex-shrink: 0;
        box-shadow: 0 2px 7px var(--shadow-light);
    }

    .info-detail-icon-wrap svg { width:17px; height:17px; stroke:var(--primary-cyan); fill:none; }

    .info-detail-text  { font-size:0.87rem; color:var(--text-dark); font-weight:600; }
    .info-detail-label { font-size:0.7rem; color:var(--text-muted); }

    /* ===== TEAM — ORG TREE ===== */
    .team-tree {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding: 10px 0 6px;
    }

    .team-row {
        display: flex;
        justify-content: center;
        gap: 18px;
        position: relative;
        margin-bottom: 0;
    }

    /* خطوط الشجرة */
    .team-row:not(:last-child)::after {
        content: '';
        position: absolute;
        bottom: -22px;
        left: 50%;
        transform: translateX(-50%);
        width: 2px;
        height: 22px;
        background: linear-gradient(to bottom, rgba(79,209,255,0.5), rgba(168,85,247,0.5));
    }

    .team-row-connector {
        height: 22px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        position: relative;
    }

    .team-row-connector::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 2px;
        height: 100%;
        background: linear-gradient(to bottom, rgba(79,209,255,0.5), rgba(168,85,247,0.5));
    }

    /* الخط الأفقي للـ row اللي فيها أكتر من شخص */
    .team-row-multi {
        position: relative;
    }

    .team-row-multi::before {
        content: '';
        position: absolute;
        top: 0;
        left: calc(50% - var(--row-span, 50%) / 2);
        right: calc(50% - var(--row-span, 50%) / 2);
        height: 2px;
        background: linear-gradient(to right, rgba(79,209,255,0.4), rgba(168,85,247,0.4), rgba(79,209,255,0.4));
    }

    .team-card {
        background: linear-gradient(135deg,#f0f9ff,#faf5ff);
        border-radius: 18px;
        padding: 22px 18px 16px;
        text-align: center;
        border: 1px solid rgba(79,209,255,0.2);
        transition: all 0.3s ease;
        width: 155px;
        position: relative;
    }

    /* الخط الرأسي اللي ينزل من الكارت */
    .team-card::before {
        content: '';
        position: absolute;
        top: -22px;
        left: 50%;
        transform: translateX(-50%);
        width: 2px;
        height: 22px;
        background: linear-gradient(to bottom, rgba(79,209,255,0.5), rgba(168,85,247,0.5));
    }

    .team-row:first-child .team-card::before { display: none; }

    .team-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 24px var(--shadow-heavy);
        border-color: var(--primary-cyan);
    }

    /* الصورة كبيرة */
    .team-avatar {
        width: 100px; height: 100px;
        border-radius: 50%;
        margin: 0 auto 12px;
        overflow: hidden;
        border: 3px solid white;
        box-shadow: 0 5px 18px var(--shadow-heavy);
        background: linear-gradient(135deg,var(--primary-cyan),var(--primary-purple));
        display: flex; align-items: center; justify-content: center;
        font-size: 2.2rem; color: white;
        font-family: 'Cairo',sans-serif; font-weight:700;
    }

    /* المؤسسة — أكبر */
    .team-card--founder .team-avatar {
        width: 130px; height: 130px;
        font-size: 2.8rem;
        border: 4px solid white;
        box-shadow: 0 8px 28px rgba(79,209,255,0.35);
    }

    .team-card--founder {
        width: 185px;
        border: 1.5px solid rgba(79,209,255,0.45);
        background: linear-gradient(135deg, #e8f8ff, #f5f0ff);
    }

    .team-avatar img { width:100%; height:100%; object-fit:cover; }
    .team-name  { font-size:0.92rem; font-weight:700; color:var(--text-dark); margin-bottom:4px; }
    .team-role  { font-size:0.73rem; color:var(--primary-cyan); font-weight:600; line-height:1.4; }
    .team-bio   { font-size:0.72rem; color:var(--text-muted); line-height:1.5; font-family:'Tajawal',sans-serif; margin-top:5px; }

    .social-links-row {
        display: flex;
        justify-content: center;
        gap: 11px;
        flex-wrap: wrap;
        margin-top: 4px;
    }

    .social-link {
        width: 50px; height: 50px;
        border-radius: 14px;
        display: flex; align-items: center; justify-content: center;
        text-decoration: none;
        transition: all 0.3s ease;
        color: white;
    }

    .social-link svg { width:22px; height:22px; fill:white; stroke:none; }
    .social-link:hover { transform:translateY(-3px) scale(1.08); box-shadow: 0 8px 20px rgba(0,0,0,0.2); }
    .social-link.facebook  { background:#1877F2; }
    .social-link.whatsapp  { background:#25D366; }
    .social-link.instagram { background:linear-gradient(135deg,#E1306C,#F77737,#FCAF45); }
    .social-link.twitter   { background:#1DA1F2; }
    .social-link.email-lnk { background:linear-gradient(135deg,var(--primary-cyan),var(--primary-purple)); }

    /* ===== NOTIFICATION BADGE ===== */
    .tab-btn-notif {
        position: relative;
        flex: 1;
        height: 100%;
        max-width: 120px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .tab-btn-notif .tab-btn {
        width: 100%;
        max-width: none;
        flex: none;
    }

    .notif-badge {
        position: absolute;
        top: 9px;
        /* جهة اليسار نسبة للأيقونة */
        right: calc(50% - 24px);
        background: #ef4444;
        color: white;
        font-size: 0.58rem;
        font-weight: 700;
        min-width: 17px;
        height: 17px;
        border-radius: 9px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 4px;
        border: 2px solid white;
        box-shadow: 0 2px 6px rgba(239,68,68,0.5);
        pointer-events: none;
        opacity: 0;
        transform: scale(0);
        transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1);
    }

    .notif-badge.show {
        opacity: 1;
        transform: scale(1);
    }

    /* dark mode */
    body.dark-mode .announcement-card,
    body.dark-mode .pub-book-card,
    body.dark-mode .studio-album-header { border-color: rgba(79,209,255,0.08); }
    body.dark-mode .studio-album-title  { color: #e2e8f0; }
    body.dark-mode .studio-photo        { background: #1e293b; }
    body.dark-mode .studio-album-count  { background: rgba(79,209,255,0.12); }

    body.dark-mode .memory-card,
    body.dark-mode .home-section-card,
    body.dark-mode .info-about-card,
    body.dark-mode .mini-book-card { background: #1e293b; }

    body.dark-mode .ann-icon,
    body.dark-mode .info-detail-item,
    body.dark-mode .info-detail-icon-wrap { background: #2d3748; }

    body.dark-mode .team-card { background: #2d3748; }
    body.dark-mode .notif-badge { border-color: #0f172a; }

    /* responsive */
    @media (max-width: 640px) {
        .home-sections-grid { padding: 0 14px 22px; gap: 12px; }
        .publisher-books-grid { grid-template-columns: repeat(2,1fr); gap:11px; padding:0 12px 30px; }
        .memories-grid { padding:0 4px 40px; gap:22px; }
        .studio-grid { gap:2px; }
        .studio-album-header { padding:0 2px 10px; }
        .studio-album-title { font-size:0.88rem; }
        .studio-photo-watermark { font-size: 0.65rem; letter-spacing: 0.1em; }
        .team-tree { gap: 0; }
        .team-card {
            width: auto;
            flex: 1 1 0;
            min-width: 0;
            max-width: 160px;
            padding: 14px 8px 12px;
            border-radius: 14px;
        }
        .team-card--founder {
            width: auto;
            flex: 0 0 auto;
            max-width: 170px;
            padding: 16px 12px 14px;
        }
        .team-avatar { width: 72px; height: 72px; font-size: 1.6rem; }
        .team-card--founder .team-avatar { width: 90px; height: 90px; font-size: 2rem; }
        .team-row { gap: 8px; width: 100%; justify-content: center; flex-wrap: wrap; }
        .team-row .team-card { flex: 0 0 calc(50% - 8px); max-width: calc(50% - 8px); }
        .team-name { font-size: 0.82rem; }
        .team-role { font-size: 0.68rem; line-height: 1.4; }
        .team-bio  { font-size: 0.66rem; }
        .home-publisher-name h2 { font-size:1.55rem; }
    }
    /* ===== FEATURED ANNOUNCEMENT ===== */
    .featured-ann-card {
        background: white;
        border-radius: 22px;
        padding: 0;
        box-shadow: 0 8px 32px rgba(0,0,0,0.08);
        border: 1.5px solid rgba(79,209,255,0.22);
        position: relative;
        overflow: hidden;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    /* شريط علوي gradient */
    .featured-ann-card::before {
        content: '';
        position: absolute;
        top: 0; left: 0; right: 0;
        height: 4px;
        background: linear-gradient(90deg, var(--primary-cyan), var(--primary-purple), var(--primary-blue));
        border-radius: 22px 22px 0 0;
    }

    /* دائرة ديكور خلفية */
    .featured-ann-card::after {
        content: '';
        position: absolute;
        bottom: -60px; left: -60px;
        width: 180px; height: 180px;
        background: radial-gradient(circle, rgba(168,85,247,0.06) 0%, transparent 70%);
        border-radius: 50%;
        pointer-events: none;
    }

    .featured-ann-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 18px 50px rgba(0,0,0,0.12), 0 4px 16px rgba(79,209,255,0.1);
    }

    /* ===== header الكارت ===== */
    .featured-ann-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 20px 20px 14px;
        border-bottom: 1px solid rgba(79,209,255,0.1);
        gap: 12px;
    }

    .featured-ann-top-right {
        display: flex;
        align-items: center;
        gap: 12px;
        direction: rtl;
    }

    .featured-ann-icon {
        width: 46px; height: 46px;
        border-radius: 13px;
        background: linear-gradient(135deg, rgba(79,209,255,0.15), rgba(168,85,247,0.15));
        border: 1.5px solid rgba(79,209,255,0.3);
        display: flex; align-items: center; justify-content: center;
        flex-shrink: 0;
    }
    .featured-ann-icon svg { width:22px; height:22px; stroke: var(--primary-cyan); fill:none; }

    .featured-ann-meta { display: flex; flex-direction: column; gap: 5px; }

    .featured-ann-badge {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 3px 11px;
        background: linear-gradient(135deg, rgba(251,191,36,0.2), rgba(245,158,11,0.2));
        color: #b45309;
        border: 1px solid rgba(245,158,11,0.3);
        border-radius: 20px;
        font-size: 0.7rem;
        font-weight: 700;
        width: fit-content;
    }
    .featured-ann-badge svg { width:11px; height:11px; stroke:#b45309; fill:none; }

    .featured-ann-title {
        font-family: 'Cairo', sans-serif;
        font-size: 1.05rem;
        font-weight: 800;
        color: var(--text-dark);
        line-height: 1.4;
        margin: 0;
        direction: rtl;
    }

    /* ===== body ===== */
    .featured-ann-body {
        font-family: 'Tajawal', sans-serif;
        font-size: 0.9rem;
        color: var(--text-muted);
        line-height: 1.9;
        padding: 16px 20px;
        white-space: pre-line;
        direction: rtl;
        text-align: right;
        border-bottom: 1px solid rgba(79,209,255,0.08);
        margin: 0;
    }

    /* ===== footer ===== */
    .featured-ann-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 10px;
        padding: 14px 20px;
        background: rgba(79,209,255,0.03);
        direction: rtl;
    }

    .featured-ann-date {
        font-size: 0.76rem;
        color: var(--text-muted);
        display: flex;
        align-items: center;
        gap: 5px;
        background: rgba(0,0,0,0.04);
        padding: 4px 10px;
        border-radius: 20px;
    }
    .featured-ann-date svg { width:12px; height:12px; stroke:var(--text-muted); fill:none; }

    .featured-ann-deadline {
        font-size: 0.76rem;
        color: #dc2626;
        font-weight: 700;
        background: rgba(239,68,68,0.08);
        border: 1px solid rgba(239,68,68,0.2);
        padding: 4px 12px;
        border-radius: 20px;
        display: flex;
        align-items: center;
        gap: 5px;
    }
    .featured-ann-deadline svg { width:12px; height:12px; stroke:#dc2626; fill:none; }

    .featured-ann-cta {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        padding: 9px 22px;
        background: linear-gradient(135deg, var(--primary-cyan), var(--primary-purple));
        color: white;
        border-radius: 25px;
        font-size: 0.82rem;
        font-weight: 700;
        font-family: 'Cairo', sans-serif;
        border: none;
        cursor: pointer;
        transition: all 0.25s ease;
        box-shadow: 0 3px 12px rgba(79,209,255,0.25);
    }
    .featured-ann-cta svg { width:14px; height:14px; stroke:white; fill:none; }
    .featured-ann-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(79,209,255,0.4); }

    body.dark-mode .featured-ann-card { background: #1e293b; border-color: rgba(79,209,255,0.15); }
    body.dark-mode .featured-ann-footer { background: rgba(79,209,255,0.04); }
    body.dark-mode .featured-ann-top { border-color: rgba(79,209,255,0.1); }



/* ===== UTILITY CLASSES (moved from HTML inline styles) ===== */
.loading-sm   { padding: 25px; }
.loading-lg   { padding: 55px; }
.loading-grid-lg { grid-column: 1 / -1; padding: 55px; }
.featured-ann-section-hidden { display: none; }
/* ===== BOOKS TAB — SECTION GROUPS ===== */
.books-section-group {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 14px 28px;
}

.books-section-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(79,209,255,0.15);
}

.books-section-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-dark);
    font-family: 'Cairo', sans-serif;
    word-break: break-word;
    min-width: 0;
}

.books-section-group-title .icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(79,209,255,0.15), rgba(168,85,247,0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.books-section-group-title .icon-wrap svg {
    width: 16px;
    height: 16px;
    stroke: var(--primary-cyan);
}

/* Divider line between sections */
.books-section-group + .books-section-group {
    padding-top: 8px;
    border-top: 1px solid rgba(79,209,255,0.10);
}

/* badge-fair for معرض 2026 */
.badge-fair {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 8px;
    position: absolute;
    top: 8px;
    right: 8px;
    box-shadow: 0 2px 8px rgba(245,158,11,0.35);
    font-family: 'Cairo', sans-serif;
}

/* dark mode */
body.dark-mode .books-section-group-title { color: #e2e8f0; }
body.dark-mode .books-section-group + .books-section-group { border-color: rgba(79,209,255,0.08); }
body.dark-mode .books-section-group-title .icon-wrap { background: rgba(79,209,255,0.08); }
/* ===== SUMMARIES SECTION ===== */
.summaries-scroll-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 4px 0 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(79,209,255,0.3) transparent;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.summaries-scroll-row::-webkit-scrollbar { height: 4px; }
.summaries-scroll-row::-webkit-scrollbar-thumb { background: rgba(79,209,255,0.4); border-radius: 10px; }

.summary-card {
    flex-shrink: 0;
    scroll-snap-align: start;
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    /* العرض يتكيف مع الشاشة */
    width: calc(100vw - 48px);
    max-width: 480px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.10);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid rgba(79,209,255,0.15);
    background: #f0f4ff;
}

.summary-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(79,209,255,0.18);
    border-color: rgba(79,209,255,0.35);
}

.summary-card img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* أيقونة تكبير */
.summary-card::after {
    content: '⛶';
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: 32px;
    height: 32px;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(6px);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.summary-card:hover::after { opacity: 1; }

/* ===== LIGHTBOX ===== */
.summary-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(8px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    cursor: zoom-out;
}
.summary-lightbox.active { display: flex; }

.summary-lightbox-img {
    max-width: 100%;
    max-height: 92vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    cursor: default;
}

.summary-lightbox-close {
    position: fixed;
    top: 16px;
    left: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.15);
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 100000;
}
.summary-lightbox-close:hover { background: rgba(255,255,255,0.3); }

body.dark-mode .summary-card { background: #1e293b; border-color: rgba(79,209,255,0.1); }
/* ===== ANN ACTIONS ===== */
.ann-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* زر واتساب */
.ann-wa-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 15px;
    background: rgba(37,211,102,0.72);
    color: white;
    border-radius: 25px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 3px 10px rgba(37,211,102,0.15);
}
.ann-wa-btn:hover {
    background: #20b958;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(37,211,102,0.4);
}

/* زر مشاركة */
.ann-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 15px;
    background: transparent;
    border: 1.5px solid rgba(79,209,255,0.35);
    color: var(--primary-cyan);
    border-radius: 25px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}
.ann-share-btn:hover {
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-purple));
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
}

/* highlight لما حد يجي من رابط مشاركة */
@keyframes annPulse {
    0%,100% { box-shadow: 0 5px 20px rgba(79,209,255,0.1); }
    50%      { box-shadow: 0 0 0 6px rgba(79,209,255,0.2), 0 5px 30px rgba(79,209,255,0.3); }
}
.ann-highlight {
    animation: annPulse 0.8s ease-in-out 3;
    border-color: rgba(79,209,255,0.5) !important;
}

body.dark-mode .ann-share-btn { border-color: rgba(79,209,255,0.25); }

/* ===== ANNOUNCEMENTS SECTION GROUPS ===== */
.ann-section-group {
    max-width: 1200px;
    margin: 0 auto 10px;
    padding: 0 10px;
}

.ann-section-header {
    padding: 18px 0 12px;
    margin-bottom: 4px;
    border-bottom: 2px solid rgba(79,209,255,0.15);
}

.ann-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-dark);
    font-family: 'Cairo', sans-serif;
}

.ann-section-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(79,209,255,0.14), rgba(168,85,247,0.14));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ann-section-icon svg {
    width: 18px;
    height: 18px;
    stroke: var(--primary-cyan);
    fill: none;
}

/* فاصل بين المجموعات */
.ann-section-group + .ann-section-group {
    border-top: 1px solid rgba(79,209,255,0.08);
    padding-top: 6px;
}

/* dark mode */
body.dark-mode .ann-section-title { color: #e2e8f0; }
body.dark-mode .ann-section-header { border-color: rgba(79,209,255,0.1); }
body.dark-mode .ann-section-icon { background: rgba(79,209,255,0.08); }
body.dark-mode .ann-section-group + .ann-section-group { border-color: rgba(79,209,255,0.07); }
/* زر مشاركة في الهيدر — جنب العنوان على اليسار */
.ann-share-btn--header {
    margin-right: auto;
    margin-left: 0;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 4px;
}

/* فوتر زر الواتساب — بعرض الكارت الكامل */
.ann-wa-footer {
    margin-top: 14px;
    border-top: 1px solid rgba(37,211,102,0.15);
    padding-top: 14px;
}

.ann-wa-btn--full {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 20px;
    border-radius: 14px;
    font-size: 0.88rem;
}

body.dark-mode .ann-wa-footer { border-color: rgba(37,211,102,0.1); }
/* ===== ANNOUNCEMENT IMAGE LAYOUT ===== */

/* الجسم — row على desktop، column على mobile */
.ann-body {
    display: flex;
    flex-direction: row;
    gap: 18px;
    align-items: flex-start;
    margin-top: 14px;
}

/* الصورة — يمين على desktop */
.ann-image-wrap {
    flex-shrink: 0;
    width: 220px;
    border-radius: 14px;
    overflow: hidden;
    border: 1.5px solid rgba(79,209,255,0.15);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    order: 1;
}

.ann-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #f8f5ef;
    display: block;
    transition: transform 0.3s ease;
}

.ann-image-wrap:hover .ann-image {
    transform: scale(1.04);
}

/* المحتوى — شمال الصورة على desktop */
.ann-body-content {
    flex: 1;
    min-width: 0;
    order: 2;
}

/* بدون صورة — المحتوى عادي */
.announcement-card:not(.ann-has-image) .ann-body {
    display: block;
    margin-top: 0;
}

/* ===== MOBILE ===== */
@media (max-width: 600px) {
    .ann-body {
        flex-direction: column;
        gap: 12px;
    }

    /* الصورة فوق على mobile */
    .ann-image-wrap {
        width: 100%;
        order: 1;
    }

    .ann-image {
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .ann-body-content {
        order: 2;
    }
}

/* dark mode */
body.dark-mode .ann-image-wrap {
    border-color: rgba(79,209,255,0.1);
}

/* ===== EXTRA SMALL (max 375px) ===== */
@media (max-width: 375px) {
    html, body { overflow-x: hidden; max-width: 100vw; }
    .section-title { font-size: 1.4rem; }
    .section-subtitle { font-size: 0.78rem; }
    .books-section-group { padding: 14px 10px 20px; }
    .books-section-group-title { font-size: 0.9rem; }
    .publisher-books-grid { padding: 0 8px; gap: 10px; }
    .info-about-card { margin: 0 8px 12px; padding: 14px 12px; }
    .studio-album-title { font-size: 0.82rem; }
    .announcement-card { padding: 14px 12px; }
    .ann-title { font-size: 0.92rem; }
}

/* ================================================================
   ULTRA SMALL SCREENS — أقل من 340px
   ================================================================ */
@media (max-width: 339px) {

    /* ===== GLOBAL ===== */
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    /* ===== HEADER ===== */
    .main-header { height: 54px; padding: 0 10px; }
    .logo img { height: 28px; }
    .menu-btn { right: 10px; font-size: 20px; }

    /* ===== HERO — تعريفات Hero الرئيسية في الأسفل ===== */

    /* ===== TAB BAR ===== */
    .content-tabs { height: 56px; }
    .tab-btn { padding: 4px 2px; }
    .tab-btn span { font-size: 0.5rem; }
    .tab-icon { width: 22px; height: 22px; }
    .notif-badge { font-size: 0.62rem; width: 18px; height: 18px; min-width: 18px; }

    /* ===== SECTION HEADERS ===== */
    .section-title { font-size: 1.5rem; }
    .section-subtitle { font-size: 0.88rem; }
    .section-header { padding: 18px 12px 10px; }

    /* ===== HOME — SLIDER عناوين الأقسام ===== */
    .books-preview-section { padding: 14px 0 18px; }
    .preview-section-header { padding: 0 12px 12px; }
    .preview-section-title { font-size: 1rem; gap: 8px; }
    .preview-section-title svg { width: 20px; height: 20px; }
    .see-more-btn { font-size: 0.78rem; padding: 6px 12px; }

    /* كروت الكتب في home — نفس حجم بعض وأعرض (snap to full width like 640px) */
    .books-scroll-row { gap: 10px; padding: 0 10px 8px; scroll-snap-type: x mandatory; }
    .mini-book-card-wrap {
        width: calc(75vw);
        max-width: 220px;
        flex-shrink: 0;
        scroll-snap-align: start;
    }
    .mini-book-title { font-size: 0.8rem; }
    .mini-book-info { padding: 12px 10px; gap: 7px; }
    .mini-book-price { font-size: 0.8rem; }
    .mini-book-details-btn { font-size: 0.74rem; padding: 8px 0; }

    /* ===== BOOKS TAB ===== */
    .books-section-group { padding: 14px 0 18px; }
    .books-section-group-header { margin-bottom: 12px; }
    .books-section-group-title { font-size: 1rem; gap: 8px; }
    .books-section-group-title .icon-wrap { width: 30px; height: 30px; }
    .books-section-group-title .icon-wrap svg { width: 15px; height: 15px; }
    /* كروت الكتب — aspect-ratio يحدد الارتفاع تلقائياً بدون قص */
    .books-tab-cover { height: auto; aspect-ratio: 2 / 3; }
    .books-tab-title { font-size: 0.76rem; }
    .books-tab-info { padding: 8px 8px 10px; }

    /* ===== ANNOUNCEMENTS ===== */
    .announcements-grid { padding: 0 10px 20px; }
    .announcement-card { padding: 14px 12px; border-radius: 12px; }
    .ann-title { font-size: 1rem; }
    .ann-content { font-size: 0.88rem; }
    .ann-icon { width: 38px; height: 38px; }
    .ann-wa-btn { font-size: 0.82rem; padding: 8px 12px; }

    /* ===== MEMORIES ===== */
    .memories-grid { padding: 0 4px 30px; gap: 14px; }
    .studio-grid { gap: 1px; }
    .studio-album-header { padding: 0 2px 8px; }
    .studio-album-title { font-size: 0.9rem; }
    .studio-album-date { font-size: 0.72rem; }
    .studio-photo-watermark { font-size: 0.48rem; letter-spacing: 0.06em; }

    /* ===== INFO TAB ===== */
    .info-about-card { padding: 14px 12px; margin: 0 8px 12px; border-radius: 12px; }
    .info-card-title { font-size: 1.05rem; }
    .info-description { font-size: 0.88rem; line-height: 1.75; }
    .info-details-grid { grid-template-columns: repeat(2, 1fr); gap: 7px; }
    .info-detail-item { padding: 8px 10px; }
    .info-detail-text { font-size: 0.84rem; }
    .info-detail-label { font-size: 0.7rem; }

    /* فريق العمل */
    .team-row { gap: 5px; flex-wrap: wrap; justify-content: center; }
    .team-card { width: 88px; padding: 10px 6px 8px; border-radius: 12px; }
    .team-card--founder { width: 108px; }
    .team-avatar { width: 55px; height: 55px; font-size: 1.2rem; }
    .team-card--founder .team-avatar { width: 70px; height: 70px; font-size: 1.6rem; }
    .team-name { font-size: 0.68rem; }
    .team-role { font-size: 0.58rem; }

    /* الصف اللي فيه 3+ كروت (الـ 4) — 2+2 وأصغر هرمياً */
    .team-row:has(> .team-card:nth-child(3)) { gap: 5px; }
    .team-row:has(> .team-card:nth-child(3)) .team-card {
        flex: 0 0 calc(50% - 5px);
        max-width: calc(50% - 5px);
        width: auto;
        padding: 8px 4px 6px;
        border-radius: 10px;
    }
    .team-row:has(> .team-card:nth-child(3)) .team-avatar {
        width: 44px; height: 44px; font-size: 1rem;
    }
    .team-row:has(> .team-card:nth-child(3)) .team-name { font-size: 0.6rem; }
    .team-row:has(> .team-card:nth-child(3)) .team-role { font-size: 0.52rem; }

    /* سوشيال */
    .social-links-row { gap: 7px; }
    .social-link { width: 38px; height: 38px; border-radius: 10px; }
    .social-link svg { width: 17px; height: 17px; }

    /* ===== LIGHTBOX ===== */
    .lightbox-img { max-width: 98vw; max-height: 65vh; }
    .lightbox-caption { font-size: 0.72rem; padding: 0 10px; }
    .lightbox-counter { font-size: 0.7rem; }
    .lightbox-btn { width: 32px; height: 32px; }

    /* ===== PUBLISHER PAGE — padding-top ===== */
    .publisher-page { padding-top: 54px; }

    /* ===== HERO — يملأ الشاشة كاملة ===== */
    .publisher-hero {
        min-height: calc(100dvh - 54px - 56px);
        height: calc(100dvh - 54px - 56px);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 12px 10px;
        overflow: hidden;
    }
    .hero-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-evenly;
        width: 100%;
        height: 100%;
    }

    /* اللوجو أكبر */
    .publisher-logo-wrapper {
        width: 130px;
        height: 130px;
        margin: 0;
    }
    .publisher-logo-img {
        width: 118px;
        height: 118px;
    }
    .rotating-glow   { width: 155px; height: 155px; }
    .rotating-glow-2 { width: 180px; height: 180px; }

    /* النص واضح */
    .publisher-name {
        font-size: 1.25rem;
        margin: 0;
        line-height: 1.3;
        text-align: center;
    }
    .publisher-slogan {
        font-size: 0.8rem;
        margin: 0;
        text-align: center;
    }

    /* الإحصائيات — صفين 3+3 تملأ العرض */
    .publisher-stats-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        margin-top: 0;
        width: 100%;
    }
    .stat-card {
        padding: 10px 4px;
        min-width: unset;
        min-height: 62px;
        border-radius: 12px;
    }
    .stat-num { font-size: 15px; }
    .stat-lbl { font-size: 8.5px; margin-top: 4px; }

    /* ===== BOOKS TAB — كروت كاملة مش مقصوصة ===== */
    .publisher-books-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 10px 24px;
    }
    .books-tab-card-wrap { height: auto; }
    .books-tab-cover {
        height: auto;
        aspect-ratio: 2 / 3;
    }
    .books-tab-title { font-size: 0.78rem; min-height: auto; }
    .books-tab-info { padding: 8px 8px 10px; }
}
.books-count-badge {
            display: inline-flex;
            align-items: center;
            padding: 3px 10px;
            background: linear-gradient(135deg, var(--primary-cyan, #4fd1ff), var(--primary-purple, #a78bfa));
            color: white;
            border-radius: 20px;
            font-size: 0.78rem;
            font-weight: 700;
            font-family: 'Cairo', sans-serif;
            margin-right: 8px;
        }

        /* Skeleton loader — overlay فوق الرقم */
        .stat-card { position: relative; overflow: hidden; }

        .stat-card::after {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: inherit;
            background: linear-gradient(
                90deg,
                rgba(79, 209, 255, 0.15) 0%,
                rgba(167, 139, 250, 0.3) 40%,
                rgba(79, 209, 255, 0.15) 80%
            );
            background-size: 200% 100%;
            animation: stat-shimmer 1.6s ease-in-out infinite;
            transition: opacity 0.5s ease;
            opacity: 1;
            pointer-events: none;
            z-index: 2;
        }

        /* الأرقام الثابتة مخفية من الأول */
        .publisher-stats-grid .stat-num {
            opacity: 0;
            transition: opacity 0.5s ease, transform 0.5s ease;
            transform: translateY(4px);
        }

        /* لما كل الأرقام تتحمل — شيل الـ overlay وظهّر الأرقام كلها */
        .stats-loaded .stat-card::after {
            opacity: 0;
        }
        .stats-loaded .stat-num {
            opacity: 1;
            transform: translateY(0);
        }

        @keyframes stat-shimmer {
            0%   { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }