/* Dunkage Ready Quiz Templates */

.ready-quiz-section,
.template-library-page,
.template-preview-page {
  background:
    radial-gradient(circle at top left, rgba(91,46,229,.14), transparent 32%),
    radial-gradient(circle at bottom right, rgba(65,210,255,.10), transparent 34%),
    #f8f6ff;
  color: #24194d;
}

.ready-quiz-section {
  padding: clamp(56px, 8vw, 98px) 20px;
}

.ready-quiz-inner,
.template-page-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.ready-quiz-head,
.template-page-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 22px;
  margin-bottom: 28px;
}

.ready-kicker,
.template-kicker {
  display: inline-flex;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(91,46,229,.10);
  color: #5b2ee5;
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.ready-quiz-head h2,
.template-page-head h1,
.template-preview-hero h1 {
  margin: 12px 0 0;
  font-size: clamp(36px, 5vw, 72px);
  line-height: .95;
  letter-spacing: -.06em;
}

.ready-quiz-head p,
.template-page-head p,
.template-preview-hero p {
  max-width: 680px;
  color: #665d81;
  font-size: 18px;
  line-height: 1.55;
  font-weight: 750;
}

.ready-view-all,
.template-action-btn,
.template-secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  padding: 13px 16px;
  text-decoration: none;
  font-weight: 1000;
}

.ready-view-all,
.template-secondary-btn {
  background: #fff;
  color: #4a34a1;
  border: 1px solid rgba(91,46,229,.16);
}

.template-action-btn {
  background: linear-gradient(135deg, #5b2ee5, #886fff);
  color: #fff;
  border: 0;
  box-shadow: 0 16px 30px rgba(91,46,229,.20);
}

.ready-quiz-grid,
.template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.ready-quiz-card,
.template-card,
.template-question-card {
  border-radius: 28px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(91,46,229,.10);
  box-shadow: 0 22px 60px rgba(61,35,138,.08);
}

.ready-quiz-card,
.template-card {
  padding: 16px 16px 20px;
  display: grid;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.ready-quiz-card::before,
.template-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg, #5b2ee5, #41d2ff, #ffda6b);
  z-index: 2;
}

.template-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(91,46,229,.22), transparent 40%),
    linear-gradient(135deg, #f0ebff, #ffffff);
  display: grid;
  place-items: center;
  color: #5b2ee5;
  font-size: 56px;
  font-weight: 1000;
}

.template-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.template-card-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding-top: 4px;
}

.template-icon {
  width: 58px;
  height: 58px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: #f0ebff;
  color: #5b2ee5;
  font-size: 28px;
  font-weight: 1000;
}

.template-badge {
  border-radius: 999px;
  padding: 8px 10px;
  background: #fff8dc;
  color: #8b6511;
  font-size: 12px;
  font-weight: 1000;
}

.ready-quiz-card h3,
.template-card h3 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -.035em;
}

.ready-quiz-card p,
.template-card p {
  color: #665d81;
  line-height: 1.5;
  margin: 0;
  font-weight: 750;
}

.template-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.template-meta-row span {
  border-radius: 999px;
  padding: 8px 10px;
  background: #f3f0ff;
  color: #4a34a1;
  font-size: 12px;
  font-weight: 1000;
}

.template-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.template-install-note {
  border-radius: 24px;
  padding: 20px;
  background: #fff8dc;
  color: #76581b;
  font-weight: 850;
  line-height: 1.5;
}

.template-library-page,
.template-preview-page {
  min-height: 100vh;
  padding: 28px 0 80px;
}

.template-simple-nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.template-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #24194d;
  text-decoration: none;
  font-weight: 1000;
  font-size: 24px;
}

.template-brand span {
  width: 44px;
  height: 44px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #5b2ee5, #886fff);
  color: #fff;
}

.template-filter-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.template-filter-row a {
  border-radius: 999px;
  padding: 10px 13px;
  background: #fff;
  color: #4a34a1;
  text-decoration: none;
  font-weight: 1000;
  border: 1px solid rgba(91,46,229,.12);
}

.template-filter-row a.active {
  background: #5b2ee5;
  color: #fff;
}

.template-preview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
  align-items: start;
}

.template-preview-hero {
  border-radius: 34px;
  background: #fff;
  border: 1px solid rgba(91,46,229,.10);
  box-shadow: 0 24px 70px rgba(61,35,138,.08);
  margin-bottom: 18px;
  overflow: hidden;
}

.template-preview-content {
  padding: clamp(24px, 4vw, 42px);
}

.template-preview-cover {
  width: 100%;
  aspect-ratio: 16 / 7;
  background: #f0ebff;
}

.template-preview-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.template-preview-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}

.template-question-list {
  display: grid;
  gap: 14px;
}

.template-question-card {
  padding: 18px;
}

.template-question-card small {
  display: inline-flex;
  border-radius: 999px;
  padding: 7px 9px;
  background: #f0ebff;
  color: #5b2ee5;
  font-weight: 1000;
  margin-bottom: 10px;
}

.template-question-card h3 {
  margin: 0 0 12px;
  font-size: 20px;
}

.template-question-image {
  border-radius: 18px;
  overflow: hidden;
  background: #f0ebff;
  margin-bottom: 12px;
}

.template-question-image img {
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  display: block;
}

.template-option-preview {
  display: grid;
  gap: 8px;
}

.template-option-preview span {
  border-radius: 14px;
  padding: 10px 12px;
  background: #f8f6ff;
  color: #584d78;
  font-weight: 800;
}

.template-side-card {
  position: sticky;
  top: 18px;
  border-radius: 30px;
  padding: 22px;
  background: #fff;
  border: 1px solid rgba(91,46,229,.10);
  box-shadow: 0 24px 70px rgba(61,35,138,.08);
  display: grid;
  gap: 14px;
}

.template-side-card h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -.04em;
}

.template-side-card form {
  display: grid;
}

@media (max-width: 960px) {
  .ready-quiz-head,
  .template-page-head,
  .template-simple-nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .ready-quiz-grid,
  .template-grid,
  .template-preview-layout {
    grid-template-columns: 1fr;
  }

  .template-side-card {
    position: static;
  }
}

@media (max-width: 560px) {
  .template-card-actions {
    grid-template-columns: 1fr;
  }

  .ready-quiz-inner,
  .template-page-inner,
  .template-simple-nav {
    width: min(100% - 22px, 1180px);
  }
}
