@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Arabic:wght@400;500;700;800&display=swap');

:root {
  --bg: #f5f1e8;
  --panel: #fbf8f2;
  --soft: #efe6d6;
  --dark: #15110e;
  --dark-2: #1f1a16;
  --line: #cfc3b0;
  --text: #211c17;
  --muted: #6d6256;
  --accent: #9b6a29;
  --accent-dark: #7c531f;
  --white: #fff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

html,
body {
  margin: 0;
  padding: 0;
  font-family: 'Noto Sans Arabic', Tahoma, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  line-height: 1.85;
}

body,
button,
input,
textarea,
select,
a,
p,
h1,
h2,
h3,
h4,
h5,
h6,
span,
div,
li,
label,
small {
  font-family: 'Noto Sans Arabic', Tahoma, Arial, sans-serif;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }

.topbar {
  background: #171411;
  color: #d4cbc1;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: 13px;
}
.topbar .container {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 0;
}

.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(31,26,22,.95);
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
}
.header .container {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 16px 0;
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--white); }
.brand-mark {
  width: 48px; height: 48px; border: 1px solid #4e4338; display:flex; align-items:center; justify-content:center;
  background: rgba(0,0,0,.25); font-size: 20px;
}
.brand-title { font-size: 20px; font-weight: 700; }
.brand-sub { font-size: 12px; color: #aaa095; }

.nav { display: flex; flex-wrap: wrap; gap: 20px; color: #ddd1c4; font-size: 14px; }
.nav a:hover, .nav a.active { color: var(--white); }

.hero {
  position: relative; min-height: 62vh; overflow: hidden; color: var(--white);
  background: var(--dark);
}
.hero img.bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .28; filter: grayscale(100%) sepia(30%);
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(15,12,10,.96) 15%, rgba(15,12,10,.75) 48%, rgba(15,12,10,.55) 100%);
}
.hero .container {
  position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: end;
  min-height: 62vh; padding: 72px 0;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.07); color: #e4ddd4; font-size: 12px; letter-spacing: .18em;
  padding: 10px 14px; text-transform: uppercase;
}
.eyebrow.dark {
  border-color: var(--line); background: #f0e8da; color: #6b6154;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.hero h1 { font-size: clamp(42px, 7vw, 76px); line-height: 1.12; margin: 18px 0 0; }
.hero p { max-width: 760px; color: #d1c7bb; font-size: 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px;
  border: 1px solid transparent; cursor: pointer; transition: .2s ease; font-size: 14px;
}
.btn-accent { background: var(--accent); color: var(--white); border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-outline { border-color: #8e8172; color: var(--white); background: transparent; }
.btn-outline:hover { background: rgba(255,255,255,.07); }

.hero-stats {
  display: grid; gap: 1px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.12);
}
.stats-top { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(255,255,255,.12); }
.stat-box, .stat-note { background: #241e19; }
.stat-box { text-align: center; padding: 22px 18px; }
.stat-value { font-size: 30px; font-weight: 700; color: #fff; }
.stat-label { color: #b6a998; font-size: 12px; letter-spacing: .18em; margin-top: 6px; }
.stat-note { display: grid; grid-template-columns: 110px 1fr; gap: 18px; padding: 28px; align-items: center; }
.avatar-circle {
  width: 90px; height: 90px; border-radius: 50%; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05);
  display: flex; align-items: center; justify-content: center; font-size: 40px;
}

.section { padding: 72px 0; }
.section.soft { background: var(--soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section h2 { font-size: clamp(30px, 4vw, 50px); line-height: 1.2; margin: 16px 0 0; }
.section-intro { max-width: 760px; color: var(--muted); }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 36px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 36px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 36px; }

.card {
  background: var(--panel); border: 1px solid var(--line); padding: 24px; box-shadow: none;
}
.card.dark { background: var(--dark-2); border-color: rgba(255,255,255,.08); color: var(--white); }
.card-icon {
  width: 54px; height: 54px; border: 1px solid var(--line); background: #fff; display:flex; align-items:center; justify-content:center;
  font-size: 22px; color: #6d6256; margin-bottom: 18px;
}
.card h3 { font-size: 27px; margin: 0; line-height: 1.4; }
.card p { color: var(--muted); font-size: 14px; }
.card.dark p { color: #bcae9d; }

.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 28px; align-items: start; }
.news-feature { overflow: hidden; background: var(--panel); border: 1px solid var(--line); }
.news-feature .image { position: relative; height: 360px; overflow: hidden; border-bottom: 1px solid var(--line); }
.news-feature .image img { width: 100%; height: 100%; object-fit: cover; }
.news-feature .image .overlay {
  position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,.15));
}
.news-feature .caption { position: absolute; right: 0; left: 0; bottom: 0; padding: 26px; color: white; }
.badge {
  display: inline-flex; align-items: center; justify-content: center; padding: 8px 12px; font-size: 12px;
  border: 1px solid rgba(255,255,255,.2); background: rgba(0,0,0,.28); color: white;
}
.badge.light { background: white; border-color: var(--line); color: #6b6154; }

.news-list, .timeline, .works-list, .admin-guide, .summary-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.news-item, .time-item, .work-item, .guide-item, .summary-item { background: var(--panel); }
.news-item { display: grid; grid-template-columns: 140px 1fr; gap: 18px; align-items: center; padding: 18px; }
.news-item .thumb { height: 104px; overflow: hidden; border: 1px solid var(--line); background: #ddd; }
.news-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-item h4 { font-size: 28px; margin: 8px 0 4px; line-height: 1.4; }
.meta { color: #7d7266; font-size: 12px; letter-spacing: .1em; display:flex; flex-wrap:wrap; gap: 8px; }
.timeline { grid-template-columns: repeat(4,1fr); margin-top: 36px; }
.time-item { background: var(--dark-2); color: white; padding: 26px; }
.time-year { color: #d29b4b; font-size: 13px; letter-spacing: .2em; }
.time-item p { color: #bfb3a5; }

.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 36px; }
.gallery-card { background: var(--panel); border: 1px solid var(--line); overflow: hidden; }
.gallery-placeholder {
  height: 220px; display:flex; align-items:center; justify-content:center; background: #e6dccb; border-bottom: 1px dashed var(--line); color: #6f6457;
  flex-direction: column; gap: 8px;
}
.gallery-body { padding: 22px; }

.contact-banner {
  background: #1b1713; color: white; text-align: center; padding: 72px 0;
}
.contact-banner p { color: #c7b9a8; max-width: 760px; margin: 16px auto 0; }

.footer {
  background: var(--dark); color: #ad9f90; border-top: 1px solid #2f2823; margin-top: 0;
}
.footer .container { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; padding: 56px 0; }
.footer h4 { color: white; font-size: 24px; margin: 12px 0; }
.footer small { letter-spacing: .22em; color: #877b6e; }
.footer-links { display: grid; gap: 8px; }
.footer-links a:hover { color: white; }

.form-grid { display: grid; gap: 18px; }
label.form-label { display:block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: #6b6154; }
.input, .textarea, .select {
  width: 100%; border: 1px solid var(--line); background: white; padding: 13px 14px; font-size: 14px; outline: none;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); }
.textarea { min-height: 140px; resize: vertical; }
.upload-box {
  border: 1px dashed #aa977c; background: #f4ecde; padding: 20px; text-align: center; cursor: pointer;
}
.preview-box { border: 1px solid var(--line); background: white; overflow: hidden; }
.preview-box img { width: 100%; height: 220px; object-fit: cover; }
.error-box { border: 1px solid #e8b5b5; background: #fff0f0; color: #9e3131; padding: 12px 14px; font-size: 14px; }
.dark-grid { display: grid; gap: 1px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.1); }
.dark-row { display: grid; grid-template-columns: 130px 1fr; gap: 1px; background: rgba(255,255,255,.1); }
.dark-label { background: #241e19; color: #d29b4b; text-align: center; padding: 18px; }
.dark-value { background: #1d1814; color: #d7cab8; padding: 18px; }
.center { text-align: center; }
.justify { text-align: justify; }

@media (max-width: 1100px) {
  .hero .container, .split { grid-template-columns: 1fr; }
  .grid-4, .gallery-grid, .timeline { grid-template-columns: repeat(2,1fr); }
  .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .header .container, .topbar .container, .footer .container { grid-template-columns: 1fr; display: grid; }
  .nav { display: grid; gap: 10px; }
  .grid-4, .grid-2, .gallery-grid, .timeline { grid-template-columns: 1fr; }
  .news-item { grid-template-columns: 1fr; }
  .stat-note { grid-template-columns: 1fr; text-align: center; }
  .stats-top { grid-template-columns: 1fr; }
}
