/* ================================================================
   Blog Article Page Styles
   Scoped under .blog-article for the poster header only.
   Sidebar and body use the existing Porto/Bootstrap theme styles.
   ================================================================ */

.blog-article {
  --ba-accent:       #0057fe;
  --ba-accent-light: #3b82f6;
  --ba-font-display: 'Source Serif 4', Georgia, serif;
}

/* ARTICLE HEADER (poster image) */
.article-header {
  position: relative;
  min-height: 500px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  margin-bottom: 0;
}
.article-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.08) 0%,
    rgba(0,0,0,0.40) 45%,
    rgba(0,0,0,0.78) 100%
  );
  z-index: 1;
}
.article-header-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 0.75rem;
}

/* Breadcrumb */
.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: rgba(255,255,255,1);
  margin: 0.75rem 0;
}
.article-breadcrumb a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: color 0.15s;
}
.article-breadcrumb a:hover,
.article-breadcrumb a:focus-visible { color: #fff; }
.article-breadcrumb .sep { color: rgba(255,255,255,0.6); }

/* Category pill */
.article-cat-pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: var(--ba-accent);
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 1rem;
  text-decoration: none;
}
.article-cat-pill:hover,
.article-cat-pill:focus-visible { color: #fff; background: var(--ba-accent-light); }

/* Headline */
.article-headline {
  font-family: var(--ba-font-display);
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: #fff;
  max-width: 820px;
  margin-bottom: 0.5rem;
}
.article-subtitle {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  font-weight: 400;
  color: rgba(255,255,255,0.75);
  max-width: 720px;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* Text shadow safety net */
.article-header .article-headline,
.article-header .article-subtitle,
.article-header .article-meta-row {
  text-shadow:
    0 1px 3px rgba(0,0,0,0.6),
    0 4px 12px rgba(0,0,0,0.3);
}

/* Meta row */
.article-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.article-author-byline {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.article-author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ba-accent) 0%, #0ea5e9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.03em;
  overflow: hidden;
}
.article-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.article-author-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}
.article-author-name a { color: #fff; text-decoration: none; }
.article-author-name a:hover,
.article-author-name a:focus-visible { text-decoration: underline; }
.article-author-role {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.55);
}
.article-meta-divider {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.2);
}
.article-meta-item {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.article-meta-item i { opacity: 0.6; font-size: 0.78rem; }

/* Share bar in header */
.article-share-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}
.article-share-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}
.article-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.article-share-btn:hover,
.article-share-btn:focus-visible { background: rgba(255,255,255,0.2); color: #fff; }


/* RELATED ARTICLE CARDS */
.related-card {
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: box-shadow 0.25s;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.related-card:hover,
.related-card:focus-within {
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
}

/* Image with overlay */
.related-card-image-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  text-decoration: none;
}
.related-card-img {
  width: 100%;
  display: block;
  transition: transform 0.35s;
}
.related-card:hover .related-card-img,
.related-card:focus-within .related-card-img {
  transform: scale(1.04);
}
.related-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 1.25rem;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.0) 30%,
    rgba(0,0,0,0.65) 100%
  );
}
.related-card-title {
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* Card body */
.related-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.related-card-body p {
  flex: 1;
}


/* SIDEBAR: Author avatar */
.post-author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0057fe 0%, #0ea5e9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.03em;
  overflow: hidden;
}
.post-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}


/* AUTHOR BIO (end of article) */
.author-bio-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.author-bio-initials {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0057fe 0%, #0ea5e9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.03em;
}

@media (max-width: 576px) {
  .author-bio-block {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .author-bio-img-wrap {
    margin-right: 0 !important;
    margin-bottom: 1rem;
  }
}


/* RESPONSIVE */
@media (max-width: 768px) {
  .article-header {
    min-height: 400px;
  }
  .article-headline {
    font-size: 1.6rem;
  }
  .article-meta-row {
    gap: 0.75rem;
  }
  .article-share-bar {
    margin-left: 0;
    width: 100%;
    margin-top: 0.25rem;
  }
  .article-meta-divider {
    display: none;
  }
  .article-share-btn {
    font-size: 0.7rem;
    padding: 1px 6px;
  }
}

@media (max-width: 480px) {
  .article-header {
    min-height: 340px;
  }
  .article-share-bar {
    flex-wrap: wrap;
  }
  .article-share-btn {
    font-size: 0.6rem;
  }
}

/* REDUCED-MOTION */
@media (prefers-reduced-motion: reduce) {
  .article-breadcrumb a,
  .article-cat-pill,
  .article-share-btn,
  .article-author-card a,
  .related-card,
  .related-card-img {
    transition: none !important;
  }
}
