/*
 * Laundry Love Phuket — Blog styles.
 *
 * Loaded ONLY on blog views (Blog page, category/tag/author archives and
 * single posts) by inc/blog.php. Every rule is scoped to a .blog-* class so
 * nothing can leak into the homepage or any other existing page.
 *
 * Layout and cards use the site's existing Tailwind utilities; this file
 * only covers what utilities cannot: WordPress-generated article HTML
 * (the_content) and core pagination markup.
 *
 * Brand tokens (same values as the Tailwind config in header.php).
 */
.blog-archive,
.single-blog {
  --blog-navy: #0B2545;
  --blog-pink: #F42A77;
  --blog-pink-hover: #E01764;
  --blog-text: #334155;
  --blog-muted: #64748b;
  --blog-border: #e2e8f0;
  --blog-soft: #F8FAFC;
  overflow-x: clip;
}

/* WordPress core screen-reader-only text used in core markup. */
.blog-archive .screen-reader-text,
.single-blog .screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==================== ARTICLE CONTENT ==================== */

.blog-post-content {
  color: var(--blog-text);
  font-size: 1.0625rem;
  line-height: 1.8;
  overflow-wrap: break-word;
}

@media (min-width: 640px) {
  .blog-post-content {
    font-size: 1.125rem;
  }
}

.blog-post-content > * + *,
.blog-post-content > article > * + * {
  margin-top: 1.25em;
}

.blog-post-content h1,
.blog-post-content h2,
.blog-post-content h3,
.blog-post-content h4,
.blog-post-content h5,
.blog-post-content h6 {
  color: var(--blog-navy);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.25;
  scroll-margin-top: 110px;
}

.blog-post-content h1 { font-size: 2em; margin-top: 1.6em; }
.blog-post-content h2 { font-size: 1.6em; margin-top: 1.9em; }
.blog-post-content h3 { font-size: 1.3em; margin-top: 1.7em; }
.blog-post-content h4 { font-size: 1.1em; margin-top: 1.5em; }
.blog-post-content h5,
.blog-post-content h6 { font-size: 1em; margin-top: 1.4em; }

.blog-post-content h2 + *,
.blog-post-content h3 + *,
.blog-post-content h4 + * {
  margin-top: 0.75em;
}

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

.blog-post-content p { margin-bottom: 0; }

.blog-post-content a {
  color: var(--blog-pink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.blog-post-content a:hover,
.blog-post-content a:focus-visible {
  color: var(--blog-pink-hover);
  text-decoration-thickness: 2px;
}

.blog-post-content strong,
.blog-post-content b {
  color: var(--blog-navy);
  font-weight: 800;
}

.blog-post-content em,
.blog-post-content i:not([class*="fa-"]) {
  font-style: italic;
}

/* Lists (Tailwind preflight removes bullets/numbers). */
.blog-post-content ul,
.blog-post-content ol {
  padding-left: 1.5em;
}

.blog-post-content ul { list-style: disc; }
.blog-post-content ol { list-style: decimal; }
.blog-post-content ul ul { list-style: circle; }

.blog-post-content li { margin-top: 0.5em; padding-left: 0.25em; }
.blog-post-content li::marker { color: var(--blog-pink); font-weight: 800; }
.blog-post-content li > ul,
.blog-post-content li > ol { margin-top: 0.5em; }

/* Blockquote. */
.blog-post-content blockquote {
  margin-left: 0;
  margin-right: 0;
  padding: 1.25em 1.5em;
  border-left: 4px solid var(--blog-pink);
  border-radius: 0 1rem 1rem 0;
  background: #FFF0F5;
  color: var(--blog-navy);
  font-size: 1.05em;
  font-weight: 600;
}

.blog-post-content blockquote > * + * { margin-top: 0.75em; }

.blog-post-content blockquote cite {
  display: block;
  font-size: 0.85em;
  font-style: normal;
  font-weight: 700;
  color: var(--blog-muted);
}

/* Images, figures, captions, embeds. */
.blog-post-content img,
.blog-post-content video,
.blog-post-content iframe,
.blog-post-content embed,
.blog-post-content object {
  max-width: 100%;
}

.blog-post-content img,
.blog-post-content video {
  height: auto;
  border-radius: 1rem;
}

.blog-post-content figure,
.blog-post-content .wp-caption {
  margin-left: 0;
  margin-right: 0;
  max-width: 100%;
}

.blog-post-content figcaption,
.blog-post-content .wp-caption-text,
.blog-post-content .wp-element-caption {
  margin-top: 0.6em;
  font-size: 0.85em;
  line-height: 1.5;
  color: var(--blog-muted);
  text-align: center;
}

.blog-post-content .aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 640px) {
  .blog-post-content .alignleft {
    float: left;
    max-width: 50%;
    margin: 0.4em 1.5em 1em 0;
  }
  .blog-post-content .alignright {
    float: right;
    max-width: 50%;
    margin: 0.4em 0 1em 1.5em;
  }
}

.blog-post-content::after {
  content: "";
  display: table;
  clear: both;
}

.blog-post-content iframe {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 1rem;
}

.blog-post-content iframe[src*="youtube"],
.blog-post-content iframe[src*="vimeo"] {
  aspect-ratio: 16 / 9;
  height: auto;
}

/* Tables: scroll inside themselves on small screens, never the page. */
.blog-post-content table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.9em;
  line-height: 1.5;
}

.blog-post-content .wp-block-table {
  overflow-x: auto;
}

.blog-post-content .wp-block-table table {
  display: table;
}

.blog-post-content th,
.blog-post-content td {
  padding: 0.75em 1em;
  border: 1px solid var(--blog-border);
  text-align: left;
  vertical-align: top;
}

.blog-post-content th,
.blog-post-content thead td {
  background: var(--blog-soft);
  color: var(--blog-navy);
  font-weight: 800;
}

/* Misc. */
.blog-post-content hr {
  margin: 2.5em 0;
  border: 0;
  border-top: 1px solid var(--blog-border);
}

.blog-post-content code,
.blog-post-content kbd {
  padding: 0.15em 0.4em;
  border-radius: 0.375rem;
  background: #f1f5f9;
  color: var(--blog-navy);
  font-size: 0.875em;
}

.blog-post-content pre {
  padding: 1em 1.25em;
  overflow-x: auto;
  border-radius: 1rem;
  background: var(--blog-navy);
  color: #e2e8f0;
  font-size: 0.875em;
  line-height: 1.6;
}

.blog-post-content pre code {
  padding: 0;
  background: none;
  color: inherit;
}

/* ==================== PAGINATION ==================== */

.blog-archive .blog-pagination {
  margin-top: 3.5rem;
}

.blog-archive .blog-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.blog-archive .blog-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0 0.9rem;
  border: 1px solid var(--blog-border);
  border-radius: 9999px;
  background: #fff;
  color: var(--blog-navy);
  font-size: 0.875rem;
  font-weight: 800;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.blog-archive .blog-pagination a.page-numbers:hover,
.blog-archive .blog-pagination a.page-numbers:focus-visible {
  border-color: #fbcfe8;
  color: var(--blog-pink);
}

.blog-archive .blog-pagination .page-numbers.current {
  border-color: var(--blog-pink);
  background: var(--blog-pink);
  color: #fff;
  box-shadow: 0 8px 24px -6px rgba(244, 42, 119, 0.35);
}

.blog-archive .blog-pagination .page-numbers.dots {
  border-color: transparent;
  background: transparent;
  min-width: auto;
  padding: 0 0.25rem;
}
