:root {
  --ink: #101828;
  --muted: #667085;
  --line: #d9e2f2;
  --soft: #f5f8ff;
  --white: #ffffff;
  --blue: #0b3a82;
  --blue-2: #155eef;
  --red: #d71920;
  --red-dark: #a81018;
  --navy: #071f49;
  --gold: #f5b301;
  --shadow: 0 22px 60px rgba(7, 31, 73, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: var(--site-font, "Noto Sans Thai", "Segoe UI", Tahoma, sans-serif);
  font-size: var(--site-font-size, 16px);
  line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 14px clamp(18px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(11, 58, 130, 0.12);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 230px; }
.brand-logo { width: 154px; height: 48px; object-fit: contain; }
.brand-mark {
  display: grid; width: 46px; height: 46px; place-items: center;
  color: var(--white); background: linear-gradient(135deg, var(--blue), var(--red));
  border-radius: 10px; font-weight: 900;
}
.brand strong, .brand small { display: block; }
.brand strong { color: var(--blue); font-weight: 900; letter-spacing: 0; }
.brand small { color: var(--muted); font-size: 12px; }

.main-nav { display: flex; align-items: center; gap: clamp(6px, 1vw, 12px); color: #344054; font-size: 15px; font-weight: 700; }
.main-nav > a, .nav-group summary {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color .16s ease, background .16s ease, box-shadow .16s ease;
}
.main-nav a:hover, .nav-group summary:hover { color: var(--red); }
.main-nav > a:hover, .nav-group summary:hover { background: #f7faff; }
.nav-group { position: relative; }
.nav-group summary {
  gap: 6px;
  list-style: none;
  cursor: pointer;
  color: #344054;
  font-weight: 800;
}
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after { content: "▾"; color: var(--red); font-size: 11px; }
.submenu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  z-index: 30;
  min-width: 220px;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.98);
  box-shadow: var(--shadow);
  transform: translateX(-50%);
}
.submenu a {
  display: block;
  padding: 9px 11px;
  border-radius: 8px;
  color: var(--blue);
  background: #f7faff;
  white-space: nowrap;
}
.submenu a:hover { color: var(--white); background: linear-gradient(135deg, var(--red), var(--blue)); }
.nav-group summary::after {
  content: "\25BE";
  color: var(--red);
  font-size: 11px;
  transition: transform .16s ease;
}
.nav-group[open] summary {
  color: var(--red);
  background: #fff5f5;
  box-shadow: inset 0 0 0 1px rgba(215, 25, 32, .12);
}
.nav-group[open] summary::after { transform: rotate(180deg); }
.nav-group[open] .submenu { animation: dropdownIn .16s ease both; }
@keyframes dropdownIn {
  from { opacity: 0; transform: translate(-50%, -6px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
@media (min-width: 901px) {
  .main-nav details.nav-group {
    display: inline-flex;
    align-items: center;
  }
  .main-nav details.nav-group > .submenu {
    position: absolute !important;
    top: calc(100% + 10px) !important;
    left: 50% !important;
    width: max-content;
    min-width: 238px;
    display: flex !important;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 18px 48px rgba(10, 35, 80, .16);
    transform: translateX(-50%) !important;
  }
  .main-nav details.nav-group > .submenu a {
    display: block;
    min-height: 38px;
    padding: 9px 12px;
    border-radius: 8px;
    white-space: nowrap;
  }
}
.nav-cta, .btn, .tracking-form button, .admin button, .admin .button, .contact-form button {
  display: inline-flex; min-height: 44px; align-items: center; justify-content: center;
  padding: 10px 18px; border: 0; border-radius: 8px; cursor: pointer; font-weight: 800;
}
.nav-cta, .btn.primary, .tracking-form button, .admin button, .admin .button, .contact-form button {
  color: var(--white); background: linear-gradient(135deg, var(--red), var(--blue)); box-shadow: 0 12px 28px rgba(215, 25, 32, 0.22);
}
.btn.secondary { color: var(--blue); background: var(--white); border: 1px solid rgba(255,255,255,0.72); }
.menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); background: var(--white); border-radius: 8px; }

.hero { position: relative; min-height: 680px; display: grid; align-items: end; overflow: hidden; color: var(--white); }
.hero-media { position: absolute; inset: 0; background-position: center; background-size: cover; transform: scale(1.02); animation: heroDrift 18s ease-in-out infinite alternate; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(7,31,73,0.95) 0%, rgba(11,58,130,0.78) 44%, rgba(215,25,32,0.48) 100%);
}
.hero-content { position: relative; width: min(900px, 100%); padding: 130px clamp(20px, 6vw, 88px) 92px; }
.hero h1, .page-hero h1, .tracking-panel h1, .article h1 { margin: 0; font-size: clamp(42px, 7vw, 88px); line-height: 1.05; font-weight: 900; }
.hero p { max-width: 720px; font-size: 20px; color: rgba(255,255,255,0.9); }
.eyebrow { margin: 0 0 10px; color: var(--red); font-size: 13px; font-weight: 900; text-transform: uppercase; }
.hero .eyebrow { color: var(--gold); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.section { padding: 78px clamp(20px, 6vw, 88px); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.section-heading h2, .split h2, .intro-band h2 { margin: 0; color: var(--navy); font-size: clamp(28px, 4vw, 48px); line-height: 1.18; font-weight: 900; }
.section-heading a, .news-card a { color: var(--red); font-weight: 900; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; padding-top: 0; padding-bottom: 0; background: var(--line); }
.metrics div { padding: 30px; background: var(--white); }
.metrics strong { display: block; color: var(--blue); font-size: 34px; font-weight: 900; }
.metrics span { color: var(--muted); font-weight: 700; }

.sea-home-banner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: clamp(18px, 4vw, 42px);
  align-items: center;
  margin: -1px 0 0;
  overflow: hidden;
  color: var(--white);
  background:
    linear-gradient(125deg, rgba(7,31,73,.98), rgba(11,58,130,.9) 54%, rgba(215,25,32,.76)),
    url('https://images.unsplash.com/photo-1494412651409-8963ce7935a7?auto=format&fit=crop&w=1800&q=80') center/cover;
}
.sea-home-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 42px 42px;
}
.sea-home-banner > * { position: relative; z-index: 1; }
.sea-home-copy { max-width: 880px; }
.sea-home-copy .eyebrow { color: var(--gold); }
.sea-home-copy h2 { margin: 0; font-size: clamp(30px, 4.6vw, 58px); line-height: 1.12; font-weight: 900; }
.sea-home-copy p { max-width: 760px; color: rgba(255,255,255,.86); font-size: 18px; }
.sea-home-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.sea-home-panel {
  display: grid;
  gap: 8px;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 8px;
  background: rgba(255,255,255,.12);
  box-shadow: 0 24px 70px rgba(0,0,0,.24);
  backdrop-filter: blur(12px);
}
.sea-home-panel span {
  display: inline-grid;
  width: 64px;
  height: 64px;
  place-items: center;
  color: var(--navy);
  border-radius: 8px;
  background: var(--gold);
  font-weight: 900;
}
.sea-home-panel strong { font-size: 28px; line-height: 1.18; font-weight: 900; }
.sea-home-panel small { color: rgba(255,255,255,.82); font-size: 15px; line-height: 1.6; }

.intro-band { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 30px; color: var(--white); background: linear-gradient(135deg, var(--navy), var(--blue)); }
.intro-band h2, .intro-band .eyebrow { color: var(--white); }
.intro-band p { margin: 0; color: rgba(255,255,255,0.86); font-size: 18px; }

.service-grid, .news-grid, .quick-actions, .branch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.service-card, .news-card, .video-card, .admin-card, .quick-actions a, .contact-form, .branch-card, .ad-card, .related-news {
  border: 1px solid var(--line); border-radius: 8px; background: var(--white); box-shadow: 0 12px 34px rgba(7,31,73,0.08);
}
.service-card { position: relative; overflow: hidden; padding: 28px; }
.service-card.has-image { padding: 0; }
.service-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: var(--soft); }
.service-card.has-image div { padding: 24px; }
.service-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--red), var(--blue)); }
.service-card span { display: inline-grid; width: 48px; height: 48px; place-items: center; margin-bottom: 20px; color: var(--white); background: var(--blue); border-radius: 8px; font-weight: 900; }
.service-card h3, .news-card h3, .video-card h3, .branch-card h3 { margin: 0 0 8px; color: var(--navy); font-weight: 900; }
.service-card p, .news-card p, .split p, .page-hero p, .tracking-panel p, .lead, .branch-card p { color: var(--muted); }
.service-card, .news-card, .branch-card, .quick-actions a { transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.service-card:hover, .news-card:hover, .branch-card:hover, .quick-actions a:hover { transform: translateY(-4px); border-color: rgba(215,25,32,.28); box-shadow: 0 20px 48px rgba(7,31,73,0.14); }

.quick-actions { padding-top: 0; }
.quick-actions a { display: grid; gap: 6px; padding: 24px; border-left: 5px solid var(--red); }
.quick-actions strong { color: var(--blue); font-size: 21px; font-weight: 900; }
.quick-actions span { color: var(--muted); }

.branches { background: var(--soft); }
.branch-card { padding: 24px; }
.branch-card img { width: calc(100% + 48px); max-width: none; margin: -24px -24px 18px; aspect-ratio: 16/9; object-fit: cover; background: var(--soft); border-bottom: 1px solid var(--line); }
.branch-card ul { margin: 16px 0; padding-left: 20px; color: var(--muted); }
.branch-card a { color: var(--red); font-weight: 900; }

.split { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 34px; background: var(--soft); }
.video-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.video-card { overflow: hidden; }
.video-card video { width: 100%; aspect-ratio: 16/9; background: #000; object-fit: cover; }
.video-card h3 { padding: 16px; }
.news-card { overflow: hidden; }
.news-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: var(--soft); }
.news-card div { padding: 21px; }
.news-card time { color: var(--blue); font-size: 13px; font-weight: 900; }

.page-hero, .tracking-panel { display: grid; min-height: 360px; align-items: end; padding: 88px clamp(20px, 6vw, 88px); background: linear-gradient(135deg, #eef4ff 0%, #fff 56%, #fff1f2 100%); }
.page-hero div, .tracking-panel div { max-width: 840px; }
.page-hero-media {
  position: relative;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .72fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: 560px;
  overflow: hidden;
  color: var(--white);
  background:
    linear-gradient(125deg, rgba(7,31,73,.97) 0%, rgba(11,58,130,.9) 48%, rgba(215,25,32,.74) 100%),
    radial-gradient(circle at 82% 18%, rgba(245,179,1,.36), transparent 28%);
}
.page-hero-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(90deg, rgba(0,0,0,.7), transparent 80%);
}
.page-hero-copy { position: relative; z-index: 1; max-width: 880px; }
.page-hero-copy .eyebrow, .page-hero-media .eyebrow { color: var(--gold); }
.page-hero-copy p { max-width: 760px; color: rgba(255,255,255,.86); font-size: 20px; }
.page-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn.secondary.light { color: var(--white); background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28); backdrop-filter: blur(12px); }
.page-hero-card {
  position: relative;
  z-index: 1;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 8px;
  background: rgba(255,255,255,.12);
  box-shadow: 0 32px 80px rgba(0,0,0,.28);
}
.page-hero-card img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.page-hero-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(180deg, transparent, rgba(7,31,73,.88));
}
.page-hero-card figcaption {
  position: absolute;
  z-index: 1;
  left: 22px;
  right: 22px;
  bottom: 20px;
  display: grid;
  gap: 3px;
}
.page-hero-card span { color: var(--gold); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.page-hero-card strong { color: var(--white); font-size: 24px; line-height: 1.15; font-weight: 900; }
.page-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 28px;
  align-items: start;
  background: linear-gradient(180deg, #fff 0%, #f6f9ff 100%);
}
.page-content-panel {
  min-width: 0;
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 18px 50px rgba(7,31,73,.08);
}
.prose { max-width: 900px; margin-inline: auto; }
.page-content-panel.prose { max-width: none; margin: 0; }
.prose h1, .prose h2, .prose h3 { color: var(--navy); line-height: 1.2; }
.prose h2 {
  position: relative;
  margin-top: 1.35em;
  padding-left: 18px;
}
.prose h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: .18em;
  bottom: .16em;
  width: 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--red), var(--blue));
}
.prose p { color: #344054; }
.prose ul, .prose ol { display: grid; gap: 8px; padding-left: 24px; color: #344054; }
.prose li::marker { color: var(--red); font-weight: 900; }
.page-side-panel {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 16px;
}
.side-block {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 18px 46px rgba(7,31,73,.08);
}
.side-block h2 {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: 24px;
  line-height: 1.2;
}
.side-link-list { display: grid; gap: 10px; }
.side-link-list a {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #dce7fb;
  border-radius: 8px;
  background: #f7faff;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.side-link-list a:hover { transform: translateY(-2px); border-color: rgba(215,25,32,.36); background: #fff; }
.side-link-list span {
  grid-row: span 2;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--white);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--red), var(--blue));
  font-size: 13px;
  font-weight: 900;
}
.side-link-list strong { color: var(--blue); line-height: 1.2; }
.side-link-list small { color: var(--muted); font-size: 13px; line-height: 1.5; }
.route-block {
  color: var(--white);
  background: linear-gradient(135deg, var(--navy), var(--blue));
  border-color: rgba(255,255,255,.18);
}
.route-block h2, .route-block .eyebrow { color: var(--white); }
.route-mini-grid { display: grid; gap: 10px; }
.route-mini-grid span {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.84);
  font-weight: 800;
}
.route-mini-grid strong {
  display: inline-grid;
  min-width: 44px;
  height: 30px;
  place-items: center;
  color: var(--navy);
  border-radius: 6px;
  background: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; padding: 72px clamp(20px, 6vw, 88px); background: var(--soft); }
.article { min-width: 0; padding: 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); box-shadow: var(--shadow); }
.article-image { width: 100%; max-height: 480px; margin-bottom: 28px; border-radius: 8px; object-fit: cover; }
.lead { font-size: 20px; }
.share-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
.share-row a, .share-row button { min-height: 42px; padding: 9px 16px; border: 0; border-radius: 8px; font: inherit; font-weight: 900; cursor: pointer; }
.share-facebook { color: var(--white); background: #1877f2; }
.share-row button { color: var(--blue); background: #eaf1ff; }
.article-sidebar { display: grid; align-content: start; gap: 18px; }
.ad-card { display: grid; overflow: hidden; }
.ad-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.ad-card strong, .ad-card span, .ad-card em { margin: 0 18px; }
.ad-card strong { margin-top: 16px; color: var(--navy); font-size: 20px; font-weight: 900; }
.ad-card span { color: var(--muted); }
.ad-card em { margin-bottom: 18px; color: var(--red); font-style: normal; font-weight: 900; }
.related-news { padding: 20px; }
.related-news h2 { margin: 0 0 14px; color: var(--navy); font-size: 22px; }
.related-news a { display: grid; gap: 4px; padding: 14px 0; border-top: 1px solid var(--line); }
.related-news span { color: var(--muted); font-size: 13px; }
.related-news strong { color: var(--blue); }

.tracking-panel { grid-template-columns: 1fr 0.85fr; gap: 34px; align-items: center; }
.tracking-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 14px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.tracking-options { display: grid; gap: 12px; }
.tracking-options .tracking-form { grid-template-columns: 180px minmax(0, 1fr) auto; }
.tracking-options .air-only-tracking {
  grid-template-columns: minmax(0, 1fr) auto;
}
.tracking-page-sea-button {
  width: 100%;
  box-shadow: 0 14px 34px rgba(7,31,73,.1);
}
.partner-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.partner-links a { display: inline-flex; min-height: 40px; align-items: center; padding: 8px 14px; color: var(--blue); background: #eaf1ff; border: 1px solid #c8d8fa; border-radius: 8px; font-weight: 900; }
.partner-links a:hover { color: var(--white); background: linear-gradient(135deg, var(--red), var(--blue)); }
input, textarea, select { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font: inherit; background: var(--white); }
textarea { min-height: 130px; resize: vertical; }
.tracking-result[hidden] { display: none; }
.timeline { display: grid; gap: 14px; max-width: 780px; }
.timeline article { position: relative; display: grid; gap: 4px; padding: 18px 18px 18px 50px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.timeline article::before { content: ""; position: absolute; top: 22px; left: 18px; width: 16px; height: 16px; border: 3px solid var(--line); border-radius: 50%; background: var(--white); }
.timeline article.is-done::before, .timeline article.is-active::before { border-color: var(--red); background: var(--red); }
.timeline article.is-active { border-color: var(--red); box-shadow: var(--shadow); }
.timeline span { color: var(--muted); }
.tracking-source-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 780px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid #c8d8fa;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #eef5ff);
  box-shadow: 0 16px 36px rgba(7, 31, 73, .08);
}
.tracking-source-card strong { display: block; color: var(--navy); font-size: 18px; }
.tracking-source-card p { margin: 6px 0 0; color: var(--muted); }
.tracking-source-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.tracking-source-actions .btn { min-height: 44px; white-space: nowrap; }

.contact-section { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 24px; background: var(--soft); }
.contact-info h2 { margin-top: 0; color: var(--navy); font-size: clamp(28px, 4vw, 44px); line-height: 1.15; }
.contact-form { display: grid; gap: 14px; padding: 26px; }
.form-note { margin: 0; color: var(--blue); font-weight: 800; }
.site-footer { display: flex; justify-content: space-between; gap: 24px; padding: 40px clamp(20px, 6vw, 88px); color: var(--white); background: linear-gradient(135deg, var(--navy), #071936); }
.site-footer p { margin: 8px 0 0; color: #c9d7f2; }
.footer-meta { display: grid; gap: 14px; justify-items: end; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.visitor-badge {
  display: inline-grid;
  grid-template-columns: auto auto;
  gap: 2px 10px;
  align-items: center;
  min-width: 190px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.visitor-badge span { color: #c9d7f2; font-size: 13px; font-weight: 800; }
.visitor-badge strong { color: var(--white); font-size: 24px; line-height: 1; font-weight: 900; text-align: right; }
.visitor-badge small { grid-column: 1 / -1; color: var(--gold); font-size: 12px; font-weight: 900; text-align: right; }

.admin { background: var(--soft); }
.admin-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 70px; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.admin-actions, .row-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.admin .button.subtle { color: var(--ink); background: var(--white); border: 1px solid var(--line); box-shadow: none; }
.admin-tabs { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; padding: 12px; background: rgba(245,248,255,0.92); backdrop-filter: blur(16px); }
.admin-tabs a, .row-actions a { display: inline-flex; min-height: 36px; align-items: center; padding: 7px 12px; color: var(--blue); background: #eaf1ff; border-radius: 8px; font-weight: 800; }
.admin-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.admin-card { padding: 22px; }
.admin-card.full { grid-column: 1 / -1; }
.admin-form { display: grid; gap: 12px; }
.admin-list { display: grid; gap: 10px; margin-top: 16px; }
.admin-list article { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); }
.notice { padding: 12px 16px; margin-bottom: 16px; color: var(--blue); background: #eaf1ff; border: 1px solid #c8d8fa; border-radius: 8px; }
.login-card { max-width: 560px; }
.media-library { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.media-library article { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.media-library img, .media-library video { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: #000; }
.media-library div { display: grid; gap: 8px; padding: 12px; }
.media-library input { font-size: 13px; }

@media (max-width: 1000px) {
  .article-layout, .page-detail-layout { grid-template-columns: 1fr; }
  .page-side-panel { position: static; }
}
@media (max-width: 900px) {
  .menu-toggle { display: inline-grid; place-items: center; }
  .main-nav { position: absolute; top: 76px; right: 16px; left: 16px; display: none; flex-direction: column; align-items: stretch; padding: 18px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
  .main-nav.is-open { display: flex; }
  .metrics, .service-grid, .news-grid, .quick-actions, .branch-grid, .intro-band, .split, .video-list, .tracking-panel, .contact-section, .admin-grid, .media-library, .page-hero-media { grid-template-columns: 1fr; }
  .hero { min-height: 590px; }
  .site-footer, .section-heading, .admin-topbar { align-items: flex-start; flex-direction: column; }
  .footer-meta { justify-items: start; }
  .page-hero-media { min-height: auto; padding-top: 72px; }
  .page-hero-card img { aspect-ratio: 16/10; }
}
@media (max-width: 560px) {
  .brand-logo { width: 128px; }
  .brand-text { display: none; }
  .tracking-form { grid-template-columns: 1fr; }
  .tracking-options .tracking-form { grid-template-columns: 1fr; }
  .tracking-source-card { align-items: stretch; flex-direction: column; }
  .tracking-source-actions { justify-content: stretch; }
  .tracking-source-actions .btn { width: 100%; justify-content: center; }
  .hero h1, .page-hero h1, .tracking-panel h1, .article h1 { font-size: 38px; }
  .article, .article-layout { padding: 20px; }
  .page-content-panel, .side-block { padding: 18px; }
  .side-link-list a { grid-template-columns: 42px minmax(0, 1fr); }
  .side-link-list span { width: 42px; height: 42px; }
}

.hero-tracking-card, .hero-track-hub {
  position: absolute;
  right: clamp(20px, 6vw, 88px);
  bottom: 42px;
  z-index: 3;
  width: min(520px, calc(100% - 40px));
  grid-template-columns: 1fr 1.1fr auto;
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255,255,255,0.72);
  box-shadow: 0 28px 70px rgba(7,31,73,0.28);
}
.hero-track-hub {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 16px;
}
.track-hub-head strong { display: block; color: var(--blue); font-size: 19px; font-weight: 900; }
.track-hub-head span { color: var(--muted); font-size: 13px; font-weight: 700; }
.track-hub-form {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0;
  border: 0;
  box-shadow: none;
}
.track-sea-link {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 2px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #d8e5ff;
  border-radius: 8px;
  background: linear-gradient(135deg, #f8fbff, #fff5f5);
}
.track-sea-link span {
  grid-row: span 2;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--white);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--red), var(--blue));
  font-weight: 900;
}
.track-sea-link strong { color: var(--blue); line-height: 1.2; }
.track-sea-link small { color: var(--muted); font-weight: 700; line-height: 1.4; }
.hero-tracking-card strong { display: block; color: var(--blue); font-weight: 900; }
.hero-tracking-card span { color: var(--muted); font-size: 13px; }
.hero-tracking-card input { min-width: 0; }
.hero-tracking-card button, .tracking-form button, .contact-form button, .btn.primary, .nav-cta {
  background: linear-gradient(135deg, #e31b23 0%, #0b3a82 100%);
  box-shadow: 0 14px 34px rgba(215, 25, 32, 0.32);
}
.hero-tracking-card button:hover, .tracking-form button:hover, .btn.primary:hover, .nav-cta:hover {
  transform: translateY(-1px);
  filter: saturate(1.1);
}
.home-slider { overflow: hidden; background: #fff; }
.home-slider .section-heading > span { color: var(--muted); font-weight: 700; }
.slide-grid {
  --slide-index: 0;
  display: flex;
  gap: 18px;
  transform: translateX(calc(var(--slide-index) * -50%));
  transition: transform .65s cubic-bezier(.2,.7,.2,1);
  will-change: transform;
}
.slide-card {
  position: relative;
  flex: 0 0 calc(50% - 9px);
  min-height: 340px;
  display: grid;
  align-items: end;
  overflow: hidden;
  border-radius: 8px;
  color: #fff;
  box-shadow: var(--shadow);
  opacity: .7;
  transition: opacity .35s ease, transform .35s ease, outline-color .35s ease;
  outline: 3px solid transparent;
  outline-offset: -3px;
}
.slide-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.slide-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,31,73,0.05), rgba(7,31,73,0.88));
}
.slide-card div {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  padding: 26px;
}
.slide-card strong { font-size: clamp(24px, 3vw, 34px); line-height: 1.18; font-weight: 900; }
.slide-card span { color: rgba(255,255,255,0.86); }
.slide-card.is-active { opacity: 1; transform: scale(1.01); outline-color: rgba(245,179,1,.82); }
.slide-dots { display: flex; gap: 8px; margin-top: 18px; }
.slide-dots button {
  width: 34px;
  height: 6px;
  padding: 0;
  min-height: 0;
  border: 0;
  border-radius: 999px;
  background: #cad8f2;
  cursor: pointer;
}
.slide-dots button.is-active { background: linear-gradient(90deg, var(--red), var(--blue)); }
.reveal-ready { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal-ready.is-visible { opacity: 1; transform: translateY(0); }
@keyframes heroDrift {
  from { transform: scale(1.02) translate3d(0,0,0); }
  to { transform: scale(1.08) translate3d(1.4%, -1%, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-media, .slide-grid, .reveal-ready, .service-card, .news-card, .branch-card, .quick-actions a { animation: none; transition: none; }
}
@media (min-width: 1100px) {
  .news-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .hero-tracking-card {
    position: relative;
    right: auto;
    bottom: auto;
    margin: -52px 20px 36px;
    width: auto;
    grid-template-columns: 1fr;
  }
  .slide-grid { grid-template-columns: 1fr; }
  .slide-grid { transform: translateX(calc(var(--slide-index) * -100%)); }
  .slide-card { flex-basis: 100%; }
}
.db-status-card { border-left: 5px solid var(--blue); }
.db-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.db-pills span { display: inline-flex; min-height: 34px; align-items: center; padding: 6px 12px; color: var(--blue); background: #eaf1ff; border-radius: 999px; font-weight: 800; }
.dashboard-card {
  position: relative;
  overflow: hidden;
  border-left: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,251,255,.96)),
    linear-gradient(135deg, rgba(215,25,32,.08), rgba(11,58,130,.1));
}
.dashboard-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--red), var(--blue));
}
.dashboard-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid #d8e5ff;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(7,31,73,.96), rgba(11,58,130,.88)),
    radial-gradient(circle at 85% 20%, rgba(245,179,1,.28), transparent 32%);
  color: var(--white);
}
.dashboard-hero h2 { margin: 0; font-size: clamp(30px, 4vw, 48px); line-height: 1.08; font-weight: 900; }
.dashboard-hero p { margin: 8px 0 0; color: rgba(255,255,255,.82); }
.dashboard-hero .eyebrow { color: var(--gold); }
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.metric-card {
  position: relative;
  display: grid;
  gap: 5px;
  min-height: 132px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 14px 34px rgba(7,31,73,.07);
}
.metric-card::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -26px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(215,25,32,.14), rgba(11,58,130,.16));
}
.metric-card.primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--red), var(--blue));
  border-color: transparent;
}
.metric-card span { color: var(--blue); font-size: 14px; font-weight: 900; }
.metric-card strong { color: var(--navy); font-size: 34px; line-height: 1; font-weight: 900; }
.metric-card small { color: var(--muted); font-weight: 700; }
.metric-card.primary span, .metric-card.primary strong, .metric-card.primary small { color: var(--white); }
.dashboard-panels {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 14px;
  margin-top: 16px;
}
.dashboard-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 14px 34px rgba(7,31,73,.07);
}
.dashboard-panel:first-child { grid-row: span 2; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.panel-head h3 { margin: 0; color: var(--navy); font-size: 20px; line-height: 1.25; font-weight: 900; }
.panel-head span { color: var(--red); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.analytics-list { display: grid; gap: 10px; }
.analytics-list a, .analytics-list.compact div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e1e9f8;
  border-radius: 8px;
  background: #f8fbff;
}
.analytics-list a:hover { border-color: rgba(215,25,32,.28); background: #fff; }
.analytics-list strong { min-width: 0; color: var(--blue); font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.analytics-list small { min-width: 0; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.analytics-list span {
  grid-row: span 2;
  display: inline-grid;
  min-width: 42px;
  min-height: 34px;
  place-items: center;
  padding: 4px 10px;
  color: var(--white);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--blue));
  font-weight: 900;
}
.analytics-list.compact div { grid-template-columns: minmax(0, 1fr) auto; }
.analytics-list.compact span { grid-row: auto; }
.analytics-list.recent a { grid-template-columns: minmax(0, 1fr); }
.empty-state {
  margin: 0;
  padding: 16px;
  color: var(--muted);
  border: 1px dashed #c8d8fa;
  border-radius: 8px;
  background: #f8fbff;
  font-weight: 700;
}

.sea-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  min-height: 560px;
  padding: 96px clamp(20px, 6vw, 88px);
  overflow: hidden;
  color: var(--white);
  background:
    linear-gradient(120deg, rgba(7,31,73,.97), rgba(11,58,130,.82) 55%, rgba(215,25,32,.66)),
    url('https://images.unsplash.com/photo-1494412651409-8963ce7935a7?auto=format&fit=crop&w=1800&q=80') center/cover;
}
.sea-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 42px 42px;
}
.sea-hero > * { position: relative; z-index: 1; }
.sea-hero h1 { margin: 0; font-size: clamp(44px, 7vw, 86px); line-height: 1.04; font-weight: 900; }
.sea-hero p { max-width: 760px; color: rgba(255,255,255,.86); font-size: 20px; }
.sea-hero .eyebrow { color: var(--gold); }
.sea-track-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 8px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 28px 70px rgba(0,0,0,.28);
}
.sea-track-card label { color: var(--blue); font-weight: 900; }
.sea-track-card button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  color: var(--white);
  background: linear-gradient(135deg, var(--red), var(--blue));
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}
.sea-tracking-section { background: linear-gradient(180deg, #fff, #f6f9ff); }
.sea-empty {
  max-width: 880px;
  margin: 0 auto;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}
.sea-empty h2 { margin: 0; color: var(--navy); font-size: clamp(28px, 4vw, 46px); line-height: 1.16; }
.sea-empty p { color: var(--muted); }
.sea-empty.is-warn { border-color: #ffd4d4; background: #fff8f8; }
.sea-result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: start;
}
.sea-status-panel, .sea-summary-card, .sea-event-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 18px 50px rgba(7,31,73,.08);
}
.sea-status-panel { padding: 26px; }
.sea-status-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.sea-status-head h2 { margin: 0; color: var(--navy); font-size: clamp(28px, 4vw, 42px); line-height: 1; }
.sea-status-head p { margin: 8px 0 0; color: var(--muted); }
.sea-status-head > span {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 8px 14px;
  color: var(--white);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--blue));
  font-weight: 900;
  white-space: nowrap;
}
.sea-progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.sea-progress div {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid #dfe8f8;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--muted);
}
.sea-progress div.is-done { border-color: rgba(11,58,130,.28); background: #eef5ff; color: var(--blue); }
.sea-progress div.is-current { border-color: rgba(215,25,32,.42); background: #fff6f6; color: var(--red); box-shadow: 0 14px 32px rgba(215,25,32,.12); }
.sea-progress i {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--white);
  border-radius: 8px;
  background: #9aa9c1;
  font-style: normal;
  font-weight: 900;
}
.sea-progress .is-done i, .sea-progress .is-current i { background: linear-gradient(135deg, var(--red), var(--blue)); }
.sea-progress strong { line-height: 1.25; }
.sea-summary-card { padding: 22px; }
.sea-summary-card h3 { margin: 0 0 14px; color: var(--navy); font-size: 24px; }
.sea-summary-card dl { display: grid; gap: 10px; margin: 0; }
.sea-summary-card dt { color: var(--muted); font-size: 13px; font-weight: 900; }
.sea-summary-card dd { margin: -8px 0 0; color: var(--blue); font-weight: 900; }
.sea-event-panel { margin-top: 22px; padding: 24px; }
.sea-events { display: grid; gap: 12px; }
.sea-events article {
  display: grid;
  gap: 4px;
  padding: 16px;
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  background: #f8fbff;
}
.sea-events span { color: var(--muted); font-size: 13px; font-weight: 800; }
.sea-events strong { color: var(--navy); font-size: 18px; }
.sea-events p { margin: 0; color: var(--muted); }
.sea-admin-topbar h1 { color: var(--navy); }
.sea-login-card { border-top: 5px solid var(--blue); }
.sea-dashboard-hero { background: linear-gradient(135deg, #063160, #0b3a82 58%, #b3131a); }
.sea-table { display: grid; gap: 8px; overflow-x: auto; }
.sea-table-head, .sea-table article {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr 1fr .7fr .7fr;
  gap: 10px;
  min-width: 860px;
  align-items: center;
}
.sea-table-head {
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}
.sea-table article {
  padding: 12px;
  border: 1px solid #dfe8f8;
  border-radius: 8px;
  background: #f8fbff;
}
.sea-table a { color: var(--red); font-weight: 900; }
.sea-table span { color: var(--muted); font-weight: 700; }

.admin-modern { width: min(1320px, calc(100% - 32px)); }
.admin-subtitle { margin: 6px 0 0; color: var(--muted); font-weight: 700; }
.admin-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.admin-sidebar {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 14px 38px rgba(7,31,73,0.08);
}
.admin-jump {
  display: grid;
  gap: 8px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 900;
}
.admin-menu { display: grid; gap: 8px; }
.admin-menu a {
  display: flex;
  min-height: 40px;
  align-items: center;
  padding: 9px 12px;
  color: var(--blue);
  background: #eef4ff;
  border: 1px solid #d8e5ff;
  border-radius: 8px;
  font-weight: 900;
}
.admin-menu a:hover { color: var(--white); background: linear-gradient(135deg, var(--red), var(--blue)); }
.admin-content { display: grid; gap: 18px; min-width: 0; }
.admin-group-tabs {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid #d8e5ff;
  border-radius: 8px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 14px 34px rgba(7,31,73,.08);
  backdrop-filter: blur(14px);
}
.admin-group-tabs button {
  min-height: 40px;
  padding: 8px 14px;
  color: var(--blue);
  border: 1px solid #d8e5ff;
  border-radius: 8px;
  background: #eef4ff;
  cursor: pointer;
  font-weight: 900;
}
.admin-group-tabs button.is-active {
  color: var(--white);
  border-color: transparent;
  background: linear-gradient(135deg, var(--red), var(--blue));
  box-shadow: 0 12px 26px rgba(215,25,32,.22);
}
.is-hidden { display: none !important; }
.admin-menu a.is-active {
  color: var(--white);
  background: linear-gradient(135deg, var(--red), var(--blue));
}
.admin-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.admin-card-head h2 { margin-bottom: 4px; }
.admin-card-head p, .help-text { margin: 0; color: var(--muted); }
.status-dot {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 900;
  white-space: nowrap;
}
.status-dot.is-ok { color: #067647; background: #dcfae6; }
.status-dot.is-warn { color: #b42318; background: #fee4e2; }
.admin-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 14px 0;
}
.admin-summary article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f8fbff);
}
.admin-summary strong { display: block; color: var(--red); font-size: 32px; line-height: 1; font-weight: 900; }
.admin-summary span { color: var(--blue); font-weight: 900; }
.admin-two-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.admin-two-cols.compact { gap: 10px; }
.admin-two-cols .wide, .form-actions.wide { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tall { min-height: 240px; }
.editable-table { display: grid; gap: 8px; }
.table-head, .table-row.two {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 10px;
}
.table-head {
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}
.admin-fieldset {
  margin: 0;
  padding: 16px;
  border: 1px solid #d8e5ff;
  border-radius: 8px;
  background: #fbfdff;
}
.admin-fieldset legend {
  padding: 0 8px;
  color: var(--red);
  font-weight: 900;
}
.quick-select { min-width: min(360px, 100%); }
.cards-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.cards-compact article p { word-break: break-word; }
.bulk-news {
  margin-top: 18px;
  padding: 16px;
  border: 1px dashed var(--blue);
  border-radius: 8px;
  background: #f7faff;
}
.bulk-news summary {
  color: var(--blue);
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
}
.bulk-news form { margin-top: 16px; }
.admin-upload {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.inline-upload {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.inline-upload input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.inline-upload button,
.upload-image-button {
  min-height: 36px;
  padding: 7px 12px;
  color: var(--white);
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--red), var(--blue));
  box-shadow: 0 10px 22px rgba(215,25,32,.18);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}
.upload-image-button::before { content: "+ "; font-weight: 900; }
.inline-upload small {
  color: var(--blue);
  font-weight: 800;
}
.upload-preview {
  grid-column: 1 / -1;
  display: block;
  overflow: hidden;
  width: min(180px, 100%);
  border: 1px solid #d8e5ff;
  border-radius: 8px;
  background: #f7faff;
}
.upload-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.upload-preview span {
  display: block;
  padding: 10px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

@media (max-width: 1100px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; }
  .admin-menu { grid-template-columns: repeat(2, 1fr); }
  .analytics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-panels { grid-template-columns: 1fr; }
  .dashboard-panel:first-child { grid-row: auto; }
  .sea-result-layout { grid-template-columns: 1fr; }
  .sea-progress { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .admin-summary, .admin-two-cols, .table-head, .table-row.two, .cards-compact, .admin-upload, .analytics-grid { grid-template-columns: 1fr; }
  .admin-card-head { flex-direction: column; }
  .dashboard-hero { flex-direction: column; }
  .admin-menu { grid-template-columns: 1fr; }
  .sea-hero { grid-template-columns: 1fr; padding-top: 72px; }
  .sea-status-head { flex-direction: column; }
  .sea-progress { grid-template-columns: 1fr; }
}

/* Final responsive polish for public website */
@media (min-width: 1180px) {
  .hero-content, .section, .site-footer, .page-hero, .tracking-panel, .sea-hero {
    padding-left: max(88px, calc((100vw - 1280px) / 2 + 40px));
    padding-right: max(88px, calc((100vw - 1280px) / 2 + 40px));
  }
  .hero-tracking-card {
    right: max(88px, calc((100vw - 1280px) / 2 + 40px));
  }
}

@media (max-width: 1100px) {
  .main-nav { gap: 10px; font-size: 14px; }
  .brand { min-width: 190px; }
  .brand-logo { width: 136px; }
  .sea-home-banner { grid-template-columns: 1fr; }
  .sea-home-panel { max-width: 560px; }
}

@media (max-width: 900px) {
  body { overflow-x: hidden; }
  .site-header { padding: 12px 18px; }
  .main-nav { max-height: calc(100vh - 96px); overflow-y: auto; }
  .main-nav a { padding: 10px 12px; border-radius: 8px; background: #f7faff; }
  .hero { min-height: auto; display: block; padding-bottom: 1px; }
  .hero-media { transform: none; }
  .hero-content { padding: 86px 22px 88px; }
  .hero p { font-size: 17px; }
  .hero-actions .btn, .sea-home-actions .btn { width: 100%; }
  .section { padding: 56px 20px; }
  .sea-home-banner { padding-top: 58px; padding-bottom: 58px; }
  .sea-home-copy p { font-size: 16px; }
  .metrics { gap: 0; }
  .metrics div { padding: 24px 20px; }
  .intro-band { gap: 18px; }
  .service-grid, .news-grid, .quick-actions, .branch-grid { gap: 14px; }
  .quick-actions a, .service-card, .branch-card, .news-card { box-shadow: 0 10px 28px rgba(7,31,73,0.08); }
}

@media (max-width: 560px) {
  .site-header { gap: 10px; }
  .brand { min-width: 0; }
  .brand-logo { width: 108px; height: 42px; }
  .menu-toggle { width: 42px; height: 42px; }
  .hero-content { padding: 72px 18px 78px; }
  .hero h1, .page-hero h1, .tracking-panel h1, .article h1, .sea-hero h1 { font-size: 34px; line-height: 1.08; }
  .hero p, .page-hero-copy p, .tracking-panel p, .sea-hero p { font-size: 16px; }
  .hero-tracking-card { margin: -42px 14px 28px; padding: 14px; }
  .section { padding: 46px 16px; }
  .section-heading { gap: 10px; margin-bottom: 20px; }
  .section-heading h2, .split h2, .intro-band h2, .sea-home-copy h2 { font-size: 28px; }
  .sea-home-banner { padding: 44px 16px; }
  .sea-home-panel { padding: 18px; }
  .sea-home-panel span { width: 52px; height: 52px; }
  .sea-home-panel strong { font-size: 22px; }
  .metrics strong { font-size: 30px; }
  .slide-card { min-height: 280px; }
  .slide-card div { padding: 20px; }
  .service-card.has-image div, .news-card div { padding: 18px; }
  .quick-actions a { padding: 18px; }
  .site-footer { padding: 32px 18px; }
  .visitor-badge { width: 100%; }
}

/* Compact navigation, tracking hub, and sea admin usability */
.sea-workbench {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.sea-workbench a {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid #d8e5ff;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(7,31,73,.06);
  transition: transform .2s ease, border-color .2s ease;
}
.sea-workbench a:hover { border-color: rgba(215,25,32,.32); transform: translateY(-2px); }
.sea-workbench strong { color: var(--blue); font-weight: 900; }
.sea-workbench span { color: var(--muted); font-size: 13px; font-weight: 700; }
.sea-training-flow {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid #d8e5ff;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f7faff);
}
.sea-training-flow ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: sea-flow;
}
.sea-training-flow li {
  position: relative;
  min-height: 132px;
  padding: 44px 14px 14px;
  border: 1px solid #e1e9f8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(7,31,73,.06);
  counter-increment: sea-flow;
}
.sea-training-flow li::before {
  content: counter(sea-flow);
  position: absolute;
  top: 12px;
  left: 14px;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: var(--white);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--blue));
  font-size: 12px;
  font-weight: 900;
}
.sea-training-flow strong { display: block; color: var(--blue); font-weight: 900; }
.sea-training-flow span { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.6; font-weight: 700; }
.sea-dashboard-panels { margin-top: 16px; }
.sea-mini-list { display: grid; gap: 10px; }
.sea-mini-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e1e9f8;
  border-radius: 8px;
  background: #f8fbff;
}
.sea-mini-list strong { display: block; color: var(--navy); font-weight: 900; }
.sea-mini-list small { color: var(--muted); font-weight: 700; }
.sea-mini-list span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 5px 10px;
  color: var(--white);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--blue));
  font-size: 12px;
  font-weight: 900;
}
.sea-mini-list em { color: var(--blue); font-style: normal; font-weight: 900; }
.sea-table .ops-only { grid-template-columns: 1.15fr 1fr .9fr 1fr; }

@media (max-width: 900px) {
  .nav-group summary { padding: 10px 12px; border-radius: 8px; background: #f7faff; }
  .submenu { position: static; min-width: 0; margin-top: 8px; transform: none; box-shadow: none; }
  .nav-group[open] .submenu { animation: none; }
  .hero-track-hub { position: relative; right: auto; bottom: auto; margin: -52px 20px 36px; width: auto; }
  .sea-training-flow ol { grid-template-columns: 1fr; }
  .sea-workbench { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .sea-workbench { grid-template-columns: 1fr; }
  .sea-mini-list article { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .track-hub-form { grid-template-columns: 1fr; }
  .hero-track-hub { margin: -42px 14px 28px; padding: 14px; }
  .track-sea-link { grid-template-columns: 42px minmax(0, 1fr); }
.track-sea-link span { width: 42px; height: 42px; }
}

.hero-sea-banner-link {
  display: inline-grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 2px 12px;
  align-items: center;
  width: min(390px, 100%);
  margin-top: 18px;
  padding: 12px 14px;
  color: var(--white);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(227,27,35,.94), rgba(7,54,124,.94));
  box-shadow: 0 18px 42px rgba(0, 18, 55, .28);
  text-decoration: none;
  backdrop-filter: blur(8px);
}
.hero-sea-banner-link span {
  grid-row: span 2;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #fff;
  border-radius: 8px;
  background: rgba(255,255,255,.16);
  font-size: 12px;
  font-weight: 900;
}
.hero-sea-banner-link strong {
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
}
.hero-sea-banner-link small {
  color: rgba(255,255,255,.82);
  font-weight: 700;
  line-height: 1.35;
}
.hero-sea-banner-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 52px rgba(0, 18, 55, .34);
}

/* Premium homepage refinement */
.hero {
  min-height: 590px;
  grid-template-columns: 1fr;
  align-items: end;
  padding: 0 clamp(20px, 6vw, 88px);
  overflow: hidden;
}
.hero-media::after {
  background:
    linear-gradient(102deg, rgba(7,31,73,.94) 0%, rgba(11,58,130,.76) 48%, rgba(215,25,32,.38) 100%),
    linear-gradient(180deg, rgba(7,31,73,.16), rgba(7,31,73,.22));
}
.hero-content {
  width: min(780px, 100%);
  padding-left: 0;
  padding-right: 0;
  padding-top: 112px;
  padding-bottom: 112px;
}
.hero h1 {
  max-width: 820px;
  font-size: clamp(40px, 5.4vw, 66px);
  letter-spacing: 0;
}
.hero p {
  max-width: 660px;
  font-size: 18px;
  line-height: 1.75;
}
.hero-actions { margin-top: 24px; }
.hero-actions .btn {
  min-height: 46px;
  padding-inline: 20px;
}

/* Restore premium compact homepage */
.hero {
  position: relative;
  min-height: 520px;
  display: grid;
  align-items: center;
  padding: 0 clamp(22px, 6vw, 88px);
  color: var(--white);
}
.hero-media {
  transform: none;
  animation: heroDrift 24s ease-in-out infinite alternate;
}
.hero-media::after {
  background:
    linear-gradient(103deg, rgba(7,31,73,.96) 0%, rgba(11,58,130,.82) 48%, rgba(215,25,32,.38) 100%),
    linear-gradient(180deg, rgba(7,31,73,.08), rgba(7,31,73,.2));
}
.hero-content {
  width: min(660px, calc(100% - 500px));
  min-width: 0;
  padding: 86px 0 82px;
}
.hero h1 {
  max-width: 720px;
  font-size: clamp(36px, 4.7vw, 58px);
  line-height: 1.08;
}
.hero p {
  max-width: 620px;
  margin-bottom: 0;
  font-size: 17px;
  line-height: 1.75;
}
.hero-actions {
  gap: 10px;
  margin-top: 24px;
}
.hero-track-hub {
  right: clamp(22px, 6vw, 88px);
  bottom: 50%;
  width: min(430px, calc(100% - 44px));
  padding: 18px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 8px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 26px 64px rgba(7,31,73,.28);
  transform: translateY(50%);
}
.track-hub-head strong {
  font-size: 18px;
}
.track-hub-form input {
  min-height: 48px;
}
.track-hub-form button {
  min-height: 48px;
  min-width: 86px;
}
.track-sea-link {
  padding: 10px 12px;
  background: linear-gradient(135deg, #f9fbff, #fff);
}
.track-sea-link span {
  width: 42px;
  height: 42px;
  font-size: 11px;
}
.metrics {
  width: min(1180px, calc(100% - 44px));
  margin: -28px auto 0;
  position: relative;
  z-index: 4;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(7,31,73,.1);
}
.intro-band {
  margin-top: 0;
  padding-top: 72px;
  padding-bottom: 72px;
}
.home-slider {
  padding-top: 72px;
}
.slide-card {
  min-height: 300px;
}

@media (min-width: 1180px) {
  .hero-track-hub {
    right: max(88px, calc((100vw - 1280px) / 2 + 40px));
  }
}

@media (max-width: 1000px) {
  .hero {
    min-height: auto;
    display: block;
    padding: 0;
  }
  .hero-content {
    width: auto;
    padding: 76px 22px 86px;
  }
  .hero-track-hub {
    position: relative;
    right: auto;
    bottom: auto;
    margin: -44px 20px 28px;
    transform: none;
  }
  .metrics {
    width: auto;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

@media (max-width: 560px) {
  .hero-content {
    padding: 64px 18px 82px;
  }
  .hero h1 {
    font-size: 34px;
  }
  .hero-track-hub {
    margin: -36px 14px 24px;
  }
}

/* Ready-to-use public UI polish */
body {
  font-weight: 500;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}
.site-header {
  padding-top: 12px;
  padding-bottom: 12px;
}
.main-nav {
  gap: 6px;
}
.main-nav > a,
.nav-group summary {
  color: #26364d;
  font-size: 14px;
  font-weight: 800;
}
.main-nav > a[href*="sea-tracking"] {
  color: var(--white);
  background: linear-gradient(135deg, var(--red), var(--blue));
  box-shadow: 0 10px 24px rgba(215,25,32,.2);
}
.main-nav > a[href*="sea-tracking"]:hover {
  color: var(--white);
  transform: translateY(-1px);
}
.submenu {
  min-width: 246px;
}
.submenu a {
  font-size: 14px;
  font-weight: 800;
}
.hero-track-hub {
  gap: 12px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,251,255,.96));
}
.track-hub-head {
  display: grid;
  gap: 2px;
}
.track-hub-head strong {
  color: var(--navy);
  letter-spacing: 0;
}
.track-hub-form {
  gap: 8px;
}
.track-hub-form input {
  border-color: #cfdcf2;
  background: #fff;
}
.track-hub-form input:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 3px solid rgba(21,94,239,.14);
  border-color: var(--blue-2);
}
.track-sea-link {
  position: relative;
  overflow: hidden;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  min-height: 78px;
  gap: 4px 12px;
  border-color: rgba(215,25,32,.18);
  background:
    linear-gradient(135deg, rgba(215,25,32,.08), rgba(11,58,130,.08)),
    #fff;
}
.track-sea-link::after {
  content: "ดูสถานะ";
  position: static;
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 3px 8px;
  color: var(--white);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--blue));
  font-size: 11px;
  font-weight: 900;
}
.track-sea-link strong {
  padding-right: 0;
  font-size: 15px;
  line-height: 1.25;
}
.track-sea-link small {
  font-size: 12px;
  line-height: 1.45;
}
.track-sea-link:hover {
  transform: translateY(-2px);
  border-color: rgba(215,25,32,.36);
  box-shadow: 0 16px 36px rgba(7,31,73,.14);
}
.shipping-calendar-section {
  padding-top: 72px;
  background: linear-gradient(180deg, #fff 0%, #f6f9ff 100%);
}

@media (max-width: 1100px) {
  .main-nav > a,
  .nav-group summary {
    font-size: 13px;
    padding-inline: 9px;
  }
}

@media (max-width: 900px) {
  .main-nav > a[href*="sea-tracking"] {
    justify-content: center;
  }
  .submenu {
    min-width: 0;
  }
  .hero-track-hub {
    max-width: 620px;
  }
}

@media (max-width: 560px) {
  .track-sea-link::after {
    width: max-content;
    margin-top: 4px;
  }
  .track-sea-link {
    grid-template-columns: 42px minmax(0, 1fr);
  }
  .track-sea-link::after {
    grid-column: 2;
    grid-row: auto;
    justify-self: start;
  }
}
.hero-track-hub {
  width: min(430px, calc(100% - 40px));
  gap: 10px;
  padding: 14px;
  border-color: rgba(255,255,255,.82);
  background: rgba(255,255,255,.92);
  box-shadow: 0 22px 54px rgba(7,31,73,.24);
  backdrop-filter: blur(16px);
}
.home-track-strip {
  position: relative;
  z-index: 5;
  padding: 0 clamp(20px, 6vw, 88px);
  background: linear-gradient(180deg, #dce8f8 0%, #eef4ff 100%);
}
.home-track-panel {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  z-index: 4;
  width: min(660px, calc(100% - 40px));
  margin: 0 auto;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 310px);
  gap: 8px 14px;
  align-items: center;
  border-color: rgba(255,255,255,.78);
  background: rgba(255,255,255,.95);
  box-shadow: 0 20px 58px rgba(4, 25, 62, .26);
  transform: translateY(-34px);
}
.home-track-panel .track-hub-head {
  grid-column: 1;
  padding-bottom: 0;
}
.track-hub-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.track-hub-head strong {
  color: var(--navy);
  font-size: 16px;
}
.track-hub-head span {
  color: #7a879b;
  font-size: 12px;
  text-align: right;
}
.track-hub-form input {
  min-height: 46px;
  background: #fbfdff;
}
.home-track-panel .track-hub-form {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}
.home-track-panel .track-hub-form input {
  border: 1px solid #cfdaee;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
.track-hub-form button {
  min-height: 46px;
  padding-inline: 18px;
}
.track-sea-link {
  grid-template-columns: 40px minmax(0, 1fr) auto;
  padding: 10px;
  border-color: #dce7fb;
  background: linear-gradient(135deg, #ffffff, #f7faff);
}
.home-track-panel .track-sea-link {
  grid-column: 2;
  grid-row: 1 / 3;
  min-height: 100%;
  align-self: stretch;
}
.metrics {
  padding-top: 18px;
}
.track-sea-link span {
  width: 40px;
  height: 40px;
  font-size: 12px;
}
.track-sea-link strong {
  font-size: 14px;
}
.track-sea-link small {
  font-size: 12px;
}
.track-sea-link::after {
  content: "ดูสถานะ";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 5px 10px;
  color: var(--red);
  border: 1px solid rgba(215,25,32,.18);
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  font-weight: 900;
}
.metrics div { padding: 26px 30px; }
.intro-band {
  padding-top: 68px;
  padding-bottom: 68px;
}
.section {
  padding-top: 68px;
  padding-bottom: 68px;
}
.home-slider, .branches {
  background: linear-gradient(180deg, #fff, #f7faff);
}
.shipping-calendar-section {
  background: linear-gradient(180deg, #eef4ff, #fff);
}
.calendar-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.calendar-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px 8px 10px;
  color: var(--blue);
  border: 1px solid #d6e3f8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(7,31,73,.06);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}
.calendar-tabs button span,
.calendar-panel-head > span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #fff;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--red), var(--blue));
  font-size: 11px;
  font-weight: 900;
}
.calendar-tabs button.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--blue), #082a61);
}
.calendar-tabs button.is-active span {
  background: rgba(255,255,255,.18);
}
.shipping-calendar-tables {
  display: grid;
}
.calendar-panel {
  display: none;
  gap: 14px;
  padding: 18px;
  border: 1px solid #d8e5ff;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(7,31,73,.08);
}
.calendar-panel.is-active {
  display: grid;
}
.calendar-panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.calendar-panel-head strong {
  display: block;
  color: var(--blue);
  font-size: 22px;
  font-weight: 900;
}
.calendar-panel-head small {
  color: var(--muted);
  font-weight: 800;
}
.calendar-month-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.calendar-month-tabs button {
  min-height: 38px;
  padding: 7px 13px;
  color: var(--blue);
  border: 1px solid #d6e3f8;
  border-radius: 8px;
  background: #f8fbff;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
}
.calendar-month-tabs button.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--red), var(--blue));
  box-shadow: 0 10px 24px rgba(11, 58, 130, .16);
}
.calendar-month {
  display: none;
  gap: 12px;
}
.calendar-month.is-active {
  display: grid;
}
.calendar-month-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid #dfe9f8;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f6f9ff);
}
.calendar-month-title strong {
  color: var(--blue);
  font-size: 24px;
  font-weight: 900;
}
.calendar-month-title span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #dce7f8;
  border-radius: 8px;
  background: #dce7f8;
  gap: 1px;
}
.calendar-weekday {
  display: grid;
  min-height: 42px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #082f6f, #0b3f8f);
  font-weight: 900;
}
.calendar-day {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 118px;
  padding: 10px;
  background: #fff;
}
.calendar-day.is-empty {
  background: #f1f5fb;
}
.calendar-day.has-event {
  background: linear-gradient(180deg, #fff, #f8fbff);
}
.calendar-day time {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--blue);
  border-radius: 999px;
  background: #eef4ff;
  font-weight: 900;
}
.calendar-badge {
  display: grid;
  gap: 2px;
  padding: 6px 7px;
  border: 1px solid rgba(11,58,130,.14);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 6px 14px rgba(7,31,73,.06);
}
.calendar-badge strong {
  display: inline-flex;
  width: max-content;
  min-width: 34px;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--blue));
  font-size: 11px;
  font-weight: 900;
}
.calendar-badge small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.calendar-badge.is-cutoff strong { background: linear-gradient(135deg, #d71920, #a20f19); }
.calendar-badge.is-departure strong { background: linear-gradient(135deg, #0b3a82, #0e64c8); }
.calendar-badge.is-arrival strong { background: linear-gradient(135deg, #0f8a5f, #0b5f43); }
.calendar-badge.is-holiday {
  border-color: rgba(215,25,32,.22);
  background: #fff7f7;
}
.calendar-badge.is-holiday strong { background: linear-gradient(135deg, #f59e0b, #d71920); }
.calendar-table {
  overflow-x: auto;
  border: 1px solid #e0e9f8;
  border-radius: 8px;
}
.calendar-row {
  display: grid;
  grid-template-columns: 1.25fr .9fr .9fr .9fr 1.3fr;
  min-width: 780px;
  border-top: 1px solid #e8eef8;
}
.calendar-row:first-child {
  border-top: 0;
}
.calendar-row span {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 12px 14px;
  color: var(--navy);
  font-weight: 800;
}
.calendar-row span + span {
  border-left: 1px solid #e8eef8;
}
.calendar-row strong {
  color: var(--blue);
  font-weight: 900;
}
.calendar-head span {
  min-height: 46px;
  color: var(--white);
  background: linear-gradient(135deg, #082f6f, #0b3f8f);
  font-size: 13px;
  font-weight: 900;
}
.service-card, .news-card, .branch-card, .quick-actions a {
  box-shadow: 0 10px 30px rgba(7,31,73,.075);
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
    display: block;
    padding: 0;
  }
  .hero-content {
    padding: 78px 22px 112px;
  }
  .hero h1 {
    font-size: clamp(36px, 8vw, 52px);
  }
  .hero-track-hub {
    margin: -72px 20px 32px;
    width: auto;
  }
  .home-track-panel {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    display: grid;
    grid-template-columns: 1fr;
    margin: 0 auto;
    width: auto;
    transform: translateY(-38px);
  }
  .calendar-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .calendar-tabs button {
    flex: 0 0 auto;
  }
  .calendar-month-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .calendar-month-tabs button {
    flex: 0 0 auto;
  }
  .calendar-grid {
    overflow-x: auto;
    grid-template-columns: repeat(7, minmax(118px, 1fr));
  }
  .calendar-month-title {
    display: grid;
    align-items: start;
  }
  .calendar-month-title span {
    text-align: left;
  }
  .calendar-row {
    min-width: 720px;
  }
  .track-hub-head {
    display: grid;
    gap: 2px;
  }
  .track-hub-head span {
    text-align: left;
  }
  .track-sea-link {
    grid-template-columns: 40px minmax(0, 1fr);
  }
  .home-track-panel .track-sea-link {
    grid-column: auto;
    grid-row: auto;
  }
  .track-sea-link::after {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .section {
    padding-top: 52px;
    padding-bottom: 52px;
  }
}

@media (max-width: 560px) {
  .hero-content {
    padding: 64px 18px 104px;
  }
  .hero h1 {
    font-size: 34px;
  }
  .hero-track-hub {
    margin: -52px 14px 28px;
  }
  .home-track-panel {
    margin: 0 auto;
    padding: 14px;
  }
  .hero-sea-banner-link {
    width: 100%;
    margin-top: 14px;
  }
  .calendar-panel {
    padding: 12px;
  }
  .calendar-grid {
    grid-template-columns: repeat(7, minmax(104px, 1fr));
  }
  .calendar-day {
    min-height: 108px;
    padding: 8px;
  }
  .calendar-badge small {
    font-size: 11px;
  }
  .calendar-row {
    min-width: 680px;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .track-hub-form {
    grid-template-columns: 1fr;
  }
  .metrics div {
    padding: 22px 18px;
  }
}

/* Final hero UX reset: air tracking first, sea as a separate action */
.hero {
  min-height: 560px;
  display: grid;
  align-items: center;
  padding: 0 max(88px, calc((100vw - 1280px) / 2 + 40px));
}
.hero-content {
  width: min(720px, calc(100% - 500px));
  padding: 96px 0 112px;
}
.hero .eyebrow {
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 13px;
  letter-spacing: .02em;
}
.hero h1 {
  max-width: 760px;
  font-size: clamp(42px, 5vw, 68px);
  line-height: 1.06;
}
.hero p {
  max-width: 680px;
  font-size: 18px;
  line-height: 1.78;
}
.home-track-panel {
  position: absolute;
  right: max(88px, calc((100vw - 1280px) / 2 + 40px));
  bottom: 56px;
  z-index: 5;
  width: min(420px, calc(100% - 48px));
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 8px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 24px 64px rgba(7,31,73,.28);
  transform: none;
}
.home-track-panel .track-hub-head {
  display: grid;
  grid-column: auto;
  gap: 2px;
  padding: 0;
}
.home-track-panel .track-hub-head strong {
  color: var(--navy);
  font-size: 18px;
  line-height: 1.25;
}
.home-track-panel .track-hub-head span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
}
.home-track-panel .track-hub-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.home-track-panel .track-hub-form input {
  min-height: 48px;
  border-color: #cfdaee;
}
.home-track-panel .track-hub-form button {
  min-width: 88px;
  min-height: 48px;
}
.home-track-panel .track-sea-link {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  grid-column: auto;
  grid-row: auto;
  gap: 3px 12px;
  align-items: center;
  min-height: 72px;
  padding: 11px 12px;
  border: 1px solid #dce7fb;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f7faff);
}
.home-track-panel .track-sea-link span {
  grid-row: 1 / span 2;
  width: 42px;
  height: 42px;
}
.home-track-panel .track-sea-link strong {
  padding: 0;
  color: var(--blue);
  font-size: 14px;
  line-height: 1.25;
}
.home-track-panel .track-sea-link small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.home-track-panel .track-sea-link::after {
  content: "เปิด";
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: end;
  margin: 0;
  min-height: 30px;
  padding: 5px 10px;
  color: var(--white);
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--blue));
  font-size: 12px;
  font-weight: 900;
}
.metrics.section,
.metrics {
  width: min(1180px, calc(100% - 44px));
  margin: -28px auto 0;
  padding: 0 !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(7,31,73,.1);
}
.metrics div {
  min-width: 0;
  padding: 30px !important;
}
.metrics strong {
  font-size: 36px;
  line-height: 1.1;
}
.metrics span {
  display: block;
  max-width: 230px;
  line-height: 1.55;
}

@media (max-width: 1100px) {
  .hero {
    padding: 0 24px;
  }
  .hero-content {
    width: min(680px, 100%);
    padding-bottom: 180px;
  }
  .home-track-panel {
    right: 24px;
    bottom: 28px;
  }
}

@media (max-width: 900px) {
  .hero {
    display: block;
    min-height: auto;
    padding: 0;
  }
  .hero-content {
    width: auto;
    padding: 76px 22px 112px;
  }
  .home-track-panel {
    position: relative;
    right: auto;
    bottom: auto;
    width: auto;
    margin: -70px 20px 28px;
  }
  .metrics.section,
  .metrics {
    width: auto;
    margin: 0;
    border-radius: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .hero-content {
    padding: 64px 18px 104px;
  }
  .home-track-panel {
    margin: -52px 14px 24px;
    padding: 14px;
  }
  .home-track-panel .track-hub-form,
  .home-track-panel .track-sea-link {
    grid-template-columns: 1fr;
  }
  .home-track-panel .track-sea-link span {
    grid-row: auto;
  }
  .home-track-panel .track-sea-link::after {
    grid-column: auto;
    grid-row: auto;
    justify-self: start;
  }
  .metrics.section,
  .metrics {
    grid-template-columns: 1fr;
  }
}

/* Navigation click stability and visible visitor counter */
.nav-group[open] .submenu {
  display: flex;
  pointer-events: auto;
}
@media (min-width: 901px) {
  .main-nav details.nav-group > .submenu {
    top: 100% !important;
    margin-top: 6px;
  }
  .nav-group::after {
    content: "";
    position: absolute;
    left: -8px;
    right: -8px;
    top: 100%;
    height: 12px;
  }
}
.header-visitor {
  display: inline-grid;
  grid-template-columns: auto auto;
  gap: 0 7px;
  align-items: center;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid #d8e5ff;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}
.header-visitor strong {
  color: var(--red);
  font-size: 17px;
  line-height: 1;
}
.header-visitor small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  text-align: right;
}
@media (max-width: 1100px) {
  .header-visitor { display: none; }
}
@media (max-width: 900px) {
  .main-nav .header-visitor { display: grid; justify-items: start; }
  .header-visitor small { text-align: left; }
}
