/* =============================================
   IMPACT STORIES — page-specific styles
   Inherits: ../css/styles.css
============================================= */

/* =============================================
   HERO
============================================= */
#is-hero {
  position: relative;
  min-height: 56vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.is-hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../wp-content/uploads/2025/07/Header-Images-Core-Pages-Desktop-4.png');
  background-size: cover;
  background-position: center center;
  z-index: 0;
}

.is-hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(176deg, rgba(0,0,0,0) 16%, rgba(0,0,0,0.85) 55%);
  z-index: 1;
}

.is-hero-inner {
  position: relative;
  z-index: 2;
  padding: 0 110px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 80px;
  padding-bottom: 80px;
}

.is-hero-inner h1 {
  font-size: 72px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
  margin: 0 0 24px;
  max-width: 480px;
}

.is-hero-inner p {
  font-size: 18px;
  font-weight: 400;
  color: #ffffff;
  line-height: 1.6;
  margin: 0;
  max-width: 460px;
}

/* =============================================
   FILTER BAR
============================================= */
#is-filter {
  padding: 48px 0 32px;
  background: #ffffff;
}

.is-filter-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 110px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}

.is-filter-btn {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  background: #ffffff;
  border: 1px solid #ffffff;
  border-radius: 100px;
  padding: 20px 36px;
  margin: 0 8px 0 0;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.is-filter-btn:first-child {
  margin-left: 0;
}

.is-filter-btn.active,
.is-filter-btn:hover {
  background: #7EBB55;
  color: #ffffff;
  border-color: #7EBB55;
}

/* =============================================
   STORY GRID
============================================= */
#is-grid {
  background: #ffffff;
  padding: 16px 0 100px;
}

.is-grid-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 110px;
}

.is-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 24px;
  margin-bottom: 80px;
}

/* =============================================
   STORY CARD — shared with newsletter card behavior
============================================= */
.is-card {
  display: block;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  min-height: 445px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.is-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.18);
}

/* Photo always fills card */
.is-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.4s ease;
  z-index: 0;
}

.is-card:hover img {
  transform: scale(1.04);
}

/* Dark gradient — bottom so title readable */
.is-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.60) 79.69%);
  z-index: 1;
  transition: opacity 0.35s ease;
}

/* Colored hover overlay — hidden by default */
.is-card-color-overlay {
  position: absolute;
  inset: 0;
  background-color: var(--hover-color, #7EBB55);
  z-index: 2;
  opacity: 0;
  transition: opacity 0.35s ease;
  border-radius: inherit;
}

.is-card:hover .is-card-color-overlay {
  opacity: 0.90;
}

/* On hover, remove the dark gradient */
.is-card:hover .is-card-overlay {
  opacity: 0;
}

/* ---- DEFAULT state: title bottom-left, arrow top-right ---- */
.is-card-default {
  position: absolute;
  inset: 0;
  z-index: 3;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: opacity 0.3s ease;
}

.is-card-default .is-card-title {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
}

.is-card-default .is-card-arrow {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 28px;
  color: #ffffff;
  font-weight: 300;
  transition: opacity 0.3s ease;
}

.is-card:hover .is-card-default {
  opacity: 0;
}

/* ---- HOVER state: title top-left, desc + "Dive in" + arrow bottom-right ---- */
.is-card-hover {
  position: absolute;
  inset: 0;
  z-index: 4;
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.is-card:hover .is-card-hover {
  opacity: 1;
}

.is-card-hover .is-card-title {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
  margin: 0 0 16px;
}

.is-card-hover .is-card-desc {
  font-size: 15px;
  font-weight: 400;
  color: #ffffff;
  line-height: 1.55;
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.is-card-hover-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
}

.is-card-dive {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
}

.is-card-arrow-bottom {
  font-size: 28px;
  color: #ffffff;
  font-weight: 300;
}

/* =============================================
   EXPLORE MORE BUTTON
============================================= */
.is-explore-wrap {
  display: flex;
  justify-content: center;
}

.is-explore-btn {
  display: inline-block;
  background: #7EBB55;
  color: #ffffff;
  font-family: 'Poppins', sans-serif;
  font-size: 20px;
  font-weight: 700;
  padding: 22px 56px;
  border-radius: 100px;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.is-explore-btn:hover {
  background: #67924B;
  transform: scale(1.03);
}

/* =============================================
   HIDDEN cards (filtered out)
============================================= */
.is-card-wrap.hidden {
  display: none;
}

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 1024px) {
  .is-hero-inner { padding: 60px; }
  .is-hero-inner h1 { font-size: 52px; }
  .is-filter-inner { padding: 0 60px; }
  .is-grid-inner { padding: 0 40px; }
  .is-grid { gap: 32px 20px; }
}

@media (max-width: 767px) {
  #is-hero { min-height: 59vh; }
  .is-hero-inner { padding: 60px 20px; }
  .is-hero-inner h1 { font-size: 36px; }
  .is-hero-inner p { font-size: 16px; }
  #is-filter { padding: 32px 0 20px; }
  .is-filter-inner { padding: 0 20px; gap: 8px; }
  .is-filter-btn { padding: 14px 24px; font-size: 14px; margin: 0; }
  .is-grid-inner { padding: 0 20px; }
  .is-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .is-card { min-height: 280px; }
  .is-card-default .is-card-title { font-size: 16px; }
  .is-card-hover .is-card-title { font-size: 15px; }
  .is-card-hover .is-card-desc { display: none; }
}

@media (max-width: 480px) {
  .is-grid { grid-template-columns: 1fr; }
}