/* ===================================================
   Blog Page — blog.css
   Depends on styles.css being loaded first.
   .page-hero, .page-hero-inner, .breadcrumb are defined
   in styles.css. Only the page-specific .lead width
   lives here.
   =================================================== */

.page-hero-inner .lead {
  font-size: 1.05rem;
  color: var(--color-text-light);
  max-width: 560px;
  line-height: 1.7;
}

/* ---------------------------------------------------
   BLOG SECTION
   --------------------------------------------------- */
.blog-section {
  background: var(--color-bg);
  padding: 80px 0;
}

/* ---------------------------------------------------
   BLOG GRID
   --------------------------------------------------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

/* ---------------------------------------------------
   BLOG CARD — image background + glassmorphism
   Each .blog-card carries its photo via inline
   style="background-image:url(...)". The text sits
   inside .blog-card-body, a frosted glass panel
   layered on top so it stays readable over any photo.
   --------------------------------------------------- */
.blog-card {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: flex-end;
  border-radius: 16px;
  overflow: hidden;
  background-color: var(--color-bg-light); /* fallback while image loads / if missing */
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

/* Subtle darkening at the base of the photo so the glass
   panel always has enough contrast, whatever the image */
.blog-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.35) 100%);
  pointer-events: none;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.blog-card-img-wrap {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

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

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

/* --- Frosted glass text panel --- */
.blog-card-body {
  position: relative;
  z-index: 2;
  width: calc(100% - 32px);
  margin: 0 16px 16px;
  padding: 22px 24px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  transition: background var(--transition), transform var(--transition);
}

.blog-card:hover .blog-card-body {
  background: rgba(255, 255, 255, 0.72);
}

.blog-card-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary-dark);
  background: rgba(81, 91, 32, 0.14);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.blog-card-body h2 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: 0.01em;
  margin-bottom: 10px;
  color: var(--color-primary-dark);
}

.blog-card-body h2 a {
  color: inherit;
  transition: color var(--transition);
}

.blog-card-body h2 a:hover {
  color: var(--color-primary);
}

.blog-card-body p {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 400;
  color: #3a3f33;
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: #4a4f43;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(81, 91, 32, 0.18);
}

.blog-card-read {
  font-weight: 600;
}

/* Learn More link styled to match the glass card */
.blog-card-body > .btn-link {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--color-primary-dark);
  transition: color var(--transition), transform var(--transition);
}

.blog-card-body > .btn-link:hover {
  color: var(--color-accent);
  transform: translateX(2px);
}

/* ---------------------------------------------------
   WHATSAPP BUTTON
   (shared via main.js — kept here as blog.css
   until a shared component stylesheet exists)
   --------------------------------------------------- */
.wa-wrapper {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.wa-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: #25d366;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  transition: transform var(--transition), box-shadow var(--transition);
}

.wa-button:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(0,0,0,0.22);
}

.wa-button img {
  width: 28px;
  height: 28px;
}

.wa-message {
  background: var(--color-white);
  color: var(--color-text);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* ---------------------------------------------------
   RESPONSIVE
   --------------------------------------------------- */
@media (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .blog-section {
    padding: 48px 0;
  }

  .page-hero-inner {
    padding: 48px 24px 40px;
  }
}