:root {
  --bg: #f4faf6;
  --ink: #1a1f24;
  --muted: #5b6b73;
  --paper: #ffffff;
  --display: var(--font-display, "Nunito", "Segoe UI", sans-serif);
  --body: var(--font-body, "Nunito", "Segoe UI", sans-serif);
  --header: var(--primary, #006850);
  --cta: var(--primary, #006850);
  --link: var(--primary, #006850);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { width: min(1180px, calc(100% - 2rem)); margin-inline: auto; }

.site-header {
  background: var(--header);
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}
.header-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  min-height: 78px;
  padding-top: .6rem;
}
.logo img { max-height: 52px; width: auto; }
.logo-text { font-family: var(--display); font-weight: 800; font-size: 1.35rem; color: #fff; }
.header-search {
  display: flex;
  background: #fff;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.22);
  max-width: 560px;
  width: 100%;
  margin-inline: auto;
}
.header-search input {
  flex: 1;
  border: 0;
  padding: .85rem 1.1rem;
  font: inherit;
  outline: none;
  background: transparent;
}
.header-search button {
  border: 0;
  background: transparent;
  padding: 0 1rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--primary, #006850);
}
.header-actions { display: flex; gap: .55rem; align-items: center; }
.btn-outline {
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.45);
  color: #fff;
  border-radius: 999px;
  padding: .55rem 1rem;
  font-weight: 700;
  font-size: .9rem;
}
.btn-outline:hover { background: rgba(255,255,255,.24); }
.nav-cta {
  background: var(--accent, #7ebd73) !important;
  color: #083528 !important;
  border-radius: 999px;
  padding: .55rem 1.05rem;
  font-weight: 800;
}
.nav {
  display: flex;
  gap: 1.1rem;
  padding: .35rem 0 .75rem;
  flex-wrap: wrap;
}
.nav a { font-weight: 700; font-size: .95rem; color: #fff; opacity: .92; }
.nav a:hover { opacity: 1; text-decoration: underline; }

.hero-carousel { background: #fff; }
.hero-slide { min-height: min(72vh, 640px) !important; }
.hero-brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.4rem);
  max-width: 14ch;
  margin: 0 0 0.85rem;
  line-height: 1.05;
}
.hero h1 {
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  font-weight: 700;
  margin: 0 0 0.75rem;
  line-height: 1.3;
}
.hero-content > p:not(.hero-brand) {
  margin: 0 0 1.5rem;
  max-width: 46ch;
  line-height: 1.5;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .85rem 1.2rem; border: 0; border-radius: 999px;
  background: var(--cta); color: #fff; font-weight: 800; cursor: pointer;
}
.btn.ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.55); margin-left: .45rem; }

.portal-intro { padding: 2.8rem 0 1rem; background: #fff; }
.portal-intro h2 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  margin: 0 0 .7rem;
  font-weight: 800;
  max-width: 22ch;
}
.portal-intro p { color: var(--muted); max-width: 60ch; margin: 0; }

.section { padding: 2.8rem 0; }
.section-head { display:flex; justify-content:space-between; align-items:end; gap:1rem; margin-bottom:1.4rem; }
.section-head h2 { font-family: var(--display); font-size: clamp(1.5rem, 3vw, 2rem); margin:0; font-weight:800; }
.section-head p { margin:.3rem 0 0; color:var(--muted); }
.section-head a { color: var(--link); font-weight: 700; }

.cats { display:flex; flex-wrap:wrap; gap:.55rem; margin-bottom:1.3rem; }
.cats a {
  padding: .5rem 1rem;
  border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--link) 45%, #fff);
  color: var(--link);
  font-weight: 700;
  font-size: .9rem;
  background: #fff;
}
.cats a.active, .cats a:hover {
  background: color-mix(in srgb, var(--link) 14%, #fff);
  border-color: var(--link);
}

.course-grid { display:grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.course-item {
  background: var(--paper);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e5ecea;
  transition: transform .2s ease, box-shadow .2s ease;
}
.course-item:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(0,0,0,.08); }
.course-item img, .course-item > div:first-child { width:100%; height:150px; object-fit:cover; }
.course-body { padding: .95rem 1rem 1.1rem; }
.course-body .meta {
  display: inline-flex;
  gap: .35rem;
  flex-wrap: wrap;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--link);
  margin-bottom: .4rem;
}
.course-body h3 { font-family: var(--display); font-size: 1.05rem; margin: 0 0 .35rem; font-weight: 800; line-height: 1.25; }
.course-body p { color: var(--muted); font-size: .9rem; margin: 0 0 .7rem; }
.price { font-weight: 800; color: var(--ink); }
.course-card-link {
  display: inline-flex;
  margin-top: .55rem;
  font-size: .88rem;
  font-weight: 800;
  color: var(--link, var(--primary));
}
.course-item.is-clickable { position: relative; cursor: pointer; }
.course-item-stretch {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}
.course-item.is-clickable .course-card-actions { position: relative; z-index: 2; }
.course-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .7rem;
}
.course-card-actions a,
.course-card-actions .is-detail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .45rem .7rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 800;
  text-decoration: none;
}
.course-card-actions .is-detail {
  background: color-mix(in srgb, var(--primary, #006850) 12%, #fff);
  color: var(--primary, #006850);
}
.course-card-actions .is-wa {
  position: relative;
  z-index: 3;
  background: #25D366;
  color: #fff;
}

.page-hero { padding: 2.4rem 0 1rem; background: #fff; }
.page-hero h1 { font-family: var(--display); font-size: clamp(1.9rem, 4vw, 2.8rem); margin:0; font-weight:800; }

.course-detail { display:grid; grid-template-columns:1.1fr .9fr; gap:1.6rem; padding-bottom:3rem; }
.course-detail .cover { min-height:300px; border-radius:16px; background:#dfecea center/cover no-repeat; }
.course-detail .info h1 { font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.6rem); margin:0 0 .7rem; font-weight:800; }
.course-detail .facts { display:flex; flex-wrap:wrap; gap:.8rem; color:var(--muted); margin:1rem 0 1.2rem; }

.form { display:grid; gap:.75rem; max-width:560px; }
.form input, .form textarea, .form select {
  width:100%; padding:.85rem 1rem; border:1px solid #d5e0dd; border-radius:12px; background:#fff; font:inherit;
}
.alert { padding:.9rem 1rem; margin-bottom:1rem; background:#ecfdf5; color:#047857; border-radius:12px; }
.alert.err { background:#fef2f2; color:#b91c1c; }

.site-footer { background: var(--secondary, #004d3c); color:#e8f5f1; padding:2.4rem 0; margin-top:1.5rem; }
.footer-inner { display:grid; grid-template-columns:1.2fr 1fr 1fr; gap:1rem; }
.footer-inner a { color: var(--accent, #7ebd73); }
.footer-copy { opacity:.85; font-size:.92rem; }

@media (max-width: 1000px) {
  .header-top { grid-template-columns: 1fr auto; }
  .header-search { display:none; }
  .course-grid, .course-detail, .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .course-grid, .course-detail, .footer-inner { grid-template-columns: 1fr; }
  .header-actions .btn-outline { display:none; }
  .btn.ghost { margin-left:0; margin-top:.45rem; }
}
