/* =========================
   SHARED ABOUT / UPDATES PAGE
========================= */

.updates-main {
  width: min(1440px, calc(100% - 28px));
  margin: 22px auto 34px;
  padding: 0;
}

.updates-hero,
.updates-content {
  width: 100%;
  max-width: none;
  margin: 0;
}

.updates-hero {
  margin-bottom: 28px;
}

.updates-hero-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 280px;
  padding: 38px 36px;
  text-align: center;
  color: #ffffff;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(rgba(8, 35, 84, 0.82), rgba(13, 58, 120, 0.76)),
    url("church-growth.png") center/cover no-repeat;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

.updates-hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.updates-hero-icon {
  position: relative;
  z-index: 1;
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
}

.updates-eyebrow,
.updates-hero-card h1,
.updates-hero-card p {
  position: relative;
  z-index: 1;
}

.updates-eyebrow {
  margin: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.96rem;
  font-weight: 800;
}

.updates-hero-card h1 {
  margin: 0;
  font-size: clamp(2.25rem, 4.2vw, 3.4rem);
  line-height: 1.08;
  font-weight: 800;
}

.updates-hero-card p {
  margin: 0;
  max-width: 900px;
  font-size: clamp(1rem, 1.2vw, 1.12rem);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.94);
}

.updates-content {
  background:
    linear-gradient(rgba(244, 248, 252, 0.95), rgba(238, 244, 250, 0.95)),
    url("church-growth.png") center/cover no-repeat;
  border-radius: 28px;
  padding: 18px;
}

.updates-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.95fr) minmax(520px, 1.35fr);
  gap: 26px;
  align-items: start;
}

.updates-about-card,
.updates-feed-panel {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #dce7f5;
  border-radius: 24px;
  box-shadow: 0 12px 28px rgba(15, 76, 129, 0.08);
}

.updates-about-card {
  padding: 30px;
}

.updates-about-card h2 {
  margin-bottom: 14px;
  font-size: clamp(1.9rem, 2.5vw, 2.3rem);
  line-height: 1.15;
  color: #14213d;
}

.updates-about-card p {
  margin-bottom: 14px;
  color: #4b5563;
  line-height: 1.8;
  font-size: 1rem;
}

.updates-about-mission {
  margin-top: 24px;
}

.updates-about-mission h3 {
  margin: 0 0 12px;
  color: #0f3b82;
  font-size: 1.18rem;
}

.updates-about-highlights {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.updates-highlight-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f8fbff;
  border: 1px solid #dce7f5;
  color: #334155;
  font-weight: 700;
}

.updates-highlight-pill i {
  width: 20px;
  text-align: center;
  color: #0f3b82;
  font-size: 1rem;
}

.updates-feed-panel {
  padding: 28px;
}

.updates-feed-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 22px;
}

.updates-feed-header h2 {
  margin: 0 0 8px;
  font-size: clamp(1.9rem, 2.5vw, 2.25rem);
  line-height: 1.15;
  color: #14213d;
}

.updates-feed-header p {
  margin: 0;
  color: #5b6474;
  line-height: 1.6;
}

.updates-filter-box {
  width: 100%;
  max-width: 300px;
  flex-shrink: 0;
}

.updates-filter-box label {
  display: block;
  margin-bottom: 8px;
  color: #14213d;
  font-weight: 700;
}

.updates-filter-box select {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid #cbd7ea;
  background: #ffffff;
  color: #14213d;
  padding: 0 14px;
  font: inherit;
}

.update-card-rich {
  padding: 0;
  overflow: hidden;
}

.update-card-shell {
  display: grid;
  grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
  align-items: stretch;
}

.update-card-rich:not(.has-cover-image) .update-card-shell {
  grid-template-columns: 1fr;
}

.update-card-media-wrap {
  position: relative;
  min-height: 220px;
  background:
    linear-gradient(135deg, rgba(15, 59, 130, 0.14), rgba(14, 116, 144, 0.08)),
    #eef4fb;
}

.update-card-media-wrap.has-image .update-card-media-placeholder {
  display: none;
}

.update-card-media-wrap.image-failed .update-card-media {
  display: none;
}

.update-card-media-wrap.image-failed .update-card-media-placeholder {
  display: flex;
}

.update-card-media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.update-card-media-placeholder {
  width: 100%;
  height: 100%;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #89a1c6;
  font-size: 2rem;
}

.update-card-body {
  padding: 22px;
}

.update-content-preview {
  margin: 0;
  color: #334155;
  line-height: 1.75;
}

.update-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}

.update-card-footer .update-meta {
  flex: 1;
  margin: 0;
  padding: 0;
  border: 0;
}

.update-read-more-btn {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid #c8d8ee;
  border-radius: 999px;
  background: #f8fbff;
  color: #123a78;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.update-read-more-btn:hover {
  background: #123a78;
  border-color: #123a78;
  color: #ffffff;
}

.announcement-view-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(4px);
}

/* FIX: ensure hidden modal is truly removed and non-blocking */
.announcement-view-modal.hidden {
  display: none !important;
  pointer-events: none;
}

.announcement-view-card {
  position: relative;
  width: min(880px, 100%);
  max-height: min(88vh, 920px);
  overflow: auto;
  border-radius: 26px;
  border: 1px solid rgba(220, 231, 245, 0.9);
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
}

.announcement-view-close {
  position: sticky;
  top: 18px;
  left: calc(100% - 62px);
  z-index: 2;
  width: 42px;
  height: 42px;
  margin: 18px 18px -60px auto;
  border: 1px solid #d7e0ed;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#announcementViewBody {
  padding: 24px 24px 30px;
}

.announcement-view-media {
  margin-bottom: 24px;
  overflow: hidden;
  border-radius: 22px;
  background: #eef4fb;
  min-height: 260px;
}

.announcement-view-media.image-failed {
  display: none;
}

.announcement-view-image {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.announcement-view-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.announcement-view-top h2 {
  margin: 6px 0 0;
  color: #14213d;
  font-size: clamp(1.75rem, 2.8vw, 2.35rem);
  line-height: 1.15;
}

.announcement-view-summary {
  margin: 0 0 18px;
  color: #475569;
  font-size: 1.02rem;
  line-height: 1.8;
}

.announcement-view-content {
  color: #334155;
  line-height: 1.9;
  font-size: 1rem;
}

.announcement-view-meta {
  margin: 18px 0 0;
  padding-top: 18px;
  border-top: 1px solid #e5edf7;
  color: #64748b;
}

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

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

  .updates-feed-header {
    flex-direction: column;
    align-items: stretch;
  }

  .updates-filter-box {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .updates-main {
    width: min(100% - 18px, 100%);
    margin-top: 16px;
  }

  .update-card-shell {
    grid-template-columns: 1fr;
  }

  .update-card-media-wrap,
  .update-card-media-placeholder {
    min-height: 210px;
  }

  .updates-hero-card,
  .updates-about-card,
  .updates-feed-panel {
    padding: 22px;
    border-radius: 22px;
  }

  .updates-content {
    padding: 12px;
  }

  .updates-hero-card {
    min-height: 240px;
  }
}

@media (max-width: 640px) {
  .updates-hero-card,
  .updates-about-card,
  .updates-feed-panel {
    padding: 20px;
    border-radius: 20px;
  }

  .updates-hero-card h1,
  .updates-about-card h2,
  .updates-feed-header h2 {
    font-size: 1.7rem;
  }

  .update-card-body,
  #announcementViewBody {
    padding: 18px;
  }

  .update-card-footer,
  .announcement-view-top {
    flex-direction: column;
    align-items: stretch;
  }

  .update-read-more-btn {
    width: 100%;
    justify-content: center;
  }
}