html {
  scroll-behavior: smooth;
}

/* ============================================================
   SINGLE POST LAYOUT & TYPOGRAPHY
   ============================================================ */

/* ---------- Shared Typography & Globals ---------- */
:root {
  --green: #58b030; 
  --green-dark: #4a9a27; 
  --green-soft: #e4f3da; 
  --green-tint: #eef7e6;
  --navy: #2d3a4a; 
  --navy-2: #37475a; 
  --ink: #2c3744; 
  --body: #5b6773; 
  --body-strong: #46525e;
  --line: #e7e9ec; 
  --line-2: #eef0ee; 
  --section: #f3f4f0; 
  --section-2: #f7f8f4;
  --head: 'Poppins', sans-serif; 
  --bodyf: 'Mulish', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --maxw: 1300px; 
  --shadow: 0 24px 60px -34px rgba(45,58,74,.45);
}

.single-post-wrapper {
  font-family: var(--bodyf);
  color: var(--body);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

.single-post-wrapper h1, 
.single-post-wrapper h2, 
.single-post-wrapper h3, 
.single-post-wrapper h4, 
.single-post-wrapper h5 {
  font-family: var(--head);
  color: var(--ink);
  margin: 0;
  line-height: 1.15;
  letter-spacing: -.01em;
}

.single-post-wrapper a {
  text-decoration: none;
  color: inherit;
}

/* Post Typography inside Content */
.a-content p {
  font-size: 1.075rem;
  line-height: 1.82;
  color: var(--body-strong);
  margin: 0 0 22px;
  text-wrap: pretty;
}

.a-content h2, .a-content h3 {
  display: flex;
  gap: 16px;
  align-items: baseline;
  font-size: 1.78rem;
  line-height: 1.18;
  margin: 40px 0 18px;
  letter-spacing: -.015em;
}

.a-content a {
  color: var(--green-dark);
  font-weight: 600;
  border-bottom: 1.5px solid var(--green-soft);
  transition: .15s;
}

.a-content a:hover {
  border-bottom-color: var(--green);
  background: rgba(88,176,48,.07);
}

.a-content ul {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.a-content ul li {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  font-size: 1.06rem;
  line-height: 1.6;
  color: var(--body-strong);
}

.a-content ul li::before {
  content: "✓";
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--green-tint);
  color: var(--green-dark);
  display: grid;
  place-items: center;
  margin-top: 2px;
  font-size: 0.8rem;
  font-weight: bold;
}

/* ---------- Tables ---------- */
.a-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 36px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.a-content thead {
  background: var(--navy-2);
  color: #fff;
}

.a-content th {
  padding: 18px 22px;
  text-align: left;
  font-family: var(--head);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}

.a-content td {
  padding: 18px 22px;
  font-size: 1.05rem;
  color: var(--body-strong);
  line-height: 1.5;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.a-content td:last-child {
  border-right: none;
}

.a-content tbody tr:nth-child(even) td {
  background-color: var(--section-2) !important;
}

.a-content tbody tr:nth-child(odd) td {
  background-color: #fff !important;
}

.a-content tbody tr:last-child td {
  border-bottom: none;
}

/* Make first column bold */
.a-content tbody td:first-child {
  font-weight: 700;
  color: var(--ink);
  font-family: var(--head);
}

/* ---------- DIRECTION C — Magazine Layout ---------- */
.c-hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.c-hero-media {
  position: absolute;
  inset: 0;
}

.c-hero-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.c-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,30,24,0.1) 0%, rgba(20,30,24,0.4) 40%, rgba(18,26,22,0.9) 100%);
}

.c-hero-content {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
  padding: 0 28px 64px;
  color: #fff;
}

.c-breadcrumbs {
  color: #fff;
}

.c-breadcrumbs a {
  color: #fff;
}

.single-post-wrapper h1.c-title {
  color: #fff;
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.07;
  letter-spacing: -.025em;
  text-shadow: 0 2px 30px rgba(0,0,0,0.3);
  font-family: var(--head);
  margin-bottom: 12px;
}

.c-dek {
  color: rgba(255,255,255,0.9);
  font-size: 1.25rem;
  line-height: 1.55;
  max-width: 65ch;
  margin: 0 0 24px;
}

.c-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--head);
  font-size: 0.95rem;
  color: rgba(255,255,255,0.85);
}

.c-by {
  font-weight: 600;
  color: #fff;
}

.c-mdot {
  opacity: 0.5;
}

.a-author, .a-date {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.a-author svg, .a-date svg {
  width: 16px;
  height: 16px;
  color: var(--green-dark);
}

.a-cat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 16px;
  font-family: var(--head);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green-dark);
  background: var(--green-tint);
  padding: 8px 15px;
  border-radius: 999px;
  white-space: nowrap;
}

.a-main {
  display: grid;
  grid-template-columns: 320px minmax(0,1fr);
  gap: 54px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 54px 28px 84px;
  align-items: start;
}

.a-side {
  position: sticky;
  top: 30px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Sidebar TOC */
.toc {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 18px;
  background: #fff;
}

.toc-h {
  font-family: var(--head);
  font-weight: 600;
  font-size: .74rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--body);
  margin-bottom: 14px;
}

.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc li a {
  display: block;
  font-size: .9rem;
  line-height: 1.35;
  color: var(--body);
  padding: 7px 12px;
  border-radius: 9px;
  border-left: 2px solid transparent;
  transition: .14s;
  cursor: pointer;
  text-decoration: none;
}

.toc li a:hover {
  color: var(--ink);
  background: var(--section-2);
}

.toc li.on a {
  color: var(--green-dark);
  background: var(--green-tint);
  border-left-color: var(--green);
  font-weight: 600;
}

/* Sidebar CTA */
.side-cta {
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--body-strong);
  padding: 24px 22px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.side-cta .sc-ic {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--green-tint);
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  color: var(--green-dark);
}

.side-cta .sc-ic svg {
  width: 24px;
  height: 24px;
}

.side-cta h4 {
  color: var(--ink);
  font-size: 1.25rem;
  font-family: var(--head);
  margin-bottom: 8px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.side-cta p {
  font-size: .95rem;
  line-height: 1.5;
  color: var(--body);
  margin-bottom: 20px;
}

.side-cta .btn {
  font-size: .95rem;
  padding: 14px 22px;
  display: block;
  background: var(--green);
  color: #fff;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 8px 16px -8px rgba(88,176,48,0.6);
  transition: .2s;
}

.side-cta .btn:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -8px rgba(88,176,48,0.7);
}

.sc-call {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--ink);
  font-family: var(--head);
  font-weight: 600;
  font-size: .95rem;
  transition: .2s;
}

.sc-call svg {
  color: var(--green);
}

.sc-call:hover {
  color: var(--green-dark);
}

.a-content {
  max-width: 760px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--head);
  font-weight: 600;
  font-size: .96rem;
  border-radius: 999px;
  padding: 14px 26px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: .18s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 12px 24px -12px rgba(88,176,48,.7);
}
.btn-primary:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
}

.toc-toggle {
  display: none;
}

@media(max-width:980px){
  .a-main {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .a-side {
    display: block;
    position: static;
    margin-bottom: 30px;
  }
  .a-side .side-cta {
    display: none;
  }
  .toc-h {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin-bottom: 0;
    padding: 2px 0;
  }
  .toc-toggle {
    display: block;
    transition: transform 0.2s ease;
  }
  .toc.open .toc-toggle {
    transform: rotate(180deg);
  }
  .toc ul {
    display: none;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
  }
  .toc.open ul {
    display: flex;
  }
  .single-post-wrapper h1.c-title {
    font-size: 2.4rem;
  }
  .toc {
    border-color: var(--green);
  }
  .c-hero {
    min-height: 500px;
  }
  .a-content {
    max-width: 100vw;
    overflow-x: hidden;
  }
  .table-scroll-wrapper {
    position: relative;
    display: block;
    margin-bottom: 24px;
  }
  .table-scroll-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 60px;
    background: linear-gradient(to left, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
  }
  .table-scroll-wrapper::before {
    content: '›';
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-54%);
    font-size: 80px;
    font-weight: 300;
    color: var(--green);
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    font-family: sans-serif;
    text-shadow: 0 0 6px #fff;
  }
  @keyframes hintPulse {
    0%, 100% { transform: translateY(-54%) translateX(0); }
    50% { transform: translateY(-54%) translateX(6px); }
  }
  .table-scroll-wrapper.has-scroll:not(.is-scrolled)::after {
    opacity: 1;
  }
  .table-scroll-wrapper.has-scroll:not(.is-scrolled)::before {
    opacity: 1;
    animation: hintPulse 1.5s infinite ease-in-out;
  }
  .a-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-collapse: collapse;
  }
  .a-content table th, .a-content table td {
    white-space: nowrap;
    min-width: 140px;
  }
  .a-title {
    font-size: 2.3rem;
  }
  .a-feat {
    height: 300px;
  }
}
