/**
 * Homepage hotfix — E-Service + Quick links sidebar.
 * Scoped to .nh-home and .nh-hotfix. Load only on site homepage. Safe rollback: remove link in layout.
 */

/* Design tokens (hotfix only) */
.nh-home.nh-hotfix,
.nh-home .nh-hotfix {
  --radius: 14px;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  --border: 1px solid rgba(0, 0, 0, 0.08);
  --bg-surface: rgba(255, 255, 255, 0.7);
  --text: #1f2a1f;
  --muted: rgba(0, 0, 0, 0.6);
  --accent-green: #2d5a3d;
  --accent-yellow: #c9a227;
  --accent-yellow-soft: #f5ecd8;
}

.nh-home .nh-hotfix-container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--nh-inner-inline);
  padding-right: var(--nh-inner-inline);
}

@media (min-width: 768px) {
  .nh-home .nh-hotfix-container {
    padding-left: var(--nh-inner-inline);
    padding-right: var(--nh-inner-inline);
  }
}

/* Shared card */
.nh-home .nh-hotfix-card {
  background: #fff;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.nh-home .nh-hotfix-card:focus-visible {
  outline: 2px solid var(--accent-green);
  outline-offset: 2px;
}

/* Buttons */
.nh-home .nh-hotfix-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: filter 0.2s ease, box-shadow 0.2s ease;
}

.nh-home .nh-hotfix-btn:focus-visible {
  outline: 2px solid var(--accent-green);
  outline-offset: 2px;
}

.nh-home .nh-hotfix-btn--primary {
  background: var(--accent-green);
  color: #fff;
  box-shadow: 0 2px 8px rgba(45, 90, 61, 0.3);
}

.nh-home .nh-hotfix-btn--primary:hover {
  filter: brightness(1.08);
}

.nh-home .nh-hotfix-btn--secondary {
  background: var(--accent-yellow-soft);
  color: var(--text);
  border: var(--border);
}

.nh-home .nh-hotfix-btn--secondary:hover {
  box-shadow: var(--shadow);
}

/* ========== E-Service hotfix — feature panel ========== */
.nh-home .nh-eservice-hotfix {
  padding-top: 24px;
  padding-bottom: 24px;
}

.nh-home .nh-eservice-feature.nh-eservice-panel {
  background: var(--bg-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  border: var(--border);
  position: relative;
  overflow: hidden;
}

.nh-home .nh-eservice-feature.nh-eservice-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 24 24' fill='none' stroke='%232d5a3d' stroke-opacity='0.06' stroke-width='1'%3E%3Cpath d='M12 2L2 7l10 5 10-5-10-5z'/%3E%3Cpath d='M2 17l10 5 10-5'/%3E%3C/svg%3E");
  background-repeat: repeat;
  pointer-events: none;
  z-index: 0;
}

.nh-home .nh-eservice-hotfix__header,
.nh-home .nh-eservice-hotfix__grid {
  position: relative;
  z-index: 1;
}

.nh-home .nh-eservice-hotfix__header {
  margin-bottom: 22px;
}

.nh-home .nh-eservice-hotfix__title {
  display: inline-block;
  margin: 0;
  padding: 10px 22px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  background: linear-gradient(135deg, #fef9c3 0%, #fef08a 100%);
  border-radius: 9999px;
  border: var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.nh-home .nh-eservice-hotfix__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: stretch;
}

@media (min-width: 769px) {
  .nh-home .nh-eservice-hotfix__grid {
    grid-template-columns: 1fr 1.25fr 1fr;
  }
}

.nh-home .nh-eservice-card {
  background: #fff;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  padding: 20px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.nh-home .nh-eservice-card--main {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 253, 244, 0.5) 100%);
  border-color: rgba(45, 90, 61, 0.2);
}

.nh-home .nh-eservice-card__heading {
  margin: 0 0 8px;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text);
}

.nh-home .nh-eservice-card__sub {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.4;
}

.nh-home .nh-eservice-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.nh-home .nh-eservice-qr-link {
  display: block;
  margin-top: 10px;
}

.nh-home .nh-eservice-qr-img {
  max-width: 140px;
  height: auto;
  display: block;
  border-radius: 10px;
}

.nh-home .nh-eservice-qr-placeholder {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 10px;
  padding: 16px;
  margin-top: 10px;
}

.nh-home .nh-eservice-qr-placeholder__text {
  font-size: 0.9rem;
  color: var(--muted);
}

.nh-home .nh-eservice-shortcuts__heading {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.nh-home .nh-eservice-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.nh-home .nh-eservice-shortcut {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 88px;
  padding: 14px 10px;
  text-align: center;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  text-decoration: none;
  background: #fff;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.nh-home .nh-eservice-shortcut:focus-visible {
  outline: 2px solid var(--accent-green);
  outline-offset: 2px;
}

.nh-home .nh-eservice-shortcut__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  color: var(--accent-green);
}

.nh-home .nh-eservice-shortcut__icon svg {
  width: 28px;
  height: 28px;
}

.nh-home .nh-eservice-shortcut__label {
  line-height: 1.3;
}

/* ==== Homepage section headers: larger + icon accent ==== */
.home-page .tt-sectionTitle {
  font-size: 1.35rem;
}

@media (min-width: 640px) {
  .home-page .tt-sectionTitle {
    font-size: 1.5rem;
  }
}

.home-page .tt-sectionTitle__accent {
  width: 64px;
  height: 64px;
  min-height: 64px;
  border-radius: 999px;
  background: transparent;
  background-image: url("../../img src/icon_H6.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

@media (hover: hover) {
  .nh-home .nh-eservice-shortcut:hover,
  .nh-home .nh-eservice-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  }
}

@media (max-width: 768px) {
  .nh-home .nh-eservice-hotfix__grid {
    grid-template-columns: 1fr;
  }
  .nh-home .nh-eservice-feature.nh-eservice-panel {
    padding: 18px;
  }
}

/* ========== EMERGENCY: Mobile containment — prevent huge phone/SVG and vertical spacing ========== */
/* Root cause: SVG/imagery in E-Service hotfix can expand on mobile (e.g. flex/grid or global svg rules). */

/* 1) All img/svg inside hotfix section cannot exceed container */
.nh-hotfix.nh-eservice-hotfix img,
.nh-home .nh-hotfix.nh-eservice-hotfix img {
  max-width: 100%;
  height: auto;
  display: block;
}

.nh-hotfix.nh-eservice-hotfix svg,
.nh-home .nh-hotfix.nh-eservice-hotfix svg {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 2) Phone graphic wrapper (shortcut icon + shortcuts column): hard max size on mobile */
.nh-home .nh-eservice-shortcut__icon {
  flex-shrink: 0;
  max-width: 48px;
  max-height: 48px;
}

.nh-home .nh-eservice-shortcut__icon svg {
  width: 28px !important;
  height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
}

@media (max-width: 768px) {
  .nh-home .nh-eservice-hotfix .nh-eservice-shortcuts {
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
  }

  .nh-home .nh-eservice-hotfix .nh-eservice-hotfix__col--shortcuts {
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
  }

  /* Section: no excessive vertical space on mobile */
  .nh-home .nh-eservice-hotfix {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .nh-home .nh-eservice-feature.nh-eservice-panel {
    padding: 16px;
    min-height: 0;
  }

  /* QR/line image containment in LINE card */
  .nh-home .nh-eservice-qr-link {
    max-width: 200px;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
  }

  .nh-home .nh-eservice-qr-img {
    max-width: 100%;
    height: auto;
    display: block;
  }
}

/* E-Service section: light pale green background */
.nh-home .tt-section:has(.nh-eservice-hotfix) {
  background: #ecfdf5;
}

.nh-home .tt-section:has(.nh-eservice-hotfix)::before {
  background-image: radial-gradient(circle, #059669 1px, transparent 1px);
  opacity: 0.03;
}

/* Layout: Left (banner + QR + buttons) | Right (phone block, full height) */
.nh-home .nh-eservice-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: 24px;
  align-items: stretch;
}

.nh-home .nh-eservice-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.nh-home .nh-eservice-left .nh-eservice-buttons {
  margin-top: 0;
}

@media (max-width: 1024px) {
  .nh-home .nh-eservice-grid {
    grid-template-columns: 1fr;
  }
  .nh-home .nh-eservice-phoneCard__title {
    font-size: 1.5rem;
  }
  .nh-home .nh-eservice-phoneCard__img {
    max-width: 320px;
  }
}

/* E-Service phone card — stretches to match left column height */
.nh-home .nh-eservice-phoneCard {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  align-self: stretch;
}

.nh-home .nh-eservice-phoneCard:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.nh-home .nh-eservice-phoneCard__inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 20px 24px;
  min-height: 0;
}

.nh-home .nh-eservice-phoneCard__titleRow {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 14px 0 12px;
}

.nh-home .nh-eservice-phoneCard__titleIcon {
  width: 84px;
  height: auto;
  display: block;
}

.nh-home .nh-eservice-phoneCard__titleImg {
  max-width: 480px;
  height: auto;
  display: block;
}

.nh-home .nh-eservice-phoneCard__titleText {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.nh-home .nh-eservice-phoneCard__lineWrap {
  width: 100%;
  max-width: 360px;
  margin-bottom: 14px;
}

.nh-home .nh-eservice-phoneCard__lineImg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.nh-home .nh-eservice-phoneCard__img {
  width: 100%;
  max-width: 380px;
  height: auto;
  display: block;
  margin: 0 auto;
  flex: 1;
  object-fit: contain;
  object-position: center;
}

.nh-home .nh-eservice-phoneMockup {
  width: 100%;
  max-width: 180px;
  aspect-ratio: 9 / 19;
  border-radius: 24px;
  border: 8px solid #1f2937;
  background: #111827;
  padding: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.nh-home .nh-eservice-phoneMockup__screen {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.nh-home .nh-eservice-phoneMockup__logo {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent-green);
  letter-spacing: 0.05em;
}

.nh-home .nh-eservice-phoneMockup__text {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.nh-home .nh-eservice-phoneMockup__btns {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.nh-home .nh-eservice-phoneMockup__btn {
  padding: 6px 12px;
  font-size: 0.65rem;
  font-weight: 600;
  background: var(--primary-600, #0f4c81);
  color: #fff;
  border-radius: 9999px;
}

.nh-home .nh-eservice-phoneMockup__hint {
  margin: 4px 0 0;
  font-size: 0.6rem;
  color: var(--muted);
}

/* 8 service buttons grid */
.nh-home .nh-eservice-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 24px;
}

@media (max-width: 768px) {
  .nh-home .nh-eservice-buttons {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 20px;
  }
}

.nh-home .nh-eservice-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  text-decoration: none;
  color: var(--text);
  background: transparent;
  border: none;
  border-radius: var(--radius);
  box-shadow: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  text-align: center;
  overflow: hidden;
}

.nh-home .nh-eservice-btn:focus-visible {
  outline: 2px solid var(--accent-green);
  outline-offset: 2px;
}

/* Pre-baked image buttons (text included in image) — transparent background */
.nh-home .nh-eservice-btn--img {
  min-height: 100px;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  box-shadow: none;
}

.nh-home .nh-eservice-btn__img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* Disabled button — grey out, no hover, not clickable */
.nh-home .nh-eservice-btn--disabled {
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.5;
  filter: grayscale(0.6);
}

.nh-home .nh-eservice-btn__fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  padding: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  background: #f1f5f9;
  border-radius: var(--radius);
}

@media (hover: hover) {
  .nh-home .nh-eservice-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  }
  .nh-home .nh-eservice-btn--img:hover {
    transform: translateY(-3px);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.12));
  }
}


.nh-home .nh-eservice-bannerCard {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: var(--border);
}

/* LINE QR card — LINE CI green (#00B900) */
.nh-home .nh-eservice-qrCard {
  background: #00B900;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 185, 0, 0.4);
}

.nh-home .nh-eservice-bannerCard {
  padding: 0;
}

.nh-home .nh-eservice-bannerWrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
}

.nh-home .nh-eservice-bannerImg {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.nh-home .nh-eservice-bannerPlaceholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  padding: 20px;
  text-align: center;
  background: linear-gradient(135deg, #e8f5e9 0%, #d1fae5 100%);
}

.nh-home .nh-eservice-bannerPlaceholder__text {
  font-size: 0.95rem;
  color: var(--muted);
}

/* ========== Mobile responsive fixes — ไม่กระทบ desktop ========== */
@media (max-width: 767px) {
  /* ป้องกัน horizontal overflow ทั้งหน้า */
  .home-page,
  .home-page .frontpage,
  .home-page .nh-home,
  .home-page .nh-home__inner {
    overflow-x: hidden;
    max-width: 100vw;
  }

  /* Hero strip: ป้องกัน overflow (marquee ไหลตามปกติ) */
  .home-page .hero-strip__marquee-wrap {
    overflow: hidden;
    max-width: 100%;
  }

  /* Section title: ให้ wrap ได้ ไม่ล้น */
  .home-page .tt-sectionTitle,
  .home-page .nh-sectionTitle {
    max-width: 100%;
    word-wrap: break-word;
    white-space: normal;
  }

  /* Announcements two-col: grid เป็น column บน mobile */
  .home-page .announcements-two-col__grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
  }

  .home-page .announcements-two-col__right {
    order: -1; /* Quick links ขึ้นก่อนบน mobile */
  }

  /* Announcement item: flex wrap */
  .home-page .announcement-item__link {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .home-page .announcement-item__title {
    flex: 1;
    min-width: 0;
  }

  /* Visit stats: 2 columns บน mobile แคบ */
  .home-page .visit-stats__grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem;
  }

  .home-page .visit-stats__item {
    padding: 0.75rem;
  }

  .home-page .visit-stats__value {
    font-size: 1.25rem;
  }

  /* Activities grid: 1 column บน mobile แคบมาก */
  @media (max-width: 480px) {
    .home-page .activities__grid,
    .home-page .nh-activitiesGrid,
    .home-page .nh-grid {
      grid-template-columns: 1fr !important;
    }
  }

  /* Map section: iframe responsive */
  .home-page .map-section__wrap iframe {
    max-width: 100%;
  }

  /* Outside links: horizontal scroll ทำงาน */
  .home-page .outside-links__track {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
  }

  /* Attractions OTOP: cards stack */
  .home-page .attractions-otop__grid {
    grid-template-columns: 1fr !important;
  }

  .home-page .attractions-otop__cards {
    grid-template-columns: 1fr;
  }

  /* Hero: ลดพื้นที่ว่างด้านล่าง — ใช้ aspect-ratio แทน min-height */
  .home-page .hero.fullbleed {
    min-height: 0;
    aspect-ratio: 16 / 9;
    display: block;
  }

  .home-page .hero__slides,
  .home-page .hero__slide,
  .home-page .hero__slide .hero__img,
  .home-page .hero.fullbleed > .hero__img {
    height: 100%;
    min-height: 0;
  }

  .home-page .hero__slides {
    position: relative;
    height: 100%;
  }

  .home-page .hero__slide,
  .home-page .hero__slide.is-active {
    height: 100%;
  }

  .home-page .hero__slide .hero__img,
  .home-page .hero.fullbleed > .hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  /* Banner slider: ปุ่มไม่บังเนื้อหา */
  .home-page .nh-banner-slider__prev,
  .home-page .nh-banner-slider__next {
    width: 32px;
    height: 32px;
    font-size: 1.25rem;
  }

  /* Quick links: full width */
  .home-page .nh-quicklinks-hotfix {
    width: 100%;
  }

  .home-page .nh-quicklinks-hotfix__list {
    grid-template-columns: 1fr;
  }

  /* Container padding สม่ำเสมอ */
  .home-page .tt-container,
  .home-page .nh-container,
  .home-page .container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  /* ========== E-Service hotfix — mobile fixes ========== */
  /* แบนเนอร์: รูปต้องไม่ overflow */
  .home-page .nh-eservice-bannerWrap,
  .home-page .nh-eservice-bannerCard,
  .home-page .nh-eservice-left {
    overflow: hidden;
    max-width: 100%;
    min-width: 0;
  }

  .home-page .nh-eservice-grid {
    min-width: 0;
  }

  .home-page .nh-banner-slider__slide img,
  .home-page .nh-eservice-bannerImg {
    max-width: 100%;
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  /* บริการประชาชน title row: รูปไม่ล้น */
  .home-page .nh-eservice-phoneCard__titleRow {
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 0.5rem;
  }

  .home-page .nh-eservice-phoneCard__titleIcon {
    width: 56px;
    max-width: 20%;
  }

  .home-page .nh-eservice-phoneCard__titleImg {
    max-width: 100%;
    width: 100%;
  }

  /* 8 ปุ่มบริการ: 2 columns บน mobile แคบ */
  .home-page .nh-eservice-buttons {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }

  .home-page .nh-eservice-btn--img {
    min-height: 80px;
  }

  .home-page .nh-eservice-btn__img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
  }

  /* บัตร E-Service + LINE: ไม่ล้น */
  .home-page .nh-eservice-phoneCard__inner {
    padding: 16px;
    max-width: 100%;
  }

  .home-page .nh-eservice-phoneCard__lineWrap {
    max-width: 100%;
  }

  .home-page .nh-eservice-phoneCard__lineImg {
    max-width: 100%;
    width: 100%;
  }

  .home-page .nh-eservice-phoneCard__img {
    max-width: 100%;
  }

  /* Phone mockup: ข้อความ wrap */
  .home-page .nh-eservice-phoneMockup {
    max-width: 100%;
  }

  .home-page .nh-eservice-phoneMockup__screen {
    padding: 12px;
  }

  .home-page .nh-eservice-phoneMockup__text,
  .home-page .nh-eservice-phoneMockup__hint {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
  }

  /* Video iframe: responsive */
  .home-page .tt-exec-video__wrap {
    overflow: hidden;
  }

  .home-page .tt-exec-video__wrap iframe {
    max-width: 100%;
  }
}

.nh-home .nh-eservice-qrCard {
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.nh-home .nh-eservice-qrHeader {
  width: 100%;
}

.nh-home .nh-eservice-qrLabel {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.nh-home .nh-eservice-qrHandle {
  margin: 2px 0 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
}

.nh-home .nh-eservice-qrBox {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  box-sizing: border-box;
}

.nh-home .nh-eservice-qrBoxImg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.nh-home .nh-eservice-qrBox--placeholder {
  border: 2px dashed rgba(0, 185, 0, 0.5);
  background: #fff;
}

.nh-home .nh-eservice-qrBox--placeholder .nh-eservice-qrPlaceholder__text {
  color: #64748b;
  font-size: 0.85rem;
}

/* ========== EMERGENCY: Exec section — phone SVG containment (root cause: .exec-profile__hotline-icon) ========== */
.nh-home .section.exec .exec-profile__hotline-icon {
  flex-shrink: 0;
  width: 24px !important;
  height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
  overflow: hidden;
}

.nh-home .section.exec .exec-profile__hotline-icon svg {
  width: 24px !important;
  height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
  display: block;
}

/* Exec section: all img/svg cannot exceed container on mobile */
.nh-home .section.exec img,
.nh-home .section.exec svg {
  max-width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  .nh-home .section.exec .exec-profile__hotline-icon,
  .nh-home .section.exec .exec-profile__hotline-icon svg {
    width: 22px !important;
    height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
  }

  .nh-home .section.exec .exec__container {
    overflow: hidden;
  }
}


.nh-home .nh-quicklinks-hotfix {
  width: 100%;
}

.nh-home .nh-quicklinks-hotfix__list {
  display: flex;
  flex-direction: column;
  gap: var(--tt-gap, 0.75rem);
}

/* Unify with tt-card: same radius, border, shadow, hover/focus */
.nh-home .nh-ql {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 72px;
  padding: 0.75rem 1rem;
  border-radius: var(--tt-card-radius, 12px);
  border: var(--tt-card-border, 1px solid #e2e8f0);
  box-shadow: var(--tt-card-shadow, 0 1px 3px rgba(0, 0, 0, 0.06));
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: visible;
}

.nh-home .nh-ql:focus-visible {
  outline: 2px solid var(--primary-600);
  outline-offset: 2px;
}

/* Tag pill: same radius and font as tt-sectionPill */
.nh-home .nh-ql-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  color: #334155;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  letter-spacing: 0.02em;
}

.nh-home .nh-ql-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--tt-card-radius, 12px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.nh-home .nh-ql-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.nh-home .nh-ql--blue .nh-ql-icon {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.nh-home .nh-ql--green .nh-ql-icon {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.4);
}

.nh-home .nh-ql--sky .nh-ql-icon {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.4);
}

.nh-home .nh-ql--blue { background: linear-gradient(135deg, rgba(239, 246, 255, 0.95) 0%, rgba(219, 234, 254, 0.9) 100%); }
.nh-home .nh-ql--green { background: linear-gradient(135deg, rgba(240, 253, 244, 0.95) 0%, rgba(220, 252, 231, 0.9) 100%); }
.nh-home .nh-ql--sky { background: linear-gradient(135deg, rgba(224, 242, 254, 0.95) 0%, rgba(186, 230, 253, 0.9) 100%); }

.nh-home .nh-ql-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding-right: 0.5rem;
}

.nh-home .nh-ql-title {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  display: block;
}

.nh-home .nh-ql-sub {
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.3;
}

.nh-home .nh-ql-updating {
  font-size: 0.75rem;
  color: #b45309;
  font-weight: 600;
  margin-top: 0.125rem;
}

@media (hover: hover) {
  .nh-home .nh-ql:hover {
    border-color: #cbd5e1;
    box-shadow: var(--tt-card-shadow-hover, 0 4px 12px rgba(0, 0, 0, 0.08));
  }
}

@media (min-width: 1024px) {
  .nh-home .nh-quicklinks-hotfix {
    width: 300px;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .nh-home .nh-quicklinks-hotfix__list {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* ========== Executive + Video block: portraits above, shared bottom baseline, strong CTAs ========== */
/* Grid is defined in home-tuning.css (.nh-execGrid). Here we refine internals to match visual spec. */
.nh-home .nh-execCard.tt-exec-card,
.nh-home .nh-videoCard.tt-exec-card {
  /* Remove outer white card; section background shows through */
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

/* Personnel card: column layout, card body pinned to bottom, no visible gap between photo and body */
.nh-home .tt-exec-card--personnel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
  height: 100%;
}

.nh-home .nh-execCard__photo {
  display: block;
}

.nh-home .nh-execCard__photo .tt-exec-personnel__photo,
.nh-home .nh-execCard__photo .tt-exec-personnel__photo--placeholder {
  display: block;
  max-width: 100%; /* allow size rules in home-tuning (mayor vs secretary) to apply */
  height: auto;
  margin-left: auto;
  margin-right: auto;
  border-radius: 14px 14px 0 0;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.nh-home .nh-execCard__body {
  width: 100%;
  padding: 14px 14px 16px;
  background: #ffffff;
  border-radius: 0 0 14px 14px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  margin-top: 0;
}

/* Mayor: slightly more prominent border on text block */
.nh-home .nh-execCard--mayor .nh-execCard__body {
  border-width: 2px;
  border-color: rgba(15, 91, 58, 0.85);
}

.nh-home .nh-execCard__body .tt-exec-personnel__name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.nh-home .nh-execCard--mayor .tt-exec-personnel__name {
  font-size: 1.1rem;
  font-weight: 800;
}

.nh-home .nh-execCard__body .tt-exec-personnel__role {
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 0.4rem;
}

/* Phone button: full-width, strong tel: CTA with icon + number */
.nh-home .nh-execPhoneBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.45rem 0.75rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--brand-g1, #0f5b3a) 0%, var(--brand-g2, #0a7a4b) 100%);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  gap: 0.35rem;
  box-shadow: 0 2px 8px rgba(15, 91, 58, 0.35);
}

.nh-home .nh-execPhoneBtn .tt-exec-personnel__hotline-icon {
  display: inline-flex;
}

.nh-home .nh-execPhoneBtn .tt-exec-personnel__hotline-icon svg {
  width: 1rem;
  height: 1rem;
}

@media (hover: hover) {
  .nh-home .nh-execPhoneBtn:hover {
    filter: brightness(1.06);
  }
}

/* Video card: tighten spacing + strong dual CTAs */
.nh-home .nh-videoCard .tt-exec-video__head {
  margin-bottom: 0.75rem;
}

.nh-home .nh-videoCard .tt-exec-video__wrap {
  margin-bottom: 0.75rem;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.16);
  background: #000;
}

.nh-home .nh-videoCard__ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.nh-home .nh-videoCard__ctas .pill-btn {
  flex: 0 1 auto;
  width: auto;
  max-width: 100%;
  border-radius: 9999px;
  font-weight: 600;
  justify-content: center;
  color: #fff !important;
}

.nh-home .nh-videoCard__ctas a.pill-btn {
  color: #fff !important;
}

@media (max-width: 768px) {
  .nh-home .nh-videoCard__ctas {
    flex-direction: column;
  }
}

/* ========== Quick links (image-only buttons) ========== */
.nh-home .nh-quicklinks-hotfix__list--image {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.nh-home .nh-ql-image {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  background: #fff;
}

.nh-home .nh-ql-image:focus-visible {
  outline: 2px solid var(--primary-600, #0f4c81);
  outline-offset: 2px;
}

.nh-home .nh-ql-image__img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

.nh-home .nh-ql-image__fallback {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
  background: #f8fafc;
}

@media (hover: hover) {
  .nh-home .nh-ql-image:hover {
    transform: translateY(-2px);
    border-color: rgba(51, 65, 85, 0.28);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.14);
  }
}

/* Vertical banner (EIT) in sidebar — below quicklinks */
.home-page .vertical-banner-wrap {
  margin-top: 1.25rem;
  width: 100%;
}

.home-page .vertical-banner-img {
  width: 100%;
  max-width: 320px;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

