/* Areeka — Classic rebuild styles (RTL) */
:root {
  --ink: #20201d;
  --muted: #6b6a63;
  --paper: #f7f5ef;
  --card: #ffffff;
  --brand: #137a3b;
  --brand-dark: #0d5c2c;
  --line: #e5e1d5;
  --radius: 10px;
  --shadow: 0 1px 4px rgba(30, 28, 20, .08);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.8;
}
img { max-width: 100%; height: auto; }
a { color: var(--brand-dark); }
.container { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

.skip-link {
  position: absolute; right: -9999px; top: 0; background: var(--brand-dark);
  color: #fff; padding: 8px 14px; border-radius: 0 0 8px 8px; z-index: 50;
}
.skip-link:focus { right: 0; }

/* Header */
.site-header { background: var(--brand-dark); color: #fff; }
.header-inner { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand img { border-radius: 8px; background: #fff; }
.brand strong { display: block; font-size: 1.35rem; line-height: 1.2; }
.brand small { display: block; color: #d7ead9; font-size: .78rem; }
.header-search { margin-inline-start: auto; display: flex; gap: 6px; }
.header-search input {
  border: 0; border-radius: 20px; padding: 8px 16px; min-width: 180px; font-size: .95rem;
}
.header-search button {
  border: 0; border-radius: 20px; background: #fff; color: var(--brand-dark);
  padding: 8px 18px; cursor: pointer; font-weight: 700;
}
.main-nav { background: rgba(0, 0, 0, .18); }
.main-nav .container { display: flex; flex-wrap: wrap; gap: 2px 18px; padding-top: 6px; padding-bottom: 6px; }
.main-nav a { color: #fff; text-decoration: none; font-size: .95rem; padding: 4px 2px; border-bottom: 2px solid transparent; }
.main-nav a:hover { border-bottom-color: #fff; }

.page-wrap { padding-top: 22px; padding-bottom: 34px; min-height: 55vh; }

/* Ad slots */
.ad-band-top, .ad-band-bottom { display: flex; justify-content: center; margin: 10px 0 22px; }
.ad-slot {
  border: 1px dashed var(--line); border-radius: 8px; overflow: hidden;
  background: var(--card); text-align: center;
}
.ad-slot img { display: block; margin: 0 auto; max-width: 100%; }

/* Page headings */
.page-title { margin: 6px 0 18px; font-size: 1.6rem; }

/* Home list */
.article-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.article-list li { margin: 0; padding: 0; }
.article-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); display: flex; gap: 14px; overflow: hidden;
}
.article-card.vertical { flex-direction: column; }
.article-card img.thumb {
  width: 210px; min-height: 118px; object-fit: cover; flex-shrink: 0;
}
.article-card.vertical img.thumb { width: 100%; min-height: 0; height: 200px; }
.article-card .card-body { padding: 12px 14px; }
.article-card h2, .article-card h3 { margin: 0 0 6px; font-size: 1.15rem; line-height: 1.5; }
.article-card h2 a, .article-card h3 a { color: var(--ink); text-decoration: none; }
.article-card h2 a:hover, .article-card h3 a:hover { color: var(--brand-dark); }
.card-meta { color: var(--muted); font-size: .82rem; margin: 0 0 6px; }
.card-excerpt { margin: 0; color: #3c3b36; font-size: .95rem; }
.flag-featured { display: inline-block; background: #fbe7c2; color: #7a5310; font-size: .72rem; border-radius: 10px; padding: 1px 9px; margin-inline-start: 8px; }

/* Ad between sections on home */
.ad-between { margin: 4px 0; }

/* Article detail */
.article-detail { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.article-detail h1 { margin: 4px 0 8px; font-size: 1.7rem; line-height: 1.5; }
.article-subtitle { color: var(--muted); font-size: 1.05rem; margin: 0 0 10px; }
.detail-meta { color: var(--muted); font-size: .85rem; margin-bottom: 12px; }
.detail-image { width: 100%; border-radius: 8px; margin: 6px 0 14px; }
.news-body p { margin: 0 0 14px; }
.source-credit { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; color: var(--muted); font-size: .85rem; }

/* Category blocks */
.category-head { display: flex; align-items: baseline; gap: 12px; margin: 8px 0 16px; }
.category-head h1 { margin: 0; font-size: 1.5rem; }
.category-desc { color: var(--muted); }

/* Empty / errors */
.empty-state, .error-state { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; text-align: center; color: var(--muted); }

/* Footer */
.site-footer { background: #17181a; color: #cfcfcf; margin-top: 10px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; padding-top: 16px; padding-bottom: 16px; font-size: .9rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.footer-links a { color: #cfcfcf; text-decoration: none; }
.footer-links a:hover { color: #fff; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }
.pagination a, .pagination span { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 6px 14px; text-decoration: none; color: var(--ink); }
.pagination span.current { background: var(--brand-dark); color: #fff; border-color: var(--brand-dark); }

/* Category chips + search form */
.category-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.category-chips a {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 4px 14px; text-decoration: none; color: var(--ink); font-size: .88rem;
}
.category-chips a:hover { border-color: var(--brand); color: var(--brand-dark); }
.search-page-form { display: flex; gap: 8px; margin: 6px 0 16px; }
.search-page-form input {
  flex: 1; border: 1px solid var(--line); border-radius: 20px; padding: 10px 16px; font-size: 1rem;
}
.search-page-form button {
  border: 0; border-radius: 20px; background: var(--brand-dark); color: #fff; padding: 10px 24px; cursor: pointer; font-weight: 700;
}
.featured-card { border: 1px solid #f0d9a8; }

@media (max-width: 640px) {
  .article-card { flex-direction: column; }
  .article-card img.thumb { width: 100%; height: auto; }
  .header-inner { flex-direction: column; align-items: stretch; }
  .header-search { margin-inline-start: 0; }
  .header-search input { flex: 1; min-width: 0; }
}

/* ================= 2026: النشرة + التعليقات + الاتصال ================= */
.hp-field { position: absolute; right: -9999px; top: 0; opacity: 0; height: 0; overflow: hidden; }

.newsletter-band { background: #0d5c2c; color: #fff; padding: 18px 0; }
.newsletter-inner { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: center; position: relative; }
.newsletter-text { display: flex; flex-direction: column; }
.newsletter-text strong { font-size: 1.05rem; }
.newsletter-text span { opacity: .85; font-size: .82rem; }
.newsletter-form { display: flex; gap: 8px; flex-wrap: wrap; }
.newsletter-form input[type="email"] { border: 0; border-radius: 22px; padding: 9px 18px; min-width: 240px; font: inherit; }
.newsletter-form button { border: 0; border-radius: 22px; background: #fbe7c2; color: #7a5310; font-weight: 700; padding: 9px 20px; cursor: pointer; }
.newsletter-msg { position: absolute; left: 50%; transform: translateX(-50%); top: calc(100% + 2px); margin: 0; font-size: .8rem; white-space: nowrap; z-index: 5; }
.newsletter-msg.success { color: #cdebd6; }
.newsletter-msg.error { color: #ffd9d4; }

/* التعليقات */
.comments-section { margin-top: 22px; }
.comments-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.comments-title { font-size: 1.1rem; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; color: var(--brand-dark); }
.comments-flash { padding: 9px 14px; border-radius: 8px; font-size: .9rem; }
.flash-success { background: #e7f3ea; color: #0d5c2c; border: 1px solid #bfe0cb; }
.flash-info { background: #e5f1f9; color: #0f5380; border: 1px solid #bcd9ec; }
.flash-danger { background: #fdecea; color: #8c1d17; border: 1px solid #f3b4af; }
.comments-list { list-style: none; margin: 0 0 18px; padding: 0; counter-reset: none; }
.comment-item { border-bottom: 1px dashed var(--line); padding: 12px 0; }
.comment-item:last-child { border-bottom: 0; }
.comment-head { display: flex; align-items: center; gap: 10px; }
.comment-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-dark); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: 0 0 36px; }
.comment-head b { color: var(--ink); }
.comment-date { display: block; font-size: .72rem; color: var(--muted); }
.comment-body { margin: 8px 0 0 46px; line-height: 1.8; }
.comments-empty { color: var(--muted); text-align: center; padding: 12px; }
.comment-form-title { font-size: .95rem; margin: 0 0 10px; }
.comment-fields { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.comment-fields input { flex: 1; min-width: 180px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font: inherit; }
.comment-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; box-sizing: border-box; }
.comment-form button { border: 0; border-radius: 10px; background: var(--brand); color: #fff; padding: 9px 22px; font-weight: 700; cursor: pointer; margin-top: 10px; }
.comment-form button:hover { background: var(--brand-dark); }
.comment-note { color: var(--muted); font-size: .75rem; margin: 6px 0 0; }
.ltr-input { direction: ltr; text-align: left; }

/* صفحة اتصل بنا */
.contact-page { max-width: 720px; }
.contact-ok, .contact-errors { border-radius: 10px; padding: 12px 16px; margin-bottom: 14px; font-size: .92rem; }
.contact-ok { background: #e7f3ea; color: #0d5c2c; border: 1px solid #bfe0cb; }
.contact-errors { background: #fdecea; color: #8c1d17; border: 1px solid #f3b4af; }
.contact-errors p { margin: 4px 0; }
.contact-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.contact-intro { color: var(--muted); }
.contact-form label { display: block; margin-bottom: 14px; font-weight: 700; font-size: .9rem; }
.contact-form .cf-row { display: flex; gap: 14px; flex-wrap: wrap; }
.contact-form .cf-row label { flex: 1; min-width: 220px; }
.contact-form input, .contact-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font: inherit; margin-top: 5px; box-sizing: border-box; }
.contact-form button { border: 0; border-radius: 12px; background: var(--brand-dark); color: #fff; font-weight: 700; padding: 11px 26px; cursor: pointer; }
.req { color: #c0392b; }

/* صفحة إلغاء الاشتراك */
.unsub-page { display: flex; justify-content: center; }
.unsub-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; text-align: center; max-width: 480px; width: 100%; }
.unsub-icon { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; background: var(--line); color: var(--muted); }
.unsub-icon.success { background: #e7f3ea; color: var(--brand-dark); }
.unsub-card h1 { font-size: 1.3rem; }
.unsub-card p { color: var(--muted); }
.unsub-back { color: var(--brand-dark); font-weight: 700; }
