/* =========================================================
   Mukdahan Public Health Savings Cooperative
   Hi-fi prototype stylesheet
   ========================================================= */

:root {
  --ink: #0e1a2b;
  --ink-2: #1b2a44;
  --ink-soft: #4a5a73;
  --muted: #8392a8;
  --line: #e6eaf1;
  --line-2: #eef1f6;
  --bg: #f5f7fb;
  --paper: #ffffff;

  --brand: #14365f;        /* deep navy */
  --brand-2: #0e2747;
  --brand-3: #1a4a7a;
  --brand-soft: #eaf0f9;

  /* ============ ACCENT (pure mint — cool, refreshing, Apple-ish) ============ */
  --gold:          #2dd4bf;  /* teal 400 — accent หลัก (mint pure) */
  --gold-soft:     #f0fdfa;  /* teal 50 — bg อ่อนสุด */
  --amber:         #0d9488;  /* teal 600 — accent เข้ม (hover) */
  --amber-soft:    #ccfbf1;  /* teal 100 — pill tint */
  --accent-bright: #5eead4;  /* teal 300 — highlights */
  --accent-pale:   #99f6e4;  /* teal 200 — gradient stop */

  --rose: #b54a5e;
  --rose-soft: #fde7ec;
  --emerald: #16704e;       /* reserved สำหรับ balance card (เก่า ไม่เกี่ยว) */

  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(14,26,43,.05), 0 1px 3px rgba(14,26,43,.04);
  --shadow-md: 0 4px 14px rgba(14,26,43,.06), 0 2px 4px rgba(14,26,43,.04);
  --shadow-lg: 0 16px 40px rgba(14,26,43,.1), 0 4px 12px rgba(14,26,43,.05);

  --font: "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { font-weight: 400; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-3); }

img { max-width: 100%; }

::selection { background: var(--gold-soft); color: var(--ink); }

/* ============================== TOPBAR ============================== */
.topbar {
  background: linear-gradient(90deg, var(--brand-2), var(--brand));
  color: rgba(255,255,255,.92);
  font-size: .82rem;
  padding: 8px 0;
  letter-spacing: .01em;
}
.topbar-link {
  color: rgba(255,255,255,.85);
  transition: color .15s;
}
.topbar-link:hover { color: #fff; }

/* ============================== HEADER ============================== */
.site-header {
  background:
    radial-gradient(1100px 240px at 90% 50%, rgba(200,150,64,.07), transparent 70%),
    linear-gradient(180deg, #ffffff, #fafbfd);
  border-bottom: 1px solid var(--line);
}
.logo-mark { flex-shrink: 0; filter: drop-shadow(0 4px 12px rgba(20,54,95,.18)); }
.header-eyebrow {
  font-size: .68rem;
  letter-spacing: .18em;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 2px;
}
.header-title {
  font-size: clamp(1.15rem, 2.4vw, 1.7rem);
  font-weight: 700;
  margin: 0;
  line-height: 1.25;
  color: var(--brand);
  letter-spacing: -.005em;
}
.header-sub {
  margin-top: 4px;
  font-size: .85rem;
  color: var(--ink-soft);
  letter-spacing: .04em;
}
.header-stat-label {
  font-size: .72rem;
  color: var(--muted);
  letter-spacing: .03em;
}
.header-stat-value {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--brand);
  line-height: 1.1;
}
.header-stat-unit {
  font-size: .85rem;
  font-weight: 500;
  color: var(--ink-soft);
}

/* ============================== NAVBAR ============================== */
.main-navbar {
  background: var(--brand);
  border-top: 3px solid var(--gold);
  box-shadow: var(--shadow-sm);
  padding: 0;
  z-index: 100;
}
.main-navbar .navbar-brand,
.main-navbar .nav-link {
  color: rgba(255,255,255,.85) !important;
  font-weight: 500;
  font-size: .95rem;
  padding: 14px 16px !important;
  border-radius: 0;
  position: relative;
  transition: color .15s, background .15s;
}
.main-navbar .nav-link:hover,
.main-navbar .nav-link:focus { color: #fff !important; background: rgba(255,255,255,.06); }
.main-navbar .nav-link.active {
  color: #fff !important;
  background: rgba(255,255,255,.08);
}
.main-navbar .nav-link.active::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: 0;
  height: 3px;
  background: var(--gold);
  border-radius: 2px 2px 0 0;
}
.main-navbar .dropdown-menu {
  border: none;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  margin-top: 0 !important;
}
.main-navbar .dropdown-item {
  padding: 9px 12px;
  border-radius: 7px;
  font-size: .9rem;
  color: var(--ink);
}
.main-navbar .dropdown-item:hover { background: var(--brand-soft); color: var(--brand); }

.nav-search { width: 260px; }
.nav-search .form-control,
.nav-search .input-group-text {
  background: rgba(255,255,255,.12) !important;
  border-color: rgba(255,255,255,.2);
  color: #fff;
  font-size: .85rem;
}
.nav-search .form-control::placeholder { color: rgba(255,255,255,.55); }
.nav-search .input-group-text { color: rgba(255,255,255,.7); }
.nav-search .form-control:focus {
  background: rgba(255,255,255,.18) !important;
  border-color: var(--gold);
  box-shadow: none;
  color: #fff;
}

.navbar-toggler {
  border-color: rgba(255,255,255,.25);
  padding: 6px 10px;
}
.navbar-toggler:focus { box-shadow: none; }

/* ============================== BLOCK CARD ============================== */
.block-card {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  overflow: hidden;
}
.block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-2);
}
.block-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand);
  display: flex;
  align-items: center;
  gap: 8px;
}
.block-head h2 i { color: var(--gold); font-size: 1.15em; }
.block-more {
  font-size: .82rem;
  color: var(--ink-soft);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  transition: color .15s;
}
.block-more:hover { color: var(--brand); }

/* ============================== CAROUSEL ============================== */
.hero-carousel .carousel-inner { border-radius: 0; }
.hero-slide {
  position: relative;
  aspect-ratio: 16 / 7;
  min-height: 240px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}
.hero-slide-1 { background: linear-gradient(135deg, #14365f 0%, #1a4a7a 50%, #2e6aa6 100%); }
.hero-slide-2 { background: linear-gradient(135deg, #0e3257 0%, #16704e 100%); }
.hero-slide-3 { background: linear-gradient(135deg, #2a2444 0%, #5a3a7a 50%, #2dd4bf 100%); }
.hero-slide-4 { background: linear-gradient(135deg, #6e2a3a 0%, #b54a5e 100%); }
.hero-slide-5 { background: linear-gradient(135deg, #0e3257 0%, #1a4a7a 50%, #2dd4bf 130%); }

.hero-slide::before {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.04) 0 2px, transparent 2px 26px),
    linear-gradient(180deg, transparent 30%, rgba(0,0,0,.55) 100%);
}
.hero-slide-overlay {
  position: relative;
  z-index: 2;
  color: #fff;
  padding: clamp(20px, 4vw, 44px);
  max-width: 75%;
}
.hero-pill {
  display: inline-block;
  background: var(--gold);
  color: #2a1c00;
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .08em;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
}
.hero-slide-overlay h2 {
  font-size: clamp(1.15rem, 2.6vw, 1.95rem);
  font-weight: 700;
  margin: 0 0 8px;
  text-wrap: balance;
  text-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.hero-slide-overlay p {
  font-size: clamp(.85rem, 1.4vw, 1rem);
  margin: 0;
  color: rgba(255,255,255,.88);
  max-width: 540px;
}
.hero-slot-label {
  position: absolute;
  top: 12px; left: 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .68rem;
  color: rgba(255,255,255,.45);
  letter-spacing: .05em;
  z-index: 2;
}
.carousel-indicators [data-bs-target] {
  width: 28px; height: 4px;
  border-radius: 4px;
  background: rgba(255,255,255,.5);
  border: none;
}
.carousel-indicators .active { background: var(--gold); }
.carousel-control-prev, .carousel-control-next { width: 8%; opacity: .65; }

/* ============================== QUICK STATS ============================== */
.quick-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.quick-stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s;
}
.quick-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.quick-stat > i {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid; place-items: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.quick-stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--brand);
  line-height: 1.1;
}
.quick-stat-label {
  font-size: .78rem;
  color: var(--muted);
}
@media (max-width: 768px) {
  .quick-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ============================== NEWS LIST ============================== */
.news-list { padding: 8px 20px; }
.news-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px dashed var(--line);
}
.news-row:last-child { border-bottom: none; }
.news-thumb {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--brand-soft);
  display: grid; place-items: center;
}
.news-thumb span {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .7rem;
  color: rgba(255,255,255,.7);
  letter-spacing: .04em;
  position: relative; z-index: 2;
}
.news-thumb::before {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.06) 0 2px, transparent 2px 14px);
}
.thumb-1 { background: linear-gradient(135deg, #14365f, #1a4a7a); }
.thumb-2 { background: linear-gradient(135deg, #1a4a7a, #2e6aa6); }
.thumb-3 { background: linear-gradient(135deg, #0e3257, #16704e); }
.thumb-4 { background: linear-gradient(135deg, #2a2444, #5a3a7a); }
.thumb-5 { background: linear-gradient(135deg, #14365f, #2dd4bf); }
.thumb-fund-1 { background: linear-gradient(135deg, #6e2a3a, #b54a5e); }
.thumb-fund-2 { background: linear-gradient(135deg, #b54a5e, #2dd4bf); }
.thumb-fund-3 { background: linear-gradient(135deg, #14365f, #6e2a3a); }
.thumb-fund-4 { background: linear-gradient(135deg, #4a2a44, #b54a5e); }
.thumb-fund-5 { background: linear-gradient(135deg, #16704e, #b54a5e); }
.thumb-pr-1 { background: linear-gradient(135deg, #0d9488, #2dd4bf); }
.thumb-pr-2 { background: linear-gradient(135deg, #14365f, #0d9488); }
.thumb-pr-3 { background: linear-gradient(135deg, #16704e, #2dd4bf); }
.thumb-pr-4 { background: linear-gradient(135deg, #2a2444, #0d9488); }
.thumb-pr-5 { background: linear-gradient(135deg, #2dd4bf, #6e2a3a); }

.news-body { min-width: 0; }
.news-meta {
  font-size: .78rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.news-meta i { margin-right: 4px; }
.news-body h3 {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 6px;
  line-height: 1.4;
  text-wrap: balance;
  transition: color .15s;
}
.news-row:hover h3 { color: var(--brand); }
.news-body p {
  font-size: .88rem;
  color: var(--ink-soft);
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-link {
  font-size: .82rem;
  font-weight: 500;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.news-link:hover { color: var(--gold); }

@media (max-width: 576px) {
  .news-row { grid-template-columns: 100px 1fr; gap: 12px; }
  .news-body h3 { font-size: .95rem; }
  .news-body p { -webkit-line-clamp: 2; font-size: .82rem; }
}

/* Badge soft variants */
.badge-soft-primary { background: var(--brand-soft); color: var(--brand); font-weight: 500; }
.badge-soft-rose    { background: var(--rose-soft); color: var(--rose); font-weight: 500; }
.badge-soft-amber   { background: var(--amber-soft); color: var(--amber); font-weight: 500; }

/* ============================== PAGER ============================== */
.block-pager {
  display: flex;
  gap: 4px;
  justify-content: center;
  padding: 16px 20px 20px;
  border-top: 1px solid var(--line-2);
}
.page-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}
.page-btn:hover:not(:disabled):not(.is-active) {
  background: var(--brand-soft);
  border-color: var(--brand-soft);
  color: var(--brand);
}
.page-btn.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ============================== TABLE LISTS ============================== */
.table-list {
  font-size: .88rem;
  margin: 0;
}
.table-list thead th {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  background: #fafbfd;
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
}
.table-list tbody td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line-2);
  color: var(--ink);
  vertical-align: middle;
}
.table-list tbody tr:last-child td { border-bottom: none; }
.table-list tbody tr { transition: background .15s; cursor: pointer; }
.table-list tbody tr:hover { background: #fafbfd; }
.table-list tbody td:nth-child(2) { color: var(--ink); font-weight: 500; }
.table-list tbody td:first-child { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.read-count {
  display: inline-block;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: .72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}

/* ============================== REGULATIONS TABS ============================== */
.regs-tabs {
  padding: 14px 20px 0;
  gap: 6px;
  border-bottom: 1px solid var(--line-2);
  flex-wrap: wrap;
}
.regs-tabs .nav-link {
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: .9rem;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-bottom: none;
  position: relative;
  margin-bottom: -1px;
}
.regs-tabs .nav-link:hover { color: var(--brand); background: var(--brand-soft); }
.regs-tabs .nav-link.active {
  background: var(--paper);
  border-color: var(--line-2);
  color: var(--brand);
}
.regs-tabs .nav-link.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: var(--paper);
}
.regs-content { padding: 12px 8px 16px; }
.doc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.doc-list li {
  display: grid;
  grid-template-columns: 28px 1fr auto 36px;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-2);
  font-size: .9rem;
  transition: background .15s;
}
.doc-list li:hover { background: #fafbfd; }
.doc-list li:last-child { border-bottom: none; }
.doc-list li > i { font-size: 1.25rem; }
.doc-list li span { color: var(--ink); font-weight: 500; }
.doc-list li small { color: var(--muted); font-size: .78rem; white-space: nowrap; }
.doc-list li a {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  color: var(--ink-soft);
  background: var(--brand-soft);
  transition: all .15s;
}
.doc-list li a:hover { background: var(--brand); color: #fff; }

/* ============================== GALLERY ============================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px 20px 20px;
}
.gallery-item {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: grid; place-items: center;
  color: rgba(255,255,255,.85);
}
.gthumb-1 { background: linear-gradient(135deg, #14365f, #2e6aa6); }
.gthumb-2 { background: linear-gradient(135deg, #16704e, #2dd4bf); }
.gthumb-3 { background: linear-gradient(135deg, #b54a5e, #6e2a3a); }
.gthumb-4 { background: linear-gradient(135deg, #2a2444, #14365f); }
.gthumb-5 { background: linear-gradient(135deg, #0d9488, #2dd4bf); }
.gthumb-6 { background: linear-gradient(135deg, #0e3257, #16704e); }
.gallery-item::before {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 2px, transparent 2px 18px);
}
.gallery-item::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.55));
  transition: opacity .2s;
}
.gallery-slot {
  position: absolute; top: 8px; left: 10px;
  font-family: ui-monospace, monospace; font-size: .68rem;
  color: rgba(255,255,255,.45);
  z-index: 2;
}
.gallery-cap {
  position: absolute; bottom: 10px; left: 12px; right: 12px;
  color: #fff; font-weight: 500; font-size: .82rem;
  z-index: 3;
  text-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.gallery-item:hover { transform: scale(1.02); }
.gallery-item { transition: transform .2s; }
@media (max-width: 576px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================== FUND LINKS ============================== */
.fund-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 16px 20px 20px;
}
.fund-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fafbfd;
  color: var(--ink);
  transition: all .15s;
}
.fund-link:hover {
  background: var(--brand-soft);
  border-color: var(--brand-soft);
  color: var(--brand);
  transform: translateX(2px);
}
.fund-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  display: grid; place-items: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.fund-title { font-weight: 600; font-size: .95rem; color: var(--brand); }
.fund-sub { font-size: .76rem; color: var(--muted); }
@media (max-width: 576px) { .fund-links { grid-template-columns: 1fr; } }

/* ============================== SIDEBAR: PRESIDENT ============================== */
.president-card { padding: 0; }
.president-portrait {
  position: relative;
  aspect-ratio: 4/5;
  background: linear-gradient(160deg, #14365f 0%, #1a4a7a 50%, #2e6aa6 100%);
  display: grid; place-items: center;
}
.president-portrait::before {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.04) 0 2px, transparent 2px 22px);
}
.portrait-slot {
  position: relative; z-index: 2;
  font-family: ui-monospace, monospace;
  font-size: .8rem; color: rgba(255,255,255,.55);
  letter-spacing: .04em;
}
.president-frame {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(212,167,44,.55);
  pointer-events: none;
}
.president-frame::before,
.president-frame::after {
  content: ""; position: absolute;
  width: 22px; height: 22px;
  border: 2px solid var(--gold);
}
.president-frame::before { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.president-frame::after { bottom: -2px; right: -2px; border-left: none; border-top: none; }

.president-body { padding: 20px 22px 24px; text-align: center; }
.president-label {
  font-size: .68rem;
  letter-spacing: .14em;
  color: var(--gold);
  font-weight: 600;
  text-transform: uppercase;
}
.president-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand);
  margin: 4px 0 2px;
}
.president-role {
  font-size: .82rem;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.president-quote {
  position: relative;
  background: var(--brand-soft);
  border-radius: 10px;
  padding: 14px 16px 14px 40px;
  font-size: .85rem;
  color: var(--ink);
  line-height: 1.55;
  text-align: left;
  margin: 0 0 14px;
}
.president-quote i {
  position: absolute;
  top: 8px; left: 12px;
  font-size: 1.6rem;
  color: var(--gold);
  opacity: .55;
}
.president-link {
  font-size: .85rem;
  font-weight: 500;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.president-link:hover { color: var(--gold); }

/* ============================== RATE ACCORDION ============================== */
.rate-accordion .accordion-item {
  border: none;
  border-bottom: 1px solid var(--line-2);
}
.rate-accordion .accordion-item:last-child { border-bottom: none; }
.rate-accordion .accordion-button {
  background: transparent;
  font-weight: 600;
  color: var(--brand);
  padding: 14px 20px;
  font-size: .95rem;
  box-shadow: none !important;
}
.rate-accordion .accordion-button:not(.collapsed) {
  background: var(--brand-soft);
  color: var(--brand);
}
.rate-accordion .accordion-button::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2314365f'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}
.rate-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.rate-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px;
  border-top: 1px solid var(--line-2);
  gap: 12px;
}
.rate-list li:first-child { border-top: none; }
.rate-name {
  font-size: .9rem;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.35;
}
.rate-name small {
  display: block;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 400;
}
.rate-value {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--emerald);
  letter-spacing: -.02em;
  line-height: 1;
  white-space: nowrap;
}
.rate-value span { font-size: .9rem; font-weight: 500; color: var(--ink-soft); margin-left: 2px; }
.rate-value.rate-loan { color: var(--rose); }

/* ============================== CONTACT QUICK ============================== */
.contact-quick .contact-list {
  list-style: none;
  margin: 0;
  padding: 8px 4px;
}
.contact-list li {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line-2);
  font-size: .92rem;
  color: var(--ink);
}
.contact-list li:last-child { border-bottom: none; }
.contact-list li i {
  width: 28px; height: 28px;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 7px;
  display: inline-grid; place-items: center;
  margin-right: 10px;
  font-size: .9rem;
  vertical-align: middle;
}
.contact-list li small { color: var(--muted); font-size: .78rem; }

/* ============================== CALENDAR MINI ============================== */
.cal-list { list-style: none; margin: 0; padding: 8px 4px 14px; }
.cal-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 18px;
  border-bottom: 1px dashed var(--line);
}
.cal-list li:last-child { border-bottom: none; }
.cal-date {
  width: 50px; height: 50px;
  background: linear-gradient(160deg, var(--brand), var(--brand-3));
  color: #fff;
  border-radius: 10px;
  display: grid;
  place-items: center;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(20,54,95,.18);
}
.cal-date strong { font-size: 1.2rem; font-weight: 700; }
.cal-date span { font-size: .68rem; opacity: .85; }
.cal-title { font-weight: 600; font-size: .9rem; color: var(--ink); }
.cal-list li small { color: var(--muted); font-size: .78rem; }

/* ============================== FOOTER ============================== */
.site-footer {
  color: rgba(255,255,255,.78);
  margin-top: 40px;
}
.footer-main {
  background:
    radial-gradient(800px 300px at 90% 0%, rgba(200,150,64,.08), transparent 70%),
    linear-gradient(180deg, var(--brand) 0%, var(--brand-2) 100%);
  padding: 48px 0 36px;
}
.footer-eyebrow {
  font-size: .68rem;
  letter-spacing: .16em;
  color: var(--gold);
  font-weight: 600;
}
.footer-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-top: 2px;
}
.footer-text { font-size: .88rem; color: rgba(255,255,255,.7); line-height: 1.7; margin: 0 0 14px; }
.footer-contact { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; color: rgba(255,255,255,.85); }
.footer-contact i { color: var(--gold); margin-right: 8px; }

.footer-h {
  font-size: .82rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 14px;
  position: relative;
  padding-bottom: 8px;
}
.footer-h::after {
  content: ""; position: absolute;
  bottom: 0; left: 0;
  width: 28px; height: 2px;
  background: var(--gold);
  border-radius: 2px;
}
.footer-list { list-style: none; margin: 0; padding: 0; }
.footer-list li { padding: 4px 0; }
.footer-list a { color: rgba(255,255,255,.75); font-size: .88rem; transition: color .15s; }
.footer-list a:hover { color: var(--gold); }

.footer-social { display: flex; gap: 8px; }
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  color: #fff;
  display: grid; place-items: center;
  transition: all .15s;
}
.footer-social a:hover { background: var(--gold); color: var(--brand-2); }
.footer-hours small { font-size: .72rem; color: var(--gold); text-transform: uppercase; letter-spacing: .08em; }
.footer-hours { font-size: .85rem; color: rgba(255,255,255,.75); }

.footer-bottom {
  background: rgba(0,0,0,.25);
  padding: 14px 0;
  font-size: .8rem;
  color: rgba(255,255,255,.55);
}
.footer-bottom a { color: rgba(255,255,255,.65); }
.footer-bottom a:hover { color: var(--gold); }

/* ============================== RESPONSIVE TWEAKS ============================== */
@media (max-width: 991px) {
  .header-title { font-size: 1.2rem; }
  .nav-search { width: 100%; margin-top: 8px; }
  .main-navbar .nav-link { padding: 10px 14px !important; }
  .main-navbar .nav-link.active::after { display: none; }
}
@media (max-width: 576px) {
  body { font-size: 14px; }
  .block-head { padding: 14px 16px; }
  .block-head h2 { font-size: .98rem; }
  .news-list { padding: 4px 14px; }
  .hero-slide-overlay { max-width: 92%; padding: 16px; }
  .hero-pill { font-size: .65rem; padding: 3px 8px; }
}

/* =====================================================================
   MODERN ENHANCEMENT LAYER — 2026 refresh
   (hero band, trust strip, refined cards, scroll-in animations)
   ===================================================================== */

/* ============================== PAGE HERO ============================== */
.page-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(900px 360px at 12% 20%, rgba(200,150,64,.18), transparent 70%),
    radial-gradient(700px 360px at 90% 90%, rgba(46,106,166,.35), transparent 70%),
    linear-gradient(135deg, #0a2240 0%, #0e2747 40%, #14365f 70%, #1a4a7a 100%);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.025) 0 2px, transparent 2px 26px);
  pointer-events: none;
}
.page-hero > .container {
  position: relative;
  z-index: 2;
  padding-top: 56px;
  padding-bottom: 56px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  background: rgba(200,150,64,.16);
  border: 1px solid rgba(200,150,64,.32);
  color: #99f6e4;
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: .04em;
  margin-bottom: 16px;
}
.hero-eyebrow i { font-size: .85rem; color: var(--gold); }
.hero-title {
  font-size: clamp(1.55rem, 3.6vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.2;
  margin: 0 0 12px;
  text-wrap: balance;
  color: #fff;
}
.hero-title span.accent {
  background: linear-gradient(120deg, #99f6e4 0%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lede {
  font-size: clamp(.92rem, 1.4vw, 1.05rem);
  color: rgba(255,255,255,.78);
  max-width: 620px;
  margin: 0 0 24px;
  line-height: 1.7;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.btn-gold {
  background: linear-gradient(180deg, #d8a850, var(--gold));
  border: none;
  color: #2a1c00;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(200,150,64,.32), inset 0 1px 0 rgba(255,255,255,.4);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(200,150,64,.4), inset 0 1px 0 rgba(255,255,255,.4);
  color: #2a1c00;
  filter: brightness(1.04);
}
.btn-ghost-light {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.22);
  color: #fff;
  font-weight: 500;
  padding: 11px 22px;
  border-radius: 10px;
  transition: all .15s;
  backdrop-filter: blur(4px);
}
.btn-ghost-light:hover {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.38);
  color: #fff;
  transform: translateY(-1px);
}
.hero-figure {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-meter {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  border-radius: 18px;
  padding: 22px 26px;
  min-width: 260px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.hero-meter-label {
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(246,214,146,.85);
  margin-bottom: 6px;
}
.hero-meter-value {
  font-size: clamp(1.8rem, 3.2vw, 2.3rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 2px;
}
.hero-meter-unit {
  font-size: .85rem;
  color: rgba(255,255,255,.72);
  margin-bottom: 18px;
}
.hero-meter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px dashed rgba(255,255,255,.18);
}
.hero-meter-row .k { font-size: .72rem; color: rgba(255,255,255,.6); }
.hero-meter-row .v { font-size: 1.05rem; font-weight: 600; color: #fff; }

@media (max-width: 991px) {
  .page-hero > .container { padding-top: 36px; padding-bottom: 36px; }
  .hero-figure { margin-top: 24px; }
}

/* ============================== TRUST BAND ============================== */
.trust-band {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-right: 1px solid var(--line-2);
}
.trust-item:last-child { border-right: none; }
.trust-ic {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(140deg, var(--brand-soft) 0%, #fff 100%);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--brand);
  font-size: 1.4rem;
  flex-shrink: 0;
  box-shadow: inset 0 -1px 0 rgba(20,54,95,.04);
}
.trust-ic.gold {
  background: linear-gradient(140deg, var(--gold-soft) 0%, #fff 100%);
  color: var(--gold);
  border-color: #f3e1b5;
}
.trust-title {
  font-size: .92rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: 2px;
}
.trust-sub {
  font-size: .76rem;
  color: var(--muted);
  line-height: 1.35;
}
@media (max-width: 991px) {
  .trust-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .trust-item { border-right: none; border-bottom: 1px solid var(--line-2); padding-bottom: 14px; }
  .trust-item:nth-last-child(-n+2) { border-bottom: none; padding-bottom: 0; }
}
@media (max-width: 480px) {
  .trust-grid { grid-template-columns: 1fr; }
  .trust-item { border-bottom: 1px solid var(--line-2) !important; padding-bottom: 14px !important; }
  .trust-item:last-child { border-bottom: none !important; padding-bottom: 0 !important; }
}

/* ============================== REFINED CARDS / HEADERS ============================== */
.block-card {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.block-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #dbe2ee;
}
.block-head {
  position: relative;
}
.block-head h2 {
  position: relative;
  padding-left: 14px;
}
.block-head h2::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 4px; height: 18px;
  background: linear-gradient(180deg, var(--gold), #0d9488);
  border-radius: 2px;
  transform: translateY(-50%);
}

/* ============================== FADE-IN ON SCROLL ============================== */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s ease, transform .55s ease;
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================== FOOTER TRUST STRIP ============================== */
.footer-trust {
  background: linear-gradient(180deg, #0b1f3a, var(--brand-2));
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 22px 0;
}
.footer-trust-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 28px;
}
.footer-trust-row .item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.72);
  font-size: .82rem;
  letter-spacing: .02em;
}
.footer-trust-row .item i { color: var(--gold); font-size: 1.05rem; }
.footer-trust-row .item strong { color: #fff; font-weight: 600; }

/* ============================== ADMIN QUICKBAR ============================== */
/* แสดงเฉพาะเมื่อ admin login — โผล่ใต้ topbar เพื่อเข้าถึงแดชบอร์ดและเมนูสำคัญได้เร็ว */
.admin-quickbar {
  background: linear-gradient(135deg, #2a1c00 0%, #3d2a08 40%, #2a1c00 100%);
  color: #fff;
  border-bottom: 3px solid var(--gold);
  position: relative;
  z-index: 50;
}
.admin-quickbar::before {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,150,64,.6), transparent);
}
.aqb-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  flex-wrap: wrap;
}
.aqb-greet {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.aqb-avatar {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--gold), var(--amber));
  color: #2a1c00;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.15);
}
.aqb-greet-text { line-height: 1.2; }
.aqb-eyebrow {
  display: block;
  font-size: .65rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.aqb-greet-text strong {
  font-size: .9rem;
  color: #fff;
  font-weight: 600;
}

.aqb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: auto;
}
.aqb-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  color: rgba(255,255,255,.88);
  font-size: .82rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s, border-color .15s, transform .12s, color .15s;
  white-space: nowrap;
}
.aqb-btn:hover {
  background: rgba(200,150,64,.18);
  border-color: rgba(200,150,64,.4);
  color: #fff;
  transform: translateY(-1px);
}
.aqb-btn i { font-size: .95rem; color: var(--gold); }
.aqb-btn:hover i { color: var(--gold); }

.aqb-btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--amber));
  border-color: var(--gold);
  color: #2a1c00;
  font-weight: 600;
}
.aqb-btn-primary i { color: #2a1c00; }
.aqb-btn-primary:hover {
  background: linear-gradient(135deg, #e1b35a, var(--gold));
  color: #2a1c00;
}
.aqb-btn-primary:hover i { color: #2a1c00; }

.aqb-btn-logout {
  background: rgba(181,74,94,.18);
  border-color: rgba(181,74,94,.35);
  color: #fbd6db;
}
.aqb-btn-logout i { color: #f0a3ad; }
.aqb-btn-logout:hover {
  background: rgba(181,74,94,.32);
  border-color: rgba(181,74,94,.6);
  color: #fff;
}
.aqb-btn-logout:hover i { color: #fff; }

.aqb-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--rose);
  color: #fff;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
  line-height: 1;
  margin-left: 2px;
  animation: aqbPulse 2.4s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(181,74,94,.5);
}
@keyframes aqbPulse {
  0%, 70%, 100% { box-shadow: 0 0 0 0 rgba(181,74,94,.5); }
  85% { box-shadow: 0 0 0 6px rgba(181,74,94,0); }
}

.aqb-alert {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  margin-bottom: 8px;
  padding: 6px 14px;
  background: rgba(200,150,64,.12);
  border: 1px solid rgba(200,150,64,.32);
  border-radius: 999px;
  font-size: .8rem;
  color: #99f6e4;
}
.aqb-alert i { color: var(--gold); }
.aqb-alert strong { color: #fff; margin: 0 2px; }

/* รับ mobile — ซ่อนข้อความบนปุ่ม เหลือแต่ icon */
@media (max-width: 768px) {
  .aqb-row { gap: 8px; padding: 8px 0; }
  .aqb-greet-text strong { display: none; }
  .aqb-eyebrow { font-size: .6rem; letter-spacing: .08em; }
  .aqb-avatar { width: 32px; height: 32px; font-size: .92rem; }
  .aqb-btn { padding: 6px 8px; gap: 0; }
  .aqb-btn > span { display: none; }
  .aqb-btn-primary > span { display: inline; }   /* คงไว้เฉพาะ "แดชบอร์ด" */
}

/* Small typography polish */
.eyebrow-rule {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.eyebrow-rule::before {
  content: "";
  width: 28px; height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

/* ============================================================================
   ╔═══════════════════════════════════════════════════════════════════════╗
   ║  APPLE POLISH LAYER                                                   ║
   ║  Glassmorphism · Mesh gradients · Refined elevation · Premium motion  ║
   ╚═══════════════════════════════════════════════════════════════════════╝
   ============================================================================ */

:root {
  /* refined elevation system — flatter on top, softer ambient */
  --ap-shadow-xs: 0 1px 1px rgba(14,26,43,.04), 0 0 0 1px rgba(14,26,43,.03);
  --ap-shadow-sm: 0 1px 2px rgba(14,26,43,.04), 0 4px 12px -2px rgba(14,26,43,.06);
  --ap-shadow-md: 0 2px 4px rgba(14,26,43,.05), 0 12px 28px -8px rgba(14,26,43,.12);
  --ap-shadow-lg: 0 4px 8px rgba(14,26,43,.06), 0 28px 60px -14px rgba(14,26,43,.18);
  --ap-shadow-xl: 0 8px 16px rgba(14,26,43,.08), 0 48px 100px -20px rgba(14,26,43,.24);
  --ap-shadow-glow: 0 0 0 1px rgba(200,150,64,.18), 0 8px 24px -4px rgba(200,150,64,.22);

  --ap-radius-sm: 12px;
  --ap-radius:    16px;
  --ap-radius-lg: 22px;
  --ap-radius-xl: 28px;

  --ap-ease:      cubic-bezier(.16,1,.3,1);
  --ap-ease-out:  cubic-bezier(.22,1,.36,1);
  --ap-spring:    cubic-bezier(.34,1.56,.64,1);

  --ap-font-display: "Inter", "Noto Sans Thai", system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* Selection — gold tinted */
::selection { background: rgba(200,150,64,.25); color: var(--ink); }

/* ============================================================================
   PAGE LOADER — minimal fade-in on first paint
   ============================================================================ */
.ap-loader {
  position: fixed; inset: 0;
  background: #fff;
  z-index: 9999;
  display: grid; place-items: center;
  pointer-events: none;
  opacity: 1;
  transition: opacity .5s var(--ap-ease) .15s, visibility .5s .65s;
}
.ap-loader.is-done { opacity: 0; visibility: hidden; }
.ap-loader-mark {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0%, var(--brand) 50%, var(--gold) 100%);
  -webkit-mask: radial-gradient(circle, transparent 45%, #000 47%);
          mask: radial-gradient(circle, transparent 45%, #000 47%);
  animation: apSpin 1.2s linear infinite;
}
@keyframes apSpin { to { transform: rotate(360deg); } }

/* body fade-in ผูกกับ loader: ทำงานเฉพาะหน้าที่มี .ap-loader (ผ่าน :has)
   หน้า login/auth ที่ไม่มี loader จะไม่ถูกซ่อน */
body:has(.ap-loader):not(.ap-ready) { opacity: 0; }
body:has(.ap-loader).ap-ready { opacity: 1; transition: opacity .55s var(--ap-ease); }

/* ============================================================================
   TYPE SCALE — Apple-style tight, large display headlines
   ============================================================================ */
.ap-display-1 {
  font-family: var(--ap-font-display);
  font-size: clamp(2.2rem, 5.4vw, 4.2rem);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.05;
  text-wrap: balance;
}
.ap-display-2 {
  font-family: var(--ap-font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.1;
  text-wrap: balance;
}
.ap-lede {
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 620px;
  text-wrap: pretty;
}

/* ============================================================================
   HERO — full mesh gradient + glass meter
   ============================================================================ */
.page-hero {
  background:
    radial-gradient(1200px 600px at 12% 8%, rgba(200,150,64,.22), transparent 55%),
    radial-gradient(1000px 600px at 95% 92%, rgba(46,106,166,.42), transparent 55%),
    radial-gradient(800px 500px at 70% 10%, rgba(122,90,200,.18), transparent 60%),
    linear-gradient(155deg, #07182f 0%, #0a2240 30%, #0e2747 60%, #14365f 100%);
  border-bottom: none;
  isolation: isolate;
}
.page-hero::before {
  /* film grain texture for premium feel */
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='.5'/></svg>");
  opacity: .12;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 1;
}
.page-hero::after {
  /* none — replace old grid pattern */
  display: none;
}
.page-hero > .container { padding-top: 90px; padding-bottom: 90px; }

.hero-eyebrow {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.14);
  color: rgba(255,255,255,.85);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
}
.hero-eyebrow i { color: var(--gold); }

.hero-title { font-family: var(--ap-font-display); font-size: clamp(2rem, 4.8vw, 3.6rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.08; }
.hero-title span.accent {
  background: linear-gradient(95deg, #99f6e4 0%, #2dd4bf 50%, #99f6e4 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lede { font-size: 1.08rem; color: rgba(255,255,255,.74); line-height: 1.7; }

/* Buttons — Apple-pill */
.btn-gold {
  background: linear-gradient(180deg, #5eead4 0%, #2dd4bf 100%);
  border: none;
  color: #1a1300;
  font-weight: 600;
  padding: 12px 26px;
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.5),
    inset 0 -1px 0 rgba(0,0,0,.08),
    0 1px 2px rgba(200,150,64,.4),
    0 8px 22px -4px rgba(200,150,64,.45);
  transition: transform .35s var(--ap-ease), box-shadow .35s var(--ap-ease), filter .2s;
  letter-spacing: -.005em;
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.55),
    inset 0 -1px 0 rgba(0,0,0,.08),
    0 1px 2px rgba(200,150,64,.4),
    0 14px 32px -6px rgba(200,150,64,.55);
  filter: brightness(1.04);
  color: #1a1300;
}
.btn-ghost-light {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  color: rgba(255,255,255,.95);
  font-weight: 500;
  padding: 12px 26px;
  border-radius: 999px;
  letter-spacing: -.005em;
  transition: all .35s var(--ap-ease);
}
.btn-ghost-light:hover {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.32);
  transform: translateY(-2px);
  color: #fff;
}

/* Glass meter card */
.hero-meter {
  background: linear-gradient(180deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,.04) 100%);
  border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: var(--ap-radius-lg);
  padding: 28px 30px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 30px 80px -20px rgba(0,0,0,.45),
    0 8px 16px -4px rgba(0,0,0,.15);
  position: relative;
}
.hero-meter::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,.18), transparent 40%);
  pointer-events: none;
}
.hero-meter-value {
  font-family: var(--ap-font-display);
  font-weight: 700;
  letter-spacing: -.03em;
  font-size: clamp(2.4rem, 4.2vw, 3.2rem);
  background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,.7) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ============================================================================
   TRUST BAND — flatter, more whitespace
   ============================================================================ */
.trust-band {
  background: #fff;
  padding: 36px 0;
  border-bottom: 1px solid rgba(14,26,43,.06);
}
.trust-item { border-right: 1px solid rgba(14,26,43,.06); padding: 10px 18px; }
.trust-ic {
  border-radius: 14px;
  box-shadow: inset 0 -1px 0 rgba(14,26,43,.04), 0 4px 12px -2px rgba(14,26,43,.06);
}
.trust-title { font-family: var(--ap-font-display); font-weight: 700; letter-spacing: -.01em; }

/* ============================================================================
   SERVICES — Apple-card with gradient border on hover
   ============================================================================ */
.services-strip {
  background:
    radial-gradient(800px 400px at 50% 0%, rgba(200,150,64,.08), transparent 70%),
    linear-gradient(180deg, #fbfbfd 0%, #fff 100%);
  padding: 80px 0 40px;
}
.services-head h2 {
  font-family: var(--ap-font-display);
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.1;
}
.services-head .eyebrow {
  letter-spacing: .22em;
  font-size: .68rem;
}

.service-card {
  background: #fff;
  border: 1px solid rgba(14,26,43,.06);
  border-radius: var(--ap-radius-lg);
  padding: 32px 28px 28px;
  box-shadow: var(--ap-shadow-sm);
  transition: transform .5s var(--ap-ease), box-shadow .5s var(--ap-ease), border-color .3s;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.service-card::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 0%, transparent 40%, var(--svc, var(--brand)) 100%);
  opacity: 0;
  transition: opacity .5s var(--ap-ease);
  z-index: -1;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  padding: 1.5px;
  border-radius: inherit;
}
.service-card::after {
  /* keep gradient halo from previous version but lighter */
  right: -60px; bottom: -60px;
  width: 180px; height: 180px;
  opacity: .35;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--ap-shadow-lg);
  border-color: transparent;
}
.service-card:hover::before { opacity: 1; }
.service-icon {
  border-radius: 16px;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,.04), 0 4px 14px -2px rgba(14,26,43,.08);
}
.service-title {
  font-family: var(--ap-font-display);
  font-size: 1.25rem;
  letter-spacing: -.015em;
}

/* ============================================================================
   BLOCK CARDS — softer borders, refined elevation
   ============================================================================ */
.block-card {
  border-radius: var(--ap-radius);
  border-color: rgba(14,26,43,.06);
  box-shadow: var(--ap-shadow-xs);
  transition: transform .4s var(--ap-ease), box-shadow .4s var(--ap-ease), border-color .3s;
}
.block-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--ap-shadow-md);
  border-color: rgba(14,26,43,.1);
}
.block-head { padding: 18px 24px; }
.block-head h2 {
  font-family: var(--ap-font-display);
  font-size: 1.08rem;
  letter-spacing: -.012em;
}
.block-head h2::before {
  width: 3px;
  height: 16px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--gold), #a87d2a);
}

/* ============================================================================
   NAVBAR — frosted glass on sticky
   ============================================================================ */
.main-navbar {
  background: linear-gradient(180deg, var(--brand-2) 0%, var(--brand) 100%);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-top: 2px solid var(--gold);
  box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 4px 14px -2px rgba(14,26,43,.18);
}
.main-navbar.sticky-top { z-index: 80; }
.main-navbar .nav-link {
  font-weight: 500;
  letter-spacing: -.005em;
}
.main-navbar .dropdown-menu {
  border-radius: var(--ap-radius);
  box-shadow: var(--ap-shadow-xl);
  padding: 10px;
  border: 1px solid rgba(14,26,43,.06);
}
.main-navbar .dropdown-item {
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 500;
  transition: all .25s var(--ap-ease);
}

/* ============================================================================
   FOOTER — refined
   ============================================================================ */
.footer-main {
  background:
    radial-gradient(700px 320px at 88% 0%, rgba(200,150,64,.10), transparent 65%),
    radial-gradient(600px 280px at 8% 90%, rgba(46,106,166,.18), transparent 65%),
    linear-gradient(180deg, var(--brand) 0%, #07182f 100%);
  padding: 60px 0 44px;
}
.footer-title { font-family: var(--ap-font-display); letter-spacing: -.012em; }
.footer-h { font-family: var(--ap-font-display); letter-spacing: .15em; }

/* ============================================================================
   ANIMATED COUNTER — number transition
   ============================================================================ */
[data-counter] { font-variant-numeric: tabular-nums; }

/* ============================================================================
   REVEAL — smoother spring-like motion
   ============================================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px) scale(.985);
  transition: opacity .8s var(--ap-ease), transform .8s var(--ap-ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: .06s; }
.reveal:nth-child(3) { transition-delay: .12s; }
.reveal:nth-child(4) { transition-delay: .18s; }
.reveal:nth-child(5) { transition-delay: .24s; }

/* ============================================================================
   FOCUS STATES — accessibility + premium feel
   ============================================================================ */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.form-control:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}
.form-control:focus {
  border-color: var(--brand-3);
  box-shadow: 0 0 0 4px rgba(20,54,95,.08);
}

/* ============================================================================
   SCROLLBAR — subtle premium scrollbar (webkit)
   ============================================================================ */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(14,26,43,.18);
  border: 3px solid #fff;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(14,26,43,.32); }

/* ============================================================================
   PILL TAGS — refined
   ============================================================================ */
.hero-pill {
  border-radius: 999px;
  padding: 5px 12px;
  font-weight: 600;
  letter-spacing: .04em;
}
.filter-pill { border-radius: 999px; letter-spacing: -.005em; }

/* ============================================================================
   PASSWORD TOGGLE BUTTON (universal — paired with assets/js/password-toggle.js)
   ============================================================================ */
.pw-toggle-btn {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  width: 34px; height: 34px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  border-radius: 8px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  transition: background .15s, color .15s, transform .15s;
  z-index: 5;
}
.pw-toggle-btn:hover {
  background: var(--brand-soft);
  color: var(--brand);
}
.pw-toggle-btn:active { transform: translateY(-50%) scale(.92); }
.pw-toggle-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.pw-toggle-btn i { font-size: 1.05rem; line-height: 1; }
/* in input-group prefix variant: nudge slightly to clear Bootstrap rounded edge */
.input-group .pw-toggle-btn { right: 4px; }

/* ============================================================================
   REDUCED MOTION
   ============================================================================ */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  .ap-loader { display: none !important; }
  body:not(.ap-ready) { opacity: 1 !important; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto !important; }
}

/* ============================== SERVICES STRIP ============================== */
.services-strip {
  background: linear-gradient(180deg, var(--bg) 0%, #fff 100%);
  padding: 40px 0 8px;
}
.services-head {
  text-align: center;
  margin-bottom: 28px;
}
.services-head .eyebrow {
  display: inline-block;
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 6px;
}
.services-head h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  font-weight: 700;
  color: var(--brand);
  margin: 0 0 6px;
  letter-spacing: -.01em;
}
.services-head p {
  color: var(--ink-soft);
  font-size: .95rem;
  margin: 0;
  max-width: 540px;
  margin-inline: auto;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.service-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  box-shadow: var(--shadow-sm);
}
.service-card::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 4px;
  background: var(--svc, var(--brand));
  opacity: .85;
  transition: height .2s ease;
}
.service-card::after {
  content: "";
  position: absolute;
  right: -40px; bottom: -40px;
  width: 160px; height: 160px;
  background: radial-gradient(closest-side, var(--svc-soft, var(--brand-soft)), transparent 70%);
  opacity: .55;
  pointer-events: none;
  transition: transform .25s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--svc, var(--brand));
  color: inherit;
}
.service-card:hover::before { height: 6px; }
.service-card:hover::after { transform: scale(1.18); }

.service-icon {
  width: 54px; height: 54px;
  border-radius: 14px;
  background: var(--svc-soft, var(--brand-soft));
  color: var(--svc, var(--brand));
  display: grid; place-items: center;
  font-size: 1.65rem;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.04);
  position: relative; z-index: 1;
}
.service-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  letter-spacing: -.005em;
  position: relative; z-index: 1;
}
.service-desc {
  font-size: .88rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0;
  position: relative; z-index: 1;
}
.service-bullets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative; z-index: 1;
}
.service-bullets li {
  font-size: .83rem;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 8px;
}
.service-bullets li i {
  color: var(--svc, var(--brand));
  font-size: .78rem;
  flex-shrink: 0;
}
.service-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--svc, var(--brand));
  position: relative; z-index: 1;
  transition: gap .2s ease;
}
.service-card:hover .service-cta { gap: 10px; }
.service-cta i { transition: transform .2s ease; }
.service-card:hover .service-cta i { transform: translateX(2px); }

/* Service color themes */
.service-deposit {
  --svc: var(--brand);
  --svc-soft: var(--brand-soft);
}
.service-loan {
  --svc: var(--gold);
  --svc-soft: var(--gold-soft);
}
.service-welfare {
  --svc: #b54a5e;
  --svc-soft: var(--rose-soft);
}

@media (max-width: 991px) {
  .services-grid { grid-template-columns: 1fr; gap: 16px; }
  .services-strip { padding: 28px 0 4px; }
}

