/**
 * Blog redesign (dev: /blog-2/) — hand-written, unbuilt CSS.
 * No Sass, no Tailwind, no npm step — enqueued directly, same pattern as
 * dist/custom.css. Only loaded on template-blog-redesign.php (see
 * includes/lib/blog-redesign.php). Colours are the theme's existing tokens
 * (tailwind.config.js) copied as literal values so this still reads as
 * on-brand without depending on the Tailwind build.
 */

.blog2 {
  --blog2-teal: #075056;
  --blog2-default-high: #033438;
  --blog2-default-med: #4C6769;
  --blog2-primary: #FF5900;
  --blog2-ice-blue: #D0F8FB;
  --blog2-grey: #f7f7f7;
  --blog2-border: #E3E6E2;
  --blog2-border-alt: #D5DAD5;
  --blog2-placeholder-bg: #7F9496;
  --blog2-muted: #5A6472;
  --blog2-primary-dark: #D94E00;
}

.blog2 .is-hidden {
  display: none !important;
}

/* The "sr-only" class name is used on the search/sort <label>s, but
   Tailwind's own .sr-only utility was never actually compiled into
   dist/main.min.css in this build (confirmed directly — the only sr-only
   match in there is .plyr__sr-only from the video player library), so
   those labels were rendering as plain visible text all along. Defining
   it here — the standard visually-hidden-but-accessible technique — is
   what actually takes them out of the flex flow (position: absolute),
   which is also why the filter-bar `order` values above only look right
   once this is in place. */
.blog2 .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Hero ---------- */

.blog2-hero {
  padding: 64px 0 48px;
  text-align: center;
}

.blog2-hero__title {
  margin: 0 auto 16px;
  max-width: 900px;
}

.blog2-hero__subtitle {
  margin: 0 auto;
  max-width: 620px;
}

/* ---------- Featured carousel ---------- */

.blog2-featured {
  padding-bottom: 48px;
}

.blog2-featured__viewport {
  overflow: hidden;
}

.blog2-featured__track {
  display: flex;
  gap: 24px;
  transition: transform 450ms ease;
  /* Keeps this on its own GPU-composited layer permanently, so the
     instant (no-transition) snap the infinite loop does in
     js/blog-redesign.js is just repositioning an already-painted layer
     instead of the browser re-rendering the slide from scratch at the
     jump — without this, that re-render was showing as a one-frame
     blank every time the snap happened. */
  will-change: transform;
}

.blog2-featured__slide {
  flex-shrink: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
  color: inherit;
  text-decoration: none;
}

.blog2-featured__image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  overflow: hidden;
  background: var(--blog2-placeholder-bg);
}

.blog2-featured__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog2-featured__placeholder {
  width: 100%;
  height: 100%;
  background: var(--blog2-ice-blue);
}

.blog2-featured__badge {
  position: absolute;
  top: 16px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--blog2-primary);
  color: #fff;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
}

.blog2-featured__meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.blog2-featured__tags {
  color: var(--blog2-default-med);
  margin-bottom: 8px;
}

.blog2-featured__title {
  max-width: 620px;
  color: var(--blog2-default-high);
}

.blog2-featured__cta {
  flex-shrink: 0;
  display: none;
  align-items: center;
  height: 48px;
  padding: 0 20px;
  border-radius: 6px;
  background: var(--blog2-primary);
  color: #fff;
  font-family: "Source Code Pro", monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 150ms ease;
}

.blog2-featured__slide:hover .blog2-featured__cta {
  background: var(--blog2-primary-dark);
}

.blog2-featured__nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.blog2-featured__arrow {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid var(--blog2-default-high);
  background: #fff;
  color: var(--blog2-default-high);
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.blog2-featured__arrow:not(:disabled):hover {
  background: var(--blog2-default-high);
  color: #fff;
}

.blog2-featured__arrow:disabled {
  border-color: var(--blog2-border-alt);
  color: #A9B4B5;
  cursor: default;
}

.blog2-featured__counter {
  margin-left: 12px;
  color: var(--blog2-default-med);
}

/* ---------- All articles: filter bar ---------- */

.blog2-all-articles {
  padding-bottom: 64px;
}

.blog2-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--blog2-grey);
  border: 1px solid var(--blog2-border);
  border-radius: 20px;
  padding: 12px;
  margin-bottom: 32px;
}

.blog2-filter-bar__search {
  /* Mobile only: search first, tags second, sort last — desktop restores
     source order (search, sort, tags) in the 1050px breakpoint below. */
  order: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 52px;
  padding: 0 18px;
  background: #fff;
  border-radius: 6px;
}

.blog2-filter-bar__search svg {
  flex-shrink: 0;
}

.blog2-filter-bar__search input {
  flex-grow: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: var(--blog2-default-high);
  outline: none;
}

.blog2-filter-bar__sort {
  order: 3;
  flex-shrink: 0;
  height: 48px;
  padding: 0 32px 0 16px;
  border: 1px solid var(--blog2-border-alt);
  border-radius: 6px;
  background: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--blog2-default-high);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235A6472' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.blog2-chips {
  order: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-grow: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.blog2-chip {
  flex-shrink: 0;
  white-space: nowrap;
  height: 44px;
  padding: 0 18px;
  border-radius: 6px;
  border: 1px solid var(--blog2-border-alt);
  background: #fff;
  color: var(--blog2-teal);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.blog2-chip:not(.is-active):hover {
  border-color: var(--blog2-teal);
  background: var(--blog2-ice-blue);
}

.blog2-chip.is-active {
  border-color: var(--blog2-teal);
  background: var(--blog2-teal);
  color: #fff;
}

.blog2-chip.is-active:hover {
  background: var(--blog2-default-high);
  border-color: var(--blog2-default-high);
}

/* ---------- All articles: heading row ---------- */

.blog2-all-articles__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.blog2-all-articles__eyebrow {
  color: var(--blog2-default-med);
  margin-bottom: 8px;
}

.blog2-all-articles__count {
  font-size: 15px;
  color: var(--blog2-default-med);
  white-space: nowrap;
}

/* ---------- Cards grid ---------- */

.blog2-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px 32px;
}

.blog2-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: inherit;
  text-decoration: none;
}

.blog2-card__image {
  position: relative;
  width: 100%;
  aspect-ratio: 378 / 284;
  border-radius: 20px;
  overflow: hidden;
  background: var(--blog2-placeholder-bg);
}

.blog2-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 500ms ease;
}

.blog2-card:hover .blog2-card__image img {
  transform: scale(1.05);
}

.blog2-card__placeholder {
  width: 100%;
  height: 100%;
  background: var(--blog2-ice-blue);
}

.blog2-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 4px;
}

.blog2-card__tags {
  color: var(--blog2-teal);
}

.blog2-card__link-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--blog2-teal);
  transition: color 150ms ease;
}

.blog2-card:hover .blog2-card__link-label {
  color: var(--blog2-default-high);
}

/* ---------- See more / see less ---------- */

.blog2-toggle-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
}

.blog2-toggle-btn {
  height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 6px;
  background: var(--blog2-grey);
  font-family: "Source Code Pro", monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 15px;
  font-weight: 500;
  color: var(--blog2-default-high);
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.blog2-toggle-btn:hover {
  background: var(--blog2-default-high);
  color: #fff;
}

/* ---------- Disclaimer ---------- */

.blog2-disclaimer {
  padding-bottom: 64px;
}

.blog2-disclaimer__panel {
  background: var(--blog2-grey);
  border-radius: 10px;
  padding: 24px;
}

.blog2-disclaimer__eyebrow {
  color: var(--blog2-teal);
  margin-bottom: 14px;
}

.blog2-disclaimer__text {
  color: var(--blog2-default-high);
}

/* ---------- CTA band ---------- */

.blog2-cta {
  background: var(--blog2-ice-blue);
}

.blog2-cta__inner {
  padding: 64px 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.blog2-cta__heading {
  max-width: 680px;
  color: var(--blog2-teal);
}

.blog2-cta__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.blog2-cta__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 20px;
  border-radius: 4px;
  font-family: "Source Code Pro", monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.blog2-cta__button--solid {
  background: var(--blog2-primary);
  color: #fff;
}

.blog2-cta__button--solid:hover {
  background: var(--blog2-primary-dark);
}

.blog2-cta__button--outline {
  border: 1px solid var(--blog2-teal);
  color: var(--blog2-teal);
}

.blog2-cta__button--outline:hover {
  background: var(--blog2-teal);
  color: #fff;
}

/* ---------- Breakpoints (same values as tailwind.config.js: md=830px, lg=1050px) ---------- */

@media (min-width: 500px) {
  .blog2-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 830px) {
  .blog2-all-articles__count {
    display: block;
  }
}

@media (min-width: 1050px) {
  .blog2-hero {
    padding: 96px 0 64px;
  }

  .blog2-featured {
    padding-bottom: 64px;
  }

  .blog2-featured__viewport {
    /* Bleeds the slider's right edge out to the actual browser edge on
       desktop, left edge stays put — standard "break out of a centered
       container" trick: .blog2-featured (site-container) is itself
       centered via margin:auto, so for a 100%-width child, (50% - 50vw)
       is exactly the gap between the container's right edge and the
       viewport's right edge; a negative margin of that size cancels it
       out. Works regardless of site-container's own responsive math. */
    margin-right: calc(50% - 50vw);
  }

  .blog2-featured__track {
    gap: 32px;
  }

  .blog2-featured__slide {
    width: 75%;
    gap: 28px;
  }

  .blog2-featured__image {
    aspect-ratio: 21 / 9;
    border-radius: 24px;
  }

  .blog2-featured__cta {
    display: inline-flex;
  }

  .blog2-filter-bar {
    flex-direction: row;
    align-items: center;
    gap: 24px;
  }

  .blog2-filter-bar__search {
    order: 0;
    width: 360px;
  }

  .blog2-filter-bar__sort {
    order: 0;
  }

  .blog2-chips {
    order: 0;
  }

  .blog2-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .blog2-cta__inner {
    padding: 96px 0;
    gap: 44px;
  }

  .blog2-cta__actions {
    flex-direction: row;
  }
}

@media (min-width: 1280px) {
  .blog2-featured__slide {
    width: 62%;
  }
}
