/* =========================================================
   CarHamro — Gutenberg Typography System (Frontend)
   Scope: only inside .entry-content
   ========================================================= */

.entry-content {
  color: #0f172a;
  font-size: 16px;
  line-height: 1.8;
  word-wrap: break-word;
}

.entry-content > * {
  margin-top: 0;
  margin-bottom: 1rem;
}

/* Headings */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  color: #0f172a;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-top: 1.75em;
  margin-bottom: 0.6em;
  scroll-margin-top: 140px;
}

.entry-content h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
.entry-content h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.entry-content h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
.entry-content h4 { font-size: 1.15rem; }
.entry-content h5 { font-size: 1.05rem; }
.entry-content h6 { font-size: 1rem; font-weight: 700; }

.entry-content p {
  color: #334155;
  margin-bottom: 1.1rem;
}

/* Links */
.entry-content a {
  color: #f59e0b;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(245, 158, 11, 0.35);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.entry-content a:hover {
  border-bottom-color: rgba(245, 158, 11, 0.8);
}

/* Lists */
.entry-content ul,
.entry-content ol {
  color: #334155;
  padding-left: 1.25rem;
  margin-bottom: 1.1rem;
  list-style-position: outside;
}

.entry-content ul { list-style-type: disc; }
.entry-content ol { list-style-type: decimal; }

.entry-content ul ul { list-style-type: circle; }
.entry-content ul ul ul { list-style-type: square; }
.entry-content ol ol { list-style-type: lower-alpha; }

.entry-content li {
  margin: 0.35rem 0;
}

.entry-content li > p {
  margin-bottom: 0.4rem;
}

/* Quote */
.entry-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid #f59e0b;
  background: #fffaf0;
  color: #334155;
  border-radius: 12px;
}

.entry-content blockquote p:last-child {
  margin-bottom: 0;
}

/* Separators */
.entry-content hr {
  border: 0;
  height: 1px;
  background: rgba(15, 23, 42, 0.12);
  margin: 2rem 0;
}

/* Images + captions */
.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 18px;
}

.entry-content figure {
  margin: 1.5rem 0;
}

.entry-content figcaption {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: #64748b;
}

/* Tables */
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.entry-content th,
.entry-content td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  text-align: left;
}

.entry-content th {
  background: rgba(15, 23, 42, 0.04);
  font-weight: 800;
  color: #0f172a;
}

.entry-content tr:last-child td {
  border-bottom: 0;
}

/* Code */
.entry-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.95em;
  background: rgba(15, 23, 42, 0.06);
  padding: 0.15em 0.35em;
  border-radius: 8px;
}

.entry-content pre {
  background: rgba(15, 23, 42, 0.06);
  padding: 16px;
  border-radius: 16px;
  overflow: auto;
}

/* Buttons block */
.entry-content .wp-block-button__link {
  background: #f59e0b;
  color: #ffffff;
  border-radius: 14px;
  padding: 0.85rem 1.1rem;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  border: 0;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.entry-content .wp-block-button__link:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

/* Common Gutenberg blocks */
.entry-content .wp-block-heading,
.entry-content .wp-block-paragraph,
.entry-content .wp-block-list,
.entry-content .wp-block-image,
.entry-content .wp-block-table,
.entry-content .wp-block-quote,
.entry-content .wp-block-buttons {
  margin-bottom: 1.2rem;
}

/* Auto-anchor heading hint */
.entry-content h2[id],
.entry-content h3[id] {
  position: relative;
}

.entry-content h2[id]::after,
.entry-content h3[id]::after {
  content: "#";
  display: inline-block;
  margin-left: 0.45rem;
  color: #f59e0b;
  font-size: 0.8em;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.entry-content h2[id]:hover::after,
.entry-content h3[id]:hover::after {
  opacity: 1;
}

/* Mobile tweaks */
@media (max-width: 640px) {
  .entry-content {
    font-size: 15px;
    line-height: 1.85;
  }

  .entry-content blockquote {
    padding: 0.9rem 1rem;
  }
}