/* Blessing site – RTL layout, Blogier theme (warm, celebratory) */
:root {
  --head-color: #212121;
  --text-color: #002050;
  --bg-color: #fff;
  --box-color: #fff;
  --box-color2: #fffaf4;
  --border-color: #e2e8f0;
  --wrap-color: #eff2f7;
  --bxsh: 0 1px 3px rgb(0 0 0 / 15%);
  --bxsh2: 0 3px 12px -1px rgba(7,10,25,.2), 0 22px 27px -20px rgba(7,10,25,.2);
  --bxshover: 0 4px 60px 0 rgba(0,0,0,0.2);
  --accent-gradient: linear-gradient(90deg, #89216b 0%, #da4453 100%);
  --accent-color: #89216b;
}

::selection {
  color: white;
  background: #89216b;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body.blessing-body {
  margin: 0;
  padding: 0;
  font-family: 'Rubik', 'Heebo', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.78;
  direction: rtl;
  text-align: right;
  background-color: var(--wrap-color);
  color: var(--text-color);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-color);
  text-decoration: inherit;
  transition: all 0.3s ease-out;
}
a:hover, a:focus {
  color: var(--head-color);
  text-decoration: none;
}
a:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.wrapper { background-color: var(--wrap-color); }
.main-content { min-height: 60vh; padding-bottom: 50px; }

/* Skip link */
.skip-link {
  position: absolute;
  top: -3em;
  right: 1em;
  padding: 0.5em 1em;
  background: var(--accent-gradient);
  color: #fff;
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus { top: 0; }
.skip-link:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Typography – Josefin Sans for headings */
h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 {
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 800;
  color: var(--head-color);
  line-height: 1.3;
  text-size-adjust: 100%;
}
h1, .h1 { font-size: 34px; }
h2, .h2 { font-size: 32px; }
h3, .h3 { font-size: 28px; }
h4, .h4 { font-size: 24px; }
h5, .h5 { font-size: 20px; }
h6, .h6 { font-size: 16px; }

/* Header */
.site-header {
  background: #0F1012;
  border-bottom: none;
  padding: 0.75em 0;
}
.header-inner { display: flex; align-items: center; }
.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Josefin Sans', sans-serif;
  color: #fff;
  text-decoration: none;
}
.site-title:hover { color: #fff; opacity: 0.9; }

/* Footer – dark with accent hover */
.site-footer {
  margin-top: 0;
  padding: 0;
  background: #0F1012;
  border-top: none;
  text-align: center;
}
.footer-copy {
  margin: 0;
  padding: 15px 0;
  background: #000;
}
.footer-copy p {
  margin: 0;
  font-size: 0.9rem;
  color: #bbb;
}
.site-footer a { color: #bbb; }
.site-footer a:hover, .site-footer a:focus { color: var(--accent-color); }

/* Container and layout */
.container {
  width: 100%;
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 15px;
}
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}
.col-main { padding: 0 15px; }
.col-sidebar { padding: 0 15px; }
@media (min-width: 992px) {
  .col-lg-9 { flex: 0 0 75%; max-width: 75%; }
  .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
  .col-lg-12 { flex: 0 0 100%; max-width: 100%; }
}

/* Page header */
.page-header { margin: 1.5em 0; }
.page-title {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 34px;
  font-weight: 800;
  margin: 0 0 0.5em;
  color: var(--head-color);
}
.page-intro { margin: 0; color: var(--text-color); }

/* Breadcrumb */
.breadcrumb {
  padding: 0.75em 0;
  font-size: 0.9rem;
}
.breadcrumb a { color: var(--head-color); text-decoration: none; }
.breadcrumb a:hover, .breadcrumb a:focus { color: var(--accent-color); }
.breadcrumb .sep { margin: 0 0.35em; color: var(--head-color); }

/* Post cards – Blogier style: cream, 8px radius, soft shadow */
.post-list.home-posts { margin: 0 0 2em; }
.post-card {
  background: var(--box-color2);
  box-shadow: var(--bxsh2);
  overflow: hidden;
  margin-bottom: 30px;
  padding: 20px;
  border-radius: 8px;
  transition: box-shadow 0.3s ease;
}
.post-card:hover {
  box-shadow: var(--bxshover);
}
.post-card-category {
  margin: 0 0 10px;
  font-size: 14px;
}
.post-card-category a {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.3s ease;
}
.post-card-category a:hover { opacity: 0.9; color: #fff; }
/* Category color rotation */
.post-card-category .category-color-1 { background: var(--accent-gradient); }
.post-card-category .category-color-2 { background: #feb236; }
.post-card-category .category-color-3 { background: #622569; }
.post-card-category .category-color-4 { background: #82b74b; }
.post-card-title {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 0.5em;
}
.post-card-title a { color: var(--head-color); text-decoration: none; }
.post-card-title a:hover, .post-card-title a:focus { color: var(--accent-color); }
.post-card-meta {
  margin: 0 0 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-color);
}
.post-card-excerpt {
  margin: 0;
  font-size: 17px;
  color: var(--text-color);
  line-height: 1.65;
}

/* Pagination – gradient active/hover */
.pagination {
  margin: 2em 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.pagination-label { font-weight: 600; margin-left: 0.5em; }
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pagination .page-numbers a,
.pagination .page-numbers .current {
  display: inline-block;
  min-width: 40px;
  height: 40px;
  line-height: 40px;
  padding: 0 6px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  border-radius: 8px;
  background: var(--box-color);
  border: 1px solid var(--border-color);
  color: var(--head-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}
.pagination .page-numbers a:hover,
.pagination .page-numbers .current {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
}
.pagination .next {
  margin-right: auto;
  padding: 0 15px;
  height: 40px;
  line-height: 40px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  border-radius: 8px;
  background: var(--box-color);
  border: 1px solid var(--border-color);
  color: var(--head-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}
.pagination .next:hover {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
}

/* Sidebar – cream background, 8px radius, gradient underline */
.sidebar { margin-top: 0; }
.sidebar-widget {
  background: var(--box-color2);
  padding: 15px 15px 5px 15px;
  margin-bottom: 30px;
  box-shadow: var(--bxsh2);
  border-radius: 8px;
  border: 1px solid #d7d7d7;
}
.sidebar-widget.widget-missed {
  background: var(--box-color2);
  box-shadow: var(--bxsh2);
}
.widget-title {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 20px;
  padding-bottom: 5px;
  border-bottom: 1px solid #d7d7d7;
  color: var(--head-color);
  position: relative;
}
.widget-title::before {
  content: "";
  position: absolute;
  height: 3px;
  width: 50%;
  bottom: -2px;
  right: 0;
  background: var(--accent-gradient);
}
.category-list-sidebar,
.recent-posts-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.category-list-sidebar li,
.recent-posts-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-color);
}
.category-list-sidebar li:last-child,
.recent-posts-list li:last-child { border-bottom: none; }
.category-list-sidebar a,
.recent-posts-list a {
  color: var(--text-color);
  text-decoration: none;
}
.category-list-sidebar a:hover,
.category-list-sidebar a:focus,
.recent-posts-list a:hover,
.recent-posts-list a:focus {
  color: var(--accent-color);
}

/* Nested category tree */
.category-tree .cat-children {
  list-style: none;
  padding: 0 0 0 1em;
  margin: 0.25em 0 0;
  border-right: 2px solid var(--border-color);
}
.category-tree .cat-children li {
  border-bottom: none;
  padding: 10px 0 0;
}
.category-tree .cat-parent { border-bottom: 1px solid var(--border-color); }
.category-tree .cat-parent:last-child { border-bottom: none; }

/* Category grid, post grid */
.category-list, .subcategories, .related-posts { margin: 2em 0; }
.category-list h2, .subcategories h2, .related-posts h2 {
  font-size: 1.25rem;
  margin: 0 0 1em;
}
.category-grid, .post-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75em;
}
.category-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.post-grid { grid-template-columns: 1fr; }
.category-grid li, .post-grid li { margin: 0; }
.category-grid a, .post-grid a {
  display: block;
  padding: 0.5em 0.75em;
  background: var(--box-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s ease;
}
.category-grid a:hover, .post-grid a:hover {
  border-color: var(--accent-color);
  background: var(--accent-gradient);
  color: #fff;
}
.post-item .excerpt {
  margin: 0.25em 0 0;
  font-size: 0.9rem;
  color: var(--text-color);
}

/* Single post */
.single-post { margin: 1.5em 0; }
.single-post .post-title {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 38px;
  font-weight: 800;
  margin: 0 0 0.25em;
  color: var(--head-color);
}
.single-post .post-meta { margin: 0 0 0.5em; font-size: 14px; color: var(--text-color); }
.single-post .post-categories { margin: 0 0 1em; font-size: 0.9rem; }
.single-post .post-categories a { color: var(--accent-color); text-decoration: none; }
.single-post .post-categories a:hover { color: var(--head-color); }
.single-post .post-content {
  line-height: 1.8;
  margin: 1em 0;
  font-size: 17px;
  color: var(--text-color);
}
.single-post .post-content p { margin: 0 0 1em; }
.single-post .post-content ul, .single-post .post-content ol { margin: 0 0 1em; padding-right: 1.5em; }

/* Copy button – gradient, 8px radius */
.copy-wrap { margin: 1em 0; }
.btn-copy {
  padding: 10px 35px;
  font-size: 14px;
  font-weight: bold;
  background: var(--accent-gradient);
  border: 2px solid transparent;
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.btn-copy:hover {
  background: #0F1012;
  border-color: #0F1012;
  color: #fff;
}
.btn-copy:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.sibling-categories, .more-posts { margin: 2em 0; }
.sibling-categories h2, .more-posts h2 {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 1em;
  color: var(--head-color);
}

/* RTL: ensure logical properties for mixed content */
[dir="rtl"] .breadcrumb .sep { margin: 0 0.35em; }
[dir="rtl"] .category-tree .cat-children { border-right: 2px solid var(--border-color); }

/* Accessibility: reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  a, .post-card, .btn-copy, .pagination .page-numbers a,
  .pagination .next, .category-grid a, .post-grid a {
    transition: none;
  }
}

/* Mobile responsiveness */
@media (max-width: 991px) {
  .col-main, .col-sidebar { flex: 0 0 100%; max-width: 100%; }
  .row { flex-direction: column; }
  .col-sidebar { order: 2; }
  .page-title { font-size: 28px; }
  .post-card { padding: 15px; }
  .post-card-title { font-size: 24px; }
}
@media (max-width: 576px) {
  .container { padding: 0 12px; }
  .page-title { font-size: 24px; }
  .post-card-title { font-size: 22px; }
  .pagination { flex-direction: column; align-items: stretch; }
  .pagination .next { margin-right: 0; margin-top: 0.5em; }
}
