/* =========================================================
   Blog article + blog index styles
   ========================================================= */

/* ============= Article page ============= */
.article-page {
  background: #fff;
}

.article {
  max-width: 780px;
  margin: 0 auto;
  padding: 9rem 1.5rem 5rem;
}

.article-hero {
  text-align: center;
  margin-bottom: 3rem;
}

.article-meta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

html[dir="rtl"] .article-meta { letter-spacing: 0.04em; }

.article-category {
  background: rgba(201, 169, 97, 0.08);
  color: var(--saudi-green);
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  font-weight: 600;
}

.article-title {
  font-family: var(--serif-ar);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.article-lede {
  font-family: var(--serif-ar);
  font-weight: 400;
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  color: var(--muted);
  line-height: 1.7;
  max-width: 640px;
  margin: 0 auto;
}

.article-cover {
  margin: 0 -1.5rem 3rem;
  border-radius: 0;
  overflow: hidden;
}

.article-cover img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

@media (min-width: 700px) {
  .article-cover {
    margin-left: 0;
    margin-right: 0;
    border-radius: 18px;
  }
}

/* ============= Article body content ============= */
.article-body {
  font-family: var(--sans-ar);
  font-size: 1.08rem;
  line-height: 2;
  color: var(--ink-soft);
}

.article-body h2 {
  font-family: var(--serif-ar);
  font-weight: 700;
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  color: var(--ink);
  line-height: 1.4;
  margin: 3.5rem 0 1.25rem;
}

.article-body h2 + p {
  margin-top: 0;
}

.article-body h3 {
  font-family: var(--serif-ar);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  line-height: 1.4;
  margin: 2.5rem 0 1rem;
}

.article-body p {
  margin-bottom: 1.4rem;
}

.article-body ul, .article-body ol {
  margin: 1.4rem 0;
  padding-right: 1.5rem;
}

.article-body li {
  margin-bottom: 0.6rem;
}

.article-body a {
  color: var(--saudi-green);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-thickness 0.2s ease;
}

.article-body a:hover {
  color: #a88a47;
  text-decoration-thickness: 2px;
}

.article-body blockquote {
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  border-right: 3px solid var(--saudi-green);
  background: #fbfaf6;
  border-radius: 8px;
  font-family: var(--serif-ar);
  font-size: 1.15rem;
  color: var(--ink);
  line-height: 1.8;
}

.article-body strong {
  color: var(--ink);
  font-weight: 700;
}

/* Table of Contents */
.article-body .toc {
  background: linear-gradient(180deg, #fbfaf6 0%, #fff 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem 2rem;
  margin: 0 0 3rem;
}

.article-body .toc h3 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.article-body .toc ol, .article-body .toc ul {
  margin: 0;
  padding-right: 1.25rem;
  list-style: decimal;
}

.article-body .toc li {
  margin-bottom: 0.4rem;
}

.article-body .toc a {
  text-decoration: none;
  color: var(--ink-soft);
}

.article-body .toc a:hover {
  color: var(--saudi-green);
  text-decoration: underline;
}

/* FAQ inside article */
.article-body .faq-block {
  margin: 3rem 0;
  background: #fbfaf6;
  border-radius: 16px;
  padding: 2rem;
}

.article-body .faq-block h2 {
  margin-top: 0;
  text-align: center;
}

.article-body .faq-block details {
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
}

.article-body .faq-block details:last-child { border-bottom: none; }

.article-body .faq-block summary {
  cursor: pointer;
  font-family: var(--serif-ar);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
  padding: 0.5rem 0;
  list-style: none;
}

.article-body .faq-block summary::-webkit-details-marker { display: none; }

.article-body .faq-block summary::before {
  content: "+";
  display: inline-block;
  margin-left: 0.5rem;
  color: var(--saudi-green);
  font-weight: 600;
  width: 1.5rem;
}

.article-body .faq-block details[open] summary::before {
  content: "−";
}

.article-body .faq-block details > p {
  padding-top: 0.75rem;
  margin: 0;
}

/* Article inline image */
.article-body img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 2rem 0;
}

.article-body figure {
  margin: 2rem 0;
}

.article-body figcaption {
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.75rem;
  font-style: italic;
}

html[dir="rtl"] .article-body figcaption { font-style: normal; }

/* ============= Article CTA at end ============= */
.article-cta {
  margin: 4rem 0 2rem;
  padding: 3rem 2rem;
  background: linear-gradient(180deg, #fbfaf6 0%, #fff 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: center;
}

.article-cta h3 {
  font-family: var(--serif-ar);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.article-cta p {
  color: var(--muted);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  line-height: 1.7;
}

.article-cta .cta-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============= Related posts ============= */
.related-posts {
  margin: 4rem 0 0;
  padding-top: 3rem;
  border-top: 1px solid var(--line);
}

.related-posts h3 {
  text-align: center;
  font-family: var(--serif-ar);
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: var(--ink);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.related-post {
  display: block;
  padding: 1.5rem;
  background: #fbfaf6;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.related-post:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  border-color: rgba(201, 169, 97, 0.3);
}

.related-post h4 {
  font-family: var(--serif-ar);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
  color: var(--ink);
}

.read-more {
  font-size: 0.85rem;
  color: var(--saudi-green);
  font-weight: 600;
}

@media (max-width: 700px) {
  .related-grid { grid-template-columns: 1fr; }
}

/* ============= Blog index page ============= */
.blog-list-section {
  position: relative;
  z-index: 2;
  background: #fff;
  padding: 4rem 1.5rem 6rem;
}

.blog-list {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.blog-card {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease, border-color 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
  border-color: rgba(201, 169, 97, 0.3);
}

.blog-card-image {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #f0f0f0;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

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

.blog-card-content {
  padding: 1.5rem;
}

.blog-card-category {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--saudi-green);
  background: rgba(201, 169, 97, 0.08);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-weight: 600;
  margin-bottom: 1rem;
}

.blog-card-title {
  font-family: var(--serif-ar);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.blog-card-excerpt {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-readmore {
  font-size: 0.9rem;
  color: var(--saudi-green);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.empty-state {
  text-align: center;
  font-family: var(--serif-ar);
  font-size: 1.4rem;
  color: var(--muted);
  padding: 4rem 0;
}

@media (max-width: 1024px) {
  .blog-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .blog-list { grid-template-columns: 1fr; }
  .article { padding: 7rem 1.25rem 4rem; }
  .article-cta { padding: 2rem 1.25rem; }
}

/* ============= ARTICLE CTA BUTTONS (high-contrast on cream background) ============= */
/* Buttons sit on a cream/white .article-cta box — need strong contrast */

.article-cta .cta {
  padding: 1rem 2rem !important;
  font-weight: 600 !important;
}

.article-cta .cta-primary {
  background: #0a0a0a !important;
  color: #fff !important;
  border: 2px solid #0a0a0a !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.article-cta .cta-primary:hover {
  background: #C9A961 !important;
  color: #0a0a0a !important;
  border-color: #C9A961 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 12px 30px rgba(201, 169, 97, 0.45) !important;
}

.article-cta .cta-secondary {
  background: #fff !important;
  color: #0a0a0a !important;
  border: 2px solid #C9A961 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.article-cta .cta-secondary:hover {
  background: #C9A961 !important;
  color: #fff !important;
  border-color: #C9A961 !important;
  transform: translateY(-2px) !important;
}


/* ============= ARTICLE CTA-ROW OPACITY FIX ============= */
/* hero.css sets .cta-row { opacity: 0 } for the hero animation.
   The article CTA never gets faded in by GSAP, so force it visible. */

.article-cta .cta-row {
  opacity: 1 !important;
  transform: none !important;
}
