/*
Theme Name: Serenity Blog
Theme URI: https://www.serenityhillssector86.com/blog/
Author: Honey Money Associates
Description: Lightweight blog theme for serenityhillssector86.com. Matches the main site palette, typography and spacing so visitors moving between the project page and the blog stay in one visual world. No page builder, no framework, no jQuery.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: serenity-blog
Tags: blog, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   Fonts. Loaded from the main site so the browser reuses one cached copy
   across the project page and the blog.
   ========================================================================== */

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  src: local(""), url("https://www.serenityhillssector86.com/fonts/poppins-v20-latin-regular.woff") format("woff");
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  src: local(""), url("https://www.serenityhillssector86.com/fonts/poppins-v20-latin-600.woff2") format("woff2");
  font-display: swap;
}

/* ==========================================================================
   Tokens. Values lifted from the main site stylesheet so the two match.
   ========================================================================== */

:root {
  --sb-navy: #071c35;
  --sb-navy-soft: #16304f;
  --sb-ink: #212529;
  --sb-muted: #53555a;
  --sb-line: #dee2e6;
  --sb-bg-soft: #f8f9fa;
  --sb-white: #fff;
  --sb-green: #198754;
  --sb-whatsapp: #25d366;
  --sb-phone: #0abf53;

  --sb-radius: 0.4rem;
  --sb-radius-lg: 1rem;
  --sb-shadow: 0 19px 48px -12px rgba(0, 0, 0, 0.25);
  --sb-shadow-sm: 0 2px 10px -4px rgba(7, 28, 53, 0.25);

  --sb-container: 1225px;
  --sb-space: 22px;
  --sb-space-xl: 40px;

  --sb-font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sb-bold: 600;
  --sb-medium: 500;
}

/* ==========================================================================
   Reset
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sb-font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--sb-ink);
  background: var(--sb-white);
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: var(--sb-navy); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--sb-green); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--sb-font);
  font-weight: var(--sb-bold);
  color: var(--sb-navy);
  line-height: 1.25;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(1.75rem, 4.2vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.85rem); margin-top: 1.8em; }
h3 { font-size: clamp(1.12rem, 2.2vw, 1.35rem); margin-top: 1.5em; }

p, ul, ol { margin: 0 0 1.15rem; }

ul, ol { padding-left: 1.25rem; }
li { margin-bottom: 0.5rem; }

blockquote {
  margin: 1.6rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--sb-green);
  background: var(--sb-bg-soft);
  border-radius: 0 var(--sb-radius) var(--sb-radius) 0;
  color: var(--sb-muted);
}

table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.94rem; }
th, td { padding: 0.7rem 0.8rem; border: 1px solid var(--sb-line); text-align: left; }
th { background: var(--sb-bg-soft); font-weight: var(--sb-bold); color: var(--sb-navy); }

/* ==========================================================================
   Layout
   ========================================================================== */

.sb-container {
  width: 100%;
  max-width: var(--sb-container);
  margin-inline: auto;
  padding-inline: var(--sb-space);
}

.sb-main { padding: var(--sb-space-xl) 0 60px; }

.sb-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sb-space-xl);
}

@media (min-width: 992px) {
  .sb-layout { grid-template-columns: minmax(0, 1fr) 330px; }
}

.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--sb-navy);
  color: #fff;
  padding: 0.7rem 1rem;
  z-index: 999;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ==========================================================================
   Header
   ========================================================================== */

.sb-header {
  background: var(--sb-white);
  border-bottom: 1px solid var(--sb-line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.sb-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sb-space);
  min-height: 68px;
}

.sb-brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.sb-brand img { max-height: 38px; width: auto; }
.sb-brand__text { font-weight: var(--sb-bold); color: var(--sb-navy); font-size: 1.05rem; }

.sb-nav ul { display: flex; gap: 1.35rem; list-style: none; margin: 0; padding: 0; }
.sb-nav a {
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: var(--sb-medium);
  color: var(--sb-ink);
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
}
.sb-nav a:hover,
.sb-nav .current-menu-item > a { color: var(--sb-navy); border-bottom-color: var(--sb-green); }

.sb-header__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--sb-navy);
  color: #fff !important;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: var(--sb-bold);
  padding: 0.55rem 1.05rem;
  border-radius: var(--sb-radius);
  white-space: nowrap;
}
.sb-header__cta:hover { background: var(--sb-navy-soft); }

.sb-nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--sb-line);
  border-radius: var(--sb-radius);
  padding: 0.45rem 0.6rem;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

@media (max-width: 860px) {
  .sb-nav-toggle { display: block; }
  .sb-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--sb-line);
    padding: var(--sb-space);
    box-shadow: var(--sb-shadow-sm);
  }
  .sb-nav.is-open { display: block; }
  .sb-nav ul { flex-direction: column; gap: 0.35rem; }
  .sb-header__cta { font-size: 0.8rem; padding: 0.5rem 0.8rem; }
}

/* ==========================================================================
   Page head
   ========================================================================== */

.sb-pagehead {
  background: var(--sb-navy);
  color: #fff;
  padding: 46px 0 40px;
}
.sb-pagehead h1 { color: #fff; margin-bottom: 0.35rem; }
.sb-pagehead p { color: rgba(255, 255, 255, 0.78); margin: 0; max-width: 62ch; }

/* Breadcrumbs */
.sb-crumbs { font-size: 0.84rem; color: var(--sb-muted); margin-bottom: 1.1rem; }
.sb-crumbs a { color: var(--sb-muted); text-decoration: none; }
.sb-crumbs a:hover { color: var(--sb-navy); text-decoration: underline; }
.sb-crumbs span[aria-current] { color: var(--sb-ink); }
.sb-pagehead .sb-crumbs,
.sb-pagehead .sb-crumbs a { color: rgba(255, 255, 255, 0.7); }
.sb-pagehead .sb-crumbs a:hover { color: #fff; }

/* ==========================================================================
   Post cards
   ========================================================================== */

.sb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sb-space);
}

.sb-card {
  border: 1px solid var(--sb-line);
  border-radius: var(--sb-radius-lg);
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.sb-card:hover { box-shadow: var(--sb-shadow-sm); transform: translateY(-2px); }

.sb-card__media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--sb-bg-soft); }
.sb-card__media img { width: 100%; height: 100%; object-fit: cover; }

.sb-card__body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; flex: 1; }

.sb-cat {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: var(--sb-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sb-green);
  text-decoration: none;
  margin-bottom: 0.5rem;
}

.sb-card__title { font-size: 1.08rem; margin: 0 0 0.55rem; line-height: 1.35; }
.sb-card__title a { text-decoration: none; }
.sb-card__title a:hover { color: var(--sb-green); }

.sb-card__excerpt { font-size: 0.92rem; color: var(--sb-muted); margin: 0 0 1rem; }

.sb-meta {
  font-size: 0.8rem;
  color: var(--sb-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: auto;
}
.sb-meta__dot { opacity: 0.5; }

/* ==========================================================================
   Single post
   ========================================================================== */

.sb-article__head { margin-bottom: 1.6rem; }
.sb-article__head h1 { margin-bottom: 0.7rem; }

.sb-hero {
  border-radius: var(--sb-radius-lg);
  overflow: hidden;
  margin-bottom: 1.8rem;
}
.sb-hero img { width: 100%; }

.sb-content { font-size: 1.02rem; }
.sb-content > *:first-child { margin-top: 0; }

.sb-content a { color: var(--sb-green); }

.sb-content ul li::marker { color: var(--sb-green); }

.sb-content h2 {
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--sb-line);
}

/* Author box */
.sb-author {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin: 2.5rem 0 0;
  padding: 1.2rem;
  background: var(--sb-bg-soft);
  border-radius: var(--sb-radius-lg);
}
.sb-author img { border-radius: 50%; flex-shrink: 0; }
.sb-author__name { font-weight: var(--sb-bold); color: var(--sb-navy); margin: 0 0 0.25rem; }
.sb-author__bio { font-size: 0.9rem; color: var(--sb-muted); margin: 0; }

/* Related */
.sb-related { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--sb-line); }
.sb-related h2 { margin-top: 0; }

/* ==========================================================================
   Sidebar
   ========================================================================== */

.sb-sidebar { align-self: start; position: sticky; top: 92px; }

.sb-widget {
  border: 1px solid var(--sb-line);
  border-radius: var(--sb-radius-lg);
  padding: 1.15rem 1.2rem;
  margin-bottom: var(--sb-space);
  background: #fff;
}
.sb-widget h3,
.sb-widget .widget-title {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.9rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--sb-line);
}
.sb-widget ul { list-style: none; padding: 0; margin: 0; }
.sb-widget li { margin-bottom: 0.6rem; font-size: 0.92rem; }
.sb-widget a { text-decoration: none; }
.sb-widget a:hover { text-decoration: underline; }

/* Lead panel */
.sb-lead {
  background: var(--sb-navy);
  color: #fff;
  border-radius: var(--sb-radius-lg);
  padding: 1.4rem 1.3rem;
  margin-bottom: var(--sb-space);
  box-shadow: var(--sb-shadow-sm);
}
.sb-lead h3 { color: #fff; font-size: 1.15rem; margin: 0 0 0.45rem; border: 0; padding: 0; text-transform: none; letter-spacing: 0; }
.sb-lead p { font-size: 0.9rem; color: rgba(255, 255, 255, 0.8); margin: 0 0 1rem; }

.sb-lead__stats { list-style: none; padding: 0; margin: 0 0 1.1rem; font-size: 0.86rem; }
.sb-lead__stats li {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
}
.sb-lead__stats li:last-child { border-bottom: 0; }
.sb-lead__stats b { color: #fff; font-weight: var(--sb-bold); }

.sb-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.75rem 1rem;
  border-radius: var(--sb-radius);
  font-weight: var(--sb-bold);
  font-size: 0.94rem;
  text-decoration: none;
  margin-bottom: 0.55rem;
}
.sb-btn--primary { background: var(--sb-green); color: #fff !important; }
.sb-btn--primary:hover { filter: brightness(1.08); }
.sb-btn--wa { background: var(--sb-whatsapp); color: #fff !important; }
.sb-btn--wa:hover { filter: brightness(1.06); }
.sb-btn--ghost { border: 1px solid rgba(255, 255, 255, 0.35); color: #fff !important; }
.sb-btn--ghost:hover { background: rgba(255, 255, 255, 0.1); }

/* ==========================================================================
   Pagination
   ========================================================================== */

.sb-pagination { margin-top: var(--sb-space-xl); }
.sb-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.sb-pagination .page-numbers {
  display: inline-block;
  min-width: 40px;
  text-align: center;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--sb-line);
  border-radius: var(--sb-radius);
  text-decoration: none;
  font-size: 0.9rem;
}
.sb-pagination .page-numbers.current { background: var(--sb-navy); color: #fff; border-color: var(--sb-navy); }
.sb-pagination .page-numbers:hover:not(.current) { border-color: var(--sb-navy); }

/* ==========================================================================
   Footer
   ========================================================================== */

.sb-footer { background: var(--sb-navy); color: rgba(255, 255, 255, 0.75); margin-top: 0; }
.sb-footer__inner { padding: 44px 0 20px; display: grid; gap: var(--sb-space-xl); }

@media (min-width: 768px) {
  .sb-footer__inner { grid-template-columns: 1.4fr 1fr 1fr; }
}

.sb-footer h4 { color: #fff; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 0.9rem; }
.sb-footer ul { list-style: none; padding: 0; margin: 0; }
.sb-footer li { margin-bottom: 0.5rem; font-size: 0.9rem; }
.sb-footer a { color: rgba(255, 255, 255, 0.75); text-decoration: none; }
.sb-footer a:hover { color: #fff; text-decoration: underline; }

.sb-disclaimer {
  font-size: 0.78rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.55);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 18px 0;
  margin: 0;
}

.sb-copyright {
  font-size: 0.82rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 16px 0 22px;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

/* ==========================================================================
   Floating actions
   ========================================================================== */

.sb-float {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 60;
}
.sb-float a {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: var(--sb-shadow-sm);
  text-decoration: none;
}
.sb-float .is-wa { background: var(--sb-whatsapp); }
.sb-float .is-call { background: var(--sb-phone); }
.sb-float svg { width: 24px; height: 24px; fill: currentColor; }

@media (max-width: 600px) {
  .sb-float { right: 12px; bottom: 12px; }
  .sb-float a { width: 46px; height: 46px; }
}

/* ==========================================================================
   WordPress core classes
   ========================================================================== */

.alignleft { float: left; margin: 0.4rem 1.4rem 1rem 0; }
.alignright { float: right; margin: 0.4rem 0 1rem 1.4rem; }
.aligncenter { margin-inline: auto; }
.alignwide, .alignfull { margin-block: 1.6rem; }
.wp-caption-text, .wp-element-caption {
  font-size: 0.82rem;
  color: var(--sb-muted);
  text-align: center;
  margin-top: 0.45rem;
}
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute;
}
.sticky { border-left: 4px solid var(--sb-green); }

.sb-search { display: flex; gap: 0.4rem; }
.sb-search input[type="search"] {
  flex: 1;
  min-width: 0;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--sb-line);
  border-radius: var(--sb-radius);
  font-family: inherit;
  font-size: 0.9rem;
}
.sb-search button {
  background: var(--sb-navy);
  color: #fff;
  border: 0;
  border-radius: var(--sb-radius);
  padding: 0.55rem 0.9rem;
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}

.sb-empty { padding: 2.5rem 0; }

@media print {
  .sb-header, .sb-sidebar, .sb-float, .sb-footer, .sb-pagination { display: none !important; }
}

/* ==========================================================================
   Post navigation (previous / next)
   Append this block to the end of style.css
   ========================================================================== */

.sb-postnav {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sb-space);
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--sb-line);
}

@media (min-width: 640px) {
  .sb-postnav { grid-template-columns: 1fr 1fr; }
}

.sb-postnav__link {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem;
  border: 1px solid var(--sb-line);
  border-radius: var(--sb-radius-lg);
  text-decoration: none;
  background: #fff;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
  min-width: 0;
}

.sb-postnav__link:hover {
  border-color: var(--sb-navy);
  box-shadow: var(--sb-shadow-sm);
}

/* Next card mirrors: text first, thumb on the right. */
.sb-postnav__link.is-next {
  flex-direction: row-reverse;
  text-align: right;
}

.sb-postnav__thumb {
  flex: 0 0 76px;
  width: 76px;
  height: 62px;
  border-radius: var(--sb-radius);
  overflow: hidden;
  background: var(--sb-bg-soft);
}

.sb-postnav__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sb-postnav__text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.sb-postnav__label {
  font-size: 0.75rem;
  font-weight: var(--sb-bold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--sb-green);
}

.sb-postnav__title {
  font-size: 0.95rem;
  font-weight: var(--sb-medium);
  line-height: 1.4;
  color: var(--sb-navy);

  /* Two lines maximum, then ellipsis. Keeps both cards the same height
     regardless of how long the neighbouring post titles are. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sb-postnav__link:hover .sb-postnav__title { color: var(--sb-green); }

/* Holds the grid column when there is no previous post,
   so a lone "Next" card stays on the right. */
.sb-postnav__spacer { display: none; }

@media (min-width: 640px) {
  .sb-postnav__spacer { display: block; }
}

@media (max-width: 400px) {
  .sb-postnav__thumb { display: none; }
  .sb-postnav__link.is-next { text-align: left; flex-direction: row; }
}