/* Public home — PHC 3DOCTOR (gov portal style, aligned with dashboard.css) */

:root {
  --hp-navy: #0b2e6f;
  --hp-navy-soft: #123f8f;
  --hp-navy-deep: #0a2559;
  --hp-teal: #10a19d;
  --hp-teal-soft: #e6f7f6;
  --hp-border: #e2e8f0;
  --hp-surface: #ffffff;
  --hp-muted-bg: #f4f7fc;
  --hp-text-strong: #0f172a;
  --hp-text-body: #334155;
  --hp-text-muted: #64748b;
  --hp-text-invert: #ffffff;
  --hp-shadow: 0 10px 30px -12px rgba(11, 46, 111, 0.18);
  --hp-shadow-sm: 0 2px 8px -4px rgba(11, 46, 111, 0.12);
  --hp-radius: 14px;
  --hp-radius-sm: 8px;
  --hp-font-sans: 'Sarabun', system-ui, -apple-system, sans-serif;
  --hp-font-head: 'Prompt', var(--hp-font-sans);
  --hp-nav-h: 60px;
  --hp-container: 1120px;
  --hp-ring: 0 0 0 3px rgba(16, 161, 157, 0.28);
}

[data-theme="dark"] {
  --hp-navy: #5b8fd4;
  --hp-navy-soft: #7aa8e0;
  --hp-navy-deep: #0f1c33;
  --hp-teal: #2dd4bf;
  --hp-teal-soft: #0d3d3a;
  --hp-border: #26344f;
  --hp-surface: #111c31;
  --hp-muted-bg: #0a1424;
  --hp-text-strong: #f1f5f9;
  --hp-text-body: #cbd5e1;
  --hp-text-muted: #94a3b8;
  --hp-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.45);
  --hp-shadow-sm: 0 2px 8px -4px rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body.home-public {
  margin: 0;
  font-family: var(--hp-font-sans);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--hp-text-body);
  background: var(--hp-muted-bg);
}

.home-public img {
  max-width: 100%;
  height: auto;
}

.home-public a,
.home-public a:hover,
.home-public a:focus,
.home-public a:active,
.home-public a:visited {
  color: var(--hp-navy-soft);
  text-decoration: none !important;
}

.home-public a:hover,
.home-public a:focus {
  color: var(--hp-teal);
}

.home-public :focus-visible {
  outline: none;
  box-shadow: var(--hp-ring);
}

.home-public .skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 10000;
  padding: 10px 16px;
  background: var(--hp-navy);
  color: var(--hp-text-invert);
  border-radius: var(--hp-radius-sm);
  font-weight: 600;
  transition: top 0.2s ease;
}

.home-public .skip-link:focus {
  top: 12px;
  color: var(--hp-text-invert);
}

.home-public .container-hp {
  width: min(100% - 32px, var(--hp-container));
  margin-inline: auto;
}

/* Gov top bar */
.home-public .gov-bar {
  background: var(--hp-navy-deep);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.875rem;
  padding: 6px 0;
}

.home-public .gov-bar .container-hp {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

.home-public .gov-bar a {
  color: inherit;
}

.home-public .gov-bar a:hover {
  color: #fff;
}

.home-public .gov-bar__agency {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.home-public .gov-bar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-public .theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  font-size: 0.8rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.home-public .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

/* Site header */
.home-public .site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--hp-surface);
  border-bottom: 1px solid var(--hp-border);
  min-height: var(--hp-nav-h);
}

.home-public .site-header .container-hp {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--hp-nav-h);
}

.home-public .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--hp-text-strong);
  min-width: 0;
}

.home-public .brand:hover {
  color: var(--hp-text-strong);
}

.home-public .brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  flex-shrink: 0;
}

.home-public .brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.home-public .brand__title {
  font-family: var(--hp-font-head);
  font-weight: 700;
  font-size: 1.02rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-public .brand__sub {
  font-size: 0.78rem;
  color: var(--hp-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-public .nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius-sm);
  background: var(--hp-surface);
  color: var(--hp-text-strong);
  cursor: pointer;
}

.home-public .site-nav ul {
  display: flex;
  align-items: stretch;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-public .site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 18px 16px 16px;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  border-radius: 0;
  color: var(--hp-text-body);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.home-public .site-nav a:hover {
  color: var(--hp-navy);
  background: transparent;
}

.home-public .site-nav a.active {
  color: var(--hp-navy);
  border-bottom-color: var(--hp-navy);
  background: transparent;
}

.home-public .site-nav a i {
  color: var(--hp-teal);
  width: 1.05em;
  text-align: center;
  font-size: 0.9rem;
}

/* Hero (dash-hero style) */
.home-public .hero {
  background: linear-gradient(135deg, var(--hp-navy) 0%, #1a4a9e 55%, var(--hp-teal) 100%);
  color: var(--hp-text-invert);
  padding: 1.35rem 0 1.75rem;
  box-shadow: var(--hp-shadow);
}

.home-public .hero .container-hp {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 32px;
}

.home-public .hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.home-public .hero h1 {
  font-family: var(--hp-font-head);
  font-size: clamp(1.55rem, 2.8vw, 2rem);
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 0.5rem;
}

.home-public .hero__lead {
  margin: 0;
  max-width: 36rem;
  font-size: 1rem;
  opacity: 0.94;
  line-height: 1.6;
}

.home-public .hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.home-public .hero__visual img {
  width: min(100%, 240px);
}

/* Buttons */
.home-public .btn-hp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--hp-radius-sm);
  font-family: var(--hp-font-sans);
  font-size: 0.98rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  text-decoration: none !important;
  line-height: 1.3;
}

.home-public .btn-hp--outline {
  background: var(--hp-surface);
  border-color: var(--hp-border);
  color: var(--hp-text-strong) !important;
  box-shadow: var(--hp-shadow-sm);
}

.home-public .btn-hp--outline:hover {
  border-color: var(--hp-teal);
  color: var(--hp-teal) !important;
}

.home-public .btn-hp--solid {
  background: var(--hp-navy);
  color: #fff !important;
}

.home-public .btn-hp--solid:hover {
  background: var(--hp-navy-soft);
  color: #fff !important;
}

/* Sections */
.home-public .section {
  padding: 48px 0;
}

.home-public .section--alt {
  background: var(--hp-surface);
  border-block: 1px solid var(--hp-border);
}

.home-public .section__head {
  max-width: 42rem;
  margin: 0 auto 28px;
  text-align: center;
}

.home-public .section__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  border-radius: var(--hp-radius-sm);
  background: var(--hp-teal-soft);
  color: var(--hp-navy);
  font-size: 1.1rem;
}

[data-theme="dark"] .home-public .section__icon {
  background: rgba(45, 212, 191, 0.12);
  color: var(--hp-teal);
}

.home-public .section__head h2 {
  font-family: var(--hp-font-head);
  font-size: clamp(1.35rem, 2.2vw, 1.65rem);
  font-weight: 700;
  color: var(--hp-text-strong);
  margin: 0 0 8px;
}

.home-public .section__head p {
  margin: 0;
  color: var(--hp-text-muted);
  font-size: 0.98rem;
}

/* Login panel */
.home-public .login-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0;
  align-items: stretch;
  background: var(--hp-surface);
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius);
  box-shadow: var(--hp-shadow-sm);
  overflow: hidden;
}

.home-public .login-panel__body {
  padding: 32px 28px;
}

.home-public .login-panel__body h2 {
  font-family: var(--hp-font-head);
  font-size: 1.35rem;
  color: var(--hp-text-strong);
  margin: 0 0 12px;
}

.home-public .login-panel__body p {
  margin: 0 0 22px;
  color: var(--hp-text-muted);
  font-size: 0.98rem;
}

.home-public .login-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-public .login-panel__media {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--hp-muted-bg);
  border-left: 1px solid var(--hp-border);
}

.home-public .login-panel__media img {
  width: min(100%, 220px);
}

/* Report grid */
.home-public .report-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.home-public .report-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 14px;
  background: var(--hp-surface);
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius-sm);
  color: var(--hp-text-strong) !important;
  transition: border-color 0.15s ease, background 0.15s ease;
  min-height: 100px;
  text-align: left;
  cursor: pointer;
  width: 100%;
  font: inherit;
}

.home-public .report-card:hover {
  border-color: var(--hp-navy-soft);
  background: var(--hp-muted-bg);
  color: var(--hp-text-strong) !important;
}

.home-public .report-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: var(--hp-muted-bg);
  border: 1px solid var(--hp-border);
  color: var(--hp-navy);
  font-size: 0.95rem;
}

.home-public .report-card__title {
  font-family: var(--hp-font-head);
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.4;
  margin: 0;
}

.home-public .report-card__hint {
  margin: 0;
  font-size: 0.84rem;
  color: var(--hp-text-muted);
}

/* Manual */
.home-public .manual-box {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
  padding: 28px 24px;
  background: var(--hp-surface);
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius);
}

.home-public .manual-box p {
  margin: 0 0 18px;
  color: var(--hp-text-muted);
}

/* Footer */
.home-public .site-footer {
  background: var(--hp-navy-deep);
  color: rgba(255, 255, 255, 0.9);
  padding: 40px 0 24px;
}

.home-public .site-footer a {
  color: #fff;
}

.home-public .site-footer a:hover {
  color: #fff;
  opacity: 0.92;
}

.home-public .footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 28px;
  align-items: start;
}

.home-public .site-footer h2 {
  font-family: var(--hp-font-head);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 12px;
}

.home-public .site-footer address {
  font-style: normal;
  margin: 0;
  line-height: 1.7;
  font-size: 0.95rem;
}

.home-public .footer-contact {
  text-align: center;
  padding: 16px 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.home-public .footer-contact__scan {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.home-public .footer-contact img.qr {
  display: block;
  width: min(130px, 55%);
  border-radius: 6px;
  background: #fff;
  padding: 4px;
}

.home-public .footer-contact .line-id {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  font-weight: 600;
  font-size: 0.95rem;
}

.home-public .footer-contact .line-id img {
  width: 20px;
  height: 20px;
}

.home-public .footer-copy {
  margin: 24px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.88;
}

/* Modals */
.home-public .modal-content {
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius-sm);
  overflow: hidden;
  background: var(--hp-surface);
  color: var(--hp-text-body);
}

.home-public .modal-header {
  background: var(--hp-muted-bg);
  border-bottom: 1px solid var(--hp-border);
  align-items: center;
}

.home-public .modal-header .modal-title,
.home-public .modal-header h5 {
  font-family: var(--hp-font-head);
  font-weight: 600;
  color: var(--hp-text-strong);
  margin: 0;
}

.home-public .modal-body {
  line-height: 1.7;
}

.home-public .modal-footer {
  border-top: 1px solid var(--hp-border);
  background: var(--hp-muted-bg);
}

.home-public .accordion .card {
  border-color: var(--hp-border);
  background: var(--hp-surface);
}

.home-public .accordion .card-header {
  background: var(--hp-muted-bg);
  padding: 0;
}

.home-public .accordion .btn-link {
  color: var(--hp-text-strong) !important;
  font-weight: 600;
  text-decoration: none !important;
  padding: 14px 16px;
}

.home-public .accordion .btn-link:hover,
.home-public .accordion .btn-link:focus {
  color: var(--hp-navy) !important;
  text-decoration: none !important;
}

@media (max-width: 1024px) {
  .home-public .report-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .home-public .hero .container-hp,
  .home-public .login-panel,
  .home-public .footer-grid {
    grid-template-columns: 1fr;
  }

  .home-public .hero {
    text-align: center;
  }

  .home-public .hero__lead {
    margin-inline: auto;
  }

  .home-public .hero__visual {
    order: -1;
  }

  .home-public .hero__visual img {
    width: min(100%, 180px);
  }

  .home-public .login-panel__media {
    display: none;
  }

  .home-public .login-panel__body {
    border-right: none;
  }

  .home-public .nav-toggle {
    display: inline-flex;
  }

  .home-public .site-header {
    position: relative;
  }

  .home-public .site-header.is-fixed {
    position: sticky;
  }

  .home-public .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--hp-surface);
    border-bottom: 1px solid var(--hp-border);
    padding: 0 12px 8px;
    display: none;
    box-shadow: var(--hp-shadow-sm);
  }

  .home-public .site-nav.is-open {
    display: block;
  }

  .home-public .site-nav ul {
    flex-direction: column;
    align-items: stretch;
  }

  .home-public .site-nav a {
    border-bottom: none;
    border-left: 3px solid transparent;
    padding: 12px 10px;
    margin-bottom: 0;
  }

  .home-public .site-nav a.active {
    border-left-color: var(--hp-navy);
    border-bottom-color: transparent;
    background: var(--hp-muted-bg);
  }

  .home-public .footer-contact {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 20px;
  }
}

@media (max-width: 560px) {
  .home-public .report-grid {
    grid-template-columns: 1fr;
  }

  .home-public .brand__sub {
    display: none;
  }

  .home-public .gov-bar__agency span.sep {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-public *,
  .home-public *::before,
  .home-public *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
