/* ==========================================================
   IMPACT STORIES page template
   Loaded only on pages using page-templates/impact-stories.php
   ========================================================== */
.impact-stories { padding-top: 0; }

/* HERO */
.is-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 8rem 1.5rem 5rem;
}
.is-hero-bg { position: absolute; inset: 0; z-index: 0; }
.is-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.is-hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(77,107,58,0.55) 0%, rgba(43,31,18,0.7) 100%);
}
.is-hero-content {
  position: relative; z-index: 1;
  max-width: 56rem;
  text-align: center;
  color: #fff;
}
.is-hero-content .eyebrow {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
}
.is-hero-content .eyebrow::before { background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,0.18); }
.is-hero-content h1 {
  color: #fff;
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  margin: 1rem 0 1.5rem;
  line-height: 1.1;
}
.is-hero-lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: rgba(255,255,255,0.92);
  max-width: 42rem;
  margin: 0 auto;
  line-height: 1.6;
}

.is-intro { padding: 4rem 1.5rem 0; }

/* GRID */
.is-grid-section { padding: 5rem 1.5rem; }
.is-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}
@media (min-width: 640px) { .is-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .is-grid { grid-template-columns: repeat(4, 1fr); } }

.is-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.is-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 50px -20px rgba(0,0,0,0.2);
}
.is-card-media {
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--muted);
}
.is-card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.is-card:hover .is-card-media img { transform: scale(1.06); }

.is-card-body {
  padding: 1.25rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.is-card-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  line-height: 1.2;
}
.is-card-role {
  font-size: 0.82rem;
  color: var(--muted-foreground);
  margin: 0 0 1.25rem;
  line-height: 1.4;
  flex: 1;
}
.is-read-btn {
  align-self: flex-start;
  font-size: 0.85rem;
  padding: 0.55rem 1.1rem;
}
.is-read-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* MODAL */
.is-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(43, 31, 18, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.is-modal[hidden] { display: none !important; }
.is-modal.is-open { opacity: 1; }
.is-modal-content {
  background: var(--card);
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  position: relative;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.4);
  animation: isPop 0.3s ease;
}
@media (min-width: 768px) {
  .is-modal-content { grid-template-columns: 280px 1fr; max-width: 880px; }
}
@keyframes isPop {
  from { transform: translateY(20px) scale(0.97); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.is-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  color: var(--foreground);
  font-size: 1.5rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: background 0.2s, transform 0.2s;
}
.is-modal-close:hover { background: #fff; transform: rotate(90deg); }

.is-modal-media {
  background: var(--muted);
  min-height: 220px;
  max-height: 320px;
  overflow: hidden;
}
@media (min-width: 768px) { .is-modal-media { max-height: none; } }
.is-modal-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.is-modal-body {
  padding: 2rem 2rem 2.25rem;
  overflow-y: auto;
  max-height: 70vh;
}
.is-modal-body h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  margin: 0 0 0.4rem;
  line-height: 1.2;
}
.is-modal-role {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin: 0 0 1.5rem;
  text-transform: uppercase;
}
.is-modal-text p {
  color: var(--muted-foreground);
  font-size: 0.98rem;
  line-height: 1.75;
  margin: 0 0 1rem;
}
.is-modal-text p:last-child { margin-bottom: 0; }

body.is-modal-open { overflow: hidden; }
