/* ==========================================================================
   HOMEPAGE CUSTOM COMPONENT STYLES
   ========================================================================== */

/* Hero Slider Engine */
.hero-slider-wrap {
  position: relative;
  background: var(--dark-bg);
  color: var(--white);
  padding: 60px 0;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg-slider {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.1s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  animation: hero-push 9s ease-out forwards;
}

.hero-slide:nth-child(even).active {
  animation-name: hero-pull;
}

@keyframes hero-push {
  from { transform: scale(1.05) translate3d(0, 0, 0); }
  to { transform: scale(1.15) translate3d(-1.5%, -1%, 0); }
}

@keyframes hero-pull {
  from { transform: scale(1.15) translate3d(1.5%, 1%, 0); }
  to { transform: scale(1.05) translate3d(0, 0, 0); }
}

/* Reduced Motion Guard */
body.no-motion .hero-slide,
body.no-motion .hero-slide.active {
  animation: none !important;
  transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide,
  .hero-slide.active {
    animation: none !important;
    transform: none !important;
  }
}

/* Hero Slide Controls (Dots & Arrows) - Hidden */
.hero-controls,
.hero-arrows {
  display: none !important;
}

.hero-controls-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.hero-dot {
  width: 32px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.35);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.35s ease;
}

.hero-dot:hover:not(.active) {
  background: rgba(255, 255, 255, 0.65);
}

.hero-dot.active {
  width: 48px;
  background: var(--brand-red);
}

.hero-arrows {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.hero-arrow {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: all 0.2s ease;
}

.hero-arrow:hover {
  background: var(--brand-red);
  border-color: var(--brand-red);
  transform: scale(1.05);
}

.hero-arrow i, .hero-arrow svg {
  width: 18px;
  height: 18px;
}

.hero-bg-darkener {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20, 18, 18, 0.95) 0%, rgba(20, 18, 18, 0.84) 48%, rgba(222, 43, 36, 0.28) 100%);
  z-index: 2;
}

.hero-grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 40px;
  width: 100%;
}

.hero-content h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 3.5vw, 3.1rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
}

.hero-content h1 span {
  color: var(--brand-red);
}

.hero-lead {
  font-size: 1.02rem;
  color: #f0e6e4;
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.hero-bullets {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.78rem;
  color: #eadfdc;
  font-weight: 500;
}

.hero-bullets li {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Loan Finder Card */
.finder-card {
  background: var(--white);
  color: var(--dark-ink);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  border-top: 5px solid var(--brand-red);
}

.finder-card legend {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.15rem;
  margin-bottom: 12px;
  color: var(--dark-ink);
}

.goal-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.goal-pill {
  position: relative;
}

.goal-pill input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}

.goal-pill span {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 6px 10px;
  border: 1.5px solid var(--border-line);
  border-radius: var(--radius-md);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.76rem;
  color: var(--dark-muted);
  cursor: pointer;
  transition: var(--transition);
}

.goal-pill:hover span {
  border-color: var(--brand-red);
  color: var(--dark-ink);
}

.goal-pill input:checked + span {
  border-color: var(--brand-red);
  background-color: var(--brand-red-light);
  color: var(--brand-red);
  font-weight: 700;
}

.finder-result {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-line);
}

.finder-result .category-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--brand-red);
  letter-spacing: 0.05em;
}

.finder-result h3 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 800;
  margin: 3px 0 4px;
  color: var(--dark-ink);
}

.finder-result p {
  font-size: 0.82rem;
  color: var(--dark-muted);
  margin-bottom: 10px;
}

/* Impact Metrics */
.metrics-section {
  background: var(--white);
  margin-top: -36px;
  margin-bottom: 20px;
  position: relative;
  z-index: 10;
}

.metrics-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-line);
  padding: 26px 36px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.metric-col {
  text-align: center;
  position: relative;
}

.metric-col:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 15%;
  height: 70%;
  width: 1px;
  background: var(--border-line);
}

.metric-num {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 2.8vw, 2.5rem);
  font-weight: 900;
  color: var(--brand-red);
  line-height: 1;
  margin-bottom: 4px;
}

.metric-title {
  font-size: 0.8rem;
  font-weight: 700;
  font-family: var(--font-head);
  color: var(--dark-ink);
  text-transform: uppercase;
}

.metric-sub {
  font-size: 0.72rem;
  color: var(--dark-muted);
  margin-top: 2px;
}

/* Who We Are & Mandates */
.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.statutory-banner {
  background: var(--brand-red-light);
  border-left: 4px solid var(--brand-red);
  padding: 14px 18px;
  font-size: 0.84rem;
  color: #8c1e19;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 18px;
}

.mandate-box-dark {
  background: var(--dark-bg);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.mandates-checklist {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.mandate-check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.84rem;
  color: #f0e6e4;
}

.mandate-check-item i {
  color: var(--brand-red);
  flex-shrink: 0;
  margin-top: 2px;
}

/* Strategic Focus Areas */
.focus-areas-section {
  background: var(--surface-light);
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.focus-card {
  background: var(--white);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.focus-card:hover {
  border-color: var(--brand-red);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.focus-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--brand-red-light);
  color: var(--brand-red);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.focus-card h4 {
  font-family: var(--font-head);
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--dark-ink);
  margin-bottom: 8px;
}

.focus-card p {
  font-size: 0.82rem;
  color: var(--dark-muted);
  line-height: 1.5;
}

/* Financial Packages Grid */
.loans-header-wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}

.loans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.loan-item-card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-line);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  position: relative;
}

.loan-item-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-red);
}

.loan-item-card h3 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark-ink);
  margin-bottom: 6px;
}

.loan-item-card p {
  font-size: 0.84rem;
  color: var(--dark-muted);
  margin-bottom: 16px;
  flex-grow: 1;
}

.loan-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-line);
  padding-top: 12px;
}

.link-more {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--brand-red);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Editorial Tri-Grid */
.latest-posts-section {
  background: var(--surface-light);
}

.editorial-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: start;
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 992px) {
  .editorial-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    width: 100%;
    min-width: 0;
  }
}

.editorial-grid.single-filter-mode {
  grid-template-columns: 1fr;
  max-width: 680px;
  margin: 0 auto;
}

.editorial-column {
  display: flex;
  flex-direction: column;
}

.editorial-column.column-hidden {
  display: none !important;
}

.editorial-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 12px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-line);
}

.editorial-subhead h4 {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark-ink);
  margin: 0;
}

.column-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--brand-red);
  margin-bottom: 18px;
}

.column-header h3 {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--dark-ink);
}

.column-header i {
  color: var(--brand-red);
}

.post-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-line);
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.post-card-img {
  height: 160px;
  width: 100%;
  object-fit: cover;
}

.post-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.post-date {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand-red);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.post-card-body h4 {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark-ink);
  line-height: 1.35;
  margin-bottom: 8px;
}

.post-card-body p {
  font-size: 0.82rem;
  color: var(--dark-muted);
  margin-bottom: 14px;
  flex-grow: 1;
}

/* Live Social Stream Card (Clean YEDF Wrapper for Real Live Facebook Feed) */
.live-social-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  margin-bottom: 18px;
}

.live-social-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.live-social-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-line);
}

.live-social-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.live-social-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid #dbeafe;
}

.live-social-title {
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--dark-ink);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-social-handle {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: var(--dark-muted);
  margin-top: 2px;
}

.live-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: pulse-live-dot 1.8s infinite;
  display: inline-block;
}

@keyframes pulse-live-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.live-social-follow-btn {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid #1877f2;
  color: #1877f2;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.live-social-follow-btn:hover {
  background: #1877f2;
  color: #ffffff;
}

.live-social-embed-frame {
  width: 100%;
  height: 520px;
  background: #ffffff;
  position: relative;
  overflow: hidden;
}

.live-social-embed-frame iframe {
  width: 100% !important;
  height: 100% !important;
  border: none;
  display: block;
}

.live-social-card-footer {
  padding: 10px 16px;
  background: #f8fafc;
  border-top: 1px solid var(--border-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.story-card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-line);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.story-quote {
  font-size: 0.84rem;
  font-style: italic;
  color: var(--dark-ink);
  line-height: 1.55;
  margin-bottom: 12px;
}

.story-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.story-author img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.story-author-info h5 {
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--dark-ink);
}

.story-author-info span {
  font-size: 0.72rem;
  color: var(--brand-red);
  font-weight: 600;
}

.more-updates-bar {
  margin-top: 36px;
  background: var(--white);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.more-updates-text {
  display: flex;
  align-items: center;
  gap: 12px;
}

.more-updates-text h4 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.98rem;
  color: var(--dark-ink);
}

/* Gallery Section */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.gallery-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-line);
  transition: var(--transition);
}

.gallery-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.gallery-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.gallery-desc {
  padding: 14px;
}

.gallery-desc h4 {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark-ink);
  margin-bottom: 3px;
}

.gallery-desc p {
  font-size: 0.78rem;
  color: var(--dark-muted);
}

/* Partners Band */
.partners-band {
  padding: 38px 0;
  background: var(--white);
  border-top: 1px solid var(--border-line);
  border-bottom: 1px solid var(--border-line);
}

.partners-title {
  text-align: center;
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8c9199;
  margin-bottom: 22px;
}

.partners-slider-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 8px 0;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.partners-track {
  display: flex;
  align-items: center;
  gap: 56px;
  width: max-content;
  animation: partnersScroll 28s linear infinite;
}

.partners-slider-wrapper:hover .partners-track {
  animation-play-state: paused;
}

@keyframes partnersScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.partner-slide-item {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  transition: transform 0.25s ease;
}

.partner-slide-item:hover {
  transform: scale(1.08);
}

.partner-slide-item img {
  max-height: 48px;
  width: auto;
  object-fit: contain;
  filter: none !important;
  opacity: 1 !important;
}

.partners-list {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 28px;
}

/* Responsive Adaptations */
@media (max-width: 1024px) {
  .hero-grid, .about-split {
    grid-template-columns: 1fr;
  }
  .editorial-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    width: 100%;
    min-width: 0;
  }
  .editorial-column {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  .focus-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .metrics-box {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .metrics-section {
    margin-top: 24px;
    margin-bottom: 28px;
  }
  .focus-grid {
    grid-template-columns: 1fr;
  }
  .metrics-box {
    grid-template-columns: 1fr;
    padding: 20px 24px;
    gap: 18px;
  }
  .metric-col::after {
    display: none !important;
  }
  .goal-options {
    grid-template-columns: 1fr;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .post-card, .live-social-card, .story-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }
  .live-social-embed-frame {
    height: 420px;
    max-width: 100%;
  }
}

/* ==========================================================================
   DYNAMIC EDITORIAL FEED & POST READER STYLES
   ========================================================================== */
.column-counter {
  margin-left: auto;
  background: var(--brand-red-light);
  color: var(--brand-red);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.column-hidden {
  display: none !important;
}

.editorial-grid.single-filter-mode {
  grid-template-columns: 1fr;
}

.editorial-grid.single-filter-mode .editorial-column .column-posts-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.post-card-img-wrap {
  position: relative;
  overflow: hidden;
}

.post-read-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  backdrop-filter: blur(2px);
}

.post-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-line);
}

.fb-like-action {
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--dark-muted);
  transition: all 0.2s ease;
  padding: 4px 6px;
  border-radius: 4px;
}

.fb-like-action:hover {
  color: var(--brand-red);
  background: var(--brand-red-light);
}

.fb-like-action.has-liked {
  color: var(--brand-red);
}

.story-tag-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.story-facility-pill {
  background: #f1f5f9;
  color: #334155;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.story-jobs-pill {
  background: #ecfdf5;
  color: #047857;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.story-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--brand-red-light);
}

/* Post Reader Modal */
.post-reader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 2500;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}

.post-reader-overlay.is-open {
  opacity: 1;
  visibility: visible;
  display: block !important;
}

.post-reader-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  width: 90%;
  max-width: 680px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  z-index: 2600;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  max-height: 85vh;
  overflow: hidden;
}

.post-reader-modal.is-open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
  display: flex !important;
}

.reader-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-line);
  background: var(--surface-light);
}

.reader-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--dark-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.reader-close-btn:hover {
  background: #e2e8f0;
  color: var(--dark-ink);
}

.reader-modal-body {
  padding: 24px;
  overflow-y: auto;
}

.reader-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-top: 1px solid var(--border-line);
  background: var(--surface-light);
}

/* Feed Toast Notification */
.feed-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--dark-ink);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  z-index: 3000;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.feed-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   HOMEPAGE CITIZEN GATEWAY & INTER-PAGE CONNECTION CARDS
   ========================================================================== */
.portal-gateway-card {
  background: #ffffff;
  border: 1px solid var(--border-line, #e2e8f0);
  border-radius: 16px;
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none !important;
  color: inherit !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.02);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  height: 100%;
}

.portal-gateway-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: background 0.25s ease;
}

.portal-gateway-card:hover {
  transform: translateY(-4px);
  border-color: #cbd5e1;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.portal-gateway-card:hover::before {
  background: var(--brand-red, #dc2323);
}

.portal-gateway-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: #fef2f2;
  color: var(--brand-red, #dc2323);
  border: 1px solid #fee2e2;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: all 0.25s ease;
}

.portal-gateway-card:hover .portal-gateway-icon {
  background: var(--brand-red, #dc2323);
  color: #ffffff;
  border-color: var(--brand-red, #dc2323);
  transform: scale(1.05);
}

.portal-gateway-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.portal-gateway-content h4 {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--dark-ink, #0f172a);
  margin-bottom: 10px;
  line-height: 1.35;
}

.portal-gateway-content p {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #475569;
  margin-bottom: 20px;
  flex-grow: 1;
}

.portal-link-text {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-red, #dc2323);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  transition: gap 0.2s ease;
}

.portal-gateway-card:hover .portal-link-text {
  gap: 10px;
  text-decoration: none;
}

.governance-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.gov-pill-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid var(--border-line);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--dark-ink) !important;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.gov-pill-link:hover {
  background: #fee2e2;
  border-color: var(--brand-red);
  color: var(--brand-red) !important;
}