/* زين خير الله — Calligraphic Arabic Theme (RTL) */
@import url('https://fonts.googleapis.com/css2?family=Aref+Ruqaa+Ink:wght@400;700&family=Amiri:wght@400;700&family=Cairo:wght@400;600;700&display=swap');

:root{
  --bg: #07060b;
  --panel: rgba(255,255,255,.06);
  --panel2: rgba(255,255,255,.08);
  --border: rgba(255,255,255,.10);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.72);
  --muted2: rgba(255,255,255,.56);
  --gold: #d6b15e;
  --gold2:#f1d28a;
  --shadow: 0 18px 50px rgba(0,0,0,.45);
  --radius: 18px;
  --radius2: 26px;
}

*{ box-sizing:border-box; }
html, body{ height:100%; }
body{
  margin:0;
  background:
    radial-gradient(900px 500px at 15% 15%, rgba(214,177,94,.22), transparent 60%),
    radial-gradient(900px 500px at 80% 20%, rgba(96,180,255,.14), transparent 55%),
    radial-gradient(900px 500px at 50% 90%, rgba(64,220,170,.10), transparent 58%),
    linear-gradient(180deg, #07060b, #05040a 55%, #04040a);
  color:var(--text);
  font-family: "Cairo", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.75;
}

a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration: none; }

.container{
  width:min(1100px, 92vw);
  margin-inline:auto;
}

.topbar{
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter: blur(10px);
  background: rgba(7,6,11,.70);
  border-bottom:1px solid var(--border);
}

.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width: 240px;
}

.brand-avatar{
  width:42px;
  height:42px;
  border-radius: 14px;
  border:1px solid var(--border);
  box-shadow: var(--shadow);
  object-fit: cover;
}

.brand-title{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.brand-title .name{
  font-family: "Aref Ruqaa Ink", "Amiri", serif;
  font-weight:700;
  letter-spacing:.2px;
  font-size: 20px;
  line-height: 1.1;
}
.brand-title .tag{
  color: var(--muted2);
  font-size: 12.5px;
}

.menu-wrap{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-start;
}

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

.chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:9px 12px;
  border-radius: 999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--muted);
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
  font-size: 14px;
  white-space: nowrap;
}
.chip:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.16);
  color: var(--text);
}
.chip.active{
  background: rgba(214,177,94,.12);
  border-color: rgba(214,177,94,.35);
  color: var(--text);
}

.social{
  display:flex;
  gap:8px;
  align-items:center;
  padding-inline-start: 6px;
  border-inline-start: 1px solid rgba(255,255,255,.10);
  margin-inline-start: 6px;
}
@media (max-width: 720px){
  .social{
    border-inline-start: 0;
    margin-inline-start: 0;
    padding-inline-start: 0;
  }
}
.social a{
  width: 38px;
  height: 38px;
  display:grid;
  place-items:center;
  border-radius: 12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.social a:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.16);
}
.social svg{
  width: 18px;
  height: 18px;
  fill: rgba(255,255,255,.86);
}

.hero{
  padding: 58px 0 10px;
}
.hero-card{
  border:1px solid var(--border);
  border-radius: var(--radius2);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 30px 18px;
  position:relative;
  overflow:hidden;
  text-align:center;
}
.hero-card:before{
  content:"";
  position:absolute;
  inset:-2px;
  background: radial-gradient(650px 250px at 50% 0%, rgba(214,177,94,.18), transparent 60%);
  pointer-events:none;
}
.hero h1{
  margin:0 0 12px 0;
  font-family:"Aref Ruqaa Ink","Amiri",serif;
  font-size: clamp(40px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing:.2px;
}
.hero p{
  margin:0 auto 18px auto;
  color: var(--muted);
  font-size: 17px;
  max-width: 880px;
}
.actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  justify-content:center;
  margin-top: 16px;
}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding: 11px 14px;
  border-radius: 14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text);
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
  font-weight:600;
}
.btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.18);
}
.btn.primary{
  background: linear-gradient(180deg, rgba(214,177,94,.22), rgba(214,177,94,.10));
  border-color: rgba(214,177,94,.35);
}
.btn.primary:hover{
  border-color: rgba(214,177,94,.55);
}
.btn.ghost{ background: transparent; }

.section-title{
  margin: 22px 0 12px 0;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:10px;
}
.section-title h2{
  margin:0;
  font-size: 20px;
  color: var(--text);
}
.section-title p{
  margin:0;
  color: var(--muted2);
  font-size: 13px;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 6px 10px;
  border-radius: 999px;
  border:1px solid rgba(214,177,94,.35);
  background: rgba(214,177,94,.10);
  color: var(--text);
  font-size: 12px;
}
.meta{
  color: var(--muted2);
  font-size: 12.5px;
  margin-top: 8px;
}

.panel{
  border:1px solid var(--border);
  border-radius: var(--radius2);
  background: var(--panel);
  box-shadow: var(--shadow);
}

/* Carousel */
.carousel{
  border:1px solid var(--border);
  border-radius: var(--radius2);
  background: rgba(255,255,255,.04);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.carousel-track{
  display:flex;
  transition: transform .35s ease;
  will-change: transform;
}
.slide{
  min-width: 100%;
  display:grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 0;
  align-items:stretch;
}
@media (max-width: 900px){
  .slide{ grid-template-columns: 1fr; }
}

.slide-info{
  padding: 18px 18px 18px 18px;
}
.slide-info h3{
  margin: 10px 0 8px 0;
  font-size: 20px;
}
.slide-info p{
  margin:0 0 12px 0;
  color: var(--muted);
}
.slide-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.thumb{
  position:relative;
  width:100%;
  aspect-ratio: 16/9;
  background: #000;
  border-inline-start: 1px solid rgba(255,255,255,.08);
}
@media (max-width: 900px){
  .thumb{ border-inline-start:0; border-top: 1px solid rgba(255,255,255,.08); }
}
.thumb img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
  opacity: .92;
}
.thumb:after{
  content:"";
  position:absolute;
  inset:0;
  background: radial-gradient(320px 200px at 30% 20%, rgba(214,177,94,.18), transparent 65%),
              linear-gradient(180deg, rgba(0,0,0,.10), rgba(0,0,0,.55));
  pointer-events:none;
}
.play{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  pointer-events:none;
}
.play span{
  width: 58px;
  height: 58px;
  border-radius: 22px;
  border:1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.28);
  display:grid;
  place-items:center;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
}
.play svg{ width: 22px; height:22px; fill: rgba(255,255,255,.92); }

.carousel-controls{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding: 12px 14px;
  border-top:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
}
.dots{
  display:flex;
  gap:8px;
  align-items:center;
}
.dot{
  width: 10px; height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  cursor:pointer;
}
.dot.active{
  border-color: rgba(214,177,94,.55);
  background: rgba(214,177,94,.26);
}
.arrows{
  display:flex; gap:8px; align-items:center;
}
.iconbtn{
  width: 40px; height: 40px;
  display:grid; place-items:center;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
  cursor:pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.iconbtn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.16);
}
.iconbtn svg{
  width: 18px; height:18px;
  fill: rgba(255,255,255,.88);
}

/* Section listing */
.list{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 14px;
}
@media (max-width: 900px){
  .list{ grid-template-columns: 1fr; }
}

.postlist{
  border:1px solid var(--border);
  border-radius: var(--radius2);
  background: rgba(255,255,255,.04);
  overflow:hidden;
}
.post-item{
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.post-item:last-child{ border-bottom:0; }
.post-item h3{ margin: 10px 0 8px 0; font-size: 18px; }
.post-item p{ margin:0 0 12px 0; color: var(--muted); }

.pagination{
  margin-top: 14px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:center;
  align-items:center;
  direction: rtl;
}
.page-btn{
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 12px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  color: var(--text);
  cursor:pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.page-btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.20);
}
.page-btn.active{
  background: rgba(214,177,94,.20);
  border-color: rgba(214,177,94,.50);
}
.page-ellipsis{
  color: var(--muted2);
  padding: 0 4px;
}

.article{
  padding: 18px 16px 18px 16px;
  color: rgba(255,255,255,.88);
}
.article h2, .article h3{
  font-family:"Amiri","Aref Ruqaa Ink",serif;
  margin: 0 0 10px 0;
}
.article p{ margin: 0 0 12px 0; color: rgba(255,255,255,.86); }
.article ul, .article ol{ margin: 0 0 12px 0; padding-inline-start: 22px; color: rgba(255,255,255,.86); }

.embed{
  position:relative;
  width:100%;
  aspect-ratio: 16/9;
  background: #000;
  border-top: 1px solid rgba(255,255,255,.08);
}
.embed iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
}

hr.sep{
  border:0;
  height:1px;
  background: rgba(255,255,255,.10);
  margin: 14px 0;
}

.small-note{
  color: var(--muted2);
  font-size: 12.5px;
}

.footer{
  border-top:1px solid var(--border);
  padding: 18px 0;
  color: var(--muted2);
  font-size: 12.5px;
  margin-top: 30px;
}

/* Admin */
.form{
  display:grid;
  gap:10px;
}
input, select, textarea{
  width:100%;
  padding: 10px 12px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.22);
  color: rgba(255,255,255,.92);
  outline: none;
}
textarea{ min-height: 140px; resize: vertical; }
label{ color: var(--muted2); font-size: 13px; }
.table{
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: 18px;
  border:1px solid rgba(255,255,255,.10);
}
.table th, .table td{
  padding: 10px 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  text-align:right;
  vertical-align: top;
  font-size: 13.5px;
}
.table th{ color: rgba(255,255,255,.86); background: rgba(255,255,255,.04); }
.table tr:last-child td{ border-bottom:0; }
.codebox{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12.5px;
}


/* Books page */
.book-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 700px){ .book-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px){ .book-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.book-card{
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  border-radius: 22px;
  overflow:hidden;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
  box-shadow: 0 18px 50px rgba(0,0,0,.22);
}
.book-card:hover{
  transform: translateY(-2px);
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.16);
}
.book-cover{
  height: 150px;
  background:
    radial-gradient(260px 120px at 35% 0%, rgba(214,177,94,.18), transparent 65%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border-bottom: 1px solid rgba(255,255,255,.08);
  display:grid;
  place-items:center;
  position:relative;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
}
.book-cover img{
  width:100%;
  height:100%;
  object-fit: cover;
  border-radius: inherit;
  display:block;
}
.book-cover .mark{
  width: 62px; height: 62px;
  border-radius: 24px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.20);
  display:grid;
  place-items:center;
  font-size: 26px;
}
.book-body{
  padding: 14px 14px 16px 14px;
}
.book-title{
  margin: 10px 0 6px 0;
  font-size: 16px;
}
.book-title a{
  color: inherit;
  text-decoration: none;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
  transition: text-shadow .18s ease, text-decoration-color .18s ease;
}
.book-title a:hover,
.book-title a:focus-visible{
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,.85);
  text-shadow: 0 0 10px rgba(255,255,255,.18);
}
.book-meta{
  color: rgba(255,255,255,.56);
  font-size: 12.5px;
  margin-bottom: 10px;
}
.book-desc{
  color: rgba(255,255,255,.72);
  font-size: 13px;
  margin:0 0 12px 0;
}
.book-tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.book-tag{
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
  color: rgba(255,255,255,.78);
}


/* Mobile menu */
.hamburger{
  display:none;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
  color: rgba(255,255,255,.92);
  cursor:pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
  align-items:center;
  justify-content:center;
}
.hamburger:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.16);
}
.hamburger svg{ width: 18px; height: 18px; fill: rgba(255,255,255,.88); }

.mobile-drawer{
  display:none;
  position: fixed;
  top: 0;
  inset-inline-end: 0;
  height: 100vh;
  width: min(360px, 92vw);
  background: rgba(7,6,11,.92);
  border-inline-start: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(12px);
  box-shadow: 0 30px 90px rgba(0,0,0,.6);
  z-index: 100;
  padding: 14px;
  transform: translateX(110%);
  transition: transform .22s ease;
}
.mobile-drawer .drawer-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  margin-bottom: 12px;
}
.mobile-drawer .drawer-title{
  font-family:"Aref Ruqaa Ink","Amiri",serif;
  font-size: 20px;
}
.mobile-drawer nav{
  display:grid;
  gap:10px;
  margin-top: 12px;
}
.mobile-drawer .chip{
  justify-content:flex-start;
  padding: 12px 14px;
  font-size: 15px;
}
.mobile-drawer .social{
  border:0;
  margin: 14px 0 0 0;
  padding:0;
}

.backdrop{
  display:none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 90;
}

body.menu-open .mobile-drawer{
  transform: translateX(0);
}
body.menu-open .backdrop{
  display:block;
}

@media (max-width: 900px){
  /* Hide desktop menu on mobile */
  .menu-wrap{ display:none; }
  .hamburger{ display:inline-flex; }
  .mobile-drawer{ display:block; }
}

/* Carousel hint */
.readmore-hint{
  margin-top: 10px;
  color: rgba(255,255,255,.72);
  font-size: 13px;
  display:inline-flex;
  gap:8px;
  align-items:center;
}
.readmore-hint .arrow{
  width: 22px; height: 22px;
  border-radius: 10px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
  display:grid;
  place-items:center;
}
.readmore-hint svg{ width: 14px; height:14px; fill: rgba(255,255,255,.86); }
