/* ==========================================================================
   History Today V2 — Clean + Premium Overrides
   Drop this file to revert all visual changes.
   ========================================================================== */

/* --- 1. TYPOGRAPHY -------------------------------------------------------- */

body,
.entry-content,
.site-container {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  color: #2c2c2c;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.site-title {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.01em;
  color: #1a1a1a;
}
h1, .entry-title { font-weight: 700; font-size: clamp(1.6rem, 4vw, 2.2rem); }
h2              { font-weight: 650; font-size: clamp(1.3rem, 3vw, 1.7rem); }
h3              { font-weight: 600; font-size: clamp(1.1rem, 2.5vw, 1.35rem); }

/* Category labels */
.entry-taxonomies a,
.entry-meta .category-links a,
.post-categories a,
span.posted-in a,
.kadence-breadcrumbs a {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 600;
  color: #2563EB;
  text-decoration: none;
}
.entry-taxonomies a:hover,
span.posted-in a:hover {
  color: #1d4ed8;
}

/* Meta line (author/date) */
.entry-meta,
.post-meta,
.entry-meta > * {
  font-size: 0.82rem;
  color: #888;
  font-weight: 400;
}

/* --- 2. LAYOUT / SPACING -------------------------------------------------- */

.content-container.site-container,
.site-main .entry-content-wrap,
.entry-content {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.entry-hero-container-inner,
.entry-header,
.wp-site-blocks > header + * {
  padding-top: 1rem !important;
  padding-bottom: 0.5rem !important;
  margin-top: 0 !important;
}

.loop-entry {
  margin-bottom: 1.5rem;
}

/* --- 3. HEADER ------------------------------------------------------------ */

#masthead, .site-header-wrap {
  background: #fff !important;
  border-bottom: 1px solid #eee;
  box-shadow: none !important;
}

.site-branding a.brand img {
  max-width: 180px;
  height: auto;
}

.header-navigation .menu-container > ul > li > a {
  font-size: 0.88rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0.01em;
  color: #333 !important;
  transition: color 0.15s;
}
.header-navigation .menu-container > ul > li > a:hover {
  color: #2563EB !important;
}

#main-header .header-button {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5em 1.4em;
  border-radius: 6px;
  text-transform: none;
  letter-spacing: 0;
}

/* --- 4. SINGLE POST ------------------------------------------------------- */

.single .entry-taxonomies {
  margin-bottom: 0.5rem;
}

.single .entry-title {
  margin-bottom: 0.4rem;
  line-height: 1.25;
}

.single .entry-content p {
  margin-bottom: 1.4em;
}

/* PageLayer pre blocks — make them look like normal paragraphs */
.single .entry-content pre,
.single .entry-content .wp-block-preformatted {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-wrap: break-word;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0 0 1.4em;
  color: #2c2c2c;
}

.single .entry-content blockquote,
.single .entry-content .blockquote {
  border-left: 3px solid #2563EB;
  padding: 0.8em 1.2em;
  margin: 1.5em 0;
  background: #eff6ff;
  font-style: normal;
}

/* --- 5. LOOP FEATURES ----------------------------------------------------- */

.ht-post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  margin: 2rem 0;
}
.ht-post-nav a {
  text-decoration: none;
  color: #1a1a1a;
  font-weight: 600;
  max-width: 45%;
  font-size: 0.95rem;
}
.ht-post-nav a:hover { color: #2563EB; }
.ht-post-nav .ht-nav-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #aaa;
  font-weight: 400;
  display: block;
  margin-bottom: 0.25rem;
}
.ht-post-nav .ht-nav-next { text-align: right; }

.ht-random-article {
  display: inline-block;
  background: #2563EB;
  color: #fff !important;
  padding: 0.55rem 1.6rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  margin: 1rem 0;
}
.ht-random-article:hover { opacity: 0.9; }

.ht-related { margin: 2rem 0; }
.ht-related h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
  font-weight: 600;
  margin-bottom: 0.8rem;
}
.ht-related ul { list-style: none; padding: 0; }
.ht-related li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #f5f5f5;
}
.ht-related li a {
  text-decoration: none;
  color: #1a1a1a;
  font-size: 0.95rem;
  font-weight: 500;
}
.ht-related li a:hover { color: #2563EB; }

/* --- 6. SIGNUP CTA -------------------------------------------------------- */

.ht-signup-cta {
  background: linear-gradient(135deg, #eff6ff 0%, #fff 100%);
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 2rem 1.5rem;
  text-align: center;
  margin: 2rem 0;
}
.ht-signup-cta h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  color: #1a1a1a;
}
.ht-signup-cta p {
  font-size: 0.92rem;
  color: #666;
  margin: 0 0 1rem;
}
.ht-signup-cta a {
  display: inline-block;
  background: #2563EB;
  color: #fff !important;
  padding: 0.6rem 2rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.15s;
}
.ht-signup-cta a:hover { background: #1d4ed8; }

/* --- 7. FOOTER ------------------------------------------------------------ */

.site-footer {
  background: #fafafa !important;
  border-top: 1px solid #eee;
  font-size: 0.82rem;
  color: #888;
}
.site-footer a { color: #666; text-decoration: none; }
.site-footer a:hover { color: #2563EB; }

/* --- 8. HOMEPAGE ---------------------------------------------------------- */

/* Hide page title on front page */
.home .entry-hero-container-inner,
.home .entry-header,
.home .wp-block-post-title,
body.page-template-default.home .entry-title {
  display: none !important;
}

/* Today in History card */
.ht-featured {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 2rem 2rem 1.5rem;
  margin-bottom: 2.5rem;
}
.ht-featured-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 600;
  color: #2563EB;
}
.ht-featured-title {
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
  font-weight: 700;
  margin: 0.5rem 0 0.3rem;
  line-height: 1.25;
}
.ht-featured-title a { color: #1a1a1a; text-decoration: none; }
.ht-featured-title a:hover { color: #2563EB; }
.ht-featured-meta {
  font-size: 0.82rem;
  color: #999;
  margin-bottom: 1.2rem;
}
.ht-featured-excerpt {
  font-size: 1.02rem;
  line-height: 1.7;
  color: #4a4a4a;
}
.ht-featured-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid #f0f0f0;
  margin-top: 1.5rem;
}
.ht-featured-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: #666;
  text-decoration: none;
}
.ht-featured-link:hover { color: #2563EB; }
.ht-featured-random {
  display: inline-block;
  background: #2563EB;
  color: #fff !important;
  padding: 0.45rem 1.2rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.82rem;
  text-decoration: none;
}
.ht-featured-random:hover { background: #1d4ed8; }

/* Homepage signup CTA */
.ht-signup-cta-home {
  background: linear-gradient(135deg, #eff6ff 0%, #fff 100%);
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 2rem 1.5rem !important;
  margin-bottom: 2.5rem !important;
}
.ht-signup-cta-home h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.ht-signup-cta-home p {
  font-size: 0.92rem;
  color: #555;
}

/* Recent articles list */
.ht-recent-articles { margin-bottom: 1rem; }
.ht-recent-articles ul { list-style: none; padding: 0; margin: 0; }
.ht-recent-articles li {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid #f3f3f3;
  flex-wrap: wrap;
}
.ht-recent-articles li a {
  font-size: 0.95rem;
  font-weight: 500;
  color: #1a1a1a;
  text-decoration: none;
  flex: 1;
  min-width: 0;
}
.ht-recent-articles li a:hover { color: #2563EB; }
.ht-ra-date {
  font-size: 0.75rem;
  color: #bbb;
  white-space: nowrap;
}

/* --- 9. HIDE UNWANTED THEME ELEMENTS -------------------------------------- */

/* Kadence built-in post navigation */
.single .post-navigation,
.single .kadence-post-navigation,
.single .nav-links,
.single .post-footer-area-wrap .post-navigation-wrap {
  display: none !important;
}

/* Kadence related posts */
.single .entry-related,
.single .kadence-related-posts,
.single .related-posts {
  display: none !important;
}

/* Comments */
.single .comments-area,
.single #comments,
.single .entry-comments-wrap {
  display: none !important;
}

/* Author box */
.single .entry-author-style-normal,
.single .entry-author-box-wrap {
  display: none !important;
}

/* --- 10. MOBILE ----------------------------------------------------------- */

@media (max-width: 768px) {
  body { font-size: 16px; }
  h1, .entry-title { font-size: 1.5rem; }
  .single .entry-content pre,
  .single .entry-content .wp-block-preformatted {
    font-size: 16px;
  }
  .ht-signup-cta { padding: 1.5rem 1rem; }
  .content-container.site-container { padding-left: 1rem; padding-right: 1rem; }
  .site-branding a.brand img { max-width: 130px; }
  .ht-featured { padding: 1.5rem 1.2rem 1.2rem; }
  .ht-featured-footer { flex-direction: column; gap: 0.8rem; align-items: flex-start; }
  .ht-signup-cta-home { padding: 1.5rem 1rem !important; }
  .ht-recent-articles li { font-size: 0.9rem; }
  .ht-post-nav { flex-direction: column; gap: 0.5rem; }
  .ht-post-nav a { max-width: 100%; }
}
