/*
Theme Name: GlowSnap Blog
Theme URI: https://www.glowsnapexperience.com/blog
Author: Kreator Tech
Author URI: https://kreatortechllc.com
Description: Custom theme for the GlowSnap Experience blog. Loads the main site's own stylesheet, fonts, navigation, and footer so the blog always matches glowsnapexperience.com. Built for posts only: comments are off, the layout is fixed, and the editor is limited to brand colors.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.0
License: Proprietary
Text Domain: glowsnap-blog
*/

/* The main site's assets/css/styles.css loads first (see functions.php).
   Everything below is blog-only and uses the same color tokens. */

/* ---------- Menu fit: "Blog" adds a 9th item, so on small laptops (992 to 1199px)
   the links get slightly tighter to stay on one line, like the main site. ---------- */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .gs-nav .navbar-nav { gap: 0 !important; }
  .gs-nav .nav-link { font-size: .9rem; padding-left: .5rem !important; padding-right: .5rem !important; }
}

/* ---------- Blog home + archives ---------- */
.blog-hero { padding-bottom: 3rem; }
.blog-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.75rem; }
.blog-filters a {
  display: inline-block; padding: .4rem .95rem; border-radius: 999px;
  border: 1px solid var(--gs-line); background: var(--gs-surface);
  color: var(--gs-muted); font-size: .9rem; font-weight: 600; text-decoration: none;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.blog-filters a:hover, .blog-filters a:focus-visible { color: var(--gs-text); border-color: rgba(255, 179, 107, .55); }
.blog-filters a.is-active { color: #1a0f14; background: var(--gs-glow); border-color: transparent; }

.post-card {
  position: relative; height: 100%; display: flex; flex-direction: column;
  background: var(--gs-surface); border: 1px solid var(--gs-line); border-radius: var(--gs-radius);
  overflow: hidden; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.post-card:hover, .post-card:focus-within {
  transform: translateY(-3px); border-color: rgba(255, 179, 107, .35);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
}
.post-card-media { aspect-ratio: 16 / 9; background: var(--gs-surface-2); overflow: hidden; }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card-media--empty {
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 30% 20%, rgba(255, 95, 162, .22), transparent 60%),
              radial-gradient(ellipse at 80% 90%, rgba(155, 107, 255, .2), transparent 55%), var(--gs-surface-2);
}
.post-card-media--empty span { font-family: var(--gs-font-display); font-size: 1.6rem; opacity: .55; }
.post-card-body { padding: 1.25rem 1.35rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.post-card-cat { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gs-amber); margin-bottom: .45rem; }
.post-card-title { font-family: var(--gs-font-display); font-size: 1.3rem; line-height: 1.25; font-weight: 700; margin-bottom: .55rem; }
.post-card-title a { text-decoration: none; }
.post-card-title a::after { content: ""; position: absolute; inset: 0; } /* whole card is the link */
.post-card-title a:focus-visible { outline: none; }
.post-card:focus-within { outline: 2px solid var(--gs-amber); outline-offset: 2px; }
.post-card-excerpt { color: var(--gs-muted); font-size: .95rem; margin-bottom: 1rem; }
.post-card-meta { margin-top: auto; font-size: .82rem; color: var(--gs-muted); }

.blog-empty { text-align: center; padding: 3rem 1rem; border: 1px dashed var(--gs-line); border-radius: var(--gs-radius); }

/* Pagination */
.blog-pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin-top: 3rem; }
.blog-pagination .page-numbers {
  min-width: 2.6rem; padding: .5rem .85rem; border-radius: 999px; text-align: center;
  border: 1px solid var(--gs-line); color: var(--gs-muted); text-decoration: none; font-weight: 600;
}
.blog-pagination a.page-numbers:hover { color: var(--gs-text); border-color: rgba(255, 179, 107, .55); }
.blog-pagination .page-numbers.current { color: #1a0f14; background: var(--gs-glow); border-color: transparent; }
.blog-pagination .page-numbers.dots { border-color: transparent; }

/* ---------- Single post ---------- */
.post-hero { padding-bottom: 2.5rem; }
.gs-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; padding: 0; margin: 0 0 1.25rem; font-size: .88rem; color: var(--gs-muted); }
.gs-crumbs li + li::before { content: "/"; margin-right: .35rem; opacity: .5; }
.gs-crumbs a { color: var(--gs-muted); text-decoration: none; }
.gs-crumbs a:hover { color: var(--gs-text); }
.gs-crumbs [aria-current] { color: var(--gs-text); }
.post-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; color: var(--gs-muted); font-size: .92rem; }
.post-meta .dot { opacity: .5; }

/* Featured image: never taller than a phone screen allows */
.post-feature { margin: 0 auto 2.5rem; border-radius: var(--gs-radius); overflow: hidden; background: var(--gs-surface-2); aspect-ratio: 16 / 9; }
.post-feature img { width: 100%; height: 100%; object-fit: cover; display: block; }

.post-edit { margin-top: 1rem; font-size: .9rem; }

/* Post body typography (text written in the editor) */
.gs-prose { font-size: 1.075rem; line-height: 1.75; color: #ddd3e3; }
.gs-prose > * + * { margin-top: 1.25em; }
.gs-prose p { margin-bottom: 0; }
.gs-prose h2, .gs-prose h3, .gs-prose h4 { font-family: var(--gs-font-display); color: var(--gs-text); line-height: 1.2; text-wrap: balance; scroll-margin-top: 100px; }
.gs-prose h2 { font-size: clamp(1.55rem, 3vw, 2rem); margin-top: 2.2em; margin-bottom: .1em; }
.gs-prose h3 { font-size: clamp(1.25rem, 2.4vw, 1.5rem); margin-top: 1.8em; margin-bottom: .1em; }
.gs-prose h4 { font-family: var(--gs-font-body); font-size: 1.1rem; font-weight: 700; margin-top: 1.6em; }
.gs-prose a { color: var(--gs-amber); text-decoration: underline; text-decoration-color: rgba(255, 179, 107, .45); text-underline-offset: 3px; }
.gs-prose a:hover { color: var(--gs-pink); text-decoration-color: var(--gs-pink); }
.gs-prose strong { color: var(--gs-text); }
.gs-prose ul, .gs-prose ol { padding-left: 1.35rem; }
.gs-prose li { margin-bottom: .45em; }
.gs-prose li::marker { color: var(--gs-amber); }
.gs-prose blockquote, .gs-prose .wp-block-quote, .gs-prose .wp-block-pullquote {
  margin-left: 0; margin-right: 0; padding: 1.1rem 1.4rem; border: 0; border-left: 3px solid var(--gs-pink);
  background: var(--gs-surface); border-radius: 0 14px 14px 0; font-family: var(--gs-font-display); font-size: 1.2rem; color: var(--gs-text);
}
.gs-prose blockquote p { margin: 0; }
.gs-prose blockquote cite, .gs-prose .wp-block-quote cite { display: block; margin-top: .6rem; font-family: var(--gs-font-body); font-size: .9rem; font-style: normal; color: var(--gs-muted); }
.gs-prose hr, .gs-prose .wp-block-separator { border: 0; height: 1px; background: var(--gs-line); opacity: 1; margin: 2.5em 0; }
.gs-prose figure { margin-left: 0; margin-right: 0; }
.gs-prose img { max-width: 100%; height: auto; border-radius: 14px; }
.gs-prose figcaption, .gs-prose .wp-element-caption { margin-top: .6rem; font-size: .88rem; color: var(--gs-muted); text-align: center; }
.gs-prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.gs-prose th, .gs-prose td { padding: .65rem .8rem; border-bottom: 1px solid var(--gs-line); text-align: left; vertical-align: top; }
.gs-prose th { color: var(--gs-text); font-weight: 700; }
.gs-prose .wp-block-table { overflow-x: auto; }
.gs-prose code { color: var(--gs-amber); background: var(--gs-surface); padding: .1em .35em; border-radius: 6px; font-size: .9em; }
.gs-prose .wp-block-embed iframe, .gs-prose iframe { max-width: 100%; border-radius: 14px; }
.gs-prose .wp-block-button__link { background: var(--gs-glow); color: #1a0f14; font-weight: 700; border-radius: 999px; padding: .75rem 1.6rem; text-decoration: none; }
.gs-prose .wp-block-button__link:hover { color: #1a0f14; filter: brightness(1.05); }
.gs-prose .alignwide { margin-left: auto; margin-right: auto; }
.gs-prose .alignleft { float: left; margin: .3rem 1.5rem 1rem 0; max-width: 50%; }
.gs-prose .alignright { float: right; margin: .3rem 0 1rem 1.5rem; max-width: 50%; }
.gs-prose .aligncenter { margin-left: auto; margin-right: auto; }
.gs-prose::after { content: ""; display: table; clear: both; }

/* Phones: images in posts never fill more than ~60% of the screen height,
   and side-floated images stack so text stays readable. */
@media (max-width: 575.98px) {
  .gs-prose { font-size: 1.03rem; }
  .gs-prose figure img, .gs-prose > p img { max-height: 60svh; width: auto; margin-inline: auto; display: block; }
  .gs-prose .alignleft, .gs-prose .alignright { float: none; max-width: 100%; margin: 1.25em 0; }
  .post-feature { margin-bottom: 1.75rem; border-radius: 14px; }
  .post-hero .gs-crumbs li:last-child { display: none; } /* the title is right below */
  .post-meta { gap: .2rem .9rem; }
  .post-meta .dot { display: none; }
}
@supports not (height: 1svh) {
  @media (max-width: 575.98px) { .gs-prose figure img, .gs-prose > p img { max-height: 60vh; } }
}

/* In-post booking box */
.post-cta {
  margin-top: 3rem; padding: 1.75rem; border-radius: var(--gs-radius); border: 1px solid rgba(255, 179, 107, .3);
  background: radial-gradient(ellipse at 0% 0%, rgba(255, 95, 162, .14), transparent 60%), var(--gs-surface);
}
.post-cta-title { font-family: var(--gs-font-display); font-size: 1.45rem; font-weight: 700; margin-bottom: .4rem; }
.post-cta p { color: var(--gs-muted); margin-bottom: 1.1rem; }

.post-tags { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.post-tags a { font-size: .82rem; padding: .25rem .7rem; border-radius: 999px; border: 1px solid var(--gs-line); color: var(--gs-muted); text-decoration: none; }
.post-tags a:hover { color: var(--gs-text); }

.related-posts { border-top: 1px solid var(--gs-line); }

/* ---------- 404 + plain pages ---------- */
.blog-404 { min-height: 60vh; }

/* Logged-in preview bar is hidden on the front end (see functions.php); no offset needed. */

/* Smaller section headings ("Keep reading", empty blog) */
.section-title--sm { font-size: clamp(1.5rem, 3vw, 2rem); color: var(--gs-text); }
