/* =============================================
   GTA DIY RENO — POST PAGE STYLESHEET
   Extends style.css — always load style.css first
   ============================================= */

/* ---- POST HERO ---- */
.post-hero {
  background: var(--dark);
  padding: clamp(3rem, 7vw, 5rem) 0 clamp(2.5rem, 5vw, 4rem);
  border-bottom: 3px solid var(--orange);
  position: relative;
  overflow: hidden;
}
.post-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent, transparent 40px,
    rgba(241,90,34,0.04) 40px,
    rgba(241,90,34,0.04) 80px
  );
}
.post-hero__inner { position: relative; z-index: 1; max-width: 820px; }
.post-hero__breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: #6B7280;
  margin-bottom: 1.25rem;
}
.post-hero__breadcrumb a { color: var(--orange); transition: opacity var(--transition); }
.post-hero__breadcrumb a:hover { opacity: 0.8; }
.post-hero__breadcrumb span { color: #4B5563; }
.post-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 5vw, 3.2rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--white);
  line-height: 1.08;
  margin-bottom: 1.25rem;
}
.post-hero__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.post-hero__meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.83rem;
  color: #9CA3AF;
}
.post-hero__meta-sep { color: #374151; }

/* ---- POST COVER IMAGE ---- */
.post-cover {
  width: 100%;
  aspect-ratio: 21/8;
  object-fit: cover;
  display: block;
  background: var(--light);
}

/* ---- POST LAYOUT ---- */
.post-layout {
  padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 5rem);
  background: var(--light);
}
.post-layout__inner {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  align-items: start;
}

/* ---- ARTICLE BODY ---- */
.post-article {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 4vw, 3rem);
  box-shadow: var(--shadow);
}
.post-article h2 {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--dark);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--orange);
}
.post-article h2:first-child { margin-top: 0; }
.post-article h3 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dark-2);
  margin: 1.75rem 0 0.6rem;
}
.post-article p {
  font-size: 0.97rem;
  line-height: 1.8;
  color: #374151;
  margin-bottom: 1rem;
}
.post-article ul,
.post-article ol {
  margin: 0.75rem 0 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.post-article li {
  font-size: 0.95rem;
  line-height: 1.65;
  color: #374151;
}
.post-article ul li { list-style: disc; }
.post-article ol li { list-style: decimal; }
.post-article strong { color: var(--dark); font-weight: 600; }
.post-article a { color: var(--orange); text-decoration: underline; text-underline-offset: 3px; }
.post-article a:hover { opacity: 0.8; }

/* Callout box */
.callout {
  border-left: 4px solid var(--orange);
  background: rgba(241,90,34,0.07);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
.callout--tip   { border-color: #2A9D8F; background: rgba(42,157,143,0.07); }
.callout--warn  { border-color: #E9C46A; background: rgba(233,196,106,0.1); }
.callout__label {
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.4rem;
}
.callout--tip  .callout__label { color: #2A9D8F; }
.callout--warn .callout__label { color: #C9A227; }
.callout p { margin-bottom: 0; font-size: 0.92rem; }

/* Tool/material grid */
.supply-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}
.supply-box {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.supply-box h4 {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.6rem;
}
.supply-box ul {
  margin: 0;
  padding-left: 1.1rem;
  gap: 0.3rem;
}
.supply-box li { font-size: 0.88rem; }

/* Scrollable wrapper — prevents tables from breaking mobile layout */
.cost-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0 1.5rem;
  border-radius: var(--radius);
  /* Subtle right-edge fade to hint at horizontal scroll */
  background:
    linear-gradient(to right, var(--white) 0%, transparent 2rem),
    linear-gradient(to left,  var(--white) 0%, transparent 2rem) 100% 0;
  background-attachment: local, local;
}
.cost-table-wrap .cost-table { margin: 0; }

/* Cost estimate table */
.cost-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.9rem;
  min-width: 380px; /* forces scroll container to activate on narrow screens */
}
.cost-table th {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--dark);
  padding: 0.7em 1em;
  text-align: left;
}
.cost-table td {
  padding: 0.65em 1em;
  border-bottom: 1px solid var(--border);
  color: var(--dark-2);
}
.cost-table tr:nth-child(even) td { background: var(--light); }
.cost-table tr.cost-table__total td {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--dark);
  border-top: 2px solid var(--orange);
  border-bottom: none;
  background: rgba(241,90,34,0.06);
}

/* Step numbers */
.step {
  display: flex;
  gap: 1.1rem;
  margin: 1.5rem 0;
  align-items: flex-start;
}
.step__num {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  background: var(--orange);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  margin-top: 2px;
}
.step__body h3 { margin-top: 0; }
.step__body p  { margin-bottom: 0; }

/* Post tags / share footer */
.post-footer {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.post-footer__tags {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.post-footer__tags a {
  text-decoration: none;
  color: var(--orange);
  background: rgba(241,90,34,0.1);
  padding: 0.3em 0.7em;
  border-radius: 4px;
  transition: background var(--transition);
}
.post-footer__tags a:hover { background: rgba(241,90,34,0.2); }
.post-footer__back { font-size: 0.85rem; }

/* ---- POST SIDEBAR ---- */
.post-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.post-sidebar__card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
}
.post-sidebar__card h3 {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--dark);
  margin-bottom: 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 2px solid var(--orange);
}
/* TOC */
.toc { display: flex; flex-direction: column; gap: 0; }
.toc a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--dark-2);
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: color var(--transition);
}
.toc a:last-child { border-bottom: none; }
.toc a:hover { color: var(--orange); }
.toc__num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: var(--light);
  border-radius: 50%;
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Related posts */
.related-posts { display: flex; flex-direction: column; gap: 1rem; }
.related-post {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
}
.related-post__img {
  width: 64px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  background: var(--light);
}
.related-post__img img { width: 100%; height: 100%; object-fit: cover; }
.related-post__title {
  font-family: var(--font-head);
  font-size: 0.83rem;
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--dark);
  transition: color var(--transition);
}
.related-post:hover .related-post__title { color: var(--orange); }
.related-post__cat { font-size: 0.73rem; color: var(--muted); margin-top: 0.2rem; }

/* CTA card */
.post-sidebar__cta {
  background: var(--dark);
  border-color: var(--dark);
  text-align: center;
}
.post-sidebar__cta h3 { color: var(--white); border-bottom-color: var(--orange); }
.post-sidebar__cta p  { font-size: 0.86rem; color: #9CA3AF; margin-bottom: 1rem; }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .post-layout__inner { grid-template-columns: 1fr; }
  .post-sidebar { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .supply-grid  { grid-template-columns: 1fr; }
  .post-cover   { aspect-ratio: 16/7; }
  .post-sidebar { grid-template-columns: 1fr; }

  /* Tighter table cells on phones */
  .cost-table th,
  .cost-table td { padding: 0.55em 0.75em; font-size: 0.83rem; }

  /* Smaller step numbers */
  .step { gap: 0.75rem; }
  .step__num { width: 32px; height: 32px; font-size: 0.88rem; margin-top: 1px; }

  /* Post footer: stack tags + back button */
  .post-footer { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .post-footer__back { width: 100%; justify-content: center; }

  /* Post hero meta: smaller gap */
  .post-hero__meta { gap: 0.5rem; }
  .post-hero__meta-sep { display: none; }
  .post-hero__meta-item { font-size: 0.8rem; }

  /* Breadcrumb: allow wrapping */
  .post-hero__breadcrumb { flex-wrap: wrap; gap: 0.3rem; }
}

@media (max-width: 400px) {
  /* Very small phones: collapse breadcrumb even further */
  .post-hero__breadcrumb span:not([aria-current]) { display: none; }
}
