:root {
  --bg: #f6f2e8;
  --surface: #fffdf8;
  --surface-strong: #f1e8d6;
  --text: #2f332b;
  --muted: #5f6657;
  --accent: #6d7c4b;
  --accent-dark: #515d36;
  --border: #5f6657;
  --shadow: 0 12px 32px rgba(47, 51, 43, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: #8b9c65;
  line-height: 1.6;
}
a { color: var(--accent-dark); }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
.is-temporarily-hidden { display: none !important; }
.admin-footer-link {
  color: var(--muted);
  font-size: 0.85rem;
}
.admin-footer-link:hover, .admin-footer-link:focus-visible {
  color: var(--accent-dark);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent-dark);
  color: white;
  padding: 0.75rem 1rem;
  z-index: 1000;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.site-header {
  background: rgba(255, 253, 248, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner, .page-shell, .site-footer-inner {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  color: var(--accent-dark);
  text-decoration: none;
}
.brand-mark {
  width: 9rem;
  height: 4.6rem;
  background: url("/assets/images/hbg-logo-header.jpg") center / contain no-repeat;
  color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 0;
  line-height: 0;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.nav-links a {
  text-decoration: none;
  font-weight: 600;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
}
.nav-links a:hover, .nav-links a:focus-visible {
  background: var(--surface-strong);
  outline: none;
}
.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent-dark);
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
}

.page-shell {
  padding: 2rem 0 4rem;
}
.hero, .card, .section, .notice-banner, .calendar-card, .admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
}
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  padding: 2rem;
  margin-bottom: 2rem;
}
.page-shell > .section-grid,
.page-shell > .info-grid,
.page-shell > .section {
  margin-bottom: 1.5rem;
}
.page-shell > :last-child {
  margin-bottom: 0;
}
.hero h1, .section h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: clamp(1.8rem, 2.4vw, 2.8rem);
  line-height: 1.15;
}
.hero p, .section p, .card p, .list-item {
  color: var(--muted);
  margin-bottom: 1rem;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.btn-primary, .btn-secondary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.8rem 1.15rem;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--surface-strong);
  border-color: var(--surface-strong);
  color: var(--accent-dark);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--surface-strong);
  border-color: var(--surface-strong);
  color: var(--accent-dark);
}
.btn-secondary:hover, .btn-secondary:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover, .btn-ghost:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  transform: translateY(-1px);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1rem;
}
.section-grid, .info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}
.card, .section {
  padding: 1.5rem;
}
.card ul, .section ul { padding-left: 1.15rem; }
.fee-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 1.25rem;
  margin: 0;
}
.card h3, .section h3 {
  margin-top: 0;
  margin-bottom: 0.7rem;
}
.notice-banner {
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border-left: 5px solid var(--accent);
}
.notice-banner strong { display: block; margin-bottom: 0.3rem; }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.4rem;
  margin-top: 1rem;
}
.calendar-day {
  text-align: center;
  padding: 0.45rem;
  border-radius: 0.7rem;
  background: var(--surface-strong);
  color: var(--muted);
}
.calendar-day.is-closed {
  background: var(--accent);
  color: white;
}

.admin-card {
  padding: 1.5rem;
  margin-top: 2rem;
}
.form-grid {
  display: grid;
  gap: 1rem;
}
label { display: grid; gap: 0.4rem; font-weight: 600; }
input, textarea, select {
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  padding: 0.8rem 0.9rem;
  background: white;
  color: var(--text);
}
textarea { min-height: 6rem; resize: vertical; }
.form-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1rem; }
.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.sticky-actions {
  position: sticky;
  bottom: 0;
  background: rgba(255, 253, 248, 0.96);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: var(--shadow);
  z-index: 20;
}
.carousel-frame {
  overflow: hidden;
  border-radius: 1rem;
  background: var(--surface-strong);
}
.carousel-frame img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}
.carousel-controls {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.carousel-empty {
  color: var(--muted);
  font-style: italic;
}
.message {
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 0.8rem;
  background: #eaf3df;
  color: var(--accent-dark);
  border: 1px solid #cfe0b5;
}
.photo-manager {
  display: grid;
  gap: 0.75rem;
}
.photo-manager-item {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  padding: 0.75rem;
  background: white;
}
.photo-manager-item img {
  width: 5rem;
  height: 4rem;
  object-fit: cover;
  border-radius: 0.6rem;
  background: var(--surface-strong);
}
.photo-manager-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.photo-manager-actions button {
  padding: 0.45rem 0.65rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(255, 253, 248, 0.9);
  padding: 1.5rem 0 2rem;
}
.site-footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 1fr);
  gap: 2rem;
  color: var(--muted);
}
.site-footer-inner > div:last-child {
  justify-self: end;
  text-align: right;
}
.site-footer-inner p {
  margin: 0 0 1rem;
}
.site-footer-inner p:last-child {
  margin-bottom: 0;
}
.site-footer-inner a:not(.admin-footer-link) { color: var(--accent-dark); }
.site-footer-inner a:not(.admin-footer-link):hover, .site-footer-inner a:not(.admin-footer-link):focus-visible { color: var(--accent); }
.site-credit {
  width: min(1120px, calc(100% - 2rem));
  margin: 1.25rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(95, 102, 87, 0.35);
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 600;
  text-align: center;
}
.site-credit a {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--accent-dark);
  font-weight: 800;
  text-decoration: none;
}
.site-footer .site-credit a:hover, .site-footer .site-credit a:focus-visible {
  background: var(--accent);
  color: white;
}

@media (max-width: 800px) {
  .hero, .section-grid, .info-grid { grid-template-columns: 1fr; }
  .hero { padding: 1.5rem; }
  .site-footer {
    padding: 1.25rem 0 1.5rem;
  }
  .site-footer-inner {
    grid-template-columns: 1fr;
    gap: 1rem;
    text-align: center;
  }
  .site-footer-inner > div:last-child {
    justify-self: stretch;
    text-align: center;
  }
  .site-footer-inner p {
    margin-bottom: 0.65rem;
  }
  .site-credit {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
  }
}

@media (max-width: 600px) {
  .header-inner {
    display: grid;
    grid-template-columns: auto auto;
    gap: 0.7rem;
    align-items: center;
  }
  .brand-mark { width: 7rem; height: 3.55rem; }
  .page-shell { padding-top: 1rem; }
  .fee-list { grid-template-columns: 1fr; }
  .hero-actions, .form-actions { flex-direction: column; align-items: stretch; }
  .field-row { grid-template-columns: 1fr; }
  .photo-manager-item { grid-template-columns: 1fr; }
  .nav-toggle {
    display: inline-flex;
    justify-self: end;
  }
  .nav-links {
    display: none;
    width: 100%;
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 0.35rem;
  }
  .nav-links.is-open { display: flex; }
}
