/* ======================================================= */
/*  SINGLE POST TEMPLATE STYLES                            */
/*  Template: single-post.php (blog articles)              */
/*  Scope: #post-hero + article content + navigation       */
/* ======================================================= */


/* ===================== */
/* HERO BAND & OVERLAY   */
/* ===================== */

#post-hero {
  /* Background color is visible under/around the featured image */
  background-color: var(--bering-accent);

  /* If a background image is injected via inline style, use it nicely */
  background-size: cover;        /* fill the area */
  background-position: center;   /* keep it nicely centered */
  background-repeat: no-repeat;  /* no tiling */

  color: #ffffff;
  position: relative;            /* for overlay + inner positioning */
  display: flex;
  align-items: center;
}

/* Dark overlay over hero background image */
#post-hero::before {
  content: "";
  position: absolute;
  inset: 0; /* top:0; right:0; bottom:0; left:0 */
  background: rgba(0, 0, 0, 0.45); /* tweak 0.35–0.55 for more/less darkness */
  z-index: 0;
}

/* Inner band – same rhythm as .container-inner */
#post-hero .post-hero-inner {
  width: 80%;
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  padding-top: 4.5rem;
  padding-bottom: 3.5rem;
  z-index: 1; /* sits above overlay */
}

/* Medium screens */
@media (max-width: 1024px) {
  #post-hero .post-hero-inner {
    padding-top: 3.5rem;
    padding-bottom: 3rem;
  }
}

/* Mobile: use 90% width, like .container-inner */
@media (max-width: 880px) {
  #post-hero .post-hero-inner {
    width: 90% !important;
    max-width: none;
  }
}

/* Small phones: slightly tighter vertical padding */
@media (max-width: 767px) {
  #post-hero .post-hero-inner {
    padding-top: 2.75rem;
    padding-bottom: 2.5rem;
  }
}

/* Horizontal padding fix: match search hero behaviour */
#post-hero .post-hero-inner {
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
}

@media (min-width: 881px) {
  #post-hero .post-hero-inner {
    padding-left: 0;
    padding-right: 0;
  }
}


/* ===================== */
/* HERO TITLE & META     */
/* ===================== */

/* Keep very long titles from stretching too wide on large screens */
#post-hero .post-hero-title {
  color: #ffffff;
  max-width: 48rem; /* ~768px */
}

/* Slightly narrower on tablets */
@media (max-width: 1024px) {
  #post-hero .post-hero-title {
    max-width: 40rem;
  }
}

/* On phones, allow full width */
@media (max-width: 767px) {
  #post-hero .post-hero-title {
    max-width: 100%;
  }
}

/* Meta under title: date, categories, etc. */
.post-hero-meta {
  font-size: 0.9rem;
  opacity: 0.9;
}

.post-hero-separator {
  margin: 0 0.4rem;
}


/* ===================== */
/* MAIN CONTENT WRAPPER  */
/* ===================== */

.post-content-wrapper {
  padding: 2.5rem 0 3rem;
}

@media (max-width: 1024px) {
  .post-content-wrapper {
    padding: 2rem 0 2.5rem;
  }
}

@media (max-width: 767px) {
  .post-content-wrapper {
    padding: 1.7rem 0 2.2rem;
  }
}


/* ===================== */
/* FEATURED IMAGE        */
/* ===================== */

.post-featured-image {
  margin: 0 0 1.75rem;
}

.post-featured-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}


/* ===================== */
/* ARTICLE TYPOGRAPHY    */
/* ===================== */

.single-post-article {
  color: var(--bering-text);
  font-size: 1rem;
  line-height: 1.7;
}

.single-post-article p {
  margin-bottom: 1.1rem;
}

.single-post-article h2,
.single-post-article h3,
.single-post-article h4 {
  margin-top: 1.9rem;
  margin-bottom: 0.8rem;
  color: #303c42;
}


/* ===================== */
/* BOTTOM META ROW       */
/* ===================== */

.post-content-footer {
  margin-top: 2.2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-top: 1.3rem;
}

.post-meta-bottom {
  display: flex;
  flex-wrap: wrap;
  row-gap: 0.5rem;
  column-gap: 1.5rem;
  justify-content: space-between;
  font-size: 0.9rem;
}

.post-meta-label {
  font-weight: 600;
  margin-right: 0.25rem;
}

.post-meta-separator {
  margin: 0 0.5rem;
}

.post-tags-label {
  font-weight: 600;
  margin-right: 0.3rem;
}


/* ===================== */
/* POST NAVIGATION       */
/* ===================== */

.post-navigation {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.post-navigation .nav-links {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
  max-width: 48%;
}

@media (max-width: 767px) {
  .post-navigation .nav-previous,
  .post-navigation .nav-next {
    max-width: 100%;
  }
}

.post-navigation .nav-label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.1rem;
  color: var(--bering-text);
}

.post-navigation .nav-title {
  font-weight: 600;
  font-size: 0.98rem;
}

/* Use standard accent colors for nav links */
.post-navigation a {
  color: var(--e-global-color-accent, #91b6c7);
}

.post-navigation a:hover {
  color: var(--bering-accent-hover);
}

/* Remove extra divider above next/prev navigation */
.post-navigation {
  border-top: none !important;
  padding-top: 0 !important; /* remove the empty gap */
  margin-top: 2rem; /* keep some spacing from content */
}

/* ========================= */
/* END SINGLE POST TEMPLATE  */
/* ========================= */