

/* =========================================================
POSTS INDEX PAGE
========================================================= */

.posts-page {
  text-align: left;
}

.posts-page .container h2 {
  display: block;
  justify-content: initial;
}

.posts-hero .page-hero-bg {
  object-position: center;
}

.posts-intro {
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.9fr);
  align-items: start;
}

.posts-intro-copy {
  max-width: 680px;
}

.posts-intro-copy p:not(.section-kicker) {
  margin: 16px 0 0;
  color: rgba(32, 40, 50, 0.76);
  font-size: 16px;
  line-height: 1.7;
}

.posts-tools {
  padding: clamp(22px, 4vw, 34px);
}

.posts-search-label {
  display: block;
  margin: 0 0 10px;
  color: var(--colour-dark, #202832);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.posts-search-control .site-icon {
  left: 15px;
}

.posts-search-input {
  min-height: 52px;
  padding: 0 16px 0 46px;
}

.posts-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.posts-filter-buttons .filter-btn.active {
  background: var(--colour-primary, #00aeef);
  color: var(--colour-white, #ffffff);
}

.posts-index-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2.5vw, 28px);
}

.posts-index-card {
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.posts-index-card[hidden] {
  display: none;
}

.posts-index-card a {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.posts-index-media {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--colour-dark, #202832);
}

.posts-index-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.posts-index-card:hover .posts-index-media img,
.posts-index-card:focus-within .posts-index-media img {
  transform: scale(1.04);
}

.posts-index-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: clamp(18px, 2.5vw, 26px);
}

.posts-index-body .blog-date {
  color: var(--colour-primary, #00aeef);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
}

.posts-index-body h3 {
  margin: 0;
  color: var(--colour-dark, #202832);
  font-size: clamp(19px, 2vw, 24px);
  font-weight: 850;
  line-height: 1.18;
}

.posts-excerpt {
  color: rgba(32, 40, 50, 0.72);
  font-size: 14.5px;
  line-height: 1.62;
}

.posts-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.posts-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(0, 174, 239, 0.18);
  border-radius: 999px;
  background: rgba(0, 174, 239, 0.08);
  color: var(--colour-dark, #202832);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
}

.posts-index-body .read-more {
  width: fit-content;
  margin-top: 2px;
}

.posts-empty {
  margin: clamp(18px, 3vw, 28px) auto 0;
  padding: 18px 22px;
  max-width: 520px;
  color: rgba(32, 40, 50, 0.72);
  font-weight: 700;
  text-align: center;
}

.posts-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(26px, 4vw, 40px);
  background:
    linear-gradient(135deg, rgba(32, 40, 50, 0.96), rgba(32, 40, 50, 0.86)),
    url("../../images/exterior-cleaning-services.webp") center / cover;
}

.posts-cta > div {
  max-width: 740px;
}

.posts-cta .section-kicker {
  color: var(--colour-primary, #00aeef);
}

.posts-cta .section-title {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .posts-intro {
    grid-template-columns: 1fr;
  }

  .posts-intro-copy,
  .posts-intro-copy .section-kicker,
  .posts-intro-copy .section-title {
    text-align: center;
  }
}

@media (max-width: 760px) {
  .posts-index-grid {
    grid-template-columns: 1fr;
  }

  .posts-cta {
    align-items: stretch;
    flex-direction: column;
    text-align: center;
  }

  .posts-cta .btn,
  .posts-index-body .read-more {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .posts-filter-buttons .filter-btn {
    width: 100%;
  }
}


/* ---------- Scoped styles for Latest Posts ---------- */
.latest-posts{
  --brand:#00aeef;
  --brand-dark:#008fc5;
  --ink:#1f2a35;
  --muted:#7b8793;
  --text:#51606d;
  --card-bg:rgba(255,255,255,0.96);
  --card-br:rgba(25,35,45,0.08);
  --chip-bg:#eef4f8;
  --chip-text:#617487;
  --shadow:0 12px 28px rgba(25,35,45,0.08);
}

.latest-posts .posts-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
  margin:0 0 20px;
}

.latest-posts .post-card{
  position: relative;
  display:grid;
  grid-template-columns:150px 1fr;
  align-items:stretch;
  background:
    linear-gradient(90deg, rgba(0, 174, 239, 0.08), transparent 42%),
    var(--card-bg);
  border:1px solid var(--card-br);
  border-left: 5px solid var(--brand);
  border-radius:12px;
  overflow:hidden;
  box-shadow:var(--shadow);
  transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.latest-posts .post-card::after{
  content:"";
  position:absolute;
  top:50%;
  right:18px;
  width:10px;
  height:10px;
  border-top:2px solid rgba(0,174,239,.72);
  border-right:2px solid rgba(0,174,239,.72);
  transform:translateY(-50%) rotate(45deg);
  opacity:.72;
  pointer-events:none;
}

.latest-posts .post-card:hover{
  transform:translateY(-3px);
  box-shadow:0 18px 34px rgba(25,35,45,0.14);
  border-color:rgba(0,174,239,0.16);
}

.latest-posts .post-image{
  position:relative;
  display:block;
  overflow:hidden;
  min-height:128px;
  background:#dbe5ee;
}

.latest-posts .post-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition:transform .35s ease;
}

.latest-posts .post-card:hover .post-image img{
  transform:scale(1.05);
}

.latest-posts .badge{
  position:absolute;
  top:12px;
  left:12px;
  z-index:2;
  padding:6px 10px;
  border-radius:999px;
  background:linear-gradient(135deg,var(--brand),#54d2ff);
  color:#fff;
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
  box-shadow:0 8px 18px rgba(0,174,239,.22);
}

.latest-posts .post-body{
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:15px 46px 15px 18px;
}

.latest-posts .meta{
  margin:0 0 7px;
  color:var(--brand-dark);
  font-size:.72rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.05em;
}

.latest-posts .post-title{
  margin:0 0 8px;
  font-size:1rem;
  line-height:1.22;
}

.latest-posts .post-title a{
  color:var(--ink);
  text-decoration:none;
  transition:color .18s ease;
}

.latest-posts .post-title a:hover{
  color:var(--brand);
}

.latest-posts .excerpt{
  margin:0 0 12px;
  color:var(--text);
  font-size:.84rem;
  line-height:1.5;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.latest-posts .post-footer-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:auto;
}

.latest-posts .tags-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.latest-posts .tag{
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(32, 40, 50, 0.06);
    color: rgba(32, 40, 50, 0.58);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

.latest-posts .actions{
  flex-shrink:0;
}

.latest-posts .read-more-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: #00aeef;
    color: #fff;
    font-size:.68rem;
    font-weight:700;
    letter-spacing:.04em;
    text-transform:uppercase;
    text-decoration:none;
    white-space:nowrap;
    transition:transform .18s ease, box-shadow .18s ease, background .18s ease;
}


.latest-posts .read-more-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 26px rgba(0,174,239,0.24);
  background:linear-gradient(135deg,var(--brand-dark),var(--brand));
}


/* Skeletons */
.latest-posts .skeleton{
  pointer-events:none;
}

.latest-posts .skeleton-box{
  width:100%;
  height:100%;
  min-height:128px;
  background:linear-gradient(90deg,#e8eef4,#f6f9fc,#e8eef4);
  background-size:200% 100%;
  animation:shimmer 1.2s linear infinite;
}

.latest-posts .skeleton .post-body{
  padding:16px 18px;
}

.latest-posts .skeleton-line{
  height:12px;
  margin-top:8px;
  border-radius:999px;
  background:linear-gradient(90deg,#e8eef4,#f6f9fc,#e8eef4);
  background-size:200% 100%;
  animation:shimmer 1.2s linear infinite;
}

.latest-posts .skeleton-line.mt-10{
  margin-top:12px;
}

.latest-posts .w-92{width:92%;}
.latest-posts .w-85{width:85%;}
.latest-posts .w-68{width:68%;}
.latest-posts .w-22{width:22%;}

.latest-posts .skeleton-tags{
  display:flex;
  gap:8px;
  margin:14px 0 14px;
}

.latest-posts .skeleton-pill{
  width:70px;
  height:28px;
  border-radius:999px;
  background:linear-gradient(90deg,#e8eef4,#f6f9fc,#e8eef4);
  background-size:200% 100%;
  animation:shimmer 1.2s linear infinite;
}

.latest-posts .skeleton-btn{
  width:130px;
  height:38px;
  border-radius:999px;
  background:linear-gradient(90deg,#dbf1fb,#edf8fe,#dbf1fb);
  background-size:200% 100%;
  animation:shimmer 1.2s linear infinite;
}

@keyframes shimmer{
  0%{background-position:200% 0;}
  100%{background-position:-200% 0;}
}

/* Tablet */
@media (max-width: 820px){
  .latest-posts .post-card{
    grid-template-columns:140px 1fr;
  }

  .latest-posts .post-title{
    font-size:1.15rem;
  }

  .latest-posts .post-footer-row{
    flex-direction:column;
    align-items:flex-start;
  }
}

/* Mobile */
@media (max-width: 640px){
  .latest-posts .posts-grid{
    gap:16px;
  }

  .latest-posts .post-card{
    grid-template-columns:1fr;
  }

  .latest-posts .post-card::after{
    top:auto;
    right:18px;
    bottom:20px;
  }

  .latest-posts .post-image{
    min-height:170px;
  }

  .latest-posts .post-body{
    padding:16px 44px 16px 16px;
  }

  .latest-posts .post-title{
    font-size:1rem;
  }

  .latest-posts .excerpt{
    font-size:.86rem;
    -webkit-line-clamp:3;
  }

  .latest-posts .post-footer-row{
    flex-direction:column;
    align-items:flex-start;
    gap:12px;
  }

  .latest-posts .actions,
  .latest-posts .read-more-btn{
    width:100%;
  }

  .latest-posts .skeleton-box{
    min-height:170px;
  }

  .latest-posts .skeleton .post-body{
    padding:16px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .latest-posts .post-card,
  .latest-posts .post-image img,
  .latest-posts .read-more-btn,
  .latest-posts .read-more-btn i{
    transition:none !important;
  }

  .latest-posts .skeleton-box,
  .latest-posts .skeleton-line,
  .latest-posts .skeleton-pill,
  .latest-posts .skeleton-btn{
    animation:none !important;
  }
}
