@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Cairo:wght@400;600;700&display=swap');

:root {
  --red: #b3121b;
  --red-dark: #8a0e15;
  --red-light: #f6d9db;
  --white: #ffffff;
  --off-white: #faf8f8;
  --text: #2a2a2a;
  --muted: #6b6b6b;
  --border: #e7d4d5;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #eee5e5;
  color: var(--text);
  font-family: 'Cairo', 'Amiri', 'Tahoma', sans-serif;
  direction: rtl;
  line-height: 1.9;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header */
.site-header {
  background-color: var(--red);
  background-image: url('../entete_afkarwakitabat.jpg');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  color: var(--white);
  padding: 0;
  border-bottom: 4px solid var(--red-dark);
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.site-logo {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--white);
  padding: 4px;
}

.site-title {
  font-size: 1.9rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.5px;
}

.site-title a {
  color: var(--white);
}

.site-tagline {
  font-size: 0.95rem;
  color: var(--red-light);
  margin: 0;
}

/* Nav */
.site-nav {
  background: var(--off-white);
  border-bottom: 1px solid var(--border);
}

.site-nav ul {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  list-style: none;
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
}

.site-nav a {
  display: inline-block;
  padding: 14px 4px;
  font-weight: 600;
  color: var(--red-dark);
  border-bottom: 3px solid transparent;
  transition: border-color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  border-bottom-color: var(--red);
}

/* Main container */
main {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

/* Hero on homepage */
.hero {
  text-align: center;
  padding: 30px 10px 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.hero h2 {
  font-size: 1.6rem;
  color: var(--red-dark);
  margin: 0 0 10px;
}

.hero p {
  color: #8e0c0c;
  max-width: 620px;
  margin: 0 auto;
}

/* Article cards list */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.article-card {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-right: 6px solid var(--red);
  border-radius: 6px;
  padding: 22px 26px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.article-card:hover {
  box-shadow: 0 4px 14px rgba(179, 18, 27, 0.12);
  transform: translateY(-2px);
}

.article-card h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
  color: var(--red-dark);
}

.article-card h3 a:hover {
  text-decoration: underline;
}

.article-card p.excerpt {
  color: var(--muted);
  margin: 0 0 12px;
  font-size: 0.98rem;
}

.read-more {
  display: inline-block;
  font-weight: 700;
  color: var(--red);
  font-size: 0.92rem;
}

.read-more::after {
  content: " ←";
}

/* Article page */
.breadcrumb {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 18px;
}

.breadcrumb a {
  color: var(--red);
}

article.post h1 {
  font-size: 1.7rem;
  color: var(--red-dark);
  border-bottom: 3px solid var(--red);
  padding-bottom: 14px;
  margin-bottom: 30px;
  line-height: 1.6;
}

.post-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.92rem;
  margin: -18px 0 26px;
}

.post-meta .post-author {
  color: var(--red-dark);
  font-weight: 700;
}

.post-image {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  margin: 0 0 26px;
}

.post-image-full {
  max-height: none;
  height: auto;
  object-fit: contain;
  margin: 0 auto 26px;
}

article.post .content p {
  margin: 0 0 20px;
  text-align: justify;
  font-size: 1.5rem;
}

article.post .content {
  font-family: 'Amiri', serif;
}

article.post .content h2 {
  color: var(--red-dark);
  font-size: 1.25rem;
  margin: 34px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

article.post .content p.ref-note {
  font-family: 'Cairo', sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
  background: var(--off-white);
  border-right: 3px solid var(--border);
  padding: 8px 14px;
  margin: -6px 0 20px;
  line-height: 1.6;
}

article.post .content ul.ref-list {
  margin: 0 0 20px;
  padding-right: 22px;
  color: var(--text);
  font-size: 0.98rem;
}

article.post .content ul.ref-list li {
  margin-bottom: 8px;
}

article.post .content sup a {
  color: var(--red);
  font-weight: 700;
  text-decoration: none;
}

article.post .content .footnotes {
  margin-top: 40px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-family: 'Cairo', sans-serif;
}

article.post .content .footnotes ol {
  padding-right: 20px;
  font-size: 0.92rem;
  color: var(--muted);
}

article.post .content .footnotes li {
  margin-bottom: 8px;
}

article.post .content .footnotes .fn-back {
  color: var(--red);
  margin-right: 4px;
}

.post-nav {
  margin-top: 50px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.post-nav a {
  color: var(--red);
  font-weight: 700;
}

/* About / Contact pages */
.page-content h2 {
  color: var(--red-dark);
  font-size: 1.4rem;
  margin-top: 0;
}

.page-content p {
  font-size: 1.03rem;
}

/* Footer */
.site-footer {
  background: var(--red);
  color: var(--red-light);
  text-align: center;
  padding: 24px 20px;
  font-size: 0.9rem;
  border-top: 4px solid var(--red-dark);
}

.site-footer a {
  color: var(--white);
  font-weight: 600;
}

@media (max-width: 600px) {
  .site-title {
    font-size: 1.5rem;
  }
  main {
    padding: 28px 16px 50px;
  }
  .article-card {
    padding: 18px;
  }
}
