/* ══════════════════════════════
   index.css — index.php
   ══════════════════════════════ */

/* ── Home page: navbar is position:absolute so no padding-top needed ── */
body { padding-top: 0; }

/* ── Reveal animation ── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .55s ease, transform .55s ease; }
.reveal.revealed { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }

/* ── FAB (Floating Action Button) ── */
.fab-wrap {
  position: fixed; bottom: 32px; right: 28px; z-index: 1200;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}
.fab-main {
  width: 52px; height: 52px; border-radius: 50%;
  background: #7c3aed; color: #fff; border: none;
  font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 18px rgba(124,58,237,.45);
  cursor: pointer; transition: background .2s, transform .2s; flex-shrink: 0;
}
.fab-main:hover { background: #6d28d9; }
.fab-main.open  { background: #374151; }
.fab-items {
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  overflow: hidden; max-height: 0; opacity: 0;
  pointer-events: none;
  transition: max-height .35s ease, opacity .25s ease;
}
.fab-items.open { max-height: 400px; opacity: 1; pointer-events: auto; }
.fab-item { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #111; }
.fab-item-label {
  background: #fff; border-radius: 20px; padding: 7px 16px;
  font-size: .82rem; font-family: 'Mitr', sans-serif;
  white-space: nowrap; box-shadow: 0 2px 12px rgba(0,0,0,.12);
  transition: background .2s, color .2s;
}
.fab-item:hover .fab-item-label { background: #7c3aed; color: #fff; }
.fab-item-dot {
  width: 36px; height: 36px; border-radius: 50%;
  background: #e5e7eb; flex-shrink: 0; transition: background .2s;
}
.fab-item:hover .fab-item-dot { background: #7c3aed; }

/* ══════════════════════════════
   Homepage services section
   ══════════════════════════════ */
.svc-home-section {
  padding: 80px 0;
  background: #f8faf8;
}
.svc-home-card {
  background: #fff;
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 2px 16px rgba(0,0,0,.07);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .25s, box-shadow .25s;
}
.svc-home-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,.12);
}
.svc-home-icon {
  width: 52px; height: 52px; border-radius: 12px;
  background: linear-gradient(135deg, #16a34a22 0%, #15803d33 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: #16a34a;
}
.svc-home-title {
  font-size: 1rem; font-weight: 600;
  color: #111827; margin: 0;
}
.svc-home-desc {
  font-size: .875rem; color: #6b7280;
  line-height: 1.6; margin: 0;
  flex: 1;
}

/* ===== HERO ===== */
#hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-slider { position: absolute; inset: 0; z-index: 0; }

.hero-slide {
  position: absolute;
  inset: 0;
  background-color: var(--g-800);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hero-slide.active { opacity: 1; }

.hero-progress {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 3;
  display: flex;
  gap: 4px;
  padding: 0;
}

.hero-progress-tube {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,.25);
  overflow: hidden;
  cursor: pointer;
}

.hero-progress-fill {
  height: 100%;
  width: 0%;
  background: rgba(255,255,255,.85);
  transition: width 0.1s linear;
}

.hero-progress-tube.active .hero-progress-fill {
  animation: tubeFill 5s linear forwards;
}

@keyframes tubeFill {
  from { width: 0%; }
  to   { width: 100%; }
}

#hero .hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to right,
    rgba(8,14,7,0.55) 0%,
    rgba(8,14,7,0.2) 55%,
    transparent 100%
  );
}

#hero .container-xl { position: relative; z-index: 2; }

#hero .hero-content {
  position: relative;
  z-index: 2;
  padding: 0 2vw;
  max-width: 680px;
  transform: translateY(-15vh);
}

#hero .hero-subtitle {
  font-size: clamp(2.57rem, 5.45vw, 4.16rem);
  font-weight: 400;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 0.4rem;
  text-shadow: 0 2px 20px rgba(0,0,0,.3);
}

#hero .hero-title {
  font-size: clamp(1.95rem, 3.9vw, 3.02rem);
  font-weight: 300;
  color: rgba(255,255,255,.9);
  line-height: 1.4;
  text-shadow: 0 1px 8px rgba(0,0,0,.2);
}

#hero .hero-desc {
  font-size: clamp(0.8rem, 1.4vw, 1.1rem);
  font-weight: 300;
  color: rgba(255,255,255,.75);
  line-height: 1.5;
  margin-top: 0.6rem;
  text-shadow: 0 1px 6px rgba(0,0,0,.2);
  white-space: nowrap;
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,.6);
  font-size: 0.75rem;
}

.scroll-dot {
  width: 8px; height: 8px;
  background: rgba(255,255,255,.6);
  border-radius: 50%;
  animation: bounce 1.6s infinite;
}

@keyframes bounce {
  0%,100% { transform: translateY(0); opacity:.6; }
  50%      { transform: translateY(8px); opacity:1; }
}

/* ===== MISSION TAGLINE ===== */
.mission-section {
  padding: 4rem 0 0;
  background: #fff;
  overflow: hidden;
  text-align: center;
}

.mission-text {
  max-width: none;
  margin: 0 auto 2.5rem;
}

.mission-heading {
  font-size: clamp(3.1rem, 6.73vw, 4.77rem);
  font-weight: 400;
  color: var(--g-700);
  line-height: 1.15;
  margin-bottom: 0.1rem;
  white-space: nowrap;
  text-align: center;
}

.mission-sub {
  font-size: clamp(2.05rem, 4.44vw, 3.15rem);
  font-weight: 400;
  color: var(--g-700);
  line-height: 1.4;
  margin-bottom: 0.4rem;
}

.mission-desc {
  font-size: clamp(1.1rem, 2.2vw, 1.49rem);
  color: var(--g-500);
  line-height: 1.7;
  font-weight: 300;
  margin-top: 0.2rem;
  white-space: nowrap;
  text-align: center;
}

.mission-earth {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin-top: -13%;
}

.mission-earth-img {
  width: 100%;
  max-width: 1260px;
  height: auto;
  display: block;
  margin-top: -4%;
}

/* ── Mission Slider ── */
.mission-slider {
  position: relative;
  width: 100%;
  max-width: 1260px;
  margin-top: 10%;
}
.mission-slide {
  width: 100%;
  height: auto;
  display: block;
  position: absolute;
  top: 0; left: 0;
  opacity: 0;
  transition: opacity .9s ease;
  pointer-events: none;
}
.mission-slide.active {
  opacity: 1;
  position: relative;
  pointer-events: auto;
}

@media (max-width: 991px) {
  /* Mission — ยกเลิก nowrap บน tablet/mobile */
  .mission-heading { white-space: normal; font-size: clamp(1.8rem, 5vw, 2.8rem); }
  .mission-sub     { font-size: clamp(1.3rem, 4vw, 2rem); }
  .mission-desc    { white-space: normal; font-size: clamp(1rem, 3vw, 1.5rem); text-align: center; }
}

@media (max-width: 768px) {
  .mission-section { padding: 3rem 0 0; }
  .mission-earth-img { max-width: 480px; }

  /* Hero — ลดขนาดบน mobile */
  #hero .hero-subtitle { font-size: clamp(1.8rem, 7vw, 2.8rem); }
  #hero .hero-title    { font-size: clamp(1.1rem, 4.5vw, 1.6rem); }

  /* News section — stack columns */
  .news-cat-info,
  .news-cat-info--right { padding: 2rem 1.5rem; }
  .news-cat-carousel-wrap { padding: 1.5rem 1rem; }
}

@media (max-width: 576px) {
  .mission-heading { font-size: clamp(1.4rem, 6.5vw, 2rem); }
  .mission-sub     { font-size: clamp(1.1rem, 5vw, 1.5rem); }
  .mission-desc    { font-size: clamp(0.9rem, 4vw, 1.2rem); }
  #hero .hero-subtitle { font-size: clamp(1.5rem, 8vw, 2.2rem); }
  #hero .hero-title    { font-size: clamp(1rem, 5vw, 1.4rem); }
}

/* ===== NEWS (card-style) ===== */
.news-section { padding: 5rem 0; background: var(--g-50); }

.news-card {
  border: none;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,.07);
  transition: transform 0.25s, box-shadow 0.25s;
  height: 100%;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
}

.news-card .card-img-top { height: 200px; object-fit: cover; }
.news-card .card-body { padding: 1.25rem; }

.news-badge {
  font-size: 0.72rem;
  background: var(--g-600);
  color: #fff;
  padding: 2px 10px;
  border-radius: 50px;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.news-card .card-title {
  font-size: 0.95rem;
  font-weight: 400;
  color: #222;
  line-height: 1.5;
}

.news-card .card-date {
  font-size: 0.78rem;
  color: #999;
  margin-top: 0.5rem;
}

/* ===== NEWS CATEGORIES ===== */
.news-cat-section {
  position: relative;
}

.news-cat-featured-wrap {
  padding: 2.5rem 1rem 2.5rem 2rem;
  display: flex;
  align-items: center;
}

.news-cat-featured-wrap .nc-card-index {
  min-width: 100%;
  max-width: 100%;
}

.news-cat-info {
  padding: 4rem 2vw 4rem 3vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.news-cat-info > .btn-cesm {
  align-self: flex-start;
}

.news-cat-info--right {
  padding: 4rem 3vw 4rem 2vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.news-cat-info--right > .btn-cesm {
  align-self: flex-start;
}

.news-cat-info--proc {
  padding-left: 3vw;
}

.news-cat-title {
  font-size: clamp(2.4rem, 1.92vw, 1.54rem);
  font-weight: 400;
  color: var(--g-700);
  margin-bottom: 0.1rem;
  line-height: 1.2;
}

.news-cat-sub {
  font-size: clamp(1.8rem, 1.8vw, 1.3rem);
  font-weight: 300;
  color: var(--g-500);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.news-cat-desc {
  font-size: 1.25rem;
  font-weight: 300;
  color: #888;
  line-height: 1.75;
  margin-bottom: 1.2rem;
}

/* Carousel wrap */
.news-cat-carousel-wrap {
  padding: 2.5rem 2rem;
  display: flex;
  align-items: center;
}

.news-mini-carousel {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 8px;
}

.nc-track-wrap { flex: 1; overflow: hidden; }

.nc-track {
  display: flex;
  gap: 12px;
  transition: transform 0.3s ease;
  will-change: transform;
  transform: translateZ(0); /* force GPU layer at paint time */
}

.nc-card-index {
  min-width: calc(33.333% - 8px);
  max-width: calc(33.333% - 8px);
  background: transparent;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  position: relative;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: pointer;
  transition: transform .25s ease;
}
.nc-card-index:hover {
  transform: translateY(-4px);
  color: inherit;
  text-decoration: none;
}

.nc-card-index img {
  width: 100%;
  aspect-ratio: 8 / 5;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 14px;
}

.nc-body { padding: 0.75rem 0.2rem 0; }

.nc-date { font-size: .83rem; font-weight: 300; color: #9F9F9F; margin-bottom: 5px; }

.nc-title {
  font-size: .99rem;
  font-weight: 500;
  color: #585858;
  line-height: 1.4;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nc-desc {
  font-size: .86rem;
  font-weight: 300;
  color: #9F9F9F;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 4px;
}

.nc-card-index:hover .nc-title { color: var(--g-600); }

/* Placeholder when no image */
.nc-img-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--g-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--g-300);
  border-radius: 14px;
}

/* ── Featured card highlight ── */
.nc-card--featured {
  box-shadow: 0 0 0 2px #f59e0b, 0 4px 16px rgba(245,158,11,.18);
}

/* Badge row (top overlay) */
.nc-badge-row {
  position: absolute;
  top: 10px; left: 10px; right: 10px;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  pointer-events: none;
  z-index: 2;
}

.nc-tag-new {
  background: #ef4444;
  color: #fff;
  font-size: .58rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: .5px;
}

.nc-tag-featured {
  background: #f59e0b;
  color: #fff;
  font-size: .58rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

/* ITA badge logo */
.nc-ita-badge {
  margin-left: auto;
  position: static;
  top: auto; right: auto;
  width: 40px; height: 28px;
  background: rgba(255,255,255,.92);
  border-radius: 5px;
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
  padding: 2px 3px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nc-ita-badge img { width: 100%; height: 100%; object-fit: contain; }

/* SDG badge row */
.sdg-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 6px;
}

.sdg-badge-img { object-fit: cover; cursor: default; }

.nc-arrow {
  background: #fff;
  border: 1px solid var(--g-300);
  border-radius: 50%;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--g-600);
  flex-shrink: 0;
  transition: opacity .15s;
}

.nc-arrow:hover {
  opacity: 0.75;
}
/* ป้องกัน font hit-testing ช้า — ให้ click ผ่านถึง button โดยตรง */
.nc-arrow i,
button[onclick*="Slide"] i,
button[onclick*="slide"] i {
  pointer-events: none;
}

/* static image wrap */
.news-cat-img-wrap {
  padding: 2rem;
  display: flex; align-items: center; justify-content: center;
}

.news-cat-img-wrap img {
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 12px;
}

/* Banner sections (จัดซื้อ / รับสมัครงาน) */
.news-cat-banner-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  max-height: 600px;
  background: #ffffff;
}
.news-cat-banner-img {
  width: 100%;
  height: 100%;
  max-height: 600px;
  object-fit: contain;
  display: block;
}
.news-cat-banner-placeholder {
  width: 100%;
  min-height: 280px;
  background: var(--ph-bg, #f0f4ff);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--ph-color, #4f46e5);
}
.news-cat-banner-placeholder i {
  font-size: 4rem;
  opacity: .45;
}
.news-cat-banner-placeholder span {
  font-size: 1.1rem;
  font-weight: 600;
  opacity: .6;
}

@media (max-width: 991px) {
  .news-cat-info, .news-cat-info--right {
    border: none;
    border-bottom: 1px solid var(--g-200);
    padding: 2rem 1.25rem;
  }
  .news-cat-carousel-wrap { padding: 1.5rem 1rem; }
}

/* ===== SERVICES SECTION (homepage) ===== */
.services-section { padding: 5rem 0; background: #fff; }

.service-card {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: 16px;
  background: var(--g-50);
  transition: background 0.25s, transform 0.25s;
  height: 100%;
}

.service-card:hover {
  background: var(--g-700);
  transform: translateY(-4px);
}

.service-card:hover .service-icon,
.service-card:hover .service-title,
.service-card:hover .service-desc { color: #fff; }

.service-icon {
  font-size: 2.5rem;
  color: var(--g-600);
  margin-bottom: 1rem;
  transition: color 0.25s;
}

.service-title {
  font-size: 1rem;
  font-weight: 500;
  color: #222;
  margin-bottom: 0.5rem;
  transition: color 0.25s;
}

.service-desc {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.7;
  transition: color 0.25s;
}

/* ===== HIGHLIGHT BANNER ===== */
.highlight-banner {
  padding: 5rem 0;
  background: linear-gradient(135deg, var(--g-700) 0%, var(--g-900) 100%);
  color: #fff;
}

/* ===== AIR QUALITY SECTION ===== */
.aq-section {
  padding: 0 0 30px;
  background: var(--g-50);
}

.aq-section .aq-header-bg {
  border-radius: 0;
  padding: 2.26rem 2rem 1.33rem;
  margin-bottom: 0.5rem;
  width: 100%;
  position: relative;
  overflow: hidden;
}
.aq-section .aq-header-bg > .text-center {
  position: relative;
  z-index: 1;
}

.aq-section .aq-header-bg > .text-center {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.aq-section .aq-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
#aqSummaryRow {
  margin-top: -2.5rem;
}
.aq-header-bg .section-title::after { display: none; }

/* ── AQ Animations ── */
@keyframes aq-shimmer {
  0%   { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}
@keyframes pulse-dot {
  0%, 100% { transform: scale(1);   opacity: .7; }
  50%       { transform: scale(2);  opacity: 0; }
}
@keyframes float-icon {
  0%, 100% { transform: translateY(0);   }
  50%       { transform: translateY(-5px); }
}

/* Live dot */
.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  vertical-align: middle;
  margin-right: 6px;
  position: relative;
}
.live-dot::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(16,185,129,.35);
  animation: pulse-dot 2s ease-in-out infinite;
}

.aq-header-bg .section-label {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 3px;
  color: var(--g-500);
  margin-bottom: 0.36rem;
}

.aq-header-bg .section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 400;
  color: var(--g-800);
  margin-bottom: 0.36rem;
}

.aq-header-bg .section-subtitle {
  font-size: clamp(1.6rem, 3.05vw, 2.08rem);
  font-weight: 400;
  color: var(--g-500);
  margin-top: 0.36rem;
  margin-bottom: 0.36rem;
}

.aq-header-bg .text-muted {
  font-size: clamp(1.18rem, 1.87vw, 1.37rem);
  font-weight: 300;
  color: #777 !important;
  line-height: 1.75;
  margin-top: 0.73rem !important;
}

/* Summary stats row */
.aq-sum-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  padding: .9rem 1.1rem;
  display: flex;
  align-items: center;
  gap: .9rem;
}
.aq-sum-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.aq-sum-label {
  font-size: .72rem;
  color: var(--g-500);
  margin-bottom: .1rem;
}
.aq-sum-val {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--g-800);
  line-height: 1.2;
}

/* Station count label */
.aq-station-count {
  font-size: .82rem;
  color: var(--g-500);
  font-weight: 400;
}

.aq-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 16px rgba(0,0,0,.07);
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease, outline-color .3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1.2rem 1.3rem 0;
  outline: 2px solid transparent;
}

.aq-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(0,0,0,.14);
  outline-color: rgba(16,185,129,.35);
}

/* ── Header ── */
.aq-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: 1rem;
  border: none;
  padding: 0;
}

.aq-header-text {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}

.aq-station-name {
  font-size: .95rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.3;
}

.aq-station-sub {
  font-size: .75rem;
  color: #94a3b8;
}

.aq-weather-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--g-100);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .4s ease;
  animation: float-icon 3.5s ease-in-out infinite;
}

.aq-station-icon {
  font-size: 1.15rem;
  color: var(--cesm-primary);
}

/* ── AQI Number ── */
.aq-aqi-section {
  display: flex;
  align-items: baseline;
  gap: .4rem;
  margin-bottom: .9rem;
}

.aq-aqi-num {
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--aq-color, #cbd5e1);
  transition: color .4s ease;
}

.aq-aqi-unit {
  font-size: .85rem;
  font-weight: 500;
  color: #94a3b8;
}

/* ── Health face icon (IQAir SVG) ── */
.aq-health-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  align-self: center;
}
.aq-face-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  opacity: .25;
  transition: opacity .4s ease;
}
.aq-card.aq-loaded .aq-face-img {
  opacity: 1;
}

/* ── Metric rows ── */
.aq-metrics-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-bottom: .9rem;
}

.aq-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .8rem;
}

.aq-metric-lbl {
  color: #64748b;
}

.aq-metric-val {
  font-weight: 600;
  color: #1e293b;
}

.aq-metric-unit {
  font-size: .72rem;
  color: #94a3b8;
}

.aq-bar-wrap {
  height: 5px;
  background: var(--g-100);
  border-radius: 99px;
  overflow: hidden;
}

.aq-bar-fill {
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: var(--aq-color, #a8e05f);
  transition: width .8s ease;
}

/* ── Quality badge row ── */
.aq-quality-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .9rem;
}

.aq-quality-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--g-50);
  border: 1px solid var(--g-200);
  border-radius: 20px;
  padding: .25rem .7rem;
  font-size: .78rem;
  font-weight: 500;
  color: #334155;
}

.aq-quality-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  flex-shrink: 0;
  transition: background .4s ease;
}

.aq-quality-label { line-height: 1; }

.aq-temp-display {
  font-size: .82rem;
  font-weight: 500;
  color: #64748b;
}

/* ── Footer ── */
.aq-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .6rem 0;
  font-size: .74rem;
  color: #94a3b8;
  border-top: 1px solid var(--g-100);
  margin-top: auto;
}

.aq-detail-link {
  color: var(--cesm-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: .75rem;
  transition: opacity .2s;
}
.aq-detail-link:hover { opacity: .7; }

/* ── Loading shimmer ── */
.aq-card:not(.aq-loaded):not(.aq-error) .aq-aqi-num,
.aq-card:not(.aq-loaded):not(.aq-error) .aq-metric-val,
.aq-card:not(.aq-loaded):not(.aq-error) .aq-updated,
.aq-card:not(.aq-loaded):not(.aq-error) .aq-quality-label,
.aq-card:not(.aq-loaded):not(.aq-error) .aq-temp-display {
  color: transparent !important;
  background: linear-gradient(90deg, var(--g-100) 25%, var(--g-200) 50%, var(--g-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Offline card ── */
.aq-card.aq-error { opacity: .7; }

.aq-offline-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem .5rem;
  text-align: center;
  flex: 1;
}

.aq-offline-icon {
  font-size: 2rem;
  color: #cbd5e1;
  margin-bottom: .6rem;
}

.aq-offline-text {
  font-size: .88rem;
  font-weight: 500;
  color: #94a3b8;
  margin: 0;
}

.aq-offline-sub {
  font-size: .75rem;
  color: #cbd5e1;
  margin: .25rem 0 0;
}

/* Offline overlay */
.aq-offline-overlay {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  z-index: 10;
  color: #94a3b8;
  font-size: .85rem;
  font-weight: 500;
  pointer-events: none;
}
.aq-offline-overlay i {
  font-size: 1.6rem;
  color: #cbd5e1;
}

/* ===== E-SERVICES ===== */
.esvc-section {
  padding: 10px 0 72px;
  background: #fff;
}

.esvc-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  border-bottom: 2px solid var(--g-200);
  margin-bottom: 2.5rem;
}

.esvc-tab {
  background: none;
  border: none;
  padding: .65rem 2rem;
  font-size: .92rem;
  font-family: 'Mitr', sans-serif;
  color: var(--g-400);
  cursor: pointer;
  position: relative;
  transition: color .2s;
}

.esvc-tab::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 2px;
  background: var(--cesm-primary);
  transform: scaleX(0);
  transition: transform .25s ease;
}

.esvc-tab.active { color: var(--cesm-primary); font-weight: 500; }
.esvc-tab.active::after { transform: scaleX(1); }

.esvc-panel { display: none; }
.esvc-panel.active { display: block; }

.esvc-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem 4.5rem;
}

.esvc-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  color: #374151;
  transition: transform .2s;
  width: 90px;
}

.esvc-item:hover { transform: translateY(-4px); color: var(--cesm-primary); }

.esvc-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--g-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--g-600);
  background: #fff;
  transition: border-color .2s, color .2s, background .2s;
}

.esvc-item:hover .esvc-icon-wrap {
  border-color: var(--cesm-primary);
  color: var(--cesm-primary);
  background: var(--g-50);
}

.esvc-label {
  font-size: .78rem;
  text-align: center;
  line-height: 1.3;
  font-weight: 500;
}

/* ===== E-SERVICES SECTION ===== */
.esvc-section {
  padding: 0.5rem 0 3.5rem;
  background: #fff;
}
.esvc-section .section-title::after { display: none; }
.esvc-section .section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 400;
}
.esvc-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 2rem;
  border-bottom: 1.5px solid var(--g-200);
}
.esvc-tab-btn {
  padding: .6rem 2rem;
  border: none;
  border-bottom: 1.5px solid transparent;
  margin-bottom: -2px;
  background: transparent;
  color: var(--g-400);
  font-family: 'Mitr', sans-serif;
  font-size: 1.1rem;
  font-weight: 300;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: color .2s, border-color .2s;
}
.esvc-tab-btn.active {
  color: var(--g-700);
  border-bottom-color: var(--g-600);
}
.esvc-tab-btn:hover:not(.active) {
  color: var(--g-600);
}
.esvc-tab-pane { display: block; }
.esvc-tab-pane.d-none { display: none; }
.esvc-app-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 1.5rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .esvc-app-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 576px) {
  .esvc-app-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem .75rem; }
}
.esvc-app-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--g-800);
  transition: transform .25s ease;
  width: 100%;
}
.esvc-app-item:hover {
  transform: translateY(-6px);
  color: var(--cesm-primary);
}
.esvc-app-icon {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 22px;
  overflow: hidden;
  background: var(--g-100);
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: box-shadow .25s ease;
}
.esvc-app-item:hover .esvc-app-icon {
  box-shadow: 0 10px 28px rgba(0,0,0,.18);
}
.esvc-app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.esvc-app-icon-placeholder {
  font-size: 2.2rem;
  color: var(--g-400);
}
.esvc-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--g-400);
}
.esvc-empty i {
  font-size: 2.5rem;
  display: block;
  margin-bottom: .75rem;
}
.esvc-empty p {
  font-size: .95rem;
  margin: 0;
}
.esvc-app-label {
  font-size: .82rem;
  text-align: center;
  line-height: 1.3;
  max-width: 90px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}
.esvc-app-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
}
.esvc-manual-btn {
  font-size: 1rem;
  padding: .35rem 1.8rem;
  border: 1.5px solid #C5996C;
  border-radius: 20px;
  color: #C5996C;
  text-decoration: none;
  transition: all .2s;
  background: transparent;
  white-space: nowrap;
  font-weight: 500;
}
.esvc-manual-btn:hover {
  background: #C5996C;
  color: #fff;
}
.esvc-manual-placeholder {
  display: block;
  height: 1.6rem;
}

/* ===== SDG SECTION ===== */
.sdg-section {
  padding: 0;
  background: #fff;
}

.sdg-desc-box {
  margin-bottom: 1.75rem;
  text-align: center;
  font-size: clamp(1.18rem, 1.87vw, 1.37rem);
  font-weight: 300;
  color: var(--g-700);
  line-height: 1.8;
}

.sdg-grid-row {
  display: grid;
  gap: 0;
  width: 100%;
}
.sdg-grid-row--1 { grid-template-columns: repeat(9, 1fr); }
.sdg-grid-row--2 { grid-template-columns: repeat(8, 1fr); max-width: calc(100% * 8/9); }

.sdg-tile img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform .2s, filter .2s;
}

.sdg-tile:hover img {
  transform: scale(1.06);
  filter: brightness(1.1);
  z-index: 1;
  position: relative;
}

@media (max-width: 600px) {
  .sdg-grid-row--1 { grid-template-columns: repeat(5, 1fr); }
  .sdg-grid-row--2 { grid-template-columns: repeat(4, 1fr); max-width: 100%; }
}

/* ══════════════════════════════════════
   PROCUREMENT IMAGE CAROUSEL (5 portrait images)
   ══════════════════════════════════════ */
.proc-img-grid-wrap {
  padding: 0;
  display: flex;
  align-items: stretch;
}
.proc-carousel {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 2.5rem 1rem 2.5rem 2.5rem;
  gap: 10px;
  height: 100%;
  min-height: 520px;
}
.proc-track-wrap {
  flex: 1;
  overflow: hidden;
}
.proc-track {
  display: flex;
  gap: 10px;
  transition: transform 0.3s ease;
  will-change: transform;
  transform: translateZ(0);
}
.proc-img-item {
  min-width: calc(25% - 8px);
  max-width: calc(25% - 8px);
  height: 400px;
  border-radius: 12px;
  overflow: hidden;
  background: #e8eceb;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-decoration: none;
  transition: opacity .2s;
}
.proc-img-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform .35s ease;
}
.proc-img-item:hover img { transform: scale(1.05); }
.proc-img-item:hover { opacity: .9; }
.proc-placeholder-icon {
  font-size: 2.5rem;
  color: #ccc;
}
@media (max-width: 768px) {
  .proc-carousel { padding: 1.5rem 1rem; }
  .proc-img-item { min-width: calc(50% - 6px); max-width: calc(50% - 6px); }
}

/* ===== MOBILE RESPONSIVE (hero content) ===== */
@media (max-width: 768px) {
  #hero .hero-content { padding: 0 1.5rem; transform: translateY(-5vh); }
  .stats-bar .col { min-width: 50%; }
}
@media (max-width: 576px) {
  #hero .hero-content { transform: translateY(-3vh); }
}
