/* ==========================================================================
   WordPress Core CSS — Baseline
   Required by the WordPress Codex for theme compliance.
   Covers: alignment, caption, gallery, screen-reader, sticky,
   comment-list, admin-bar compensation, block editor basics.
   ========================================================================== */

/* ---- Alignments (required by WP Codex) ---- */
.alignnone {
  margin: 5px 20px 20px 0;
  max-width: 100%;
  height: auto;
}
.aligncenter,
div.aligncenter {
  display: block;
  margin: 5px auto 15px;
  max-width: 100%;
  height: auto;
}
.alignright {
  float: right;
  margin: 5px 0 20px 20px;
  max-width: 100%;
  height: auto;
}
.alignleft {
  float: left;
  margin: 5px 20px 20px 0;
  max-width: 100%;
  height: auto;
}
a img.alignright {
  float: right;
  margin: 5px 0 20px 20px;
}
a img.alignnone { margin: 5px 20px 20px 0; }
a img.alignleft { float: left; margin: 5px 20px 20px 0; }
a img.aligncenter { display: block; margin-left: auto; margin-right: auto; }

/* ---- Image captions ---- */
.wp-caption {
  background: #f7f9fc;
  border: 1px solid #e6eaf0;
  max-width: 100%;
  padding: 5px 3px 10px;
  text-align: center;
  border-radius: 6px;
}
.wp-caption.alignnone  { margin: 5px 20px 20px 0; }
.wp-caption.alignleft  { margin: 5px 20px 20px 0; }
.wp-caption.alignright { margin: 5px 0 20px 20px; }
.wp-caption img {
  border: 0 none;
  height: auto;
  margin: 0;
  max-width: 98.5%;
  padding: 0;
  width: auto;
}
.wp-caption p.wp-caption-text {
  font-size: 13px;
  line-height: 1.4;
  margin: 6px 0 0;
  color: #5a5d6a;
  font-style: italic;
}

/* ---- Screen reader text (accessibility, required) ---- */
.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;
}
.screen-reader-text:focus {
  background-color: #fff;
  clip: auto !important;
  clip-path: none;
  color: #111827;
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* ---- Galleries (WP default) ---- */
.gallery {
  margin-bottom: 1.5em;
  margin-left: -0.5em;
  margin-right: -0.5em;
  display: flex;
  flex-wrap: wrap;
}
.gallery-item {
  display: inline-block;
  padding: 0.5em;
  text-align: center;
  vertical-align: top;
  width: 100%;
}
.gallery-columns-2 .gallery-item { max-width: 50%; }
.gallery-columns-3 .gallery-item { max-width: 33.333%; }
.gallery-columns-4 .gallery-item { max-width: 25%; }
.gallery-columns-5 .gallery-item { max-width: 20%; }
.gallery-columns-6 .gallery-item { max-width: 16.666%; }
.gallery-columns-7 .gallery-item { max-width: 14.285%; }
.gallery-columns-8 .gallery-item { max-width: 12.5%; }
.gallery-columns-9 .gallery-item { max-width: 11.111%; }
.gallery-caption {
  display: block;
  font-size: 0.85em;
  color: #5a5d6a;
  margin-top: 6px;
}

/* ---- Sticky posts ---- */
.sticky { display: block; }
.bypostauthor { display: block; }

/* ---- Comment list (baseline — theme overrides) ---- */
.comment-list { list-style: none; padding: 0; }
.comment-list li.comment { padding: 1rem 0; border-bottom: 1px solid #e6eaf0; }
.comment-list .children { list-style: none; padding-left: 1.5rem; }
.comment-author { font-weight: 600; color: #0F172A; }
.comment-meta a { color: #5a5d6a; font-size: 0.85rem; }
.comment-content { margin-top: 0.5rem; }
.comment-respond { margin-top: 2rem; }
.comment-form label { display: block; margin-bottom: 0.25rem; font-weight: 500; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid #d0d6df;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
}

/* ---- Admin bar compensation (when WP admin bar is showing) ---- */
html { margin-top: 0 !important; }
body.admin-bar { padding-top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar { padding-top: 46px; }
}

/* ---- WP Block Editor baseline ---- */
.wp-block-image img { height: auto; max-width: 100%; }
.wp-block-image figcaption {
  font-size: 0.85em;
  color: #5a5d6a;
  text-align: center;
  margin-top: 0.5em;
}
.wp-block-quote {
  border-left: 4px solid #F97316;
  padding: 0.5rem 0 0.5rem 1rem;
  margin: 1.5rem 0;
  font-style: italic;
}
.wp-block-quote cite {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85em;
  font-style: normal;
  color: #5a5d6a;
}
.wp-block-pullquote {
  border-top: 4px solid #F97316;
  border-bottom: 4px solid #F97316;
  padding: 1.5rem 0;
  text-align: center;
  margin: 2rem 0;
}
.wp-block-button__link {
  background: #F97316;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
  transition: background 0.15s ease;
}
.wp-block-button__link:hover { background: #EA580C; color: #fff; }
.wp-block-cover {
  position: relative;
  min-height: 300px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.wp-block-columns {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.wp-block-column { flex: 1; min-width: 250px; }
.wp-block-separator {
  border: 0;
  border-top: 1px solid #e6eaf0;
  margin: 2rem 0;
}
.wp-block-separator.is-style-wide { border-top-width: 2px; }
.wp-block-separator.is-style-dots {
  border: 0;
  text-align: center;
  line-height: 1;
}
.wp-block-separator.is-style-dots::before {
  content: "···";
  color: #F97316;
  font-size: 1.5rem;
  letter-spacing: 1rem;
}

/* ---- Post thumbnail ---- */
.post-thumbnail img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---- Paginated navigation (WP standard) ---- */
.pagination,
.nav-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 2rem 0;
}
.pagination .page-numbers,
.nav-links .page-numbers {
  padding: 0.5rem 0.875rem;
  border: 1px solid #d0d6df;
  border-radius: 6px;
  text-decoration: none;
  color: #0F172A;
  font-weight: 500;
}
.pagination .page-numbers.current,
.nav-links .page-numbers.current {
  background: #F97316;
  color: #fff;
  border-color: #F97316;
}

/* ---- Embed responsive (WP oEmbed) ---- */
.wp-embed-responsive .wp-has-aspect-ratio iframe {
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

/* ---- Search form baseline ---- */
.search-form { display: flex; gap: 0.5rem; }
.search-form .search-field {
  flex: 1;
  padding: 0.625rem 0.875rem;
  border: 1px solid #d0d6df;
  border-radius: 6px;
}
.search-form .search-submit {
  padding: 0.625rem 1.25rem;
  background: #F97316;
  color: #fff;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

/* ---- Widget baseline ---- */
.widget { margin-bottom: 2rem; }
.widget-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #0F172A;
}
.widget ul { list-style: none; padding: 0; }
.widget ul li {
  padding: 0.4rem 0;
  border-bottom: 1px dashed #e6eaf0;
}
.widget ul li:last-child { border-bottom: 0; }
.widget ul li a {
  color: #475569;
  text-decoration: none;
  transition: color 0.15s ease;
}
.widget ul li a:hover { color: #F97316; }
