/*
Theme Name: Tatar Travian Blog
Theme URI: https://tatar-sa.com
Author: Basel / ChatGPT
Author URI: https://tatar-sa.com
Description: قالب مدونة مستوحى من لعبة ترافيان، مخصص لمحتوى ملوك التتار وسيرفرات Tatar-SA.
Version: 1.0
Text Domain: tatar-travian-blog
*/

:root {
  --bg-parchment: #f5efe0;
  --bg-body: #efe3cf;
  --green: #5f8a3b;
  --green-dark: #3f5f2b;
  --brown: #7a4b27;
  --brown-dark: #4e2f19;
  --gold: #d1a348;
  --red: #b03329;
  --text-main: #2b2520;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #f9f4e2 0, #e7dcc6 40%, #d4c4a5 100%);
  color: var(--text-main);
  padding: 0;
  direction: rtl;
  text-align: right;
}

a {
  text-decoration: none;
  color: inherit;
}

/* شريط علوي */

.top-bar {
  background: linear-gradient(to bottom, #faf2dc, #e1cfad);
  border-bottom: 2px solid #d0b68e;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #5b4a32;
}

.top-pill {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 4px 10px;
  border: 1px solid #d7c39d;
}

.top-bar-actions {
  display: flex;
  gap: 8px;
}

.btn-top {
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--brown-dark);
  background: linear-gradient(to bottom, #ffe1b0, #d7a45c);
  color: #3c2410;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-top.btn-red {
  background: linear-gradient(to bottom, #f7b8a9, #b03329);
  color: #fff;
  border-color: #7d231d;
}

.btn-top:hover {
  transform: translateY(-1px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

/* الهيدر */

.site-header {
  max-width: 1100px;
  margin: 16px auto 8px;
  padding: 10px 16px;
  background: rgba(245, 239, 224, 0.95);
  border-radius: 12px;
  border: 2px solid #d2c09b;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, #ffe6a3 0, #d1a348 40%, #7a4b27 100%);
  border: 3px solid #4e2f19;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.site-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-title-wrap .site-title {
  font-size: 22px;
  line-height: 1.2;
  color: var(--brown-dark);
}

.site-title-wrap .site-description {
  font-size: 13px;
  color: #6b5b46;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 12px;
  font-size: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.main-nav a {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: #4b3a26;
}

.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a {
  border-color: #c09a5a;
  background: #f9f1dd;
}

/* الهيرو (فقط في الرئيسية/البلوج الرئيسية) */

.hero {
  max-width: 1100px;
  margin: 8px auto 16px;
  padding: 18px 16px 20px;
  background: linear-gradient(to bottom right, rgba(245,239,224,0.98), rgba(233,222,197,0.98));
  border-radius: 14px;
  border: 2px solid #ceb88e;
  box-shadow: 0 3px 8px rgba(0,0,0,0.18);
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 16px;
}

.hero-text h2 {
  font-size: 24px;
  margin-bottom: 6px;
  color: var(--green-dark);
}

.hero-text p {
  font-size: 14px;
  line-height: 1.7;
  color: #4b3a26;
  margin-bottom: 10px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.tag {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px dashed #c0a777;
  background: rgba(255,255,255,0.8);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-main {
  padding: 8px 16px;
  border-radius: 999px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-main.primary {
  background: linear-gradient(to bottom, #f6c56d, #d18a24);
  color: #3a220e;
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

.btn-main.secondary {
  background: linear-gradient(to bottom, #e5ecd9, #a7c08a);
  color: #243019;
  border: 1px solid #7b9655;
}

.btn-main:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

.hero-illustration {
  position: relative;
  border-radius: 12px;
  background: radial-gradient(circle at top, #fdfaf0 0, #d6e2b8 45%, #98b873 100%);
  border: 2px solid #a07c3c;
  padding: 10px;
  overflow: hidden;
}

.hero-circle {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 3px solid rgba(74,48,24,0.4);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,0.45);
}

.village-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f4d15f;
  border: 2px solid #7a4b27;
  box-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.village-dot.main {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  background: #f9f2a0;
}

.village-dot.one { top: 18%; left: 52%; }
.village-dot.two { top: 68%; left: 22%; }
.village-dot.three { top: 70%; left: 76%; }

.hero-label {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(67,45,25,0.88);
  color: #fcefc5;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid #d1a348;
}

/* المحتوى الرئيسي */

.layout {
  max-width: 1100px;
  margin: 0 auto 30px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 1.3fr);
  gap: 18px;
}

.content-area {
  background: rgba(245,239,224,0.96);
  border-radius: 12px;
  border: 2px solid #d0b68e;
  padding: 14px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.16);
}

.content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  border-bottom: 1px solid #dec9a2;
  padding-bottom: 6px;
}

.content-header h3 {
  font-size: 18px;
  color: var(--brown-dark);
}

.content-header span {
  font-size: 12px;
  color: #7a6a53;
}

.post-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.post-card {
  background: #fdf8ec;
  border-radius: 10px;
  border: 1px solid #dcc49d;
  padding: 10px 11px;
  position: relative;
  overflow: hidden;
}

.post-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(to left, #d1a348, transparent);
}

.post-meta {
  font-size: 11px;
  color: #8b7a63;
  margin-bottom: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.post-meta span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.post-card h2,
.post-card h4 {
  font-size: 15px;
  margin-bottom: 4px;
  color: var(--green-dark);
}

.post-card h2 a,
.post-card h4 a {
  text-decoration: none;
}

.post-card p {
  font-size: 13px;
  line-height: 1.6;
  color: #5a4a35;
  margin-bottom: 6px;
}

.post-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.post-link {
  color: var(--brown-dark);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-style: dashed;
}

.badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e7efd7;
  border: 1px solid #b4c58f;
  color: #34411f;
}

/* صفحة المقال المفرد */

.single-content {
  background: rgba(245,239,224,0.96);
  border-radius: 12px;
  border: 2px solid #d0b68e;
  padding: 16px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.16);
}

.single-content h1.entry-title {
  font-size: 22px;
  margin-bottom: 8px;
  color: var(--brown-dark);
}

.single-meta {
  font-size: 12px;
  color: #8b7a63;
  margin-bottom: 10px;
}

.single-content .entry-content {
  font-size: 14px;
  line-height: 1.8;
  color: #4b3a26;
}

.single-content .entry-content a {
  color: var(--brown-dark);
  text-decoration: underline;
}

/* السايدبار */

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.widget-box {
  background: rgba(245,239,224,0.96);
  border-radius: 12px;
  border: 2px solid #d0b68e;
  padding: 12px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.16);
}

.widget-box h3 {
  font-size: 15px;
  margin-bottom: 6px;
  color: var(--brown-dark);
  border-bottom: 1px solid #dec9a2;
  padding-bottom: 4px;
}

.widget-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget-box ul li a {
  display: block;
  font-size: 13px;
  padding: 4px 6px;
  border-radius: 6px;
  color: #4b3825;
}

.widget-box ul li a:hover {
  background: #f7f0de;
}

.server-cta {
  text-align: center;
}

.server-cta p {
  font-size: 13px;
  margin-bottom: 8px;
  color: #59462f;
}

.server-cta .btn-main {
  width: 100%;
}

/* تذييل */

.site-footer {
  text-align: center;
  font-size: 12px;
  color: #705d45;
  padding: 16px 10px 20px;
}

.site-footer a {
  color: var(--brown-dark);
  text-decoration: underline;
}

/* ريسبونسيف */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-nav ul {
    justify-content: flex-start;
  }
}
