/*
 * Blog Template Styles
 * Template: BLOG
 */

:root {
  --blog-night: #0B1220;
  --blog-night-soft: #1E293B;
  --blog-gold: #D4AF37;
  --blog-gold-dark: #8B6508;
  --blog-gold-hover: #E5D382;
  --blog-light: #F8FAFC;
  --blog-gray: #475569;
  --blog-max-width: 1000px;
}

.blog-template {
  background-color: #fff;
}

/* Hero / header */
.blog-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
  padding: 4rem 0 3rem;
  text-align: center;
}

.blog-hero-title {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #fff;
}

.blog-hero-subtitle {
  font-size: 1rem;
  color: #cbd5e1;
  line-height: 1.5;
  max-width: 720px;
  margin: 0 auto;
}

/* Content layout */
.blog-content-section {
  margin-bottom: 2rem;
}

.blog-container {
  max-width: var(--blog-max-width);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
}

.blog-content {
  padding: 3rem 0 5rem;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--blog-gray);
}

.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4 {
  color: var(--blog-night);
  font-weight: 700;
  line-height: 1.3;
  margin: 3.5rem 0 1.25rem;
  padding-bottom: 0.75rem;
  scroll-margin-top: 6.5rem;
  position: relative;
}

.blog-content h1::after,
.blog-content h2::after,
.blog-content h3::after,
.blog-content h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--blog-gold) 0%, var(--blog-gold-dark) 100%);
  border-radius: 2px;
}

.blog-content h1 {
  font-size: 1.5rem;
  margin-top: 0;
}

.blog-content h2 {
  font-size: 1.5rem;
}

.blog-content h3 {
  font-size: 1.25rem;
}

.blog-content h4 {
  font-size: 1.05rem;
}

.blog-content h1:first-child,
.blog-content h2:first-child,
.blog-content h3:first-child,
.blog-content h4:first-child {
  margin-top: 0;
}

.blog-content p {
  margin-bottom: 1.25rem;
}

.blog-content a {
  color: var(--blog-gold);
  text-decoration: underline;
}

.blog-content a:hover {
  color: var(--blog-gold-dark);
}

/* Lists */
.blog-content ul:not(.pilier-toc-list),
.blog-content ol {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.blog-content ul:not(.pilier-toc-list) li,
.blog-content ol li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0;
}

.blog-content ul:not(.pilier-toc-list) li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 6px;
  height: 6px;
  background: var(--blog-gold);
  border-radius: 50%;
}

.blog-content ol {
  counter-reset: blog-ol;
}

.blog-content ol li {
  counter-increment: blog-ol;
}

.blog-content ol li::before {
  content: counter(blog-ol) '.';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--blog-gold);
  font-weight: 700;
}

/* Images & media */
.blog-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 2rem 0;
}

.blog-content blockquote {
  border-left: 4px solid var(--blog-gold);
  padding: 1rem 1.25rem;
  margin: 2rem 0;
  background: var(--blog-light);
  border-radius: 0 8px 8px 0;
  color: var(--blog-gray);
  font-style: italic;
}

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

/* Floating back button */
.blog-back-floating {
  position: sticky;
  bottom: 2rem;
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--blog-night);
  color: #fff;
  padding: 0.625rem 1rem;
  border-radius: 9999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 10;
  transition: transform 0.2s ease, background-color 0.2s ease;
  margin-top: 1rem;
}

.blog-back-floating:hover,
.blog-back-floating:focus {
  transform: translateY(-2px);
  color: #fff;
  background: var(--blog-gold);
}

.blog-back-floating svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .blog-back-floating {
    bottom: 2rem;
    padding: 0.75rem 1.25rem;
  }

  .blog-back-floating svg {
    width: 1.125rem;
    height: 1.125rem;
  }
}

/* Responsive */
@media (min-width: 768px) {
  .blog-hero {
    padding: 5rem 0 4rem;
  }

  .blog-hero-title {
    font-size: 2.25rem;
  }

  .blog-container {
    padding: 0 1.5rem;
  }

  .blog-content {
    padding: 4rem 0 6rem;
  }

  .blog-content h1 {
    font-size: 1.75rem;
  }

  .blog-content h2 {
    font-size: 1.75rem;
  }

  .blog-content h3 {
    font-size: 1.5rem;
  }

  .blog-content h4 {
    font-size: 1.2rem;
  }
}
