/* ============================================================
   Jagiellońská akademie - web
   Faithful reproduction of supplied design (dizajn.jpg)
   Palette: navy #023A5D · red #AF0917 · cream #F6E9D9
            charcoal #1B1E23 · royal #1E63C9 · teal #1596A9
   ============================================================ */

/* ---------- Fonts ---------- */

@font-face {
  font-family: "Antykwa Torunska";
  src: url("../fonts/AntykwaTorunska-Bold.otf") format("opentype");
  font-weight: 700; font-style: normal; font-display: swap;
}

@font-face {
  font-family: "Antykwa Torunska";
  src: url("../fonts/AntykwaTorunska-Regular.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}
/* nevyuzite fonty
@font-face {
  font-family: "Antykwa Torunska";
  src: url("../fonts/AntykwaTorunska-Italic.otf") format("opentype");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Antykwa Torunska Light";
  src: url("../fonts/AntykwaTorunskaLight-Regular.otf") format("opentype");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Antykwa Torunska Med";
  src: url("../fonts/AntykwaTorunskaMed-Regular.otf") format("opentype");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Antykwa Torunska Cond";
  src: url("../fonts/AntykwaTorunskaCond-Bold.otf") format("opentype");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Adventures Unlimited Script";
  src: url("../fonts/AdventuresUnlimitedScript.woff2") format("woff2"),
       url("../fonts/AdventuresUnlimitedScript.woff") format("woff"),
       url("../fonts/AdventuresUnlimitedScript.otf") format("opentype"),
       url("../fonts/AdventuresUnlimitedScript.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
} */

/* ---------- Tokens ---------- */
:root {
  --navy:        #023a5d;
  --navy-deep:   #012a45;
  --navy-card2:  #0d4a72;   /* highlighted faq card */
  --red:         #af0917;
  --red-dark:    #8f0713;
  --cream:       #f6e9d9;
  --cream-soft:  #efe2cf;
  --charcoal:    #1b1e23;
  --charcoal-2:  #23282f;
  --royal:       #2a72c9;
  --royal-2:     #1a54a6;
  --teal:        #1596a9;
  --ink:         #1d2b38;
  --muted:       #5a6b78;

  --serif: "Inter", system-ui, sans-serif;
  --serif-light: "Inter", system-ui, sans-serif;
  --sans: "Inter", system-ui, sans-serif;
  --helv: "Inter", system-ui, sans-serif;
  --script: "Adventures Unlimited Script", "Sacramento", cursive;

  --wrap: 1200px;
  --radius: 14px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  font-size: 17px;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }

.refs__grid ul, ol { margin-left: 1.0em; list-style-type: disc; font-size: .92rem;     color: #46535d;     line-height: 1.55;}
.refs__grid li::before {/* content: "•"; color: #999;  display: inline-block; width: 1em;  margin-left: -1em; */ font-weight: bold;}
.refs__grid li::marker {   color: #c00; font-weight: bold; }
.refs__grid li {padding-bottom: 9px;  }

.wrap { width: min(var(--wrap), 92vw); margin-inline: auto; }

/* ============================================================
   HEADER
   ============================================================ */
.topbar {
  background: linear-gradient(180deg, #262b34 0%, #14171c 100%);
  color: #fff;
  position: sticky; top: 0; z-index: 100;
  min-height: 94px;
}
.topbar__inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 56px;
  padding: 0;
  height: 94px;
}
.brand {
  display: flex; align-items: center; justify-content: center; gap: 20px;
  text-align: center;
}
.brand__crest.brand__crest--wide {
  width: auto;
  height: 62px;
  margin: 0;
  filter: none;
}
.topbar__claim {
  display: block;
  width: 262px;
  height: auto;
}
.brand__crest { height: 82px; width: auto; margin: -8px 0; filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
.brand__word { line-height: 1.15; }
.brand__word--cz { text-align: right; }
.brand__word--en { text-align: left; }
.brand__name {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1.6vw, 1.55rem);
  font-weight: 400;
  letter-spacing: .01em;
  white-space: nowrap;
}
.brand__sub {
  display: block;
  font-family: var(--serif);
  font-size: 11px; color: #b9c0c8; letter-spacing: .01em; margin-top: 1px;
  white-space: nowrap;
}

/* mobile-only header elements (hidden on desktop) */
.brand-wide { display: none; }
.brand-wide img { height: 48px; width: auto; display: block; }
.hamburger { display: none; }

.topbar__tools { display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
.login-btn {
  display: inline-flex; align-items: center; gap: 9px;
  color: #fff; padding: 8px 16px;
  border: 1px solid rgba(255,255,255,.4); border-radius: 999px;
  font-size: 13px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  transition: background .2s, border-color .2s;
}
.login-btn:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.login-btn svg { width: 20px; height: 20px; flex: 0 0 auto; }
.login-btn__label { white-space: nowrap; }

/* narrow desktop: keep only the icon so the pill never collides with the brand */
@media (max-width: 1100px) {
  .login-btn { padding: 8px; border-radius: 50%; }
  .login-btn__label { display: none; }
}

/* ---------- Nav ---------- */
.nav {
  background: linear-gradient(180deg, #2c76cd 0%, #14509d 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 3px 10px rgba(0,0,0,.12);
  position: sticky; top: 94px; z-index: 99;
}
.nav__list {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 23.04px;
  width: min(1360px, 92vw);
  padding: 15px 0;
}
.nav__list a {
  color: #fff; font-size: 15px; font-weight: 400; letter-spacing: .01em;
  position: relative;
}
.nav__list > li > a {
  padding: 6px 12px; border-radius: 8px; transition: background .2s;
}
.nav__list > li > a:hover { background: rgba(255,255,255,.14); }
.nav__qahe {
  position: absolute;
  top: 50%; right: 18px;
  transform: translateY(-50%);
  display: block;
  line-height: 0;
}
.nav__qahe img { display: block; width: 53px; height: auto; }
.nav__caret {
  position: absolute; left: 50%; top: calc(100% + 3px);
  transform: translateX(-50%);
  font-size: 10px; line-height: 1; margin: 0; opacity: .9;
  transition: transform .25s;
}

/* ---------- Mega dropdown: Studijní Programy ---------- */
.nav__item--drop { position: static; }
.mega {
  position: absolute; left: 0; right: 0; top: 100%;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
  z-index: 120;
}
.nav__item--drop:hover .mega,
.nav__item--drop:focus-within .mega,
.nav__item--drop.is-open .mega {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav__item--drop:hover .nav__caret,
.nav__item--drop.is-open .nav__caret { transform: translateX(-50%) rotate(180deg); }

.mega__inner {
  background: #fffdf9;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 20px 44px rgba(2,42,62,.22);
  padding: 26px 30px 28px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px 44px;
}
.mega__col { display: flex; flex-direction: column; }
.mega__group {
  font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--red); padding: 0 8px 10px; margin-bottom: 4px;
  border-bottom: 1px solid rgba(2,42,62,.1);
}
.mega__item {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 8px; border-radius: 10px;
  transition: background .2s;
}
.mega__item::after { display: none; }
.mega__item:hover { background: var(--cream); }
/* programs without their own subpage yet: not clickable, no hover feedback */
.mega__item:not([href]) { pointer-events: none; }
.mega__abbr {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  min-width: 54px; height: 42px; padding: 0 8px;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff; font-weight: 700; font-size: .95rem; letter-spacing: .01em;
  border-radius: 9px; box-shadow: 0 4px 10px rgba(2,42,62,.28);
  transition: background .2s, transform .2s;
}
.mega__item:hover .mega__abbr { background: linear-gradient(160deg, var(--red) 0%, var(--red-dark) 100%); transform: translateY(-1px); }
.mega__text { display: flex; flex-direction: column; line-height: 1.25; }
.mega__text b { color: var(--navy); font-weight: 700; font-size: .98rem; }
.mega__text em { color: #6a7681; font-style: normal; font-size: .8rem; margin-top: 3px; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  background: #34412c;
  min-height: 392px;
}
.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.hero::after {
  content: ""; position: absolute; z-index: 1; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.15), transparent 40%);
  pointer-events: none;
}

/* ---------- Program cards ---------- */
.programs {
  background: var(--cream);
  padding-bottom: 40px;
}
.programs__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: start;         /* let each card keep its aspect-ratio height */
  gap: 26px;
  margin-top: -70px;          /* ~19% of the card overlaps the hero (max 20%) */
  position: relative; z-index: 5;
}

/* Tieň nesie obal, nie mriežka a nie samotná karta.
   Na karte nemôže byť: mask + drop-shadow na jednom prvku WebKit rasterizuje zvlášť
   a tieň počíta z okraja s čiastočnou priehľadnosťou (po siluete presvitá pozadie).
   Na mriežke tiež nie: filter cez celú mriežku je na mobile jeden buffer vysoký cez
   všetky karty, ktorý iOS Safari dlaždicuje, a na švoch aj na hranici .wrap vznikajú
   viditeľné hrany v pozadí. Obal je malý a padding dáva tieňu priestor v regióne;
   negatívny margin ten padding vracia z layoutu, takže mriežka ostáva nezmenená. */
.pcard-fx {
  padding: 6px 12px 20px;
  margin: -6px -12px -20px;
  filter: drop-shadow(0 6px 10px rgba(1,25,45,.38));
}
.programs__grid--doctoral {
  grid-template-columns: repeat(3, 1fr);
  width: min(900px, 92vw);
  margin-inline: auto;
  margin-top: 34px;
}

.pcard {
  position: relative;
  aspect-ratio: 326.69 / 440.11;   /* exact vector ratio */
  contain: size;                   /* height comes ONLY from ratio → all cards identical, never distorted */
  overflow: hidden;
  background: linear-gradient(165deg, #06456c 0%, var(--navy) 55%, var(--navy-deep) 100%);
  color: #fff;
  font-family: var(--helv);
  padding: 20px 20px 0 20px;
  -webkit-mask: var(--frame-portrait) center / 100% 100% no-repeat;
          mask: var(--frame-portrait) center / 100% 100% no-repeat;
  display: flex; flex-direction: column;
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
/* len na zariadeniach so skutočným kurzorom: na dotyku by hover po ťuknutí
   ostal visieť a karta by zostala nadvihnutá */
@media (hover: hover) {
  .pcard:hover {
    transform: translateY(-8px);
  }
}

/* diagonal ribbon */
.pcard__ribbon {
  position: absolute; top: 15px; left: -85px;
  width: 300px;
  transform: rotate(-20deg);
  background: var(--red);
  color: #fff; font-family: var(--helv);
  font-size: 9.5px; font-weight: 400; letter-spacing: .01em;
  padding: 4px 0; text-align: center; white-space: nowrap;
  box-shadow: 0 2px 5px rgba(0,0,0,.22);
}
.pcard__abbr {
  font-family: "Antykwa Torunska Cond", Georgia, serif; font-weight: 700;
  font-size: clamp(2.6rem, 3.9vw, 3.3rem); line-height: 1;
  text-align: center; letter-spacing: .01em; margin-top: 2px;
}
.pcard__full {
  text-align: center; font-size: 10px; font-weight: 400;
  line-height: 1.22; margin-top: 4px; color: #eaf1f7;
}
.pcard__rule { height: 1px; background: rgba(255,255,255,.34); margin: 10px 8px; }
.pcard__count { text-align: center; font-weight: 700; font-size: 1rem; margin-bottom: 8px; }
.pcard__body {
  text-align: center; font-size: .84rem; line-height: 1.4; color: #d7e2ec;
  flex: 1;
}
/* compact run of exact study-field names inside the barrel card */
.pcard__fields { font-size: .64rem; line-height: 1.3; }
/* dense card (MBA lists all 9 fields): tighter spacing so it fits the fixed barrel shape */
.pcard--dense .pcard__rule { margin: 6px 8px; }
.pcard--dense .pcard__fields { font-size: .6rem; line-height: 1.25; }
.pcard--dense .pcard__count { margin-bottom: 4px; }
.pcard--dense .pcard__price { margin: 6px 0; }
.pcard__price {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 12px 0 12px;
}
.pcard__price small { font-size: .8rem; color: #b9c9d6; line-height: 1.2; }
.pcard__price b { font-size: 1rem; font-weight: 700; white-space: nowrap; }
.pcard__cta {
  margin: 0 -26px; background: var(--red); color: #fff;
  text-align: center; font-size: 1.15rem; padding: 15px; font-weight: 600;
  transition: background .2s;
}
.pcard__cta:hover { background: var(--red-dark); }

/* ============================================================
   INTRO
   ============================================================ */
.intro { padding: 40px 0 20px; }
.intro__lead {
  font-family: var(--sans);
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  font-weight: 700; color: var(--navy);
  line-height: 1.45; max-width: 100%; margin: 0 0 22px;
}
.intro__body { font-size: 1.08rem; color: #37454f; max-width: 100%; }

/* ============================================================
   FAQ carousel
   ============================================================ */
.faq { padding: 44px 0 30px; }
.faq__slider {
  position: relative;
  width: 100%;
}
.faq__track {
  display: flex; gap: 26px;
  padding: 40px calc((100% - clamp(260px, 27vw, 340px)) / 2) 64px;
  overflow-x: auto;
  scrollbar-width: none;
  /* tieň musí byť na tracku: mask na .faqcard by drop-shadow na karte orezal;
     vertikálny padding tracku dáva tieňu priestor, takže ho overflow nezreže */
  filter: drop-shadow(0 5px 9px rgba(1,25,45,.35));
}
.faq--slider .faq__track { cursor: grab; }
.faq__track.is-dragging { cursor: grabbing; scroll-behavior: auto; user-select: none; }
.faq__track.is-dragging .faqcard { pointer-events: none; }
.faq__track::-webkit-scrollbar { display: none; }

/* nav arrows */
.faq__nav { display: none; }   /* slider arrows removed - advance via in-card arrow, dots, swipe */
.faq__nav svg { width: 24px; height: 24px; }
.faq__nav:hover { background: var(--navy); color: #fff; }
.faq__nav:active { transform: translateY(-50%) scale(.94); }
.faq__nav:disabled { opacity: .35; pointer-events: none; }
.faq__nav--prev { left: clamp(12px, 3vw, 48px); }
.faq__nav--next { right: clamp(12px, 3vw, 48px); }

/* static mode - all cards fit, no slider chrome */
.faq--static .faq__nav,
.faq--static .faq__dots { display: none; }
.faq--static .faq__track {
  overflow: visible;
  justify-content: center;
  padding-left: 20px; padding-right: 20px;
}

/* dots */
.faq__dots {
  display: flex; justify-content: center; gap: 10px; margin-top: 8px;
}
.faq__dots button {
  width: 10px; height: 10px; border-radius: 50%; padding: 0;
  border: 0; background: rgba(2,42,62,.25); cursor: pointer;
  transition: background .2s, transform .2s;
}
.faq__dots button.is-active { background: var(--navy); transform: scale(1.25); }
/* barrel ("sud") silhouette - exact shapes from supplied Illustrator vectors.
   preserveAspectRatio=none inside each SVG lets it stretch to any card size. */
:root {
  --frame-portrait: url("../img/frame-portrait.svg");   /* MBA / program cards (tall) */
  --frame-landscape: url("../img/frame-landscape.svg"); /* FAQ bubbles (wide) */
  --frame-portrait-border: url("../img/frame-portrait-border.svg");
  --frame-landscape-border: url("../img/frame-landscape-border.svg");
}
.faqcard {
  flex: 0 0 clamp(320px, 40vw, 440px);
  background: linear-gradient(160deg, #063f63, var(--navy-deep));
  color: #eaf1f7;
  font-family: var(--helv);
  position: relative;
  aspect-ratio: 440.11 / 326.69;   /* landscape vector ratio (ramik-dole) */
  contain: size;                   /* height only from ratio → identical, never distorted */
  overflow: hidden;
  padding: 34px 40px 30px;
  display: flex; flex-direction: column; justify-content: center;
  -webkit-mask: var(--frame-landscape) center / 100% 100% no-repeat;
          mask: var(--frame-landscape) center / 100% 100% no-repeat;
  transition: transform .4s, background .4s;
}
.faqcard--active {
  background: linear-gradient(160deg, #1a6aa0, #0d4a72);
  transform: scale(1.06);
}
.faqcard h3 {
  font-size: 1.28rem; font-weight: 700; color: #fff; margin: 0 0 14px; line-height: 1.25;
}
.faqcard p { font-size: .95rem; line-height: 1.5; color: #cddae5; flex: 1; margin: 0; }
.faqcard__arrow {
  align-self: flex-end; margin-top: 14px;
  width: 42px; height: 42px;
  border: 0; background: none; border-radius: 0; padding: 0;
  display: grid; place-items: center; color: #fff;
  box-shadow: none;
  transition: transform .2s;
}
.faqcard__arrow:hover { transform: translateX(5px); }
.faqcard__arrow svg { width: 34px; height: 34px; }

/* ============================================================
   STATEMENT
   ============================================================ */
.statement { padding: 40px 0 60px; }
.statement p {
  font-family: var(--sans);
  font-weight: 700; color: var(--navy);
  font-size: clamp(1.4rem, 2.6vw, 2.15rem);
  line-height: 1.4; text-align: center;
  max-width: 100%; margin: 0 auto;
}

/* ============================================================
   REFERENCES
   ============================================================ */
.refs { padding: 30px 0 70px; }
.section-head { text-align: center; margin-bottom: 12px; }
.section-head h2 {
  font-family: var(--sans); font-weight: 700; color: var(--navy);
  font-size: clamp(1.8rem, 3.2vw, 2.6rem); margin: 0;
}
.section-head p { color: #55636e; font-size: 1.1rem; margin: 6px 0 0; }
.refs__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 34px;
  margin-top: 46px;
}
.ref__title { font-weight: 700; color: var(--navy); font-size: 1.06rem; margin: 0 0 4px; }
.ref__author { color: var(--red); font-size: .85rem; font-weight: 600; margin: 0 0 12px; letter-spacing: .02em; }
.ref__text { font-size: .92rem; color: #46535d; line-height: 1.55; margin: 0; }

/* Carousel scroll-indicator dots (visible only on mobile carousels) */
.cdots { display: none; }

/* ============================================================
   GUARANTORS
   ============================================================ */
.guar { padding: 20px 0 80px; }
.guar__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 50px; }
.guar__card { text-align: center; }
.guar__photo {
  position: relative; height: 320px; display: flex; align-items: flex-end; justify-content: center;
}
.guar__photo img { height: 100%; width: auto; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(2,42,62,.25)); }
.guar__arc { width: 78%; height: 46px; margin: -6px auto 0; }
.guar__name { font-weight: 700; color: var(--navy); font-size: 1.18rem; margin: 14px 0 12px; line-height: 1.3; }
.guar__bio { font-size: .92rem; color: #46535d; line-height: 1.55; text-align: left; }

/* ============================================================
   SOCIAL
   ============================================================ */
.social { padding: 20px 0 70px; text-align: center; }
.social__icons { display: flex; justify-content: center; gap: 26px; margin-top: 30px; }
.social__icons a {
  width: 58px; height: 58px; border-radius: 50%; background: var(--charcoal);
  display: grid; place-items: center; color: #fff; transition: transform .2s, background .2s;
}
.social__icons a:hover { transform: translateY(-4px); background: var(--navy); }
.social__icons svg { width: 28px; height: 28px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: linear-gradient(180deg, var(--charcoal) 0%, #14171c 100%);
  color: #d7dce2; padding: 66px 0 40px;
}
.footer__grid {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 50px; align-items: start;
}
.footer h4 {
  font-weight: 700; color: #fff; font-size: 1.35rem; margin: 0 0 26px; text-align: center;
}
.footer__links { display: flex; flex-direction: column; gap: 20px; text-align: center; }
.footer__links a { color: #cfd5db; font-size: 13px; transition: color .2s; }
.footer__links a:hover { color: #fff; }
.footer__block + .footer__block { margin-top: 46px; }
.footer__seal { display: grid; place-items: center; }
.footer__seal img { width: min(300px, 30vw); opacity: .96; }
.footer__copy {
  text-align: center; margin-top: 54px; font-size: .86rem; color: #8b939c; line-height: 1.6;
}

/* ============================================================
   Reveal animation
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .pcard:hover, .faqcard--active { transform: none; }
}

/* ============================================================
   Responsive
   ============================================================ */
/* ---- Tablet ≤1000px ---- */
@media (max-width: 1000px) {
  .topbar { position: static; }
  .nav { position: static; top: 0; }
  .nav__list { gap: 18px 26px; }

  .programs__grid { grid-template-columns: repeat(2, 1fr); margin-top: -90px; }
  .programs__grid--doctoral { grid-template-columns: repeat(2, 1fr); width: min(700px, 92vw); margin-top: 30px; }

  .refs__grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
  .guar__grid { grid-template-columns: 1fr; max-width: 440px; margin-inline: auto; }

  .footer__grid { grid-template-columns: 1fr; gap: 34px; }
  .footer__seal { order: -1; margin-bottom: 8px; }

}

/* ---- Header collapse ≤900px (full wordmarks no longer fit) ---- */
@media (max-width: 900px) {
  .topbar__inner { grid-template-columns: 1fr auto auto; gap: 14px; }
  .brand { grid-column: 1; justify-content: flex-start; }
  .brand__word { display: none; }
  .brand__crest--wide { width: 220px; }
  .topbar__claim { grid-column: 2; width: min(270px, 34vw); }
  .topbar__tools { grid-column: 3; }
}

/* ---- Large phone ≤760px ---- */
@media (max-width: 760px) {
  .faqcard { flex-basis: min(86vw, 460px); padding: 30px 32px 26px; }
  .refs__grid { gap: 26px; }
}

/* ---- Phone ≤620px ---- */
@media (max-width: 620px) {
  body { font-size: 16px; }

  /* mobile header: wide logo + hamburger, blue menu bar hidden */
  .topbar__inner { grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
  .brand, .topbar__claim, .topbar__tools { display: none; }
  .brand-wide { display: block; }
  .brand-wide img { height: 64px; }
  .hamburger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 46px; height: 46px; padding: 9px; background: none; border: 0; cursor: pointer;
  }
  .hamburger span {
    display: block; height: 3px; width: 100%; background: #fff; border-radius: 2px;
    transition: transform .3s, opacity .2s;
  }
  .hamburger.is-active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .hamburger.is-active span:nth-child(2) { opacity: 0; }
  .hamburger.is-active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .nav { display: none; }
  .nav__qahe { display: none; }
  .nav.is-open { display: block; }
  .nav.is-open .nav__list {
    flex-direction: column; align-items: stretch; gap: 0; padding: 6px 0;
  }
  .nav.is-open .nav__list a { display: block; padding: 13px 24px; font-size: 16px; }
  .nav.is-open .nav__list a::after { display: none; }

  /* Caret sits inline beside the label in the mobile accordion */
  .nav__caret { position: static; transform: none; margin-left: 6px; font-size: 12px; }
  .nav__item--drop.is-open .nav__caret { transform: rotate(180deg); }

  /* Mega dropdown as inline accordion on mobile */
  .mega {
    position: static; opacity: 1; visibility: visible; transform: none;
    display: grid; grid-template-rows: 0fr;
    transition: grid-template-rows .28s ease;
  }
  .nav__item--drop.is-open .mega { grid-template-rows: 1fr; }
  .mega__inner {
    overflow: hidden; min-height: 0;
    margin: 0; border-radius: 0; border-top: 0;
    box-shadow: none; background: rgba(0,0,0,.14);
    grid-template-columns: 1fr; gap: 4px 0;
    /* no vertical padding: it would leak as a bar while collapsed */
    padding: 0 14px;
  }
  .mega__col:last-child { padding-bottom: 14px; }
  .mega__group { color: #cfe0f6; padding: 12px 6px 8px; border-bottom-color: rgba(255,255,255,.18); }
  /* keep the badge beside the name (override the generic mobile nav link rule) */
  .nav.is-open .nav__list .mega__item {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 6px; font-size: inherit;
  }
  .mega__item:hover { background: rgba(255,255,255,.08); }
  .mega__abbr { min-width: 48px; height: 38px; font-size: .9rem; }
  .mega__text b { color: #fff; font-size: .95rem; }
  .mega__text em { color: #b9cbe4; }

  .hero { min-height: 280px; }

  .programs__grid,
  .programs__grid--doctoral { grid-template-columns: 1fr; width: auto; }
  .programs__grid { margin-top: -60px; }
  .programs__grid--doctoral { margin-top: 20px; }
  .pcard { width: 100%; max-width: 360px; margin-inline: auto; }

  .intro { padding: 30px 0 10px; }

  /* Reference + Garanti as swipeable carousels on mobile */
  .refs__grid, .guar__grid {
    display: flex;
    grid-template-columns: none;
    max-width: none;
    margin-top: 34px;
    margin-inline: 0;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 16px;
    scrollbar-width: none;
  }
  .refs__grid::-webkit-scrollbar,
  .guar__grid::-webkit-scrollbar { display: none; }

  .refs__grid > .ref,
  .guar__grid > .guar__card {
    flex: 0 0 85%;
    scroll-snap-align: center;
  }

  .cdots {
    display: flex; justify-content: center; gap: 8px;
    margin-top: 4px;
  }
  .cdot {
    width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%;
    background: rgba(2,42,62,.22); cursor: pointer;
    transition: background .2s, transform .2s, width .2s;
  }
  .cdot.is-active { background: var(--red); width: 22px; border-radius: 5px; }
  .guar .cdots { margin-top: 18px; }

  .faqcard { padding: 24px 26px 22px; }
  .faqcard h3 { font-size: 1.12rem; margin-bottom: 10px; }
  .faqcard p { font-size: .88rem; line-height: 1.45; }
  .faq__nav { width: 44px; height: 44px; }


  .social__icons a { width: 50px; height: 50px; }
  .social__icons svg { width: 24px; height: 24px; }

  .footer { padding: 48px 0 32px; }
  .footer h4 { font-size: 1.2rem; margin-bottom: 20px; }
  .footer__block + .footer__block { margin-top: 34px; }
}

/* ---- Small phone ≤400px ---- */
@media (max-width: 400px) {
  .faqcard { flex-basis: 90vw; }
  .nav__list { gap: 10px 14px; }
  .brand__crest { height: 52px; margin: -4px 0; }
}

/* ============================================================
   PÄTIČKA - dizajn podľa study-mpa.cz
   Vlastný menný priestor .sfoot*, nezasahuje do starých .footer* pravidiel.
   ============================================================ */
.sfoot {
  background: #191d23;
  color: #c3c9d0;
  font-family: var(--sans);
  padding: 64px 0 46px;
}
.sfoot a { color: inherit; text-decoration: none; transition: color .2s; }
.sfoot a:hover { color: #fff; }
.sfoot__brand { display: inline-block; }
.sfoot__brand img { width: auto; height: 134px; display: block; }
.sfoot__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 60px;
  margin-top: 34px;
}
.sfoot__head {
  margin: 0 0 20px;
  font-family: var(--sans);
  font-size: 16px; font-weight: 700; color: #fff; line-height: 1.3;
}
.sfoot__head--gap { margin-top: 34px; }
.sfoot__links { display: flex; flex-direction: column; gap: 6px; }
.sfoot__links a { font-size: 15px; line-height: 1.45; }
.sfoot__tagline { margin: 0 0 26px; font-size: 13px; line-height: 1.55; color: #aeb5bd; }
.sfoot__label { margin: 0 0 4px; font-size: 15px; font-weight: 700; color: #fff; }
.sfoot__label--gap { margin-top: 26px; }
.sfoot__value { margin: 0 0 20px; font-size: 15px; line-height: 1.45; }
.sfoot__value--qahe { line-height: 1.5; }
.sfoot__value--qahe a { text-decoration: underline; }
.sfoot__social { display: flex; gap: 14px; margin-top: 4px; }
.sfoot__social a {
  width: 26px; height: 26px; display: grid; place-items: center; color: #fff;
  transition: opacity .2s, transform .2s;
}
.sfoot__social a:hover { opacity: .7; transform: translateY(-2px); }
.sfoot__social svg { width: 26px; height: 26px; }
.sfoot__bottom {
  display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: end;
  margin-top: 58px;
}
.sfoot__copy { margin: 0 0 6px; font-size: 12.5px; line-height: 1.6; color: #8f969e; }
.sfoot__links-inline { margin: 0; font-size: 12.5px; line-height: 1.6; }
.sfoot__links-inline a { color: #d6dade; text-decoration: underline; }
.sfoot__links-inline span { margin: 0 6px; color: #6c737b; }
.sfoot__cc { display: block; text-align: right; }
.sfoot__cc img { display: inline-block; width: 86px; height: 28px; }
.sfoot__cc span {
  display: block; margin-top: 6px; max-width: 330px; margin-left: auto;
  font-size: 11.5px; line-height: 1.5; color: #8f969e;
}

@media (max-width: 1000px) {
  .sfoot__grid { grid-template-columns: 1fr 1fr; gap: 44px; }
  .sfoot__grid .sfoot__col:first-child { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .sfoot { padding: 48px 0 36px; }
  .sfoot__brand img { height: 108px; }
  .sfoot__grid { grid-template-columns: 1fr; gap: 34px; margin-top: 28px; }
  .sfoot__grid .sfoot__col:first-child { grid-column: auto; }
  .sfoot__bottom { grid-template-columns: 1fr; margin-top: 46px; align-items: start; }
  .sfoot__cc { text-align: left; }
  .sfoot__cc span { margin-left: 0; }
}

/* ---------- Reference: tlačidlo + podstránka so všetkými ---------- */
.refs__more { text-align: center; margin-top: 44px; }
.refs__more-btn {
  display: inline-block;
  background: var(--red); color: #fff;
  padding: 14px 38px; border-radius: 999px;
  font-size: 1.05rem; font-weight: 600; letter-spacing: .02em;
  transition: background .2s, transform .2s;
}
.refs__more-btn:hover { background: var(--red-dark); transform: translateY(-2px); }

.refs--all { padding-top: 50px; }
.refs--all .refs__grid { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 900px) {
  .refs--all .refs__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  /* podstránka so všetkými referenciami: bežný zoznam, nie karusel */
  .refs--all .refs__grid {
    display: grid; grid-template-columns: 1fr;
    overflow-x: visible; scroll-snap-type: none; gap: 26px;
  }
  .refs--all .refs__grid > .ref { flex: none; }
}

/* ---------- Garanti: podstránka so všetkými ---------- */
.guar--all { padding-top: 50px; }

@media (max-width: 620px) {
  /* podstránka garantov: bežný zoznam, nie karusel */
  .guar--all .guar__grid {
    display: grid; grid-template-columns: 1fr;
    overflow-x: visible; scroll-snap-type: none; gap: 30px;
  }
  .guar--all .guar__grid > .guar__card { flex: none; }
}


/* ============================================================
   HLAVNÝ WEB - zjednotenie s mikrowebmi

   Hlavička (logo, claim, tlačidlo, odznak QAHE) tu už bola, chýbali
   opravy, ktoré na mikrowebov pribudli neskôr: zastropovaná medzera
   v menu, rezerva na odznak a polohovanie pre rozbaľovacie menu.
   ============================================================ */

/* Medzera v menu nesmie rásť so šírkou okna - inak širšie okno menu
   zalomí do dvoch riadkov. Tretia hodnota v `width` drží vycentrovaný
   riadok tak úzko, aby na odznak QAHE vždy zostalo miesto po oboch
   stranách a nemohol prekryť poslednú položku. */
.nav__list {
  gap: 10px clamp(12px, 1.2vw, 24px);
}
@media (min-width: 1001px) {
  .nav__list { width: min(1360px, 94vw); }
}
@media (min-width: 1151px) {
  .nav__list { width: min(1360px, 94vw, 100vw - 176px); }
}
@media (max-width: 1400px) {
  .nav__list a { font-size: 14px; }
}

/* Odznak QAHE je `position: absolute`, takže potrebuje polohovaného
   rodiča. Pod 1151 px sa skrýva - inak by na úzkych displejoch bral
   miesto odkazom. */
@media (max-width: 1150px) {
  .nav__qahe { display: none; }
}

/* `.mega` je `position: absolute`, ale medzi 620 a 1000 px šablóna
   prepínala `.nav` na `static` - rozbaľovacie menu sa potom otváralo
   voči celej stránke, nie pod modrým pásom. */
@media (max-width: 1000px) {
  .nav { position: relative; }
}

/* ------------------------------------------------------------
   REFERENCIE ROZDELENÉ PODĽA PROGRAMU
   Kvôli kotvám z mikrowebov (`reference.html#mba` a spol.).
   ------------------------------------------------------------ */
.refs__group + .refs__group { margin-top: 54px; }
.refs__group-head {
  font-family: var(--sans);
  font-weight: 800;
  color: var(--navy);
  font-size: 1.25rem;
  letter-spacing: .01em;
  margin: 0 0 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(2, 58, 93, .16);
}



/* ============================================================
   KOTVY POD PRILEPENOU HLAVIČKOU

   Hlavička (94 px) aj modré menu (57 px) sú `position: sticky`, takže
   pri skoku na kotvu prekryli vrch cieľovej sekcie - návštevník pristál
   uprostred textu. `scroll-margin-top` prehliadaču povie, koľko miesta
   má nad cieľom nechať. Nemení rozloženie, prejaví sa len pri scrollovaní.

   Pod 1000 px sa oba pásy scrollujú preč (`position: static`), takže tam
   nič neprekrýva a stačí malý odstup od hornej hrany okna.
   ============================================================ */
:root { --anchor-offset: 12px; }

@media (min-width: 1001px) {
  :root { --anchor-offset: 170px; }
}

/* Len skutočné ciele kotiev - nie tlačidlá a nie `nav`. */
section[id],
article[id],
footer[id],
div[id] {
  scroll-margin-top: var(--anchor-offset);
}

/* ------------------------------------------------------------
   CIEĽ KOTVY NESMIE BYŤ ROZANIMOVANÝ

   Bloky s triedou `.reveal` sú pred zobrazením posunuté o 28 px nadol
   (`transform: translateY(28px)`). Prehliadač scrolluje na tú posunutú
   pozíciu a až potom sa blok vysunie hore - cieľ tak skončil o 28 px
   vyššie, než mal, a znova sa schoval pod menu.

   `:target` sa nastaví ešte pred scrollovaním, takže stačí animáciu na
   cieli (a na jeho obale, ak `.reveal` nesie ten) vypnúť. Overené na
   kartách garantov, kde bola odchýlka presne tých 28 px.
   ------------------------------------------------------------ */
:target,
:target .reveal,
.reveal:has(:target) {
  opacity: 1;
  transform: none;
  transition: none;
}

/* Odstup pre kotvy sa dopočíta z nameranej výšky prilepených pásov.
   Vloží sa ako inline <script> na koniec stránky (pozri `anchors.SCRIPT`). */

/* ------------------------------------------------------------
   UZKE PODMENU (Výzkum)
   Jeden sloupec, zarovnaný pod svou položkou místo přes celou šířku.
   Jen nad 620 px - na mobilu zůstává akordeon beze změny.
   ------------------------------------------------------------ */
@media (min-width: 621px) {
  .nav__item--narrow { position: relative; }
  .nav__item--narrow .mega {
    left: 50%; right: auto;
    top: calc(100% + 15px);            /* pod spodní hranu modrého pásu */
    width: max-content; min-width: 260px; max-width: 92vw;
    transform: translate(-50%, 10px);
  }
  .nav__item--narrow:hover .mega,
  .nav__item--narrow:focus-within .mega,
  .nav__item--narrow.is-open .mega { transform: translate(-50%, 0); }
  /* neviditelný můstek přes mezeru, aby se při přejezdu myší menu nezavřelo */
  .nav__item--narrow .mega::before {
    content: ""; position: absolute; left: 0; right: 0; top: -15px; height: 15px;
  }
  .nav__item--narrow .mega__inner {
    width: auto; margin: 0;
    grid-template-columns: 1fr;
    padding: 18px 16px 20px;
  }
}

/* Druhá skupina ve stejném sloupci (Rekvalifikační kurzy) - odsazení od předchozí */
.mega__group--next { margin-top: 14px; }
