/*
 * Blog details (blog.details) — premium V2 article layout.
 * Same surface language as the blog list (bl2) and project/campaign details:
 * white cards, hairline borders, soft shadow. Brand red = CTA buttons only;
 * focus / selection stay neutral ink. Article typography: .v2-blog-content (app.css).
 * Markup: core/resources/views/frontend/pages/blog-details.blade.php
 */

.bd2 {
  --bd2-ink: #1E242E;
  --bd2-body: #37424E;
  --bd2-muted: #6B7280;
  --bd2-border: #EBECEE;
  --bd2-border-strong: #D7DAE0;
  --bd2-surface: #ffffff;
  --bd2-soft: #F8F9FB;
  --bd2-brand: #e20246;
  --bd2-brand-hover: #c4013d;
  --bd2-radius: 1.15rem;
  --bd2-shadow: 0 10px 30px rgba(15, 17, 21, 0.06);
  --bd2-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-theme="dark"] .bd2 {
  --bd2-ink: #F3F4F6;
  --bd2-body: #C9CED8;
  --bd2-muted: #8B909A;
  --bd2-border: #2A2C34;
  --bd2-border-strong: #3A4150;
  --bd2-surface: #181A20;
  --bd2-soft: #1E2028;
  --bd2-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}

.bd2 *,
.bd2 *::before,
.bd2 *::after {
  box-sizing: border-box;
}

@keyframes bd2-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Layout ---------- */
.bd2__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 1024px) {
  .bd2__inner { grid-template-columns: minmax(0, 1fr) 22rem; }
}

.bd2__main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

.bd2__side {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .bd2__side {
    position: sticky;
    top: 6rem;
  }
}

.bd2__card {
  background: var(--bd2-surface);
  border: 1px solid var(--bd2-border);
  border-radius: var(--bd2-radius);
  box-shadow: none;
  animation: bd2-rise 0.5s var(--bd2-ease) both;
}

.bd2__side > .bd2__card:nth-child(1) { animation-delay: 0.1s; }
.bd2__side > .bd2__card:nth-child(2) { animation-delay: 0.16s; }
.bd2__side > .bd2__card:nth-child(3) { animation-delay: 0.22s; }

/* ---------- Article ---------- */
.bd2__article {
  overflow: hidden;
}

.bd2__cover {
  aspect-ratio: 16 / 8;
  background: var(--bd2-soft);
  overflow: hidden;
}

.bd2__cover img,
.bd2__cover .bd2__cover-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bd2__article-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.75rem;
}

@media (min-width: 640px) {
  .bd2__article-body { padding: 2.25rem 2.5rem 2.5rem; }
}

.bd2__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--bd2-muted);
}

.bd2__chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--bd2-border);
  border-radius: 0.5rem;
  background: var(--bd2-soft);
  font-weight: 600;
  color: var(--bd2-ink);
  line-height: 1.2;
}

.bd2__title {
  margin: 0;
  font-family: 'Urbanist', sans-serif;
  font-size: 1.875rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--bd2-ink);
}

@media (min-width: 1024px) {
  .bd2__title { font-size: 2.375rem; }
}

/* ---------- Form controls (newsletter) ---------- */
.bd2__input {
  width: 100%;
  height: 3rem;
  padding: 0 1rem;
  border: 1px solid var(--bd2-border-strong);
  border-radius: 0.75rem;
  background: var(--bd2-surface);
  font-size: 0.9375rem;
  color: var(--bd2-ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bd2__input::placeholder {
  color: var(--bd2-muted);
}

.bd2__input:focus {
  outline: none;
  border-color: var(--bd2-ink);
  box-shadow: none;
}

html[data-theme="dark"] .bd2__input:focus {
  box-shadow: none;
}

.bd2__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3rem;
  padding: 0 1.5rem;
  border: 0;
  border-radius: 0.75rem;
  background: var(--bd2-brand);
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.2s var(--bd2-ease);
}

.bd2__btn:hover {
  background: var(--bd2-brand-hover);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.bd2__btn:active {
  transform: none;
}

.bd2__avatar {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--bd2-border);
  border-radius: 0.8rem;
  background: var(--bd2-surface);
  font-weight: 700;
  color: var(--bd2-ink);
  overflow: hidden;
}

.bd2__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Related ---------- */
.bd2__related-head {
  margin: 0;
  font-family: 'Urbanist', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--bd2-ink);
}

/* ---------- Sidebar ---------- */
.bd2__side-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
}

.bd2__side-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.bd2__side-title {
  margin: 0;
  font-family: 'Urbanist', sans-serif;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--bd2-ink);
}

.bd2__toc {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bd2__toc a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.6rem;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--bd2-body);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.bd2__toc a:hover {
  background: var(--bd2-soft);
  color: var(--bd2-ink);
}

.bd2__author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.bd2__author-name {
  font-size: 0.9375rem;
  font-weight: 650;
  color: var(--bd2-ink);
}


.bd2__side-text {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--bd2-body);
}

.bd2__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9375rem;
  font-weight: 650;
  color: var(--bd2-ink);
  text-decoration: none;
}

.bd2__link svg {
  transition: transform 0.2s var(--bd2-ease);
}

.bd2__link:hover {
  color: var(--bd2-ink);
  text-decoration: none;
}

.bd2__link:hover svg {
  transform: translateX(3px);
}

.bd2__icon-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--bd2-border);
  border-radius: 0.8rem;
  background: var(--bd2-soft);
  color: var(--bd2-ink);
}

.bd2__newsletter {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (prefers-reduced-motion: reduce) {
  .bd2__card,
  .bd2__btn,
  .bd2__btn:hover,
  .bd2__link svg {
    animation: none;
    transition: none;
    transform: none;
  }
}
