/* Nomad Visa DB — base stylesheet */
:root {
  --c-bg: #f8fafc;
  --c-bg-alt: #f1f5f9;
  --c-fg: #0f172a;
  --c-muted: #AEB1B7;
  --c-primary: #00a78b;
  --c-primary-dark: #007a66;
  --c-accent: #000000;
  --c-button: #28C675;
  --c-button-dark: #1fa85e;
  --c-border: #e2e8f0;
  --c-card: #ffffff;
  --c-nomad: #0ea5e9;
  --c-freelance: #6366f1;
  --c-startup: #f59e0b;
  --c-investor: #d97706;
  --c-skilled: #10b981;
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06);
  --shadow-md: 0 4px 14px rgba(15,23,42,.08);
  --container: 1140px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  color: var(--c-fg);
  background: var(--c-bg);
  line-height: 1.7;
  font-size: 16px;
}
img { max-width: 100%; height: auto; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.4; margin-top: 0; }
h1 { font-size: 1.8rem; }
h2 { font-size: 1.4rem; margin-top: 2rem; }
h3 { font-size: 1.15rem; }
p { margin: .6em 0; }
.muted { color: var(--c-muted); }
.small { font-size: .85rem; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { background: var(--c-primary); border-bottom: 0; box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 10; }
.site-header .inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; flex-wrap: wrap; }
.site-header .logo { font-weight: 700; color: #fff; display: flex; align-items: center; gap: 8px; font-size: 1.1rem; }
.site-header .logo:hover { text-decoration: none; color: #fff; opacity: .88; }
.site-header .logo-mark { font-size: 1.4rem; }
.global-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.global-nav a { color: #fff; font-size: .95rem; font-weight: 500; }
.global-nav a:hover { color: #fff; opacity: .85; text-decoration: underline; }
.cta-header { background: var(--c-button); color: #fff !important; padding: 8px 14px; border-radius: 8px; font-size: .9rem; font-weight: 600; }
.cta-header:hover { background: var(--c-button-dark); text-decoration: none; }

/* Breadcrumb */
.breadcrumb { background: var(--c-bg-alt); border-bottom: 1px solid var(--c-border); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px 12px; list-style: none; margin: 0; padding: 10px 0; font-size: .85rem; color: var(--c-muted); }
.breadcrumb li + li::before { content: "›"; margin-right: 12px; color: var(--c-muted); }
.breadcrumb a { color: var(--c-muted); }
.breadcrumb a:hover { color: var(--c-primary); }
.breadcrumb [aria-current="page"] { color: var(--c-fg); }

/* Main */
.page-main { padding: 28px 0 64px; }
.page-header { margin-bottom: 24px; }
.page-header.country-header,
.page-header.visa-header,
.page-header.axis-header { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.page-header .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--c-muted); font-size: .9rem; }
.page-header .meta span { background: #fff; border: 1px solid var(--c-border); padding: 2px 10px; border-radius: 999px; }
.country-emoji { font-size: 3rem; line-height: 1; }
.country-emoji.small { font-size: 2.4rem; }
.axis-icon-big { font-size: 3rem; line-height: 1; }
.kicker { color: var(--c-muted); font-size: .9rem; margin: 0 0 4px; }

/* Intro (white-bg lead paragraph at top) */
.intro { background: #fff; padding: 32px 0 24px; }
.intro p { max-width: 760px; margin: 0 auto; color: #000; font-size: 1.02rem; line-height: 1.9; text-align: center; }

/* Hero (deprecated — kept for safety) */
.hero { background: #fff; color: var(--c-fg); padding: 36px 0; text-align: center; }
.hero h1 { font-size: 1.8rem; margin: 0 0 16px; }
.hero-lead { font-size: 1.05rem; margin: 0 0 28px; }
.hero-stats { display: flex; justify-content: center; gap: 36px; margin: 24px 0 28px; flex-wrap: wrap; }
.hero-stats div { font-size: .95rem; }
.hero-stats strong { display: block; font-size: 2.2rem; font-weight: 700; }
.hero-cta { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 12px 22px; border-radius: 8px; font-weight: 600; font-size: .95rem; text-decoration: none; }
.btn-primary { background: var(--c-button); color: #fff !important; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.btn-primary:hover { background: var(--c-button-dark); text-decoration: none; }
.btn-secondary { background: rgba(255,255,255,0.18); color: #fff !important; border: 1px solid rgba(255,255,255,0.55); }
.btn-secondary:hover { background: rgba(255,255,255,0.28); text-decoration: none; }
.btn-link { color: var(--c-primary); font-weight: 600; }

/* Sections */
.section { padding: 44px 0; }
.section-alt { background: var(--c-bg-alt); }
.section h2,
.main-col section h2,
.region-block h2 {
  background: var(--c-primary);
  color: #fff;
  padding: 14px 24px;
  border-radius: 8px;
  margin: 0 0 24px;
  font-size: 1.2rem;
  display: block;
  border-left: 0;
  text-align: left;
}
.section h2 {
  text-align: center;
  font-size: 1.3rem;
  padding: 16px 28px;
}
.region-block h3 {
  color: var(--c-primary-dark);
  font-size: 1.05rem;
  margin: 28px 0 14px;
  padding-left: 12px;
  border-left: 4px solid var(--c-primary);
}
.see-more { text-align: center; margin-top: 20px; }

/* Country cards */
.countries-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.country-card { display: block; background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 18px 14px; text-align: center; color: var(--c-fg); transition: all .15s; }
.country-card:hover { border-color: var(--c-primary); transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; }
.country-card h3 { font-size: 1.05rem; margin: 2px 0 6px; color: var(--c-fg); }
.country-card p { font-size: .85rem; color: var(--c-muted); margin: 0; }

.section-note { text-align: center; margin: -10px 0 22px; }

/* Region blocks */
.region-block { margin-bottom: 32px; }
.operator-block a { color: #93c5fd; }
.operator-block a:hover { color: #c7d2fe; }
/* .region-block h2 styled by unified .section h2 / .region-block h2 rule above */

/* Type cards */
.types-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.type-card { display: block; background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 22px 14px; text-align: center; color: var(--c-fg); transition: all .15s; }
.type-card:hover { border-color: var(--c-primary); transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; }
.type-card-icon { font-size: 2.4rem; margin-bottom: 6px; }
.type-card h3 { margin: 4px 0; font-size: 1rem; }
.type-card p { font-size: .85rem; color: var(--c-muted); margin: 0; }

.types-list { display: grid; gap: 14px; }
.type-block { display: flex; gap: 18px; align-items: flex-start; padding: 20px; background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--radius); color: var(--c-fg); }
.type-block:hover { border-color: var(--c-primary); text-decoration: none; box-shadow: var(--shadow-sm); }
.type-block .type-icon { font-size: 2.4rem; line-height: 1; }
.type-block h3 { margin: 0 0 4px; }

/* Visa cards */
.visa-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.visa-cards-country { margin: 8px 0 28px; }
.section-disclaimer { padding: 12px 16px; border-left: 3px solid var(--c-border); margin: 0 0 28px; line-height: 1.8; }
.visa-card { display: block; background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 18px; color: var(--c-fg); transition: all .15s; }
.visa-card:hover { border-color: var(--c-primary); transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; }
.visa-card h3 { font-size: 1rem; margin: 8px 0 6px; line-height: 1.5; }
.visa-card-head { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; gap: 8px; flex-wrap: wrap; }
.visa-card-head .country { color: var(--c-muted); }
.visa-card-meta { font-size: .85rem; color: var(--c-muted); margin: 4px 0 0; }

/* Badges */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; color: #fff; }
.badge-nomad { background: var(--c-nomad); }
.badge-freelance { background: var(--c-freelance); }
.badge-startup { background: var(--c-startup); }
.badge-investor { background: var(--c-investor); }
.badge-skilled { background: var(--c-skilled); }

/* Axis cards */
.axes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.axis-card { display: block; background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 18px; text-align: center; font-weight: 600; color: var(--c-fg); }
.axis-card:hover { border-color: var(--c-primary); box-shadow: var(--shadow-md); text-decoration: none; }

/* Detail table */
.detail-table { width: 100%; border-collapse: collapse; background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; }
.detail-table th, .detail-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--c-border); font-size: .92rem; vertical-align: top; }
.detail-table tr:last-child th, .detail-table tr:last-child td { border-bottom: 0; }
.detail-table th { width: 200px; background: var(--c-bg-alt); color: var(--c-fg); font-weight: 600; }

/* Content-with-sidebar layout */
.content-with-sidebar { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; margin-top: 16px; }
@media (max-width: 920px) {
  .content-with-sidebar { grid-template-columns: 1fr; }
}
.main-col section { margin-bottom: 28px; background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 18px 20px; }
.main-col section.callout { background: #fefce8; border-color: #fde68a; }
.main-col-fullwidth { max-width: 860px; margin: 16px auto 0; }
.main-col-fullwidth section h2 { font-size: 1.1rem; padding: 12px 20px; }
.disclaimer-inline { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--c-border); font-size: .82rem; line-height: 1.7; }

/* Related links block (eSIM / VPN CTA — PC横並び・スマホ縦並び) */
.related-block {
  margin: 16px 0 32px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.related-esim, .related-vpn {
  flex: 1 1 240px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 18px 22px; border-radius: 10px;
  text-decoration: none; font-weight: 700; font-size: 1.05rem;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.10);
  transition: all .15s;
}
.related-esim { background: #28c675; }
.related-esim:hover { background: #1fa85e; text-decoration: none; color: #fff; transform: translateY(-1px); }
.related-vpn { background: #338df4; }
.related-vpn:hover { background: #2470c8; text-decoration: none; color: #fff; transform: translateY(-1px); }
.related-icon { font-size: 1.3rem; line-height: 1; }
@media (max-width: 600px) {
  .related-esim, .related-vpn { flex: 1 1 100%; }
}
/* .main-col section h2 styled by unified rule (green badge) */
.main-col ul { margin: 0; padding-left: 22px; }
.main-col li { margin: 4px 0; }
.tax-note { background: #f1f5f9; padding: 12px 14px; border-radius: 8px; border-left: 4px solid var(--c-accent); margin: 0 0 6px; }

.sidebar-related { background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 18px; }
.sidebar-related h4 { margin: 0 0 8px; font-size: 1rem; }
.sidebar-related .related-links { list-style: none; padding: 0; margin: 14px 0 0; }
.sidebar-related .related-links li { margin: 8px 0; }
.sidebar-related .related-links a { display: block; padding: 8px 10px; border-radius: 6px; background: var(--c-bg-alt); color: var(--c-fg); }
.sidebar-related .related-links a:hover { background: var(--c-primary); color: #fff; text-decoration: none; }

/* Footer */
.site-footer { background: #0f172a; color: #cbd5e1; padding: 36px 0 24px; margin-top: 60px; }
.site-footer h4 { color: #fff; margin: 0 0 8px; font-size: 1rem; }
.site-footer a { color: #93c5fd; }
.site-footer .muted { color: var(--c-muted); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; margin-bottom: 24px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin: 4px 0; }
.disclaimer { font-size: .85rem; color: var(--c-muted); border-top: 1px solid #1e293b; padding-top: 14px; }
.copyright { font-size: .8rem; color: var(--c-muted); opacity: .7; margin: 8px 0 0; }

/* Responsive */
@media (max-width: 720px) {
  h1 { font-size: 1.5rem; }
  .hero h1 { font-size: 1.6rem; }
  .hero-stats { gap: 20px; }
  .hero-stats strong { font-size: 1.8rem; }
  .detail-table th { width: 130px; font-size: .85rem; }
  .global-nav { width: 100%; justify-content: flex-start; }
  .cta-header { display: none; }
}
