/* Phone & tablet fixes for the study pages (studium-en, studium).
   (EN ids: requirements/degrees/universities, DE ids: voraussetzungen/abschluesse/hochschulen.)
   Loaded after assets/responsive.css; only active below 1100px. */

/* Glows: the shared "height: 380/420/480/520/560px → auto" rules also hit the
   empty .orb circles (height 0 = no glow). Keep them round and smaller. */
html.mzw-fluid .sc-host .orb { aspect-ratio: 1 / 1; height: auto !important; max-width: 420px; }
@media (max-width: 640px) {
  html.mzw-fluid .sc-host .orb { max-width: 300px; filter: blur(70px); }
}

/* Hero */
html.mzw-fluid .sc-host > div > section:nth-of-type(1) { padding-top: 116px !important; padding-bottom: 64px !important; }
html.mzw-fluid .sc-host > div > section:nth-of-type(1) > h1 { margin-top: 14px !important; }
html.mzw-fluid .sc-host > div > section:nth-of-type(1) > p { margin-top: 20px !important; }
html.mzw-fluid .sc-host > div > section:nth-of-type(1) > div[style*="gap: 16px"] {
  flex-wrap: wrap; justify-content: center; gap: 10px !important; margin-top: 32px !important;
}
html.mzw-fluid .sc-host > div > section:nth-of-type(1) > div[style*="gap: 16px"] > a {
  white-space: nowrap; padding: 13px 20px !important; font-size: 16px !important;
}
html.mzw-fluid .zk-herovid-veil {
  background: radial-gradient(ellipse 90% 60% at 50% 45%, rgba(251,250,248,.66), rgba(251,250,248,.42) 70%, rgba(251,250,248,.14)),
              linear-gradient(to bottom, rgba(251,250,248,0) 70%, #fbfaf8) !important;
}
html.mzw-fluid .zk-tag { display: none !important; } /* hover label would stick out sideways */

/* Requirements (dark card) */
html.mzw-fluid :is(#requirements, #voraussetzungen) { padding-top: 56px !important; padding-bottom: 56px !important; border-radius: 32px !important; }
html.mzw-fluid :is(#requirements, #voraussetzungen) > div[style*="margin-top: 56px"] { margin-top: 32px !important; }
html.mzw-fluid :is(#requirements, #voraussetzungen) .gd,
html.mzw-fluid #studienkolleg .zk-hov > .gd { padding: 24px !important; border-radius: 24px !important; }

/* Bachelor & Master */
html.mzw-fluid :is(#degrees, #abschluesse) { padding-top: 72px !important; }
html.mzw-fluid .zk-degs { grid-template-columns: minmax(0, 1fr); }
html.mzw-fluid .zk-deg { padding: 28px 20px !important; border-radius: 28px !important; }
html.mzw-fluid .zk-deg > div:first-child { flex-wrap: wrap; row-gap: 8px !important; }
html.mzw-fluid .zk-deg > div[style*="font-size: 34px"] { font-size: 27px !important; }
html.mzw-fluid .zk-req { padding: 12px 8px; gap: 14px; }
html.mzw-fluid .zk-tip { padding: 22px !important; }

/* Studienkolleg */
html.mzw-fluid #studienkolleg {
  margin-top: 72px !important; padding-top: 56px !important; padding-bottom: 56px !important;
  border-radius: 32px !important; gap: 44px !important;
}
html.mzw-fluid .zk-sk2 > .gd { padding: 26px 22px !important; border-radius: 26px !important; }
html.mzw-fluid .zk-sk2 [style*="font-size: 28px"] { font-size: 23px !important; }
html.mzw-fluid #studienkolleg [style*="font-size: 28px"] { font-size: 23px !important; }
html.mzw-fluid .zk-path { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 28px; }
html.mzw-fluid .zk-step:nth-child(4)::before { display: none; }
/* Course type buttons */
html.mzw-fluid #studienkolleg div[style*="grid-template-columns: repeat(5"] { gap: 12px !important; }
html.mzw-fluid .zk-course { padding: 20px; border-radius: 22px; }
html.mzw-fluid .zk-course-go { opacity: 1; transform: none; }
/* Studienkolleg directory rows */
html.mzw-fluid #studienkolleg div[style*="gap: 8px 16px"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px 12px !important; }
html.mzw-fluid .zk-skrow { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 8px; padding: 12px 14px; }
html.mzw-fluid .zk-skrow > div:last-child { flex-wrap: wrap; }

/* Public vs private */
html.mzw-fluid :is(#degrees, #abschluesse) ~ section:not([id]):not(:last-of-type) { padding-top: 72px !important; }
html.mzw-fluid .sc-host section .glass[style*="padding: 44px"] { padding: 28px 22px !important; border-radius: 28px !important; }
html.mzw-fluid .sc-host section .glass[style*="padding: 44px"] > div[style*="font-size: 32px"] { font-size: 25px !important; }

/* Universities directory */
html.mzw-fluid :is(#universities, #hochschulen) { padding-top: 72px !important; gap: 24px !important; }
html.mzw-fluid :is(#universities, #hochschulen) > div[style*="padding: 0 64px"],
html.mzw-fluid :is(#universities, #hochschulen) > div[style*="padding: 0px 64px"] { padding: 0 !important; gap: 20px !important; }
/* the vertical dividers between filter groups become line breaks */
html.mzw-fluid :is(#universities, #hochschulen) > .glass span[aria-hidden="true"][style*="width: 1px"] { flex-basis: 100%; width: 100% !important; height: 0 !important; margin: 0 !important; }
html.mzw-fluid :is(#universities, #hochschulen) > .glass { padding: 14px !important; border-radius: 26px !important; margin-top: 0 !important; }
html.mzw-fluid :is(#uni-search, #hs-suche) { min-width: 0; width: 100%; font-size: 16px !important; } /* 16px: no zoom-in on iOS */
html.mzw-fluid :is(#universities, #hochschulen) label:is([for="uni-search"], [for="hs-suche"]) { height: 52px !important; padding: 0 16px !important; font-size: 16px !important; }
html.mzw-fluid :is(#universities, #hochschulen) label[for="uni-state"] { max-width: 100%; box-sizing: border-box; }
html.mzw-fluid #uni-state { min-width: 0; max-width: 100%; font-size: 16px !important; }
html.mzw-fluid :is(#universities, #hochschulen) .face { padding: 24px; }
html.mzw-fluid :is(#universities, #hochschulen) .face.back { overflow-y: auto; overscroll-behavior: contain; }
html.mzw-fluid :is(#universities, #hochschulen) div[style*="padding-top: 24px"][style*="justify-content: center"] { flex-wrap: wrap; }

/* Call to action */
html.mzw-fluid :is(#universities, #hochschulen) + section {
  margin-top: 72px !important; padding-top: 56px !important; padding-bottom: 56px !important; border-radius: 32px !important;
}
html.mzw-fluid :is(#universities, #hochschulen) + section > div[style*="gap: 16px"] { flex-wrap: wrap; justify-content: center; }
html.mzw-fluid :is(#universities, #hochschulen) + section a { white-space: nowrap; }
html.mzw-fluid .sc-host footer { margin-top: 64px !important; }

/* Touch screens: no "lift & dim" hover states that stick after a tap */
@media (hover: none) {
  html.mzw-fluid .zk-hov > div:hover, html.mzw-fluid :is(#requirements, #voraussetzungen) > div:last-child > div:hover,
  html.mzw-fluid .zk-deg:hover, html.mzw-fluid .zk-req:hover, html.mzw-fluid .zk-tip:hover,
  html.mzw-fluid .zk-sk2 > div:hover, html.mzw-fluid .zk-course:hover, html.mzw-fluid .zk-skrow:hover { transform: none !important; }
  html.mzw-fluid .zk-hov:hover > div:not(:hover), html.mzw-fluid :is(#requirements, #voraussetzungen) > div:last-child:hover > div:not(:hover),
  html.mzw-fluid .zk-degs:hover .zk-deg:not(:hover) { opacity: 1; transform: none; }
}

/* --- Phones -------------------------------------------------------------- */
@media (max-width: 640px) {
  html.mzw-fluid .sc-host > div > section:nth-of-type(1) { padding-top: 104px !important; }
  html.mzw-fluid .sc-host > div > section:nth-of-type(1) > div[style*="gap: 16px"] > a { padding: 12px 16px !important; font-size: 15px !important; }

  /* Step path becomes a vertical timeline */
  html.mzw-fluid .zk-path { grid-template-columns: minmax(0, 1fr); row-gap: 18px; }
  html.mzw-fluid .zk-step {
    display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; row-gap: 2px;
    align-items: center; text-align: left; padding: 0;
  }
  html.mzw-fluid .zk-step .zk-dot { grid-row: 1 / span 2; }
  html.mzw-fluid .zk-step-t, html.mzw-fluid .zk-step-s { grid-column: 2; }
  html.mzw-fluid .zk-step::before { display: block; top: 44px; bottom: -18px; left: 21px; right: auto; width: 2px; height: auto; }
  html.mzw-fluid .zk-step:first-child::before { display: block; }
  html.mzw-fluid .zk-step:last-child::before { display: none; }

  /* Course buttons: letter beside the text */
  html.mzw-fluid .zk-course { display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 14px; row-gap: 6px; padding: 18px; }
  html.mzw-fluid .zk-course > * { grid-column: 2; }
  html.mzw-fluid .zk-course > .zk-letter { grid-column: 1; grid-row: 1 / span 4; font-size: 48px; }

  html.mzw-fluid #studienkolleg div[style*="gap: 8px 16px"] { grid-template-columns: minmax(0, 1fr) !important; }

  /* Filter panel: chips fill each row */
  html.mzw-fluid :is(#universities, #hochschulen) > .glass > div { gap: 6px !important; }
  html.mzw-fluid :is(#universities, #hochschulen) > .glass button {
    flex: 1 1 auto; height: 40px !important; padding: 0 9px !important; font-size: 14px !important; white-space: nowrap;
  }
  html.mzw-fluid :is(#universities, #hochschulen) label[for="uni-state"] { width: 100%; justify-content: space-between; white-space: nowrap; }
  html.mzw-fluid #uni-state { flex: 1 1 auto; text-align: right; }
  html.mzw-fluid :is(#universities, #hochschulen) .face { padding: 22px; }
  html.mzw-fluid :is(#universities, #hochschulen) .face span[style*="width: 110px"] { width: 96px !important; }
  html.mzw-fluid :is(#universities, #hochschulen) div[style*="padding-top: 24px"][style*="justify-content: center"] > button { flex: 1 1 auto; }
}
