/* =========================================================================
   MOBILVERSION — KURSER (telefon, ≤ 809.98px)

   The phone layer for kurser.html only. Loaded right after css/mobil.css,
   which owns the shared pieces (top bar, menu, footer, book button, tokens).
   Behaviour: js/mobil-kurser.js (swipe row, gentle reveals, phone labels,
   course pop-up image).

   EVERYTHING is inside the phone media block (plus the guard at the end that
   hides phone-only pieces on wider screens) — laptop and monitor are
   untouched by construction. Every selector starts with body.cm-page-kurser.

   Same rules as the front page: 20px gutter, ~72px between sections,
   section titles Playfair 34px, eyebrows 11px/650/0.16em accent, body 16px
   at 1.65, ink pills ≥ 44px tall.
   ========================================================================= */

@media (max-width: 809.98px) {

  body.cm-page-kurser {
    --mk-h2: 34px;
    --mk-img-h: clamp(240px, 38vh, 330px);   /* course pop-up photo */
  }

  /* Shared type for the section titles and eyebrows on this page */
  body.cm-page-kurser #injected-tailwind-content :is(.lm-title, .timeline-title, .steps-title, .cp-title),
  body.cm-page-kurser #injected-tailwind-content > section:last-child h2 {
    font-size: var(--mk-h2) !important;
    line-height: 1.1 !important;
    letter-spacing: -0.01em !important;
    text-wrap: balance;
  }
  body.cm-page-kurser #injected-tailwind-content :is(.lm-eyebrow, .offerings-eyebrow, .steps-eyebrow, .cp-eyebrow),
  body.cm-page-kurser #injected-tailwind-content > section:last-child p.uppercase {
    font-family: var(--cm-font-body, "DM Sans", sans-serif) !important;
    font-size: 11px !important;
    font-weight: 650 !important;
    letter-spacing: 0.16em !important;
    line-height: 1.4 !important;
    text-transform: uppercase !important;
    color: var(--cm-accent, #c08276) !important;
    margin: 0 0 14px !important;
  }

  /* Ink pills on this page: 44px tall (tap target), same look */
  body.cm-page-kurser #injected-tailwind-content a.framer-wsdyl9 {
    height: 44px !important;
  }

  /* 1. HERO — shared by the four sub-pages, see css/mobil.css "SUB-PAGE HERO" */

  /* ---------------------------------------------------------------------
     2. LOVE MASTERY — eyebrow, title, photo, then the text, list, price and
     the two buttons side by side (primary label shortened by js).
     --------------------------------------------------------------------- */
  body.cm-page-kurser #injected-tailwind-content .love-mastery-section {
    padding: 72px var(--cm-m-gutter, 20px) 0 !important;
  }
  body.cm-page-kurser #injected-tailwind-content .love-mastery-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
  }
  body.cm-page-kurser #injected-tailwind-content .love-mastery-text {
    display: contents !important;
  }
  body.cm-page-kurser #injected-tailwind-content .lm-eyebrow     { order: 1; }
  body.cm-page-kurser #injected-tailwind-content .lm-title       { order: 2; margin: 0 !important; }
  body.cm-page-kurser #injected-tailwind-content .lm-image-col   { order: 3; }
  body.cm-page-kurser #injected-tailwind-content .lm-description { order: 4; }
  body.cm-page-kurser #injected-tailwind-content .love-mastery-text > div:last-child { order: 5; }

  body.cm-page-kurser #injected-tailwind-content .lm-image-col {
    top: 0 !important;
    max-width: none !important;
    width: 100% !important;
    margin: 24px 0 0 !important;
  }
  body.cm-page-kurser #injected-tailwind-content .lm-image-placeholder {
    max-width: none !important;
    aspect-ratio: 4 / 4.6 !important;
  }
  body.cm-page-kurser #injected-tailwind-content .lm-image-placeholder img {
    object-position: 50% 30% !important;
  }
  body.cm-page-kurser #injected-tailwind-content .lm-description {
    margin: 24px 0 0 !important;
    font-size: 16px !important;
    line-height: 1.65 !important;
  }
  body.cm-page-kurser #injected-tailwind-content .lm-list-section {
    margin: 32px 0 0 !important;
  }
  body.cm-page-kurser #injected-tailwind-content .lm-list-title {
    font-size: 22px !important;
    line-height: 1.2 !important;
    margin: 0 0 16px !important;
  }
  body.cm-page-kurser #injected-tailwind-content .lm-check-list {
    gap: 12px !important;
  }
  body.cm-page-kurser #injected-tailwind-content .lm-check-list li {
    align-items: flex-start !important;
    gap: 12px !important;
    font-size: 16px !important;
    line-height: 1.45 !important;
  }
  body.cm-page-kurser #injected-tailwind-content .lm-check-icon {
    margin-top: 1px;
  }
  body.cm-page-kurser #injected-tailwind-content .lm-price {
    margin: 32px 0 0 !important;
    font-size: 34px !important;
    line-height: 1.1 !important;
  }
  body.cm-page-kurser #injected-tailwind-content .lm-actions {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 14px 24px !important;
    margin-top: 22px !important;
  }
  body.cm-page-kurser #injected-tailwind-content .lm-actions a.cm-kurser-cta-cloned {
    height: 44px !important;
    width: auto !important;
    min-width: 0 !important;
    flex: 0 0 auto;
  }
  /* "Ansøg nu" is short: the normal pill padding, not the wide one */
  body.cm-page-kurser #injected-tailwind-content .lm-actions a.cm-kurser-cta-cloned.cm-cta-wide:not(:hover) {
    padding-left: 22px !important;
  }
  body.cm-page-kurser #injected-tailwind-content .lm-btn-secondary {
    min-height: 44px;
    font-size: 11.5px !important;
    letter-spacing: 0.12em !important;
    white-space: nowrap;
  }

  /* ---------------------------------------------------------------------
     3. "REJSEN INDENI LOVE MASTERY" — a vertical line of the five steps:
     icon on the left on a thin line, number + title + text on the right
     (it was five centred blocks with the line running through the text).
     Icons light and the line fills as you scroll (custom.js .active /
     .line-active, kept); each step rises in gently (js, --mk-rev).
     --------------------------------------------------------------------- */
  body.cm-page-kurser #injected-tailwind-content .timeline-section {
    padding: 72px var(--cm-m-gutter, 20px) 0 !important;
  }
  body.cm-page-kurser #injected-tailwind-content .timeline-header {
    margin: 0 0 36px !important;
    text-align: left !important;
  }
  body.cm-page-kurser #injected-tailwind-content .timeline-title {
    text-align: left !important;
  }
  body.cm-page-kurser #injected-tailwind-content .timeline-steps {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
  }
  body.cm-page-kurser #injected-tailwind-content .timeline-step {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 0 30px 68px !important;
    min-height: 92px;
    text-align: left !important;
  }
  body.cm-page-kurser #injected-tailwind-content .timeline-step:last-child {
    padding-bottom: 0 !important;
  }
  body.cm-page-kurser #injected-tailwind-content .timeline-icon-wrap {
    position: absolute !important;
    left: 0;
    top: 0;
    width: 48px !important;
    height: 48px !important;
    margin: 0 !important;
  }
  body.cm-page-kurser #injected-tailwind-content .timeline-icon-wrap svg {
    width: 23px !important;
    height: 23px !important;
  }
  body.cm-page-kurser #injected-tailwind-content .timeline-step:not(:last-child)::before {
    top: 56px !important;
    bottom: 8px !important;
    left: 24px !important;
    right: auto !important;
    width: 1px !important;
    height: auto !important;
    transform: none !important;
  }
  body.cm-page-kurser #injected-tailwind-content .timeline-step:not(:last-child)::after {
    display: none !important;
  }
  body.cm-page-kurser #injected-tailwind-content .timeline-number {
    font-size: 28px !important;
    line-height: 1 !important;
    margin: 4px 0 8px !important;
  }
  body.cm-page-kurser #injected-tailwind-content .timeline-step-title {
    font-size: 21px !important;
    line-height: 1.25 !important;
    margin: 0 0 6px !important;
  }
  body.cm-page-kurser #injected-tailwind-content .timeline-step-desc {
    font-size: 15px !important;
    line-height: 1.6 !important;
    margin: 0 !important;
  }

  /* ---------------------------------------------------------------------
     4. "ANDRE GUIDEDE FORLØB" — the three cards become one swipe row with
     a peek of the next card and dots (wired in js).
     --------------------------------------------------------------------- */
  body.cm-page-kurser #injected-tailwind-content .offerings-section {
    padding: 72px 0 0 !important;
  }
  body.cm-page-kurser #injected-tailwind-content .offerings-eyebrow {
    margin-bottom: 10px !important;
    text-align: center !important;
  }
  body.cm-page-kurser #injected-tailwind-content .offerings-container.mk-row {
    position: relative !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 14px var(--cm-m-gutter, 20px) 18px !important;   /* room for the card glow */
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory;
    scroll-padding-left: var(--cm-m-gutter, 20px);
    scroll-padding-right: var(--cm-m-gutter, 20px);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  body.cm-page-kurser #injected-tailwind-content .offerings-container.mk-row::-webkit-scrollbar { display: none; }
  body.cm-page-kurser #injected-tailwind-content .offerings-container.mk-row > .offering-card {
    flex: 0 0 78vw;
    width: 78vw;
    max-width: 320px;
    padding: 20px 20px 24px !important;
    scroll-snap-align: start;
  }
  body.cm-page-kurser #injected-tailwind-content .offering-image-placeholder {
    margin-bottom: 22px !important;
  }
  body.cm-page-kurser #injected-tailwind-content .offering-title {
    font-size: 24px !important;
    margin-bottom: 4px !important;
  }
  body.cm-page-kurser #injected-tailwind-content .offering-subtitle {
    font-size: 18px !important;
    margin-bottom: 14px !important;
  }
  body.cm-page-kurser #injected-tailwind-content .offering-desc {
    font-size: 15px !important;
    line-height: 1.6 !important;
    margin-bottom: 18px !important;
  }
  body.cm-page-kurser #injected-tailwind-content .offering-details {
    margin-bottom: 20px !important;
  }
  body.cm-page-kurser #injected-tailwind-content .offering-card a.framer-wsdyl9 {
    max-width: 100%;
  }

  /* dots */
  body.cm-page-kurser #injected-tailwind-content .mk-dots {
    display: flex;
    justify-content: center;
    gap: 2px;
    margin: 0 auto;
  }
  body.cm-page-kurser #injected-tailwind-content .mk-dot {
    position: relative;
    width: 22px;
    height: 32px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  body.cm-page-kurser #injected-tailwind-content .mk-dot::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    border-radius: 6px;
    background: rgba(74, 55, 48, 0.22);
    transform: translate(-50%, -50%);
    transition: width 0.35s ease, background-color 0.35s ease;
  }
  body.cm-page-kurser #injected-tailwind-content .mk-dot.is-on::after {
    width: 18px;
    background: var(--cm-accent, #c08276);
  }
  @keyframes mk-nudge {
    0%, 100% { transform: translateX(0); }
    35% { transform: translateX(-34px); }
    65% { transform: translateX(-34px); }
  }
  body.cm-page-kurser #injected-tailwind-content .mk-row.mk-nudge > * {
    animation: mk-nudge 1.3s cubic-bezier(0.45, 0, 0.25, 1) 1;
  }

  /* ---------------------------------------------------------------------
     5. "ER DET FOR DIG?" (dark) — normal title size, the four checks as
     body-size lines, even padding.
     --------------------------------------------------------------------- */
  body.cm-page-kurser #injected-tailwind-content .steps-section {
    padding: 72px var(--cm-m-gutter, 20px) !important;
    margin-top: 72px !important;
  }
  body.cm-page-kurser #injected-tailwind-content .steps-content {
    width: 100% !important;
    max-width: none !important;
    align-items: center !important;
  }
  body.cm-page-kurser #injected-tailwind-content .steps-title {
    margin: 0 0 32px !important;
  }
  body.cm-page-kurser #injected-tailwind-content .steps-title span {
    display: inline !important;
  }
  body.cm-page-kurser #injected-tailwind-content .steps-iify-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    width: 100% !important;
    max-width: 330px !important;
    margin: 0 auto 36px !important;
  }
  body.cm-page-kurser #injected-tailwind-content .steps-iify-item {
    display: flex !important;
    align-items: flex-start !important;
    gap: 14px !important;
  }
  body.cm-page-kurser #injected-tailwind-content .steps-iify-icon {
    flex: none !important;
    width: 22px !important;
    height: 22px !important;
    margin-top: 1px !important;
  }
  body.cm-page-kurser #injected-tailwind-content .steps-iify-icon svg {
    width: 22px !important;
    height: 22px !important;
  }
  body.cm-page-kurser #injected-tailwind-content .steps-iify-text {
    font-size: 16px !important;
    line-height: 1.5 !important;
  }
  body.cm-page-kurser #injected-tailwind-content .steps-section a.cm-iify-cta {
    height: 44px !important;
  }

  /* ---------------------------------------------------------------------
     6. "VÆLG MED KLARHED" — each course one compact row: icon, name with its
     two facts under it, arrow. Tapping opens the course pop-up as before.
     --------------------------------------------------------------------- */
  body.cm-page-kurser #injected-tailwind-content .choose-path-section {
    padding: 72px var(--cm-m-gutter, 20px) 0 !important;
  }
  body.cm-page-kurser #injected-tailwind-content .choose-path-container {
    width: 100% !important;
    max-width: none !important;
  }
  body.cm-page-kurser #injected-tailwind-content .cp-header {
    margin: 0 0 28px !important;
  }
  body.cm-page-kurser #injected-tailwind-content .cp-list {
    border-top: 1px solid rgba(74, 55, 48, 0.12);
  }
  body.cm-page-kurser #injected-tailwind-content .cp-row {
    display: grid !important;
    grid-template-columns: 30px 1fr 22px !important;
    grid-template-areas:
      "icon title arrow"
      "icon sub   arrow"
      "icon det   arrow" !important;
    column-gap: 16px !important;
    row-gap: 2px !important;
    align-items: center !important;
    padding: 18px 2px !important;
    margin: 0 !important;
    border-top: 0 !important;
    border-bottom: 1px solid rgba(74, 55, 48, 0.12) !important;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.25s ease;
  }
  body.cm-page-kurser #injected-tailwind-content .cp-row:active {
    background-color: rgba(192, 130, 118, 0.07);
  }
  body.cm-page-kurser #injected-tailwind-content .cp-icon {
    grid-area: icon;
    align-self: start !important;
    width: 28px !important;
    height: 28px !important;
    margin: 2px 0 0 !important;
  }
  body.cm-page-kurser #injected-tailwind-content .cp-title-col {
    grid-area: title;
    font-size: 19px !important;
    line-height: 1.3 !important;
    width: auto !important;
  }
  body.cm-page-kurser #injected-tailwind-content .cp-subtitle-col {
    grid-area: sub;
    font-size: 15px !important;
    line-height: 1.45 !important;
    width: auto !important;
    text-align: left !important;
  }
  body.cm-page-kurser #injected-tailwind-content .cp-details-col {
    grid-area: det;
    font-size: 13.5px !important;
    line-height: 1.45 !important;
    width: auto !important;
    color: var(--cm-muted, #8a7f78) !important;
  }
  body.cm-page-kurser #injected-tailwind-content .cp-divider-v {
    display: none !important;
  }
  body.cm-page-kurser #injected-tailwind-content .cp-arrow {
    grid-area: arrow;
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
  }

  /* ---------------------------------------------------------------------
     7. "NÆSTE SKRIDT" — even spacing, body-size text, button then the
     social proof under it.
     --------------------------------------------------------------------- */
  body.cm-page-kurser #injected-tailwind-content > section:last-child {
    padding: 0 var(--cm-m-gutter, 20px) !important;
  }
  body.cm-page-kurser #injected-tailwind-content > section:last-child > div[style] {
    margin-top: 72px !important;
  }
  body.cm-page-kurser #injected-tailwind-content > section:last-child h2 {
    margin: 0 0 18px !important;
  }
  body.cm-page-kurser #injected-tailwind-content > section:last-child p.font-light {
    font-size: 16px !important;
    line-height: 1.65 !important;
    margin: 0 0 30px !important;
  }
  body.cm-page-kurser #injected-tailwind-content > section:last-child .flex.flex-col {
    gap: 26px !important;
  }

  /* ---------------------------------------------------------------------
     8. GENTLE REVEALS — desktop's slow opacity groups are off here (some
     groups are a screen tall on the phone, so their top half stayed blank
     until the middle came up); instead each smaller piece fades up ~12px as
     it comes on screen (js adds .mk-rev / .mk-in). Only while js runs
     (html.mk-rev-on), never with reduced motion.
     --------------------------------------------------------------------- */
  html.cm-m body.cm-page-kurser.cm-reveal-armed #injected-tailwind-content .cm-reveal {
    opacity: 1 !important;
    transition: none !important;
  }
  html.mk-rev-on body.cm-page-kurser #injected-tailwind-content .mk-rev {
    transition: opacity 0.9s cubic-bezier(0.22, 0.61, 0.36, 1), translate 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) !important;
  }
  html.mk-rev-on body.cm-page-kurser #injected-tailwind-content .mk-rev.mk-rev:not(.mk-in) {
    opacity: 0 !important;
    translate: 0 12px;
  }
  html.mk-rev-on body.cm-page-kurser #injected-tailwind-content .mk-rev.mk-now {
    transition: none !important;
  }

  /* ---------------------------------------------------------------------
     9. COURSE POP-UP — a full-screen sheet: the photo at the top, the text
     scrolls up over it (fading out of the photo), the close button always
     in the top-right corner, nothing behind it scrolls.
     --------------------------------------------------------------------- */
  body.cm-page-kurser .cm-course-overlay {
    padding: 0 !important;
    align-items: stretch !important;
  }
  body.cm-page-kurser .cm-course-modal {
    display: block !important;
    width: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: translateY(24px) !important;
  }
  body.cm-page-kurser .cm-course-overlay.cm-course-open .cm-course-modal {
    transform: none !important;
  }
  body.cm-page-kurser .cm-course-img {
    position: absolute !important;
    top: 0;
    left: 0;
    right: 0;
    height: var(--mk-img-h) !important;
    min-height: 0 !important;
    background-size: cover !important;
    background-position: 50% var(--mk-face-y, 20%) !important;   /* per photo, js */
  }
  body.cm-page-kurser .cm-course-content {
    position: absolute !important;
    inset: 0;
    z-index: 1;
    padding: calc(var(--mk-img-h) + 12px) var(--cm-m-gutter, 20px) calc(40px + env(safe-area-inset-bottom, 0px)) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background:
      linear-gradient(to bottom,
        rgba(244, 241, 234, 0) 0,
        rgba(244, 241, 234, 0) calc(var(--mk-img-h) - 90px),
        var(--cm-bg, #f4f1ea) calc(var(--mk-img-h) + 2px)) local !important;
  }
  body.cm-page-kurser .cm-course-close {
    top: 10px !important;
    right: calc(var(--cm-m-gutter, 20px) - 4px) !important;
    width: 44px !important;
    height: 44px !important;
    font-size: 26px !important;
    background: rgba(251, 249, 247, 0.92) !important;
    box-shadow: 0 2px 10px rgba(23, 18, 16, 0.12);
  }
  body.cm-page-kurser .cm-course-title {
    font-size: 32px !important;
    line-height: 1.1 !important;
  }
  body.cm-page-kurser .cm-course-intro {
    font-size: 16px !important;
    line-height: 1.65 !important;
  }
  body.cm-page-kurser .cm-course-buyrow {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 20px !important;
  }
  body.cm-page-kurser .cm-course-ctas {
    flex-wrap: wrap !important;
    gap: 14px 24px !important;
  }
  body.cm-page-kurser .cm-course-ctas a.cm-course-apply-pill {
    height: 44px !important;
  }
  body.cm-page-kurser .cm-course-secondary {
    min-height: 44px;
  }
  /* one layer at a time: the menu button and the round book button step
     aside while the pop-up is open (the menu button covered its close) */
  body.cm-page-kurser:has(#cm-course-overlay.cm-course-open) :is(.cm-mbtn, .cm-book-dock) {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

/* Guard: the phone-only pieces never show above the phone width. */
@media (min-width: 810px) {
  body.cm-page-kurser .mk-dots {
    display: none !important;
  }
}
