/* ==========================================================
   UKWUANI LGA — HOMEPAGE STYLES (ANIMATED & LIVING)
   Page: index.html
   ========================================================== */

/* ---------- 1. OPENING HERO & LIVING MAP ---------- */
.home-open {
  min-height: 94svh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 100px;
  padding-bottom: 60px;
}

.home-open .open-bg {
  position: absolute;
  inset: 0;
  background: url("../../images/heroes/river-ethiope-wide.jpg") center / cover no-repeat;
  filter: brightness(0.22) saturate(0.9);
  transform: scale(1.06);
  animation: bgZoom 24s ease-in-out infinite alternate;
}

.home-open .veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(7, 19, 12, 0.55) 0%,
    rgba(7, 19, 12, 0.9) 70%,
    var(--ink) 100%
  );
}

.open-grid {
  display: grid;
  gap: 40px;
  position: relative;
  z-index: 1;
}

@media (min-width: 1020px) {
  .open-grid {
    grid-template-columns: 1.08fr 0.92fr;
    align-items: center;
    gap: 48px;
  }
}

.home-open h1 {
  font-size: var(--fs-hero);
  margin: 14px 0 12px;
}

.proverb-note {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--text-sub);
  letter-spacing: 0.5px;
}

/* 3D Living Map Exhibit Frame */
.map-exhibit {
  position: relative;
  border: 1.5px solid var(--brass);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: radial-gradient(circle at 50% 30%, rgba(15, 94, 99, 0.32), rgba(7, 19, 12, 0.94));
  box-shadow: var(--shadow-3);
  animation: borderSheen 6s infinite ease-in-out;
}

.map-exhibit canvas {
  width: 100%;
  height: clamp(320px, 42vw, 500px);
  display: block;
}

.map-exhibit .map-fallback {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
}

.map-exhibit.no-map .map-fallback {
  display: block;
}

.map-exhibit .cap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 16px 12px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-sub);
  background: linear-gradient(to top, rgba(7, 19, 12, 0.96) 0%, transparent 100%);
  font-weight: 500;
}

/* ---------- 2. POSTCARDS FROM UKWUANI (LIVING & BREATHING) ---------- */
.postcards {
  display: grid;
  gap: 26px;
  justify-items: center;
  grid-template-columns: 1fr;
}

@media (min-width: 680px) {
  .postcards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .postcards {
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
  }
}

.postcard {
  background: var(--paper);
  padding: 12px 12px 18px;
  border-radius: 6px;
  box-shadow: var(--shadow-2);
  max-width: 420px;
  width: 100%;
  transform: rotate(var(--rot, 0deg));
  animation: cardBreathe 5.5s infinite ease-in-out;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.postcard:nth-child(2) {
  animation-delay: -1.8s;
}

.postcard:nth-child(3) {
  animation-delay: -3.6s;
}

.postcard:hover {
  transform: rotate(0deg) translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-3), 0 0 20px rgba(197, 155, 39, 0.25);
}

.postcard img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 3px;
  transition: transform 0.6s var(--ease);
}

.postcard:hover img {
  transform: scale(1.04);
}

.postcard figcaption {
  font-family: var(--font-display);
  font-style: italic;
  padding-top: 12px;
  font-size: 0.92rem;
  color: #27362a;
  text-align: center;
  line-height: 1.5;
}

/* ---------- 3. CHAIRMAN TEASER SECTION ---------- */
.chair-tease {
  display: grid;
  gap: 34px;
  align-items: center;
  grid-template-columns: 1fr;
}

@media (min-width: 960px) {
  .chair-tease {
    grid-template-columns: 0.85fr 1.15fr;
    gap: 48px;
  }
}

.chair-tease .frame {
  border: 1.5px solid var(--brass);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-2);
  background: var(--ink);
  max-width: 440px;
  margin: 0 auto;
  width: 100%;
  animation: cardBreathe 6s infinite ease-in-out, borderSheen 7s infinite ease-in-out;
  transition: transform var(--t-med), box-shadow var(--t-med);
}

.chair-tease .frame:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-3), 0 0 25px var(--brass-glow);
}

.chair-tease .frame img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 15%;
  animation: bgZoom 20s ease-in-out infinite alternate;
}

/* ---------- 4. FIVE PILLARS GRID (ANIMATED) ---------- */
.pillar-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .pillar-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1080px) {
  .pillar-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pillar {
  padding: 26px 22px;
  border-top: 3px solid var(--palm);
  animation: cardBreathe 5.2s infinite ease-in-out;
}

.pillar:nth-child(even) {
  animation-delay: -1.7s;
}

.pillar:nth-child(3n) {
  animation-delay: -3.4s;
}

.pillar:hover {
  transform: translateY(-8px) scale(1.02);
  border-top-color: var(--brass);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-2), 0 0 20px rgba(197, 155, 39, 0.2);
}

.pillar i {
  font-size: 1.55rem;
  color: var(--brass-soft);
  margin-bottom: 14px;
  display: inline-block;
  transition: transform var(--t-fast);
}

.pillar:hover i {
  transform: scale(1.18) rotate(6deg);
}

.pillar h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.pillar p {
  font-size: 0.86rem;
  color: var(--text-sub);
  line-height: 1.6;
}

/* ---------- 5. STAT COUNTER STRIP & VERTICAL SPACING ---------- */
.stat-strip {
  margin-top: clamp(42px, 5.5vw, 60px);
}

.stat {
  animation: borderSheen 6s infinite ease-in-out;
}

.stat:nth-child(even) {
  animation-delay: -2s;
}

.stat:nth-child(3n) {
  animation-delay: -4s;
}

/* ---------- 6. NEWS / BULLETINS CAROUSEL CARDS ---------- */
.news-card {
  flex: 0 0 100%;
  max-width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: cardBreathe 5.8s infinite ease-in-out, borderSheen 7.2s infinite ease-in-out;
}

.news-card:nth-child(even) {
  animation-delay: -2.2s;
}

.news-card:nth-child(3n) {
  animation-delay: -4.1s;
}

@media (min-width: 680px) {
  .news-card {
    flex: 0 0 calc((100% - 20px) / 2);
    max-width: calc((100% - 20px) / 2);
  }
}

@media (min-width: 1040px) {
  .news-card {
    flex: 0 0 calc((100% - 40px) / 3);
    max-width: calc((100% - 40px) / 3);
  }
}

.news-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-3), 0 0 25px var(--brass-glow);
  border-color: var(--brass);
}

.news-card figure {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--ink);
  margin: 0;
}

.news-card figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.news-card:hover figure img {
  transform: scale(1.08);
}

.news-card .body {
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.news-card .date {
  font-size: 0.7rem;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--brass-soft);
  font-weight: 700;
}

.news-card h3 {
  font-size: 1.02rem;
  line-height: 1.4;
  color: var(--text-main);
}

.news-card a {
  margin-top: auto;
  padding-top: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brass-soft);
  display: inline-flex;
  gap: 6px;
  align-items: center;
  transition: gap var(--t-fast), color var(--t-fast);
}

.news-card:hover a {
  color: var(--laterite-bright);
  gap: 10px;
}

/* ---------- 7. STUDENTS' TRIBUTE CALLOUT BAND ---------- */
.tribute-band {
  background: linear-gradient(135deg, var(--river-deep), var(--palm-deep));
  border-block: 3px solid var(--brass);
  text-align: center;
}

.tribute-band .heart {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--laterite);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 6px 20px rgba(180, 67, 46, 0.5);
  animation: heartPulse 2.4s ease-in-out infinite;
}

/* ---------- 8. KEYFRAME ANIMATIONS & ACCESSIBILITY ---------- */
@keyframes bgZoom {
  0% { transform: scale(1.04); }
  100% { transform: scale(1.14); }
}

@keyframes cardBreathe {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-4px); }
}

@keyframes borderSheen {
  0%, 100% {
    border-color: var(--line);
    box-shadow: var(--shadow-1);
  }
  50% {
    border-color: var(--brass);
    box-shadow: 0 6px 22px var(--brass-glow);
  }
}

@keyframes heartPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 6px 20px rgba(180, 67, 46, 0.4);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 8px 28px rgba(180, 67, 46, 0.7);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-open .open-bg,
  .chair-tease .frame img,
  .postcard,
  .pillar,
  .news-card,
  .stat,
  .tribute-band .heart,
  .map-exhibit {
    animation: none !important;
    transform: none !important;
  }
}