/* ============================================================
   Psychotest.sk — Custom stylesheet (over Mosto template)
   ============================================================ */

/* ---- CSS vars — dark (default, matches Mosto dark) ---- */
:root {
  --primary:    #7052fb;
  --primary-d:  #5a3ee0;
  --secondary:  #ee4730;
  --accent:     #ffd93d;
  --bg:         #202342;
  --bg-card:    #272b54;
  --bg-card2:   #2e3360;
  --text:       #ffffff;
  --text-muted: #bdb9f0;
  --border:     rgba(255,255,255,.10);
  --radius:     16px;
  --radius-sm:  10px;
  --shadow:     0 4px 24px rgba(0,0,0,.30);
  --shadow-lg:  0 8px 40px rgba(0,0,0,.40);
  --transition: .22s cubic-bezier(.4,0,.2,1);
}

/* ---- CSS vars — light (Mosto light) ---- */
[data-theme="light"] {
  --primary:    #7052fb;
  --primary-d:  #5a3ee0;
  --secondary:  #ee4730;
  --bg:         #f0f5fc;
  --bg-card:    #ffffff;
  --bg-card2:   #f4f7ff;
  --text:       #3b368c;
  --text-muted: #6b7280;
  --border:     #e0ddf5;
  --shadow:     0 4px 24px rgba(108,99,255,.10);
  --shadow-lg:  0 8px 40px rgba(108,99,255,.18);
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
img { max-width: 100%; height: auto; }

/* Body needs padding-top for Mosto's fixed header */
body { padding-top: 100px; background: var(--bg, #0e0d2a); }
.header-section { padding: 20px 0; }
.header-section.active { padding: 10px 0; }

/* ============================================================
   CUSTOM HEADER ELEMENTS
   (Mosto handles .header-section, .menu, etc.)
   ============================================================ */

.header-section .header-wrapper .logo {
  width: auto;
}
.header-section .header-wrapper .logo a img {
  width: auto;
}
.site-logo-img {
  height: 60px; width: auto;
}
@media (max-width: 991px) {
  .site-logo-img { height: 48px; }
  .header-section { padding: 14px 0; }
  .header-section.active { padding: 10px 0; }
  body { padding-top: 80px; }
}

/* Header: transparent before scroll, solid after scroll */
.header-section { background: transparent !important; }
.header-section.active { background: #3b319e !important; backdrop-filter: blur(10px); }

/* Light theme: header */
[data-theme="light"] .header-section .menu li a { color: var(--text) !important; }
[data-theme="light"] .header-section .menu li a:hover,
[data-theme="light"] .header-section .menu li a.active { color: var(--primary) !important; }
[data-theme="light"] .header-section.active { background: rgba(255,255,255,.95) !important; box-shadow: 0 2px 20px rgba(0,0,0,.08); }
[data-theme="light"] .header-section .submenu { background: #fff; border: 1px solid var(--border); }
[data-theme="light"] .header-section .submenu li a { color: var(--text) !important; }

/* Light theme: swap banner-1-shape to light version */
[data-theme="light"] .banner-1-shape .shape-dark { display: none; }
[data-theme="light"] .banner-1-shape .shape-light { display: block; }
.banner-1-shape .shape-light { display: none; }

.header-search-form {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.15);
  border-radius: 50px; padding: 4px 14px;
  transition: border-color var(--transition);
  height: 36px;
}
[data-theme="light"] .header-search-form {
  background: rgba(0,0,0,.04);
  border-color: var(--border);
}
.header-search-form:focus-within { border-color: var(--primary); }
.header-search-form svg { opacity: .6; flex-shrink: 0; color: #fff; }
[data-theme="light"] .header-search-form svg { color: var(--text); }
.header-search-form input {
  border: none; background: transparent; outline: none;
  font-size: .85rem; color: #fff; width: 160px;
}
[data-theme="light"] .header-search-form input { color: var(--text); }
.header-search-form input::placeholder { color: rgba(255,255,255,.5); }
[data-theme="light"] .header-search-form input::placeholder { color: var(--text-muted); }

.theme-toggle-btn {
  background: rgba(255,255,255,.10); border: 1.5px solid rgba(255,255,255,.15);
  border-radius: 50%; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1rem; transition: all var(--transition);
  flex-shrink: 0;
}
[data-theme="light"] .theme-toggle-btn {
  background: rgba(0,0,0,.05); border-color: var(--border);
}
.theme-toggle-btn:hover { background: var(--primary); border-color: var(--primary); }

/* header-right: flex row with search + toggle */
.header-right {
  display: flex !important; align-items: center; gap: 8px;
  flex-shrink: 0;
}

/* Mobile menu overlay (custom, not Mosto's) */
.navbar__mobile-menu {
  display: none; position: fixed; inset: 80px 0 0 0; z-index: 998;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
}
.navbar__mobile-menu.open { display: block; }
.navbar__mobile-inner {
  background: var(--bg-card); padding: 20px;
  display: flex; flex-direction: column; gap: 4px;
  max-height: 80vh; overflow-y: auto;
}
.navbar__mobile-inner a {
  font-size: 1rem; font-weight: 600; color: var(--text) !important;
  padding: 11px 16px; border-radius: var(--radius-sm);
  display: block; text-decoration: none;
}
.navbar__mobile-inner a:hover { background: rgba(255,255,255,.08); }
[data-theme="light"] .navbar__mobile-inner a:hover { background: rgba(0,0,0,.05); }

/* ============================================================
   PAGE HEADER (category, best, newest, search pages)
   ============================================================ */
.page-header-section {
  background: linear-gradient(135deg, #1a1240 0%, #202342 40%, #2d1b69 100%);
  padding: clamp(40px, 6vw, 70px) 0;
  text-align: center;
}
[data-theme="light"] .page-header-section {
  background: linear-gradient(135deg, #7052fb 0%, #a855f7 50%, #6c63ff 100%);
}
.page-header-content .cate {
  font-size: .9rem; font-weight: 500; color: rgba(255,255,255,.7);
  margin-bottom: 8px; display: block;
}
.page-header-content .title {
  color: #fff; margin-bottom: 10px;
}
.page-header-content p {
  color: rgba(255,255,255,.7); font-size: 1rem;
}
.page-header-icon {
  font-size: 3rem; display: block; margin-bottom: 12px;
}
.page-header-inner {
  padding-top: 12px;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb-area {
  display: flex; align-items: center; gap: 8px;
  font-size: .85rem; color: var(--text-muted); flex-wrap: wrap;
}
.breadcrumb-area a { color: var(--text-muted); text-decoration: none; }
.breadcrumb-area a:hover { color: var(--primary); }
.breadcrumb-area span { opacity: .5; }

/* ============================================================
   BANNER / HERO (home page — Mosto banner-1 pattern)
   ============================================================ */

/* Hero image (right side) */
.hero-image {
  position: relative;
  margin-top: -120px;
}
.hero-image img {
  width: 140%; max-width: none; height: auto;
}

/* Hero stats row (under buttons) */
.hero-stats-row {
  display: flex; gap: clamp(24px, 4vw, 48px);
  flex-wrap: wrap; margin-top: 28px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.15);
}
.hero-stat-item {
  color: #fff;
}
.hero-stat-item h3 {
  font-size: 1.6rem; font-weight: 800; color: #fff; margin-bottom: 2px; line-height: 1;
}
.hero-stat-item span {
  font-size: .8rem; opacity: .6; text-transform: uppercase; letter-spacing: .5px;
}
@media (max-width: 991px) {
  .hero-stats-row { justify-content: center; }
  .hero-image { margin-top: 30px; }
  .hero-image img { width: 100%; }
  .banner-content-1 { text-align: center; }
  .banner-content-1 .banner-button-group { justify-content: center; }
}

/* ============================================================
   MOSTO BUTTONS (button-4)
   ============================================================ */
.button-4 {
  display: inline-block; padding: 14px 32px;
  border-radius: 50px; font-weight: 700; font-size: .95rem;
  background: linear-gradient(-65deg, rgb(193,101,221), rgb(17,83,252));
  color: #fff !important; text-decoration: none;
  transition: all var(--transition); border: none; cursor: pointer;
}
.button-4:hover {
  transform: translateY(-2px); box-shadow: 0 8px 30px rgba(112,82,251,.4);
  color: #fff !important;
}
.button-4.active {
  background: transparent; border: 2px solid rgba(255,255,255,.4);
}
.button-4.active:hover { background: rgba(255,255,255,.1); }

/* ============================================================
   CATEGORY PILLS
   ============================================================ */
.categories-bar { display: flex; gap: 10px; flex-wrap: wrap; padding: 20px 0; }
.cat-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: 50px; font-size: .9rem; font-weight: 600;
  background: var(--bg-card); border: 2px solid var(--border);
  color: var(--text-muted); transition: all var(--transition); white-space: nowrap;
  text-decoration: none;
}
.cat-pill:hover, .cat-pill.active {
  border-color: var(--primary); color: var(--primary);
  background: rgba(112,82,251,.12); transform: translateY(-1px);
}
.cat-pill .icon { font-size: 1.1rem; }

/* ============================================================
   SECTION HEADERS (Mosto pattern)
   ============================================================ */
.section-header { text-align: center; margin-bottom: 40px; }
.section-header.left-style { text-align: left; }
.section-header .cate {
  font-size: .9rem; font-weight: 600; color: var(--primary);
  margin-bottom: 8px; display: block;
  text-transform: uppercase; letter-spacing: .06em;
}
.section-header .title {
  font-size: clamp(1.5rem, 3vw, 2.2rem); color: var(--text);
  margin-bottom: 12px;
}
.section-header p {
  color: var(--text-muted); font-size: 1rem; max-width: 600px;
}
.section-header.left-style p { margin: 0; }

.section-link {
  font-size: .9rem; font-weight: 600; color: var(--primary);
  text-decoration: none;
}
.section-link:hover { color: var(--primary-d); }

/* Padding helpers (match Mosto) */
.padding-top { padding-top: clamp(40px, 6vw, 80px); }
.padding-bottom { padding-bottom: clamp(40px, 6vw, 80px); }
.padding-top-sm { padding-top: clamp(16px, 3vw, 32px); }
.padding-bottom-sm { padding-bottom: clamp(16px, 3vw, 32px); }

/* ============================================================
   TEST CARDS — Mosto feature-item style
   ============================================================ */

/* Wrapper: 2-column grid on desktop */
.feature-wrapper {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 30px;
}
@media (max-width: 767px) {
  .feature-wrapper { grid-template-columns: 1fr; }
}

/* Test feature-item: link wrapper extending Mosto's .feature-item */
.test-feature-item {
  text-decoration: none !important;
  display: flex;
  align-items: flex-start;
  color: var(--text);
}
.test-feature-item .feature-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
}
.test-feature-item .feature-thumb .thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(193,101,221,.3), rgba(17,83,252,.3));
}
.test-feature-item .feature-thumb .thumb img {
  border-radius: 50%;
  object-fit: cover;
}
.test-feature-emoji {
  font-size: 2rem;
  line-height: 1;
}
.test-feature-cat {
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--primary); margin-bottom: 4px;
  display: block;
}
.test-feature-hot {
  background: linear-gradient(135deg, #ff6b6b, #ff8e53);
  color: #fff; font-size: .65rem; font-weight: 800;
  padding: 1px 7px; border-radius: 50px; letter-spacing: .04em;
  margin-left: 6px; vertical-align: middle;
}
.test-feature-item .feature-content .title {
  font-size: 1.05rem;
  margin-bottom: 8px;
  line-height: 1.35;
  color: var(--text);
}
.test-feature-item .feature-content p {
  font-size: .88rem;
  color: var(--text-muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 8px;
}
.test-feature-meta {
  font-size: .78rem; color: var(--text-muted);
  display: flex; gap: 14px; margin-top: auto;
}

/* Hover: show gradient background + white text */
.test-feature-item.active .feature-content .title,
.test-feature-item:hover .feature-content .title {
  color: #fff;
}
.test-feature-item.active .feature-content p,
.test-feature-item:hover .feature-content p {
  color: rgba(255,255,255,.85);
}
.test-feature-item.active .test-feature-cat,
.test-feature-item:hover .test-feature-cat {
  color: rgba(255,255,255,.7);
}
.test-feature-item.active .test-feature-meta,
.test-feature-item:hover .test-feature-meta {
  color: rgba(255,255,255,.7);
}

/* Force horizontal layout on mobile — override Mosto's vertical stacking */
.test-feature-item {
  flex-wrap: nowrap !important;
}
.test-feature-item .feature-thumb {
  width: 70px !important; height: 70px !important;
  flex-shrink: 0;
  margin-bottom: 0 !important;
}
.test-feature-item .feature-thumb .thumb {
  width: 55px !important; height: 55px !important;
}
.test-feature-item .feature-content {
  width: calc(100% - 70px) !important;
  padding-left: 20px !important;
}
@media (max-width: 499px) {
  .test-feature-item {
    padding: 18px 16px !important;
  }
  .test-feature-item .feature-thumb {
    width: 56px !important; height: 56px !important;
  }
  .test-feature-item .feature-thumb .thumb {
    width: 44px !important; height: 44px !important;
  }
  .test-feature-item .feature-content {
    width: calc(100% - 56px) !important;
    padding-left: 14px !important;
  }
  .test-feature-item .feature-content .title {
    font-size: .95rem;
    margin-bottom: 4px;
  }
  .test-feature-emoji { font-size: 1.4rem; }
}

/* Mini test card (for related tests on quiz page) */
.test-card {
  background: var(--bg-card); border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border);
  transition: all var(--transition); position: relative;
  display: flex; flex-direction: column; text-decoration: none;
}
.test-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.test-card__thumb {
  width: 100%; min-height: 80px;
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.test-card__thumb img {
  width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0;
}
.test-card__icon { font-size: 2rem; }
.test-card__body { padding: 12px; }
.test-card__title {
  font-size: .9rem; font-weight: 700; color: var(--text);
  line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ============================================================
   TEST HEADER BANNER (file tests)
   ============================================================ */
.test-header-banner {
  padding: clamp(30px, 5vw, 50px) 0 clamp(35px, 5vw, 60px);
}
[data-theme="light"] .test-header-banner {
  background: linear-gradient(135deg, #7052fb 0%, #a855f7 50%, #6c63ff 100%) !important;
}
.test-header-cat {
  font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: rgba(255,255,255,.7);
  margin-bottom: 10px; display: block;
}
.test-header-title {
  color: #fff; font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 12px;
}
.test-header-desc {
  color: rgba(255,255,255,.75); font-size: 1rem;
  margin-bottom: 14px; max-width: 520px;
}
.test-header-meta {
  color: rgba(255,255,255,.55); font-size: .85rem;
}

/* Custom test content card */
.custom-test-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.custom-test-card .custom-test-body {
  padding: 28px 24px;
}

/* Test cover card */
.test-cover-card {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.test-cover-card img {
  width: 100%; display: block;
}

/* ============================================================
   RELATED TESTS GRID
   ============================================================ */
.related-tests-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 480px) {
  .related-tests-grid { grid-template-columns: 1fr; }
}

.related-test-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-decoration: none;
  transition: all var(--transition);
}
.related-test-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.related-test-card__icon {
  width: 52px; height: 52px; flex-shrink: 0;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}
.related-test-card__content h5 {
  font-size: .9rem; font-weight: 700; color: var(--text);
  margin: 0 0 4px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.related-test-card__content span {
  font-size: .75rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .04em; font-weight: 600;
}

/* ============================================================
   QUIZ / TEST PAGE
   ============================================================ */
.quiz-box {
  width: 100%;
  background: var(--bg-card); border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden;
}
.quiz-header { padding: 28px 32px 0; }
.quiz-header__cat {
  font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--primary); margin-bottom: 8px;
}
.quiz-header h1 { font-size: clamp(1.3rem, 3vw, 1.9rem); margin-bottom: 12px; color: var(--text); }
.quiz-header__desc { font-size: .95rem; margin-bottom: 24px; color: var(--text-muted); }

/* Progress bar */
.quiz-progress { padding: 0 32px; margin-bottom: 8px; }
.quiz-progress__top {
  display: flex; justify-content: space-between;
  font-size: .82rem; color: var(--text-muted); margin-bottom: 6px;
}
.quiz-progress__bar { height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; }
.quiz-progress__fill {
  height: 100%; background: linear-gradient(90deg, var(--primary), #a855f7);
  border-radius: 99px; transition: width .4s cubic-bezier(.4,0,.2,1);
}

/* Cover image */
.quiz-cover { margin: 0 32px 24px; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 16/7; }
.quiz-cover img { width: 100%; height: 100%; object-fit: cover; }

/* Question screens */
.quiz-screen { padding: 24px 32px 32px; display: none; }
.quiz-screen.active { display: block; }
.quiz-q-num {
  font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-muted); margin-bottom: 8px;
}
.quiz-q-text {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 700; color: var(--text); margin-bottom: 20px; line-height: 1.4;
}
.quiz-q-img { margin-bottom: 20px; border-radius: var(--radius-sm); overflow: hidden; max-height: 320px; }
.quiz-q-img img { width: 100%; height: 100%; object-fit: contain; }

/* Answers */
.quiz-answers { display: flex; flex-direction: column; gap: 10px; }
.quiz-answer {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border: 2px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer;
  transition: all var(--transition); background: var(--bg-card);
  font-size: .97rem; font-weight: 500; color: var(--text);
  text-align: left; width: 100%;
}
.quiz-answer:hover {
  border-color: var(--primary); background: rgba(112,82,251,.1);
  transform: translateX(4px);
}
.quiz-answer.selected {
  border-color: var(--primary); background: rgba(112,82,251,.15);
  color: var(--primary); font-weight: 700;
}
.quiz-answer__letter {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--border); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .85rem; transition: all var(--transition);
  color: var(--text-muted);
}
.quiz-answer.selected .quiz-answer__letter {
  background: var(--primary); border-color: var(--primary); color: #fff;
}

/* Quiz navigation */
.quiz-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 24px; gap: 12px;
}
.quiz-nav-hint { font-size: .82rem; color: var(--text-muted); white-space: nowrap; }
.quiz-next-btn {
  display: inline-block; padding: 10px 24px;
  border-radius: 50px; font-weight: 700; font-size: .88rem;
  background: linear-gradient(-65deg, rgb(193,101,221), rgb(17,83,252));
  color: #fff; border: none; cursor: pointer;
  transition: all var(--transition); white-space: nowrap;
}
.quiz-next-btn:hover {
  transform: translateY(-2px); box-shadow: 0 6px 20px rgba(112,82,251,.35);
}

/* Intro screen */
.quiz-intro { padding: 32px; text-align: center; }
.quiz-intro__icon { font-size: 4rem; margin-bottom: 16px; }
.quiz-intro__stats { display: flex; justify-content: center; gap: 32px; margin: 24px 0; flex-wrap: wrap; }
.quiz-intro__stat { text-align: center; }
.quiz-intro__stat-num { font-size: 1.6rem; font-weight: 900; color: var(--primary); display: block; }
.quiz-intro__stat-lbl { font-size: .8rem; color: var(--text-muted); }
.quiz-intro__btn { margin-top: 8px; }

/* Result screen */
.quiz-result { padding: 40px 32px; text-align: center; animation: resultIn .5s ease; }
@keyframes resultIn { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
.quiz-result__emoji { font-size: 5rem; margin-bottom: 16px; display: block; }
.quiz-result__score {
  display: inline-block; background: linear-gradient(135deg, var(--primary), #a855f7);
  color: #fff; font-size: .85rem; font-weight: 700;
  padding: 6px 20px; border-radius: 50px; margin-bottom: 16px;
}
.quiz-result h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 16px; color: var(--text); }
.quiz-result__text { font-size: 1rem; color: var(--text-muted); max-width: 480px; margin: 0 auto 28px; line-height: 1.7; }
.quiz-result__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.quiz-result__share { margin-top: 28px; }
.quiz-result__share p { font-size: .9rem; color: var(--text-muted); margin-bottom: 12px; }
.quiz-result__share-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.share-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: 50px; font-size: .85rem; font-weight: 700;
  cursor: pointer; border: none; transition: all var(--transition);
}
.share-btn--fb   { background: #1877f2; color: #fff; }
.share-btn--fb:hover  { background: #1565d8; color: #fff; }
.share-btn--copy { background: var(--bg-card2); color: var(--text); border: 1.5px solid var(--border); }
.share-btn--copy:hover { border-color: var(--primary); color: var(--primary); }

.quiz-more { padding: 0 32px 32px; }
.quiz-more h3 { margin-bottom: 16px; font-size: 1rem; color: var(--text); }

/* ============================================================
   CUSTOM TEST (file_test) BODY
   ============================================================ */
.custom-test-body a { color: var(--primary); }
.custom-test-body td,
.custom-test-body th { color: var(--text); }
.custom-test-body font { color: var(--text) !important; }
/* Old custom tests use fixed-width tables and <center> — force full width */
.custom-test-body table { width: 100% !important; max-width: 100% !important; }
.custom-test-body center { text-align: left; }
.custom-test-body > div[align] { text-align: left !important; }
.custom-test-body h5, .custom-test-body h4, .custom-test-body h3 { color: var(--text); }
.custom-test-body input[type=text],
.custom-test-body input[type=number] { width: auto !important; max-width: 120px; }
.custom-test-body input[type=button],
.custom-test-body input[type=submit],
.custom-test-body button[type=submit] { width: auto !important; margin-top: 20px; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center; padding: 60px 20px; color: var(--text-muted);
  background: var(--bg-card); border-radius: var(--radius);
  border: 1px solid var(--border);
}
.empty-state__icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state .title { font-size: 1.2rem; color: var(--text); margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination-area {
  display: flex; align-items: center; gap: 6px;
  justify-content: center; margin-top: 40px; flex-wrap: wrap;
}
.page-btn {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1.5px solid var(--border);
  font-size: .9rem; font-weight: 600; color: var(--text-muted); text-decoration: none;
  transition: all var(--transition);
}
.page-btn:hover, .page-btn.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer-section { background: #161833 !important; }
[data-theme="light"] .footer-section { background: #1a1744 !important; }


.footer-section .footer-link { list-style: none; padding: 0; margin: 0; }
.footer-section .footer-link li { margin-bottom: 8px; }
.footer-section .footer-link li a {
  color: rgba(255,255,255,.6) !important;
  font-size: .9rem; text-decoration: none;
  transition: color var(--transition);
}
.footer-section .footer-link li a:hover { color: #fff !important; }
.footer-section .widget-title {
  color: #fff; font-size: .95rem; font-weight: 700; margin-bottom: 16px;
}
.footer-desc { color: rgba(255,255,255,.55); font-size: .9rem; margin-top: 8px; }
.footer-section .copyright p { color: rgba(255,255,255,.5); font-size: .82rem; }
.footer-section .footer-middle { border-top: 1px solid rgba(255,255,255,.08); padding-top: 32px; }
.footer-section .footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 20px; margin-top: 20px; }

/* ============================================================
   FLASH MESSAGES
   ============================================================ */
.flash { padding: 12px 20px; border-radius: var(--radius-sm); font-size: .9rem; font-weight: 600; margin-bottom: 16px; }
.flash--success { background: rgba(81,207,102,.15); color: #51cf66; border: 1px solid rgba(81,207,102,.3); }
.flash--error   { background: rgba(255,107,107,.15); color: #ff6b6b; border: 1px solid rgba(255,107,107,.3); }
[data-theme="light"] .flash--success { color: #2f7a38; }
[data-theme="light"] .flash--error   { color: #b91c1c; }

/* ============================================================
   ADMIN-SPECIFIC (form-control, admin-card, etc.)
   ============================================================ */
.form-control {
  background: var(--bg-card2) !important;
  border: 1.5px solid var(--border) !important;
  color: var(--text) !important;
  border-radius: var(--radius-sm) !important;
  padding: 9px 14px !important; font-size: .95rem !important;
  width: 100%;
}
[data-theme="light"] .form-control {
  background: #fff !important;
}
.form-control:focus { border-color: var(--primary) !important; outline: none !important; box-shadow: none !important; }
.form-label { font-size: .88rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; display: block; }
.form-group { margin-bottom: 16px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991px) {
  .header-search-form { display: none; }
}
@media (max-width: 768px) {
  body { padding-top: 70px; }
  .quiz-header  { padding: 20px 20px 0; }
  .quiz-progress { padding: 0 20px; }
  .quiz-cover   { margin: 0 20px 20px; }
  .quiz-screen  { padding: 20px 20px 28px; }
  .quiz-intro   { padding: 24px 20px; }
  .quiz-result  { padding: 32px 20px; }
  .quiz-more    { padding: 0 20px 24px; }
  .page-header-section { padding: 30px 0; }
}
@media (max-width: 480px) {
  .quiz-answer { padding: 10px 12px; gap: 10px; font-size: .9rem; }
  .quiz-answer__letter { width: 28px; height: 28px; font-size: .78rem; }
  .quiz-intro__stats { gap: 20px; }
  .hero-stats-row { gap: 20px; }
  .banner-button-group { flex-direction: column; align-items: center; }
  .quiz-nav { flex-wrap: wrap; justify-content: center; }
}

/* ============================================================
   SHAKE ANIMATION (quiz.js uses this)
   ============================================================ */
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60%  { transform: translateX(-6px); }
  40%,80%  { transform: translateX(6px); }
}

/* ============================================================
   MOSTO OVERRIDES — ensure vars apply to Mosto base
   ============================================================ */
.mb-30-none > [class*="col"] { margin-bottom: 30px; }
.header-section .menu li a,
.header-section .menu li .submenu li a { text-transform: none; }
