/* =====================================================
   بلدية عطارة — التصميم العام
   هوية جديدة: كحلي أردوازي + أزرق سماوي — أسلوب "Accessible & Ethical"
   ===================================================== */
:root {
  --primary: #0F172A;        /* كحلي أردوازي عميق — العناوين والترويسة */
  --primary-soft: #1E293B;   /* كحلي أفتح قليلاً */
  --secondary: #334155;      /* رمادي أردوازي */
  --accent: #0369A1;         /* أزرق سماوي — الإجراءات والروابط */
  --accent-light: #0EA5E9;   /* أزرق سماوي فاتح — تحويم */
  --accent-soft: #E0F2FE;    /* خلفية زرقاء فاتحة جداً */
  --bg: #F8FAFC;             /* خلفية عامة فاتحة جداً */
  --surface: #FFFFFF;
  --text: #0F172A;
  --muted: #64748B;
  --muted-bg: #E8ECF1;
  --border: #E2E8F0;
  --success: #0E7490;
  --success-bg: #ECFEFF;
  --success-dark: #155E63;
  --gold: #B45309;
  --gold-bg: #FEF3C7;
  --red: #DC2626;
  --red-bg: #FEE2E2;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, .06);
  --shadow: 0 6px 18px rgba(15, 23, 42, .08);
  --shadow-lg: 0 18px 44px rgba(15, 23, 42, .16);
  --font-heading: 'Cairo', 'Tajawal', sans-serif;
  --font-body: 'Tajawal', 'Cairo', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
}

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 800; color: var(--primary); line-height: 1.35; }
a { color: var(--accent); text-decoration: none; transition: color .2s ease-out; }
a:hover { color: var(--accent-light); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ============ التركيز وإمكانية الوصول ============ */
a:focus-visible, button:focus-visible, .btn:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--accent-light);
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* ============ شريط العلم ============ */
.flag-strip { display: flex; height: 5px; }
.flag-strip span { flex: 1; }
.flag-strip span:nth-child(1) { background: #000; }
.flag-strip span:nth-child(2) { background: #fff; }
.flag-strip span:nth-child(3) { background: #149954; }
.flag-strip span:nth-child(4) { background: var(--red); }

/* ============ الشريط العلوي ============ */
.topbar { background: var(--primary); color: #cbd5e1; font-size: .82rem; }
.topbar .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .4rem 0; flex-wrap: wrap;
}
.topbar-contact { display: flex; align-items: center; gap: 1.3rem; flex-wrap: wrap; }
.topbar-contact a { color: #cbd5e1; display: inline-flex; align-items: center; gap: .4rem; }
.topbar-contact a:hover { color: var(--accent-light); }
.topbar-contact svg { flex-shrink: 0; }
.topbar .lang-switch {
  border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px;
  padding: .15rem .9rem; font-weight: 700; color: #fff; font-size: .8rem;
  transition: background .2s ease-out, border-color .2s ease-out;
}
.topbar .lang-switch:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ============ الترويسة ============ */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow-sm);
}
.header-inner { display: flex; align-items: center; gap: 1rem; padding: .65rem 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .7rem; }
.brand img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-text strong { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 800; color: var(--primary); }
.brand-text small { color: var(--muted); font-size: .78rem; }

.main-nav { display: flex; align-items: center; gap: .1rem; margin-inline-start: auto; flex-wrap: wrap; }
.main-nav a {
  padding: .5rem .15rem; margin-inline: .6rem;
  color: var(--secondary); font-weight: 600; font-size: .92rem;
  border-bottom: 2px solid transparent;
  transition: color .2s ease-out, border-color .2s ease-out;
}
.main-nav a:hover { color: var(--accent); border-bottom-color: var(--accent-soft); }
.main-nav a.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 700; }
.main-nav .lang-switch {
  border: 1.5px solid var(--border); color: var(--secondary) !important;
  font-weight: 700; margin-inline-start: .6rem; border-radius: 999px;
  padding: .35rem 1rem;
}
.main-nav .lang-switch:hover { background: var(--accent); border-color: var(--accent); color: #fff !important; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: .4rem; margin-inline-start: auto; }
.nav-toggle span { display: block; width: 26px; height: 3px; background: var(--primary); margin: 5px 0; border-radius: 2px; transition: .3s; }

/* ============ التنبيهات ============ */
.alert { padding: .9rem 1.2rem; border-radius: var(--radius); margin: 1rem 0; font-weight: 500; }
.alert-success { background: var(--success-bg); color: var(--success-dark); border: 1px solid #a5e3ec; }
.alert-error { background: var(--red-bg); color: var(--red); border: 1px solid #f3c2c0; }

/* ============ Hero ============ */
.hero {
  background: var(--primary);
  color: var(--white, #fff); position: relative; overflow: hidden;
}
.hero-inner {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem;
  align-items: center; padding: 4rem 0 4.5rem; position: relative;
}
.hero-eyebrow {
  display: inline-block; background: rgba(14, 165, 233, .12); color: var(--accent-light);
  border: 1px solid rgba(14, 165, 233, .4); padding: .25rem .9rem; border-radius: 999px;
  font-size: .85rem; margin-bottom: 1rem; font-weight: 600;
}
.hero h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3.2rem); margin-bottom: .8rem; }
.hero p { font-size: 1.1rem; opacity: .85; max-width: 32rem; margin-bottom: 1.6rem; color: #cbd5e1; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero-emblem {
  display: flex; align-items: center; justify-content: center;
  width: min(300px, 75%); aspect-ratio: 1 / 1;
  margin-inline: auto; border-radius: 50%; background: #fff;
  overflow: hidden;
}
.hero-emblem img {
  width: 72%; height: 72%;
  object-fit: contain;
}
.hero-arch {
  position: absolute; bottom: 0; left: 0; right: 0; height: 4px;
  background: var(--accent);
}

/* ============ الأزرار ============ */
.btn {
  display: inline-block; padding: .65rem 1.6rem; border-radius: var(--radius-sm);
  font-weight: 700; font-family: inherit; font-size: .95rem;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .15s ease-out, background-color .2s ease-out, color .2s ease-out, box-shadow .2s ease-out, border-color .2s ease-out;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(3, 105, 161, .25); }
.btn-primary:hover { background: var(--accent-light); color: #fff; }
.btn-outline { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn-outline:hover { background: var(--accent); color: #fff; }
.hero .btn-outline { border-color: rgba(255, 255, 255, .45); color: #fff; }
.hero .btn-outline:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }
.btn-light { background: #fff; color: var(--primary); }
.btn-light:hover { background: var(--accent-soft); color: var(--accent); }
.btn-sm { padding: .4rem 1.1rem; font-size: .85rem; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ============ شريط الإحصائيات ============ */
.stats-band { background: var(--surface); border-bottom: 1px solid var(--border); padding: 1.8rem 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; text-align: center; }
.stat-num { display: block; font-size: 2.2rem; font-weight: 800; color: var(--accent); font-family: var(--font-heading); }
.stat-label { color: var(--muted); font-size: .92rem; }

/* ============ الأقسام ============ */
.section { padding: 3.2rem 0; }
.section-tinted { background: var(--muted-bg); }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 1.6rem; gap: 1rem; padding-bottom: .9rem; border-bottom: 1px solid var(--border);
}
.section-head h2 { font-size: 1.6rem; display: flex; align-items: center; gap: .6rem; }
.section-head h2::before {
  content: ''; display: inline-block; width: 11px; height: 11px;
  background: var(--accent); border-radius: 3px;
}
.link-more { font-weight: 700; color: var(--accent); white-space: nowrap; }
.link-more:hover { color: var(--accent-light); }

/* ============ البطاقات ============ */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform .2s ease-out, box-shadow .2s ease-out, border-color .2s ease-out;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent-soft); }
.card-img { width: 100%; height: 190px; object-fit: cover; }
.card-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card-body h3 { font-size: 1.12rem; }
.card-body h3 a { color: var(--primary); }
.card-body h3 a:hover { color: var(--accent); }
.card-body p { color: var(--muted); font-size: .92rem; flex: 1; }
.card-body time { color: var(--muted); font-size: .8rem; }

.tag {
  align-self: flex-start; background: var(--accent-soft); color: var(--accent);
  padding: .15rem .75rem; border-radius: var(--radius-sm);
  font-size: .76rem; font-weight: 700;
}

/* ============ بطاقات الخدمات ============ */
.service-card { padding: 1.4rem 1.2rem; text-align: center; align-items: center; gap: .5rem; }
.service-card .service-mark { font-size: 1.9rem; color: var(--accent); }
.service-card h3 { color: var(--primary); font-size: 1.08rem; }
.service-card p { color: var(--muted); font-size: .87rem; }
.service-meta { color: var(--accent); font-weight: 700; font-size: .84rem; }
.service-row .service-meta-row { display: flex; gap: 1.2rem; color: var(--accent); font-weight: 700; font-size: .9rem; }
.service-actions { display: flex; gap: .6rem; margin-top: .4rem; flex-wrap: wrap; }

/* ============ الشارات ============ */
.badge { display: inline-block; padding: .15rem .75rem; border-radius: var(--radius-sm); font-size: .78rem; font-weight: 700; align-self: flex-start; }
.badge-blue { background: var(--accent-soft); color: var(--accent); }
.badge-gold { background: var(--gold-bg); color: var(--gold); }
.badge-orange { background: #ffedd5; color: #c2410c; }
.badge-green { background: var(--success-bg); color: var(--success-dark); }
.badge-dark-green { background: var(--primary); color: #fff; }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-gray { background: var(--muted-bg); color: var(--muted); }

/* ============ شريط التقدم ============ */
.progress { background: var(--muted-bg); border-radius: 999px; height: 10px; overflow: hidden; border: 1px solid var(--border); }
.progress-bar { height: 100%; background: var(--accent); border-radius: 999px; }

/* ============ الألبومات والمعرض ============ */
.albums-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.album-tile {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4/3; background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease-out, border-color .2s ease-out;
}
.album-tile:hover { box-shadow: var(--shadow); border-color: var(--accent-soft); }
.album-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease-out; }
.album-tile:hover img { transform: scale(1.05); }
.album-placeholder { font-size: 2.6rem; }
.album-title {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(15, 23, 42, .85));
  color: #fff; padding: 1.6rem .9rem .7rem; font-weight: 700; font-size: .95rem;
}
.photos-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.photo-tile { border: none; padding: 0; cursor: zoom-in; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; background: var(--surface); }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease-out; }
.photo-tile:hover img { transform: scale(1.06); }

.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15, 23, 42, .92);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 2rem;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 90vw; max-height: 78vh; border-radius: var(--radius); }
.lightbox p { color: #fff; }
.lightbox-close {
  position: absolute; top: 1.2rem; inset-inline-end: 1.4rem;
  background: var(--accent); color: #fff; border: none;
  width: 42px; height: 42px; border-radius: 50%; font-size: 1.1rem; cursor: pointer;
  transition: background .2s ease-out;
}
.lightbox-close:hover { background: var(--accent-light); }

.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: var(--accent); color: #fff; border: none;
  width: 46px; height: 46px; border-radius: 50%; font-size: 1.6rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease-out;
}
.lightbox-nav:hover { background: var(--accent-light); }
.lightbox-nav[hidden] { display: none; }
.lightbox-prev { inset-inline-start: 1rem; }
.lightbox-next { inset-inline-end: 1rem; }
.lightbox-counter { color: #fff; font-size: .9rem; opacity: .85; }

@media (max-width: 640px) {
  .lightbox-nav { width: 38px; height: 38px; font-size: 1.3rem; }
  .lightbox-prev { inset-inline-start: .4rem; }
  .lightbox-next { inset-inline-end: .4rem; }
}

/* ============ CTA ============ */
.cta-band { background: var(--primary); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.cta-inner h2 { color: #fff; font-size: 1.6rem; }

/* ============ رأس الصفحات الداخلية ============ */
.page-head {
  background: var(--primary);
  color: #fff; padding: 2.4rem 0;
  border-bottom: 4px solid var(--accent);
}
.page-head .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.page-head h1 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.page-head time, .page-sub { opacity: .85; font-size: .92rem; color: #cbd5e1; }
.page-head .tag { background: rgba(255, 255, 255, .12); color: var(--accent-light); border: 1px solid rgba(255, 255, 255, .25); }

/* ============ التبويبات والترقيم ============ */
.filter-tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.filter-tabs a {
  padding: .4rem 1.1rem; border-radius: var(--radius-sm); background: var(--surface);
  border: 1.5px solid var(--border); color: var(--muted); font-weight: 600; font-size: .9rem;
  transition: background .2s ease-out, color .2s ease-out, border-color .2s ease-out;
}
.filter-tabs a.active, .filter-tabs a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.pagination { display: flex; gap: .45rem; justify-content: center; margin-top: 2rem; flex-wrap: wrap; }
.pagination a {
  min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-weight: 700;
  transition: background .2s ease-out, color .2s ease-out, border-color .2s ease-out;
}
.pagination a.active, .pagination a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ============ النماذج ============ */
.form-wrap { max-width: 820px; }
.form-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow-sm);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; margin-bottom: 1.4rem; }
.form-grid .full { grid-column: 1 / -1; }
.form-card label { display: flex; flex-direction: column; gap: .35rem; font-weight: 600; font-size: .92rem; color: var(--primary); }
.form-card input, .form-card select, .form-card textarea {
  font-family: inherit; font-size: .95rem; color: var(--text);
  padding: .65rem .8rem; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); background: var(--bg); transition: border-color .2s ease-out, box-shadow .2s ease-out;
}
.form-card input:focus, .form-card select:focus, .form-card textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-section-title { margin: .4rem 0 1rem; padding-top: 1rem; border-top: 1px dashed var(--border); }
.file-label input[type="file"] { padding: .5rem; background: var(--bg); }

/* ============ التتبع ============ */
.track-form { display: flex; gap: .7rem; margin-bottom: 1.6rem; }
.track-form input {
  flex: 1; padding: .7rem 1rem; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-family: inherit; font-size: 1rem; background: var(--surface);
}
.track-result {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow-sm);
}
.track-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.track-rows { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1rem; }
.track-rows div { background: var(--bg); border-radius: var(--radius-sm); padding: .7rem .9rem; display: flex; flex-direction: column; }
.track-rows span { color: var(--muted); font-size: .8rem; }
.track-desc { background: var(--bg); border-radius: var(--radius-sm); padding: .9rem 1rem; margin-bottom: 1rem; }
.admin-reply { background: var(--success-bg); border-inline-start: 4px solid var(--success); border-radius: var(--radius-sm); padding: 1rem 1.2rem; margin-top: 1rem; }
.admin-reply h3 { color: var(--success-dark); margin-bottom: .3rem; }

/* ============ تفاصيل الخدمة ============ */
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.6rem; align-items: start; }
.detail-main h2 { margin: 1.3rem 0 .5rem; font-size: 1.3rem; }
.detail-main h2:first-child { margin-top: 0; }
.proc-line { padding: .35rem .8rem; background: var(--surface); border-inline-start: 3px solid var(--accent); border-radius: var(--radius-sm); margin-bottom: .4rem; border: 1px solid var(--border); border-inline-start-width: 3px; border-inline-start-color: var(--accent); }
.doc-list li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .6rem .9rem; margin-bottom: .5rem; }
.side-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow-sm); position: sticky; top: 90px; }
.side-row { display: flex; justify-content: space-between; padding: .6rem 0; border-bottom: 1px dashed var(--border); margin-bottom: .4rem; }
.side-row span { color: var(--muted); }
.side-box .btn { margin-top: .8rem; }

/* ============ المقالة ============ */
.article-body { max-width: 820px; }
.article-img { border-radius: var(--radius); margin-bottom: 1.4rem; box-shadow: var(--shadow-sm); }
.article-body p { margin-bottom: 1rem; font-size: 1.05rem; }
.related-title { margin: 2.5rem 0 1.2rem; font-size: 1.4rem; }

/* ============ الاستبيانات ============ */
.survey-question { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.3rem; margin-bottom: 1.2rem; background: var(--surface); }
.survey-question legend { font-weight: 700; color: var(--primary); padding: 0 .5rem; font-size: 1.05rem; }
.choice { display: flex !important; flex-direction: row !important; align-items: center; gap: .6rem !important; padding: .45rem .3rem; font-weight: 500 !important; cursor: pointer; }
.choice input { accent-color: var(--accent); width: 18px; height: 18px; }
.result-question { margin-bottom: 1.8rem; }
.result-question h3 { margin-bottom: .7rem; }
.result-row { display: grid; grid-template-columns: 160px 1fr 90px; align-items: center; gap: .8rem; margin-bottom: .55rem; }
.result-label { font-weight: 600; font-size: .92rem; }
.result-bar-track { background: var(--muted-bg); border: 1px solid var(--border); border-radius: 999px; height: 14px; overflow: hidden; }
.result-bar { height: 100%; background: var(--accent); border-radius: 999px; transition: width .6s ease-out; }
.result-pct { font-size: .85rem; color: var(--muted); font-weight: 700; }

/* ============ عن البلدية ============ */
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.about-card { background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--accent); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.about-card h2 { font-size: 1.25rem; margin-bottom: .6rem; }
.council-card { text-align: center; align-items: center; padding-top: 1.4rem; }
.council-photo { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; border: 3px solid var(--border); }
.council-placeholder { width: 110px; height: 110px; border-radius: 50%; background: var(--muted-bg); display: flex; align-items: center; justify-content: center; font-size: 2.6rem; border: 3px solid var(--border); }
.council-pos { color: var(--accent); font-weight: 700; font-size: .88rem; }

/* ============ اتصل بنا ============ */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 1.8rem; align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: .9rem; }
.info-box { display: flex; gap: .9rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .95rem 1.1rem; box-shadow: var(--shadow-sm); }
.info-box > span { font-size: 1.5rem; color: var(--accent); }
.info-box h3 { font-size: .95rem; }
.info-box p { color: var(--muted); font-size: .9rem; }
.map-frame { width: 100%; height: 240px; border: 1px solid var(--border); border-radius: var(--radius); }

/* ============ صفحات الأخطاء ============ */
.error-page { text-align: center; padding: 5rem 0; }
.error-code { font-size: 6rem; color: var(--accent); font-family: var(--font-heading); font-weight: 800; }
.error-page p { margin-bottom: 1.4rem; font-size: 1.1rem; color: var(--muted); }

.empty { text-align: center; color: var(--muted); padding: 2.5rem 0; font-size: 1.05rem; }

/* ============ التذييل ============ */
.site-footer { background: var(--primary); color: #cbd5e1; margin-top: 2rem; }
.olive-divider { height: 4px; background: var(--accent); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; padding: 2.6rem 0; }
.footer-logo { width: 60px; height: 60px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .2); margin-bottom: .8rem; }
.site-footer h4 { color: #fff; margin-bottom: .8rem; font-size: 1.05rem; font-family: var(--font-heading); }
.site-footer p, .site-footer li { font-size: .92rem; margin-bottom: .45rem; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: var(--accent-light); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 1rem 0; text-align: center; font-size: .85rem; color: #94a3b8; }

/* ============ التجاوب ============ */
@media (max-width: 1000px) {
  .cards-grid, .cards-4 { grid-template-columns: repeat(2, 1fr); }
  .albums-grid, .photos-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-inner { grid-template-columns: 1fr; text-align: center; padding: 3rem 0 4rem; }
  .hero p { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-emblem { order: -1; }
  .hero-emblem img { width: 170px; }
  .detail-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .topbar-contact { display: none; }
  .nav-toggle { display: block; }
  .main-nav {
    display: none; width: 100%; flex-direction: column; align-items: stretch;
    padding: .6rem 0; border-top: 1px solid var(--border); margin-top: .4rem;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: .7rem .8rem; margin-inline: 0; border-bottom: none; border-inline-start: 3px solid transparent; }
  .main-nav a:hover, .main-nav a.active { border-inline-start-color: var(--accent); border-bottom-color: transparent; background: var(--accent-soft); }
  .main-nav .lang-switch { align-self: flex-start; margin-top: .4rem; margin-inline-start: .8rem; }
  .cards-grid, .cards-2, .cards-4 { grid-template-columns: 1fr; }
  .albums-grid, .photos-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
  .form-grid, .track-rows { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .result-row { grid-template-columns: 1fr; gap: .25rem; }
  .track-form { flex-direction: column; }
  .section { padding: 2.3rem 0; }
}

/* ============ تقليل الحركة ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .card:hover, .btn:active, .album-tile:hover img, .photo-tile:hover img {
    transform: none;
  }
}
