/*
Theme Name: VÚJ Online Portal
Theme URI: https://ucetnictvivuj.cz/
Author: VÚJ
Description: Lehká vlastní šablona pro online vzdělávací portál Účetnictví VÚJ. Navazuje na vizuální styl hlavního webu a obsahuje podporu pluginu VÚJ Online kurzy.
Version: 2.0.1
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.1
Text Domain: vuj-online-portal
*/

:root {
  --vuj-ink: #231f20;
  --vuj-ink-soft: #403a3c;
  --vuj-teal: #00a98f;
  --vuj-teal-dark: #008775;
  --vuj-teal-pale: #e9f8f5;
  --vuj-paper: #ffffff;
  --vuj-bg: #f5f7f7;
  --vuj-line: #dfe6e5;
  --vuj-muted: #697170;
  --vuj-success: #168a62;
  --vuj-danger: #b93838;
  --vuj-radius: 14px;
  --vuj-shadow: 0 12px 35px rgba(35,31,32,.08);
  --vuj-container: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--vuj-ink);
  background: var(--vuj-bg);
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--vuj-teal-dark); }
a:hover { color: var(--vuj-ink); }
img { max-width: 100%; height: auto; }

.vuj-container {
  width: min(calc(100% - 40px), var(--vuj-container));
  margin-inline: auto;
}

/* Horní kontaktní lišta */
.vuj-topbar {
  background: var(--vuj-ink);
  color: #fff;
  font-size: 14px;
}
.vuj-topbar__inner {
  min-height: 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
}
.vuj-topbar a { color: #fff; text-decoration: none; }
.vuj-topbar a:hover { color: #80dfd0; }
.vuj-topbar__contact,
.vuj-topbar__account { display: flex; gap: 18px; align-items: center; }

/* Hlavní hlavička */
.vuj-header {
  background: #fff;
  border-bottom: 1px solid var(--vuj-line);
  position: sticky;
  top: 0;
  z-index: 40;
}
.admin-bar .vuj-header { top: 32px; }
.vuj-header__inner {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
}
.vuj-brand { display: flex; align-items: center; gap: 16px; min-width: 260px; }
.vuj-brand .custom-logo { width: auto; max-height: 82px; }
.vuj-brand__text { text-decoration: none; color: var(--vuj-ink); }
.vuj-brand__title { display: block; font-size: 24px; line-height: 1.1; font-weight: 750; }
.vuj-brand__tagline { display: block; margin-top: 5px; color: var(--vuj-muted); font-size: 13px; }

.vuj-nav { margin-left: auto; }
.vuj-nav ul { list-style: none; display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; }
.vuj-nav a {
  display: block;
  padding: 13px 16px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--vuj-ink);
  font-weight: 650;
  font-size: 15px;
}
.vuj-nav a:hover,
.vuj-nav .current-menu-item > a,
.vuj-nav .current_page_item > a {
  background: var(--vuj-ink);
  color: #fff;
}
.vuj-menu-toggle {
    display: none !important;
    appearance: none;
    border: 0;
    background: var(--vuj-teal);
    color: #fff;
    border-radius: 8px;
    padding: 11px 18px;
    font-size: 16px;
    font-weight: 650;
    cursor: pointer;
}
.vuj-menu-toggle:hover,
.vuj-menu-toggle:focus-visible {
  background: var(--vuj-teal-dark);
}
.vuj-menu-toggle:focus-visible {
  outline: 3px solid var(--vuj-teal-pale);
  outline-offset: 2px;
}

/* Obsah stránky */
.vuj-main { min-height: 58vh; }
.vuj-page-header {
  padding: 56px 0 28px;
}
.vuj-page-title {
  margin: 0;
  font-size: clamp(36px, 5vw, 58px);
  letter-spacing: -.035em;
  line-height: 1.08;
  font-weight: 450;
}
.vuj-content-shell { padding: 30px 0 80px; }
.vuj-content-card {
  background: #fff;
  border: 1px solid var(--vuj-line);
  border-radius: 18px;
  padding: clamp(24px, 4vw, 52px);
  box-shadow: var(--vuj-shadow);
}
.entry-content > *:first-child { margin-top: 0; }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content h2, .entry-content h3 { line-height: 1.2; }

/* Tlačítka */
button,
input[type="submit"],
.wp-element-button,
.vuj-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0 !important;
  border-radius: 8px !important;
  padding: 11px 22px !important;
  background: var(--vuj-teal) !important;
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: none;
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
button:hover,
input[type="submit"]:hover,
.wp-element-button:hover,
.vuj-button:hover {
  background: var(--vuj-teal-dark) !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0,169,143,.2);
}

/* Formuláře */
input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea {
  width: 100%;
  border: 1px solid #cfd8d6;
  border-radius: 8px;
  background: #fff;
  padding: 12px 14px;
  color: var(--vuj-ink);
  font: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: 3px solid rgba(0,169,143,.15);
  border-color: var(--vuj-teal);
}

/* VÚJ Online kurzy – seznam */
.vuj-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
  gap: 26px !important;
}
.vuj-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--vuj-line) !important;
  border-radius: var(--vuj-radius) !important;
  padding: 28px !important;
  background: #fff !important;
  box-shadow: var(--vuj-shadow) !important;
  transition: transform .18s ease, box-shadow .18s ease;
}
.vuj-card::before {
  content: "";
  display: block;
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--vuj-teal);
}
.vuj-card:hover { transform: translateY(-3px); box-shadow: 0 18px 44px rgba(35,31,32,.12) !important; }
.vuj-card h2, .vuj-card h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 23px;
  line-height: 1.25;
}
.vuj-card p { color: var(--vuj-muted); }

/* Detail kurzu */
.vuj-course { max-width: 1120px !important; }
.vuj-course > h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -.035em;
  margin: 0 0 26px;
}
.vuj-course section {
  border: 1px solid var(--vuj-line) !important;
  border-radius: var(--vuj-radius) !important;
  padding: clamp(22px, 3.2vw, 38px) !important;
  background: #fff !important;
  box-shadow: var(--vuj-shadow) !important;
  margin: 28px 0 !important;
}
.vuj-course section h2 {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 20px;
  font-size: 25px;
}
.vuj-course section h2::before {
  content: "";
  width: 10px;
  height: 28px;
  border-radius: 6px;
  background: var(--vuj-teal);
  flex: 0 0 auto;
}
.vuj-description { font-size: 18px; }
.vuj-video iframe { border-radius: 11px; background: #111; }
.vuj-chapters {
  margin-top: 20px !important;
  border-top: 1px solid var(--vuj-line);
  padding-top: 15px;
}
.vuj-chapter {
  width: 100%;
  display: flex !important;
  justify-content: flex-start !important;
  min-height: 42px !important;
  border-radius: 7px !important;
  padding: 8px 10px !important;
  color: var(--vuj-ink) !important;
  background: transparent !important;
  font-weight: 550;
  box-shadow: none !important;
}
.vuj-chapter:hover { background: var(--vuj-teal-pale) !important; transform: none; }
.vuj-chapter span { color: var(--vuj-teal-dark) !important; min-width: 76px !important; }
.vuj-materials li {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 13px 0 !important;
  border-color: var(--vuj-line) !important;
}
.vuj-materials a { font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.vuj-question { border-color: var(--vuj-line) !important; }
.vuj-question legend { font-size: 18px; }
.vuj-question label {
  border: 1px solid var(--vuj-line);
  border-radius: 8px;
  padding: 11px 13px !important;
  margin: 7px 0;
  cursor: pointer;
}
.vuj-question label:hover { background: var(--vuj-teal-pale); border-color: #b9e4dc; }
.vuj-result { border-left: 5px solid; padding: 18px 20px !important; }
.vuj-result.is-pass { background: #eaf8f2 !important; border-color: var(--vuj-success); }
.vuj-result.is-fail { background: #fff0f0 !important; border-color: var(--vuj-danger); }

/* Paticka */
.vuj-footer {
  background: var(--vuj-ink);
  color: rgba(255,255,255,.78);
  margin-top: 30px;
}
.vuj-footer__inner {
  min-height: 230px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 45px;
  align-items: start;
  padding-block: 55px;
}
.vuj-footer h2, .vuj-footer h3 { color: #fff; margin-top: 0; }
.vuj-footer a { color: #fff; text-decoration: none; }
.vuj-footer a:hover { color: #79dfcf; }
.vuj-footer ul { list-style: none; margin: 0; padding: 0; }
.vuj-footer li { margin: 8px 0; }
.vuj-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 18px 0;
  font-size: 13px;
}

/* Tablet + mobil */
@media (max-width: 950px) {
  .admin-bar .vuj-header { top: 46px; }
  .vuj-header__inner { min-height: 86px; }

  .vuj-menu-toggle {
    display: inline-flex !important;
  }

  .vuj-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--vuj-line);
    padding: 14px 20px 20px;
  }

  .vuj-nav.is-open { display: block; }
  .vuj-nav ul { display: block; }
  .vuj-nav a { padding: 11px 13px; }
  .vuj-brand__text { display: none; }
  .vuj-footer__inner { grid-template-columns: 1fr; min-height: 0; }
}

@media (max-width: 600px) {
  .vuj-container { width: min(calc(100% - 24px), var(--vuj-container)); }
  .vuj-topbar__contact span:last-child { display: none; }
  .vuj-topbar__account { gap: 10px; }
  .vuj-page-header { padding-top: 35px; }
  .vuj-content-shell { padding-top: 15px; }
  .vuj-content-card { padding: 18px; border-radius: 12px; }
  .vuj-grid { grid-template-columns: 1fr !important; }
  .vuj-card { padding: 22px !important; }
  .vuj-course section { padding: 20px !important; }
}
/* ---------------------------------------------------------
   Stránkování kapitol videa
--------------------------------------------------------- */

.vuj-chapter[hidden] {
    display: none !important;
}

.vuj-chapter-pagination {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 15px;

    margin-top: 14px;
    padding-top: 14px;

    border-top: 1px solid var(--vuj-line);
}

.vuj-chapter-nav {
    border: 0;
    background: transparent;
    padding: 8px 4px;

    color: var(--vuj-teal-dark);
    font-weight: 650;
    cursor: pointer;

    transition: opacity .2s ease;
}

.vuj-chapter-prev {
    justify-self: start;
}

.vuj-chapter-next {
    justify-self: end;
}

.vuj-chapter-nav:hover:not(:disabled) {
    text-decoration: underline;
}

.vuj-chapter-nav:disabled {
    opacity: 0.25;
    cursor: default;
}

.vuj-chapter-counter {
    font-size: 13px;
    color: #6b7280;
    white-space: nowrap;
}

/* Mobil */
@media (max-width: 600px) {

    .vuj-chapter-pagination {
        grid-template-columns: 1fr 1fr;
    }

    .vuj-chapter-counter {
        grid-column: 1 / -1;
        grid-row: 1;
        justify-self: center;
    }

    .vuj-chapter-prev {
        grid-column: 1;
        grid-row: 2;
    }

    .vuj-chapter-next {
        grid-column: 2;
        grid-row: 2;
    }

}