/* ===========================
   STARTUJEME PŘEDŠKOLÁKY – PROGRAM (standalone)
   Vizuál sjednocený s homepage / emoce / dashboard
   =========================== */

/* --- Fonty --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;800&display=swap');

@font-face {
  font-family: 'Gagalin';
  src: url('/static/fonts/Gagalin-Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

/* --- Proměnné --- */
:root{
  --primary: #ff762f;
  --primary-strong: #ff5a00;
  --blue: #004a99;
  --blue-light: #005cc2;
  --text: #ffffff;
  --muted: #8aa0b2;
  --ok: #78de20;

  --bg-tint: rgba(19,30,41,0.10);
  --shadow: rgba(0,0,0,0.20);
  --shadow-strong: rgba(255,118,47,0.30);

  --radius: 16px;
}

/* --- Základ --- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body{
  margin: 0;
  font-family: 'Poppins', sans-serif;
  color: var(--text);

  background-image: url('/static/images/background.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
}

.container{ width: min(1200px, 92vw); margin: 24px auto; }

/* --- Typografie --- */
h1, h2, h3 {
  font-family: 'Gagalin', sans-serif;
  font-weight: normal;
  letter-spacing: .5px;
  margin: 0 0 10px 0;
  text-shadow: 1px 1px 2px rgba(0,30,60,0.5);
}
h1 { color: var(--primary); font-size: clamp(2rem, 3.5vw, 3rem); }
h2 { color: #ffd5bf; font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { color: #ffd5bf; font-size: clamp(1.3rem, 2.4vw, 1.7rem); }

h4 { margin: 0 0 .4rem 0; color: var(--primary); }
p { margin: .4rem 0 1rem 0; line-height: 1.7; text-shadow: 1px 1px 2px rgba(0,30,60,0.25); }
.muted { color: var(--muted); }
.ok { color: var(--ok); }

a { color: var(--blue); text-decoration: none; transition: color .25s ease; }
a:hover { color: var(--primary-strong); }

/* --- Header --- */
.site-header { padding-top: 8px; padding-bottom: 0; }
.page-title { margin-bottom: 4px; }
.page-subtitle { margin-top: 0; color: rgba(255,255,255,0.9); }

/* --- Layout --- */
.layout{
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
}

/* --- Karty / panely --- */
.card{
  background: rgba(0,50,100,0.5);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px var(--shadow);
  padding: 14px;
}
.card:hover{
  box-shadow: 0 6px 20px var(--shadow-strong);
}

.panel.card { padding: 16px; }

/* --- Intro & sekce --- */
.intro p:last-child { margin-bottom: 0; }

.topics, .questionnaire, .bundles { margin-top: 16px; }

/* --- Mřížka karet --- */
.cards-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

/* Téma karta */
.topic{
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  cursor: default;
}
.topic:hover{
  transform: translateY(-2px);
  border-color: var(--primary-strong);
}

/* Dotazník karta */
.questionnaire .btn { margin-top: 8px; }

/* --- Bundle karty --- */
.bundle{
  position: relative;
  padding-top: 40px; /* prostor na badge */
}
.badge{
  position: absolute;
  top: 10px; left: 10px;
  border: 2px solid var(--primary);
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 700;
  background: rgba(255,118,47,0.15);
  color: var(--text);
}
.features{
  list-style: none; padding: 0; margin: 8px 0 12px 0;
}
.features li{ margin: 6px 0; }
.price{
  font-weight: 800; font-size: 1.4rem; margin-bottom: 10px;
}

/* --- Sidebar --- */
.sidebar { display: flex; flex-direction: column; gap: 16px; }

/* Auth form */
.auth-form { display: block; }
.auth-form label{
  display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px;
}
.auth-form input{
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  outline: none;
}
.auth-form input:focus{
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,118,47,0.25);
}

.or{
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 8px; margin: 12px 0;
}
.or::before, .or::after{
  content: ""; height: 1px; background: rgba(255,255,255,0.25);
}

/* Přihlášený vs nepřihlášený stav */
.auth-form--guest{ display: block; }
.auth-form--logged-in{ display: none; }
body.is-logged-in .auth-form--guest{ display: none; }
body.is-logged-in .auth-form--logged-in{ display: block; }

/* Tabs panel */
.tabs ul{ list-style: none; margin: 6px 0 0 0; padding: 0; }
.tabs li{ margin: 6px 0; }
.tabs a{
  display: inline-block;
  padding: 6px 10px;
  color: var(--primary);
  border-radius: 10px;
  border: 1px solid var(--primary);
  background: rgba(255,255,255,0.05);
}
.tabs a:hover{
  border-color: var(--primary-strong);
  background: rgba(255,118,47,0.12);
  color: var(--primary-strong);
}

/* Ebook panel drobnosti */
.ebook small{ display: block; margin-top: 6px; }

/* --- Buttons --- */
.btn{
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  border: 2px solid var(--primary);
  background: linear-gradient(180deg, var(--primary), var(--primary-strong));
  color: white;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
  text-align: center;
}
.btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 8px 22px var(--shadow-strong);
  border-color: var(--primary-strong);
  color: white !important;
}

.btn-blue{
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  border: 2px solid var(--primary);
  background: linear-gradient(180deg, var(--blue), var(--blue-light));
  color: white;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
  text-align: center;
}
.btn-blue:hover{
  transform: translateY(-1px);
  box-shadow: 0 8px 22px var(--shadow-strong);
  border-color: var(--primary-strong);
  color: white !important;
}

.btn:active{ transform: translateY(0); }
.btn-full{ width: 100%;color:white }

.btn-outline{
  background: transparent;
  color: var(--text);
  border-color: var(--primary);
}
.btn-outline:hover{
  background: rgba(255,118,47,0.15);
}

.btn-ghost{
  background: transparent;
  color: var(--text);
  border-color: rgba(255,255,255,0.25);
}
.btn-ghost:hover{
  border-color: var(--primary);
  background: rgba(255,118,47,0.12);
}

/* --- Footer --- */
.site-footer { margin: 24px auto 32px; text-align: center; }
.site-footer p { color: rgba(255,255,255,0.85); margin: 0; }

/* --- Responsivita --- */
@media (max-width: 1050px){
  .cards-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 780px){
  .layout{ grid-template-columns: 1fr; }
  .sidebar{ order: -1; } /* sidebar nahoru na mobilu (volitelné) */
  .cards-grid{ grid-template-columns: 1fr; }
}

/* footer na střed, oranžový text */
.footer-orange {
  text-align: center;
  padding: 2rem 1rem;
  color: #ff762f;
  font-size: 1rem;
}
.footer-orange a {
  color: #ff762f;
  text-decoration: none;
  font-weight: 600;
}
.footer-orange a:hover {
  text-decoration: underline;
}

/* ===========================
   CENÍK – sjednocené karty (4 sloupce na desktopu)
   =========================== */

.pricing{
  margin-top: 18px;
  text-align: center; /* nadpis doprostřed */
}

/* Grid: 4 sloupce na desktopu, pak 3/2/1 podle šířky */
.plans{
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 16px;
  margin-inline: auto;
  align-items: stretch;
  justify-items: stretch;
}

@media (max-width: 1200px){
  .plans{ grid-template-columns: repeat(3, minmax(240px, 1fr)); }
}
@media (max-width: 920px){
  .plans{ grid-template-columns: repeat(2, minmax(240px, 1fr)); }
}
@media (max-width: 560px){
  .plans{ grid-template-columns: 1fr; }
}

/* Základ karty – plná výška a konzistentní vzhled */
.plan{
  position: relative;
  display: grid;
  border-radius: var(--radius);
  padding: 16px;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 10px 26px var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease, border-color .25s ease;
  border: 1px solid rgba(255,255,255,0.12);
  max-width: none;                 /* <— zruší limit 320px, ať se roztáhne v gridu */
  height: 100%;                    /* <— všechny karty stejně vysoké */
}
.plan:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 36px var(--shadow-strong);
  filter: saturate(1.05);
  border-color: rgba(255,255,255,0.2);
}

.plan h4{
  margin-left: auto;
  margin-right: auto;
  font-size: 1.2rem;
  color: #fff;
  min-height: 44px;
  display: flex;
  align-items: center;
}

/* Ikonová bublina v horní části karty */
.plan__icon{
  position: absolute;
  top: 12px; left: 12px;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  font-size: 22px;
  box-shadow: 0 6px 16px var(--shadow);
  transition: transform .25s ease, filter .25s ease;
}
.plan:hover .plan__icon{ transform: scale(1.05); }

/* Jemné odlišení bublin podle typu balíčku */
.plan--trial   .plan__icon{ background: rgba(120,222,32,0.20); }
.plan--neutral .plan__icon{ background: rgba(255,255,255,0.10); }
.plan--accent  .plan__icon{ background: rgba(255,118,47,0.20); }
.plan--ai      .plan__icon{ background: rgba(0,74,153,0.20); }

/* CENOVKA – zvýraznění */
.price{
  display: flex;
  justify-content: center;        /* <— cenovka doprostřed karty */
  align-items: baseline;
  gap: 8px;
  margin: 6px 0 12px 0;
}

.price .amount{
  font-weight: 900;
  font-size: 2rem;
  padding: 8px 16px;
  border-radius: 999px;
  background: #ffffff;            /* světlá pilulka na tmavém pozadí */
  color: #0b1118;
  border: 2px solid rgba(0,0,0,0.08);
  box-shadow:
    0 10px 24px rgba(0,0,0,0.35),
    0 0 0 4px rgba(255,255,255,0.12) inset;
  letter-spacing: .2px;
}
.price .per{
  opacity: .95;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
}

/* Dodatečný "ring" podle varianty plánu (jemný barevný glow) */
.plan--accent .price .amount{
  box-shadow:
    0 10px 26px rgba(255,118,47,0.45),
    0 0 0 4px rgba(255,118,47,0.25) inset;
  border-color: rgba(255,118,47,0.6);
}
.plan--ai .price .amount{
  box-shadow:
    0 10px 26px rgba(0,74,153,0.45),
    0 0 0 4px rgba(0,74,153,0.25) inset;
  border-color: rgba(0,74,153,0.6);
}
.plan--trial .price .amount{
  box-shadow:
    0 10px 26px rgba(120,222,32,0.4),
    0 0 0 4px rgba(120,222,32,0.25) inset;
  border-color: rgba(120,222,32,0.55);
}

/* Výčet vlastností – ať vyplní mezeru, tlačítko zůstane u spodního okraje */
.plan-features{
  list-style: none;
  margin: 8px 0 12px 0;
  padding: 0;
  text-align: left;               /* čitelné vlevo */
  flex: 1 1 auto;                 /* <— roztáhne střed karty */
}
.plan-features li{ margin: 6px 0; line-height: 1.5; }
.plan-features .variant{ opacity: .95; }

/* Tlačítko v kartě – plná šířka, držet dole */
.plan .btn{
  margin-top: 6px;
  align-self: stretch;
}

/* Plné pozadí jednotlivých plánů – sjednocené gradienty */
.plan--accent{
  background: linear-gradient(180deg, rgba(255,118,47,0.95), rgba(255,90,0,0.95));
  border-color: rgba(255,255,255,0.2);
}
.plan--neutral{
  background: linear-gradient(180deg, rgba(23,33,45,0.95), rgba(14,23,32,0.95));
}
.plan--ai{
  background: linear-gradient(180deg, rgba(0,74,153,0.9), rgba(0,53,109,0.95));
}
.plan--trial{
  background: linear-gradient(180deg, rgba(120,222,32,0.22), rgba(120,222,32,0.1));
  border: 1px solid rgba(120,222,32,0.45);
}

/* === HOTFIX: Ceník – sjednocení rozložení a <a class="btn"> === */
.pricing .plans{
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 16px;
  align-items: stretch;
  justify-items: stretch;
}

@media (max-width: 1200px){ .pricing .plans{ grid-template-columns: repeat(3, minmax(240px,1fr)); } }
@media (max-width: 920px){  .pricing .plans{ grid-template-columns: repeat(2, minmax(240px,1fr)); } }
@media (max-width: 560px){  .pricing .plans{ grid-template-columns: 1fr; } }

/* Karta jako sloupec, tlačítko držet u spodku */
.pricing .plan{
  display: flex !important;          /* přepíše starý grid */
  flex-direction: column;
  max-width: none;
  height: 100%;
}

/* <a class="btn"> – stejné chování napříč kartami */
.pricing .btn{
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;              /* jistota pro <a> */
  width: auto;
}
.pricing .btn.btn-full{
  width: 100%;
  color: #fff;                        /* vynucení barvy */
}

/* odtlačit tlačítko dolů v kartě */
.pricing .plan .btn{ margin-top: auto; }

/* Kompaktní ceník v levém sloupci (2×2), bez "container" šířky */
.content .pricing--compact { width: 100%; margin: 5vh 0; }
.content .pricing--compact .pricing-title { text-align: center; margin-bottom: 10px; }

/* Přepiš default ceníkový grid jen v rámci kompaktní sekce */
.content .pricing--compact .plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* 2 sloupce v rámci .content */
  gap: 14px;
  align-items: stretch;
  justify-items: stretch;
}

/* Na úzkých šířkách složit na 1 sloupec */
@media (max-width: 920px) {
  .content .pricing--compact .plans { grid-template-columns: 1fr; }
}

/* Jemně menší typografie a padding pro kompaktní variantu */
.content .pricing--compact .plan { padding: 12px; }
.content .pricing--compact .plan h4 { font-size: 1.1rem; min-height: auto; }
.content .pricing--compact .price .amount { font-size: 1.6rem; padding: 6px 12px; }
.content .pricing--compact .plan-features li { margin: 4px 0; line-height: 1.45; }
.content .pricing--compact .btn { padding: 8px 14px; }

/* --- Raketkové odrážky (stejný styl napříč webem) --- */
.list-rocket{ list-style: none; padding: 0; margin: 8px 0 12px 0; }
.list-rocket li{
  list-style: none;
  position: relative;
  padding-left: 28px;
  margin: 6px 0;
  line-height: 2;
}
.list-rocket li::before{
  content: "🚀";
  position: absolute;
  left: 0; top: .1rem;
  font-size: 1.1rem;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.35));
}

/* === Trial varianta se 3 sloupci === */
/* Trial – 3 sloupce přes celou šířku */
.pricing .plans.plans--three {
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 2rem;
  align-items: stretch;
  justify-items: stretch;
}

.pricing .plans.plans--three .plan {
  max-width: none;
  height: 100%;
}

@media (max-width: 920px){
  .pricing .plans.plans--three {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }
}
@media (max-width: 560px){
  .pricing .plans.plans--three {
    grid-template-columns: 1fr;
  }
}

/* ============================
   Tlačítka – optimalizace pro telefony a tablety
   ============================ */

/* Telefony do 599px */
@media (max-width: 599px){
  .btn,
  .btn-full,
  .btn-outline,
  .btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 100% !important;
    margin: 0.5rem auto;     /* mezera nad/pod + zarovnání na střed */

    padding: 10px 14px;      /* menší výška */
    font-size: 0.9rem;         /* cca 16px – dobré proti iOS zoomu */
    line-height: 1.2;
    border-radius: 28px;
  }

  /* pokud máš tlačítka ve wrapu */
  .btn-wrap, .done-wrap { text-align: center; }
}

/* Tablety 600–899px */
@media (min-width: 600px) and (max-width: 899px){
  .btn,
  .btn-full,
  .btn-outline,
  .btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: auto;             /* na tabletu už nemusí být full-width */
    max-width: 420px;        /* aby nebyly přerostlé */
    margin: 0.5rem auto;

    padding: 12px 18px;
    font-size: 1.05rem;
    line-height: 1.25;
    border-radius: 30px;
  }
}

/* Vypnutí “nafukovacích” hover efektů na dotykových zařízeních */
@media (hover: none) and (pointer: coarse){
  .btn,
  .btn-full,
  .btn-outline,
  .btn-ghost {
    transform: none !important;
    transition: background-color .25s ease, box-shadow .25s ease;
  }
}

b {
    color: black;
}