:root {
  --alf-font: Karla, "Segoe UI", Tahoma, sans-serif;
  --alf-green: #77b122;
  --alf-green-dark: #5f8f18;
  --alf-ink: #0f1112;
  --alf-muted: #6c757d;
  --alf-soft: #f6f8f2;
  --alf-line: #e5ebd8;
}

/* Text logo — Farmie-style two-tone wordmark */
.alf-text-logo {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  font-family: var(--alf-font);
  font-weight: 800;
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  letter-spacing: 0.02em;
  line-height: 1.15;
  text-transform: none;
  text-decoration: none !important;
}

.alf-text-logo .alf-logo-primary {
  color: var(--alf-green);
}

.alf-text-logo .alf-logo-secondary {
  color: var(--alf-ink);
}

body.locale-ur .alf-text-logo,
body.locale-ur .alf-text-logo .alf-logo-primary,
body.locale-ur .alf-text-logo .alf-logo-secondary {
  font-family: "Noto Nastaliq Urdu", "Segoe UI", Tahoma, sans-serif;
  letter-spacing: 0;
}

body.locale-ur .alf-text-logo {
  gap: 0.35rem;
}

.alf-text-logo--footer {
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
}

.alf-text-logo--footer .alf-logo-secondary {
  color: #ffffff;
}

.nav-brand.alf-text-logo {
  max-width: min(100%, 280px);
}

@media (max-width: 991px) {
  .nav-brand.alf-text-logo {
    font-size: 1.1rem;
    max-width: 200px;
  }
}

body { font-family: var(--alf-font); }
.preloader { pointer-events: none; }

/* Keep content visible if AOS fails */
[data-aos] { opacity: 1 !important; transform: none !important; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 9999;
  background: #fff;
  padding: .5rem;
}

/* ===== Portal stats (Farmie-aligned) ===== */
.alf-stats-area {
  position: relative;
  background: var(--alf-soft);
  padding: 80px 0 70px;
  overflow: hidden;
}

.alf-stats-area::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 20%, rgba(119, 177, 34, 0.12), transparent 42%),
    radial-gradient(circle at 88% 80%, rgba(119, 177, 34, 0.1), transparent 40%);
  pointer-events: none;
}

.alf-stats-area .section-heading { margin-bottom: 40px; }

.alf-stat-tile {
  position: relative;
  background: #fff;
  border: 1px solid var(--alf-line);
  border-top: 3px solid var(--alf-green);
  padding: 28px 22px 24px;
  height: 100%;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}

.alf-stat-tile:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 35px rgba(15, 17, 18, 0.08);
  border-color: rgba(119, 177, 34, 0.45);
}

.alf-stat-tile .icon-wrap {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(119, 177, 34, 0.12);
  color: var(--alf-green);
  font-size: 1.35rem;
  margin-bottom: 18px;
}

.alf-stat-tile .stat-value {
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  font-weight: 700;
  color: var(--alf-ink);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

.alf-stat-tile .stat-label {
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--alf-muted);
  font-weight: 700;
  margin: 0;
}

.alf-stat-tile .stat-accent {
  position: absolute;
  right: 16px;
  bottom: 14px;
  width: 36px;
  height: 3px;
  background: var(--alf-green);
  opacity: .55;
}

/* Department cards — cleaner metric chips */
.alf-dept-card {
  background: #fff;
  border: 1px solid var(--alf-line);
  border-left: 4px solid var(--alf-green);
  padding: 28px 24px;
  height: 100%;
  transition: box-shadow .3s ease, transform .3s ease;
}

.alf-dept-card:hover {
  box-shadow: 0 14px 28px rgba(15, 17, 18, 0.07);
  transform: translateY(-4px);
}

.alf-dept-card h4 {
  color: var(--alf-ink);
  margin-bottom: 12px;
}

.alf-metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0 20px;
}

.alf-metric-chip {
  background: var(--alf-soft);
  border: 1px solid var(--alf-line);
  padding: 10px 12px;
}

.alf-metric-chip .val {
  display: block;
  font-weight: 700;
  color: var(--alf-green-dark);
  font-size: 1.05rem;
  line-height: 1.2;
}

.alf-metric-chip .lbl {
  display: block;
  font-size: 11px;
  color: var(--alf-muted);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-top: 2px;
}

.scheme-badge-proposed {
  background: #e9a825;
  color: #fff;
  padding: .2rem .55rem;
  font-size: .75rem;
}

.scheme-badge-running {
  background: var(--alf-green);
  color: #fff;
  padding: .2rem .55rem;
  font-size: .75rem;
}

.upload-dropzone {
  border: 2px dashed #b7c99a;
  padding: 1.25rem;
  text-align: center;
  background: var(--alf-soft);
}

.upload-dropzone.dragover {
  background: #eef6e0;
  border-color: var(--alf-green);
}

/* ===== CM Proposed schemes ===== */
.alf-proposed-area {
  background: #fff;
  border-top: 1px solid var(--alf-line);
  border-bottom: 1px solid var(--alf-line);
}

.alf-proposed-card {
  background: #fff;
  border: 1px solid var(--alf-line);
  display: flex;
  flex-direction: column;
  transition: transform .3s ease, box-shadow .3s ease;
}

.alf-proposed-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px rgba(15, 17, 18, 0.08);
}

.alf-proposed-media {
  position: relative;
  height: 170px;
  background-size: cover;
  background-position: center;
}

.alf-proposed-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 17, 18, 0.55), rgba(15, 17, 18, 0.05));
}

.alf-proposed-tag {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 1;
  background: #e9a825;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 6px 10px;
}

.alf-proposed-body { padding: 22px 20px 20px; flex: 1; display: flex; flex-direction: column; }

.alf-proposed-dept {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--alf-green-dark);
  font-weight: 700;
  margin: 0;
}

.alf-proposed-budget {
  font-size: 13px;
  color: var(--alf-ink);
}

.alf-proposed-empty {
  border: 1px dashed var(--alf-line);
  background: var(--alf-soft);
  padding: 2rem;
}

@media (max-width: 767px) {
  .alf-stats-area { padding: 55px 0 45px; }
  .alf-metric-grid { grid-template-columns: 1fr; }
}

/* ===== Chief Minister message (home) — side by side ===== */
.alf-cm-message-area {
  --alf-cm-deep: #1f5c28;
  --alf-cm-mid: #3d8c2e;
  --alf-cm-mint: #e8f3df;
  position: relative;
  padding: 72px 0 80px;
  background:
    linear-gradient(180deg, #ffffff 0%, var(--alf-cm-mint) 42%, #ffffff 100%);
  border-top: 1px solid var(--alf-line);
  border-bottom: 1px solid var(--alf-line);
  overflow: hidden;
}

.alf-cm-message-area::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 20%, rgba(61, 140, 46, 0.12), transparent 45%),
    radial-gradient(ellipse at 85% 80%, rgba(31, 92, 40, 0.08), transparent 48%);
  pointer-events: none;
}

.alf-cm-message-area .container {
  position: relative;
  z-index: 1;
}

.alf-cm-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 28px;
  align-items: stretch;
}

.alf-cm-heading {
  margin-bottom: 0;
}

.alf-cm-heading p {
  color: var(--alf-cm-mid);
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-size: 13px;
}

.alf-cm-heading h2 {
  font-size: clamp(1.45rem, 2.2vw, 1.9rem);
  margin-bottom: 0;
}

.alf-cm-heading h2,
.alf-cm-heading h2 span {
  color: var(--alf-cm-deep);
}

.alf-cm-banner {
  margin: 0;
  height: 100%;
  min-height: 320px;
  background: #fff;
  border: 1px solid rgba(31, 92, 40, 0.18);
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 16px 36px rgba(31, 92, 40, 0.1),
    0 2px 0 var(--alf-cm-mid);
  display: flex;
  align-items: center;
  justify-content: center;
}

.alf-cm-banner__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  background: linear-gradient(180deg, #f4faef 0%, #fff 100%);
}

.alf-cm-panel {
  background: #fff;
  border: 1px solid rgba(31, 92, 40, 0.16);
  border-radius: 16px;
  padding: 28px 30px 26px;
  box-shadow: 0 10px 28px rgba(15, 17, 18, 0.06);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.alf-cm-panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--alf-cm-mid), var(--alf-cm-deep));
}

html[dir="rtl"] .alf-cm-panel::before {
  left: auto;
  right: 0;
}

html[dir="rtl"] .alf-cm-split {
  direction: rtl;
}

.alf-cm-quote {
  margin: 0;
  padding: 0 0 0 12px;
  flex: 1;
}

html[dir="rtl"] .alf-cm-quote {
  padding: 0 12px 0 0;
}

.alf-cm-quote p {
  margin: 0;
  color: #243028;
  font-size: 1.02rem;
  line-height: 1.8;
}

.alf-cm-signoff {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px dashed rgba(31, 92, 40, 0.25);
  color: var(--alf-cm-deep);
  font-weight: 700;
  font-size: 0.95rem;
}

@media (max-width: 991px) {
  .alf-cm-split {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .alf-cm-banner {
    min-height: 0;
    max-height: none;
  }

  .alf-cm-banner__img {
    height: auto;
    max-height: 420px;
  }
}

@media (max-width: 767px) {
  .alf-cm-message-area { padding: 48px 0 56px; }
  .alf-cm-banner { border-radius: 12px; }
  .alf-cm-panel { padding: 22px 18px 18px; border-radius: 12px; }
  .alf-cm-panel::before { top: 14px; bottom: 14px; }
  .alf-cm-quote p { font-size: 0.98rem; }
  .alf-cm-banner__img { max-height: 300px; }
}

/* ===== Language switcher + Urdu RTL ===== */
.top-header-content {
  height: auto !important;
  min-height: 44px;
  padding: 8px 0;
}

.top-header-content .alf-top-welcome,
.top-header-content .alf-top-actions {
  flex: 1 1 auto !important;
  max-width: none !important;
  width: auto !important;
}

.top-header-content .alf-top-actions {
  flex: 0 1 auto !important;
}

.alf-lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid #cfd5d8;
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 17, 18, 0.06);
  margin-inline-end: .35rem;
}

.alf-lang-btn {
  display: inline-block;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 700;
  color: #334155 !important;
  text-decoration: none !important;
  line-height: 1.4;
  background: transparent;
  white-space: nowrap;
}

.alf-lang-btn:hover,
.alf-lang-btn:focus {
  color: #77b122 !important;
  background: #f4f8ec;
}

.alf-lang-btn.is-active {
  background: #77b122 !important;
  color: #fff !important;
}

.top-header-content .top-header-meta .alf-lang-switch a {
  margin-right: 0 !important;
  color: #334155;
  font-weight: 700;
}

.top-header-content .top-header-meta .alf-lang-switch a.is-active {
  color: #fff !important;
}

.classynav ul li.alf-nav-lang > a {
  color: #77b122 !important;
  font-weight: 700;
}

.classynav ul li a.alf-lang-active {
  color: #77b122 !important;
  font-weight: 700;
}

body.locale-ur {
  font-family: "Noto Nastaliq Urdu", "Segoe UI", Tahoma, sans-serif;
}

body.locale-ur .section-heading h2,
body.locale-ur .welcome-content h2,
body.locale-ur .alf-page-hero__title,
body.locale-ur h1, body.locale-ur h2, body.locale-ur h3, body.locale-ur h4, body.locale-ur h5,
body.locale-ur .classynav ul li a,
body.locale-ur .top-header-meta p,
body.locale-ur .btn,
body.locale-ur .form-label,
body.locale-ur .alert {
  font-family: "Noto Nastaliq Urdu", "Segoe UI", Tahoma, sans-serif;
  line-height: 1.7;
}

html[dir="rtl"] .welcome-content,
html[dir="rtl"] .section-heading,
html[dir="rtl"] .breadcrumb-text,
html[dir="rtl"] .alf-stat-tile,
html[dir="rtl"] .alf-dept-card,
html[dir="rtl"] .footer-widget {
  text-align: right;
}

html[dir="rtl"] .section-heading.text-center,
html[dir="rtl"] .breadcrumb-text.text-center,
html[dir="rtl"] .alf-stat-tile.text-center {
  text-align: center;
}

html[dir="rtl"] .classynav ul li .dropdown {
  text-align: right;
}

html[dir="rtl"] .text-lg-end {
  text-align: left !important;
}

html[dir="rtl"] .me-1 { margin-right: 0 !important; margin-left: .25rem !important; }
html[dir="rtl"] .me-2 { margin-right: 0 !important; margin-left: .5rem !important; }
html[dir="rtl"] .ms-2 { margin-left: 0 !important; margin-right: .5rem !important; }

@media only screen and (max-width: 767px) {
  .top-header-content .alf-top-welcome {
    display: none;
  }

  .top-header-content .alf-top-actions {
    width: 100% !important;
    justify-content: space-between !important;
  }
}

/* ===== Dynamic media frames (crop large / stretch small) ===== */
.alf-footer-bg,
.alf-media-hero,
.alf-media-banner,
.alf-media-card,
.alf-proposed-media {
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover; /* default; JS may switch to 100% 100% for small uploads */
}

.alf-footer-bg {
  min-height: 420px;
  background-color: #1a1f16;
}

.alf-media-card {
  height: 160px;
  width: 100%;
  overflow: hidden;
}

.alf-dept-card .alf-media-card {
  height: 150px;
}

.alf-proposed-media.alf-media-card {
  height: 170px;
}

.alf-media-detail {
  width: 100%;
  height: 360px;
  background: #eef2e6;
}

.alf-media-detail__img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
}

.alf-media-about {
  width: 100%;
  height: 420px;
  background: #eef2e6;
}

.alf-media-about__img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
}

.alf-media-hero.is-stretched,
.alf-media-banner.is-stretched,
.alf-footer-bg.is-stretched,
.alf-media-card.is-stretched,
.alf-proposed-media.is-stretched {
  background-size: 100% 100% !important;
}

.alf-media-detail__img.is-stretched,
.alf-media-about__img.is-stretched {
  object-fit: fill !important;
}

@media (max-width: 767px) {
  .alf-media-detail { height: 220px; }
  .alf-media-about { height: 260px; }
  .alf-footer-bg { min-height: 360px; }
}

/* ===== Scheme Cards & Action Buttons ===== */
.alf-scheme-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  border: 1px solid #e5e9ea !important;
  border-radius: 10px !important;
  background-color: #ffffff;
}

.alf-scheme-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(15, 17, 18, 0.08) !important;
  border-color: #d2dbdc !important;
}

.alf-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.alf-btn-details,
.alf-btn-apply,
.alf-btn-interest {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: 6px;
  text-decoration: none !important;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-sizing: border-box;
}

.alf-btn-details {
  color: #374151;
  background-color: #f3f4f6;
  border: 1px solid #e5e7eb;
}

.alf-btn-details:hover,
.alf-btn-details:focus {
  color: #ffffff;
  background-color: #0f1112;
  border-color: #0f1112;
  transform: translateY(-1px);
}

.alf-btn-apply,
.alf-btn-apply-pulse {
  position: relative;
  color: #ffffff !important;
  background: linear-gradient(135deg, #77b122 0%, #5e8f17 100%);
  border: 1px solid #5e8f17;
  box-shadow: 0 2px 6px rgba(119, 177, 34, 0.28);
  animation: alf-apply-alert-pulse 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  will-change: transform, box-shadow;
}

.alf-btn-apply:hover,
.alf-btn-apply:focus,
.alf-btn-apply-pulse:hover,
.alf-btn-apply-pulse:focus {
  color: #ffffff !important;
  background: linear-gradient(135deg, #629718 0%, #4b7310 100%);
  border-color: #4b7310;
  box-shadow: 0 6px 18px rgba(119, 177, 34, 0.48);
  transform: translateY(-2px);
  animation-play-state: paused;
}

.famie-btn.alf-btn-apply {
  border-radius: 6px !important;
  height: 48px;
  line-height: normal;
  text-decoration: none !important;
  font-size: 15px;
}

/* Alert pulse keyframes - smooth glowing beacon alert wave */
@keyframes alf-apply-alert-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(119, 177, 34, 0.72), 0 2px 6px rgba(119, 177, 34, 0.3);
    transform: scale(1);
  }
  32% {
    box-shadow: 0 0 0 8px rgba(119, 177, 34, 0), 0 4px 14px rgba(119, 177, 34, 0.45);
    transform: scale(1.02);
  }
  48% {
    box-shadow: 0 0 0 0 rgba(119, 177, 34, 0), 0 2px 6px rgba(119, 177, 34, 0.3);
    transform: scale(1);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(119, 177, 34, 0), 0 2px 6px rgba(119, 177, 34, 0.3);
    transform: scale(1);
  }
}

/* Pulsing Live Alert Beacon Dot (Radar ping + blinking core) */
.alf-pulse-beacon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 10px;
  height: 10px;
  margin-inline-end: 6px;
  vertical-align: middle;
  flex-shrink: 0;
}

.alf-pulse-beacon .alf-beacon-ping {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: #ffffff;
  opacity: 0.85;
  animation: alf-beacon-ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.alf-pulse-beacon .alf-beacon-dot {
  position: relative;
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #ffffff;
  box-shadow: 0 0 6px #ffffff, 0 0 10px rgba(255, 255, 255, 0.85);
  animation: alf-beacon-blink 1s ease-in-out infinite alternate;
}

@keyframes alf-beacon-ping {
  0% {
    transform: scale(0.8);
    opacity: 0.95;
  }
  70%, 100% {
    transform: scale(2.6);
    opacity: 0;
  }
}

@keyframes alf-beacon-blink {
  0% {
    opacity: 0.45;
    transform: scale(0.85);
  }
  100% {
    opacity: 1;
    transform: scale(1.1);
  }
}

.alf-btn-interest {
  color: #92400e !important;
  background-color: #fef3c7;
  border: 1px solid #fde68a;
}

.alf-btn-interest:hover,
.alf-btn-interest:focus {
  color: #ffffff !important;
  background-color: #d97706;
  border-color: #b45309;
  box-shadow: 0 4px 10px rgba(217, 119, 6, 0.3);
  transform: translateY(-1px);
}

body.locale-ur .alf-btn-details,
body.locale-ur .alf-btn-apply,
body.locale-ur .alf-btn-apply-pulse,
body.locale-ur .alf-btn-interest {
  font-family: "Noto Nastaliq Urdu", "Segoe UI", Tahoma, sans-serif;
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.6;
}

@media (max-width: 576px) {
  .alf-card-actions {
    flex-direction: column;
  }
  .alf-btn-details,
  .alf-btn-apply,
  .alf-btn-apply-pulse,
  .alf-btn-interest {
    width: 100%;
    flex: 1 1 auto;
  }
  /* On touch devices keep subtle scale to prevent any boundary overflow */
  @keyframes alf-apply-alert-pulse {
    0% {
      box-shadow: 0 0 0 0 rgba(119, 177, 34, 0.72), 0 2px 6px rgba(119, 177, 34, 0.3);
    }
    32% {
      box-shadow: 0 0 0 6px rgba(119, 177, 34, 0), 0 4px 12px rgba(119, 177, 34, 0.45);
    }
    48% {
      box-shadow: 0 0 0 0 rgba(119, 177, 34, 0), 0 2px 6px rgba(119, 177, 34, 0.3);
    }
    100% {
      box-shadow: 0 0 0 0 rgba(119, 177, 34, 0), 0 2px 6px rgba(119, 177, 34, 0.3);
    }
  }
}

/* Accessibility: disable animations if user prefers reduced motion (WCAG 2.1) */
@media (prefers-reduced-motion: reduce) {
  .alf-btn-apply,
  .alf-btn-apply-pulse {
    animation: none !important;
    transform: none !important;
  }
  .alf-pulse-beacon .alf-beacon-ping,
  .alf-pulse-beacon .alf-beacon-dot {
    animation: none !important;
    opacity: 1 !important;
  }
}

/* ==========================================================================
   ALF Portal — New Schemes Announcement Popup & Slider
   ========================================================================== */

/* Modal Dialog & Backdrop */
.modal-backdrop.show {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background-color: rgba(15, 23, 42, 0.75);
}

.alf-schemes-modal-dialog {
  max-width: 1040px;
  margin: 1.5rem auto;
}

.alf-schemes-modal-content {
  border-radius: 24px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 30px 90px -15px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(15, 23, 42, 0.08);
  animation: alfModalSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes alfModalSlideUp {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Modal Header */
.alf-schemes-modal-header {
  background: linear-gradient(135deg, #0b1f10 0%, #163e1e 55%, #1e5229 100%);
  padding: 1.25rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.alf-announcement-chip {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a3e635;
  background: rgba(163, 230, 53, 0.15);
  border: 1px solid rgba(163, 230, 53, 0.3);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 6px;
}

.alf-modal-headline {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.alf-modal-tagline {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 640px;
}

.alf-slide-counter {
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 999px;
  color: #ffffff;
}

.alf-modal-close-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.25s ease;
  cursor: pointer;
  outline: none;
}

.alf-modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: rotate(90deg) scale(1.08);
  color: #ffffff;
}

/* Slide Card Inner */
.alf-popup-slide-inner {
  min-height: 380px;
  background: #ffffff;
}

/* Media Box */
.alf-popup-media-box {
  width: 100%;
  height: 100%;
  min-height: 280px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem;
  overflow: hidden;
}

.alf-media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.1) 40%, rgba(0, 0, 0, 0.65) 100%);
  z-index: 1;
}

.alf-media-badges,
.alf-media-status {
  position: relative;
  z-index: 2;
}

.alf-media-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.alf-media-badge-new {
  background: #e11d48;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.35);
}

.alf-media-badge-dept {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.alf-media-status {
  display: inline-flex;
  align-items: center;
  background: rgba(16, 185, 129, 0.9);
  color: #ffffff;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  width: fit-content;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.alf-live-beacon {
  position: relative;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.alf-live-beacon .alf-beacon-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #ffffff;
}

.alf-live-beacon .alf-beacon-ping {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.6);
  animation: alfBeaconPulse 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes alfBeaconPulse {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* Content Box */
.alf-popup-content-box {
  background: #ffffff;
}

.alf-scheme-eyebrow {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #4b7a15;
}

.alf-scheme-title {
  font-size: 1.38rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.alf-scheme-title a {
  color: #0f172a;
  text-decoration: none;
  transition: color 0.2s ease;
}

.alf-scheme-title a:hover {
  color: #6da41f;
}

.alf-scheme-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.alf-pill-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 5px 12px;
  border-radius: 8px;
  color: #334155;
}

.alf-scheme-description {
  font-size: 0.92rem;
  color: #475569;
  line-height: 1.6;
}

/* Buttons */
.alf-btn-apply-main {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  height: 46px;
  background: linear-gradient(135deg, #77b122 0%, #588814 100%);
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: 10px;
  border: 1px solid #588814;
  box-shadow: 0 4px 14px rgba(119, 177, 34, 0.4);
  transition: all 0.25s ease;
  overflow: hidden;
}

.alf-btn-apply-main:hover {
  background: linear-gradient(135deg, #679e19 0%, #4a740f 100%);
  box-shadow: 0 6px 20px rgba(119, 177, 34, 0.55);
  transform: translateY(-2px);
  color: #ffffff !important;
}

.alf-btn-apply-main .alf-arrow-animated {
  transition: transform 0.25s ease;
}

.alf-btn-apply-main:hover .alf-arrow-animated {
  transform: translateX(4px);
}

.alf-btn-details-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  height: 46px;
  background: #f8fafc;
  color: #334155 !important;
  font-size: 13px;
  font-weight: 700;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  transition: all 0.2s ease;
}

.alf-btn-details-secondary:hover {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff !important;
  transform: translateY(-2px);
}

/* Swiper Navigation Arrows */
.alf-swiper-nav-prev,
.alf-swiper-nav-next {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
  z-index: 10;
}

.alf-swiper-nav-prev::after,
.alf-swiper-nav-next::after {
  display: none !important;
}

.alf-swiper-nav-prev:hover,
.alf-swiper-nav-next:hover {
  background: #77b122;
  border-color: #77b122;
  color: #ffffff;
  transform: scale(1.1);
}

/* Modal Footer */
.alf-schemes-modal-footer {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 0.9rem 1.75rem;
}

/* Swiper Pagination Bullets */
.alf-popup-pagination {
  position: static !important;
  width: auto !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.alf-popup-pagination .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: #94a3b8;
  opacity: 0.5;
  transition: all 0.25s ease;
  margin: 0 !important;
}

.alf-popup-pagination .swiper-pagination-bullet-active {
  width: 24px;
  border-radius: 999px;
  background: #77b122;
  opacity: 1;
}

/* Floating Quick Trigger Button */
.alf-floating-schemes-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9990;
  background: linear-gradient(135deg, #0e2a14 0%, #1c4d26 100%);
  color: #ffffff;
  border: 2px solid #a3e635;
  box-shadow: 0 10px 25px rgba(14, 42, 20, 0.45);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
}

.alf-floating-schemes-btn:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 14px 30px rgba(14, 42, 20, 0.6);
  background: linear-gradient(135deg, #153c1d 0%, #286e36 100%);
}

.alf-floating-ping {
  width: 8px;
  height: 8px;
  background: #a3e635;
  border-radius: 50%;
  margin-right: 8px;
  display: inline-block;
  box-shadow: 0 0 0 rgba(163, 230, 53, 0.7);
  animation: alfPulseRing 2s infinite;
}

@keyframes alfPulseRing {
  0% { box-shadow: 0 0 0 0 rgba(163, 230, 53, 0.8); }
  70% { box-shadow: 0 0 0 10px rgba(163, 230, 53, 0); }
  100% { box-shadow: 0 0 0 0 rgba(163, 230, 53, 0); }
}

/* RTL Support for Urdu */
.locale-ur .alf-floating-schemes-btn {
  right: auto;
  left: 24px;
}

.locale-ur .alf-floating-ping {
  margin-right: 0;
  margin-left: 8px;
}

.locale-ur .alf-btn-apply-main .alf-arrow-animated {
  transform: rotate(180deg);
}

.locale-ur .alf-btn-apply-main:hover .alf-arrow-animated {
  transform: rotate(180deg) translateX(4px);
}

.locale-ur .alf-live-beacon {
  margin-right: 0;
  margin-left: 8px;
}

/* Mobile Responsiveness */
@media (max-width: 991px) {
  .alf-popup-media-box {
    min-height: 220px;
    height: 220px;
  }
  .alf-popup-slide-inner {
    min-height: auto;
  }
  .alf-modal-headline {
    font-size: 1.25rem;
  }
}

@media (max-width: 575px) {
  .alf-schemes-modal-dialog {
    margin: 0.5rem;
  }
  .alf-schemes-modal-header {
    padding: 1rem;
  }
  .alf-popup-content-box {
    padding: 1.25rem !important;
  }
  .alf-popup-actions {
    flex-direction: column;
    width: 100%;
  }
  .alf-btn-apply-main,
  .alf-btn-details-secondary {
    width: 100%;
  }
  .alf-floating-schemes-btn {
    bottom: 16px;
    right: 16px;
    padding: 8px 14px;
  }
  .locale-ur .alf-floating-schemes-btn {
    left: 16px;
    right: auto;
  }
}



