/* CELAAN — Modern Redesign */

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

:root {
  --gold: #C9A84C;
  --gold-light: #E8C97A;
  --gold-dark: #9B7A2F;
  --text: #1A1A1A;
  --text-muted: #555;
  --bg: #FAFAF7;
  --bg-card: #FFFFFF;
  --border: #E0D9C8;
  --header-bg: #ffffff;
  --footer-bg: #111010;
  --nav-hover: #C9A84C;
  --font-serif: 'Georgia', 'Times New Roman', serif;
  --font-sans: 'Helvetica Neue', Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

/* ─── HEADER ─────────────────────────────────────────────── */
header {
  background: var(--header-bg);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border-bottom: 1px solid #e8dfc8;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

/* ─── LOGO LOCKUP ────────────────────────────────────────── */
.site-logo-link {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.site-logo-img {
  width: 68px;
  height: 68px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(201,168,76,0.35);
  padding: 3px;
  background: #fff;
}

.site-logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-title {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  font-weight: 700;
  color: #1a1208;
  letter-spacing: 0.1em;
  text-decoration: none;
  line-height: 1;
  font-style: italic;
}

.site-tagline {
  font-size: 0.62rem;
  color: #8a6a1a;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
}

.site-subtitle {
  display: none;
}

.site-acronyms {
  font-size: 0.6rem;
  color: var(--gold-dark);
  text-align: center;
  letter-spacing: 0.05em;
  line-height: 1.6;
  margin-top: 0;
}

/* ─── NAV ─────────────────────────────────────────────────── */
nav {
  width: 100%;
  margin-top: 14px;
}

nav ul {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
}

nav ul li a {
  display: block;
  padding: 12px 18px;
  color: #3a2a10;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
  position: relative;
}

nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 18px; right: 18px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.2s;
}

nav ul li a:hover,
nav ul li a.active {
  color: var(--gold);
}

nav ul li a:hover::after,
nav ul li a.active::after {
  transform: scaleX(1);
}

/* ── Nav dropdown ── */
.nav-dropdown { position: relative; }
nav ul .nav-sub {
  display: none !important;
  position: absolute;
  top: 100%;
  left: 0;
  background: #18140a;
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 0 0 5px 5px;
  min-width: 180px;
  z-index: 8500;
  padding: 4px 0;
  flex-direction: column;
  gap: 0;
  flex-wrap: nowrap;
  justify-content: flex-start;
}
nav ul .nav-dropdown:hover .nav-sub { display: flex !important; }
nav ul .nav-sub li { list-style: none; width: 100%; }
nav ul .nav-sub li a {
  display: block;
  padding: 10px 18px;
  font-size: 0.8rem;
  color: #ccc;
  white-space: nowrap;
  border-bottom: 1px solid rgba(201,168,76,0.08);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
nav ul .nav-sub li:last-child a { border-bottom: none; }
nav ul .nav-sub li a:hover { color: var(--gold); background: rgba(201,168,76,0.07); }
nav ul .nav-sub li a::after { display: none !important; }
.nav-sub-desc {
  display: block;
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #888;
  margin-top: 2px;
  line-height: 1.3;
  white-space: normal;
  max-width: 200px;
}

/* ─── MAIN ────────────────────────────────────────────────── */
main {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding: 48px 24px;
}

/* ─── PAGE HERO BANNER ───────────────────────────────────── */
.page-banner {
  background: linear-gradient(135deg, #1a1208 0%, #2d200a 100%);
  border-bottom: 3px solid var(--gold);
  padding: 40px 24px;
  text-align: center;
  color: white;
  margin-bottom: 0;
}

.page-banner h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--gold-light);
  letter-spacing: 0.1em;
}

.page-banner p {
  color: #bbb;
  margin-top: 8px;
  font-size: 0.9rem;
}

/* ─── SECTION TITLE ──────────────────────────────────────── */
.section-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--gold-dark);
  border-bottom: 2px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 28px;
  letter-spacing: 0.04em;
}

/* ─── CARD ────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 32px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* ─── ISSUE GRID ─────────────────────────────────────────── */
.issues-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 28px;
  margin-top: 32px;
}

.issue-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s;
}

.issue-card:hover { transform: translateY(-4px); }

.issue-cover {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid var(--border);
  box-shadow: 0 3px 12px rgba(0,0,0,0.12);
  background: #e8e0d0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.issue-cover-placeholder {
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: 3px;
  border: 1px solid var(--border);
  box-shadow: 0 3px 12px rgba(0,0,0,0.12);
  background: linear-gradient(160deg, #2d200a 0%, #1a1208 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  gap: 6px;
}

.issue-cover-placeholder .vol {
  font-family: var(--font-serif);
  font-size: 0.75rem;
  color: var(--gold-light);
  letter-spacing: 0.12em;
  text-align: center;
}

.issue-cover-placeholder .celaan-mini {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--gold);
  font-weight: bold;
  letter-spacing: 0.2em;
}

.issue-label {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.issue-title {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 3px;
  font-style: italic;
}

/* ─── PERSON LIST ────────────────────────────────────────── */
.person-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.person-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--text);
}

.person-list li:last-child { border-bottom: none; }

.person-list li .inst {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ─── ROLE BLOCK ─────────────────────────────────────────── */
.role-block {
  margin-bottom: 36px;
}

.role-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold-dark);
  margin-bottom: 8px;
}

.role-name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 4px;
}

.role-affil {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.role-email {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: var(--gold-dark);
  text-decoration: none;
  font-size: 0.85rem;
}

.role-email:hover { color: var(--gold); text-decoration: underline; }

/* ─── CONTACT BLOCK ──────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9rem;
}

.contact-icon {
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ─── PROSE ──────────────────────────────────────────────── */
.prose p {
  margin-bottom: 16px;
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text);
}

.prose p:last-child { margin-bottom: 0; }

.prose a { color: var(--gold-dark); text-decoration: underline; }
.prose a:hover { color: var(--gold); }

/* ─── FOOTER ─────────────────────────────────────────────── */
footer {
  background: var(--footer-bg);
  color: #999;
  padding: 40px 24px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}

.footer-col h4 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin-bottom: 14px;
  font-weight: 600;
}

.footer-col p, .footer-col a, .footer-col li {
  font-size: 0.82rem;
  color: #999;
  line-height: 1.7;
  text-decoration: none;
}

.footer-col a:hover { color: var(--gold-light); }

.footer-col ul { list-style: none; }

.footer-bottom {
  max-width: 1100px;
  margin: 24px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.75rem;
  color: #666;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ─── UTILITY ────────────────────────────────────────────── */
.gold { color: var(--gold); }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-8 { margin-top: 2rem; }

/* ─── RESPONSIVE ─────────────────────────────────────────── */

/* Tablet */
@media (max-width: 860px) {
  .site-title { font-size: 2.2rem; }

  /* Editorial page two-col → single col */
  main > div[style*="grid-template-columns: 1fr 1fr"] {
    display: block !important;
  }
  main > div[style*="grid-template-columns: 1fr 1fr"] > * + * {
    margin-top: 24px;
  }

  /* Latest issue featured card: stack cover + text */
  .card[style*="grid-template-columns: 180px 1fr"] {
    display: block !important;
  }
  .card[style*="grid-template-columns: 180px 1fr"] > *:first-child {
    max-width: 160px;
    margin: 0 auto 20px;
  }
}

/* Hamburger button (hidden on desktop) */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(201,168,76,0.4);
  border-radius: 4px;
  padding: 7px 10px;
  cursor: pointer;
  margin: 8px auto 0;
  flex-direction: column;
  gap: 4px;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--gold);
  border-radius: 1px;
  transition: all 0.2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

nav ul.nav-open { display: flex; }

/* Mobile */
@media (max-width: 640px) {
  .site-title { font-size: 1.7rem; letter-spacing: 0.12em; }
  .site-subtitle { font-size: 0.65rem; }

  /* Hamburger */
  .nav-toggle { display: flex; }
  nav ul {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 0;
    background: #1a1a1a;
    border-top: 1px solid rgba(201,168,76,0.15);
  }
  nav ul li a { padding: 12px 20px; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 0.8rem; }
  nav ul li a::after { display: none; }
  nav ul li a.active, nav ul li a:hover { background: rgba(201,168,76,0.08); }

  /* Main padding */
  main { padding: 24px 16px; }

  /* Cards */
  .card { padding: 20px 18px; }

  /* Page banner */
  .page-banner { padding: 28px 16px; }
  .page-banner h1 { font-size: 1.5rem; }

  /* Issues grid: 2 columns on mobile */
  .issues-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  /* Featured issue card: stack */
  .card[style*="grid-template-columns: 180px 1fr"] {
    display: block !important;
  }
  .card[style*="grid-template-columns: 180px 1fr"] > *:first-child {
    max-width: 140px;
    margin: 0 auto 18px;
  }

  /* Editorial two-col → single */
  main > div[style*="grid-template-columns: 1fr 1fr"] {
    display: block !important;
  }
  main > div[style*="grid-template-columns: 1fr 1fr"] > * + * {
    margin-top: 20px;
  }

  /* Section title */
  .section-title { font-size: 1.15rem; }

  /* Footer grid → single col */
  .footer-inner { grid-template-columns: 1fr; gap: 20px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 4px; }

  /* Video/resource grids */
  div[style*="grid-template-columns: repeat(auto-fill, minmax(300px"] {
    grid-template-columns: 1fr !important;
  }
  div[style*="grid-template-columns: repeat(auto-fit, minmax(240px"] {
    grid-template-columns: 1fr !important;
  }
  div[style*="grid-template-columns: repeat(auto-fit, minmax(280px"] {
    grid-template-columns: 1fr !important;
  }
}

/* ── Arabic / RTL font support ── */
html[dir="rtl"] {
  font-family: 'Segoe UI', 'Tahoma', 'Arial Unicode MS', var(--font-sans);
}
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] .section-title {
  font-family: 'Segoe UI', 'Tahoma', Georgia, serif;
}
html[dir="rtl"] .site-tagline,
html[dir="rtl"] .site-title {
  font-family: 'Segoe UI', 'Tahoma', var(--font-sans);
}
