:root {
  --surface: #ffffff;
  --surface-soft: #f4faf7;
  --primary: #0a6d59;
  --primary-dark: #074739;
  --text: #14251d;
  --muted: #4b6559;
  --border: #ccdfd6;
  --shadow: 0 16px 34px rgba(11, 56, 44, 0.1);
  --section-gap: clamp(28px, 4vw, 56px);
  --section-gap-sm: clamp(16px, 2.2vw, 28px);
  --brand-shift-x: -100px;
  --brand-logo-size: 250px;
  --brand-title-size: clamp(1.25rem, 2.2vw, 1.9rem);
  --brand-title-gap: -30px;
  --menu-gap: 50px;
  --summary-width: min(320px, 100%);
  --footer-space: clamp(120px, 18vh, 300px);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding-top: 60px;
  font-family: "Cabin Condensed", "Trebuchet MS", "Segoe UI", sans-serif;
  letter-spacing: 0.03em;
  color: var(--text);
  background: #e9f2ef;
  min-height: 100vh;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  transform: translateX(var(--brand-shift-x));
  max-width: 100%;
}

.brand-home {
  text-decoration: none;
}

.header-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.top-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--menu-gap);
}

.nav-link {
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: #0a6d59;
}

.nav-link-active {
  color: #007AAF;
}

.brand-mark .eyebrow {
  margin: 0;
  font-size: var(--brand-title-size);
  line-height: 1;
  letter-spacing: 0.02em;
  margin-left: var(--brand-title-gap);
  white-space: nowrap;
}

.brand-logo {
  width: var(--brand-logo-size);
  height: var(--brand-logo-size);
  object-fit: contain;
  border-radius: 0;
  border: 0;
  background: transparent;
}

.hero {
  padding: clamp(34px, 5vw, 52px) 0 clamp(24px, 3vw, 38px);
}

.hero.hero-brand-only {
  padding-bottom: 0;
}

.hero-brand {
  margin-bottom: clamp(56px, 9vw, 100px);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 22px;
  align-items: start;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-dark);
}

h1 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  line-height: 1.15;
}

h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  line-height: 1.2;
}

.hero-copy {
  margin: 14px 0 0;
  color: var(--muted);
  max-width: 700px;
}

.hero-actions {
  margin-top: 24px;
  margin-bottom: 50px;
}

.hero-panel {
  background: linear-gradient(160deg, #0f6f5b, #0a4d3f);
  border-radius: 18px;
  padding: 18px 26px 18px 18px;
  color: #e9fff5;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  width: var(--summary-width);
  justify-self: end;
}

.panel-label {
  margin: 0;
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

.panel-stat {
  margin: 8px 0 0;
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  font-weight: 800;
  line-height: 1.2;
  opacity: 1;
}

.main-space {
  padding-top: var(--section-gap-sm);
  padding-bottom: 52px;
}

.event-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(8, 39, 31, 0.07);
  padding: 18px;
  margin-bottom: 0;
  content-visibility: auto;
  contain-intrinsic-size: 1px 500px;
}

.event-members-gap {
  height: 100px;
}

.event-table-wrap {
  overflow-x: auto;
}

.event-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  table-layout: fixed;
}

.event-table th,
.event-table td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: center;
  vertical-align: middle;
}

.event-table th {
  background: #edf8f3;
  color: var(--primary-dark);
  font-weight: 800;
}

.event-table td {
  background: #fff;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.event-table th:nth-child(1),
.event-table td:nth-child(1) {
  width: 110px;
}

.event-table th:nth-child(2),
.event-table td:nth-child(2) {
  width: 180px;
}

.event-table th:nth-child(3),
.event-table td:nth-child(3) {
  width: 150px;
}

.event-table th:nth-child(4),
.event-table td:nth-child(4) {
  width: 220px;
}

.section-head {
  margin: 0 0 var(--section-gap-sm);
  padding-top: 0;
}

.hint {
  margin: 10px 0 0;
  color: var(--muted);
}

.status {
  margin: 0 0 18px;
  color: var(--muted);
}

.region-summary {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.region-summary-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  overflow: hidden;
}

.region-summary-row {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  overflow: hidden;
  max-height: 48px;
}

.region-summary-bar-home {
  overflow: visible;
  flex-wrap: wrap;
  align-items: flex-start;
}

.region-summary-row-home {
  flex-wrap: wrap;
  overflow: visible;
  max-height: none;
}

.region-summary-more-wrap {
  flex: 0 0 auto;
}

.region-summary-more {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.region-summary-more.is-hidden {
  display: none;
}

.region-summary-measure {
  position: absolute;
  visibility: hidden;
  pointer-events: none;
  left: -9999px;
  top: -9999px;
  width: min(1120px, 92%);
}

.summary-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.9rem;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  color: var(--text);
  white-space: nowrap;
}

.summary-pill-active {
  background: #007AAF;
  color: #fff;
  border-color: #007AAF;
}

.summary-more-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--primary-dark);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.summary-more-btn:hover {
  border-color: #9ac7b5;
  background: #f8fdfa;
}

.region-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  content-visibility: auto;
  contain-intrinsic-size: 1px 900px;
}

.member-action {
  margin-top: 30px;
}

.region-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(8, 39, 31, 0.07);
  padding: 16px;
}

.region-card h3 {
  margin: 0;
  font-size: 1.2rem;
}

.member-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.member-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #d9eee5;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--primary-dark);
  overflow: hidden;
  flex: 0 0 56px;
}

.member-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.member-info {
  min-width: 0;
}

.region-count {
  margin: 6px 0 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.member-list {
  display: grid;
  gap: 8px;
}

.member-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
}

.btn {
  display: inline-block;
  border: 0;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

.btn:hover {
  background: var(--primary-dark);
}

body[data-page="home"] .hero-actions .btn {
  background: #007AAF;
}

body[data-page="home"] .hero-actions .btn:hover {
  background: #006491;
}

body[data-page="home"] .member-action .btn {
  background: #007AAF;
}

body[data-page="home"] .member-action .btn:hover {
  background: #006491;
}

.form-card .btn {
  background: #007AAF;
}

.form-card .btn:hover {
  background: #006491;
}

.register-wrap {
  margin-top: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  content-visibility: auto;
  contain-intrinsic-size: 1px 900px;
}

.member-hero {
  padding-top: 0;
}

.register-intro {
  background: linear-gradient(160deg, #0f6f5b, #0a4d3f) !important;
  border: 1px solid #0b5c4b !important;
  border-radius: 10px;
  padding: 18px;
  color: #e9fff5;
}

.register-intro p {
  color: #e9fff5;
}

.register-intro h1 {
  color: #e9fff5;
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  display: grid;
  gap: 10px;
}

.form-card input,
.form-card select {
  width: 100%;
  border: 1px solid #c8d9d0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 1rem;
  font-family: inherit;
  letter-spacing: inherit;
}

.form-card input::placeholder {
  font-family: inherit;
  letter-spacing: inherit;
}

.form-card label {
  font-size: 0.95rem;
  font-weight: 700;
}

.register-result {
  margin-top: 14px;
  background: #ebfff5;
  color: #0e503f;
  border: 1px solid #bce8d3;
  border-radius: 12px;
  padding: 14px;
  font-weight: 700;
}

.empty-box {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 16px;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: var(--footer-space);
  padding: 14px 0 24px;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.92rem;
}

.footer-menu {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 50px;
}

.footer-link {
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  transition: color 0.2s ease;
}

.footer-link:hover {
  background: transparent;
  color: var(--primary-dark);
  text-decoration: underline;
}

.footer-link-active {
  background: transparent;
  color: #007AAF;
}

/* Tablet */
@media (max-width: 1023px) {
  :root {
    --brand-logo-size: 190px;
    --brand-title-size: 24px;
    --brand-title-gap: -30px;
    --brand-shift-x: -60px;
    --menu-gap: 36px;
    --summary-width: min(300px, 100%);
    --footer-space: 180px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .brand-mark {
    justify-content: center;
  }

  .brand-mark .eyebrow {
    text-align: center;
    margin-left: -30px !important;
  }

  .hero-panel {
    justify-self: center;
    align-items: center;
    text-align: center;
  }

  .hero-actions {
    display: flex;
    justify-content: center;
  }

  .member-action {
    text-align: center;
  }

  body[data-page="home"] .hero-grid > div:first-child,
  body[data-page="anggota-full"] .hero-grid > div:first-child,
  body[data-page="home"] .section-head,
  body[data-page="home"] .status,
  body[data-page="anggota-full"] .status {
    text-align: center;
  }

  .region-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile */
@media (max-width: 767px) {
  :root {
    --brand-logo-size: 150px;
    --brand-title-size: 18px;
    --brand-title-gap: -30px;
    --brand-shift-x: 0;
    --menu-gap: 22px;
    --summary-width: min(260px, 100%);
    --footer-space: 120px;
  }

  .container {
    width: min(1120px, 94%);
  }

  .brand-mark {
    gap: 8px;
    transform: translateX(-30px) !important;
  }

  .brand-mark .eyebrow {
    white-space: normal;
    margin-left: -50px !important;
  }

  .eyebrow {
    font-size: 0.84rem;
  }

  .top-menu {
    width: 100%;
    gap: var(--menu-gap);
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-actions .btn {
    width: auto;
    min-width: 180px;
    text-align: center;
  }

  .form-card .btn {
    width: 100%;
    text-align: center;
  }

  .event-table {
    min-width: 560px;
  }

  .member-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .region-groups {
    grid-template-columns: 1fr;
  }

  .region-summary-bar {
    align-items: flex-start;
  }

}
