/* Fix: theme's .form-select base has 2.25rem padding and .form-select-sm is undefined */
.form-select-sm {
  min-height: 40px !important;
  padding: 0 2rem 0 0.75rem !important;
  font-size: 0.9375rem !important;
  line-height: 1.25rem !important;
  background-size: 14px 10px !important;
  background-position: right 0.5rem center !important;
}

/* Article card titles: pure matte black on light, white on dark.
   Override global red link color. Hover still red via `.hover\:text-primary`. */
.post-title,
.post-title a,
.post-title a:visited {
  color: #000 !important;
  opacity: 1 !important;
}

:where(.uc-dark) .post-title,
:where(.uc-dark) .post-title a,
.dark .post-title,
.dark .post-title a {
  color: #fff !important;
}

/* Keep explicit white titles (featured cards over image) white */
.post-title.text-white,
.post-title.text-white a {
  color: #fff !important;
}

/* Magazine-style article content */

.post-content {
  line-height: 1.7;
}

/* Disable theme's automatic drop-cap — we use an explicit toggle instead */
.post-content p:first-child::first-letter {
  font-size: inherit;
  float: none;
  line-height: inherit;
  margin-right: 0;
}

.post-content p {
  margin: 0 0 1rem;
}

.post-content > :first-child {
  margin-top: 0;
}

/* Drop cap on the very first paragraph only */
.post-content > p:first-of-type.has-dropcap::first-letter,
.post-content > p.has-dropcap:first-child::first-letter {
  font-size: 3.6em;
  line-height: 0.72;
  float: left;
  margin: 0 0.08em 0 0;
  padding: 0;
  font-weight: 700;
  color: var(--color-primary, #d8232a);
}

/* Article images */
.post-content .article-figure {
  margin: 1.25rem 0;
  overflow: hidden;
}

.post-content .article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.post-content .article-figure figcaption {
  font-size: 0.8125rem;
  color: var(--color-gray-500, #6b7280);
  margin-top: 0.5rem;
  text-align: center;
}

/* Floated images */
@media (min-width: 720px) {
  .post-content .article-figure.align-left {
    float: left;
    max-width: 45%;
    margin: 0.25rem 1.25rem 1rem 0;
  }
  .post-content .article-figure.align-right {
    float: right;
    max-width: 45%;
    margin: 0.25rem 0 1rem 1.25rem;
  }
}

.post-content .article-figure.align-full img {
  width: 100%;
}

/* Clearfix after floats for subheadings */
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content .section-heading {
  clear: both;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--color-primary, #d8232a);
  font-weight: 700;
}

.post-content .section-heading {
  font-size: 1.375rem;
}

/* Heading sizes per selected level (editor lets authors pick h1–h4) */
.post-content h1.section-heading {
  font-size: 1.875rem;
}

.post-content h2.section-heading {
  font-size: 1.5rem;
}

.post-content h4.section-heading {
  font-size: 1.125rem;
}

/* Blockquote */
.post-content .article-quote {
  clear: both;
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--color-primary, #d8232a);
  background: var(--color-gray-25, #f9fafb);
  font-style: italic;
  font-size: 1.05rem;
}

:where(.uc-dark) .post-content .article-quote,
.dark .post-content .article-quote {
  background: rgba(255, 255, 255, 0.04);
}

.post-content .article-quote cite {
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  font-size: 0.8125rem;
  color: var(--color-gray-500, #6b7280);
}

/* Clear floats at end of content */
.post-content::after {
  content: '';
  display: block;
  clear: both;
}
