/* ==========================================================
   Didaktra: vizualni identitet
   Ljubičasta ostaje kao prepoznatljiva boja, uz topli žuti
   naglasak za gumbe i istaknute elemente.
   ========================================================== */

:root {
  --md-primary-fg-color:        #5b3fa6;
  --md-primary-fg-color--light: #7c62c4;
  --md-primary-fg-color--dark:  #432c80;
  --md-accent-fg-color:         #7c4dff;

  --dk-ink:      #2b1b4f;   /* tamni tekst naslova */
  --dk-sun:      #ffc533;   /* topli naglasak */
  --dk-sun-dark: #f2a900;
  --dk-lilac:    #f4f0fc;   /* svijetla pozadina sekcija */
  --dk-radius:   14px;
  --dk-shadow:   0 2px 10px rgba(67, 44, 128, 0.08);
}

/* ---------- Tipografija ---------- */

.md-typeset {
  font-size: 0.85rem;
  line-height: 1.7;
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3 {
  color: var(--dk-ink);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.md-typeset h1 { font-size: 2rem; margin-bottom: 0.6em; }
.md-typeset h2 { margin-top: 1.8em; }

/* ---------- Zaglavlje ---------- */

.md-header__title { font-weight: 800; }

/* ---------- Gumbi ---------- */

.md-typeset .md-button {
  border-radius: 999px;
  padding: 0.55em 1.5em;
  font-weight: 700;
  margin: 0.25em 0.4em 0.25em 0;
}

.md-typeset .md-button--primary {
  background-color: var(--dk-sun);
  border-color: var(--dk-sun);
  color: var(--dk-ink);
}

.md-typeset .md-button--primary:hover,
.md-typeset .md-button--primary:focus {
  background-color: var(--dk-sun-dark);
  border-color: var(--dk-sun-dark);
  color: var(--dk-ink);
}

/* ---------- Naslovni blok (hero) ---------- */

.dk-hero {
  background: linear-gradient(135deg, var(--dk-lilac) 0%, #fff7e0 100%);
  border-radius: var(--dk-radius);
  padding: 2.2rem 2rem 1.8rem;
  margin: 0 0 2rem;
}

.md-typeset .dk-hero h1 {
  margin: 0 0 0.4em;
  font-size: 2.2rem;
  line-height: 1.2;
}

.dk-hero .dk-lead {
  font-size: 1.05rem;
  max-width: 34em;
  margin: 0 0 1.2em;
}

@media screen and (max-width: 44.9375em) {
  .dk-hero { padding: 1.5rem 1.2rem 1.2rem; }
  .md-typeset .dk-hero h1 { font-size: 1.7rem; }
}

/* ---------- Kartice ---------- */

.md-typeset .grid.cards > ul > li,
.md-typeset .grid > .card {
  border-radius: var(--dk-radius);
  border: 1px solid #e6e0f5;
  box-shadow: var(--dk-shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.md-typeset .grid.cards > ul > li:hover,
.md-typeset .grid > .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(67, 44, 128, 0.14);
  border-color: #d5cbf0;
}

.md-typeset .grid.cards .twemoji.lg,
.md-typeset .grid.cards .twemoji.lg svg {
  color: var(--md-primary-fg-color);
}

/* ---------- Koraci (1, 2, 3) ---------- */

.md-typeset ol.dk-steps {
  list-style: none;
  counter-reset: dk-step;
  margin-left: 0;
  padding-left: 0;
}

.md-typeset ol.dk-steps > li {
  counter-increment: dk-step;
  position: relative;
  padding-left: 3.2em;
  margin: 0 0 1.2em;
  min-height: 2.4em;
}

.md-typeset ol.dk-steps > li::before {
  content: counter(dk-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.2em;
  height: 2.2em;
  border-radius: 50%;
  background: var(--md-primary-fg-color);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Citat ---------- */

.md-typeset blockquote.dk-quote,
.md-typeset .dk-quote blockquote {
  border-left: 4px solid var(--dk-sun);
  background: #fffbf0;
  border-radius: 0 var(--dk-radius) var(--dk-radius) 0;
  padding: 0.6em 1.2em;
  color: var(--dk-ink);
  font-style: italic;
}

/* ---------- Cjenik: matrica ---------- */

.md-typeset table:not([class]) {
  border-radius: var(--dk-radius);
  overflow: hidden;
  font-size: 0.8rem;
}

.md-typeset table:not([class]) th {
  background: var(--dk-lilac);
  color: var(--dk-ink);
}

/* ---------- Cjenik: paketi ---------- */

.dk-prices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
  align-items: stretch;
}

.dk-price {
  position: relative;
  border: 1px solid #e6e0f5;
  border-radius: var(--dk-radius);
  box-shadow: var(--dk-shadow);
  padding: 1.4rem 1.2rem 1rem;
  background: #fff;
  text-align: center;
}

.md-typeset .dk-price h3 {
  margin: 0 0 0.2em;
  font-size: 1.05rem;
}

.dk-price .dk-hours {
  font-size: 0.8rem;
  opacity: 0.75;
  margin: 0 0 0.8em;
}

.md-typeset .dk-price table {
  display: table;
  width: 100%;
  margin: 0.4em 0 0.8em;
  font-size: 0.78rem;
  box-shadow: none;
}

.dk-price .dk-note {
  font-size: 0.75rem;
  opacity: 0.8;
  margin: 0;
}

.dk-price.dk-featured {
  border: 2px solid var(--md-primary-fg-color);
  box-shadow: 0 8px 24px rgba(67, 44, 128, 0.18);
}

.dk-badge {
  position: absolute;
  top: -0.8rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dk-sun);
  color: var(--dk-ink);
  font-weight: 800;
  font-size: 0.7rem;
  padding: 0.2em 0.9em;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- Kontakt traka ---------- */

.dk-contact {
  background: var(--dk-lilac);
  border-radius: var(--dk-radius);
  padding: 1.4rem 1.6rem;
  margin: 2.5rem 0 1rem;
  text-align: center;
}

.md-typeset .dk-contact h2 { margin-top: 0; }

/* ---------- Kontakt obrazac ---------- */

.contact-form {
  max-width: 40rem;
  margin: 1rem 0;
}

.contact-form label {
  display: block;
  font-weight: 700;
  font-size: 0.75rem;
  margin: 0.9rem 0 0.3rem;
  color: var(--dk-ink);
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid #d5cbf0;
  border-radius: 10px;
  font: inherit;
  font-size: 0.8rem;
  background: #fff;
}

.form-control:focus {
  outline: none;
  border-color: var(--md-primary-fg-color);
  box-shadow: 0 0 0 3px rgba(91, 63, 166, 0.15);
}

textarea.form-control {
  min-height: 9rem;
  resize: vertical;
}

.contact-form .g-recaptcha { margin: 1rem 0; }

.submit-btn {
  display: inline-block;
  padding: 0.7rem 1.8rem;
  background-color: var(--dk-sun);
  color: var(--dk-ink);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  font-size: 0.8rem;
  transition: background-color 0.2s ease;
}

.submit-btn:hover { background-color: var(--dk-sun-dark); }

/* ---------- Slike ---------- */

.md-typeset img.dk-photo {
  border-radius: var(--dk-radius);
  box-shadow: var(--dk-shadow);
}

/* Četiri kartice u jednom redu na širem ekranu, 2 + 2 ili 1 na užem */
.md-typeset .grid.cards.dk-grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr));
}

/* ---------- Cjenik: tablica ---------- */

.md-typeset__scrollwrap:has(#cjenik-tablica) { overflow: visible; }
.md-typeset__table:has(#cjenik-tablica) { display: block; width: 100%; }

#cjenik-tablica {
  display: table;
  width: 100%;
  table-layout: fixed;
  overflow: visible;
  margin-top: 1.4em;
}

#cjenik-tablica th:first-child { width: 31%; }

#cjenik-tablica th,
#cjenik-tablica td { padding: 0.8em 0.6em; text-align: center; vertical-align: middle; }

#cjenik-tablica th:first-child,
#cjenik-tablica td:first-child { text-align: left; }

#cjenik-tablica small { display: block; opacity: 0.75; }

/* Zaobljeni kutovi (tablica više ne reže sadržaj, pa ih zaobljujemo na ćelijama) */
#cjenik-tablica thead th:first-child { border-top-left-radius: 14px; }
#cjenik-tablica thead th:last-child { border-top-right-radius: 14px; position: relative; }
#cjenik-tablica tbody tr:last-child td:first-child { border-bottom-left-radius: 14px; }
#cjenik-tablica tbody tr:last-child td:last-child { border-bottom-right-radius: 14px; }

/* Značka sjedi na gornjem rubu tablice, iznad zadnjeg stupca */
#cjenik-tablica thead th:last-child br { display: none; }

#cjenik-tablica .dk-tag {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 0.1em 0.6em;
  border-radius: 999px;
  background: var(--dk-sun);
  color: var(--dk-ink);
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1.4;
  white-space: nowrap;
}

@media screen and (max-width: 30em) {
  #cjenik-tablica { font-size: 0.7rem; }
  #cjenik-tablica th,
  #cjenik-tablica td { padding: 0.6em 0.3em; }
}

/* Mobitel i manji tablet: značka u dva reda, točno iznad stupca „Paket 10 sati” */
@media screen and (max-width: 40em) {
  #cjenik-tablica { margin-top: 2.6em; }
  #cjenik-tablica .dk-tag {
    top: auto;
    bottom: calc(100% - 0.55em);
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: max-content;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: normal;
    word-break: keep-all;
    hyphens: none;
    text-align: center;
    font-size: 0.55rem;
    line-height: 1.15;
    padding: 0.25em 0.45em;
    border-radius: 0.8em;
  }
}

/* Slogan uz naziv u zaglavlju */
.md-header__title .md-header__topic:first-child .md-ellipsis::after {
  content: " · znanje koje ostaje";
  font-weight: 400;
  opacity: 0.85;
}

/* Na mobitelu manji slogan, da stane uz naziv */
@media screen and (max-width: 44.9375em) {
  .md-header__title .md-header__topic:first-child .md-ellipsis::after {
    font-size: 0.8em;
  }
}

/* Puni logo u sadržaju */
.md-typeset img.dk-logo {
  display: block;
  width: min(18rem, 70%);
  margin: 1.2rem auto 1.6rem;
}

/* Logo u zaglavlju */
.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  height: 0.9rem;
  width: auto;
}
.md-header__button.md-logo { margin-right: 0; }