/* ============================================================
   FOURWAYS PLUMBER — BLOG PAGE STYLESHEET
   Loaded on index.php (blog listing) and archive pages.
   Depends on: main.css
============================================================ */

/* ─── BLOG HERO ──────────────────────────────────────────── */
.blog-hero {
  background: linear-gradient(135deg, var(--charcoal) 0%, #2a1010 100%);
  padding-block: 3.5rem 3rem;
  position: relative;
  overflow: hidden;
}
.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 40%, rgba(227,27,35,0.13) 0%, transparent 60%),
    repeating-linear-gradient(45deg,
      rgba(255,255,255,0.012) 0px, rgba(255,255,255,0.012) 1px,
      transparent 1px, transparent 40px);
}
.blog-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--red);
}
.blog-hero .container { position: relative; z-index: 1; }

.blog-hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(227,27,35,0.15);
  border: 1px solid rgba(227,27,35,0.35);
  color: #ff9999;
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: var(--r-pill);
  margin-bottom: 0.85rem;
}
.blog-hero__title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 0.75rem;
}
.blog-hero__title span { color: var(--red); }
.blog-hero__sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.65);
  max-width: 560px;
  line-height: 1.75;
}

/* ─── TIPS SECTION ───────────────────────────────────────── */
.tips-section {
  background: var(--off-white);
  padding-block: 4.5rem;
}

.tips-section-header {
  text-align: center;
  margin-bottom: 2.75rem;
}
.tips-section-header .section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--red);
  background: rgba(227,27,35,0.09);
  border: 1px solid rgba(227,27,35,0.2);
  padding: 0.35rem 0.85rem;
  border-radius: var(--r-pill);
  margin-bottom: 0.85rem;
}
.tips-section-header h2 {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 900;
  color: var(--charcoal);
  margin-bottom: 0.6rem;
}
.tips-section-header p {
  font-size: 0.97rem;
  color: var(--text-light);
  max-width: 560px;
  margin-inline: auto;
  line-height: 1.7;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.tip-card {
  background: var(--white);
  border: 1.5px solid var(--border-grey);
  border-radius: var(--r-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.tip-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(227,27,35,0.25);
}

.tip-card__header {
  padding: 1.5rem 1.5rem 1.1rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.tip-card__icon {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.tip-card:hover .tip-card__icon { transform: scale(1.08); }

.tip-card__icon--red    { background: var(--red-bg); color: var(--red); }
.tip-card__icon--dark   { background: var(--light-grey); color: var(--charcoal); }
.tip-card__icon--green  { background: #f0fdf4; color: #16a34a; }
.tip-card__icon--blue   { background: #eff6ff; color: #2563eb; }
.tip-card__icon--orange { background: #fff7ed; color: #ea580c; }
.tip-card__icon--purple { background: #faf5ff; color: #7c3aed; }

.tip-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-head);
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.2rem 0.55rem;
  border-radius: var(--r-pill);
  margin-bottom: 0.4rem;
}
.tip-card__badge--tip      { background: #f0fdf4; color: #15803d; }
.tip-card__badge--warning  { background: #fff7ed; color: #c2410c; }
.tip-card__badge--guide    { background: #eff6ff; color: #1d4ed8; }
.tip-card__badge--seasonal { background: #fdf4ff; color: #7e22ce; }

.tip-card__title {
  font-family: var(--font-head);
  font-size: 0.97rem;
  font-weight: 800;
  color: var(--charcoal);
  line-height: 1.35;
}

.tip-card__body {
  padding: 0 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.tip-card__text {
  font-size: 0.88rem;
  color: var(--text-body);
  line-height: 1.75;
}

.tip-card__points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.tip-card__points li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.84rem;
  color: var(--text-body);
  line-height: 1.5;
}
.tip-card__points li i {
  color: #16a34a;
  font-size: 0.7rem;
  margin-top: 0.25rem;
  flex-shrink: 0;
}

.tip-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  background: var(--off-white);
  border-top: 1px solid var(--border-grey);
  margin-top: auto;
}
.tip-card__category {
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mid-grey);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.tip-card__category i { color: var(--red); }

.tip-card__read {
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.tip-card__read i { font-size: 0.65rem; }

/* ─── BLOG POSTS SECTION ─────────────────────────────────── */
.blog-section {
  background: var(--white);
  padding-block: 4.5rem;
}

.blog-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.blog-section-header h2 {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--charcoal);
}
.blog-section-header h2 span { color: var(--red); }

.blog-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  align-items: start;
}

/* ─── BLOG CARDS ─────────────────────────────────────────── */
.blog-posts {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.blog-card {
  background: var(--white);
  border: 1.5px solid var(--border-grey);
  border-radius: var(--r-xl);
  overflow: hidden;
  display: grid;
  grid-template-columns: 240px 1fr;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(227,27,35,0.2);
}

.blog-card__thumb {
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, var(--charcoal) 0%, #2a1010 100%);
  min-height: 180px;
  position: relative;
}
.blog-card__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.blog-card:hover .blog-card__thumb img { transform: scale(1.04); }

/* Placeholder when no featured image */
.blog-card__thumb-placeholder {
  width: 100%; height: 100%;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: rgba(255,255,255,0.2);
}

.blog-card__body {
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.blog-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}
.blog-card__date,
.blog-card__cat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--mid-grey);
}
.blog-card__cat a { color: var(--red); font-weight: 700; }
.blog-card__cat a:hover { color: var(--red-dark); }
.blog-card__cat i, .blog-card__date i { font-size: 0.65rem; }

.blog-card__title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.35;
  margin: 0;
}
.blog-card__title a {
  color: var(--charcoal);
  text-decoration: none;
  transition: color var(--t);
}
.blog-card__title a:hover { color: var(--red); }

.blog-card__excerpt {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.7;
}
.blog-card__excerpt p { margin: 0; }

.blog-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--red);
  margin-top: auto;
  padding-top: 0.35rem;
  transition: gap 0.25s ease;
}
.blog-card__link:hover { gap: 0.65rem; }
.blog-card__link i { font-size: 0.7rem; }

/* No posts state */
.no-posts {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--off-white);
  border-radius: var(--r-xl);
  border: 1.5px dashed var(--border-grey);
}
.no-posts i { font-size: 2.5rem; color: var(--mid-grey); margin-bottom: 1rem; display: block; }
.no-posts h2 { font-family: var(--font-head); font-size: 1.25rem; color: var(--charcoal); margin-bottom: 0.5rem; }
.no-posts p { color: var(--text-light); font-size: 0.9rem; margin-bottom: 1.25rem; }

/* ─── PAGINATION ─────────────────────────────────────────── */
.blog-pagination { margin-top: 2rem; }
.blog-pagination .nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.blog-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--charcoal);
  background: var(--off-white);
  border: 1.5px solid var(--border-grey);
  text-decoration: none;
  transition: all 0.25s ease;
}
.blog-pagination .page-numbers:hover,
.blog-pagination .page-numbers.current {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}
.blog-pagination .prev, .blog-pagination .next {
  width: auto;
  padding-inline: 1rem;
  gap: 0.4rem;
}

/* ─── SIDEBAR ─────────────────────────────────────────────── */
.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: calc(var(--bar-h) + var(--header-h) + 1.5rem);
}

.sidebar-widget {
  background: var(--white);
  border: 1.5px solid var(--border-grey);
  border-radius: var(--r-xl);
  overflow: hidden;
}

.sidebar-widget__title {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--white);
  background: var(--charcoal);
  padding: 0.8rem 1.25rem;
  border-bottom: 2px solid var(--red);
}

/* Emergency CTA widget */
.sidebar-cta {
  padding: 1.5rem;
  text-align: center;
  background: var(--charcoal);
}
.sidebar-cta i {
  font-size: 1.75rem;
  color: var(--red);
  display: block;
  margin-bottom: 0.75rem;
  animation: ringing 2s ease infinite;
}
@keyframes ringing {
  0%,100%{transform:rotate(0)}10%{transform:rotate(-15deg)}20%{transform:rotate(15deg)}30%{transform:rotate(-10deg)}40%{transform:rotate(10deg)}50%{transform:rotate(0)}
}
.sidebar-cta h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 0.4rem;
}
.sidebar-cta p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 1rem;
  line-height: 1.6;
}
.sidebar-cta .btn { margin-bottom: 0.5rem; }
.sidebar-cta .btn:last-child { margin-bottom: 0; }

/* Services list widget */
.sidebar-service-list {
  padding: 0.5rem 0;
}
.sidebar-service-list li a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-head);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-body);
  border-bottom: 1px solid var(--light-grey);
  transition: color var(--t), background var(--t), padding-left var(--t);
  text-decoration: none;
}
.sidebar-service-list li:last-child a { border-bottom: none; }
.sidebar-service-list li a i { color: var(--red); width: 14px; font-size: 0.8rem; }
.sidebar-service-list li a:hover {
  color: var(--red);
  background: var(--red-bg);
  padding-left: 1.5rem;
}

/* Quick tips widget */
.sidebar-tips {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.sidebar-tip-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.65rem 0.75rem;
  background: var(--off-white);
  border-radius: var(--r-md);
  border-left: 3px solid var(--red);
  font-size: 0.82rem;
  color: var(--text-body);
  line-height: 1.5;
}
.sidebar-tip-item i { color: var(--red); font-size: 0.75rem; margin-top: 0.18rem; flex-shrink: 0; }

/* Search widget */
.sidebar-widget--search .wp-block-search,
.sidebar-widget--search form {
  padding: 1rem 1.25rem;
  display: flex;
  gap: 0.5rem;
}
.sidebar-widget--search input[type="search"] {
  flex: 1;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--border-grey);
  border-radius: var(--r-md);
  font-size: 0.88rem;
  outline: none;
  transition: border-color var(--t);
}
.sidebar-widget--search input[type="search"]:focus { border-color: var(--red); }
.sidebar-widget--search input[type="submit"],
.sidebar-widget--search button {
  padding: 0.6rem 1rem;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: var(--r-md);
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--t);
  white-space: nowrap;
}
.sidebar-widget--search input[type="submit"]:hover,
.sidebar-widget--search button:hover { background: var(--red-dark); }

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }
  .blog-sidebar { position: static; }
  .tips-grid { grid-template-columns: 1fr 1fr; }
  .blog-card { grid-template-columns: 180px 1fr; }
}

@media (max-width: 600px) {
  .tips-grid { grid-template-columns: 1fr; }
  .blog-card { grid-template-columns: 1fr; }
  .blog-card__thumb { min-height: 160px; }
  .blog-hero { padding-block: 2.5rem 2rem; }
  .tips-section, .blog-section { padding-block: 3rem; }
}
