/* ==========================================================================
   Hanaqaad Institute — WordPress / Elementor front-end stylesheet
   Mirrors the React source of truth: dark-first navy + teal, Manrope.
   ========================================================================== */

:root {
  --hq-navy-deep: #06152f;
  --hq-navy: #081b36;
  --hq-navy-soft: #0b2342;
  --hq-surface: #102d4a;
  --hq-teal: #12c8c3;
  --hq-teal-bright: #4fe2dd;
  --hq-text: #f4f7fa;
  --hq-muted: #9aabbd;
  --hq-border: rgba(255, 255, 255, 0.1);
  --hq-radius: 12px;
  --hq-radius-sm: 8px;
  --hq-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.8);
  --hq-container: 1216px;
  --hq-gap: 16px;
}

.hq * { box-sizing: border-box; }
.hq,
.hq input,
.hq select,
.hq textarea,
.hq button {
  font-family: Manrope, "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--hq-text);
}

/* ---------- generic building blocks ------------------------------------ */

.hq-card {
  border: 1px solid var(--hq-border);
  border-radius: var(--hq-radius);
  background: var(--hq-navy-soft);
  padding: 18px;
  box-shadow: var(--hq-shadow);
}
.hq-kicker {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hq-teal);
}
.hq-muted { color: var(--hq-muted); }
.hq-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--hq-border);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 600;
  color: var(--hq-muted);
}
.hq-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 13px 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}
.hq-btn:focus-visible { outline: 2px solid var(--hq-teal-bright); outline-offset: 2px; }
.hq-btn--primary { background: var(--hq-teal); color: var(--hq-navy-deep); }
.hq-btn--primary:hover { background: var(--hq-teal-bright); transform: translateY(-1px); }
.hq-btn--ghost { border-color: var(--hq-border); color: var(--hq-text); background: transparent; }
.hq-btn--ghost:hover { border-color: rgba(18, 200, 195, 0.4); color: var(--hq-teal); }
.hq-btn[disabled] { opacity: 0.55; pointer-events: none; }

/* ---------- grids ------------------------------------------------------- */

.hq-grid { display: grid; gap: var(--hq-gap); }
.hq-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hq-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hq-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- course + instructor cards ---------------------------------- */

.hq-course-card,
.hq-instructor-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--hq-border);
  border-radius: var(--hq-radius);
  background: var(--hq-navy-soft);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.hq-course-card:hover,
.hq-instructor-card:hover { transform: translateY(-3px); border-color: rgba(18, 200, 195, 0.35); }
.hq-course-card__media { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; display: block; }
.hq-course-card__body,
.hq-instructor-card__body { padding: 14px 16px 16px; display: grid; gap: 8px; }
.hq-course-card__title,
.hq-instructor-card__name { font-size: 15.5px; font-weight: 800; line-height: 1.3; }
.hq-course-card__meta,
.hq-instructor-card__role { font-size: 12.5px; color: var(--hq-muted); }
.hq-instructor-card { text-align: left; cursor: pointer; }
.hq-instructor-card__avatar {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--hq-border);
}

/* ---------- hero slider ------------------------------------------------- */

.hq-hero {
  position: relative;
  background: linear-gradient(180deg, var(--hq-navy) 0%, var(--hq-navy-deep) 100%);
  border-radius: var(--hq-radius);
  overflow: hidden;
}
.hq-hero__viewport { position: relative; min-height: 470px; }
.hq-hero__slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 58% 42%;
  align-items: center;
  gap: 28px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(24px);
  transition: opacity 0.6s ease, transform 0.6s ease, visibility 0.6s;
  pointer-events: none;
}
.hq-hero__slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
  position: relative;
}
.hq-hero__eyebrow { margin-bottom: 10px; display: block; }
.hq-hero__title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.6px;
  margin: 0 0 12px;
}
.hq-hero__title span { display: block; color: var(--hq-teal); }
.hq-hero__text { font-size: 16px; line-height: 1.7; color: var(--hq-muted); margin: 0 0 18px; max-width: 52ch; }
.hq-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.hq-hero__stats { display: flex; flex-wrap: wrap; gap: 8px; }
.hq-hero__visual { display: grid; gap: 10px; }
.hq-hero__visual .hq-card { padding: 16px; }
.hq-hero__visual-row {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--hq-border); border-radius: 10px; padding: 10px 12px;
  font-size: 13px; background: rgba(255, 255, 255, 0.02);
}
.hq-hero__visual-row b { color: var(--hq-teal); font-size: 12px; }
.hq-hero__bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.hq-hero__bar i { display: block; height: 100%; border-radius: 999px; background: var(--hq-teal); }

.hq-hero__controls {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 8px 4px;
}
.hq-hero__dots { display: flex; gap: 8px; }
.hq-hero__dot {
  width: 26px; height: 6px; border-radius: 999px; border: 0; padding: 0;
  background: rgba(255, 255, 255, 0.16); cursor: pointer; transition: background 0.25s ease, width 0.25s ease;
}
.hq-hero__dot.is-active { background: var(--hq-teal); width: 40px; }
.hq-hero__count { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; color: var(--hq-muted); }

/* ---------- modals ------------------------------------------------------ */

.hq-modal { position: fixed; inset: 0; z-index: 99999; display: none; }
.hq-modal.is-open { display: flex; align-items: flex-end; justify-content: center; }
.hq-modal__backdrop { position: absolute; inset: 0; background: rgba(6, 21, 47, 0.88); backdrop-filter: blur(4px); }
.hq-modal__panel {
  position: relative;
  display: flex; flex-direction: column;
  width: 100%; max-height: 94vh;
  background: var(--hq-navy);
  border: 1px solid var(--hq-border);
  border-radius: 12px 12px 0 0;
  box-shadow: var(--hq-shadow);
  animation: hq-sheet-in 0.32s ease;
  overflow: hidden;
}
@keyframes hq-sheet-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.hq-modal__head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  padding: 16px 20px; border-bottom: 1px solid var(--hq-border);
}
.hq-modal__title { font-size: 17px; font-weight: 800; margin: 4px 0 0; }
.hq-modal__close {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--hq-border); border-radius: 10px; background: transparent;
  color: var(--hq-text); cursor: pointer; font-size: 16px; line-height: 1;
}
.hq-modal__close:hover { color: var(--hq-teal); border-color: rgba(18, 200, 195, 0.4); }
.hq-modal__body { padding: 20px; overflow-y: auto; font-size: 15px; line-height: 1.65; color: var(--hq-muted); }

/* ---------- forms ------------------------------------------------------- */

.hq-form { display: grid; gap: 14px; }
.hq-form__grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hq-field { display: block; }
.hq-field > span {
  display: block; margin-bottom: 6px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--hq-muted);
}
.hq-field > span .req { color: var(--hq-teal); }
.hq-field input,
.hq-field select,
.hq-field textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--hq-border);
  border-radius: var(--hq-radius-sm);
  background: rgba(6, 21, 47, 0.6);
  padding: 12px 14px;
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.18s ease;
}
.hq-field textarea { min-height: 96px; resize: vertical; }
.hq-field input:focus,
.hq-field select:focus,
.hq-field textarea:focus { border-color: var(--hq-teal); }
.hq-field.is-invalid input,
.hq-field.is-invalid select,
.hq-field.is-invalid textarea { border-color: #ff6b6b; }
.hq-field__error { display: none; margin-top: 5px; font-size: 12px; color: #ff8f8f; }
.hq-field.is-invalid .hq-field__error { display: block; }
.hq-field--full { grid-column: 1 / -1; }
.hq-field input[type="file"] { padding: 10px 12px; font-size: 13px; }
.hq-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--hq-muted); }
.hq-consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--hq-teal); }
.hq-form__status { font-size: 13.5px; min-height: 20px; }
.hq-form__status.is-error { color: #ff8f8f; }
.hq-form__status.is-success { color: var(--hq-teal); }

/* multi-step wizard */
.hq-steps__bar { height: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); overflow: hidden; margin: 8px 0 18px; }
.hq-steps__bar i { display: block; height: 100%; background: var(--hq-teal); transition: width 0.4s ease; }
.hq-steps__meta { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
.hq-steps__meta .hq-steps__label { color: var(--hq-teal); }
.hq-step { display: none; }
.hq-step.is-active { display: block; animation: hq-step-in 0.3s ease; }
@keyframes hq-step-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
.hq-steps__nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; }
.hq-review { display: grid; gap: 10px; }
.hq-review__row { display: flex; gap: 10px; font-size: 12.5px; }
.hq-review__row dt { width: 170px; flex: none; color: var(--hq-muted); }
.hq-success { text-align: center; }
.hq-success__mark {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(18, 200, 195, 0.15); color: var(--hq-teal); font-size: 26px;
}

/* ---------- responsive: tablet ----------------------------------------- */

@media (max-width: 1024px) {
  .hq-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hq-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hq-hero__viewport { min-height: 560px; }
  .hq-hero__slide { grid-template-columns: 1fr; gap: 22px; }
  .hq-hero__title { font-size: 40px; }
  .hq-modal.is-open { align-items: center; padding: 24px; }
  .hq-modal__panel { max-width: 880px; border-radius: 12px; }
}

/* ---------- responsive: mobile ------------------------------------------ */

@media (max-width: 767px) {
  :root { --hq-gap: 12px; }
  .hq-grid--2,
  .hq-grid--3,
  .hq-grid--4 { grid-template-columns: minmax(0, 1fr); }
  .hq-hero { border-radius: 10px; }
  .hq-hero__viewport { min-height: 0; }
  .hq-hero__slide { position: absolute; padding: 4px; }
  .hq-hero__slide.is-active { position: relative; }
  .hq-hero__title { font-size: 30px; letter-spacing: -0.3px; }
  .hq-hero__text { font-size: 15px; }
  .hq-hero__actions .hq-btn { flex: 1 1 100%; }
  .hq-card { padding: 14px; }
  .hq-form__grid { grid-template-columns: minmax(0, 1fr); }
  .hq-modal.is-open { align-items: flex-end; padding: 0; }
  .hq-modal__panel { max-height: 92vh; border-radius: 12px 12px 0 0; }
  .hq-modal__body { padding: 16px; }
  .hq-review__row { flex-direction: column; gap: 2px; }
  .hq-review__row dt { width: auto; }
}

/* ---------- reduced motion ---------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .hq-hero__slide,
  .hq-modal__panel,
  .hq-step,
  .hq-btn,
  .hq-course-card,
  .hq-instructor-card {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
}
