:root {
  --color-primary: #2d6a4f;
  --color-accent: #f4a261;
  --color-bg: #fffaf3;
  --color-bg-alt: #ffffff;
  --color-text: #1f2933;
  --color-muted: #6b7280;
  --color-border: #e5e0d8;
  --header-height: 88px;
  --sidebar-width: 180px;
  --max-width: 880px;
  --radius: 12px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

a { color: var(--color-primary); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  margin-left: calc(var(--sidebar-width) + 48px);
  max-width: calc(var(--max-width) + var(--sidebar-width) + 48px);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-text);
  font-size: 1.3rem;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.logo-img { height: 64px; width: auto; }
.logo-text { font-weight: 300; }
.logo-text strong { color: var(--color-primary); font-weight: 700; }
.logo-md { color: #a0aab4; font-size: 0.75em; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: background 0.2s;
}
.nav-toggle:hover span { background: var(--color-primary); }

/* Sidebar */
.sidebar {
  position: fixed;
  top: calc(var(--header-height) + 24px);
  left: 24px;
  width: var(--sidebar-width);
  z-index: 90;
}

.sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--color-border);
}

.sidebar-link {
  display: block;
  padding: 8px 16px;
  text-decoration: none;
  color: var(--color-muted);
  font-size: 0.9rem;
  border-left: 2px solid transparent;
  margin-left: -2px;
  transition: color 0.2s, border-color 0.2s;
}

.sidebar-link:hover { color: var(--color-primary); }

.sidebar-link.active {
  color: var(--color-primary);
  border-left-color: var(--color-primary);
  font-weight: 600;
}

/* Main / sections */
main {
  margin-left: calc(var(--sidebar-width) + 48px);
  max-width: calc(var(--max-width) + var(--sidebar-width) + 48px);
}

.section { padding: 72px 24px; border-bottom: 1px solid var(--color-border); }
.section-inner { max-width: var(--max-width); margin: 0 auto; }

.section h2 {
  font-size: 1.8rem;
  margin-bottom: 16px;
  color: var(--color-primary);
}

/* About */
.about-layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.about-photo {
  width: 220px;
  height: 220px;
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--color-bg);
  padding: 12px;
  box-sizing: border-box;
  flex: 0 0 auto;
}

.about-text { flex: 1 1 auto; min-width: 0; }

@media (max-width: 640px) {
  .about-layout { flex-direction: column; align-items: center; }
  .about-photo { width: 220px; height: 220px; }
}

/* Hero */
.hero {
  padding-top: 96px;
  padding-bottom: 40px;
  border-bottom: none;
  text-align: center;
}

.slogan {
  font-size: 2.6rem;
  margin: 0 0 16px;
  color: var(--color-primary);
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--color-muted);
  max-width: 560px;
  margin: 0 auto;
}

/* Schedule widget */
.schedule-section { padding-top: 24px; }
.schedule-footer-heading { text-align: center; }

.schedule-footer-sub {
  text-align: center;
  margin: 0 auto 24px;
  color: var(--color-primary);
  font-size: 1.15rem;
  font-weight: 600;
}

.schedule-widget {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
  padding: 24px;
  max-width: 520px;
  margin: 0 auto;
}

.schedule-row {
  display: flex;
  align-items: center;
  justify-content: center;
}

.schedule-date-row {
  gap: 16px;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.schedule-date { min-width: 200px; text-align: center; }

.arrow-btn {
  background: none;
  border: none;
  padding: 0 8px;
  color: var(--color-primary);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s;
}
.arrow-btn:hover { color: var(--color-accent); }
.arrow-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.arrow-btn:disabled:hover { color: var(--color-primary); }

.schedule-times-row {
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  min-height: 44px;
}

.time-slot-btn {
  background: var(--color-bg);
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.time-slot-btn:hover, .time-slot-btn.selected {
  background: var(--color-primary);
  color: #fff;
}

.times-loading, .times-empty {
  color: var(--color-muted);
  font-size: 0.9rem;
}

.schedule-footer-row { margin-top: 4px; }

.view-all-link {
  font-size: 0.9rem;
  text-decoration: underline;
  cursor: pointer;
}

/* Calendar view ("View All Availability") */
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
  font-weight: 600;
  font-size: 1.05rem;
}

.calendar-month-label { min-width: 160px; text-align: center; }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.calendar-weekday {
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-muted);
  font-weight: 600;
  padding-bottom: 4px;
}

.calendar-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.calendar-cell-empty { background: none; }

.calendar-cell-disabled {
  color: var(--color-border);
}

.calendar-cell-available {
  background: var(--color-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}
.calendar-cell-available:hover { background: var(--color-accent); }

/* Widget steps: emergency check, contact form, confirmation */
.step-selected-slot {
  text-align: center;
  color: var(--color-muted);
  font-size: 0.95rem;
  margin: 0 0 16px;
}

.step-question {
  text-align: center;
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0 0 16px;
}

.choice-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.choice-btn {
  background: var(--color-bg);
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  border-radius: 8px;
  padding: 10px 28px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.choice-btn:hover { background: var(--color-primary); color: #fff; }

.step-back-link {
  display: block;
  margin: 0 auto;
  background: none;
  border: none;
  color: var(--color-muted);
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
}

.emergency-message {
  background: #fdecea;
  border: 1px solid #f3b4ad;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  text-align: center;
  color: #7a271a;
}
.emergency-message p { margin: 0 0 8px; }
.emergency-message p:last-child { margin-bottom: 0; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 12px;
}

.contact-form .step-selected-slot,
.contact-form .step-question {
  margin: 0;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.form-field input {
  font-size: 1rem;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: inherit;
  color: var(--color-text);
}
.form-field input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.contact-type-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 0.95rem;
}
.contact-type-option {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.form-error {
  color: #c0392b;
  font-size: 0.85rem;
  text-align: center;
  margin: 0;
}

.submit-btn {
  background: var(--color-bg);
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  border-radius: 8px;
  padding: 10px 28px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  align-self: center;
}
.submit-btn:hover { background: var(--color-primary); color: #fff; }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.submit-btn:disabled:hover { background: var(--color-bg); color: var(--color-primary); }

.confirmation-message {
  text-align: center;
  color: var(--color-text);
}
.confirmation-message p { margin: 0 0 10px; }
.confirmation-message p:last-child { margin-bottom: 0; }

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: 12px 0;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
}
.faq-item p { margin-top: 8px; color: var(--color-muted); }

/* Footer */
.site-footer {
  margin-left: calc(var(--sidebar-width) + 48px);
  padding: 24px;
  color: var(--color-muted);
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 900px) {
  .sidebar { display: none; }
  main, .site-footer { margin-left: 0; max-width: 100%; }
  .nav-toggle { display: flex; }
  .header-inner { justify-content: space-between; margin-left: 0; max-width: 100%; }

  .sidebar.open {
    display: block;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
    padding: 12px 24px;
  }
  .sidebar.open .sidebar-list { border-left: none; }
  .sidebar.open .sidebar-link { border-left: none; padding: 10px 0; }

  .slogan { font-size: 1.9rem; }
}
