/* ==========================================================================
   SEIB CONSTRUCTION — BLOG PAGE
   Styles unique to blog.html only.
   Shared tokens → global.css | Shared components → components.css
   RULE: Never hardcode brand colors — always use CSS custom properties.
   ========================================================================== */


/* --------------------------------------------------------------------------
   SCROLL REVEAL
   -------------------------------------------------------------------------- */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-animate].is-visible {
  opacity: 1;
  transform: none;
}
.delay-1 { transition-delay: 0.08s; }
.delay-2 { transition-delay: 0.16s; }
.delay-3 { transition-delay: 0.24s; }
.delay-4 { transition-delay: 0.32s; }
.delay-5 { transition-delay: 0.40s; }
.delay-6 { transition-delay: 0.48s; }
.delay-7 { transition-delay: 0.56s; }
.delay-8 { transition-delay: 0.64s; }

.section-eyebrow--light { color: var(--copper-light); }


/* --------------------------------------------------------------------------
   HERO ENTRANCE ANIMATION
   -------------------------------------------------------------------------- */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}
.hero-animate        { animation: heroFadeUp 0.7s ease forwards; }
.hero-animate--delay { animation-delay: 0.2s; opacity: 0; }


/* --------------------------------------------------------------------------
   §01 HERO + FEATURED POST
   -------------------------------------------------------------------------- */
.blog-hero {
  background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 55%, var(--navy-mid) 100%);
  padding-top: 72px;
  position: relative;
  overflow: hidden;
}

.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 60%, var(--copper-dim), transparent 60%);
  pointer-events: none;
}

.blog-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
  padding-block: clamp(56px, 8vw, 88px);
}

/* Left — headline + category nav */
.blog-hero-content .section-eyebrow {
  color: var(--copper-light);
}

.blog-hero-headline {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  color: var(--white);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-top: var(--space-3);
  margin-bottom: var(--space-5);
}

.blog-hero-sub {
  color: rgba(255, 255, 255, 0.65);
  font-size: clamp(14px, 1.2vw, 17px);
  line-height: 1.8;
  margin-bottom: var(--space-7);
}

/* Category nav pills in hero */
.blog-cat-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.blog-cat-btn {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 7px 16px;
  cursor: pointer;
  transition: background var(--transition-base), color var(--transition-base), border-color var(--transition-base);
}

.blog-cat-btn:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
}

.blog-cat-btn.active {
  background-color: var(--copper);
  color: var(--white);
  border-color: var(--copper);
}

/* Right — featured post card */
.blog-featured-card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.30);
  text-decoration: none;
  display: block;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.blog-featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 32px 72px rgba(0, 0, 0, 0.40);
}

.blog-featured-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
}

.blog-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.blog-featured-card:hover .blog-featured-image img {
  transform: scale(1.04);
}

.blog-featured-label {
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--white);
  background-color: var(--copper);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.blog-featured-body {
  padding: var(--space-5) var(--space-6);
}

.blog-featured-cat {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--copper);
  display: block;
  margin-bottom: var(--space-3);
}

.blog-featured-title {
  font-family: var(--font-display);
  font-size: clamp(16px, 1.5vw, 20px);
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: var(--space-3);
}

.blog-featured-excerpt {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--space-4);
}

.blog-featured-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.blog-featured-date {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

.blog-featured-read-more {
  font-size: 12px;
  font-weight: 600;
  color: var(--copper);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition-base);
}

.blog-featured-card:hover .blog-featured-read-more {
  gap: 10px;
}

@media (max-width: 860px) {
  .blog-hero-inner {
    grid-template-columns: 1fr;
  }
}


/* --------------------------------------------------------------------------
   §02 MAIN CONTENT AREA — POSTS + SIDEBAR
   -------------------------------------------------------------------------- */
.blog-content-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: clamp(32px, 5vw, 56px);
  /* stretch (not start) so the sidebar column fills the full row height,
     giving its sticky inner wrapper room to travel without overflowing the footer */
  align-items: stretch;
  position: relative;
}

/* ----- Post Grid ----- */
.blog-main { min-width: 0; }

.blog-filter-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-7);
}

.blog-filter-btn {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mid);
  background-color: var(--white);
  border: 1px solid var(--cream);
  border-radius: 999px;
  padding: 7px 18px;
  cursor: pointer;
  transition: background-color var(--transition-base), color var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.blog-filter-btn:hover {
  border-color: var(--copper);
  color: var(--copper);
}

.blog-filter-btn.active {
  background-color: var(--navy);
  color: var(--white);
  border-color: var(--navy);
  box-shadow: var(--shadow-sm);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
}

.blog-card {
  background-color: var(--white);
  border: 1px solid var(--cream);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(184, 115, 51, 0.30);
}

.blog-card.hidden {
  display: none;
}

.blog-card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.04);
}

.blog-card-body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-cat {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--copper);
  background-color: var(--copper-dim);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: var(--space-3);
  align-self: flex-start;
}

.blog-card-title {
  font-family: var(--font-display);
  font-size: clamp(15px, 1.3vw, 18px);
  color: var(--navy);
  line-height: 1.35;
  margin-bottom: var(--space-3);
  flex: 1;
}

.blog-card-excerpt {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--space-4);
}

.blog-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: auto;
}

.blog-card-date {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 5px;
}

.blog-card-readtime {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Pagination */
.blog-pagination {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-8);
}

.blog-page-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--cream);
  background-color: var(--white);
  color: var(--text-mid);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--transition-base), color var(--transition-base), border-color var(--transition-base);
}

.blog-page-btn:hover {
  border-color: var(--copper);
  color: var(--copper);
}

.blog-page-btn.active {
  background-color: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.blog-page-btn--arrow {
  font-size: 11px;
  color: var(--text-light);
}

@media (max-width: 600px) {
  .blog-grid { grid-template-columns: 1fr; }
}


/* ----- Sidebar ----- */
/* Grid item — stretches to the full row height. The inner wrapper does the
   sticking, so it can never overflow the container into the footer. */
.blog-sidebar {
  min-width: 0;
}

.blog-sidebar-inner {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

/* CTA widget */
.blog-sidebar-cta {
  background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 100%);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-6);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.blog-sidebar-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 100%, var(--copper-dim), transparent 65%);
  pointer-events: none;
}

.blog-sidebar-cta-content {
  position: relative;
  z-index: 1;
}

.blog-sidebar-cta-eyebrow {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--copper-light);
  display: block;
  margin-bottom: var(--space-3);
}

.blog-sidebar-cta-headline {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--white);
  line-height: 1.3;
  margin-bottom: var(--space-3);
}

.blog-sidebar-cta-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.60);
  line-height: 1.6;
  margin-bottom: var(--space-5);
}

.blog-sidebar-phone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--copper-light);
  text-decoration: none;
  margin-top: var(--space-4);
  transition: color var(--transition-base);
}

.blog-sidebar-phone:hover {
  color: var(--white);
}

/* Services widget */
.blog-sidebar-widget {
  background-color: var(--white);
  border: 1px solid var(--cream);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  box-shadow: var(--shadow-sm);
}

.blog-sidebar-widget-title {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--cream);
}

.blog-sidebar-service-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-sidebar-service-list li a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--off-white);
  transition: color var(--transition-base);
}

.blog-sidebar-service-list li:last-child a {
  border-bottom: none;
}

.blog-sidebar-service-list li a:hover {
  color: var(--copper);
}

.blog-sidebar-service-list li a i {
  width: 18px;
  font-size: 13px;
  color: var(--copper);
  flex-shrink: 0;
}

/* Stats widget */
.blog-sidebar-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

/* When an odd number of stats renders (e.g. review count hidden), let the last
   one span the full width so there's no lonely half-empty row. */
.blog-sidebar-stat:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.blog-sidebar-stat {
  background-color: var(--off-white);
  border: 1px solid var(--cream);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-3);
  text-align: center;
}

.blog-sidebar-stat-num {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--navy);
  display: block;
  line-height: 1;
  margin-bottom: 4px;
}

.blog-sidebar-stat-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-light);
  line-height: 1.4;
}

@media (max-width: 960px) {
  .blog-content-wrap {
    grid-template-columns: 1fr;
  }
  .blog-sidebar-inner {
    position: static;
  }
  .blog-sidebar-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 560px) {
  .blog-sidebar-stats { grid-template-columns: repeat(2, 1fr); }
}
