/* caovinhhieu.me — Vietnamese travel SIM guide
   Notion-like minimalism: white bg, dark text, soft cards, single accent. */

:root {
  --bg: #ffffff;
  --fg: #37352f;
  --fg-muted: #787774;
  --fg-faint: #9b9a97;
  --border: #ecece9;
  --card: #f7f6f3;
  --accent: #2e7d32;
  --accent-soft: #e8f5e9;
  --link: #1f6f3a;
  --link-hover: #0f5d28;
  --code: #f1f0ec;
  --shadow: 0 1px 2px rgba(15, 15, 15, 0.05), 0 3px 6px rgba(15, 15, 15, 0.05);
  --radius: 6px;
  --max-w: 720px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
    "Inter", "Roboto", "Arial", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Top nav ─────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar .brand {
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
  text-decoration: none;
  font-size: 15px;
}
.topbar .brand .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  vertical-align: middle;
}
.topbar .back {
  font-size: 14px;
  color: var(--fg-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}
.topbar .back:hover {
  background: var(--card);
  color: var(--fg);
}
.topbar .back::before {
  content: "←";
  font-size: 16px;
  line-height: 1;
}

/* ── Page layout ─────────────────────────────────────── */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 56px 24px 80px;
}

h1 {
  font-size: 40px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
h2 {
  font-size: 26px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 48px 0 12px;
}
h3 {
  font-size: 19px;
  line-height: 1.4;
  font-weight: 600;
  margin: 28px 0 8px;
}
p {
  margin: 0 0 12px;
}
strong, b {
  font-weight: 600;
}
em, i {
  font-style: italic;
}
ul, ol {
  margin: 0 0 12px;
  padding-left: 24px;
}
li {
  margin: 4px 0;
}

.lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--fg-muted);
  margin: 0 0 32px;
}

/* ── Notice cards (top of every guide page) ──────────── */
.notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--accent-soft);
  border: 1px solid #c8e6c9;
  border-radius: var(--radius);
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.5;
}
.notice > div {
  flex: 1;
  min-width: 0;
}
.notice p {
  margin: 6px 0 0;
  color: #2c3a2e;
  font-size: 14px;
  line-height: 1.6;
}
.notice .sep {
  color: #6b8e72;
  font-weight: 500;
  font-style: italic;
  padding: 0 2px;
}
.notice-icon {
  font-size: 18px;
  line-height: 1.3;
  flex-shrink: 0;
}
.notice strong {
  display: block;
  margin-bottom: 2px;
  color: #1b5e20;
}

/* ── Steps ───────────────────────────────────────────── */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 28px 0;
  margin: 0 0 28px;
  border-bottom: 1px dashed var(--border);
}
.steps > li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 0;
}
.steps > li::before {
  content: "Bước " counter(step);
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.steps h3 {
  margin-top: 8px;
}
.steps p:last-child {
  margin-bottom: 0;
}

/* ── Screenshots ─────────────────────────────────────── */
.shot {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 16px 0 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}
.shot-caption {
  font-size: 12px;
  color: var(--fg-faint);
  margin: 0 0 8px;
  font-style: italic;
}

/* ── Landing page tile grid ──────────────────────────── */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.tile {
  display: block;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  position: relative;
}
.tile:hover {
  border-color: #cfcfcc;
  background: #fafaf8;
}
.tile:active {
  transform: translateY(1px);
}
.tile .tile-arrow {
  position: absolute;
  top: 18px;
  right: 16px;
  color: var(--fg-faint);
  font-size: 16px;
  transition: color 0.15s, transform 0.15s;
}
.tile:hover .tile-arrow {
  color: var(--accent);
  transform: translateX(2px);
}
.tile .tile-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.tile .tile-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 0;
  padding-right: 20px;
}

/* ── Footer ──────────────────────────────────────────── */
.foot {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 24px 24px 40px;
  font-size: 12px;
  color: var(--fg-faint);
  text-align: center;
  border-top: 1px solid var(--border);
}
.foot a {
  color: var(--fg-muted);
  text-decoration: none;
}
.foot a:hover {
  color: var(--fg);
}

/* ── Small screens ───────────────────────────────────── */
@media (max-width: 540px) {
  h1 { font-size: 30px; }
  h2 { font-size: 22px; }
  .lede { font-size: 16px; }
  main { padding: 32px 18px 60px; }
  .topbar-inner { padding: 12px 18px; }
  .tile .tile-title { font-size: 15px; }
}

/* ── Images: tap to zoom on phone ────────────────────── */
.shot {
  cursor: zoom-in;
  transition: opacity 0.15s;
}
.shot:active {
  opacity: 0.85;
}

/* ── Info block (KIỂM TRA thiết bị) ──────────────────── */
.info-block {
  margin: 0 0 16px;
  padding: 14px 20px 18px;
  background: #e3f2fd;
  border: 1px solid #bbdefb;
  border-left: 4px solid #1976d2;
  border-radius: var(--radius);
}
.info-title {
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase;
  color: #0d47a1;
  margin: 0 0 10px !important;
  display: flex;
  align-items: center;
  gap: 8px;
}
.info-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1976d2;
  color: #fff;
  font-size: 11px;
  line-height: 1;
  flex-shrink: 0;
}
.info-list {
  margin: 0;
  padding-left: 22px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg);
}
.info-list li {
  margin: 8px 0;
}
.info-list li::marker {
  color: #1976d2;
  font-weight: 600;
}

/* ── Warning block (LƯU Ý khi sử dụng eSIM) ──────────── */
.warn-block {
  margin: 0 0 32px;
  padding: 18px 20px 20px;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-left: 4px solid #f9a825;
  border-radius: var(--radius);
}
.warn-title {
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase;
  color: #b26a00;
  margin: 0 0 10px !important;
  display: flex;
  align-items: center;
  gap: 8px;
}
.warn-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f9a825;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
}
.warn-list {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg);
}
.warn-list li {
  margin: 10px 0;
}
.warn-list li::marker {
  color: #b26a00;
  font-weight: 600;
}

/* ── Image lightbox (tap-to-zoom) ─────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(8, 9, 10, 0.94);
  padding: 16px;
  margin: 0;
  border: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: lb-fade 0.18s ease-out;
}
.lightbox[open] {
  display: flex;
}
.lightbox::backdrop {
  background: transparent;
}
.lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  /* Allow native pinch-zoom + double-tap-zoom on the image itself */
  touch-action: pinch-zoom;
  -webkit-user-select: none;
  user-select: none;
}
.lightbox-close {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 101;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #f7f8f8;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s;
}
.lightbox-close:hover,
.lightbox-close:active {
  background: rgba(255, 255, 255, 0.2);
}

@keyframes lb-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Focus ring (a11y) ───────────────────────────────── */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
