/* ============================================================
   ISSAM WEB STUDIO — Blog Stylesheet
   Extends the main site's style.css (glass, btn-gold, reveal,
   portfolio-card, faq-item, etc.). Blog-only additions live here.
   ============================================================ */

/* ============ Reading progress bar ============ */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  z-index: 60;
  background: linear-gradient(90deg, #f5e9c2, #c9a227 45%, #e3c968);
  transition: width 0.1s linear;
}

/* ============ Breadcrumb ============ */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.breadcrumb a {
  color: rgba(248, 244, 236, 0.5);
  transition: color 0.3s ease;
}
.breadcrumb a:hover {
  color: var(--gold-light);
}
.breadcrumb span[aria-hidden] {
  color: rgba(248, 244, 236, 0.25);
}
.breadcrumb .current {
  color: rgba(248, 244, 236, 0.75);
}

/* ============ Category chips ============ */
.cat-chip {
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(248, 244, 236, 0.65);
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.3s ease;
}
.cat-chip:hover {
  border-color: rgba(201, 162, 39, 0.4);
  color: var(--cream);
}
.cat-chip.active {
  background: linear-gradient(135deg, #e3c968, #c9a227 55%, #a9821e);
  color: #0b0b0c;
  border-color: transparent;
  font-weight: 600;
}

/* ============ Search input ============ */
.blog-search {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.blog-search:focus-within {
  border-color: rgba(201, 162, 39, 0.5);
  background: rgba(255, 255, 255, 0.07);
}
.blog-search input {
  background: transparent;
  color: var(--cream);
  outline: none;
}
.blog-search input::placeholder {
  color: rgba(248, 244, 236, 0.35);
}

/* ============ Article / blog cards (extend .portfolio-card) ============ */
.blog-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
}
.dot::before {
  content: "\2022";
  margin-inline-end: 0.6em;
  color: rgba(248, 244, 236, 0.3);
}

.read-more-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--gold-light);
  font-weight: 600;
  transition: gap 0.3s ease, color 0.3s ease;
}
.read-more-link:hover {
  gap: 0.65rem;
  color: #f5e9c2;
}

/* ============ Empty state ============ */
.blog-empty {
  border: 1px dashed rgba(255, 255, 255, 0.15);
}

/* ============ Table of contents ============ */
.toc-card {
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
}
.toc-link {
  display: block;
  padding: 0.45rem 0;
  color: rgba(248, 244, 236, 0.55);
  border-inline-start: 2px solid rgba(255, 255, 255, 0.08);
  padding-inline-start: 1rem;
  font-size: 0.875rem;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.toc-link:hover {
  color: var(--cream);
}
.toc-link.active {
  color: var(--gold-light);
  border-inline-start-color: var(--gold-light);
  font-weight: 600;
}

/* ============ Article prose ============ */
.prose-article {
  color: rgba(248, 244, 236, 0.78);
  font-size: 1.0625rem;
  line-height: 1.85;
}
.prose-article > * + * {
  margin-top: 1.4em;
}
.prose-article h2 {
  font-family: "Playfair Display", "Tajawal", serif;
  font-weight: 700;
  color: var(--cream);
  font-size: 1.65rem;
  line-height: 1.35;
  margin-top: 2.6em;
  padding-top: 0.4em;
  scroll-margin-top: 6.5rem;
}
.prose-article h3 {
  font-family: "Playfair Display", "Tajawal", serif;
  font-weight: 600;
  color: var(--cream);
  font-size: 1.28rem;
  line-height: 1.4;
  margin-top: 2em;
  scroll-margin-top: 6.5rem;
}
.prose-article p { }
.prose-article a {
  color: var(--gold-light);
  text-decoration: underline;
  text-decoration-color: rgba(227, 201, 104, 0.35);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.3s ease;
}
.prose-article a:hover {
  text-decoration-color: var(--gold-light);
}
.prose-article ul,
.prose-article ol {
  padding-inline-start: 1.4em;
}
.prose-article ul { list-style: none; }
.prose-article ul > li {
  position: relative;
  padding-inline-start: 1.6em;
}
.prose-article ul > li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.65em;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--gold-light);
}
.prose-article ol {
  list-style: decimal;
}
.prose-article ol > li::marker {
  color: var(--gold-light);
  font-weight: 700;
}
.prose-article li + li {
  margin-top: 0.6em;
}
.prose-article strong {
  color: var(--cream);
  font-weight: 700;
}
.prose-article figure {
  margin: 0;
}
.prose-article figure img {
  width: 100%;
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.prose-article figcaption {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: rgba(248, 244, 236, 0.45);
  text-align: center;
}
.prose-article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.prose-article th,
.prose-article td {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.7em 1em;
  text-align: start;
}
.prose-article th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--cream);
  font-family: "Playfair Display", serif;
}

/* ============ Quote block ============ */
.quote-block {
  position: relative;
  border-inline-start: 3px solid var(--gold-light);
  background: rgba(201, 162, 39, 0.06);
  border-radius: 0 1rem 1rem 0;
  padding: 1.75rem 1.75rem 1.75rem 2.25rem;
}
[dir="rtl"] .quote-block { border-radius: 1rem 0 0 1rem; }
.quote-block p {
  font-family: "Playfair Display", serif;
  font-style: italic;
  color: var(--cream);
  font-size: 1.15rem;
  line-height: 1.6;
  margin: 0;
}
.quote-block cite {
  display: block;
  margin-top: 0.9rem;
  font-style: normal;
  font-size: 0.8rem;
  color: rgba(248, 244, 236, 0.5);
}

/* ============ Callout boxes ============ */
.callout {
  border-radius: 1rem;
  padding: 1.5rem 1.6rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}
.callout-icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.callout-tip {
  border-color: rgba(201, 162, 39, 0.3);
  background: rgba(201, 162, 39, 0.07);
}
.callout-tip .callout-icon {
  background: rgba(201, 162, 39, 0.18);
  color: var(--gold-light);
}
.callout-warn {
  border-color: rgba(248, 244, 236, 0.15);
  background: rgba(255, 255, 255, 0.04);
}
.callout-warn .callout-icon {
  background: rgba(248, 244, 236, 0.1);
  color: var(--cream);
}
.callout p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(248, 244, 236, 0.75);
}
.callout strong {
  color: var(--cream);
}
.callout-title {
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 0.3rem;
  display: block;
  font-size: 0.95rem;
}

/* ============ Share buttons ============ */
.share-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(248, 244, 236, 0.7);
  transition: all 0.3s ease;
}
.share-btn:hover {
  color: var(--gold-light);
  transform: translateY(-2px);
}
.copy-link-btn.copied {
  color: var(--gold-light);
}

/* ============ Author card ============ */
.author-avatar {
  background: linear-gradient(135deg, #e3c968, #c9a227 55%, #a9821e);
  color: #0b0b0c;
  font-family: "Playfair Display", serif;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============ Newsletter ============ */
.newsletter-input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--cream);
  outline: none;
  transition: border-color 0.3s ease;
}
.newsletter-input:focus {
  border-color: rgba(201, 162, 39, 0.55);
}
.newsletter-input::placeholder {
  color: rgba(248, 244, 236, 0.35);
}

/* ============ Prev / Next navigation ============ */
.prevnext-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--ink-800);
  transition: border-color 0.4s ease, transform 0.4s ease;
}
.prevnext-card:hover {
  border-color: rgba(201, 162, 39, 0.4);
  transform: translateY(-4px);
}

/* ============ Utility ============ */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 1023px) {
  .toc-card {
    max-height: none;
  }
}
