:root {
  --ink: #1B2A4A;
  --bg: #EDF1F4;
  --bg-panel: #FFFFFF;
  --accent: #FF7A29;
  --accent-dark: #E35F0F;
  --teal: #12857A;
  --text-muted: #5B6B7F;
  --border: #D7DEE4;
  --danger: #C0392B;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-family: var(--font-body); background: var(--bg); color: var(--ink); line-height: 1.55; }
h1, h2, h3 { font-family: var(--font-display); margin: 0 0 0.5em; letter-spacing: -0.01em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

.site-header { background: var(--bg-panel); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.header-row { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; text-decoration: none; color: inherit; }
.brand-mark { width: 14px; height: 14px; background: var(--accent); display: inline-block; border-radius: 3px; transform: rotate(45deg); }
.header-actions { display: flex; gap: 10px; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 8px; font-weight: 600; font-size: 0.9rem; text-decoration: none; border: none; cursor: pointer; font-family: var(--font-body); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: none; color: var(--ink); border: 1.5px solid var(--border); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn-whatsapp { background: #12857A14; color: var(--teal); border: 1.5px solid var(--teal); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-block { width: 100%; }

.hero { background: var(--bg-panel); border-bottom: 1px solid var(--border); padding: 56px 0; }
.hero h1 { font-size: clamp(1.6rem, 3vw, 2.4rem); max-width: 24ch; }
.hero-sub { color: var(--text-muted); font-size: 1.05rem; max-width: 54ch; }

main { padding: 48px 0 64px; }
.teachers-section { margin-bottom: 56px; }
.teachers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; margin-top: 20px; }
.teacher-card {
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit;
  border-top: 4px solid var(--accent);
}
.teacher-card:hover { border-color: var(--teal); border-top-color: var(--accent); }
.teacher-photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: #DCE3E9; }
.teacher-card h3 { margin: 0; font-size: 1.1rem; }
.teacher-bio { color: var(--text-muted); font-size: 0.88rem; flex: 1; white-space: pre-line; }
.teacher-count { font-size: 0.82rem; color: var(--teal); font-weight: 600; }

.courses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; margin-top: 20px; }
.course-card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.course-photo { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: #DCE3E9; border-bottom: 3px solid var(--accent); }
.course-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.course-teacher { font-size: 0.78rem; color: var(--teal); font-weight: 600; text-decoration: none; }
.course-body h3 { font-size: 1.05rem; margin: 0; }
.course-summary { color: var(--ink); font-size: 0.92rem; font-weight: 600; margin: 0; white-space: pre-line; }
.course-desc { color: var(--text-muted); font-size: 0.9rem; flex: 1; white-space: pre-line; }
.course-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.course-price { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }

.loading-text, .empty-text { color: var(--text-muted); }
.site-footer { padding: 28px 0 40px; color: var(--text-muted); font-size: 0.85rem; }

/* Checkout modal (shared) */
.modal { position: fixed; inset: 0; background: rgba(20,28,40,0.55); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 100; }
.modal-card { background: var(--bg-panel); border-radius: 14px; padding: 28px; max-width: 400px; width: 100%; position: relative; max-height: 90vh; overflow-y: auto; }
.modal-close { position: absolute; top: 12px; right: 14px; background: none; border: none; font-size: 1.4rem; color: var(--text-muted); cursor: pointer; }
.modal-price { color: var(--accent-dark); font-weight: 600; font-family: var(--font-display); margin: -6px 0 16px; }
#checkout-form label { display: block; font-size: 0.85rem; font-weight: 600; margin: 14px 0 6px; }
#checkout-form input { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-family: var(--font-body); font-size: 0.95rem; }
#checkout-form input:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
.phone-row { display: flex; gap: 8px; }
.phone-row select { flex: 0 0 auto; padding: 10px 8px; border: 1px solid var(--border); border-radius: 8px; font-family: var(--font-body); font-size: 0.95rem; background: #fff; }
.phone-row input { flex: 1; }
.password-field-wrap { position: relative; }
.password-field-wrap input { padding-right: 42px; }
.password-toggle-btn {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 1.05rem;
  padding: 6px 8px; line-height: 1; opacity: 0.6;
}
.password-toggle-btn:hover { opacity: 1; }
.modal-note { font-size: 0.8rem; color: var(--text-muted); margin-top: 12px; margin-bottom: 0; }
#checkout-submit { margin-top: 18px; }
