/* ===== BLOG PAGE ===== */

/* ---------- Hero ---------- */
.bl-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 78vh;
  padding: calc(var(--header-h) + 4.5rem) 0 6rem;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

.bl-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url('images/blogpageherobg-Econ-Construction-karachi.jpg') center / cover no-repeat, var(--woody-dark);
  animation: bl-zoom 16s ease-out forwards;
  will-change: transform;
}

@keyframes bl-zoom {
  from { transform: scale(1); }
  to   { transform: scale(1.1); }
}

.bl-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, rgba(30, 20, 12, 0.88) 0%, rgba(30, 20, 12, 0.62) 52%, rgba(30, 20, 12, 0.34) 100%);
}

.bl-crumbs {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.8rem;
  padding: 0.5rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.bl-crumbs a:hover { color: #fff; text-decoration: underline; }
.bl-crumbs [aria-current] { color: #e6cdb0; }

.bl-hero-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: #e6cdb0;
  margin-bottom: 1.2rem;
}

.bl-hero-title {
  max-width: 780px;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 1.5rem;
}

.bl-hero-title span { color: #e6cdb0; }

.bl-hero-desc {
  max-width: 580px;
  font-size: 1.1rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2.4rem;
}

.bl-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.bl-btn-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.9rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 50px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.bl-btn-glass:hover {
  background: rgba(255, 255, 255, 0.26);
  border-color: #fff;
  transform: translateY(-2px);
}

.bl-scroll {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 26px;
  height: 42px;
  margin-left: -13px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
}

.bl-scroll span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  background: #fff;
  border-radius: 4px;
  animation: bl-wheel 1.8s ease-in-out infinite;
}

@keyframes bl-wheel {
  0%   { opacity: 0; transform: translateY(0); }
  30%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}

/* ---------- Section heading ---------- */
.bl-section {
  padding: 6.5rem 0 7.5rem;
  background: #F1F2ED;
  scroll-margin-top: var(--header-h);
}

.bl-head {
  max-width: 680px;
  margin: 0 auto 3rem;
  text-align: center;
}

.bl-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--woody-light);
  margin-bottom: 1rem;
}

.bl-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--black);
  margin-bottom: 1rem;
}

.bl-title span { color: var(--woody); }

.bl-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

/* ---------- Toolbar ---------- */
.bl-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem;
  margin-bottom: 1.2rem;
}

.bl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.bl-chip {
  padding: 0.7rem 1.3rem;
  font: inherit;
  font-size: 0.93rem;
  font-weight: 500;
  color: #5b554f;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(92, 64, 51, 0.16);
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.bl-chip:hover {
  color: var(--woody);
  border-color: rgba(92, 64, 51, 0.4);
}

.bl-chip.is-active {
  color: #fff;
  font-weight: 600;
  background: var(--woody);
  border-color: var(--woody);
}

.bl-chip:focus-visible,
.bl-search input:focus-visible {
  outline: 3px solid var(--woody-light);
  outline-offset: 2px;
}

.bl-search {
  position: relative;
  flex: 0 1 300px;
  color: var(--woody);
}

.bl-search svg {
  position: absolute;
  top: 50%;
  left: 1.1rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.bl-search input {
  width: 100%;
  padding: 0.8rem 1.2rem 0.8rem 2.9rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--black);
  background: #fff;
  border: 1px solid rgba(92, 64, 51, 0.16);
  border-radius: 50px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.bl-search input::placeholder { color: #8a837b; }

.bl-search input:focus {
  outline: none;
  border-color: var(--woody);
  box-shadow: 0 0 0 4px rgba(92, 64, 51, 0.12);
}

.bl-count {
  margin-bottom: 1.8rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---------- Grid ---------- */
.bl-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.2rem;
}

/* ---------- Premium card ---------- */
.bl-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(92, 64, 51, 0.1);
  border-radius: 30px;
  box-shadow: 0 16px 40px rgba(62, 42, 34, 0.08);
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.5s ease, border-color 0.4s ease;
}

.bl-card[hidden] { display: none; }

.bl-card:hover {
  transform: translateY(-10px);
  border-color: rgba(92, 64, 51, 0.28);
  box-shadow: 0 34px 70px rgba(62, 42, 34, 0.2);
}

/* Image area */
.bl-media {
  position: relative;
  aspect-ratio: 16 / 10.5;
  overflow: hidden;
  color: rgba(230, 205, 176, 0.55);
  background:
    radial-gradient(420px 220px at 80% 0%, rgba(230, 205, 176, 0.25), transparent 60%),
    linear-gradient(135deg, var(--woody) 0%, var(--woody-dark) 100%);
}

.bl-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bl-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.bl-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(30, 20, 12, 0.35) 0%, rgba(30, 20, 12, 0) 45%, rgba(30, 20, 12, 0.28) 100%);
  pointer-events: none;
}

.bl-card:hover .bl-media img { transform: scale(1.08); }

/* Glass category badge */
.bl-badge {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 2;
  padding: 0.45rem 1rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Number tile (same style as services cards) */
.bl-num {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  background: var(--woody);
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.4s ease, background 0.3s ease;
}

.bl-card:hover .bl-num {
  transform: scale(1.08) rotate(-4deg);
  background: var(--woody-dark);
}

/* Text area */
.bl-body {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.8rem 2rem 2rem;
}

.bl-meta {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
}

.bl-meta span + span::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 0.9rem;
  vertical-align: middle;
  background: var(--woody-light);
  border-radius: 50%;
}

.bl-flag {
  padding: 0.25rem 0.8rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--woody-dark);
  background: #f0e3d2;
  border-radius: 50px;
}

.bl-body h3 {
  font-family: var(--font-display);
  font-size: 1.38rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 0.9rem;
}

/* Whole card is clickable through the title link */
.bl-body h3 a {
  background: linear-gradient(var(--woody), var(--woody)) 0 100% / 0 2px no-repeat;
  transition: background-size 0.5s ease, color 0.3s ease;
}

.bl-body h3 a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
}

.bl-card:hover h3 a {
  color: var(--woody);
  background-size: 100% 2px;
}

.bl-body h3 a:focus-visible { outline: none; }

.bl-card:has(h3 a:focus-visible) {
  outline: 3px solid var(--woody-light);
  outline-offset: 4px;
}

.bl-body p {
  font-size: 0.97rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 1.6rem;
}

/* Read-more row */
.bl-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: auto;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--woody);
}

.bl-arrow {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 1.1rem;
  color: var(--woody);
  border: 1.5px solid rgba(92, 64, 51, 0.35);
  border-radius: 50%;
  transition: background 0.35s ease, color 0.35s ease, transform 0.35s ease, border-color 0.35s ease;
}

.bl-card:hover .bl-arrow {
  background: var(--woody);
  border-color: var(--woody);
  color: #fff;
  transform: translateX(6px);
}

/* ---------- Featured card (dark, wide) ---------- */
.bl-card--featured {
  grid-column: 1 / -1;
  flex-direction: row;
  color: #fff;
  background:
    radial-gradient(700px 360px at 100% 0%, rgba(139, 107, 74, 0.45), transparent 60%),
    linear-gradient(135deg, var(--woody-dark) 0%, #2a1c15 100%);
  border-color: rgba(230, 205, 176, 0.22);
  box-shadow: 0 30px 70px rgba(62, 42, 34, 0.32);
}

.bl-card--featured .bl-media {
  flex: 1.1;
  aspect-ratio: auto;
  min-height: 420px;
}

.bl-card--featured .bl-body {
  flex: 1;
  justify-content: center;
  padding: 3rem 3.2rem;
}

.bl-card--featured .bl-meta { color: rgba(255, 255, 255, 0.7); }

.bl-card--featured .bl-flag {
  color: var(--woody-dark);
  background: #e6cdb0;
}

.bl-card--featured .bl-meta span + span::before { background: #e6cdb0; }

.bl-card--featured h3 {
  font-size: clamp(1.7rem, 2.8vw, 2.25rem);
  line-height: 1.22;
  margin-bottom: 1.1rem;
}

.bl-card--featured h3 a {
  background-image: linear-gradient(#e6cdb0, #e6cdb0);
}

.bl-card--featured:hover h3 a { color: #e6cdb0; }

.bl-card--featured .bl-body p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.03rem;
  margin-bottom: 2rem;
}

.bl-card--featured .bl-cta { color: #fff; margin-top: 0; }

.bl-card--featured .bl-arrow {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

.bl-card--featured:hover .bl-arrow {
  background: #fff;
  border-color: #fff;
  color: var(--woody-dark);
}

.bl-card--featured:hover .bl-num { background: var(--woody-light); }

/* ---------- Empty state ---------- */
.bl-empty {
  max-width: 460px;
  margin: 1rem auto 0;
  padding: 3rem 2rem;
  text-align: center;
  background: #fff;
  border: 1px dashed rgba(92, 64, 51, 0.3);
  border-radius: 26px;
}

.bl-empty[hidden] { display: none; }

.bl-empty h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.bl-empty p {
  color: var(--text-muted);
  margin-bottom: 1.4rem;
}

.bl-reset {
  padding: 0.8rem 1.6rem;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--woody);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

.bl-reset:hover {
  background: var(--woody-dark);
  transform: translateY(-2px);
}

/* ---------- Reveal on scroll ---------- */
.bl-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.bl-reveal.bl-in {
  opacity: 1;
  transform: none;
}

/* Keep the hover lift working after the reveal has finished */
.bl-card.bl-reveal.bl-in {
  transition:
    opacity 0.8s ease,
    transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 0.5s ease,
    border-color 0.4s ease;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .bl-card--featured .bl-media { min-height: 360px; }
  .bl-card--featured .bl-body { padding: 2.4rem 2.2rem; }
}

@media (max-width: 900px) {
  .bl-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .bl-search { flex: none; }

  .bl-card--featured { flex-direction: column; }
  .bl-card--featured .bl-media {
    flex: none;
    min-height: 0;
    aspect-ratio: 16 / 10;
  }
  .bl-card--featured .bl-body { padding: 2rem 1.8rem 2.2rem; }
}

@media (max-width: 768px) {
  .bl-hero {
    min-height: 70vh;
    padding: calc(var(--header-h) + 3rem) 0 5rem;
  }

  .bl-section { padding: 4.8rem 0 5.5rem; }
  .bl-head { margin-bottom: 2.4rem; }
}

@media (max-width: 680px) {
  .bl-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }

  .bl-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .bl-chips::-webkit-scrollbar { display: none; }
  .bl-chip { flex-shrink: 0; }

  .bl-hero-actions { flex-direction: column; }
  .bl-hero-actions .btn,
  .bl-btn-glass { width: 100%; }

  .bl-scroll { display: none; }
  .bl-body { padding: 1.5rem 1.4rem 1.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  .bl-hero-bg { animation: none; }
  .bl-scroll span { animation: none; opacity: 1; }
  .bl-reveal { opacity: 1; transform: none; transition: none; }
  .bl-card, .bl-media img { transition: none; }
}