/* TakBook independent theme — RTL-first visual system. */
@font-face{font-family:BYekan;src:url("fonts/BYekan.woff") format("woff"),url("fonts/BYekan.ttf") format("truetype"),url("fonts/BYekan.eot") format("embedded-opentype");font-style:normal;font-weight:400;font-display:swap}
:root{--tkb-brand:#8558aa;--tkb-ink:#272331;--tkb-bg:#f7f5f9;--tkb-border:#e9e4ed;--tkb-wrap:1200px;--tkb-font-scale:1}
html{direction:rtl;scroll-behavior:smooth}
body.tkb-site{font-family:BYekan,Tahoma,sans-serif;font-size:calc(16px * var(--tkb-font-scale,1));color:var(--tkb-ink);background:#fff;margin:0}
.tkb-wrap{width:min(var(--tkb-wrap),calc(100% - 36px));margin-inline:auto}
.tkb-header{--tkb-brand:#8558aa;position:relative;z-index:20;background:#fff;color:var(--tkb-ink);border-bottom:1px solid var(--tkb-border)}
.tkb-header a{text-decoration:none}
.tkb-utility{height:36px;min-height:36px;background:#f5f5f5;color:#666;font-size:13px;line-height:1}
.tkb-utility>.tkb-wrap,.tkb-utility .tkb-wrap{height:36px;display:flex;align-items:center;justify-content:space-between;gap:18px}
.tkb-utility-right,.tkb-utility-left{display:flex;align-items:center;gap:14px;min-width:0}
.tkb-utility a{color:#666;font-size:13px;white-space:nowrap}
.tkb-utility a:hover{color:var(--tkb-brand)}
.tkb-social-link{display:inline-flex;align-items:center}
.tkb-main-head{height:88px;min-height:88px;background:#fff}
.tkb-main-head>.tkb-wrap,.tkb-main-head .tkb-wrap{height:88px;display:grid;grid-template-columns:minmax(170px,1fr) minmax(320px,var(--tkb-search-width,560px)) minmax(170px,1fr);align-items:center;gap:24px}
.tkb-logo{grid-column:1;justify-self:start;display:inline-flex;align-items:center;max-width:100%;color:var(--tkb-brand);font-size:1.45rem;font-weight:700;white-space:nowrap}
.tkb-logo .custom-logo-link{display:inline-flex;align-items:center}
.tkb-logo img,.tkb-logo .custom-logo{display:block;width:auto;max-width:230px;max-height:58px;object-fit:contain}
.tkb-search{display:flex;align-items:stretch;min-width:0;height:40px;border:1px solid #e0e0e0;border-radius:8px;overflow:hidden;background:#fff}
.tkb-search-desktop{grid-column:2;justify-self:center;width:100%;max-width:var(--tkb-search-width,560px)}
.tkb-search input{flex:1;min-width:0;width:100%;height:40px;padding:0 14px;border:0;outline:0;background:#fff;color:var(--tkb-ink);font:inherit;font-size:14px}
.tkb-search input::placeholder{color:#888;opacity:1}
.tkb-search button{flex:0 0 auto;min-width:88px;height:40px;padding:0 16px;border:0;border-radius:0;background:var(--tkb-brand);color:#fff;font:inherit;font-size:13px;cursor:pointer}
.tkb-search button:hover{filter:brightness(.94)}
.tkb-head-actions{grid-column:3;justify-self:end;display:flex;align-items:center;gap:16px;white-space:nowrap}
.tkb-head-actions a,.tkb-account-link{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:0 12px;color:#555;font-size:14px}
.tkb-vip-link{border-radius:8px;background:var(--tkb-brand);color:#fff!important;font-weight:700}
.tkb-vip-link:hover{filter:brightness(.93)}
.tkb-vip-status{display:inline-flex;align-items:center;color:#287a48;font-size:13px}
.tkb-vip-status .tkb-vip-status{font-size:13px}
.tkb-menu-toggle,.tkb-mobile-search-toggle{display:none}
.tkb-navigation{height:48px;min-height:48px;background:var(--tkb-brand);color:#fff}
.tkb-navigation>.tkb-wrap,.tkb-navigation .tkb-wrap{height:48px;display:flex;align-items:stretch}
.tkb-menu,.tkb-menu ul{display:flex;align-items:stretch;gap:0;list-style:none;margin:0;padding:0}
.tkb-menu>li{position:relative;display:flex;align-items:stretch;height:48px}
.tkb-menu>li+li{border-inline-start:1px solid rgba(255,255,255,.22)}
.tkb-menu>li>a{position:relative;display:flex;align-items:center;min-height:48px;padding:0 17px;color:#fff;font-size:12px;font-weight:700;line-height:1.5}
.tkb-menu>li>a:hover,.tkb-menu>li>a:focus-visible{background:rgba(255,255,255,.12);color:#fff}
.tkb-menu>li.current-menu-item>a:after,.tkb-menu>li.current-menu-ancestor>a:after,.tkb-menu>li.current_page_item>a:after{content:"";position:absolute;right:12px;left:12px;bottom:0;height:3px;background:#fff}
.tkb-menu .sub-menu{display:none;position:absolute;top:100%;right:0;z-index:1000;min-width:220px;margin:0;padding:8px 0;list-style:none;background:#fff;border:1px solid var(--tkb-border);border-radius:0 0 8px 8px;box-shadow:0 10px 24px rgba(25,18,32,.14)}
.tkb-menu .menu-item-has-children:hover>.sub-menu,.tkb-menu .menu-item-has-children:focus-within>.sub-menu{display:block}
.tkb-menu .sub-menu li{position:relative}
.tkb-menu .sub-menu a{display:block;padding:10px 14px;color:#37313d;font-size:13px;font-weight:400;white-space:nowrap}
.tkb-menu .sub-menu a:hover,.tkb-menu .sub-menu a:focus-visible{background:#f5f0f8;color:var(--tkb-brand)}
.tkb-skip{position:absolute;right:-9999px;top:auto;z-index:10010}
.tkb-skip:focus{right:12px;top:12px;background:#fff;color:#222;padding:12px;border:2px solid var(--tkb-brand);border-radius:6px}
.tkb-header a:focus-visible,.tkb-header button:focus-visible,.tkb-header input:focus-visible{outline:3px solid #f0b429;outline-offset:2px}
.tkb-drawer,.tkb-drawer-backdrop{display:none}
body.tkb-drawer-open{overflow:hidden}

/* Main site content */
.tkb-content{min-height:55vh;padding-block:30px}
.tkb-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:28px}
.tkb-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}
.tkb-card{min-width:0;padding:14px;background:#fff;border:1px solid var(--tkb-border);border-radius:10px}
.tkb-card-cover,.tkb-cover{display:flex;aspect-ratio:3/4;background:#f4f1f6;align-items:center;justify-content:center;overflow:hidden}
.tkb-card-cover img,.tkb-cover img{width:100%;height:100%;object-fit:contain}
.tkb-card h2{font-size:1.05rem;line-height:1.8}
.tkb-card h2 a{color:inherit;text-decoration:none}
.tkb-card p,.tkb-entry-content{line-height:2.1}
.tkb-read-more{color:var(--tkb-brand)}
.tkb-single,.tkb-page,.tkb-listing{max-width:var(--tkb-wrap);margin-inline:auto}
.tkb-entry-head{margin-bottom:22px}
.tkb-entry-meta{color:#756d7d}
.tkb-book-layout{display:grid;grid-template-columns:minmax(180px,260px) minmax(0,1fr);gap:24px;align-items:start}
.tkb-book-facts,.tkb-book-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.tkb-book-facts p,.tkb-book-meta div{padding:10px;background:var(--tkb-bg);border-radius:7px;margin:0}
.tkb-download-box{padding:20px;background:var(--tkb-bg);border:1px solid #e7deef;border-radius:12px;margin:20px 0}
.tkb-download-box .tkb-button{display:inline-block;margin:8px}
.tkb-button{border:0;border-radius:8px;background:var(--tkb-brand);color:#fff;padding:10px 17px;font:inherit;text-decoration:none;cursor:pointer}
.tkb-demo{background:#555}
.tkb-notice,.tkb-stopped{color:#8b341e}
.tkb-buy{margin-inline:12px}
.tkb-footer{padding:28px 0;background:#282331;color:#fff}
.tkb-footer .tkb-wrap{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap}
.tkb-footer a{color:#fff}
.tkb-footer-menu{display:flex;gap:18px;list-style:none}
.tkb-empty,.tkb-not-found{text-align:center;padding:80px 10px}

/* Mobile header and right-side drawer */
@media(max-width:768px){
 .tkb-utility,.tkb-navigation{display:none}
 .tkb-main-head{height:56px;min-height:56px;background:var(--tkb-brand)}
 .tkb-main-head>.tkb-wrap,.tkb-main-head .tkb-wrap{height:56px;display:flex;align-items:center;justify-content:space-between;gap:0;position:relative}
 .tkb-menu-toggle,.tkb-mobile-search-toggle{display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;padding:0;border:0;border-radius:8px;background:transparent;color:#fff;font-size:27px;line-height:1;cursor:pointer}
 .tkb-logo{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);justify-self:auto;max-width:60%;color:#fff;font-size:1.15rem}
 .tkb-logo img,.tkb-logo .custom-logo{max-width:170px;max-height:36px}
 .tkb-search-desktop,.tkb-head-actions{display:none}
 .tkb-mobile-search-toggle{font-size:31px;font-weight:400}
 .tkb-drawer{display:flex;flex-direction:column;position:fixed;z-index:10002;top:0;right:0;bottom:0;width:85%;max-width:420px;box-sizing:border-box;padding:18px 18px 22px;background:#fff;color:#292431;direction:rtl;overflow-y:auto;overscroll-behavior:contain;transform:translateX(105%);transition:transform .2s ease}
 .tkb-drawer.is-open{transform:translateX(0)}
 .tkb-drawer-backdrop:not([hidden]){display:block;position:fixed;z-index:10001;inset:0;background:rgba(0,0,0,.5)}
 .tkb-drawer-head{display:flex;align-items:center;justify-content:space-between;min-height:48px;margin-bottom:12px;font-weight:700}
 .tkb-drawer-close{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;border:0;border-radius:8px;background:#f3eff6;color:#33263d;font-size:28px;cursor:pointer}
 .tkb-search-mobile{display:flex;width:100%;height:44px;margin:8px 0 16px}
 .tkb-search-mobile input{height:44px}
 .tkb-search-mobile button{height:44px;min-width:76px;padding-inline:10px}
 .tkb-mobile-menu,.tkb-mobile-menu ul{display:block;list-style:none;margin:0;padding:0}
 .tkb-mobile-menu>li{position:relative;border-bottom:1px solid #eee9f1}
 .tkb-mobile-menu a{display:flex;align-items:center;min-height:48px;padding:8px 4px;color:#302a36;font-size:14px;text-decoration:none}
 .tkb-mobile-menu a:hover,.tkb-mobile-menu a:focus-visible{color:var(--tkb-brand)}
 .tkb-mobile-menu .menu-item-has-children>a{width:calc(100% - 52px);box-sizing:border-box}
 .tkb-submenu-toggle{position:absolute;left:0;top:2px;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border:0;border-radius:6px;background:transparent;color:var(--tkb-brand);font-size:20px;cursor:pointer}
 .tkb-submenu-toggle[aria-expanded="true"]{transform:rotate(180deg)}
 .tkb-mobile-menu .sub-menu{padding:0 14px 8px;border-inline-start:2px solid #e9dff1;margin-inline-start:8px}
 .tkb-mobile-menu .sub-menu[hidden]{display:none!important}
 .tkb-mobile-menu .sub-menu a{min-height:42px;font-size:13px}
 .tkb-drawer-account{display:flex;flex-direction:column;gap:10px;margin-top:auto;padding-top:22px}
 .tkb-drawer-account-link,.tkb-drawer-vip{display:flex;align-items:center;justify-content:center;min-height:48px;width:100%;box-sizing:border-box;border-radius:8px;background:var(--tkb-brand);color:#fff!important;font-weight:700}
 .tkb-drawer-vip{background:#f2eafa;color:var(--tkb-brand)!important}
 .tkb-drawer-vip-status{display:block;text-align:center;color:#287a48;padding:8px}
 .tkb-layout{grid-template-columns:1fr}
 .tkb-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
 .tkb-footer .tkb-wrap{display:block}
 .tkb-footer-menu{padding:12px 0;flex-wrap:wrap}
}
@media(max-width:390px){
 .tkb-wrap{width:calc(100% - 24px)}
 .tkb-grid{gap:10px}
 .tkb-card{padding:9px}
 .tkb-book-layout{grid-template-columns:1fr}
 .tkb-book-layout>.tkb-cover{max-width:220px;margin-inline:auto}
 .tkb-book-facts,.tkb-book-meta{grid-template-columns:1fr}
}
@media(max-width:360px){
 .tkb-logo img,.tkb-logo .custom-logo{max-width:145px}
 .tkb-drawer{width:85%;padding-inline:14px}
 .tkb-search-mobile button{min-width:68px;font-size:12px}
}
@media(min-width:769px) and (max-width:1024px){
 .tkb-main-head>.tkb-wrap,.tkb-main-head .tkb-wrap{grid-template-columns:minmax(140px,1fr) minmax(280px,520px) minmax(140px,1fr);gap:14px}
 .tkb-head-actions{gap:6px}
 .tkb-head-actions a{padding-inline:8px}
 .tkb-menu>li>a{padding-inline:12px}
 .tkb-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(prefers-reduced-motion:reduce){
 html{scroll-behavior:auto}
 .tkb-drawer{transition:none}
}
