/* ══════════════════════════════════════════════════════════════════
   blogs.css
   Page-specific stylesheet for blogs.php (the blog LISTING page) ONLY.
   The single-article page (blog-post.php) has its own separate
   blog-post.css — kept apart on purpose so editing one page's styles
   can never accidentally affect the other.

   SECTION 1 is copied verbatim from about.css (same as testimonials.css
   and careers.css do) so banner, quick-facts, FAQ accordion, sticky
   ad slot and stats row render identically across all pages.

   SECTION 2 reuses the filter tabs + CTA strip pattern.

   SECTION 3 is the blog post card grid.

   SECTION 4 is new: pagination controls under the grid.

   SECTION 5 is new: the newsletter / subscription section.

   SECTION 6 is new: the combined CTA + Newsletter row (side-by-side
   on laptop/desktop, stacked on mobile).

   SECTION 7 is new: skeleton / shimmer placeholders shown while the
   AJAX pagination / category filter (blogs.js) is loading a page.

   SECTION 8 is new: top-right toast notifications for the newsletter
   subscribe form (validation / success / error) and for the email-
   verification link result.
   ══════════════════════════════════════════════════════════════════ */


/* ════════════════════════════════════════════════════════════════
   SECTION 0 — layout safety net
   Guards against the "text looks scattered" symptom that shows up
   if this stylesheet ever loads without header.css / a global reset
   (e.g. during the SPA-nav asset-path bug that used to point at a
   non-existent blog.css/blog.js). Low-specificity, scoped to this
   page only, so it never fights the real global styles when they
   ARE present — it just stops things collapsing when they aren't.
   ════════════════════════════════════════════════════════════════ */

#home, #home * { box-sizing: border-box; }

#home .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

#home img { max-width: 100%; display: block; }

#home a { text-decoration: none; }


/* ════════════════════════════════════════════════════════════════
   SECTION 1 — shared components, copied from about.css
   ════════════════════════════════════════════════════════════════ */

.js-pro-banner {
  width: 100%;
  box-sizing: border-box;
  /* Reduced top/bottom padding — banner now hugs the text instead of
     leaving a lot of empty image space above/below it. */
  padding-top: calc(var(--header-h, 75px) + var(--topbar-h, 38px) + 26px);
  padding-bottom: 32px;
  padding-left: 20px;
  padding-right: 20px;
  background:
    linear-gradient(180deg, rgba(10, 22, 40, 0.78) 0%, rgba(10, 22, 40, 0.94) 100%),
    linear-gradient(125deg, rgba(255, 107, 0, 0.35) 0%, rgba(10, 22, 40, 0.2) 60%),
    url('https://picsum.photos/1600/600?grayscale') center center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.js-pro-banner-content { max-width: 760px; width: 100%; margin: 0 auto; }

.js-pro-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 107, 0, 0.18);
  border: 1px solid rgba(255, 107, 0, 0.45);
  color: #ff8433; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  padding: 5px 14px; border-radius: 50px; margin-bottom: 14px;
  backdrop-filter: blur(4px);
}

.js-pro-crumb {
  font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.65);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-bottom: 12px;
}
.js-pro-crumb a { color: rgba(255, 255, 255, 0.65); text-decoration: none; transition: color 0.2s ease; }
.js-pro-crumb a:hover { color: #ff8433; }
.js-pro-crumb i { font-size: 9px; color: rgba(255, 255, 255, 0.35); }
.js-pro-crumb span { color: #ffffff; }

.js-pro-title {
  font-family: 'Sora', sans-serif;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800; color: #ffffff; letter-spacing: -0.5px;
  margin: 0 0 10px 0; line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.js-pro-desc {
  font-size: 15px; color: rgba(255, 255, 255, 0.85); line-height: 1.6;
  margin: 0 auto; max-width: 620px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.about-content { background: var(--bg); padding: 64px 0; }
.about-content-inner {
  display: block;
  width: 100%;
  margin-bottom: 56px;
}

.about-eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--saffron); margin-bottom: 10px;
}
.about-heading {
  font-family: 'Sora', sans-serif;
  font-size: clamp(24px, 3vw, 32px); font-weight: 800;
  color: var(--text); letter-spacing: -0.6px; margin-bottom: 18px;
}
.about-subheading {
  font-family: 'Sora', sans-serif;
  font-size: 17px; font-weight: 700;
  color: var(--text); margin: 26px 0 10px;
}
.about-text h3.about-subheading:first-of-type { margin-top: 6px; }
.about-text p { font-size: 15px; line-height: 1.85; color: var(--muted); margin-bottom: 16px; }
.about-text p:last-child { margin-bottom: 0; }
.about-text strong { color: var(--text); }

.about-quickfacts {
  background: var(--light); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px; margin-bottom: 28px;
}
.about-quickfacts-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 700; color: var(--text); margin-bottom: 14px;
}
.about-quickfacts-title i { color: var(--saffron); }
.about-quickfacts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.about-quickfacts-item {
  display: flex; align-items: flex-start; gap: 12px;
  background: white; border: 1px solid var(--border); border-left: 3px solid var(--saffron);
  border-radius: 11px; padding: 14px 15px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.about-quickfacts-item:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0,0,0,.06); }
.about-quickfacts-item--wide { grid-column: 1 / -1; }
.about-quickfacts-ico {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: var(--saffron-glow); color: var(--saffron);
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.about-quickfacts-content { min-width: 0; }
.about-quickfacts-label {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); margin-bottom: 3px;
}
.about-quickfacts-value { font-size: 13.5px; font-weight: 700; color: var(--text); line-height: 1.4; }

/* Accent variants — each stat gets its own colour so the grid reads
   at a glance instead of looking like six identical grey boxes. */
.qf-accent-orange { border-left-color: #ff6b00; }
.qf-accent-orange .about-quickfacts-ico { background: rgba(255,107,0,.12); color: #ff6b00; }
.qf-accent-blue { border-left-color: #2563eb; }
.qf-accent-blue .about-quickfacts-ico { background: rgba(37,99,235,.12); color: #2563eb; }
.qf-accent-green { border-left-color: #16a34a; }
.qf-accent-green .about-quickfacts-ico { background: rgba(22,163,74,.12); color: #16a34a; }
.qf-accent-purple { border-left-color: #7c3aed; }
.qf-accent-purple .about-quickfacts-ico { background: rgba(124,58,237,.12); color: #7c3aed; }
.qf-accent-pink { border-left-color: #db2777; }
.qf-accent-pink .about-quickfacts-ico { background: rgba(219,39,119,.12); color: #db2777; }
.qf-accent-teal { border-left-color: #0d9488; }
.qf-accent-teal .about-quickfacts-ico { background: rgba(13,148,136,.12); color: #0d9488; }

.about-faq { margin-top: 36px; }
.about-faq-item {
  background: #ffffff; border: 1px solid #e2e8f0; border-radius: 10px;
  margin-bottom: 10px; overflow: hidden;
}
.about-faq-item:last-child { border-bottom: none; }
.about-faq-q {
  width: 100%; padding: 14px 18px;
  display: flex; justify-content: space-between; align-items: center;
  border: none; background: transparent;
  font-size: 14px; font-weight: 600; color: #1e293b; cursor: pointer; text-align: left;
}
.about-faq-q:hover { color: var(--saffron); }
.about-faq-icon {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--saffron-glow); color: var(--saffron);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; transition: transform 0.2s, background 0.2s, color 0.2s;
}
.about-faq-item.open .about-faq-icon,
.about-faq-item.active .about-faq-icon { background: var(--saffron); color: white; }
.about-faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; padding: 0 18px; }
.about-faq-a p { font-size: 13.5px; font-weight: 300; color: var(--muted); line-height: 1.75; padding: 0 2px 16px; }


/* ════════════════════════════════════════════════════════════════
   SECTION 2 — reused filter tabs + CTA (same as testimonials.css)
   ════════════════════════════════════════════════════════════════ */

.tst-filters { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.tst-filter-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px; font-weight: 600;
  padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--border); background: white; color: var(--muted);
  cursor: pointer; transition: border-color .15s ease, color .15s ease, background .15s ease;
  display: inline-block; text-decoration: none;
}
.tst-filter-btn:hover { border-color: var(--saffron); color: var(--text); }
.tst-filter-btn.is-active { background: var(--saffron); border-color: var(--saffron); color: white; }

.tst-empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.tst-empty i { font-size: 24px; margin-bottom: 8px; display: block; }

/* Standalone spacing removed — .tst-cta now always lives inside
   .blg-bottom-row (Section 6), which controls the outer margin. */
.tst-cta {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 16px;
  background: #ffffff; border: 1px solid var(--border); border-radius: 16px; padding: 26px 28px;
  box-shadow: var(--shadow); margin: 0; height: 100%;
}
.tst-cta-text h3 { font-family: 'Sora', sans-serif; color: var(--text); font-size: 18px; margin: 0 0 8px; }
.tst-cta-text p { font-size: 13.5px; line-height: 1.75; color: var(--muted); margin: 0; }
.tst-cta-btn {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--saffron); color: #fff;
  font-weight: 700; font-size: 13px; padding: 10px 18px; border-radius: 10px;
  text-decoration: none; white-space: nowrap; transition: filter .15s ease;
}
.tst-cta-btn i { font-size: 12px; }
.tst-cta-btn:hover { filter: brightness(1.08); }


/* ════════════════════════════════════════════════════════════════
   SECTION 3 — blog-only: post card grid
   ════════════════════════════════════════════════════════════════ */

.blg-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-bottom: 22px;
  align-items: stretch;
}

.blg-card {
  display: flex; flex-direction: column;
  background: white; border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
  height: 100%;
}
.blg-card:hover { transform: translateY(-3px); border-color: var(--saffron); box-shadow: 0 10px 24px rgba(0,0,0,.08); }

.blg-card-img {
  height: 150px; width: 100%;
  object-fit: cover; object-position: center;
  background-color: var(--light);
  flex-shrink: 0;
  display: block;
}

.blg-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }

.blg-card-cat {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--saffron); margin-bottom: 8px;
}

.blg-card-title {
  font-family: 'Sora', sans-serif;
  font-size: 15.5px; font-weight: 700; color: var(--text);
  line-height: 1.4; margin: 0 0 8px;
}

.blg-card-excerpt {
  font-size: 13px; line-height: 1.6; color: var(--muted);
  margin: 0 0 14px; flex: 1;
}

.blg-card-meta {
  display: flex; gap: 14px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.blg-card-meta span {
  font-size: 11.5px; color: var(--muted);
  display: inline-flex; align-items: center; gap: 5px;
}
.blg-card-meta i { color: var(--saffron); font-size: 11px; }


/* ════════════════════════════════════════════════════════════════
   SECTION 4 — pagination (rendered as <a>/<span> links, server-side)
   ════════════════════════════════════════════════════════════════ */

/* The list wrapper is what blogs.js scrolls into view after an AJAX
   page/category change. scroll-margin-top tells scrollIntoView() to
   stop short of the sticky header instead of tucking the filter tabs
   / heading text underneath it. Keep this in sync with the sticky
   header's real height (--header-h + --topbar-h) plus a little
   breathing room. */
.blg-list-wrap {
  position: relative;
  min-height: 120px;
  scroll-margin-top: calc(var(--header-h, 75px) + var(--topbar-h, 38px) + 4px);
}
.blg-list-wrap.is-loading { pointer-events: none; }

.blg-pagination {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 6px 0 8px;
}

.blg-page-btn {
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--border); background: white; color: var(--text);
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; cursor: pointer; text-decoration: none;
  transition: border-color .15s ease, background .15s ease, color .15s ease, opacity .15s ease;
}
.blg-page-btn:hover { border-color: var(--saffron); color: var(--saffron); }
.blg-page-btn.is-disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

.blg-page-numbers { display: flex; align-items: center; gap: 6px; }
.blg-page-num {
  min-width: 36px; height: 36px; padding: 0 6px; border-radius: 10px;
  border: 1px solid var(--border); background: white; color: var(--muted);
  font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.blg-page-num:hover { border-color: var(--saffron); color: var(--text); }
.blg-page-num.is-active { background: var(--saffron); border-color: var(--saffron); color: white; cursor: default; }


/* ════════════════════════════════════════════════════════════════
   SECTION 4b — horizontal Google Ad slot (replaces the old sidebar)
   ════════════════════════════════════════════════════════════════ */

.blg-ad-horizontal { margin: 26px 0; }
.blg-ad-box {
  width: 100%; min-height: 100px;
  background: white; border: 1.5px dashed var(--border); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow);
}



/* ════════════════════════════════════════════════════════════════
   SECTION 5 — newsletter / subscription section
   ════════════════════════════════════════════════════════════════ */

/* Standalone spacing removed — .blg-subscribe now always lives inside
   .blg-bottom-row (Section 6), which controls the outer margin. Given
   a dark card here so it visually contrasts with the white CTA card
   next to it. Success/error/validation messages now show as toasts
   (Section 8) instead of an inline box under the form. */
.blg-subscribe {
  display: block;
  background: #1c2230;
  border: 1px solid #2a3142;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 0;
  height: 100%;
}

.blg-subscribe-content { padding: 24px 26px; height: 100%; box-sizing: border-box; }

.blg-subscribe-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 107, 0, 0.18); color: #ff8433;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 5px 12px; border-radius: 50px; margin-bottom: 12px;
}

.blg-subscribe-title {
  font-family: 'Sora', sans-serif;
  font-size: clamp(17px, 2vw, 19px); font-weight: 800;
  color: #ffffff; letter-spacing: -0.4px; margin: 0 0 8px;
}

.blg-subscribe-text {
  font-size: 13px; line-height: 1.7; color: rgba(255, 255, 255, 0.68);
  margin: 0 0 16px; max-width: 480px;
}

.blg-subscribe-form {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px;
}

.blg-subscribe-field {
  flex: 1 1 200px;
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.55); border-radius: 10px;
  padding: 0 14px; background: rgba(255, 255, 255, 0.08);
  min-width: 0;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.blg-subscribe-field i { color: rgba(255, 255, 255, 0.75); font-size: 13px; flex-shrink: 0; }
.blg-subscribe-field input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  font-family: 'DM Sans', sans-serif; font-size: 13.5px; color: #ffffff;
  padding: 12px 0;
}
.blg-subscribe-field input::placeholder { color: rgba(255, 255, 255, 0.6); }
.blg-subscribe-field:focus-within {
  border-color: #ffffff; background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.14);
}

.blg-subscribe-btn {
  flex: none;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--saffron); color: white; border: none;
  font-weight: 700; font-size: 13.5px; padding: 0 20px;
  border-radius: 10px; cursor: pointer; white-space: nowrap;
  transition: filter .15s ease;
}
.blg-subscribe-btn:hover { filter: brightness(1.08); }
.blg-subscribe-btn:disabled { opacity: .6; cursor: not-allowed; }

.blg-subscribe-note {
  font-size: 11.5px; color: rgba(255, 255, 255, 0.5); margin: 0;
  display: flex; align-items: center; gap: 6px;
}


/* ════════════════════════════════════════════════════════════════
   SECTION 6 — combined CTA + Newsletter row
   Side-by-side (col-6 / col-6 style) on laptop/desktop, stacked full
   width on tablet/mobile.
   ════════════════════════════════════════════════════════════════ */

.blg-bottom-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: stretch;
  margin: 28px 0 8px;
}

@media (max-width: 900px) {
  .blg-bottom-row { grid-template-columns: 1fr; }
  .blg-bottom-row .tst-cta { flex-direction: row; align-items: center; justify-content: space-between; }
}

@media (max-width: 600px) {
  .blg-bottom-row .tst-cta { flex-direction: column; align-items: flex-start; }
}


/* ════════════════════════════════════════════════════════════════
   SECTION 7 — AJAX pagination: skeleton / shimmer loading
   (blogs.js swaps #blgListWrap's innerHTML for this while a
   category-filter or pagination click is in flight — same idea as
   an e-commerce product grid's grey shimmer placeholders.)
   ════════════════════════════════════════════════════════════════ */

.blg-skel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-bottom: 22px;
}

.blg-skel-card {
  background: white; border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; box-shadow: var(--shadow);
}
.blg-skel-img { height: 150px; }
.blg-skel-body { padding: 16px 18px 18px; }
.blg-skel-line { height: 12px; border-radius: 6px; margin-bottom: 10px; }
.blg-skel-line:last-child { margin-bottom: 0; }
.blg-skel-line.w-40  { width: 40%; height: 10px; }
.blg-skel-line.w-70  { width: 70%; }
.blg-skel-line.w-90  { width: 90%; }
.blg-skel-line.w-title { width: 85%; height: 18px; margin-top: 4px; }

.blg-skel-img, .blg-skel-line {
  background: linear-gradient(90deg, #e9ecf1 25%, #f6f7f9 37%, #e9ecf1 63%);
  background-size: 400% 100%;
  animation: blgShimmer 1.4s ease infinite;
}

@keyframes blgShimmer {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

@media (max-width: 600px) {
  .blg-skel-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .blg-skel-img, .blg-skel-line { animation: none; background: #e9ecf1; }
}


/* ════════════════════════════════════════════════════════════════
   SECTION 8 — toast notifications (top-right)
   Rendered by blogShowToast() in blogs.js into #blgToastContainer
   for newsletter subscribe validation / success / error, and for
   the email-verification link result on page load.
   ════════════════════════════════════════════════════════════════ */

.blg-toast-container {
  position: fixed;
  top: calc(var(--header-h, 75px) + var(--topbar-h, 38px) + 16px);
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 320px;
  width: calc(100% - 32px);
}

.blg-toast {
  display: flex; align-items: flex-start; gap: 10px;
  background: white; border: 1px solid var(--border); border-left: 4px solid var(--saffron);
  border-radius: 10px; padding: 12px 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
  font-size: 13px; color: var(--text);
  animation: blgToastIn .25s ease;
}
.blg-toast-success { border-left-color: #16a34a; }
.blg-toast-error { border-left-color: #dc2626; }
.blg-toast-icon { flex-shrink: 0; font-size: 14px; margin-top: 1px; color: var(--saffron); }
.blg-toast-success .blg-toast-icon { color: #16a34a; }
.blg-toast-error .blg-toast-icon { color: #dc2626; }
.blg-toast-msg { flex: 1; line-height: 1.5; }
.blg-toast-close {
  flex-shrink: 0; background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: 15px; line-height: 1; padding: 2px;
}
.blg-toast-close:hover { color: var(--text); }
.blg-toast-hide { animation: blgToastOut .2s ease forwards; }

@keyframes blgToastIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes blgToastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(24px); } }

@media (max-width: 600px) {
  .blg-toast-container { right: 10px; left: 10px; max-width: none; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .blg-toast { animation: none; }
  .blg-toast-hide { animation: none; opacity: 0; }
}


/* ════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .about-quickfacts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .about-content { padding: 40px 0; }
  .about-quickfacts-grid { grid-template-columns: 1fr; }
  .blg-grid { grid-template-columns: 1fr; }
  .blg-subscribe-content { padding: 20px 18px; }
  .blg-subscribe-form { flex-direction: column; }
  .blg-subscribe-btn { width: 100%; justify-content: center; padding: 12px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .blg-card, .tst-cta-btn, .about-faq-a, .about-faq-icon, .blg-subscribe-btn, .blg-page-btn, .blg-page-num { transition: none; }
}