/* Service landing pages — extends clean-site */

/* Ready-lessons page tweaks */

/* Navbar must stay pinned — overrides any stale cached global rules */
body.page-ready-lessons > header.navbar,
body.page-ready-lessons > .navbar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 1000 !important;
  transform: none !important;
}

body.page-worksheets main,
body.page-worksheets #categories .container {
  max-width: 100%;
  overflow-x: clip;
}

body.page-ready-lessons {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  background: transparent;
}

body.page-ready-lessons main {
  flex: 1 0 auto;
}

body.page-ready-lessons .site-footer.section-yellow {
  flex-shrink: 0;
  margin-top: auto;
  left: calc(100vw - 100%);
  width: 100vw;
  max-width: 100vw;
  margin-inline: 0;
}

body.page-ready-lessons .svc-lessons-page {
  padding-top: calc(var(--clean-nav-clear) + 20px);
}

body.page-ready-lessons .svc-page-title {
  margin: 0 0 clamp(40px, 6vw, 56px);
  text-align: center;
}

body.page-ready-lessons .svc-page-title .line {
  display: block;
}

body.page-ready-lessons .svc-page-title.font-cartoon {
  font-size: clamp(2rem, 7vw, 4.5rem);
}

body.page-ready-lessons #library.clean-section--soft {
  background: transparent;
  padding-top: 0 !important;
  overflow: visible;
}

body.page-ready-lessons .scroll-section .svc-lesson-card {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease);
}

body.page-ready-lessons .scroll-section.in-view .svc-lesson-card {
  opacity: 1;
  transform: none;
}

body.page-ready-lessons .svc-filter-bar {
  --filter-inner-radius: 13px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: var(--shadow-sticker);
  background: #effefa;
  margin-bottom: clamp(44px, 7vw, 64px);
}

body.page-ready-lessons .svc-filter-trigger:hover,
body.page-ready-lessons .svc-filter-dropdown.is-open .svc-filter-trigger {
  background: color-mix(in srgb, #effefa 55%, #c5f7f2 45%);
}

body.page-ready-lessons .svc-filter-menu {
  border: 3px solid var(--ink);
  border-radius: 12px;
  box-shadow: var(--shadow-sticker);
}

body.page-ready-lessons .svc-filter-divider {
  background: var(--ink);
  opacity: 0.12;
}

body.page-ready-lessons .svc-lesson-preview {
  aspect-ratio: 1 / 1;
  background: #00c9b7 !important;
}

/* .clean-section's flat 72px top padding doesn't account for the fixed
   navbar's real height, so the first section after the hero can render
   under the pinned nav pills once scrolled into view. Use the same
   dynamic clearance the homepage hero uses. */
body.clean-site .clean-section {
  padding-top: max(72px, calc(var(--clean-nav-clear) + 24px));
}

.svc-hero-badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 900;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--memyellow);
  box-shadow: var(--shadow-sticker);
}

.svc-section-lead {
  text-align: center;
  max-width: 38rem;
  margin: 0 auto 28px;
  font-size: clamp(1.05rem, 3vw, 1.25rem);
  font-weight: 700;
  line-height: 1.55;
  color: var(--body);
}

.svc-categories {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}

.svc-category-btn {
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 900;
  font-family: inherit;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow-sticker);
  transition: transform 0.12s, background 0.12s;
}

.svc-category-btn:hover,
.svc-category-btn.active {
  background: var(--memteal);
  transform: translateY(-1px);
}

.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  max-width: 960px;
  margin: 0 auto;
}

.svc-card {
  border: 3px solid var(--ink);
  border-radius: 18px;
  padding: 20px 16px;
  box-shadow: var(--shadow-sticker);
  text-align: center;
  background: var(--white);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.svc-card-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.svc-card h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--ink);
}

.svc-card p {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--body);
  flex: 1;
}

.svc-card .btn {
  margin-top: 4px;
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
}

.svc-panel.hidden {
  display: none;
}

.svc-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 18px;
  max-width: 960px;
  margin: 0 auto;
}

.svc-tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}

.svc-tile-image {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: var(--shadow-sticker);
}

.svc-tile-image--teal { background: var(--memteal); }
.svc-tile-image--yellow { background: var(--memyellow); }
.svc-tile-image--pink { background: var(--mempink); }
.svc-tile-image--orange { background: #ffd4a3; }

.svc-tile h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--ink);
}

.svc-tile .btn {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
}

.svc-tile.hidden {
  display: none;
}

.svc-tile--playable {
  cursor: pointer;
}

.svc-tile--playable .svc-tile-image {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.svc-tile--playable:hover .svc-tile-image,
.svc-tile--playable:focus-visible .svc-tile-image {
  transform: translateY(-2px);
}

/* Worksheets page — filter bar matches ready-lessons library */
body.page-worksheets .svc-filter-bar {
  --filter-inner-radius: 13px;
  border: none;
  box-shadow: none;
  background: transparent;
  border-radius: 0;
  overflow: visible;
  max-width: 320px;
  margin-bottom: 56px;
}

body.page-worksheets .svc-filter-trigger {
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: var(--shadow-sticker);
  background: #c8faf5;
  padding: 14px 18px;
  align-items: center;
  text-align: center;
}

body.page-worksheets .svc-filter-dropdown {
  width: 100%;
}

body.page-worksheets .svc-filter-trigger-label {
  font-size: 0.85rem;
  text-align: center;
  width: 100%;
}

body.page-worksheets .svc-filter-trigger-value {
  font-size: 1.15rem;
  text-align: center;
  width: 100%;
}

body.page-worksheets .svc-filter-trigger:hover,
body.page-worksheets .svc-filter-dropdown.is-open .svc-filter-trigger {
  background: #dffcf8;
}

.svc-empty-state {
  margin: 32px auto 0;
  max-width: 420px;
  padding: 20px 24px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: #fffef5;
  box-shadow: var(--shadow-sticker);
  font-size: 1rem;
  font-weight: 800;
  text-align: center;
  color: var(--ink);
}

.svc-empty-state.hidden {
  display: none;
}

body.page-worksheets .svc-filter-menu {
  border: 3px solid var(--ink);
  border-radius: 12px;
  box-shadow: var(--shadow-sticker);
}

body.page-worksheets .svc-filter-divider {
  background: var(--ink);
  opacity: 0.12;
}

body.page-worksheets #categories.clean-section--soft {
  background: transparent;
}

body.page-worksheets .svc-tile-grid--coloring {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
  max-width: 1180px;
}

body.page-worksheets .svc-tile--coloring {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

body.page-worksheets .svc-tile-image--turquoise {
  background: #3aada0;
  padding: 14px;
  overflow: hidden;
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
  aspect-ratio: 1 / 1.05;
  min-height: 320px;
}

body.page-worksheets .svc-tile-image--turquoise img {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  object-fit: contain;
  background: #fff;
  border: 4px solid var(--ink);
  border-radius: 8px;
  box-sizing: border-box;
}

body.page-worksheets .svc-tile-download {
  flex-shrink: 0;
  width: 100%;
  padding: 16px 20px;
  min-height: 52px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--memyellow);
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: none;
  transform: scale(1);
  transform-origin: center center;
  transition: transform 0.28s cubic-bezier(0.34, 1.25, 0.64, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.page-worksheets .svc-tile-download.btn-candy {
  box-shadow: none !important;
}

body.page-worksheets .svc-tile-download.btn-candy:active {
  transform: none;
  box-shadow: none !important;
}

body.page-worksheets .svc-tile-download:hover,
body.page-worksheets .svc-tile-download:focus-visible {
  transform: scale(1.05);
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  body.page-worksheets .svc-tile-download {
    transition: none;
  }

  body.page-worksheets .svc-tile-download:hover,
  body.page-worksheets .svc-tile-download:focus-visible {
    transform: none;
  }
}

@media (max-width: 640px) {
  body.page-worksheets .svc-tile-grid--coloring {
    grid-template-columns: 1fr;
    max-width: 360px;
    gap: 22px;
  }

  body.page-worksheets .svc-tile-image--turquoise {
    min-height: 300px;
  }
}

.svc-filter-bar {
  display: flex;
  align-items: stretch;
  max-width: 520px;
  margin: 0 auto 24px;
  border: 1.5px solid color-mix(in srgb, var(--ink) 14%, transparent);
  border-radius: 12px;
  background: var(--white);
}

.svc-filter-dropdown {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
}

.svc-filter-trigger {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  font: inherit;
  cursor: pointer;
  text-align: start;
  color: var(--ink);
  transition: background 0.12s;
}

.svc-filter-trigger:hover,
.svc-filter-dropdown.is-open .svc-filter-trigger {
  background: #f7fdfc;
}

.svc-filter-trigger-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 45%, transparent);
}

.svc-filter-trigger-value {
  font-size: 0.92rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.svc-filter-divider {
  width: 1px;
  align-self: stretch;
  background: color-mix(in srgb, var(--ink) 10%, transparent);
  flex-shrink: 0;
}

.svc-filter-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  margin: 0;
  padding: 4px;
  list-style: none;
  border: 1.5px solid color-mix(in srgb, var(--ink) 14%, transparent);
  border-radius: 10px;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  max-height: min(280px, 50vh);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.svc-filter-menu.hidden {
  display: none;
}

.svc-filter-menu li {
  margin: 0;
}

.svc-filter-menu button {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 7px;
  background: transparent;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: start;
  cursor: pointer;
  color: var(--ink);
}

.svc-filter-menu button:hover {
  background: #f0faf9;
}

.svc-filter-menu button.active {
  background: var(--memteal);
  font-weight: 900;
}

@media (max-width: 480px) {
  .svc-filter-bar {
    max-width: 100%;
  }

  .svc-filter-trigger {
    padding: 8px 10px;
  }

  .svc-filter-trigger-value {
    font-size: 0.82rem;
  }
}

.svc-lesson-empty {
  text-align: center;
  max-width: 28rem;
  margin: 0 auto 20px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--body);
}

.svc-lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  max-width: 980px;
  margin: 0 auto;
}

.svc-lesson-card.hidden {
  display: none;
}

.svc-lesson-card {
  border: 3px solid var(--ink);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-candy);
  background: var(--white);
  display: flex;
  flex-direction: column;
}

.svc-lesson-preview {
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 900;
  text-align: center;
  border-bottom: 3px solid var(--ink);
}

.svc-lesson-preview--teal { background: var(--memteal); }
.svc-lesson-preview--yellow { background: var(--memyellow); }
.svc-lesson-preview--pink { background: var(--mempink); }
.svc-lesson-preview--orange { background: #ffd4a3; }

.svc-lesson-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.svc-lesson-body h3 {
  margin: 0;
  font-size: 1.15rem;
}

.svc-lesson-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.svc-lesson-meta li {
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #e8faf8;
}

.svc-lesson-body p {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--body);
  flex: 1;
}

.svc-family-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 880px;
  margin: 0 auto;
}

.svc-family-step {
  border: 3px solid var(--ink);
  border-radius: 18px;
  padding: 22px 16px;
  text-align: center;
  box-shadow: var(--shadow-sticker);
  background: var(--white);
}

.svc-family-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--memyellow);
  font-weight: 900;
  font-size: 18px;
}

.svc-family-step h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.svc-family-step p {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--body);
}

.svc-create-box {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px;
  border: 3px solid var(--ink);
  border-radius: 20px;
  background: var(--memteal);
  box-shadow: var(--shadow-candy);
}

#create.clean-section--soft {
  background: transparent !important;
}

#create .clean-section-title {
  margin-bottom: 40px;
}

#create .svc-section-lead {
  color: var(--ink);
  opacity: 0.88;
}

.svc-create-box .join-material-box {
  margin-bottom: 16px;
}

.svc-game-pick-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 0 0 18px;
  padding: 16px;
  font: inherit;
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--ink);
  text-align: center;
  background: #fffef5;
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: var(--shadow-candy);
  cursor: pointer;
  transition: transform 0.12s;
}

.svc-game-pick-toggle:hover {
  transform: translateY(-2px);
}

.svc-game-pick-toggle-chevron {
  transition: transform 0.15s;
}

.svc-game-pick-toggle[aria-expanded="true"] .svc-game-pick-toggle-chevron {
  transform: rotate(180deg);
}

.svc-game-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.svc-game-pick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 14px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: #fffef5;
  box-shadow: 4px 4px 0 var(--ink);
  font: inherit;
  text-align: center;
  cursor: pointer;
  transition: transform 0.12s, background 0.12s;
}

.svc-game-pick-btn:hover,
.svc-game-pick-btn.is-selected {
  background: var(--memyellow);
  transform: translateY(-2px);
}

.svc-game-pick-title {
  font-size: 0.98rem;
  font-weight: 900;
  color: var(--ink);
}

.svc-game-pick-desc {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  color: color-mix(in srgb, var(--ink) 72%, transparent);
}

.svc-create-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  opacity: 0.85;
}

.svc-create-back:hover {
  opacity: 1;
  text-decoration: underline;
}

.svc-create-selected-game {
  margin: 0 0 8px;
  font-size: 1.2rem;
  font-weight: 900;
  text-align: center;
  color: var(--ink);
}

.svc-create-content-hint {
  margin: 0 0 16px;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  color: color-mix(in srgb, var(--ink) 78%, transparent);
}

.svc-create-step.hidden {
  display: none;
}

.svc-pair-count {
  margin: 0 0 16px;
  text-align: center;
}

.svc-pair-count.hidden {
  display: none;
}

.svc-pair-count-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--ink);
}

.svc-pair-count-options {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.svc-pair-count-btn {
  padding: 10px 16px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: #fffef5;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.12s, background 0.12s;
}

.svc-pair-count-btn:hover {
  transform: translateY(-2px);
}

.svc-pair-count-btn.is-selected {
  background: var(--memyellow);
}

.svc-my-games {
  max-width: 720px;
  margin: 28px auto 0;
  padding: 20px 24px;
  border: 3px solid var(--ink);
  border-radius: 20px;
  background: #fffef5;
  box-shadow: var(--shadow-candy);
}

.svc-my-games.hidden {
  display: none;
}

.svc-my-games-title {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 900;
  text-align: center;
  color: var(--ink);
}

.svc-my-games-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.svc-my-games-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: #fff;
}

.svc-my-games-row-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--ink);
}

.svc-my-games-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  color: color-mix(in srgb, var(--ink) 75%, transparent);
}

.svc-confirm-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.svc-confirm-actions .btn {
  flex: 1;
}

.modal-fullscreen {
  width: 96vw;
  height: 92vh;
  max-width: 96vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.modal-fullscreen .svc-slide-view {
  flex: 1;
  min-height: 0;
}

.svc-lesson-game {
  flex: 1;
  min-height: 0;
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 28px 24px;
  background: linear-gradient(165deg, #fff7e0 0%, #fff 100%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.svc-lesson-game.hidden {
  display: none;
}

.svc-lesson-game-icon {
  font-size: 3rem;
}

.svc-lesson-game h3 {
  margin: 0;
  font-size: clamp(1.4rem, 4vw, 1.9rem);
}

.svc-lesson-game p {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.5;
}

.svc-slide-view {
  min-height: 280px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 28px 24px;
  background: linear-gradient(165deg, #e8faf8 0%, #fff 100%);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.svc-slide-view h3 {
  margin: 0;
  font-size: clamp(1.4rem, 4vw, 1.9rem);
}

.svc-slide-view p {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.5;
}

.svc-slide-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.svc-slide-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.svc-slide-dot {
  width: 10px;
  height: 10px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--white);
  padding: 0;
  cursor: pointer;
}

.svc-slide-dot.active {
  background: var(--memteal);
}

.nav-services-link.active {
  background: var(--memyellow);
}

@media (max-width: 768px) {
  .svc-family-steps {
    grid-template-columns: 1fr;
    max-width: 360px;
  }

  .svc-lesson-grid {
    grid-template-columns: 1fr;
    max-width: 360px;
  }
}
