/* ==========================================================================
   RayBen — blogs & articles (matches site tokens: navy / lime / Jost)
   ========================================================================== */

.page-hero {
  background:
    radial-gradient(900px 420px at 90% -20%, rgba(165, 206, 58, .18), transparent 60%),
    linear-gradient(160deg, var(--navy-deep), var(--navy) 55%, var(--navy-soft));
  color: #fff;
  padding: clamp(4.5rem, 8vw, 7rem) 0 clamp(3rem, 5vw, 4.5rem);
  position: relative;
}

.page-hero .eyebrow { color: rgba(255,255,255,.78); }
.page-hero .section__title,
.page-hero h1 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: .75rem;
}
.page-hero p {
  color: rgba(255,255,255,.82);
  max-width: 42rem;
  margin-bottom: 0;
}

.page-hero--image {
  background-image:
    radial-gradient(900px 420px at 90% -20%, rgba(165, 206, 58, .18), transparent 60%),
    linear-gradient(160deg, rgba(8, 28, 48, .78), rgba(16, 55, 90, .72) 55%),
    var(--page-hero-image);
  background-size: cover;
  background-position: center;
}

.content-section { padding: var(--section) 0; }

/* —— Index cards —— */
.content-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
  color: inherit;
}
.content-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(16, 55, 90, .1);
  color: inherit;
}
.content-card__media {
  aspect-ratio: 16 / 10;
  background: var(--mist);
  overflow: hidden;
}
.content-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.content-card__body {
  padding: 1.35rem 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.content-card__meta {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: .55rem;
}
.content-card__title {
  font-size: 1.25rem;
  margin-bottom: .55rem;
}
.content-card__excerpt {
  color: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
}
.content-card__link {
  font-weight: 600;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.content-card__link i { transition: transform .2s var(--ease); }
.content-card:hover .content-card__link i { transform: translateX(3px); }

/* —— Detail hero —— */
.post-hero {
  background:
    radial-gradient(900px 420px at 88% -18%, rgba(165, 206, 58, .2), transparent 58%),
    radial-gradient(700px 360px at 0% 100%, rgba(27, 74, 115, .55), transparent 55%),
    linear-gradient(155deg, var(--navy-deep), var(--navy) 52%, var(--navy-soft));
  color: #fff;
  padding: clamp(4.25rem, 7vw, 6.25rem) 0 clamp(2.75rem, 5vw, 4rem);
}

.post-breadcrumb {
  margin-bottom: 1.35rem;
}
.post-breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .55rem;
  font-size: .92rem;
  color: rgba(255,255,255,.72);
}
.post-breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: .55rem;
  opacity: .55;
}
.post-breadcrumb a {
  color: rgba(255,255,255,.82);
  text-decoration: none;
}
.post-breadcrumb a:hover { color: var(--lime-bright); }
.post-breadcrumb [aria-current="page"] {
  color: #fff;
  font-weight: 500;
}

.post-hero .eyebrow { margin-bottom: .85rem; }
.post-hero__title {
  color: #fff;
  font-size: clamp(2.05rem, 4.2vw, 3.15rem);
  line-height: 1.15;
  max-width: 18ch;
  margin-bottom: 1.35rem;
}

.post-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}
.post-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .9rem;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.92);
  font-size: .92rem;
  font-weight: 500;
}
.post-chip i { color: var(--lime-bright); }

/* —— Detail main grid —— */
.post-main {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  background: var(--paper);
}

.post-article { min-width: 0; }

.post-cover {
  margin: 0 0 1.75rem;
  border-radius: var(--radius-l);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--mist);
  box-shadow: 0 12px 36px rgba(16, 55, 90, .08);
}
.post-cover img {
  display: block;
  width: 100%;
  max-height: 460px;
  object-fit: cover;
}

.post-lead {
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--mist);
  border-left: 4px solid var(--lime);
  padding: 1.1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 2rem;
  max-width: none;
}

.post-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

/* —— Sticky sidebar —— */
.post-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  position: sticky;
  top: 6.5rem;
}

.post-side-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 1.35rem 1.4rem;
  box-shadow: 0 8px 24px rgba(16, 55, 90, .05);
}

.post-side-card--care {
  background:
    radial-gradient(420px 180px at 100% 0%, rgba(165, 206, 58, .16), transparent 60%),
    var(--mist);
}

.post-author {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.post-author__avatar {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: var(--lime-bright);
  font-weight: 600;
  font-size: 1.2rem;
}
.post-author__name {
  font-size: 1.2rem;
  margin: 0 0 .35rem;
  color: var(--ink);
}
.post-author__bio {
  margin: 0;
  font-size: .95rem;
  color: var(--muted);
  line-height: 1.55;
  max-width: none;
}

.post-care__title {
  font-size: 1.35rem;
  margin: .35rem 0 .55rem;
  color: var(--ink);
}
.post-care__text {
  color: var(--body);
  font-size: .98rem;
  margin-bottom: 1.15rem;
  max-width: none;
}
.post-care__actions {
  display: flex;
  flex-direction: column;
  gap: .65rem;
}

/* —— Related tinted band —— */
.post-related {
  background: var(--mist);
  padding: clamp(3rem, 5vw, 4.5rem) 0;
  border-top: 1px solid var(--line);
}

/* —— Rich HTML body —— */
.article-body {
  color: var(--body);
  font-size: 1.125rem;
  line-height: 1.8;
}
.article-body > *:first-child { margin-top: 0; }
.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4 {
  color: var(--ink);
  line-height: 1.3;
  margin-top: 1.75rem;
  margin-bottom: .75rem;
}
.article-body h1 { font-size: 1.75rem; }
.article-body h2 { font-size: 1.45rem; }
.article-body h3 { font-size: 1.25rem; }
.article-body h4 { font-size: 1.1rem; }
.article-body p {
  max-width: none;
  margin-bottom: 1.15rem;
}
.article-body ul,
.article-body ol {
  padding-left: 1.25rem;
  margin-bottom: 1.25rem;
}
.article-body li { margin-bottom: .35rem; }
.article-body li > ul,
.article-body li > ol { margin-top: .35rem; margin-bottom: .35rem; }
.article-body a { color: var(--navy-soft); text-decoration: underline; }
.article-body a:hover { color: var(--navy); }
.article-body strong { color: var(--ink); }
.article-body blockquote {
  border-left: 4px solid var(--lime);
  margin: 1.5rem 0;
  padding: .5rem 0 .5rem 1.25rem;
  color: var(--ink);
  font-style: italic;
  background: var(--mist);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 1.25rem 0;
}
.article-body figure { margin: 1.5rem 0; }
.article-body figcaption {
  font-size: .9rem;
  color: var(--muted);
  margin-top: .5rem;
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 1rem;
}
.article-body th,
.article-body td {
  border: 1px solid var(--line);
  padding: .65rem .85rem;
  text-align: left;
  vertical-align: top;
}
.article-body th {
  background: var(--mist);
  color: var(--ink);
  font-weight: 600;
}
.article-body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2rem 0;
}
.article-body pre {
  background: var(--navy-deep);
  color: #e2e8f0;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: .9rem;
  margin: 1.25rem 0;
}
.article-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em;
}
.article-body :not(pre) > code {
  background: var(--mist);
  padding: .15rem .4rem;
  border-radius: 4px;
}
.article-body iframe {
  max-width: 100%;
  border: 0;
  border-radius: var(--radius);
  margin: 1.25rem 0;
}

.content-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  background: var(--mist);
  border-radius: var(--radius-l);
}
.content-empty i {
  font-size: 2rem;
  color: var(--navy-soft);
  opacity: .5;
  display: block;
  margin: 0 auto .75rem;
}
.content-empty h2,
.content-empty p {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  max-width: 36rem;
}

.content-pagination {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
}
.content-pagination .pagination { margin: 0; gap: .35rem; }
.content-pagination .page-link {
  border-radius: 8px;
  border-color: var(--line);
  color: var(--navy);
  padding: .55rem .9rem;
}
.content-pagination .page-item.active .page-link {
  background: var(--navy);
  border-color: var(--navy);
}
.content-pagination .page-link:hover {
  background: var(--mist);
  color: var(--navy-deep);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

@media (max-width: 991.98px) {
  .post-sidebar {
    position: static;
    margin-top: .5rem;
  }
  .post-hero__title { max-width: none; }
}

@media (max-width: 575.98px) {
  .post-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .post-footer .btn { width: 100%; }
}
