/*
Theme Name: Softblog 2.0
Theme URI: https://softbook.app/blog/
Author: Softbook
Author URI: https://softbook.app/
Description: Softbook Blog theme 2.0 — built on the Nexsas (app-builder) template, sharing the main site-tmp's navbar & footer. Multilingual (uk/en/ru) via Polylang, SEO/GEO/AEO-optimized.
Version: 2.0.6
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: softblog2
Tags: custom-logo, custom-menu, featured-images, translation-ready
*/

/* All visual styling ships precompiled in assets/css/main.css (Tailwind v4) + custom.css.
   This file only carries the theme header above and a couple of WP-required baseline rules. */

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

/* Badge colour palette. Some Nexsas badge variants (e.g. badge-yellow) ship with
   no background, so we define our own always-visible pastels in the same style.
   `.badge` supplies the pill shape; these set background + text colour. */
.badge.sb2-bc-1 { background-color: #cdf5f8; color: var(--color-secondary); } /* cyan */
.badge.sb2-bc-2 { background-color: #e8fbc6; color: var(--color-secondary); } /* green */
.badge.sb2-bc-3 { background-color: #faeec1; color: var(--color-secondary); } /* yellow */
.badge.sb2-bc-4 { background-color: #e7e0ff; color: var(--color-secondary); } /* lavender */
.badge.sb2-bc-5 { background-color: #ffe0ec; color: var(--color-secondary); } /* pink */
.badge.sb2-bc-6 { background-color: #ffe7d4; color: var(--color-secondary); } /* peach */

/* Featured cover image. The template uses `my-10 md:my-[70px]` utilities, but a
   base `:where(figure){margin:0 0 1em}` rule (higher cascade layer) overrides margin
   utilities on <figure>, so we set the spacing explicitly here. Matches template:
   40px / 70px vertical margin, rounded-lg → rounded-4xl. */
.sb2-cover {
  margin-block: 40px;
  border-radius: 0.5rem;
}
@media (min-width: 48rem) {
  .sb2-cover {
    margin-block: 70px;
    border-radius: 2rem;
  }
}

/* Lighter heading weight across the article (title + in-body headings). */
.sb2-post-title,
.details-body h1,
.details-body h2,
.details-body h3 {
  --tw-font-weight: 300;
  font-weight: 300;
}

/* WordPress post content in .details-body uses <h2> as the primary heading,
   but the Nexsas template only styles h3/h4. Map content h1/h2 to the h3 body
   heading style so editor headings render at the intended (smaller) size. */
.details-body h1,
.details-body h2 {
  margin-bottom: calc(var(--spacing) * 3);
  font-size: var(--text-heading-5);
  line-height: var(--tw-leading, var(--text-heading-5--line-height));
}
@media (min-width: 48rem) {
  .details-body h1,
  .details-body h2 {
    font-size: var(--text-heading-4);
    line-height: var(--tw-leading, var(--text-heading-4--line-height));
  }
}

/* Tighter spacing before in-body headings (was 28px / 70px). */
.details-body h1:not(:first-child),
.details-body h2:not(:first-child),
.details-body h3:not(:first-child) {
  margin-top: calc(var(--spacing) * 6);
}
@media (min-width: 64rem) {
  .details-body h1:not(:first-child),
  .details-body h2:not(:first-child),
  .details-body h3:not(:first-child) {
    margin-top: 40px;
  }
}

/* Tighter spacing above in-article images (was up to 70px). */
.details-body img {
  margin-top: 40px;
}

/* When a post has no cover image, keep the body from touching the author/meta. */
.details-body.sb2-body-top {
  margin-top: 40px;
}
@media (min-width: 48rem) {
  .details-body.sb2-body-top {
    margin-top: 70px;
  }
}