/* =========================================================
   Soul & Stretch - Main Stylesheet
   Palette: cream bg, terracotta orange + sage green accents, navy footer
   ========================================================= */

:root {
  --cream: #fdf6ee;
  --cream-soft: #faf1e6;
  --orange: #e8763c;
  --orange-dark: #d4622a;
  --orange-light: #f5d4bc;
  --green: #8a9a5f;
  --green-dark: #74854a;
  --green-light: #d6dfc4;
  --navy: #12294a;
  --navy-soft: #17335c;
  --ink: #24272b;
  --ink-soft: #5c6066;
  --line: #ece1d3;
  --font-serif: "Playfair Display", Georgia, serif;
  --font-sans: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Dark Mode Override */
body.dark-mode {
  --cream: #121212;
  --cream-soft: #1e1e1e;
  --ink: #e0e0e0;
  --ink-soft: #9ca3af;
  --line: #333333;
  --navy: #1a1a1a;
  --navy-soft: #2d2d2d;

  /* AI Chat Dark Mode Support */
  --ai-white: #1e1e1e;
  --ai-bg-light: #121212;
  --ai-text: #e0e0e0;
  --ai-text-muted: #9ca3af;
  --ai-border: #333333;
}

body.dark-mode .card-soft,
body.dark-mode .bg-white,
body.dark-mode .bg-light {
  background-color: var(--cream-soft) !important;
  color: var(--ink);
}

body.dark-mode .cat-card {
  background: radial-gradient(circle at center, #2c2c2c 0%, #151515 100%);
  border-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .btn-outline-brand {
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--ink);
}

body.dark-mode .btn-outline-brand:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

body.dark-mode .navbar-toggler-icon {
  filter: invert(1) brightness(1.5);
}

body.dark-mode .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode img:not(.site-logo):not(.ai-icon) {
  filter: brightness(0.85);
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6,
body.dark-mode .h1,
body.dark-mode .h2,
body.dark-mode .h3,
body.dark-mode .h4,
body.dark-mode .h5,
body.dark-mode .h6 {
  color: var(--ink) !important;
}

body.dark-mode p,
body.dark-mode span:not(.badge-cat):not(.avatar):not(.trust-icon):not(.text-orange),
body.dark-mode li,
body.dark-mode a:not(.btn) {
  color: var(--ink-soft);
}

body.dark-mode .text-dark {
  color: var(--ink) !important;
}

body.dark-mode .article-content,
body.dark-mode .article-content p,
body.dark-mode .article-content span,
body.dark-mode .article-content div,
body.dark-mode .article-content li,
body.dark-mode .article-content * {
  color: var(--ink-soft) !important;
}

body.dark-mode .article-content h1,
body.dark-mode .article-content h2,
body.dark-mode .article-content h3,
body.dark-mode .article-content h4,
body.dark-mode .article-content h5,
body.dark-mode .article-content h6,
body.dark-mode .article-content h1 *,
body.dark-mode .article-content h2 *,
body.dark-mode .article-content h3 *,
body.dark-mode .article-content h4 *,
body.dark-mode .article-content h5 *,
body.dark-mode .article-content h6 * {
  color: var(--ink) !important;
}

/* Reading Progress Bar */
#read-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: transparent;
  z-index: 9999;
}

#read-progress {
  height: 100%;
  width: 0%;
  background: var(--orange);
  transition: width 0.1s ease-out;
}


* {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: var(--cream);
  line-height: 1.65;
}

/* ---------- Custom Global Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--cream);
}

::-webkit-scrollbar-thumb {
  background: var(--orange);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--orange-dark);
}

h1,
h2,
h3,
h4,
.font-serif {
  font-family: var(--font-serif);
  color: var(--navy);
  font-weight: 700;
}

a {
  text-decoration: none;
  color: inherit;
}

.text-orange {
  color: var(--orange) !important;
}

.text-green {
  color: var(--green) !important;
}

.bg-cream {
  background-color: var(--cream);
}

.bg-cream-soft {
  background-color: var(--cream-soft);
}

.eyebrow {
  color: var(--orange);
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 600;
  font-size: .8rem;
}

.section-divider {
  width: 60px;
  height: 3px;
  background: var(--orange);
  border-radius: 3px;
  margin: 10px auto 0;
}

.section-divider.start {
  margin: 10px 0 0;
}

/* ---------- Buttons ---------- */
.btn-brand {
  background-color: var(--orange);
  border-color: var(--orange);
  color: #fff;
  font-weight: 600;
  padding: .75rem 1.6rem;
  border-radius: 50px;
  letter-spacing: .02em;
  transition: all .2s ease;
}

.btn-brand:hover {
  background-color: var(--orange-dark);
  border-color: var(--orange-dark);
  color: #fff;
}

.btn-outline-brand {
  border: 1.5px solid var(--navy);
  color: var(--navy);
  font-weight: 600;
  padding: .75rem 1.6rem;
  border-radius: 50px;
  background: transparent;
}

.btn-outline-brand:hover {
  background: var(--navy);
  color: #fff;
}

.btn-subcat {
  padding: 0.5rem 1.25rem !important;
  font-size: 0.88rem !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-green {
  background-color: var(--green);
  border-color: var(--green);
  color: #fff;
  font-weight: 600;
  border-radius: 50px;
}

.btn-green:hover {
  background-color: var(--green-dark);
  border-color: var(--green-dark);
  color: #fff;
}

/* ---------- Navbar ---------- */
.site-logo {
  max-height: 105px;
  width: auto;
  transition: max-height 0.3s ease;
}

@media (max-width: 575.98px) {
  .site-logo {
    max-height: 70px;
  }
}

.navbar-brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--green));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.3rem;
}

.brand-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--navy);
  line-height: 1.1;
  letter-spacing: .04em;
}

.brand-sub {
  font-size: .62rem;
  letter-spacing: .1em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.navbar {
  background-color: var(--cream);
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.navbar .nav-link {
  color: var(--ink);
  font-weight: 500;
  font-size: .92rem;
  letter-spacing: .03em;
  margin: 0 .6rem;
  text-transform: uppercase;
}

.navbar .nav-link.active {
  color: var(--orange);
  border-bottom: 2px solid var(--orange);
}

.navbar .nav-link:hover {
  color: var(--orange);
}

.navbar .dropdown-item {
  font-size: 0.85rem;
  padding: 0.4rem 1.2rem;
  font-weight: 400;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
  background-color: var(--cream-soft);
  color: var(--orange);
}

/* ---------- Hero ---------- */
.hero {
  padding: 3rem 0 4rem;
  position: relative;
  overflow: hidden;
}

/* Decorative warm glow behind hero image */
.hero::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -100px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(245, 212, 188, .6) 0%, rgba(253, 246, 238, 0) 70%);
  z-index: 0;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3rem;
  line-height: 1.15;
}

/* ---------- Article Content Typography & Tables ---------- */
.article-content {
  font-size: 1.15rem !important;
  line-height: 1.85 !important;
}

.article-content p,
.article-content span,
.article-content div {
  font-size: 1.15rem !important;
  line-height: 1.85 !important;
  margin-bottom: 1.5rem !important;
}

.article-content h2,
.article-content h3,
.article-content h4 {
  margin-top: 2.2rem !important;
  margin-bottom: 1rem !important;
  font-weight: 700 !important;
}

.article-content h2,
.article-content h2 * {
  font-size: 1.9rem !important;
}

.article-content h3,
.article-content h3 * {
  font-size: 1.5rem !important;
}

.article-content h4,
.article-content h4 * {
  font-size: 1.25rem !important;
}

@media (min-width: 992px) {
  .article-content .table-responsive {
    overflow-x: visible !important;
  }
}

.article-content img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  border-radius: 12px;
  display: block;
}

.article-content video,
.article-content iframe {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.hero p.lead {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 480px;
}

.hero-visual {
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-left: -60px;
  /* Pull the image closer to the text */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 15%, black 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 15%, black 100%);
}

.hero-visual .hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  position: absolute;
  inset: 0;
  mix-blend-mode: multiply;
}

.hero-visual::after {
  display: none;
}

/* Decorative leaves / plants around hero (CSS-only) */
.hero::after {
  content: "🌿";
  position: absolute;
  bottom: 60px;
  right: 8%;
  font-size: 3rem;
  opacity: .15;
  pointer-events: none;
  z-index: 0;
}

.avatar-stack {
  display: flex;
  align-items: center;
}

.avatar-stack .avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--cream);
  background: var(--green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  margin-left: -10px;
}

.avatar-stack .avatar:first-child {
  margin-left: 0;
}

/* ---------- Trust strip ---------- */
.trust-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 2rem 0;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: .9rem;
}

.trust-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--orange);
  color: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.trust-item:nth-child(even) .trust-icon,
.trust-item.green .trust-icon {
  border-color: var(--green);
  color: var(--green);
}

.trust-item h6 {
  margin: 0;
  font-weight: 700;
  font-size: .92rem;
  color: var(--navy);
}

.trust-item p {
  margin: 0;
  font-size: .8rem;
  color: var(--ink-soft);
}

/* ---------- Categories section ---------- */
.categories-section {
  background-color: var(--cream-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* ---------- Category cards ---------- */
.cat-card {
  background: radial-gradient(circle at center, var(--cream-soft) 0%, #ede0ce 100%);
  border-radius: 16px;
  padding: 2rem 1.4rem;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  height: 100%;
  position: relative;
  /* For stretched links */
  transition: transform .3s ease, box-shadow .3s ease, background 0.3s ease;
  cursor: pointer;
  overflow: hidden;
  z-index: 1;
}

.cat-card::before {
  content: "";
  position: absolute;
  bottom: -20px;
  right: -55px;
  width: 160px;
  height: 110px;
  background-image: url('../images/leaf.png');
  background-size: contain;
  background-position: bottom right;
  background-repeat: no-repeat;
  z-index: -1;
  opacity: 0.8;
  pointer-events: none;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.cat-card:hover::before {
  transform: scale(1.1);
  opacity: 0.9;
}

.cat-card.square {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.cat-card:hover {
  box-shadow: 0 16px 30px rgba(19, 41, 74, .08);
}

.cat-icon {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.1rem;
  font-size: 2rem;
  color: #fff;
}

.cat-icon.orange {
  background: var(--orange);
}

.cat-icon.green {
  background: var(--green);
}

.cat-icon.navy {
  background: var(--navy);
}

.cat-card h5 {
  font-size: 1.05rem;
  margin-bottom: .3rem;
}

.cat-card p {
  color: var(--ink-soft);
  font-size: .85rem;
  margin-bottom: 1rem;
}

.cat-go {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .85rem;
  transition: transform .2s ease;
}

.cat-go:hover {
  transform: scale(1.1);
}

.cat-go.orange {
  background: var(--orange);
}

.cat-go.green {
  background: var(--green);
}

.cat-go.navy {
  background: var(--navy);
}

/* ---------- Article cards ---------- */
.article-card {
  background: radial-gradient(circle at center, var(--cream) 0%, var(--cream-soft) 100%);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  height: 100%;
  position: relative;
  /* For stretched links */
  transition: transform .2s ease, box-shadow .2s ease;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(19, 41, 74, .08);
}

/* Icon-based thumbnail (fallback) */
.article-thumb {
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  position: relative;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.article-thumb::after {
  content: "";
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  bottom: 15px;
  border-radius: 12px;
  pointer-events: none;
}

.article-thumb.orange {
  color: var(--orange);
  background: transparent;
}

.article-thumb.orange::after {
  border: 2px dashed var(--orange);
  opacity: 0.4;
}

.article-thumb.green {
  color: var(--green);
  background: transparent;
}

.article-thumb.green::after {
  border: 2px dashed var(--green);
  opacity: 0.4;
}

.article-thumb.navy {
  color: var(--navy);
  background: transparent;
}

.article-thumb.navy::after {
  border: 2px dashed var(--navy);
  opacity: 0.4;
}

/* Image-based thumbnail */
.article-thumb-img {
  height: 200px;
  overflow: hidden;
  position: relative;
}

.article-thumb-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.article-card:hover .article-thumb-img img {
  transform: scale(1.05);
}

.article-body {
  padding: 1.3rem 1.4rem 1.5rem;
}

.badge-cat {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .3rem .7rem;
  border-radius: 50px;
  color: #fff;
}

.badge-cat.orange {
  background: var(--orange);
}

.badge-cat.green {
  background: var(--green);
}

.badge-cat.navy {
  background: var(--navy);
}

.article-meta {
  color: var(--ink-soft);
  font-size: .78rem;
}

.article-body h5 {
  font-size: 1.05rem;
  margin: .7rem 0 .5rem;
}

.read-more {
  color: var(--orange);
  font-weight: 600;
  font-size: .85rem;
}

.read-more:hover {
  color: var(--orange-dark);
}

/* ---------- Quote block ---------- */
.quote-block {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--navy);
  position: relative;
  font-style: italic;
  line-height: 1.6;
}

.quote-mark {
  font-size: 4rem;
  color: var(--orange);
  line-height: 0;
  font-family: var(--font-serif);
  display: block;
  margin-bottom: 1rem;
}

/* ---------- Newsletter strip ---------- */
.newsletter-strip {
  background: var(--navy);
  border-top-left-radius: 60px;
  border-top-right-radius: 60px;
  padding: 3rem 2.5rem;
  margin: 0 auto;
  position: relative;
}

.newsletter-strip::before,
.newsletter-strip::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 60px;
  height: 60px;
  pointer-events: none;
}

.newsletter-strip::before {
  left: -60px;
  background: radial-gradient(circle at 0 0, transparent 60px, var(--navy) 60.5px);
}

.newsletter-strip::after {
  right: -60px;
  background: radial-gradient(circle at 100% 0, transparent 60px, var(--navy) 60.5px);
}

.newsletter-strip .form-control {
  border-radius: 50px;
  border: none;
  padding: .8rem 1.2rem;
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.newsletter-strip .form-control::placeholder {
  color: rgba(255, 255, 255, .6);
}

.newsletter-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  color: #fff;
}

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--navy);
  color: #cfd8e6;
}

footer.site-footer h6 {
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .78rem;
  font-weight: 700;
  margin-bottom: 1.1rem;
}

footer.site-footer a.footer-link {
  color: #cfd8e6;
  font-size: .9rem;
  display: block;
  margin-bottom: .55rem;
}

footer.site-footer a.footer-link:hover {
  color: var(--orange);
}

footer.site-footer .social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-right: .5rem;
  transition: all .2s ease;
}

footer.site-footer .social-icon:hover {
  background: var(--orange);
  border-color: var(--orange);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .82rem;
  color: #9fb0c7;
  padding: 1.1rem 0;
}

/* ---------- Page header (inner pages) ---------- */
.page-header {
  padding: 3rem 0 2.5rem;
  text-align: center;
}

/* ---------- Comments ---------- */
.comment-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.comment-card {
  padding: 1.5rem;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--line);
}

.page-header h1 {
  font-size: 2.4rem;
}

.page-header p {
  color: var(--ink-soft);
  max-width: 620px;
  margin: .8rem auto 0;
}

/* ---------- Misc ---------- */
.icon-blob {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  color: #fff;
}

.card-soft {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.stat-num {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  color: var(--orange);
  font-weight: 700;
}

.contact-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream-soft);
  color: var(--orange);
  font-size: 1.15rem;
  flex-shrink: 0;
}

.form-control,
.form-select {
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: .7rem 1rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 .2rem rgba(232, 118, 60, .15);
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .hero h1 {
    font-size: 2.2rem;
  }

  .hero-visual {
    min-height: 400px;
    margin-top: 2rem;
    margin-left: 0;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .hero::before {
    display: none;
  }
}

@media (max-width: 575px) {
  .hero {
    padding: 2rem 0 3rem;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .trust-strip {
    padding: 1.5rem 0;
  }

  .newsletter-box {
    padding: 1.5rem;
  }
}

/* Navbar Hover Dropdown (Desktop Only) */
@media (min-width: 992px) {
  .navbar .dropdown:hover .dropdown-menu {
    display: block;
    margin-top: 0;
  }
}