/* Blog + admin-managed content pages.
   Built on the theme's custom properties (--theme, --black, --white, --border,
   --bg from main.css :root) and its type pairing (Unbounded / DM Sans) so the
   blog reads as part of the same site rather than a bolted-on section. */

.blog-section {
  background-color: var(--black);
}

/* ---- Toolbar: category chips + search ---- */
.blog-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 50px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.blog-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.blog-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: #ffffffcc;
  font-size: 14px;
  transition: all 0.2s ease;
}

.blog-chip span {
  font-size: 12px;
  opacity: 0.6;
}

.blog-chip:hover {
  border-color: #ffffff66;
  color: var(--white);
}

.blog-chip.is-active {
  background: var(--theme);
  border-color: var(--theme);
  color: var(--black);
  font-weight: 600;
}

.blog-chip.is-active span {
  opacity: 0.75;
}

.blog-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 6px 6px 20px;
  background: #ffffff08;
}

.blog-search input {
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 14px;
  font-family: "DM Sans", sans-serif;
  min-width: 200px;
}

.blog-search input::placeholder {
  color: #ffffff4d;
}

.blog-search input:focus {
  outline: none;
}

.blog-search button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--theme);
  color: var(--black);
  cursor: pointer;
  flex: 0 0 auto;
  transition: opacity 0.2s ease;
}

.blog-search button:hover {
  opacity: 0.85;
}

/* ---- Card grid ---- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.blog-card:hover {
  transform: translateY(-6px);
  border-color: #ffffff33;
}

.blog-card__media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #ffffff0a;
}

.blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.blog-card__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ffffff0d, transparent);
}

.blog-card__placeholder img {
  width: 64px;
  height: auto;
  opacity: 0.35;
  object-fit: contain;
}

.blog-card__body {
  padding: 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #ffffff80;
  margin-bottom: 14px;
}

.blog-card__cat {
  color: var(--theme);
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-size: 12px;
  font-weight: 600;
}

.blog-card__cat:hover {
  opacity: 0.8;
  color: var(--theme);
}

.blog-card__title {
  font-family: "Unbounded", sans-serif;
  font-size: 21px;
  line-height: 1.35;
  font-weight: 550;
  margin: 0 0 14px;
}

.blog-card__title a {
  color: var(--white);
}

.blog-card__title a:hover {
  color: var(--theme);
}

.blog-card__excerpt {
  color: #ffffff99;
  font-size: 15px;
  line-height: 1.65;
  margin: 0 0 22px;
}

.blog-card__link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
}

.blog-card__link i {
  transition: transform 0.2s ease;
}

.blog-card__link:hover {
  color: var(--theme);
}

.blog-card__link:hover i {
  transform: translateX(4px);
}

/* ---- Empty state ---- */
.blog-empty {
  border: 1px dashed var(--border);
  border-radius: 20px;
  padding: 80px 24px;
  text-align: center;
}

.blog-empty h3 {
  font-family: "Unbounded", sans-serif;
  color: var(--white);
  margin: 0 0 12px;
}

.blog-empty p {
  color: #ffffff99;
  margin: 0 0 24px;
}

/* ---- Pagination ---- */
.blog-pagination {
  margin-top: 60px;
  display: flex;
  justify-content: center;
}

.blog-pagination .pagination {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.blog-pagination .page-link {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: #ffffffcc;
  font-size: 14px;
  transition: all 0.2s ease;
}

.blog-pagination .page-link:hover {
  border-color: #ffffff66;
  color: var(--white);
  background: transparent;
}

.blog-pagination .active .page-link {
  background: var(--theme);
  border-color: var(--theme);
  color: var(--black);
  font-weight: 600;
}

.blog-pagination .disabled .page-link {
  opacity: 0.35;
}

.blog-pagination .page-link:focus {
  box-shadow: none;
}

.blog-pagination svg {
  width: 15px;
  height: 15px;
}

/* ---- Blog detail ---- */
.blog-post {
  background-color: var(--black);
}

.blog-post__hero,
.policy-hero {
  padding: 190px 0 70px;
  background-position: center;
  background-size: cover;
  border-bottom: 1px solid var(--border);
}

.blog-crumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 14px;
  color: #ffffff80;
  margin-bottom: 26px;
}

.blog-crumbs a {
  color: #ffffff80;
}

.blog-crumbs a:hover {
  color: var(--theme);
}

.blog-post__title {
  font-family: "Unbounded", sans-serif;
  color: var(--white);
  font-size: clamp(32px, 5vw, 62px);
  line-height: 1.12;
  font-weight: 600;
  margin: 0 0 26px;
  max-width: 17ch;
}

.blog-post__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: #ffffff99;
  font-size: 15px;
}

.blog-post__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--theme);
}

.blog-post__figure {
  margin: -50px 0 0;
  position: relative;
  z-index: 2;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.blog-post__figure img {
  width: 100%;
  height: auto;
  display: block;
}

.blog-post__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 60px;
  align-items: start;
  padding: 70px 0 90px;
}

.blog-post__side {
  position: sticky;
  top: 120px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.blog-side-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg);
  padding: 26px;
}

.blog-side-card__kicker {
  color: #ffffff80;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 16px;
}

.blog-side-card h3 {
  font-family: "Unbounded", sans-serif;
  color: var(--white);
  font-size: 20px;
  line-height: 1.35;
  margin: 0 0 12px;
}

.blog-side-cta p {
  color: #ffffff99;
  font-size: 15px;
  margin: 0 0 22px;
}

.blog-share {
  display: flex;
  gap: 12px;
}

.blog-share a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--white);
  transition: all 0.2s ease;
}

.blog-share a:hover {
  background: var(--theme);
  border-color: var(--theme);
  color: var(--black);
}

.blog-related {
  padding: 70px 0 100px;
  border-top: 1px solid var(--border);
}

.blog-related .section-title {
  margin-bottom: 40px;
}

/* ---- Policy / content pages ---- */
.policy-page {
  background-color: var(--black);
}

.policy-hero__updated {
  color: #ffffff80;
  font-size: 15px;
  margin: 18px 0 0;
}

.policy-body {
  max-width: 820px;
  margin: 0 auto;
  padding: 70px 0 110px;
}

/* ---- Prose: shared styling for admin-authored HTML ---- */
.prose {
  color: #ffffffcc;
  font-size: 17px;
  line-height: 1.8;
}

.prose > *:first-child {
  margin-top: 0;
}

.prose h2 {
  font-family: "Unbounded", sans-serif;
  color: var(--white);
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.3;
  font-weight: 600;
  margin: 52px 0 20px;
}

.prose h3 {
  font-family: "Unbounded", sans-serif;
  color: var(--white);
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.35;
  font-weight: 550;
  margin: 40px 0 16px;
}

.prose h4 {
  font-family: "Unbounded", sans-serif;
  color: var(--white);
  font-size: 18px;
  margin: 32px 0 14px;
}

.prose p {
  margin: 0 0 24px;
}

.prose a {
  color: var(--theme);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose a:hover {
  opacity: 0.8;
  color: var(--theme);
}

.prose strong {
  color: var(--white);
  font-weight: 600;
}

.prose ul,
.prose ol {
  margin: 0 0 24px;
  padding-left: 24px;
}

.prose li {
  margin-bottom: 12px;
}

.prose ul li::marker {
  color: var(--theme);
}

.prose ol li::marker {
  color: var(--theme);
  font-weight: 600;
}

.prose blockquote {
  margin: 32px 0;
  padding: 24px 28px;
  border-left: 3px solid var(--theme);
  border-radius: 0 14px 14px 0;
  background: #ffffff0a;
  color: var(--white);
  font-size: 19px;
  line-height: 1.65;
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  margin: 32px 0;
  border: 1px solid var(--border);
}

.prose figure {
  margin: 32px 0;
}

.prose figcaption {
  color: #ffffff80;
  font-size: 14px;
  text-align: center;
  margin-top: 12px;
}

.prose code {
  background: #ffffff14;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 0.9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--theme);
}

.prose pre {
  background: #ffffff0a;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  overflow-x: auto;
  margin: 0 0 24px;
}

.prose pre code {
  background: none;
  border: none;
  padding: 0;
  color: #ffffffcc;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 44px 0;
  opacity: 1;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 24px;
  font-size: 15px;
}

.prose th,
.prose td {
  border: 1px solid var(--border);
  padding: 12px 16px;
  text-align: left;
}

.prose th {
  color: var(--white);
  background: #ffffff0a;
  font-weight: 600;
}

/* ---- Footer links ---- */
.footer-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: #ffffff99;
  font-size: 15px;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--theme);
}

/* ---- Responsive ---- */
@media (max-width: 1199px) {
  .blog-post__layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .blog-post__side {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .blog-side-card {
    flex: 1 1 260px;
  }
}

@media (max-width: 991px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .blog-post__hero,
  .policy-hero {
    padding: 150px 0 60px;
  }
}

@media (max-width: 767px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .blog-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .blog-search {
    width: 100%;
  }
  .blog-search input {
    min-width: 0;
    flex: 1;
  }
  .blog-post__figure {
    margin-top: -30px;
    border-radius: 16px;
  }
  .policy-body {
    padding: 50px 0 80px;
  }
  .prose {
    font-size: 16px;
  }
}
