/* Gutenberg Digital Publishing - site styles (RTL-first)
   Loaded from: /public/css/app.css
*/

:root{
  --bg: #f5f1e8;
  --card: #ffffff;
  --text: #141414;
  --muted: rgba(0,0,0,.68);
  --border: rgba(0,0,0,.12);
  --shadow: 0 1px 2px rgba(0,0,0,.06);
  --radius: 18px;
  --container: 1280px;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  font-family: "Tajawal", system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Naskh Arabic", "Noto Kufi Arabic", sans-serif;
  line-height: 1.75;
}

html[dir="ltr"] body{
  direction: ltr;
}

img{ max-width: 100%; height: auto; display: block; }

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

.container{
  width: min(var(--container), calc(100% - 32px));
  margin-inline: auto;
}

/* Header */
.site-header{
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.25);
  backdrop-filter: blur(8px);
}

.header-inner{
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  padding: 18px 0;
}

.logo{
  display: inline-flex;
  align-items: center;
}

.logo img{
  height: 78px;
  width: auto;
  max-width: 260px;
  object-fit: contain;
}

.nav{
  margin-inline-start: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.nav a{
  font-size: 19px;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 12px;
  color: rgba(0,0,0,.82);
}

.nav a:hover{
  background: rgba(0,0,0,.06);
  text-decoration: none;
}

.nav a.active{
  background: rgba(0,0,0,.10);
}

.nav .lang-pill{
  font-size: 14px;
  font-weight: 800;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.20);
  background: rgba(255,255,255,.55);
  margin-inline-start: auto;
  order: 1;
}


/* Main + Sticky footer */
main{
  flex: 1;
  padding: 44px 0 52px;
}

/* Hero */
.hero{
  text-align: center;
  padding: 58px 0 34px;
}

.hero h1{
  margin: 0 0 12px;
  font-size: clamp(32px, 3.6vw, 56px);
  line-height: 1.2;
  letter-spacing: .2px;
}

.hero p{
  margin: 0 auto;
  max-width: 80ch;
  font-size: clamp(16px, 1.25vw, 20px);
  color: var(--muted);
}

.hero .cta{
  margin-top: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.25);
  background: #111;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
}

.hero .cta:hover{
  filter: brightness(.98);
  text-decoration: none;
}

/* Titles */
.page-title{
  text-align: center;
  margin: 0 0 8px;
  font-size: clamp(28px, 2.4vw, 36px);
}

.page-subtitle{
  text-align: center;
  margin: 0 0 26px;
  color: var(--muted);
}

/* Generic card */
.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.card + .card{ margin-top: 16px; }

/* Prose blocks (About / Contact) */
.prose{
  text-align: start;
  font-family: "Noto Naskh Arabic", "Tajawal", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.9;
}

.prose h2, .prose h3{
  margin: 0 0 8px;
  font-family: "Tajawal", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 800;
  font-size: 22px;
}

.prose p{
  margin: 0 0 16px;
  color: rgba(0,0,0,.82);
}

.prose a{ text-decoration: underline; }

/* Archive grid */
.archive-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  align-items: stretch;
}

.card .cover{
  height: 220px;
  border: 1px solid rgba(0,0,0,.08);
  background: #fafafa;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  margin-bottom: 14px;
  overflow: hidden;
}

.card .cover img{
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.card h3{
  margin: 0 0 8px;
  font-size: 22px;
}

.card .meta{
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

/* Buttons */
.actions{
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.25);
  background: #fff;
  color: #111;
  font-size: 15px;
  font-weight: 700;
  min-width: 120px;
}

.btn.primary{
  background: #111;
  color: #fff;
  border-color: #111;
}

.btn:hover{
  filter: brightness(.98);
  text-decoration: none;
}

/* Reader iframe */
.reader-frame{
  width: 100%;
  height: min(78vh, 900px);
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* Magazine page */
.magazine{
  display: grid;
  gap: 28px;
}

.magazine-header{
  text-align: center;
}

.magazine-header h1{
  margin: 0 0 8px;
  font-size: clamp(28px, 2.8vw, 42px);
}

.magazine-years{
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.14);
  background: rgba(255,255,255,.55);
  color: rgba(0,0,0,.75);
  font-size: 14px;
  font-weight: 700;
}

.magazine-description{
  margin: 14px auto 0;
  max-width: 85ch;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.9;
  font-family: "Noto Naskh Arabic", "Tajawal", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.issues h2{
  text-align: center;
  margin: 0 0 16px;
  font-size: 24px;
}

.issues-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.issue-card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
  text-align: center;
  display: grid;
  gap: 6px;
}

.issue-number{
  font-weight: 800;
  font-size: 16px;
}

.issue-year{
  font-size: 14px;
  color: var(--muted);
}

/* Footer */
.site-footer{
  border-top: 1px solid var(--border);
  padding: 22px 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* Responsive */
@media (max-width: 720px){
  .container{ width: min(var(--container), calc(100% - 24px)); }
  .header-inner{
    /* flex-direction: column; */
    align-items: center;
    padding: 10px 0;
  }
  .logo img{ height: 64px; }
  .nav{ justify-content: center; gap: 25px;}
  .nav a{ font-size: 17px; padding: 9px 12px; }
  main{ padding: 32px 0 40px; }
  .hero{ padding: 44px 0 24px; }
  .card .cover{ height: 200px; }
  .prose{ font-size: 17px; }
  .header-inner{justify-content: space-between; }
  .navbar-collapse {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s ease;
}
.nav .lang-pill {
  order: 0 !important;
}
.navbar-nav .nav-item {
  margin-bottom: 15px !important;
  padding: 10px 14px !important;
  border-radius: 12px !important;
  background: rgba(0,0,0,.06) !important;
  color: rgba(0,0,0,.82) !important;
  font-size: 19px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  text-align: center !important;
  display: block !important;
}
.navbar-nav .nav-item .active {
  background: rgba(0,0,0,.10) !important;
  color: rgba(0,0,0,.82) !important;
  font-size: 19px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  text-align: center !important;
  display: block !important;
}
.navbar-nav .nav-item:hover {
  background: rgba(0,0,0,.06) !important;
  color: rgba(0,0,0,.82) !important;
  font-size: 19px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  text-align: center !important;
  display: block !important;
}
.navbar-nav .nav-item:active {
  background: rgba(0,0,0,.10) !important;
  color: rgba(0,0,0,.82) !important;
  font-size: 19px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  text-align: center !important;
  display: block !important;
}
}
