/* ===========================================================
   training.aivirinchi.com — component styles
   Reads all colors/spacing through theme.css's var() tokens —
   nothing in here should have a literal hex color. If you catch
   yourself typing #, stop and add a token to theme.css instead.
   =========================================================== */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(1100px 520px at 85% -8%, rgba(228, 162, 24, 0.12), transparent 60%),
    radial-gradient(900px 480px at -8% 8%, rgba(21, 102, 60, 0.10), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 243, 237, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 1.25rem; color: var(--navy); }
.brand .logo-mark {
  width: 42px; height: 42px; border-radius: 11px; object-fit: contain;
  background: #fff; border: 1px solid var(--border); padding: 3px;
  box-shadow: var(--shadow-sm);
}
.brand b { color: var(--green); font-weight: 800; }
.back-link {
  font-size: 0.88rem; font-weight: 600; color: var(--muted);
  display: flex; align-items: center; gap: 6px;
}
.back-link:hover { color: var(--ink); }
.nav-links { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-links a { font-size: 0.95rem; font-weight: 600; color: var(--muted); }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 24px; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { position: relative; color: var(--muted); font-weight: 500; font-size: 0.96rem; padding: 6px 2px; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; border: none; cursor: pointer;
  font-weight: 600; font-size: 0.95rem; padding: 12px 20px; border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 22px rgba(10, 38, 62, 0.25); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(10, 38, 62, 0.32); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--navy); background: var(--surface-2); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(0,0,0,0.18); }

section { padding: 72px 0; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 14px; color: var(--ink); }
.lead { color: var(--muted); font-size: 1.08rem; }

/* ===========================================================
   "Courses Created by Industry Experts"-style picker
   (headline + search + filter chips + icon-tile grid)
   =========================================================== */
.course-picker { text-align: center; }
.course-picker h1 {
  font-size: clamp(2rem, 4.5vw, 2.9rem); font-weight: 900; letter-spacing: -0.5px;
}
.course-search {
  max-width: 640px; margin: 28px auto 0;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 6px 6px 22px;
  box-shadow: var(--shadow-sm);
}
.course-search input {
  flex: 1; border: none; background: transparent; font: inherit;
  font-size: 0.98rem; color: var(--ink); padding: 10px 0;
}
.course-search input:focus { outline: none; }
.course-search input::placeholder { color: var(--muted); }
.course-search button {
  flex: none; width: 42px; height: 42px; border-radius: 50%; border: none;
  background: var(--grad); color: #fff; font-size: 1.1rem; cursor: pointer;
  display: grid; place-items: center; transition: transform 0.15s;
}
.course-search button:hover { transform: scale(1.06); }

.course-filters {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  margin: 26px auto 0; max-width: 820px;
}
.course-filter {
  border: 1px solid var(--border); background: var(--surface);
  color: var(--ink); font-size: 0.92rem; font-weight: 600;
  padding: 9px 18px; border-radius: 999px; cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.course-filter:hover { border-color: var(--navy); }
.course-filter.active { background: var(--navy); border-color: var(--navy); color: #fff; }

.course-tiles {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
  margin-top: 44px;
}
.course-tile {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 16px 20px; text-align: center;
  cursor: pointer; transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.course-tile:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: var(--shadow); }
.course-tile .tile-icon {
  width: 84px; height: 84px; margin: 0 auto 16px; border-radius: 18px;
  background: var(--tile-bg); display: grid; place-items: center;
}
.course-tile .tile-icon svg { width: 42px; height: 42px; }
.course-tile .tile-icon svg, .course-tile .tile-icon svg * { color: var(--tile-icon); }
.course-tile .tile-label { font-weight: 700; color: var(--ink); font-size: 0.98rem; }
.course-tile[hidden] { display: none; }

@media (max-width: 920px) {
  .course-tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .course-tiles { grid-template-columns: 1fr 1fr; gap: 14px; }
  .course-tile .tile-icon { width: 64px; height: 64px; }
  .course-tile .tile-icon svg { width: 32px; height: 32px; }
}

/* ---------- Course detail pages (full curriculum, no accordion —
   each course now has its own dedicated page, so there's nothing to
   collapse; everything below the title is just shown) ---------- */
.course-hero { padding-bottom: 10px; }
.course-hero .back-link { display: inline-flex; margin-bottom: 18px; }
.course-hero .meta { color: var(--muted); font-size: 0.97rem; }
.course-hero h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); }

.curriculum {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 34px; box-shadow: var(--shadow-sm);
}
/* Each module is its own collapsible accordion item — collapsed by
   default, so the page stays short and the Book a Demo / Enroll Now
   buttons are visible right away instead of buried under every module's
   full content. Click a module to expand just that one. */
.curriculum .module { border-bottom: 1px solid var(--border); }
.curriculum .module:last-child { border-bottom: none; }
.module-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: none; border: none; cursor: pointer; text-align: left; padding: 20px 0;
  font: inherit;
}
.module-head h4 { margin: 0; color: var(--ink); font-size: 1.05rem; font-weight: 700; }
.module-head .toggle-pill { flex: none; }
.module-body { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.module.open .module-body { padding-bottom: 20px; }
.module-body ul { margin: 0; padding-left: 18px; color: var(--muted); }
.module-body ul li { margin: 5px 0; }

.toggle-pill {
  font-size: 0.85rem; color: var(--navy); font-weight: 600;
  border: 1px solid var(--border); padding: 6px 14px; border-radius: 999px; background: var(--surface);
}

/* Two-button CTA at the end of each course page: free (Book a Demo) vs
   the eventual paid path (Enroll Now) — visually distinct on purpose so
   visitors don't mistake one for the other. */
.course-cta-row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin: 36px 0 6px; }
.btn-enroll { background: var(--gold); color: var(--ink); }
.btn-enroll:hover { background: var(--gold-deep); transform: translateY(-2px); box-shadow: 0 10px 22px rgba(228,162,24,0.3); }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--grad); border-radius: 22px; padding: 48px; text-align: center;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.cta-banner h2 { color: #fff; }
.cta-banner p { color: rgba(255,255,255,0.9); margin: 0 auto 24px; max-width: 560px; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--grad); border-radius: 22px; padding: 48px; text-align: center;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.cta-banner h2 { color: #fff; }
.cta-banner p { color: rgba(255,255,255,0.9); margin: 0 auto 24px; max-width: 560px; }

/* ---------- Demo modal (unchanged from aivirinchi.com) ---------- */
#demo-modal {
  position: fixed; inset: 0; z-index: 900; background: rgba(10,38,62,0.65); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
#demo-modal.open { display: flex; }
.demo-box { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; max-width: 460px; padding: 32px 28px; position: relative; }
.demo-box h2 { margin: 0 0 4px; font-size: 1.35rem; }
.demo-course-tag {
  display: inline-block; background: rgba(228,162,24,0.15); border: 1px solid rgba(228,162,24,0.4);
  border-radius: 6px; font-size: 0.75rem; font-weight: 700; color: var(--gold); padding: 3px 10px; margin-bottom: 18px;
}
.demo-close { position: absolute; top: 14px; right: 16px; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--muted); }
.demo-close:hover { color: var(--ink); }
.demo-box label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--ink); margin: 14px 0 5px; }
.demo-box input, .demo-box textarea {
  width: 100%; box-sizing: border-box; border: 1.5px solid var(--border); border-radius: 10px;
  padding: 10px 13px; font-size: 0.92rem; font-family: inherit; background: var(--bg-soft); color: var(--ink); resize: vertical;
}
.demo-box input:focus, .demo-box textarea:focus { outline: none; border-color: var(--gold); }
.demo-box input.err, .demo-box textarea.err { border-color: #c0392b; }
.demo-msg { font-size: 0.85rem; margin-top: 10px; padding: 9px 13px; border-radius: 8px; display: none; }
.demo-msg.err { background: #fdecea; color: #c0392b; display: block; }
.demo-msg.ok { background: #eafaf1; color: #1a7a40; display: block; }
.demo-submit {
  margin-top: 18px; width: 100%; background: var(--navy); color: #fff; border: none; border-radius: 10px;
  padding: 13px; font-size: 0.95rem; font-weight: 700; cursor: pointer; transition: background 0.2s;
}
.demo-submit:hover { background: var(--navy-2); }
.demo-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--navy); background: var(--navy); color: rgba(248, 243, 237, 0.72); padding: 48px 0 26px; margin-top: 30px; }
.site-footer .brand { color: #f8f3ed; }
.site-footer .brand b { color: var(--gold); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: rgba(248, 243, 237, 0.6); font-size: 0.88rem; }

/* ---------- Contact form (same validation behavior as aivirinchi.com's
   contact.php — see contact.php's inline <script> here for the mirror) ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 32px; box-shadow: var(--shadow-sm);
}
form .field { margin-bottom: 16px; }
form label { display: block; font-size: 0.9rem; margin-bottom: 6px; color: var(--muted); }
form input, form textarea {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--ink); padding: 12px 14px; font: inherit; transition: border-color 0.2s, box-shadow 0.2s;
}
form input:focus, form textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(10, 38, 62, 0.1); }
form textarea { resize: vertical; min-height: 120px; }
form input.field-error, form textarea.field-error { border-color: #b91c1c; box-shadow: 0 0 0 3px rgba(185,28,28,0.1); }
.form-msg {
  display: none; margin-top: 14px; padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 500;
}
.form-msg.success { background: rgba(21,102,60,0.1); color: var(--green); border: 1px solid rgba(21,102,60,0.28); }
.form-msg.error { background: rgba(196,0,0,0.07); color: #b91c1c; border: 1px solid rgba(196,0,0,0.22); }
.char-count { font-size: 0.78rem; color: var(--muted); text-align: right; margin-top: 4px; }
.char-count.warn { color: var(--gold-deep); }
.char-count.over { color: #b91c1c; font-weight: 600; }
.direct-contact { text-align: center; margin-top: 24px; color: var(--muted); font-size: 0.92rem; }
.direct-contact a { color: var(--green); font-weight: 600; }
