/* =========================================================
   blog-single.css
   Novera Materials — Blog Article Page
   Fonts already loaded in <head>: Playfair Display (display),
   Cormorant Garamond (editorial serif), DM Sans (UI / utility)
   ========================================================= */

:root {
  --nv-forest: #1f3d2b; /* deep vegetable green — primary */
  --nv-sage: #4a6b52; /* muted sage — secondary */
  --nv-sage-soft: #e7ede8; /* pale sage tint for surfaces */
  --nv-turmeric: #d9a441; /* warm turmeric accent (not clay/terracotta) */
  --nv-turmeric-deep: #b9822d;
  --nv-cream: #fbf9f4; /* page background */
  --nv-paper: #ffffff; /* card / panel background */
  --nv-ink: #22261f; /* body text */
  --nv-ink-soft: #5a6157; /* muted text */
  --nv-line: #e2e0d5; /* hairline dividers */

  --nv-font-display: "Playfair Display", serif;
  --nv-font-editorial: "Cormorant Garamond", serif;
  --nv-font-ui: "DM Sans", sans-serif;

  --nv-radius: 4px;
  --nv-shadow-soft: 0 12px 32px -18px rgba(31, 61, 43, 0.28);
}

/* Safety net so nothing on this page can force a horizontal scrollbar */
.page-banner,
.breadcrumb-bar,
.blog-single-section,
.blog-single-wrap,
.blog-article,
.blog-sidebar {
  max-width: 100%;
  box-sizing: border-box;
}

.blog-single-wrap * {
  box-sizing: border-box;
}

/* =========================================================
   PAGE BANNER
   ========================================================= */

.page-banner {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  isolation: isolate;
}

.page-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(20, 34, 24, 0.78) 0%,
    rgba(20, 34, 24, 0.6) 45%,
    rgba(20, 34, 24, 0.82) 100%
  );
  z-index: -1;
}

.banner-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
  color: var(--nv-cream);
}

.banner-divider {
  width: 64px;
  height: 2px;
  margin: 18px auto;
  background: var(--nv-turmeric);
}

.banner-title {
  font-family: var(--nv-font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 6vw, 3rem);
  line-height: 1.15;
  letter-spacing: 0.01em;
  margin: 0;
  word-wrap: break-word;
}

.banner-subtitle {
  font-family: var(--nv-font-ui);
  font-weight: 400;
  font-size: clamp(0.85rem, 3vw, 1.125rem);
  letter-spacing: 0.02em;
  color: rgba(251, 249, 244, 0.85);
  margin: 0;
}

/* =========================================================
   BREADCRUMB
   ========================================================= */

.breadcrumb-bar {
  background: var(--nv-sage-soft);
  border-bottom: 1px solid var(--nv-line);
  font-family: var(--nv-font-ui);
  font-size: 0.85rem;
}

.breadcrumb-bar .container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.breadcrumb-bar a {
  color: var(--nv-sage);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb-bar a:hover {
  color: var(--nv-forest);
}

.breadcrumb-bar .sep {
  color: var(--nv-ink-soft);
  opacity: 0.6;
}

.breadcrumb-bar .current {
  color: var(--nv-ink);
  font-weight: 500;
}

/* =========================================================
   LAYOUT
   ========================================================= */

.blog-single-section {
  background: var(--nv-cream);
  padding: 64px 0 96px;
  overflow-x: hidden;
}

.blog-single-section .container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.blog-single-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 56px;
  align-items: start;
}

/* Explicit placement: content always left, sidebar always right,
   regardless of source order in the HTML */
.blog-article {
  grid-column: 1;
  min-width: 0; /* prevents grid children from overflowing on narrow screens */
}

.blog-sidebar {
  grid-column: 2;
  min-width: 0;
}

/* =========================================================
   ARTICLE BODY
   ========================================================= */

.blog-article {
  font-family: var(--nv-font-ui);
  color: var(--nv-ink);
  line-height: 1.75;
}

.article-intro {
  font-family: var(--nv-font-editorial);
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  line-height: 1.6;
  color: var(--nv-forest);
  font-weight: 500;
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--nv-line);
}

.blog-article p {
  font-size: 1rem;
  margin: 0 0 20px;
  color: var(--nv-ink);
  overflow-wrap: break-word;
  word-break: break-word;
}

.blog-article h2 {
  font-family: var(--nv-font-display);
  font-size: clamp(1.35rem, 4.5vw, 1.9rem);
  color: var(--nv-forest);
  margin: 52px 0 20px;
  padding-top: 8px;
  position: relative;
  overflow-wrap: break-word;
}

.blog-article h2::before {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  background: var(--nv-turmeric);
  margin-bottom: 16px;
}

.blog-article h3 {
  font-family: var(--nv-font-display);
  font-weight: 700;
  font-size: clamp(1.05rem, 3vw, 1.2rem);
  color: var(--nv-ink);
  margin: 32px 0 14px;
  overflow-wrap: break-word;
}

.blog-article a {
  color: var(--nv-turmeric-deep);
  text-decoration: underline;
  text-decoration-color: rgba(185, 130, 45, 0.4);
  text-underline-offset: 3px;
  transition:
    color 0.2s ease,
    text-decoration-color 0.2s ease;
  overflow-wrap: break-word;
}

.blog-article a:hover {
  color: var(--nv-forest);
  text-decoration-color: var(--nv-forest);
}

.article-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.article-list li {
  position: relative;
  padding-left: 28px;
  font-size: 1rem;
  color: var(--nv-ink);
}

.article-list li::before {
  content: "\f06c"; /* fa-solid leaf icon */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 2px;
  color: var(--nv-sage);
  font-size: 0.85rem;
}

/* Call-to-action block inside article */
.article-cta {
  margin-top: 48px;
  padding: 36px 40px;
  background: var(--nv-forest);
  border-radius: var(--nv-radius);
  text-align: center;
  color: var(--nv-cream);
  box-shadow: var(--nv-shadow-soft);
}

.article-cta h4 {
  font-family: var(--nv-font-display);
  font-size: clamp(1.15rem, 3.5vw, 1.4rem);
  margin: 0 0 10px;
  color: var(--nv-cream);
}

.article-cta p {
  font-family: var(--nv-font-ui);
  color: rgba(251, 249, 244, 0.82);
  margin: 0 0 22px;
}

.btn-cta {
  display: inline-block;
  font-family: var(--nv-font-ui);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--nv-forest);
  background: var(--nv-turmeric);
  padding: 13px 32px;
  border-radius: var(--nv-radius);
  text-decoration: none;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
  max-width: 100%;
  overflow-wrap: break-word;
}

.btn-cta:hover {
  background: var(--nv-cream);
  transform: translateY(-2px);
}

/* =========================================================
   SIDEBAR
   ========================================================= */

.blog-sidebar {
  display: grid;
  gap: 28px;
  position: sticky;
  top: 100px;
}

.sidebar-widget {
  background: var(--nv-paper);
  border: 1px solid var(--nv-line);
  border-radius: var(--nv-radius);
  padding: 26px;
  min-width: 0;
}

.sidebar-widget h5 {
  font-family: var(--nv-font-display);
  font-size: 1.05rem;
  color: var(--nv-forest);
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--nv-turmeric);
  display: inline-block;
}

/* Search */
.sidebar-search .search-box {
  display: flex;
  border: 1px solid var(--nv-line);
  border-radius: var(--nv-radius);
  overflow: hidden;
}

.sidebar-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  padding: 11px 14px;
  font-family: var(--nv-font-ui);
  font-size: 0.9rem;
  background: var(--nv-cream);
  color: var(--nv-ink);
}

.sidebar-search button {
  border: none;
  background: var(--nv-forest);
  color: var(--nv-cream);
  padding: 0 18px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.sidebar-search button:hover {
  background: var(--nv-turmeric-deep);
}

/* Category / generic list */
.sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.sidebar-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 0;
  font-family: var(--nv-font-ui);
  font-size: 0.92rem;
  color: var(--nv-ink);
  text-decoration: none;
  border-bottom: 1px dashed var(--nv-line);
  transition:
    color 0.2s ease,
    padding-left 0.2s ease;
  overflow-wrap: break-word;
}

.sidebar-list li:last-child a {
  border-bottom: none;
}

.sidebar-list li a:hover {
  color: var(--nv-turmeric-deep);
  padding-left: 4px;
}

.sidebar-list li a span {
  font-size: 0.78rem;
  color: var(--nv-sage);
  background: var(--nv-sage-soft);
  padding: 2px 8px;
  border-radius: 20px;
  flex-shrink: 0;
}

/* Recent posts */
.sidebar-posts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.sidebar-posts li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.sidebar-posts img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--nv-radius);
  flex-shrink: 0;
}

.sidebar-posts .post-date {
  display: block;
  font-family: var(--nv-font-ui);
  font-size: 0.72rem;
  color: var(--nv-sage);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.sidebar-posts a {
  font-family: var(--nv-font-ui);
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--nv-ink);
  text-decoration: none;
  transition: color 0.2s ease;
  overflow-wrap: break-word;
}

.sidebar-posts a:hover {
  color: var(--nv-turmeric-deep);
}

/* CTA widget */
.sidebar-cta {
  background: var(--nv-forest);
  border-color: var(--nv-forest);
  text-align: center;
}

.sidebar-cta h5 {
  color: var(--nv-cream);
  border-bottom-color: var(--nv-turmeric);
}

.sidebar-cta p {
  font-family: var(--nv-font-ui);
  font-size: 0.9rem;
  color: rgba(251, 249, 244, 0.82);
  margin: 0 0 18px;
}

.sidebar-cta .btn-cta {
  width: 100%;
}

/* Contact widget */
.contact-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--nv-line);
}

.contact-list li:last-child {
  border-bottom: none;
}

.contact-list i {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--nv-sage-soft);
  color: var(--nv-forest);
  border-radius: 50%;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.contact-list a {
  border-bottom: none;
  font-size: 0.88rem;
}

/* =========================================================
   SCROLL REVEAL
   ========================================================= */

/* Content is visible by default. It only animates in if JS has
   proven it's running by adding .js-ready to <html> — this way
   the article and sidebar can never get stuck invisible if the
   observer script fails to load or run. */
.reveal,
.reveal-left,
.reveal-right {
  opacity: 1;
  transform: none;
}

.js-ready .reveal,
.js-ready .reveal-left,
.js-ready .reveal-right {
  opacity: 0;
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.js-ready .reveal {
  transform: translateY(24px);
}

.js-ready .reveal-left {
  transform: translateX(-24px);
}

.js-ready .reveal-right {
  transform: translateX(24px);
}

.reveal.visible,
.reveal-left.visible,
.reveal-right.visible {
  opacity: 1;
  transform: translate(0, 0);
}

@media (prefers-reduced-motion: reduce) {
  .js-ready .reveal,
  .js-ready .reveal-left,
  .js-ready .reveal-right {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* Large tablets / small laptops: tighten the gap before the
   sidebar drops below the article */
@media (max-width: 1100px) {
  .blog-single-wrap {
    gap: 36px;
  }
}

/* Tablets: sidebar drops under the article and spreads into
   a 2-column widget grid so it doesn't feel like a long stack */
@media (max-width: 991px) {
  .blog-single-wrap {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .blog-article,
  .blog-sidebar {
    grid-column: 1;
  }

  .blog-sidebar {
    position: static;
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Small tablets / large phones: back to a single sidebar column
   so widgets (especially recent posts) have room to breathe */
@media (max-width: 767px) {
  .blog-single-section {
    padding: 52px 0 72px;
  }

  .blog-single-section .container {
    padding: 0 20px;
  }

  .blog-single-wrap {
    gap: 32px;
  }

  .blog-sidebar {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .banner-inner {
    padding: 0 20px;
  }
}

@media (max-width: 640px) {
  .page-banner {
    min-height: 280px;
  }

  .blog-single-section {
    padding: 44px 0 64px;
  }

  .blog-single-section .container {
    padding: 0 16px;
  }

  .blog-sidebar {
    grid-template-columns: 1fr;
  }

  .article-cta {
    padding: 28px 22px;
  }

  .article-intro {
    font-size: 1.15rem;
    padding-bottom: 22px;
    margin-bottom: 22px;
  }

  .blog-article h2 {
    margin: 40px 0 16px;
  }

  .blog-article h3 {
    margin: 26px 0 12px;
  }

  .sidebar-widget {
    padding: 20px;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .page-banner {
    min-height: 240px;
  }

  .banner-divider {
    margin: 14px auto;
  }

  .breadcrumb-bar .container {
    padding: 12px 16px;
    font-size: 0.8rem;
  }

  .blog-single-section .container {
    padding: 0 14px;
  }

  .blog-article p,
  .article-list li {
    font-size: 0.95rem;
  }

  .btn-cta {
    width: 100%;
    padding: 13px 20px;
    text-align: center;
  }

  .sidebar-posts img {
    width: 52px;
    height: 52px;
  }

  .sidebar-posts a {
    font-size: 0.85rem;
  }
}

/* Very small phones */
@media (max-width: 360px) {
  .banner-title {
    font-size: 1.5rem;
  }

  .blog-single-section .container {
    padding: 0 12px;
  }

  .article-cta {
    padding: 24px 16px;
  }

  .sidebar-widget {
    padding: 16px;
  }
}

/* ============= image ==================== */

.article-featured-image {
  width: 100%;
  margin-bottom: 35px;
  overflow: hidden;
  border-radius: 12px;
}

.article-featured-image img {
  width: 100%;
  height: 420px;
  display: block;
  object-fit: fill;
  border-radius: 12px;
  transition: transform 0.5s ease;
}

.article-featured-image:hover img {
  transform: scale(1.03);
}

/* Mobile */
@media (max-width: 767px) {
  .article-featured-image {
    margin-bottom: 25px;
    border-radius: 8px;
  }

  .article-featured-image img {
    height: 250px;
    border-radius: 8px;
  }
}

@media (max-width: 480px) {
  .article-featured-image img {
    height: 200px;
  }
}

@media (max-width: 360px) {
  .article-featured-image img {
    height: 170px;
  }
}
