/* ============================================================
   مجلس بلدة مسرابا - ملف التنسيق المركزي
   كل الألوان والخطوط والمقاسات معرّفة في :root
   لتغيير هوية الموقع بالكامل من مكان واحد
   ============================================================ */

/* ملاحظة حول الخطوط:
   خط "التيسير" غير متوفر كخط ويب مجاني، لذلك نستخدم بديلين:
   - Amiri للعناوين (خط نسخي كلاسيكي)
   - Cairo للنصوص العامة (واضح وعصري)
   لاستبدالهما بخط التيسير الأصلي لاحقاً إن توفر ملف الخط:
   @font-face {
     font-family: 'Taiseer';
     src: url('../fonts/Taiseer.woff2') format('woff2');
   }
   ثم استبدل --font-header و --font-body بـ 'Taiseer'
*/
@font-face {
  font-family: 'qomra';
  src: url(fonts/qomra.ttf) format('truetype');
  font-display: swap;
}
:root {
  /* الألوان الأساسية */
  --maroon: #4a151e;          /* عنابي سوري - اللون الأساسي */
  --maroon-light: #6b2a35;
  --maroon-dark: #2e0c12;
  --gold: #b8902f;            /* ذهبي سوري - لون التمييز */
  --gold-light: #d4af4a;
  --gold-dark: #8a6a20;
  --bg: #ffffff;             /* خلفية بيضاء */
  --bg-soft: #faf7f2;        /* خلفية ناعمة */
  --ink: #1a1a1a;            /* نص أساسي */
  --muted: #6b6b6b;          /* نص ثانوي */
  --border: #e0d8cc;         /* حدود */
  --white: #ffffff;
  --shadow: rgba(74, 21, 30, 0.12);
  --shadow-strong: rgba(74, 21, 30, 0.25);

  /* ألوان إضافية */
  --success: #2d6a4f;
  --warning: #b7791f;
  --error: #9b2226;
  --info: #2c5282;

  /* الخطوط */
  --font-header: 'qomra', 'Amiri', 'Cairo', serif;
  --font-body: 'qomra', 'Cairo', 'Segoe UI', Tahoma, sans-serif;

  /* مقاسات الخط */
  --fs-base: 1.05rem;
  --fs-small: 0.875rem;
  --fs-large: 1.15rem;
  --fs-header: 1.5rem;
  --fs-title: 2rem;
  --fs-hero: 2.5rem;

  /* المسافات */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;

  /* الزوايا */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* الانتقالات */
  --transition: 0.3s ease;
}
::selection {
  background: #4a151e;
  color: #e0d8cc;
}

::-moz-selection {
  background: #4a151e;
  color: #e0d8cc;
}
/* ==================== إعادة التعيين ==================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--bg);
  /* خلفية زخرفية إسلامية - SVG متكرر بشفافية منخفضة */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23b8902f' stroke-width='0.8' opacity='0.06'%3E%3Cpath d='M40 0 L80 40 L40 80 L0 40 Z'/%3E%3Cpath d='M40 10 L70 40 L40 70 L10 40 Z'/%3E%3Cpath d='M40 20 L60 40 L40 60 L20 40 Z'/%3E%3Ccircle cx='40' cy='40' r='5'/%3E%3C/g%3E%3C/svg%3E");
  background-attachment: fixed;
  direction: rtl;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--maroon);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--gold-dark);
}

ul {
  list-style: none;
}

/* ==================== الترويسة ==================== */
.site-header {
  background: linear-gradient(135deg, var(--maroon) 0%, var(--maroon-dark) 100%);
  color: var(--white);
  padding: var(--space-md) var(--space-lg);
  position: relative;
  box-shadow: 0 4px 20px var(--shadow-strong);
  border-bottom: 3px solid var(--gold);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-md);
}

.header-side {
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.5;
}

.header-side.right {
  text-align: right;
}

.header-side.left {
  text-align: left;
}

.header-side .line1 {
  font-size: 1.5rem;
  color: var(--gold-light);
  margin-bottom: 0.25rem;

}

.header-side .line2 {
  font-size: 1.3rem;
  color: var(--white);
  opacity: 0.95;
  padding: 4%;
}

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

.header-logo img {
  width: 120px;
  height: 120px;
  margin: 0 auto;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.header-logo .logo-note {
  font-size: 1.5rem;
  color: var(--gold-light);
  margin-top: 0.25rem;
  opacity: 0.8;
}

/* ==================== قائمة التنقل ==================== */
.main-nav {
  background: var(--maroon-dark);
  border-top: 1px solid rgba(184, 144, 47, 0.3);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.nav-list {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 var(--space-sm);
}

.nav-list li {
  position: relative;
}

.nav-list a {
  display: block;
  padding: 0.9rem 1.3rem;
  color: var(--white);
  font-weight: 600;
  font-size: 1rem;
  transition: color var(--transition);
}

.nav-list a:hover {
  color: var(--gold-light);
}

.nav-list a.active {
  color: var(--gold);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  padding: 0.8rem;
  cursor: pointer;
  width: 100%;
  text-align: center;
}

/* ==================== الشريط الإخباري ==================== */
.news-marquee {
  background: var(--maroon);
  color: var(--gold-light);
  overflow: hidden;
  border-bottom: 1px solid var(--gold);
  position: relative;
  height: 45px;
  display: flex;
  align-items: center;
  direction: rtl;
}

.marquee-label {
  background: var(--gold);
  color: var(--maroon-dark);
  font-weight: 700;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  white-space: nowrap;
  z-index: 2;
  position: relative;
  flex-shrink: 0;

}

.marquee-track {
  display: flex;
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  min-width: 0;
  direction: ltr;
}

.marquee-content {
  display: inline-flex;
  white-space: nowrap;
  direction: ltr;
  animation: marquee-scroll var(--marquee-duration, 28s) linear infinite;
  will-change: transform;
}

.marquee-group {
  display: inline-flex;
  gap: 3rem;
  padding-inline-end: 3rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.marquee-content span {
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
}

.marquee-content span::before {
  content: '◆';
  color: var(--gold);
  margin-left: 0.5rem;
  font-size: 0.7rem;
}

.news-marquee:hover .marquee-content,
.news-marquee.is-paused .marquee-content {
  animation-play-state: paused;
}

/* الحركة من اليسار إلى اليمين، بمسافة تساوي عرض مجموعة واحدة بالضبط (بدون أي فراغ أو قطع) */
@keyframes marquee-scroll {
  0% {
    transform: translateX(calc(-1 * var(--marquee-distance, 50%)));
  }
  100% {
    transform: translateX(0);
  }
}

/* ==================== الحاوية الرئيسية ==================== */
.main-content {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md);
}

.page-title {
  font-family: var(--font-header);
  font-size: var(--fs-title);
  color: var(--maroon);
  text-align: center;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  position: relative;
}

.page-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--gold);
}

/* ==================== السلايدر ==================== */
.hero-slider {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto var(--space-xl);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 30px var(--shadow-strong);
  aspect-ratio: 21/9;
  background: var(--maroon-dark);
}

.slider-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.slide.active {
  opacity: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(46, 12, 18, 0.9));
  color: var(--white);
  padding: var(--space-lg) var(--space-md) var(--space-md);
  text-align: center;
}

.slide-caption h3 {
  font-family: var(--font-header);
  font-size: 1.4rem;
  margin-bottom: 0.3rem;
}

.slide-caption p {
  font-size: 0.95rem;
  opacity: 0.9;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(74, 21, 30, 0.6);
  color: var(--white);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  transition: background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-btn:hover {
  background: var(--maroon);
}

.slider-btn.prev {
  right: 1rem;
}

.slider-btn.next {
  left: 1rem;
}

.slider-dots {
  position: absolute;
  bottom: 0.8rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 5;
}

.slider-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all var(--transition);
  padding: 0;
}

.slider-dots button.active {
  background: var(--gold);
  transform: scale(1.3);
}

/* ==================== البطاقات ==================== */
.section {
  margin-bottom: var(--space-xl);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--border);
}

.section-header h2 {
  font-family: var(--font-header);
  font-size: var(--fs-header);
  color: var(--maroon);
}

.section-header .view-all {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold-dark);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
}

.card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 15px var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px var(--shadow-strong);
}

.card-img {
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--bg-soft);
  overflow: hidden;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-img img {
  transform: scale(1.05);
}

.card-body {
  padding: var(--space-sm) var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-body h3 {
  font-family: var(--font-header);
  font-size: 1.2rem;
  color: var(--maroon);
  margin-bottom: 0.5rem;
}

.card-body .card-date {
  font-size: 0.8rem;
  color: var(--gold-dark);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.card-body .card-desc {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
}

.card-body .card-meta {
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.card-body .card-tag {
  background: var(--maroon);
  color: var(--white);
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ==================== بطاقة القرار ==================== */
.decision-banner {
  background: var(--white);
  border: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
  box-shadow: 0 6px 25px var(--shadow);
  cursor: pointer;
  transition: all var(--transition);
  display: block;
  text-decoration: none;
  color: inherit;
}

.decision-banner:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 35px var(--shadow-strong);
  border-color: var(--gold-light);
}

.decision-banner .decision-label {
  display: inline-block;
  background: var(--maroon);
  color: var(--gold-light);
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.decision-banner h2 {
  font-family: var(--font-header);
  font-size: 1.6rem;
  color: var(--maroon);
  margin-bottom: var(--space-sm);
}

.decision-banner p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
}

.decision-banner .decision-date {
  margin-top: var(--space-sm);
  font-size: 0.85rem;
  color: var(--gold-dark);
  font-weight: 600;
}

/* ==================== شريط بيانات البلدة ==================== */
.town-banner {
  position: relative;
  width: 100%;
  height: 12vh;
  min-height: 100px;
  max-height: 140px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-xl);
  cursor: pointer;
  display: block;
  text-decoration: none;
  box-shadow: 0 6px 25px var(--shadow);
}

.town-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.town-banner .town-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(74, 21, 30, 0.85) 0%, rgba(66, 60, 61, 0.5) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--white);
  text-align: center;
}

.town-banner .town-name {
  font-family: var(--font-header);
  font-size: 2rem;
  color: var(--gold-light);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.town-banner .town-subtitle {
  font-size: 0.95rem;
  opacity: 0.9;
  margin-top: 0.3rem;
}

/* ==================== الطقس وأسعار الصرف ==================== */
.info-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.info-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: 0 4px 15px var(--shadow);
  border: 1px solid var(--border);
  text-align: center;
}

.info-card h3 {
  font-family: var(--font-header);
  font-size: 1.2rem;
  color: var(--maroon);
  margin-bottom: var(--space-sm);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gold);
  display: inline-block;
}

.weather-temp {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--maroon);
  margin: 0.5rem 0;
}

.weather-desc {
  color: var(--muted);
  font-size: 1rem;
}

.exchange-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-sm);
}

.exchange-table th,
.exchange-table td {
  padding: 0.6rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.exchange-table th {
  background: var(--bg-soft);
  color: var(--maroon);
  font-weight: 700;
}

.exchange-table td {
  font-size: 0.95rem;
}

.exchange-note {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: var(--space-sm);
  font-style: italic;
}

/* ==================== الاستمارة والاستبيان ==================== */
.forms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.form-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: 0 4px 15px var(--shadow);
  border: 1px solid var(--border);
}

.form-card h3 {
  font-family: var(--font-header);
  font-size: 1.3rem;
  color: var(--maroon);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--gold);
}

.form-group {
  margin-bottom: var(--space-sm);
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--ink);
  font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition);
  background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 144, 47, 0.15);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  background: var(--maroon);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn:hover {
  background: var(--maroon-light);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-strong);
}

.btn-gold {
  background: var(--gold);
  color: var(--maroon-dark);
}

.btn-gold:hover {
  background: var(--gold-light);
  color: var(--maroon-dark);
}

.btn-outline {
  background: transparent;
  color: var(--maroon);
  border: 2px solid var(--maroon);
}

.btn-outline:hover {
  background: var(--maroon);
  color: var(--white);
}

/* الاستبيان */
.poll-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.poll-option {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.poll-option:hover {
  border-color: var(--gold);
  background: var(--bg-soft);
}

.poll-option input {
  width: auto;
  accent-color: var(--maroon);
}

.poll-option label {
  margin: 0;
  cursor: pointer;
  flex: 1;
}

.poll-results {
  margin-top: var(--space-md);
}

.poll-result-item {
  margin-bottom: var(--space-sm);
}

.poll-result-item .poll-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.poll-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-soft);
  border-radius: 4px;
  overflow: hidden;
}

.poll-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--maroon), var(--gold));
  transition: width 0.8s ease;
}

/* ==================== الفوتر ==================== */
.site-footer {
  background: var(--maroon-dark);
  color: var(--white);
  padding: var(--space-xl) var(--space-md) 0;
  margin-top: auto;
  border-top: 3px solid var(--gold);
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-lg);
  padding-bottom: var(--space-lg);
}

.footer-section h3 {
  font-family: var(--font-header);
  font-size: 1.2rem;
  color: var(--gold-light);
  margin-bottom: var(--space-sm);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(184, 144, 47, 0.3);
}

.footer-section p,
.footer-section li {
  font-size: 0.95rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.85);
}

.footer-section ul li a {
  color: var(--white);
  font-weight: 500;
  display: inline-block;
  padding: 0.15rem 0;
  transition: color var(--transition), padding-right var(--transition);
}

.footer-section ul li a:hover {
  color: var(--gold-light);
  padding-right: 0.4rem;
}

.footer-section .contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.footer-section .contact-item strong {
  color: var(--gold-light);
  min-width: 80px;
}

.social-links {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(184, 144, 47, 0.15);
  border-radius: 50%;
  transition: all var(--transition);
}

.social-links a:hover {
  background: var(--gold);
  transform: translateY(-3px);
}

.social-links a img {
  width: 22px;
  height: 22px;
}

.footer-map {
  margin-top: var(--space-sm);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid rgba(184, 144, 47, 0.3);
}

.footer-map iframe {
  width: 100%;
  height: 200px;
  border: 0;
  filter: grayscale(0.3);
}

/* شريط المصمم - ثابت في الكود */
.designer-bar {
  background: var(--maroon);
  color: var(--gold-light);
  text-align: center;
  padding: 0.6rem;
  font-size: 0.85rem;
  border-top: 1px solid rgba(184, 144, 47, 0.3);
}

.designer-bar a {
  color: var(--gold-light);
  font-weight: 700;
}
/* رابط المصمم + أيقونة تلغرام */
.designer-bar .designer-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.12rem 0.65rem;
  margin-inline-start: 0.2rem;
  border-radius: 999px;
  overflow: hidden;
  color: var(--gold-light);
  font-weight: 700;
  text-decoration: none;
  vertical-align: middle;
  border: 1px solid transparent;
  transition: border-color 0.3s ease, background-color 0.3s ease,
  box-shadow 0.3s ease, transform 0.3s ease;
}

.designer-bar .designer-tg {
  flex: none;
  opacity: 0.8;
  transition: transform 0.35s ease, opacity 0.3s ease;
  animation: designerTgPulse 3.2s ease-in-out infinite;
}

/* لمعة تمر من اليمين إلى اليسار */
.designer-bar .designer-link::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 55%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 236, 170, 0.55) 50%,
    transparent 100%
  );
  transform: translateX(160%) skewX(-18deg);
  opacity: 0;
  pointer-events: none;
}

.designer-bar .designer-link:hover,
.designer-bar .designer-link:focus-visible {
  border-color: rgba(212, 175, 74, 0.55);
  background-color: rgba(212, 175, 74, 0.1);
  box-shadow: 0 0 14px rgba(212, 175, 74, 0.35);
  transform: translateY(-1px);
  outline: none;
}

.designer-bar .designer-link:hover::after,
.designer-bar .designer-link:focus-visible::after {
  opacity: 1;
  animation: designerShine 0.9s ease-out;
}

.designer-bar .designer-link:hover .designer-tg,
.designer-bar .designer-link:focus-visible .designer-tg {
  opacity: 1;
  transform: translate(-2px, -2px) rotate(-8deg);
  animation: none;
}
.designer-tg { 
    color: #24A1DE; 
}

@keyframes designerShine {
  from { transform: translateX(160%) skewX(-18deg); }
  to   { transform: translateX(-260%) skewX(-18deg); }
}

/* نبضة هادئة تلفت الانتباه للأيقونة */
@keyframes designerTgPulse {
  0%, 70%, 100% { opacity: 0.7; transform: scale(1); }
  85%           { opacity: 1;   transform: scale(1.18); }
}

@media (prefers-reduced-motion: reduce) {
  .designer-bar .designer-tg { animation: none; }
  .designer-bar .designer-link:hover::after { animation: none; opacity: 0; }
}

/* ==================== صفحات داخلية ==================== */
.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md);
}

.page-container .page-title {
  margin-bottom: var(--space-xl);
}

/* تبويبات المعرض */
.tabs {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.tab-btn {
  padding: 0.7rem 1.5rem;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--maroon);
  cursor: pointer;
  transition: all var(--transition);
}

.tab-btn:hover {
  border-color: var(--gold);
}

.tab-btn.active {
  background: var(--maroon);
  color: var(--white);
  border-color: var(--maroon);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* بطاقة الأرشيف المرئي */
.visual-archive-card {
  background: linear-gradient(135deg, var(--maroon) 0%, var(--maroon-dark) 100%);
  color: var(--white);
  border: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  cursor: pointer;
  transition: all var(--transition);
}

.visual-archive-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 35px var(--shadow-strong);
}

.visual-archive-card .va-icon {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  background: rgba(184, 144, 47, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.visual-archive-card .va-content h3 {
  font-family: var(--font-header);
  font-size: 1.5rem;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}

.visual-archive-card .va-content p {
  font-size: 0.95rem;
  opacity: 0.9;
  line-height: 1.7;
}

/* بطاقة تلغرام */
.telegram-card {
  background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  text-decoration: none;
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(42, 82, 152, 0.3);
}

.telegram-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(42, 82, 152, 0.5);
  color: var(--white);
}

.telegram-card .tg-icon {
  flex-shrink: 0;
  width: 70px;
  height: 70px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.telegram-card .tg-icon img {
  width: 40px;
  height: 40px;
}

.telegram-card .tg-content h3 {
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
}

.telegram-card .tg-content p {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* جدول القرارات */
.decisions-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.decision-item {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: 0 3px 12px var(--shadow);
  border-right: 4px solid var(--gold);
  transition: transform var(--transition);
}

.decision-item:hover {
  transform: translateX(-5px);
}

.decision-item .decision-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.decision-item .decision-number {
  background: var(--maroon);
  color: var(--gold-light);
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
}

.decision-item .decision-date {
  color: var(--gold-dark);
  font-weight: 600;
  font-size: 0.9rem;
}

.decision-item h3 {
  font-family: var(--font-header);
  font-size: 1.2rem;
  color: var(--maroon);
  margin-bottom: 0.5rem;
}

.decision-item p {
  color: var(--muted);
  line-height: 1.8;
}

/* صفحة معلومات البلدة */
.town-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.town-info-section {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: 0 4px 15px var(--shadow);
  border: 1px solid var(--border);
}

.town-info-section h3 {
  font-family: var(--font-header);
  font-size: 1.3rem;
  color: var(--maroon);
  margin-bottom: var(--space-sm);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gold);
}

.town-info-section p {
  line-height: 1.9;
  color: var(--ink);
  margin-bottom: var(--space-sm);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.stat-item {
  text-align: center;
  padding: var(--space-sm);
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.stat-item .stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--maroon);
  font-family: var(--font-header);
}

.stat-item .stat-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

/* ==================== لوحة التحكم ==================== */
.admin-login {
  max-width: 400px;
  margin: var(--space-xl) auto;
  background: var(--white);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px var(--shadow);
  border: 1px solid var(--border);
}

.admin-login h2 {
  text-align: center;
  font-family: var(--font-header);
  color: var(--maroon);
  margin-bottom: var(--space-md);
}

.admin-panel {
  display: none;
}

.admin-panel.active {
  display: block;
}

.admin-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}

.admin-tab {
  padding: 0.7rem 1.2rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition);
}

.admin-tab:hover {
  color: var(--maroon);
}

.admin-tab.active {
  color: var(--maroon);
  border-bottom-color: var(--gold);
}

.admin-section {
  display: none;
  background: var(--white);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  box-shadow: 0 3px 12px var(--shadow);
  border: 1px solid var(--border);
}

.admin-section.active {
  display: block;
}

.admin-section h3 {
  font-family: var(--font-header);
  color: var(--maroon);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--gold);
}

.admin-info-box {
  background: #fff8e7;
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
  font-size: 0.9rem;
  line-height: 1.8;
}

.admin-info-box strong {
  color: var(--maroon);
}

.admin-info-box ul {
  list-style: disc;
  padding-right: 1.5rem;
  margin-top: 0.5rem;
}

.admin-info-box ul li {
  margin-bottom: 0.3rem;
}

.admin-actions {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.data-editor {
  width: 100%;
  min-height: 400px;
  padding: var(--space-sm);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  direction: ltr;
  text-align: left;
}

.admin-item-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.admin-item {
  background: var(--bg-soft);
  padding: var(--space-sm);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
}

.admin-item .item-info {
  flex: 1;
}

.admin-item .item-info strong {
  color: var(--maroon);
  display: block;
  margin-bottom: 0.2rem;
}

.admin-item .item-info span {
  font-size: 0.85rem;
  color: var(--muted);
}

.admin-item .item-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
}

.btn-danger {
  background: var(--error);
  color: var(--white);
}

.btn-danger:hover {
  background: #7a1a1e;
  color: var(--white);
}

/* Toast إشعار */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--success);
  color: var(--white);
  padding: 0.8rem 2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  opacity: 0;
  transition: all 0.4s ease;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.error {
  background: var(--error);
}

/* ==================== شريط التمرير الجانبي ==================== */

/* للمتصفحات التي تدعم WebKit (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-soft, #faf7f2);
  border-radius: 10px;
  border: 1px solid var(--border, #e0d8cc);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--maroon, #4a151e), var(--maroon-light, #6b2a35));
  border-radius: 10px;
  border: 2px solid var(--gold, #b8902f);
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--maroon-dark, #2e0c12), var(--maroon, #4a151e));
  border-color: var(--gold-light, #d4af4a);
  transform: scale(1.05);
}

::-webkit-scrollbar-thumb:active {
  background: var(--maroon-dark, #2e0c12);
  border-color: var(--gold-dark, #8a6a20);
}

/* لفايرفوكس */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--maroon, #4a151e) var(--bg-soft, #faf7f2);
}
/* ==================== التجاوب ==================== */
@media (max-width: 992px) {
  .header-inner {
    grid-template-columns: 1fr auto 1fr;
    gap: var(--space-sm, 0.5rem);
  }

  .header-side .line1 {
    font-size: 0.85rem;
    
  }

  .header-side .line2 {
    font-size: 0.7rem;
    padding: 0;

  }

  .header-logo img {
    width: 55px;
    height: 48px;
  }

  .header-logo .logo-note {
    font-size: 0.9rem;
  }

  .info-bar {
    grid-template-columns: 1fr;
  }

  .forms-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .town-info {
    grid-template-columns: 1fr;
  }

  .visual-archive-card {
    flex-direction: column;
    text-align: center;
  }

  .telegram-card {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 600px) {
  :root {
    --fs-base: 1rem;
    --fs-title: 1.5rem;
    --fs-hero: 1.8rem;
  }

  body {
    font-size: 0.95rem;
  }

  .main-content {
    padding: var(--space-md) var(--space-sm);
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .hero-slider {
    aspect-ratio: 16/9;
  }

  .slide-caption h3 {
    font-size: 1.1rem;
  }

  .slide-caption p {
    font-size: 0.85rem;
  }

  .slider-btn {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .town-banner .town-name {
    font-size: 1.5rem;
  }

  .town-banner .town-subtitle {
    font-size: 0.85rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .admin-actions {
    flex-direction: column;
  }

  .admin-actions .btn {
    width: 100%;
  }

  .marquee-label {
    font-size: 0.8rem;
    padding: 0 0.7rem;
  }

  .marquee-content span {
    font-size: 0.85rem;
  }

  .designer-bar {
    font-size: 0.75rem;
  }
}

/* تحسينات الطباعة */
@media print {
  .main-nav,
  .news-marquee,
  .hero-slider,
  .site-footer,
  .designer-bar {
    display: none;
  }
}

/* ============================================================
   إضافات: صندوق تكبير الصور (Lightbox)
   ============================================================ */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 3000;
  padding: 2rem;
}
.lightbox-overlay.active { display: flex; }
.lightbox-img {
  max-width: 92vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.lightbox-caption {
  color: #fff;
  margin-top: 1rem;
  font-size: 0.95rem;
  text-align: center;
  max-width: 80vw;
}
.lightbox-close {
  position: absolute;
  top: 1.2rem;
  left: 1.2rem;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,0.25); }

/* ============================================================
   إضافات: أداة "عرض المزيد"
   ============================================================ */
.load-more-wrap { text-align: center; margin: 1.5rem 0; }
.load-more-btn {
  background: transparent;
  border: 2px solid var(--maroon, #7a1e2b);
  color: var(--maroon, #7a1e2b);
  padding: 0.6rem 1.6rem;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.load-more-btn:hover { background: var(--maroon, #7a1e2b); color: #fff; }
.load-more-end { color: var(--muted, #888); font-size: 0.9rem; padding: 0.5rem; }
.empty-note { color: var(--muted, #888); text-align: center; padding: 1.5rem; }

/* ============================================================
   إضافات: صور القرارات المتعددة
   ============================================================ */
.decision-images { display: grid; gap: 0.5rem; margin-top: 1rem; }
.decision-images-1 { grid-template-columns: 1fr; }
.decision-images-2 { grid-template-columns: 1fr 1fr; }
.decision-images-3 { grid-template-columns: 1fr 1fr; }
.decision-images-3 .decision-image-item:first-child { grid-column: span 2; }
.decision-images-4 { grid-template-columns: 1fr 1fr; }
.decision-image-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/3;
}
.decision-image-item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.decision-image-more {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.55);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 700;
}

/* ============================================================
   إضافات: الأعضاء السابقون
   ============================================================ */
.former-heading { margin: 2rem 0 1rem; color: var(--muted, #888); font-size: 1.1rem; border-top: 1px dashed var(--border, #ddd); padding-top: 1.5rem; }
.former-members .card { opacity: 0.85; }

/* ============================================================
   إضافات: صفحة الشهداء
   ============================================================ */
.martyrs-promo-card {
  display: flex; align-items: center; gap: 1rem;
  background: linear-gradient(135deg, var(--maroon, #7a1e2b), #4a1017);
  color: #fff; padding: 1.2rem 1.5rem; border-radius: 12px; margin-top: 2rem; text-decoration: none;
}
.martyrs-promo-card:hover { color: #fff; filter: brightness(1.08); }
.martyrs-promo-card .mp-icon { font-size: 2rem; }
.martyrs-promo-card h3 { margin: 0 0 0.3rem; color: #fff; }
.martyrs-promo-card p { margin: 0; font-size: 0.9rem; opacity: 0.9; }

/* ============================================================
   إضافات: إحصائيات الزوار
   ============================================================ */
.visitor-total-card {
  background: var(--maroon, #7a1e2b); color: #fff; border-radius: 12px;
  padding: 1.5rem; text-align: center; margin-bottom: 1.5rem;
}
.vt-number { font-size: 2.5rem; font-weight: 800; }
.vt-label { font-size: 0.9rem; opacity: 0.9; margin-top: 0.3rem; }
.stats-subheading { margin: 1.5rem 0 1rem; color: var(--maroon, #7a1e2b); }
.visit-bars-chart {
  display: flex; align-items: flex-end; gap: 6px; height: 130px;
  padding: 0.5rem; border: 1px solid var(--border, #eee); border-radius: 10px;
}
.visit-bar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; flex: 1; height: 100%; }
.visit-bar { width: 100%; max-width: 22px; background: var(--gold, #c9a24a); border-radius: 3px 3px 0 0; transition: height 0.3s ease; }
.visit-bar-label { font-size: 0.6rem; color: var(--muted, #888); margin-top: 4px; writing-mode: vertical-rl; }
.visit-page-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.6rem; }
.vp-label { min-width: 110px; font-size: 0.85rem; }
.vp-bar-track { flex: 1; background: var(--border, #eee); border-radius: 10px; height: 10px; overflow: hidden; }
.vp-bar-fill { height: 100%; background: var(--maroon, #7a1e2b); border-radius: 10px; }
.vp-count { font-size: 0.8rem; color: var(--muted, #777); min-width: 70px; text-align: left; }

/* ============================================================
   صفحة مجلس البلدة: 3 كاردز بالصف على الشاشات الكبيرة،
   و2 بالصف على الهاتف بحجم مريح للقراءة (كانت 3 صغيرة جداً على الهاتف)
   ============================================================ */
.cards-grid.council-grid {
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 1rem;
}
.council-grid .card-img { aspect-ratio: 4 / 5; }
.council-grid .card-img img { object-position: center 20%; }

@media (max-width: 700px) {
  .cards-grid.council-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.8rem;
  }
  .council-grid .card-body {
    padding: 0.8rem 0.6rem 0.9rem;
    text-align: center;
  }
  .council-grid .card-body h3 {
    font-size: 1.05rem;
    line-height: 1.5;
  }
  .council-grid .card-date {
    font-size: 0.92rem;
    line-height: 1.5;
  }
  .council-grid .card-desc {
    font-size: 0.82rem;
  }
}
@media (max-width: 560px) {
  .cards-grid.council-grid { grid-template-columns: 1fr !important; gap: 1.1rem; }
  .council-grid .card { max-width: 420px; width: 100%; margin-inline: auto; }
  .council-grid .card-body h3 { font-size: 1.25rem; }
  .council-grid .card-date { font-size: 1rem; }
  .council-grid .card-desc { font-size: 0.95rem; }
}

/* هواتف صغيرة جدًا: نُبقي الهيدر 3 أعمدة جنب بعض، فقط نصغّر أكثر */
@media (max-width: 420px) {
  .site-header {
    padding: 0.6rem 0.5rem;
  }
  .header-inner {
    gap: 0.3rem;
  }
  .header-side .line1 {
    font-size: 0.68rem;
    margin-bottom: 0.1rem;
  }
  .header-side .line2 {
    font-size: 0.56rem;
  }
  .header-logo img {
    width: 42px;
    height: 38px;
  }
  .header-logo .logo-note {
    font-size: 0.65rem;
  }
}

/* ============================================================
   إضافات: إتاحة الوصول (Accessibility)
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* مؤشر تركيز واضح عند التنقل بلوحة المفاتيح */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--gold, #c9a24a);
  outline-offset: 2px;
}

/* احترام تفضيل تقليل الحركة لدى المستخدم */
@media (prefers-reduced-motion: reduce) {
  .marquee-content {
    animation-duration: 1ms !important;
  }
  * {
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   إضافات v2: الأخبار، واتساب، أسعار الصرف
   ============================================================ */
a.slide { display: block; color: var(--white); }
a.slide:hover { color: var(--white); }
.slide-caption p {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-slider .slide img { transition: transform 6s ease; }
.hero-slider .slide.active img { transform: scale(1.03); }

.card-body h3 a { color: inherit; }
.card-body h3 a:hover { color: var(--gold-dark); }
.card-body .card-desc {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-img { display: block; }
.read-more { font-weight: 700; color: var(--maroon); font-size: 0.85rem; }
.read-more:hover { color: var(--gold-dark); }

.exchange-updated { font-size: 0.78rem; color: var(--muted); margin-top: 0.6rem; }
.exchange-note { font-style: normal; }

.form-hint { font-size: 0.85rem; color: var(--muted); margin: -0.3rem 0 var(--space-sm); line-height: 1.7; }
.btn-whatsapp {
  background: #1a7f5a; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%;
}
.btn-whatsapp:hover { background: #146646; color: #fff; }
.btn-sm.btn-whatsapp { width: auto; }
.btn-whatsapp svg { flex-shrink: 0; }

/* صفحة الأخبار */
.news-search { max-width: 460px; margin: 0 auto var(--space-lg); }
.news-search input {
  width: 100%; padding: 0.75rem 1.1rem; border: 1px solid var(--border); border-radius: 999px;
  font-family: var(--font-body); font-size: 0.95rem; background: var(--white);
}
.news-search input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184, 144, 47, 0.15); }
.news-article { max-width: 820px; margin: 0 auto var(--space-xl); }
.back-link { display: inline-block; margin-bottom: var(--space-sm); font-weight: 700; color: var(--gold-dark); }
.back-link:hover { color: var(--maroon); }
.article-title { font-family: var(--font-header); color: var(--maroon); font-size: 2rem; line-height: 1.5; margin-bottom: 0.6rem; }
.article-meta { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; color: var(--gold-dark); font-weight: 600; font-size: 0.9rem; margin-bottom: var(--space-md); }
.article-meta .card-tag { background: var(--maroon); color: #fff; padding: 0.2rem 0.8rem; border-radius: 20px; font-size: 0.78rem; }
.article-figure { margin: 0 0 var(--space-md); border-radius: var(--radius-md); overflow: hidden; background: var(--maroon-dark); box-shadow: 0 6px 24px var(--shadow-strong); }
.article-figure img { width: 100%; max-height: 520px; object-fit: contain; margin: 0 auto; }
.article-body p { font-size: 1.1rem; line-height: 2; margin-bottom: 1rem; color: var(--ink); }
.article-share { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-top: var(--space-md); padding-top: var(--space-md); border-top: 1px solid var(--border); font-weight: 600; }

/* ============================================================
   صفحة الشهداء v2
   ============================================================ */
.m-stats {
  display: grid; grid-template-columns: minmax(220px, 280px) 1fr; gap: var(--space-lg); align-items: center;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--space-lg); box-shadow: 0 4px 18px var(--shadow); margin-bottom: var(--space-md);
  border-top: 4px solid var(--gold);
}
.m-donut { width: 100%; max-width: 270px; margin: 0 auto; }
.dn-svg { display: block; width: 100%; height: auto; overflow: visible; }
.dn-seg { cursor: pointer; transition: stroke-width 0.2s ease, opacity 0.2s ease, stroke-dasharray 1s ease; outline: none; }
.m-donut:not(.is-ready) .dn-seg { stroke-dasharray: 0 100 !important; }
.dn-seg:hover, .dn-seg:focus-visible, .dn-seg.is-active { stroke-width: 6.6; }
.dn-seg.is-dim { opacity: 0.3; }
.dn-seg:focus-visible { filter: drop-shadow(0 0 1px #000); }
.dn-num { font-family: var(--font-header); font-size: 8px; font-weight: 700; fill: var(--maroon); }
.dn-lbl { font-family: var(--font-body); font-size: 2.7px; fill: var(--muted); }
.m-legend-title { font-family: var(--font-header); color: var(--maroon); font-size: 1.3rem; margin-bottom: var(--space-sm); padding-bottom: 0.4rem; border-bottom: 2px solid var(--gold); display: inline-block; }
.m-legend ul { display: flex; flex-direction: column; gap: 0.35rem; }
.lg-btn {
  width: 100%; display: grid; grid-template-columns: 14px 1fr auto 3.2rem; gap: 0.7rem; align-items: center;
  background: var(--bg-soft); border: 1px solid transparent; border-radius: var(--radius-sm); padding: 0.55rem 0.8rem;
  font-family: var(--font-body); font-size: 1rem; color: var(--ink); cursor: pointer; text-align: right;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.lg-btn:hover { background: #f3ecdf; border-color: var(--gold); }
.lg-btn.is-active { background: #fff; border-color: var(--maroon); box-shadow: 0 2px 10px var(--shadow); }
.lg-dot { width: 14px; height: 14px; border-radius: 50%; }
.lg-name { font-weight: 600; }
.lg-count { font-weight: 700; color: var(--maroon); }
.lg-pct { color: var(--muted); font-size: 0.9rem; text-align: left; }
.m-legend-hint { color: var(--muted); font-size: 0.82rem; margin-top: 0.6rem; }

.martyrs-toolbar2 {
  display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 0.8rem;
}
.martyrs-toolbar2 .mt-search { flex: 1 1 240px; }
.martyrs-toolbar2 input[type="search"], .martyrs-toolbar2 select {
  width: 100%; padding: 0.6rem 0.9rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 0.95rem; background: var(--white); color: var(--ink);
}
.martyrs-toolbar2 select { width: auto; min-width: 130px; }
.martyrs-toolbar2 input:focus, .martyrs-toolbar2 select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184, 144, 47, 0.15); }
.m-count { color: var(--muted); font-size: 0.9rem; margin: 0.8rem 0.2rem 0; }

.m-section { margin-top: var(--space-lg); }
.m-section-title {
  display: flex; align-items: baseline; gap: 0.6rem; font-family: var(--font-header); color: var(--maroon);
  font-size: 1.4rem; margin-bottom: var(--space-md); padding-bottom: 0.5rem; border-bottom: 2px solid var(--border); position: relative;
}
.m-section-title::after { content: ''; position: absolute; bottom: -2px; right: 0; width: 70px; height: 2px; background: var(--gold); }
.m-section-title em { font-style: normal; font-family: var(--font-body); color: var(--muted); font-size: 0.95rem; }

.martyrs-grid2 { grid-template-columns: repeat(4, 1fr); gap: 1.1rem; align-items: start; }
.mcard {
  background: #fffdf9; border: 1px solid var(--border); border-top: 3px solid var(--gold); border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column; box-shadow: 0 3px 14px var(--shadow); transition: transform var(--transition), box-shadow var(--transition);
}
.mcard:hover { transform: translateY(-4px); box-shadow: 0 10px 26px var(--shadow-strong); }
.mc-photo {
  position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; padding: 0; border: 0; cursor: zoom-in;
  background: var(--maroon-dark); overflow: hidden;
}
.mc-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; transition: transform 0.5s ease; }
.mcard:hover .mc-photo img { transform: scale(1.04); }
.mc-photo::after { content: ''; position: absolute; inset: auto 0 0 0; height: 35%; background: linear-gradient(transparent, rgba(46, 12, 18, 0.45)); pointer-events: none; }
.mc-cause {
  position: absolute; top: 0.6rem; right: 0.6rem; z-index: 2; background: var(--cc, var(--maroon)); color: #fff;
  font-family: var(--font-body); font-size: 0.74rem; font-weight: 700; padding: 0.18rem 0.7rem; border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.35);
}
.mc-orn {
  position: relative; height: 92px; display: flex; align-items: center; justify-content: center; color: var(--gold-light);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M24 2 L46 24 L24 46 L2 24 Z M24 12 L36 24 L24 36 L12 24 Z' fill='none' stroke='%23d4af4a' stroke-width='0.8' opacity='0.2'/%3E%3C/svg%3E"),
    linear-gradient(135deg, var(--maroon) 0%, var(--maroon-dark) 100%);
}
.mc-body { padding: 0.9rem 0.8rem 1.05rem; text-align: center; display: flex; flex-direction: column; gap: 0.4rem; }
.mc-name { font-family: var(--font-header); font-size: 1.12rem; line-height: 1.6; color: var(--maroon); }
.mc-name::after { content: ''; display: block; width: 36px; height: 2px; background: var(--gold); margin: 0.45rem auto 0; }
.mc-meta { display: flex; flex-direction: column; gap: 0.15rem; font-size: 0.82rem; color: var(--muted); }
.mc-date { color: var(--gold-dark); font-weight: 700; }
.martyrs-grid2.is-compact .mc-orn { height: 74px; }

@media (max-width: 1000px) { .martyrs-grid2 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) {
  .m-stats { grid-template-columns: 1fr; padding: var(--space-md); }
  .martyrs-grid2 { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
  .mc-name { font-size: 0.98rem; }
  .mc-meta { font-size: 0.75rem; }
  .mc-cause { font-size: 0.68rem; padding: 0.12rem 0.55rem; }
  .martyrs-toolbar2 select { flex: 1 1 45%; }
}
@media (prefers-reduced-motion: reduce) { .dn-seg { transition: none; } .hero-slider .slide img { transition: none; } }

.page-subtitle { text-align: center; color: var(--muted); max-width: 720px; margin: calc(-1 * var(--space-lg)) auto var(--space-lg); line-height: 1.9; }
.page-container .page-subtitle { margin-top: calc(-1 * var(--space-lg)); }

/* ============================================================
   لوحة التحكم v2 (متصلة بالخادم)
   ============================================================ */
[hidden] { display: none !important; }
.admin-topbar {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.8rem;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 0.7rem 1rem; margin-bottom: var(--space-md); box-shadow: 0 2px 10px var(--shadow);
}
.admin-topbar-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.admin-tabs { gap: 0.2rem; }
.admin-tab { padding: 0.7rem 0.9rem; white-space: nowrap; }
.admin-tab:hover { color: var(--maroon); background: var(--bg-soft); }
.admin-section { display: block; }
.admin-section + .admin-section { margin-top: var(--space-md); }
.admin-section h3 small { font-family: var(--font-body); font-size: 0.8rem; color: var(--muted); font-weight: 400; margin-right: 0.5rem; }

.crud-card { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-md); margin-bottom: var(--space-md); }
.crud-card > summary { cursor: pointer; font-weight: 700; color: var(--maroon); list-style: none; }
.crud-card > summary::-webkit-details-marker { display: none; }
.crud-card > summary::before { content: '＋ '; color: var(--gold-dark); }
.crud-card[open] > summary::before { content: '－ '; }
.crud-card h4 { color: var(--maroon); margin-bottom: var(--space-sm); font-family: var(--font-header); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--space-sm); }
.field-help { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 0.25rem; }
.form-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: var(--space-sm); align-items: center; }
.check-line { display: flex; align-items: center; gap: 0.5rem; }
.check-line input { width: auto; accent-color: var(--maroon); }

.img-field { display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; }
.img-preview { width: 120px; height: 90px; border: 1px dashed var(--border); border-radius: var(--radius-sm); background: var(--white) center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 0.75rem; overflow: hidden; flex-shrink: 0; }
.img-preview img { width: 100%; height: 100%; object-fit: cover; }
.img-actions { display: flex; flex-direction: column; gap: 0.4rem; align-items: flex-start; }
.img-status { font-size: 0.8rem; color: var(--muted); }
.img-multi { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.5rem; }
.img-multi .thumb { position: relative; width: 80px; height: 80px; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.img-multi .thumb img { width: 100%; height: 100%; object-fit: cover; }
.img-multi .thumb button { position: absolute; top: 2px; left: 2px; border: 0; width: 22px; height: 22px; border-radius: 50%; background: rgba(155, 34, 38, 0.92); color: #fff; cursor: pointer; line-height: 1; }

.admin-item { align-items: center; }
.admin-item .item-thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--white); border: 1px solid var(--border); }
.admin-item .item-thumb.empty { display: flex; align-items: center; justify-content: center; font-size: 1.4rem; color: var(--gold-dark); }
.admin-item .item-info > span { display: block; }
.pill { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 0.1rem 0.55rem; border-radius: 99px; background: #fff3d6; color: #7a5200; border: 1px solid #e4c373; margin-right: 0.3rem; }
.pill.ok { background: #e3f3ea; color: #1e5a3f; border-color: #a9d6bd; }
.list-tools { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: var(--space-sm); align-items: center; }
.list-tools input[type="search"] { flex: 1 1 220px; padding: 0.55rem 0.8rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: var(--font-body); }
.muted { color: var(--muted); font-size: 0.88rem; }
.admin-box { background: #fff8e7; border: 1px solid var(--gold); border-radius: var(--radius-sm); padding: var(--space-sm) var(--space-md); font-size: 0.9rem; line-height: 1.9; margin-bottom: var(--space-md); }
.admin-box.ok { background: #eaf6ef; border-color: #a9d6bd; }
.admin-box.err { background: #fdecec; border-color: #e3a8a8; }
.admin-box ul { list-style: disc; padding-right: 1.4rem; }
.import-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.6rem; margin: var(--space-sm) 0; }
.import-stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.6rem; text-align: center; }
.import-stat b { display: block; font-size: 1.5rem; color: var(--maroon); font-family: var(--font-header); }
.import-stat span { font-size: 0.8rem; color: var(--muted); }
.progress { height: 10px; background: var(--border); border-radius: 99px; overflow: hidden; margin: 0.6rem 0; }
.progress > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--maroon), var(--gold)); transition: width 0.3s; }
.rate-row { display: grid; grid-template-columns: 90px 1fr 120px 1fr 1fr auto; gap: 0.5rem; align-items: end; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.7rem; margin-bottom: 0.5rem; }
.rate-row label { font-size: 0.78rem; color: var(--muted); display: block; margin-bottom: 0.2rem; }
.rate-row input, .rate-row select { width: 100%; padding: 0.45rem; border: 1px solid var(--border); border-radius: 4px; font-family: var(--font-body); background: #fff; }
.rate-live { font-size: 0.8rem; color: #1e5a3f; }
.admin-section textarea, .admin-section input[type="text"], .admin-section input[type="date"], .admin-section input[type="number"], .admin-section input[type="password"], .admin-section input[type="url"], .admin-section select { max-width: 100%; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.data-table th, .data-table td { padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--border); text-align: right; }
.data-table th { background: var(--bg-soft); color: var(--maroon); }
.btn.is-busy { opacity: 0.6; pointer-events: none; }
@media (max-width: 800px) { .rate-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .admin-item { flex-wrap: wrap; } .admin-item .item-actions { width: 100%; } .admin-tabs { flex-wrap: nowrap; overflow-x: auto; } }

/* ألوان الروابط داخل الفوتر الداكن (كانت عنابية فلا تُرى على الخلفية) */
.site-footer a { color: var(--white); }
.site-footer a:hover { color: var(--gold-light); }
.site-footer .contact-item a { color: var(--white); text-decoration: underline; text-decoration-color: rgba(212,175,74,.5); text-underline-offset: 3px; }

.admin-item[data-id] { cursor: pointer; }
.admin-item[data-id]:hover { border-color: var(--gold); }


/* ============================================================
   ترويسة الجوال: لوغو وخطوط أكبر + قائمة منسدلة على اليسار
   ============================================================ */
@media (max-width: 992px) {
  .site-header { padding: 0.7rem 0.6rem; }
  .site-header .header-inner { gap: 0.5rem; }
  .site-header .header-logo img { width: auto; height: 76px; }
  .site-header .header-side { line-height: 1.45; text-wrap: balance; }
  .site-header .header-side .line1 { font-size: 1.05rem; margin-bottom: 0.15rem; }
  .site-header .header-side .line2 { font-size: 0.9rem; padding: 0; }
  .site-header .header-logo .logo-note { font-size: 0.95rem; opacity: 0.95; }
}
@media (max-width: 600px) {
  .site-header { padding: 0.65rem 0.5rem; }
  .site-header .header-logo img { height: 84px; }
  .site-header .header-side .line1 { font-size: 0.98rem; }
  .site-header .header-side .line2 { font-size: 0.85rem; }
  .site-header .header-logo .logo-note { font-size: 0.9rem; }
}

.nav-toggle .burger { display: none; }
@media (max-width: 900px) {
  .main-nav { display: flex; justify-content: flex-start; padding: 0.4rem 0.75rem; }   /* flex-start = يمين الشاشة (RTL) ، flex-end = يسارها */
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 0.65rem;
    width: auto; text-align: start; cursor: pointer;
    padding: 0.5rem 1rem 0.5rem 0.9rem; font: inherit; font-size: 1rem; font-weight: 700;
    color: var(--white); background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(212, 175, 74, 0.5); border-radius: 999px;
    transition: background var(--transition), border-color var(--transition);
  }
  .nav-toggle:hover, .nav-toggle[aria-expanded="true"] { background: rgba(212, 175, 74, 0.22); border-color: var(--gold-light); }
  .nav-toggle .burger { display: flex; flex-direction: column; justify-content: space-between; width: 20px; height: 14px; }
  .nav-toggle .burger i { display: block; height: 2px; border-radius: 2px; background: var(--gold-light); transition: transform 0.25s ease, opacity 0.2s ease; }
  .nav-toggle[aria-expanded="true"] .burger i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .burger i:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] .burger i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .nav-list {
    display: none; position: absolute; top: calc(100% + 6px); right: 0.75rem; left: auto;
    width: min(290px, calc(100vw - 1.5rem)); margin: 0;
    flex-direction: column; flex-wrap: nowrap; justify-content: flex-start; padding: 0.4rem;
    background: var(--maroon-dark); border: 1px solid rgba(212, 175, 74, 0.5); border-radius: 14px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.38);
    max-height: calc(100vh - 150px); overflow-y: auto;
  }
  .nav-list.open { display: flex; animation: navDrop 0.22s ease; }
  .nav-list li { width: 100%; }
  .nav-list a { padding: 0.8rem 1rem; font-size: 1rem; border-radius: 10px; border-bottom: 0; }
  .nav-list a:hover { background: rgba(255, 255, 255, 0.09); color: var(--gold-light); }
  .nav-list a.active { background: rgba(212, 175, 74, 0.18); color: var(--gold-light); }
}
@keyframes navDrop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .nav-list.open { animation: none; } }

/* ============================================================
   الفوتر: بطاقات متناسقة (تواصل · صفحات الموقع · الخريطة)
   ============================================================ */
.site-footer { padding: var(--space-lg) var(--space-md) 0; }
.site-footer .footer-inner {
  max-width: 1400px; margin: 0 auto; padding-bottom: var(--space-md);
  display: grid; grid-template-columns: 1.1fr 1fr 1.2fr; gap: 1rem; align-items: stretch;
}
.footer-card {
  display: flex; flex-direction: column; min-width: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 74, 0.28); border-radius: 16px; padding: 0.9rem 1rem 1rem;
}
.footer-card h3 {
  font-family: var(--font-header); font-size: 1.05rem; color: var(--gold-light);
  margin: 0 0 0.7rem; padding: 0 0 0.5rem; border-bottom: 1px solid rgba(212, 175, 74, 0.28);
}
.contact-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.contact-tile {
  display: flex; align-items: center; gap: 0.55rem; min-width: 0;
  padding: 0.5rem 0.6rem; border-radius: 12px; text-decoration: none;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(212, 175, 74, 0.2);
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.contact-tile.is-mail { grid-column: 1 / -1; }
.contact-tile:hover { background: rgba(212, 175, 74, 0.18); border-color: var(--gold); transform: translateY(-2px); }
.ct-ico {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold); color: var(--maroon-dark);
}
.ct-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.ct-label { font-size: 0.72rem; color: var(--gold-light); }
.ct-value { font-size: 0.92rem; font-weight: 700; color: var(--white); overflow-wrap: anywhere; direction: ltr; text-align: right; unicode-bidi: plaintext; }
.footer-contact .social-links { margin-top: 0.7rem; justify-content: flex-start; }

.page-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem; }
.page-tiles a {
  display: flex; align-items: center; justify-content: space-between; gap: 0.4rem;
  padding: 0.55rem 0.75rem; border-radius: 12px; font-size: 0.92rem; font-weight: 600;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(212, 175, 74, 0.2);
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.page-tiles a b { color: var(--gold); font-size: 1.1rem; line-height: 1; transition: transform var(--transition); }
.page-tiles a:hover { background: rgba(212, 175, 74, 0.18); border-color: var(--gold); transform: translateY(-2px); }
.page-tiles a:hover b { transform: translateX(-3px); }

.footer-mapcard .footer-map { margin: 0; flex: 1; min-height: 190px; border-radius: 12px; border: 1px solid rgba(212, 175, 74, 0.28); position: relative; }
.footer-mapcard .footer-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

@media (max-width: 992px) {
  .site-footer .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-mapcard { grid-column: 1 / -1; }
  .footer-mapcard .footer-map { min-height: 200px; }
}
@media (max-width: 600px) {
  .site-footer { padding: var(--space-md) 0.6rem 0; }
  .site-footer .footer-inner { grid-template-columns: 1fr; gap: 0.7rem; }
  .footer-card { padding: 0.75rem 0.8rem 0.85rem; border-radius: 14px; }
  .footer-card h3 { font-size: 1rem; margin-bottom: 0.55rem; padding-bottom: 0.4rem; }
  .page-tiles a { padding: 0.5rem 0.65rem; font-size: 0.88rem; }
  .ct-ico { width: 30px; height: 30px; }
  .ct-ico svg { width: 16px; height: 16px; }
  .footer-mapcard .footer-map { min-height: 150px; }
}

.contact-tiles .social-links {
  margin: 0; display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.4rem 0.5rem; border-radius: 12px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(212, 175, 74, 0.2);
}
.contact-tiles .social-links a { width: 34px; height: 34px; }
@media (max-width: 600px) {
  .site-footer { padding-top: 0.8rem; }
  .site-footer .footer-inner { gap: 0.5rem; padding-bottom: 0.7rem; }
  .footer-card { padding: 0.6rem 0.7rem 0.7rem; }
  .footer-card h3 { margin-bottom: 0.45rem; padding-bottom: 0.35rem; font-size: 0.98rem; }
  .contact-tiles, .page-tiles { gap: 0.4rem; }
  .contact-tile { padding: 0.38rem 0.5rem; gap: 0.45rem; }
  .ct-ico { width: 28px; height: 28px; }
  .ct-value { font-size: 0.88rem; }
  .page-tiles a { padding: 0.42rem 0.6rem; font-size: 0.86rem; }
  .contact-tiles .social-links a { width: 30px; height: 30px; }
  .footer-mapcard .footer-map { min-height: 130px; }
}


/* ===== الصورة الافتراضية لبطاقة الشهيد: شعار البلدة على خلفية عنابية ===== */
.mc-photo.is-default {
  cursor: default; display: flex; align-items: center; justify-content: center;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M24 2 L46 24 L24 46 L2 24 Z M24 12 L36 24 L24 36 L12 24 Z' fill='none' stroke='%23d4af4a' stroke-width='0.8' opacity='0.18'/%3E%3C/svg%3E"),
    radial-gradient(circle at 50% 42%, #6b2a35 0%, #3a1018 70%, #2e0c12 100%);
}
.mc-photo.is-default::before {
  content: ''; position: absolute; inset: 9px; border: 1px solid rgba(212, 175, 74, 0.45); border-radius: 10px; pointer-events: none;
}
.mc-photo.is-default img {
  width: 54%; height: auto; max-height: 60%; object-fit: contain; object-position: center;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.45)); opacity: 0.96;
}
.mcard:hover .mc-photo.is-default img { transform: none; }
.mc-know {
  align-self: center; margin-top: 0.3rem; font-size: 0.78rem; font-weight: 700; color: var(--maroon);
  border: 1px solid var(--gold); border-radius: 999px; padding: 0.22rem 0.8rem; background: rgba(184, 144, 47, 0.1);
  transition: background var(--transition), color var(--transition);
}
.mc-know:hover { background: var(--maroon); color: #fff; }
.m-section-note { color: var(--muted); font-size: 0.92rem; margin: -0.4rem 0 var(--space-md); line-height: 1.8; }

.gold-title { font-family: var(--font-header); color: var(--maroon); font-size: 1rem; margin: 1rem 0 0.4rem; padding-top: 0.8rem; border-top: 1px dashed var(--border); }
.gold-table td.gold-syp, .gold-table td.gold-usd { font-weight: 700; direction: ltr; text-align: center; }
.gold-table td:first-child::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); margin-inline-end: 0.5rem; }

/* ============================================================
   نافذة التعريف (بطاقة الشهيد / عنصر الأرشيف)
   ============================================================ */
.mc-photo { cursor: pointer; }
.mc-photo.is-default { cursor: pointer; }
.mcard { cursor: pointer; }
.mcard.is-unnamed { cursor: default; }
.mc-open, .card-open { all: unset; cursor: pointer; display: inline; color: inherit; font: inherit; text-align: inherit; }
.mc-open:hover, .card-open:hover { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 5px; }
.mc-open:focus-visible, .card-open:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.mc-more, .card-more {
  align-self: center; margin-top: 0.15rem; font-size: 0.78rem; font-weight: 700; color: var(--gold-dark);
}
.card-more { display: inline-block; margin-top: 0.6rem; }
.card.is-clickable { cursor: pointer; }

.dm-overlay {
  position: fixed; inset: 0; z-index: 2900; display: none; align-items: center; justify-content: center;
  background: rgba(20, 6, 9, 0.78); padding: 1.2rem; backdrop-filter: blur(3px);
}
.dm-overlay.active { display: flex; animation: dmFade 0.2s ease; }
@keyframes dmFade { from { opacity: 0; } to { opacity: 1; } }
.dm-box {
  position: relative; width: min(920px, 100%); max-height: min(88vh, 760px); background: #fffdf9; border-radius: 16px;
  border-top: 4px solid var(--gold); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); overflow: hidden; display: flex;
}
.dm-scroll { display: grid; grid-template-columns: minmax(240px, 38%) 1fr; width: 100%; overflow-y: auto; overscroll-behavior: contain; }
.dm-close {
  position: absolute; top: 0.7rem; left: 0.7rem; z-index: 5; width: 40px; height: 40px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(74, 21, 30, 0.88); color: #fff; font-size: 1.05rem; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.dm-close:hover { background: var(--maroon-dark); }
.dm-close:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; }
.dm-media {
  display: flex; align-items: center; justify-content: center; align-self: start; position: sticky; top: 0; width: 100%; min-height: 280px;
  max-height: 70vh; padding: 0; border: 0; background: var(--maroon-dark); cursor: zoom-in; overflow: hidden;
}
.dm-media img { width: 100%; height: 100%; max-height: 70vh; object-fit: cover; object-position: center 22%; display: block; }
.dm-media.is-default {
  cursor: default; min-height: 320px;
  background: radial-gradient(circle at 50% 42%, #6b2a35 0%, #3a1018 70%, #2e0c12 100%);
}
.dm-media.is-default img { width: 52%; height: auto; max-height: 50%; object-fit: contain; opacity: 0.96; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.45)); }
.dm-content { padding: 1.6rem 1.7rem 1.5rem; display: flex; flex-direction: column; gap: 0.9rem; min-width: 0; }
.dm-scroll > .dm-content:only-child { grid-column: 1 / -1; }
.dm-badge {
  align-self: flex-start; background: var(--cc, var(--maroon)); color: #fff; font-size: 0.76rem; font-weight: 700;
  padding: 0.2rem 0.8rem; border-radius: 999px;
}
.dm-title { font-family: var(--font-header); color: var(--maroon); font-size: 1.7rem; line-height: 1.55; padding-inline-end: 2.5rem; }
.dm-title::after { content: ''; display: block; width: 54px; height: 3px; background: var(--gold); margin-top: 0.5rem; }
.dm-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.6rem 1rem; margin: 0; }
.dm-facts > div { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 0.5rem 0.75rem; }
.dm-facts dt { font-size: 0.74rem; color: var(--muted); }
.dm-facts dd { margin: 0; font-weight: 700; color: var(--maroon); font-size: 0.95rem; }
.dm-text { line-height: 2; color: var(--ink); font-size: 1rem; }
.dm-text p + p { margin-top: 0.8rem; }
.dm-lead { font-size: 1.08rem; color: var(--maroon-light); border-inline-start: 3px solid var(--gold); padding-inline-start: 0.9rem; }
.dm-empty {
  background: var(--bg-soft); border: 1px dashed var(--gold); border-radius: 10px; padding: 0.9rem 1rem; color: var(--muted); line-height: 1.9; font-size: 0.95rem;
}
.dm-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.4rem; }

@media (max-width: 720px) {
  .dm-overlay { padding: 0; align-items: flex-end; }
  .dm-box { max-height: 92vh; border-radius: 18px 18px 0 0; }
  .dm-scroll { display: block; }
  .dm-media { position: relative; display: flex; height: 36vh; min-height: 0; max-height: none; }
  .dm-media img { height: 100%; max-height: none; }
  .dm-media.is-default { height: 30vh; min-height: 0; }
  .dm-content { padding: 1.2rem 1.1rem 1.4rem; }
  .dm-title { font-size: 1.4rem; padding-inline-end: 0; }
}
@media (max-width: 720px) { .dm-facts { grid-template-columns: repeat(2, 1fr); } .dm-facts > div { padding: 0.45rem 0.6rem; } }


/* ============================================================
   سماء الطقس الواقعية داخل كارد الطقس
   ============================================================ */
.info-card.wx-card {
  position: relative; overflow: hidden; min-height: 320px; color: #fff; border: 0;
  background: linear-gradient(180deg, #2f6fb8 0%, #8fc3ee 100%);
  box-shadow: 0 8px 26px rgba(20, 40, 80, 0.28);
}
.info-card.wx-card[data-wx^="cloudy"], .info-card.wx-card[data-wx^="fog"] { background: linear-gradient(180deg, #6c7a8c 0%, #b4bfca 100%); }
.info-card.wx-card[data-wx^="rain"], .info-card.wx-card[data-wx^="snow"] { background: linear-gradient(180deg, #4d5b6c 0%, #8896a6 100%); }
.info-card.wx-card[data-wx^="storm"] { background: linear-gradient(180deg, #2b323d 0%, #566070 100%); }
.info-card.wx-card[data-wx$="-night"] { background: linear-gradient(180deg, #0a1330 0%, #243a70 100%); }
.wx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; pointer-events: none; }
.info-card.wx-card > :not(.wx-canvas) { position: relative; z-index: 2; }
.wx-card h3 { color: #fff; border-bottom-color: rgba(255, 255, 255, 0.75); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35); }
.wx-card .weather-temp { color: #fff; font-size: 3.6rem; font-weight: 600; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35); }
.wx-card .weather-desc { color: rgba(255, 255, 255, 0.95); font-size: 1.1rem; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35); }
@media (max-width: 900px) { .info-card.wx-card { min-height: 340px; } }

/* ============================================================
   الشعار في الترويسة رابط للرئيسية
   ============================================================ */
a.header-logo { display: block; color: inherit; text-decoration: none; cursor: pointer; transition: transform var(--transition), opacity var(--transition); }
a.header-logo:hover { transform: translateY(-1px); opacity: 0.95; }
a.header-logo:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 4px; border-radius: 10px; }

/* رقم الصورة في المعرض والأرشيف */
.card-img { position: relative; }
.card-no { display: none !important; }


/* ============================================================
   الصفحة الأرشيفية للشهيد (نافذة النبذة) — ورق أرشيف قديم وإطار ذهبي مزدوج
   ============================================================ */
.mc-name a.mc-open { color: inherit; display: inline; }
.mc-name a.mc-open:hover { color: var(--gold-dark); }
a.mc-more { color: var(--gold-dark); text-decoration: none; }
.mcard:hover a.mc-more { color: var(--maroon); }

.dm-overlay { z-index: 3500; }
.dm-box.dm-archival {
  border-top: 0; border-radius: 6px; width: min(960px, 100%);
  background:
    radial-gradient(ellipse at 12% 8%, rgba(255, 255, 255, 0.75), transparent 55%),
    radial-gradient(ellipse at 90% 100%, rgba(184, 144, 47, 0.10), transparent 60%),
    linear-gradient(180deg, #fcf7eb 0%, #f4ebd9 100%);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(184, 144, 47, 0.35);
}
.dm-box.dm-archival::before {            /* الإطار الذهبي المزدوج */
  content: ''; position: absolute; inset: 9px; z-index: 4; pointer-events: none; border-radius: 3px;
  border: 1px solid rgba(184, 144, 47, 0.75); box-shadow: inset 0 0 0 4px rgba(252, 247, 235, 0.0), inset 0 0 0 5px rgba(184, 144, 47, 0.28);
}
.dm-archival .dm-scroll { grid-template-columns: minmax(250px, 36%) 1fr; }

.dm-media-col { position: sticky; top: 0; align-self: start; padding: 2.2rem 1.4rem 1.6rem 0.6rem; display: flex; flex-direction: column; align-items: center; gap: 0.9rem; }
.dm-archival .dm-media {
  position: relative; top: auto; width: 100%; min-height: 0; max-height: none; aspect-ratio: 4 / 5; padding: 0;
  border: 7px solid #fffdf8; outline: 1px solid rgba(138, 106, 32, 0.45); background: var(--maroon-dark);
  box-shadow: 0 10px 26px rgba(60, 30, 10, 0.35), 0 1px 0 rgba(255, 255, 255, 0.8) inset; transform: rotate(-1.2deg);
}
.dm-archival .dm-media::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 38px rgba(40, 20, 5, 0.28); }
.dm-archival .dm-media img { max-height: none; height: 100%; object-position: center 20%; }
.dm-archival .dm-media.is-default { aspect-ratio: 4 / 5; min-height: 0; }
.dm-archival .dm-media.is-default img { width: 56%; height: auto; }
.dm-plate {
  width: 100%; text-align: center; display: flex; flex-direction: column; gap: 0.1rem; padding: 0.5rem 0.4rem;
  border-top: 1px solid rgba(184, 144, 47, 0.6); border-bottom: 1px solid rgba(184, 144, 47, 0.6); color: var(--gold-dark);
}
.dm-plate span { font-size: 0.78rem; letter-spacing: 0.02em; }
.dm-plate b { font-family: var(--font-header); font-size: 1.15rem; color: var(--maroon); font-weight: 700; }

.dm-archival .dm-content { padding: 2.2rem 2rem 1.8rem 1.8rem; gap: 0.85rem; }
.dm-archival .dm-badge { font-size: 0.78rem; }
.dm-archival .dm-title { font-size: 2.1rem; line-height: 1.5; padding-inline-end: 3rem; color: var(--maroon); }
.dm-kicker { margin: -0.4rem 0 0; color: var(--gold-dark); font-size: 0.9rem; font-weight: 600; letter-spacing: 0.02em; }

.dm-timeline { display: flex; align-items: center; gap: 0.5rem; margin: 0.2rem 0 0.3rem; direction: rtl; }
.dm-tl-pt { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; min-width: 74px; text-align: center; }
.dm-tl-pt b { font-family: var(--font-header); font-size: 1.35rem; color: var(--maroon); line-height: 1.2; }
.dm-tl-pt span { font-size: 0.72rem; color: var(--muted); }
.dm-tl-pt::before { content: ''; width: 11px; height: 11px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(184, 144, 47, 0.25); order: 3; margin-top: 0.15rem; }
.dm-tl-pt.is-end::before { background: var(--maroon); box-shadow: 0 0 0 3px rgba(74, 21, 30, 0.2); }
.dm-tl-line { flex: 1; position: relative; height: 0; border-top: 2px dotted rgba(138, 106, 32, 0.6); margin-bottom: 1.1rem; }
.dm-tl-line em { position: absolute; top: -1.45rem; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 0.78rem; color: var(--gold-dark); background: #f8f0df; padding: 0 0.5rem; white-space: nowrap; }

.dm-archival .dm-facts { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.3rem 1.2rem; }
.dm-archival .dm-facts > div { background: transparent; border: 0; border-bottom: 1px dotted rgba(138, 106, 32, 0.55); border-radius: 0; padding: 0.35rem 0.1rem; }
.dm-archival .dm-facts dt { font-size: 0.74rem; color: var(--muted); }
.dm-archival .dm-facts dd { font-size: 1rem; color: var(--ink); }

.dm-sub {
  display: flex; align-items: center; gap: 0.8rem; margin-top: 0.5rem; font-family: var(--font-header); color: var(--maroon); font-size: 1.25rem; font-weight: 700;
}
.dm-sub::after { content: ''; flex: 1; height: 1px; background: linear-gradient(to left, rgba(184, 144, 47, 0.7), transparent); }
.dm-archival .dm-text { font-size: 1.05rem; line-height: 2.05; }
.dm-archival .dm-lead { background: rgba(184, 144, 47, 0.07); padding: 0.55rem 0.9rem; border-radius: 0 8px 8px 0; }
.dm-archival .dm-empty { background: rgba(255, 253, 248, 0.7); border-color: rgba(184, 144, 47, 0.7); }
.dm-verse { text-align: center; font-family: var(--font-header); color: var(--gold-dark); font-size: 1.12rem; line-height: 2; margin-top: 0.4rem; padding-top: 0.7rem; border-top: 1px solid rgba(184, 144, 47, 0.45); }
.dm-nav { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-top: 0.4rem; color: var(--muted); font-size: 0.85rem; }

@media (max-width: 720px) {
  .dm-archival .dm-scroll { display: block; }
  .dm-box.dm-archival { border-radius: 16px 16px 0 0; }
  .dm-media-col { position: relative; padding: 2.6rem 3.2rem 0.4rem; }
  .dm-archival .dm-media { aspect-ratio: 1 / 1; max-height: 42vh; transform: none; margin: 0 auto; width: auto; max-width: 100%; }
  .dm-archival .dm-media img { width: auto; max-width: 100%; margin: 0 auto; }
  .dm-archival .dm-media.is-default { aspect-ratio: 1 / 1; width: 70%; }
  .dm-archival .dm-content { padding: 1rem 1.1rem 1.6rem; }
  .dm-archival .dm-title { font-size: 1.55rem; padding-inline-end: 0; }
  .dm-close { top: 0.8rem; left: 0.8rem; }
  .dm-tl-pt { min-width: 62px; }
}
@media print { .dm-overlay { position: static; background: none; } .dm-close, .dm-actions, .dm-nav { display: none; } }
/* رابط الموقع الشخصي في الشريط السفلي */
.designer-bar .designer-site {
  display: block;
  width: fit-content;
  margin: 0.25rem auto 0;
  padding: 0.1rem 0.2rem;
  font-weight: 300;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: rgba(240, 217, 140, 0.75);
  text-decoration: none;
  border-bottom: 1px solid rgba(240, 217, 140, 0.3);
  transition: color 0.25s ease, border-color 0.25s ease;
}
.designer-bar .designer-site::after {
  content: " ↗️";
  font-size: 0.75em;
}
.designer-bar .designer-site:hover,
.designer-bar .designer-site:focus-visible {
  color: #fff;
  border-bottom-color: var(--gold-light);
}
@media (max-width: 700px) {
  .designer-bar .designer-site { font-size: 0.75rem; }
}
/* ===== قائمة الهاتف: ظاهرة دائماً (بدون زر الثلاث خطوط) — مدمجة: 4 أزرار في كل صف ===== */
@media (max-width: 900px) {
  .nav-toggle { display: none !important; }
  .main-nav {
    position: static;
    display: block;
    padding: 0.35rem 0.4rem 0.4rem;
  }
  .nav-list,
  .nav-list.open {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    position: static;
    width: auto;
    max-height: none;
    overflow: visible;
    margin: 0;
    padding: 0;
    gap: 0.25rem;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    animation: none;
  }
  .nav-list li { width: auto; }
  .nav-list a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.25rem 0.2rem;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    color: var(--white);
    border: 1px solid transparent;
    border-radius: 8px;
  }
  .nav-list a:hover,
  .nav-list a:active { background: rgba(255, 255, 255, 0.1); color: var(--gold-light); }
  .nav-list a.active {
    color: var(--gold-light);
    background: rgba(212, 175, 74, 0.16);
    border-color: rgba(212, 175, 74, 0.7);
  }
}
@media (max-width: 340px) {
  .nav-list a { font-size: 0.74rem; }
}