/**
 * CCC Blog Archive — full-width Pool Care Guide (BEAD-BLOG-001)
 */

:root {
  --ccc-heading-font: var(--ccc-font-display);
  --ccc-muted: var(--ccc-gray-cool);
  --ccc-blog-container-max: 1180px;
  --ccc-blog-container-pad: clamp(1rem, 3vw, 2rem);
}

/* ——— Kill outer boxed document wrapper ——— */
body.ccc-blog-archive-body {
  background: #fbfdff;
  overflow-x: hidden;
}

body.ccc-blog-archive-body #page,
body.ccc-blog-archive-body #page.site {
  width: 100%;
  max-width: none !important;
  margin: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border: none;
}

body.ccc-blog-archive-body #primary.ccc-blog-archive,
body.ccc-blog-archive-body .site-main.ccc-blog-archive {
  display: block;
  width: 100%;
  max-width: none !important;
  margin: 0;
  padding: 0;
  background: transparent;
  float: none;
  flex: none;
}

body.ccc-blog-archive-body .wrapper#wrapper-navbar + .wrapper,
body.ccc-blog-archive-body #page > .wrapper:not(#wrapper-footer) {
  max-width: none;
  padding: 0;
  background: transparent;
}

/* Bootstrap .container equivalent (Bootstrap CSS not on frontend) */
.ccc-blog-archive .container {
  width: 100%;
  max-width: var(--ccc-blog-container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--ccc-blog-container-pad);
  padding-right: var(--ccc-blog-container-pad);
}

.ccc-blog-archive > section {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

/* ——— Hero ——— */
.ccc-blog-hero {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding-block: clamp(4rem, 7vw, 7rem);
  background:
    radial-gradient(circle at top right, rgba(25, 182, 210, 0.18), transparent 30rem),
    linear-gradient(135deg, #02172f 0%, #06264a 58%, #0b3d72 100%);
  color: #fff;
}

.ccc-blog-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.08;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 56px 56px;
}

.ccc-blog-hero .container {
  position: relative;
  z-index: 1;
}

.ccc-blog-hero__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

.ccc-blog-hero__eyebrow {
  margin: 0 0 1rem;
  color: #70d6ea;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.ccc-blog-hero__title {
  margin: 0 0 1.25rem;
  max-width: 16ch;
  font-family: var(--ccc-heading-font);
  font-size: clamp(2.1rem, 4.5vw, 3.35rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.ccc-blog-hero__text {
  margin: 0 0 2rem;
  max-width: 42rem;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.7;
}

.ccc-blog-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.ccc-blog-hero__btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

.ccc-blog-hero__btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: #fff;
}

.ccc-blog-hero__phone {
  display: inline-flex;
  align-items: center;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.ccc-blog-hero__phone:hover {
  color: #fff;
  text-decoration: underline;
}

.ccc-blog-hero__media {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.ccc-blog-hero__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

/* ——— Topics ——— */
.ccc-blog-topics {
  width: 100%;
  padding: clamp(2rem, 4vw, 2.75rem) 0;
  background: #fff;
  border-bottom: 1px solid rgba(11, 29, 57, 0.06);
}

.ccc-blog-topics__title {
  margin: 0 0 1.25rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ccc-navy);
}

.ccc-blog-topics__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.ccc-topic-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--ccc-border);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  background: #fff;
  color: var(--ccc-navy);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(6, 38, 74, 0.06);
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ccc-topic-chip:hover {
  border-color: rgba(28, 101, 216, 0.32);
  color: var(--ccc-blue-bright);
  transform: translateY(-2px);
}

.ccc-blog-topics__note {
  margin: 1rem 0 0;
  font-size: 0.8125rem;
  color: var(--ccc-muted);
}

/* ——— Featured guide ——— */
.ccc-featured-guide {
  width: 100%;
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  background: #fbfdff;
}

.ccc-featured-guide__heading {
  margin: 0 0 1.5rem;
  font-family: var(--ccc-heading-font);
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  color: var(--ccc-navy);
}

.ccc-featured-guide__card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: center;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  background: #fff;
  border: 1px solid rgba(28, 101, 216, 0.14);
  border-radius: 24px;
  box-shadow: 0 18px 45px rgba(6, 38, 74, 0.08);
}

.ccc-featured-guide__media {
  display: block;
  border-radius: 18px;
  overflow: hidden;
}

.ccc-featured-guide__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.ccc-featured-guide__placeholder {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #e8f4fc, #d4e8f7);
}

.ccc-featured-guide__meta {
  margin: 0 0 0.65rem;
  color: var(--ccc-blue-bright);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.ccc-featured-guide__title {
  margin: 0 0 0.85rem;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  line-height: 1.2;
}

.ccc-featured-guide__title a {
  color: var(--ccc-navy);
  text-decoration: none;
}

.ccc-featured-guide__title a:hover {
  color: var(--ccc-blue-bright);
}

.ccc-featured-guide__excerpt {
  margin: 0 0 1.25rem;
  color: var(--ccc-muted);
  line-height: 1.65;
}

/* ——— Post grid ——— */
.ccc-blog-grid-section {
  width: 100%;
  padding: clamp(2rem, 4vw, 3rem) 0 clamp(3rem, 5vw, 4.5rem);
  background: linear-gradient(180deg, #fbfdff 0%, #f3f9fd 100%);
}

.ccc-blog-grid-section__title {
  margin: 0 0 clamp(1.75rem, 3vw, 2.5rem);
  font-family: var(--ccc-heading-font);
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  color: var(--ccc-navy);
}

.ccc-blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.ccc-blog-grid > [class*="col-"] {
  min-width: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
}

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

@media (min-width: 992px) {
  .ccc-blog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.75rem 1.5rem;
  }
}

/* ——— Blog card ——— */
.ccc-blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid rgba(28, 101, 216, 0.14);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(6, 38, 74, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.ccc-blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(6, 38, 74, 0.12);
}

.ccc-blog-card__media {
  display: block;
  overflow: hidden;
}

.ccc-blog-card__image,
.ccc-blog-card__media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  transition: transform 0.28s ease;
}

.ccc-blog-card__placeholder {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #edf6fc, #dbeaf5);
}

.ccc-blog-card:hover .ccc-blog-card__media img {
  transform: scale(1.035);
}

.ccc-blog-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.5rem;
}

.ccc-blog-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.7rem;
  color: var(--ccc-blue-bright);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ccc-blog-card__read {
  color: var(--ccc-muted);
}

.ccc-blog-card__title {
  margin: 0 0 0.8rem;
  font-size: 1.2rem;
  line-height: 1.25;
}

.ccc-blog-card__title a {
  color: var(--ccc-navy);
  text-decoration: none;
}

.ccc-blog-card__title a:hover {
  color: var(--ccc-blue-bright);
}

.ccc-blog-card__excerpt {
  margin: 0 0 0.85rem;
  color: var(--ccc-muted);
  line-height: 1.6;
  font-size: 0.9375rem;
  flex-grow: 1;
}

.ccc-blog-card__date {
  margin-bottom: 1rem;
  font-size: 0.8125rem;
  color: var(--ccc-muted);
}

.ccc-blog-card__link {
  margin-top: auto;
  color: var(--ccc-navy);
  font-weight: 800;
  font-size: 0.875rem;
  text-decoration: none;
}

.ccc-blog-card__link:hover {
  color: var(--ccc-blue-bright);
  text-decoration: underline;
}

.ccc-blog-empty {
  padding: 2rem;
  background: #fff;
  border: 1px solid var(--ccc-border);
  border-radius: 18px;
  text-align: center;
}

.ccc-blog-empty p {
  margin: 0 0 1.25rem;
  color: var(--ccc-muted);
  line-height: 1.6;
}

.ccc-blog-empty__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* ——— Local education ——— */
.ccc-local-education {
  width: 100%;
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  background: #fff;
  border-top: 1px solid rgba(11, 29, 57, 0.06);
}

.ccc-local-education__inner {
  max-width: 48rem;
}

.ccc-local-education__title {
  margin: 0 0 1.25rem;
  font-family: var(--ccc-heading-font);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--ccc-navy);
}

.ccc-local-education__copy p {
  margin: 0 0 1rem;
  color: var(--ccc-charcoal);
  line-height: 1.7;
}

.ccc-local-education__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
}

.ccc-local-education__links a {
  font-weight: 700;
  color: var(--ccc-blue-bright);
  text-decoration: none;
}

.ccc-local-education__links a:hover {
  text-decoration: underline;
}

/* ——— CTA strip ——— */
.ccc-blog-cta-strip {
  width: 100%;
  padding: clamp(2.5rem, 5vw, 3.5rem) 0;
  background: var(--ccc-navy-deep);
  color: rgba(255, 255, 255, 0.9);
}

.ccc-blog-cta-strip__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2rem;
}

.ccc-blog-cta-strip__title {
  margin: 0 0 0.5rem;
  font-family: var(--ccc-heading-font);
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  color: #fff;
}

.ccc-blog-cta-strip__text {
  margin: 0;
  max-width: 40rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
}

.ccc-blog-cta-strip__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.ccc-blog-cta-strip .ccc-btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.ccc-blog-cta-strip .ccc-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

@media (max-width: 991.98px) {
  .ccc-blog-hero__layout,
  .ccc-featured-guide__card {
    grid-template-columns: 1fr;
  }

  .ccc-blog-hero__title {
    max-width: none;
  }
}

@media (max-width: 575.98px) {
  .ccc-blog-hero__actions,
  .ccc-blog-cta-strip__actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .ccc-blog-hero__actions .ccc-btn,
  .ccc-blog-cta-strip__actions .ccc-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ccc-blog-card,
  .ccc-topic-chip,
  .ccc-blog-card__media img {
    transition: none;
  }

  .ccc-blog-card:hover {
    transform: none;
  }
}
