/*
 * ============================================================
 * EVENTS CALENDAR  —  events.css
 * ============================================================
 * Styles for the upcoming events section on the front page.
 *
 * To change card appearance        →  .event-card
 * To change the date badge colours →  .event-date-badge
 * To change type pill colours      →  .event-type-* .event-type-tag
 * ============================================================
 */

.events-section {
  background: var(--rg-bg);
  padding: 64px 0 72px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.events-section .wrap {
  max-width: var(--rg-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Section heading */
.events-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 36px;
  gap: 16px;
}

.events-eyebrow {
  display: block;
  font-family: var(--rg-font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rg-green-lime);
  margin-bottom: 8px;
}

.events-title {
  font-family: var(--rg-font-display);
  font-size: clamp(26px, 4vw, 42px);
  color: var(--rg-charcoal);
  margin: 0;
  line-height: 1.1;
}

/* Card grid */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

/* Individual event card */
.event-card {
  background: var(--rg-card);
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--rg-radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    box-shadow 0.3s ease,
    transform  0.3s ease;
}

.event-card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.09);
  transform: translateY(-2px);
}

/* Event photo (or gradient fallback) */
.event-img-wrap {
  height: 160px;
  overflow: hidden;
}

.event-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.event-card:hover .event-img-wrap img { transform: scale(1.06); }

.event-img-fallback {
  width: 100%;
  height: 100%;
}

/* Row below the photo: date badge + body, side by side */
.event-card-row {
  padding: 20px 22px 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

/* Date badge (month / day block) */
.event-date-badge {
  flex-shrink: 0;
  width: 52px;
  background: var(--rg-impact-bg);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 7px 4px 8px;
  gap: 1px;
}

.event-month {
  font-family: var(--rg-font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rg-gold);
  line-height: 1;
}

.event-day {
  font-family: var(--rg-font-display);
  font-size: 26px;
  color: #ffffff;
  line-height: 1.05;
}

/* Event body (right of date badge) */
.event-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

/* Type pill */
.event-type-tag {
  display: inline-block;
  font-family: var(--rg-font-body);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #fff;
  background: var(--rg-green-lime);
  border-radius: 99px;
  padding: 2px 9px;
  align-self: flex-start;
}

/* Type-specific pill colours */
.event-type-planting   .event-type-tag { background: var(--rg-green-dark); }
.event-type-workshop   .event-type-tag { background: var(--rg-gold); color: #1a1a16; }
.event-type-community  .event-type-tag { background: #3a7a6a; }
.event-type-greencorps .event-type-tag { background: var(--rg-green-lime); }
.event-type-other      .event-type-tag { background: var(--rg-muted); }

/* Event title */
.event-name {
  font-family: var(--rg-font-display);
  font-size: 17px;
  font-weight: 400;
  color: var(--rg-charcoal);
  line-height: 1.3;
  margin: 2px 0 0;
}

/* Time and location lines */
.event-detail {
  display: block;
  font-family: var(--rg-font-body);
  font-size: 12px;
  color: var(--rg-muted);
  line-height: 1.4;
}

/* Optional short description */
.event-desc {
  font-family: var(--rg-font-body);
  font-size: 12px;
  color: var(--rg-body);
  line-height: 1.5;
  margin: 3px 0 0;
}

/* Sign-up / learn more button */
.event-cta {
  font-size: 11px !important;
  padding: 7px 14px !important;
  margin-top: 10px;
  align-self: flex-start;
}

/* Empty state */
.events-empty {
  padding: 52px 0;
  text-align: center;
}

.events-empty p {
  font-size: 15px;
  color: var(--rg-muted);
  margin-bottom: 6px;
}

.events-admin-tip {
  font-size: 13px !important;
  background: #f0f6e8;
  border: 1px solid #c3dea0;
  display: inline-block;
  padding: 8px 16px;
  border-radius: 4px;
  margin-top: 8px;
}

.events-admin-tip a {
  color: var(--rg-green-dark);
  font-weight: 500;
}

/* Blog tile grid (shared here for convenience) */
.blog-listing {
  background: var(--rg-bg);
  padding: 44px 0 64px;
}

.blog-listing .wrap {
  max-width: var(--rg-max);
  margin: 0 auto;
  padding: 0 24px;
}

.blog-tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.blog-tile {
  background: var(--rg-card);
  border: 0.5px solid rgba(0, 0, 0, 0.07);
  border-radius: var(--rg-radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.blog-tile:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.10);
  transform: translateY(-3px);
}

.blog-tile-link { display: block; }

.blog-tile-img {
  height: 200px;
  background-size: 100%;
  background-position: center;
  background-repeat: no-repeat;
  transition: background-size 0.55s ease;
}

.blog-tile:hover .blog-tile-img { background-size: 110%; }

.blog-tile-body {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.blog-tile-title {
  font-family: var(--rg-font-display);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--rg-charcoal);
  margin: 0;
}

.blog-tile-title a { color: inherit; text-decoration: none; }
.blog-tile-title a:hover { color: var(--rg-green-dark); }

.blog-tile-exc {
  font-size: 13px;
  color: var(--rg-body);
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-tile-meta {
  font-size: 11px;
  color: var(--rg-muted);
  margin-top: auto;
  padding-top: 4px;
}

.blog-empty {
  color: var(--rg-muted);
  font-size: 15px;
  padding: 48px 0;
  text-align: center;
}

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

@media (max-width: 580px) {
  .blog-tile-grid { grid-template-columns: 1fr; }
  .blog-tile-img  { height: 180px; }
}


/* ── MISSION STRIP ──────────────────────────────────────────── */
/*
 * Compact dark-green band between hero and events.
 * Edit text in template-parts/section-mission.php
 * Edit stats in functions.php → regreen_impact_stats()
 */
.mission-strip {
  background: var(--rg-impact-bg);
  padding: 48px 0;
  border-bottom: 3px solid var(--rg-green-lime);
}

.mission-strip .wrap {
  max-width: var(--rg-max);
  margin: 0 auto;
  padding: 0 24px;
}

.mission-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 52px;
  align-items: center;
}

/* Mission text column */
.mission-text {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.mission-statement {
  font-family: var(--rg-font-body);
  font-size: 16px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.80);
  margin: 0;
}

/* Buttons inside the dark strip */
.mission-ctas {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.mission-btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--rg-font-body);
  font-size: 12px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--rg-radius-btn);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  text-decoration: none;
  transition: background var(--rg-ease), border-color var(--rg-ease);
  position: relative;
  overflow: hidden;
}

.mission-btn:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.70);
  color: #fff;
}

/* Stats grid */
.mission-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 32px;
}

.mstat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mstat-num {
  font-family: var(--rg-font-display);
  font-size: clamp(24px, 3vw, 34px);
  color: #ffffff;
  line-height: 1;
}

.mstat-label {
  font-family: var(--rg-font-body);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.52);
  line-height: 1.4;
}

/* Responsive */
@media (max-width: 768px) {
  .mission-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .mission-stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }

  .mstat-num { font-size: 22px; }
}

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


/* ============================================================
 * LATEST POST SECTION  (replaces Events calendar)
 * ============================================================ */

.latest-post-section {
  background: var(--rg-bg);
  padding: 64px 0 72px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.latest-post-section .wrap {
  max-width: var(--rg-max);
  margin: 0 auto;
  padding: 0 24px;
}

.latest-post-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 12px;
}

.latest-post-eyebrow {
  font-family: var(--rg-font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rg-green-lime);
}

.latest-post-all {
  font-family: var(--rg-font-body);
  font-size: 10px;
  font-weight: 600;
  color: var(--rg-green-lime);
  text-decoration: none;
  white-space: nowrap;
}
.latest-post-all:hover { text-decoration: underline; }

/* Card: horizontal layout on desktop */
.latest-post-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--rg-card);
  border: 0.5px solid rgba(0,0,0,0.08);
  border-radius: var(--rg-radius-card);
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.latest-post-card:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.10);
  transform: translateY(-2px);
}

.latest-post-img-wrap {
  overflow: hidden;
  min-height: 320px;
}

.latest-post-img-wrap img,
.latest-post-img-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.latest-post-card:hover .latest-post-img-wrap img,
.latest-post-card:hover .latest-post-img-fallback {
  transform: scale(1.04);
}

.latest-post-body {
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
}

.latest-post-title {
  font-family: var(--rg-font-display);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 400;
  line-height: 1.25;
  color: var(--rg-charcoal);
  margin: 0;
}

.latest-post-title a {
  color: inherit;
  text-decoration: none;
}
.latest-post-title a:hover { color: var(--rg-green-dark); }

.latest-post-exc {
  font-family: var(--rg-font-body);
  font-size: 15px;
  color: var(--rg-body);
  line-height: 1.65;
  margin: 0;
}

.latest-post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.latest-post-meta {
  font-family: var(--rg-font-body);
  font-size: 11px;
  color: var(--rg-muted);
}

/* Mobile: stack vertically */
@media (max-width: 680px) {
  .latest-post-card { grid-template-columns: 1fr; }
  .latest-post-img-wrap { min-height: 220px; }
  .latest-post-body { padding: 24px 20px; }
}
