/* كتب طلاب العراق — نفس التصميم الأصلي مع تحسينات خفيفة */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{font-family:'Cairo',Tahoma,sans-serif;direction:rtl;margin:0;color:#2c3e50;line-height:1.6}
img{max-width:100%}
a{color:inherit}

/* ===== صفحات القوائم (الرئيسية/المرحلة/الصف) ===== */
.pl{background:#f5f5f5;padding:0}
.navbar{background:#673AB7;color:#fff;padding:5px;text-align:center}
.navbar h1{margin:0;font-size:22px;font-weight:700;line-height:1.5}
.container{display:grid;grid-template-columns:1fr;gap:15px;padding:15px;max-width:1100px;margin:0 auto}
.container.two{grid-template-columns:repeat(2,1fr);gap:10px}
.box{display:block;margin-top:7px;background:#fff;padding:20px;text-align:center;border-radius:15px;box-shadow:0 8px 16px rgba(0,0,0,.2);text-decoration:none;color:#2c3e50;transition:transform .3s ease-in-out,box-shadow .3s ease-in-out}
.box:hover,.box:focus-visible{transform:translateY(-10px);box-shadow:0 12px 24px rgba(0,0,0,.3)}
.box:focus-visible{outline:3px solid #7E57C2;outline-offset:2px}
.box img{width:80px;height:80px;object-fit:contain}
.box h3{font-size:16px;font-weight:700;margin:5px 0}
.blue-line{height:1px;background:#673AB7;margin:2px 0}
.box p{font-size:12px;color:#666;margin:5px 0}
.container.two .box{padding:10px}
.container.two .box h3{font-size:14px}
.container.two .box p{font-size:11px}
.empty{grid-column:1/-1;text-align:center;color:#666;padding:20px}
@media (min-width:769px){
 .navbar{padding:12px}.navbar h1{font-size:22px}
 .container{padding:20px;gap:20px}
 .box{padding:25px}.box img{width:100px;height:100px}.box h3{font-size:18px}.box p{font-size:13px}
 .container.two .box{padding:25px}.container.two .box h3{font-size:18px}.container.two .box p{font-size:13px}
}
@media (min-width:1025px){
 .navbar{padding:15px}.navbar h1{font-size:24px}
 .container{padding:30px;gap:25px}.container.two{gap:25px}
 .box img{width:120px;height:120px}.box h3{font-size:20px}.box p{font-size:14px}
 .container.two .box{padding:20px}.container.two .box h3{font-size:20px}.container.two .box p{font-size:14px}
}

/* مسار التنقل */
.crumbs{max-width:1100px;margin:8px auto 0;padding:0 12px;font-size:13px}
.crumbs ol{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:2px 0;align-items:center}
.crumbs li{display:inline-flex;align-items:center;color:#666}
.crumbs li+li::before{content:"‹";margin:0 6px;color:#9e9e9e}
.crumbs a{color:#4527A0;text-decoration:none}
.crumbs a:hover{text-decoration:underline}
.pb .crumbs{text-align:right}

/* الإعلانات */
.adw{text-align:center;margin:8px auto;overflow:hidden;max-width:100%}
.adw-top{min-height:100px}

/* البحث */
.sbox{display:flex;max-width:560px;margin:12px auto;padding:0 12px}
.sbox input{flex:1;min-width:0;font:inherit;font-size:15px;padding:10px 14px;border:2px solid #d1c4e9;border-left:0;border-radius:0 25px 25px 0;background:#fff;color:#2c3e50;outline:none}
.sbox input:focus{border-color:#7E57C2}
.sbox button{border:0;background:#673AB7;color:#fff;padding:0 16px;border-radius:25px 0 0 25px;cursor:pointer;display:flex;align-items:center}
.sbox button:hover{background:#4527A0}
.sres{max-width:800px;margin:0 auto;padding:0 12px}
.sres-n{color:#666;font-size:14px;margin:6px 0}
.sres-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.sres-list a{display:flex;gap:12px;align-items:center;background:#fff;border-radius:12px;padding:10px 12px;text-decoration:none;box-shadow:0 2px 8px rgba(0,0,0,.08)}
.sres-list a:hover{box-shadow:0 4px 14px rgba(103,58,183,.25)}
.sres-list img{width:48px;height:48px;object-fit:contain;flex:none}
.sres-list span{display:flex;flex-direction:column}
.sres-list small{color:#7E57C2}
.ph{width:48px;height:48px;flex:none;border-radius:10px;background:#ede7f6}
.ph-g{background:#d1c4e9}
.nf{text-align:center;padding:10px 12px 20px}

/* روابط مترابطة */
.rel{max-width:800px;margin:18px auto;padding:0 12px;text-align:center}
.rel h2{font-size:18px;color:#4527A0;margin:0 0 10px}
.chips{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.chip{display:inline-block;padding:6px 14px;border-radius:20px;background:#ede7f6;color:#4527A0;text-decoration:none;font-weight:600;font-size:14px;border:1px solid #d1c4e9}
.chip:hover,.chip.on{background:#673AB7;color:#fff;border-color:#673AB7}
.mini-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
@media (min-width:600px){.mini-grid{grid-template-columns:repeat(3,1fr)}}
.mini{display:flex;align-items:center;gap:8px;background:#fff;border-radius:12px;padding:8px;text-decoration:none;box-shadow:0 2px 8px rgba(0,0,0,.08);font-weight:600;font-size:14px;text-align:right}
.mini:hover{box-shadow:0 4px 14px rgba(103,58,183,.25)}
.mini img{width:44px;height:44px;object-fit:contain;flex:none}

/* التذييل */
.sfoot{background:#4527A0;color:#ede7f6;text-align:center;padding:18px 12px 14px;margin-top:24px;font-size:14px}
.sfoot-links{display:flex;flex-wrap:wrap;justify-content:center;gap:6px 16px;margin-bottom:8px}
.sfoot a{color:#fff;text-decoration:none;font-weight:600}
.sfoot a:hover{text-decoration:underline}
.sfoot p{margin:4px 0}
.sfoot .copy{opacity:.85;font-size:13px}

/* ===== صفحة الكتاب (نفس التصميم الأصلي) ===== */
.pb{font-family:'Cairo',sans-serif;background:#f8f9fa;text-align:center;padding:0}
.topbar{display:flex;justify-content:space-between;align-items:center;gap:8px;background:#673AB7;color:#fff;padding:6px 12px}
.topbar a{color:#fff;text-decoration:none;font-weight:700;font-size:14px;display:inline-flex;align-items:center;gap:6px}
.topbar img{border-radius:6px;background:#fff}
.tb-grade{background:rgba(255,255,255,.15);padding:3px 12px;border-radius:15px}
.pb h1{color:#34495e;margin:10px 8px;font-size:20px;line-height:1.6}
.bk-card{max-width:800px;margin:0 auto;padding:0 5px}
.bk-cover{display:block;width:120px;height:120px;object-fit:contain;margin:4px auto 8px;filter:drop-shadow(0 6px 10px rgba(0,0,0,.15))}
.bk-table{margin:5px auto;width:98%;max-width:800px;border-collapse:separate;border-spacing:0;border-radius:15px;border:2px solid #6c5ce7;box-shadow:0 10px 20px rgba(0,0,0,.15);overflow:hidden}
.bk-table th,.bk-table td{padding:15px;font-weight:700;font-size:16px}
.bk-table th{background:linear-gradient(135deg,#6c5ce7,#0984e3);color:#fff;width:70px}
.bk-table tr:nth-child(even){background:#f2f4f8}
.bk-table tr:nth-child(odd){background:#fff}
.bk-table th i{font-size:30px;color:#fff;text-shadow:none}
@media (min-width:600px){.bk-table th,.bk-table td{padding:20px;font-size:18px}.bk-table th{width:100px}.bk-table th i{font-size:40px}}
.download-btn{background:#27ae60;color:#fff;padding:10px 20px;border-radius:8px;display:inline-block;text-decoration:none;margin:4px;box-shadow:0 4px 10px rgba(39,174,96,.35);transition:background .2s,transform .2s}
.download-btn:hover{background:#218c53;transform:translateY(-2px)}
.download-btn::before{content:"";display:inline-block;width:14px;height:14px;margin-left:8px;vertical-align:-2px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 20h14v-2H5v2zM19 9h-4V3H9v6H5l7 7 7-7z'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 20h14v-2H5v2zM19 9h-4V3H9v6H5l7 7 7-7z'/%3E%3C/svg%3E") center/contain no-repeat}
.dl-soon{color:#e67e22}
.small-links-container{margin:15px auto;display:flex;justify-content:center;gap:12px;flex-wrap:wrap;padding:0 8px}
.small-btn{padding:8px 15px;background:#0984e3;color:#fff;border-radius:25px;text-decoration:none;font-size:16px;font-weight:600;box-shadow:0 3px 8px rgba(0,0,0,.1);transition:.3s}
.telegram-btn{background:#0088cc}
.small-btn:hover{transform:translateY(-3px);opacity:.9}

/* النص التعريفي والأسئلة الشائعة (كما في التصميم الأصلي) */
.seo-wrap{max-width:820px;margin:25px auto 0;padding:0 8px;text-align:right}
.promo{background:#eafaf1;border-left:6px solid #1abc9c;padding:20px;border-radius:10px;margin-bottom:25px}
.promo h3{font-size:22px;color:#16a085;margin:0 0 10px}
.promo p,.promo h4{font-size:16px;color:#2c3e50;line-height:1.7;margin:0 0 12px}
.seo-qa{direction:rtl;text-align:right;max-width:800px;margin:0 auto;line-height:1.7}
.seo-qa h2{font-size:24px;color:#2c3e50;margin-bottom:20px;text-shadow:1px 1px rgba(0,0,0,.1)}
.qa-item{padding:20px;margin-bottom:25px;border-radius:12px;position:relative;overflow:hidden}
.qa-item h3{font-size:20px;margin:0 0 12px;display:flex;align-items:center}
.qa-item h3 i{margin-left:8px;font-size:24px;color:inherit}
.qa-item p{font-size:16px;margin:0 0 8px;color:#444}
.qa-item.style1{background:linear-gradient(135deg,#6c5ce7,#0984e3);color:#fff;box-shadow:0 4px 12px rgba(0,0,0,.2)}
.qa-item.style1 p{color:#fff;opacity:.95}
.qa-item.style1 a{color:#fff!important}
.qa-item.style2{background:#ecf0f1;border-left:6px solid #27ae60}.qa-item.style2 h3{color:#27ae60}
.qa-item.style3{background:#fff;border:2px dashed #e67e22}.qa-item.style3 h3{color:#e67e22}
.qa-item.style4{background:#fffbea;clip-path:polygon(0 0,100% 0,100% 85%,0% 100%);border:1px solid #f1c40f;padding-bottom:36px}.qa-item.style4 h3{color:#f39c12}
.qa-item.style5{background:#f5f7fa;border-radius:50px 10px 50px 10px;border:1px solid #8e44ad}.qa-item.style5 h3{color:#8e44ad}
.qa-item.style6{background:#fafafa;box-shadow:inset 0 0 10px rgba(0,0,0,.05);border-radius:5px}.qa-item.style6 h3{color:#16a085}
.page-contents{margin-top:30px;border-top:2px solid #dcdde1;padding-top:20px}
.page-contents h3{font-size:20px;color:#2c3e50;margin-bottom:10px}
.page-contents ul{list-style:disc inside;color:#2c3e50;padding:0}
@media (max-width:480px){.promo{padding:15px}.qa-item{padding:15px}.seo-qa h2{font-size:20px}.qa-item h3{font-size:18px}.promo h3{font-size:19px}}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}
