/* Posture Corrector - Static Site Styles */
:root {
  --primary: #2a9d8f;
  --primary-dark: #21867a;
  --accent: #4a90e2;
  --bg: #f7fbfa;
  --surface: #ffffff;
  --text: #1f2d3d;
  --muted: #5b6b7b;
  --border: #e2ecea;
  --shadow: 0 4px 16px rgba(42, 157, 143, 0.08);
  --radius: 10px;
  --max: 1100px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-dark); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--primary); }

img { max-width: 100%; display: block; }

/* Header & Nav */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}
.nav-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: -0.5px;
}
.logo span { color: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 1.6rem;
  color: var(--text);
  cursor: pointer;
}

.nav-menu {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}
.nav-menu a {
  color: var(--text);
  font-weight: 500;
  padding: .35rem 0;
  position: relative;
}
.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary);
}
.nav-menu a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  height: 2px; width: 0;
  background: var(--primary);
  transition: width .25s ease;
}
.nav-menu a:hover::after,
.nav-menu a.active::after { width: 100%; }

/* Main containers */
main { max-width: var(--max); margin: 0 auto; padding: 2.5rem 1.25rem; }

.hero {
  background: linear-gradient(135deg, #e8f6f4 0%, #eaf2fb 100%);
  padding: 3.5rem 1.25rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  color: var(--primary-dark);
  margin-bottom: .75rem;
  letter-spacing: -0.5px;
}
.hero p {
  max-width: 640px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.05rem;
}

h1, h2, h3 { color: var(--text); line-height: 1.25; }
h1 { font-size: 2rem; margin-bottom: 1rem; }
h2 { font-size: 1.5rem; margin: 1.75rem 0 .85rem; color: var(--primary-dark); }
h3 { font-size: 1.15rem; margin: 1.25rem 0 .5rem; }

p { margin-bottom: 1rem; color: var(--text); }

/* Cards / Sections */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(42, 157, 143, 0.12);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

/* Content area for fetched homepage */
#homepage-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}
#homepage-content p { margin-bottom: 1rem; }
.loading { text-align: center; color: var(--muted); padding: 2rem; }

/* FAQ list */
.faq-list { list-style: none; }
.faq-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  margin-bottom: .85rem;
  transition: all .2s ease;
}
.faq-list li:hover {
  border-left-color: var(--accent);
  transform: translateX(4px);
  box-shadow: var(--shadow);
}
.faq-list a {
  display: block;
  padding: 1.1rem 1.25rem;
  color: var(--text);
  font-weight: 500;
}
.faq-list a:hover { color: var(--primary-dark); }

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.contact-form label { font-weight: 500; font-size: .95rem; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: .75rem .9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--surface);
  transition: border .2s ease, box-shadow .2s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(42,157,143,.15);
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: .8rem 1.6rem;
  border: 0;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s ease, transform .15s ease;
}
.btn:hover { background: var(--primary-dark); transform: translateY(-1px); color: #fff; }

.form-message {
  padding: .85rem 1rem;
  border-radius: 8px;
  background: #e8f6f4;
  color: var(--primary-dark);
  display: none;
  font-weight: 500;
}
.form-message.show { display: block; }

/* Footer */
.site-footer {
  background: #1f2d3d;
  color: #cdd6e0;
  padding: 2rem 1.25rem;
  margin-top: 3rem;
  text-align: center;
}
.site-footer a { color: #9bd9d0; }
.site-footer p { color: #cdd6e0; margin-bottom: .35rem; }

/* Back link on FAQ pages */
.back-link {
  display: inline-block;
  margin-bottom: 1.25rem;
  color: var(--primary-dark);
  font-weight: 500;
}
.back-link:hover { color: var(--primary); }

/* Mobile */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: var(--surface);
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    gap: .25rem;
    box-shadow: 0 4px 12px rgba(0,0,0,.06);
  }
  .nav-menu.open { display: flex; }
  .nav-menu li { border-bottom: 1px solid var(--border); }
  .nav-menu li:last-child { border-bottom: 0; }
  .nav-menu a { padding: .8rem 0; display: block; }
  .nav-wrap { position: relative; }
  main { padding: 1.75rem 1rem; }
  .hero { padding: 2.5rem 1rem; }
  .card, #homepage-content { padding: 1.25rem; }
}
