/*
Theme Name: Vedomostky Theme
Theme URI: https://vedomostky.sk
Author: Vedomostky.sk
Author URI: https://vedomostky.sk
Description: Ultra-lahka, na mieru navrhnuta 2-stlpcova tema pre vedomostny portal.
Version: 1.9.5
Text Domain: vedomostky-theme
*/

/* --- 1. Premenné & Globálny Reset --- */
:root {
    --font-stack: "Segoe UI", Arial, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    --bg-page: #f9fafb;
    --bg-card: #ffffff;
    --color-primary: #0284c7;
    --color-text-dark: #050505;
    --color-text-body: #333333;
    --color-text-muted: #6b7280;
    --border-color: #e5e7eb;
    --card-radius: 8px;
    --img-radius: 6px;
    --site-max-width: 1180px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-stack);
    background-color: var(--bg-page);
    color: var(--color-text-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-container {
    max-width: var(--site-max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* --- 2. Hlavička (Header) & Branding --- */
.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    padding: 0.5rem 0;
}

.site-branding {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.site-branding img {
    max-height: 45px;
    width: auto;
}

.site-branding .site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-dark);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Zákaz reklám v hlavičke */
.site-header ins.adsbygoogle,
.site-header .google-auto-placed {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
}

/* --- 3. Navigácia & Dropdown (Desktop) --- */
.site-navigation {
    display: flex;
    align-items: center;
}

.nav-menu,
.nav-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-menu li {
    position: relative;
}

.nav-menu > li > a {
    display: block;
    padding: 0.6rem 0.4rem;
    color: var(--color-text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}

.nav-menu a:hover {
    color: var(--color-primary);
}

.nav-menu .menu-item-has-children > a::after {
    content: " ▾";
    font-size: 0.75rem;
    opacity: 0.7;
    margin-left: 3px;
}

.nav-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    z-index: 1000;
}

.nav-menu li:hover > .sub-menu,
.nav-menu li:focus-within > .sub-menu {
    display: block;
}

.nav-menu .sub-menu li {
    width: 100%;
}

.nav-menu .sub-menu a {
    display: block;
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
}

.nav-menu .sub-menu a:hover {
    background-color: #f8fafc;
    color: var(--color-primary);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-text-dark);
    margin: 5px 0;
}

/* --- 4. Vyhľadávanie v hlavičke --- */
.header-search {
    position: relative;
}

.header-search .search-form {
    display: flex;
    align-items: center;
    background-color: #f1f5f9;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.25rem 0.5rem 0.25rem 0.85rem;
    transition: border-color 0.2s, background-color 0.2s;
}

.header-search .search-form:focus-within {
    border-color: var(--color-primary);
    background-color: #ffffff;
}

.header-search .search-field {
    border: none;
    background: transparent;
    font-size: 0.875rem;
    color: var(--color-text-dark);
    outline: none;
    width: 140px;
    transition: width 0.3s ease;
    font-family: inherit;
}

.header-search .search-field:focus {
    width: 190px;
}

.header-search .search-submit {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    transition: color 0.2s;
}

.header-search .search-submit:hover {
    color: var(--color-primary);
}

/* --- 5. Hlavné rozloženie & 2-stĺpcový Grid kariet --- */
.site-main {
    padding: 2.5rem 1rem 4rem;
}

.archive-title {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--color-text-dark);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.card-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    padding: 1.15rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.07);
}

.card-media {
    position: relative;
    aspect-ratio: 16 / 9.5;
    overflow: hidden;
    border-radius: var(--img-radius);
    background-color: #f1f5f9;
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card-item:hover .card-media img {
    transform: scale(1.02);
}

.card-content {
    padding: 1.5rem 0.5rem 0.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card-title {
    font-size: 1.35rem;
    line-height: 1.35;
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 0.75rem;
}

.card-title a:hover {
    color: var(--color-primary);
}

.card-meta {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.meta-separator {
    color: var(--color-text-muted);
}

.card-categories a {
    color: var(--color-text-muted);
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.3px;
}

.card-categories a:hover {
    color: var(--color-text-dark);
}

.card-excerpt {
    font-size: 0.95rem;
    line-height: 1.55;
    color: #4b5563;
    max-width: 95%;
}

.card-excerpt p {
    margin: 0;
}

/* --- 6. Detail článku / Kvízu (Single) --- */
.single-post-wrapper {
    max-width: 820px;
    margin: 0 auto;
    background: #ffffff;
    padding: 2.5rem;
    border-radius: var(--card-radius);
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Odkazy v texte článku (Modré a podčiarknuté) */
.entry-content a {
    color: #0000ff !important;
    font-weight: 700;
    text-decoration: underline !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: 3px;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.entry-content a:hover {
    color: #0000aa !important;
    opacity: 0.85;
}

/* Drobčeková navigácia (Breadcrumbs) */
.breadcrumbs-trail,
.rank-math-breadcrumb {
    font-size: 0.85rem;
    color: #4b5563;
    margin-bottom: 1.25rem;
    line-height: 1.4;
}

.breadcrumbs-trail a,
.rank-math-breadcrumb a {
    color: var(--color-primary);
    text-decoration: none;
}

.breadcrumbs-trail a:hover,
.rank-math-breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumbs-trail span,
.rank-math-breadcrumb .last {
    color: #374151;
}

.entry-header-single {
    text-align: left;
    margin-bottom: 1.75rem;
}

.entry-title-single {
    font-size: 2.35rem;
    line-height: 1.2;
    font-weight: 800;
    color: var(--color-text-dark);
    margin-bottom: 1.1rem;
    letter-spacing: -0.5px;
}

.entry-meta-single {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

.author-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary);
    font-weight: 600;
}

.author-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-block;
}

.author-name {
    color: var(--color-primary);
}

.meta-sep {
    color: #9ca3af;
    margin: 0 0.1rem;
}

.meta-category a {
    color: var(--color-text-muted);
}

.meta-category a:hover {
    color: var(--color-primary);
}

.post-thumbnail-single {
    margin-bottom: 2rem;
    border-radius: var(--img-radius);
    overflow: hidden;
}

.entry-content {
    font-size: 1.05rem;
    line-height: 1.75;
}

.entry-content p {
    margin-bottom: 1.5rem;
}

/* --- 7. Kvízové rozhranie (Pilulky & Pastelové koliesko) --- */
.quiz-question {
    position: relative;
    background: #f8faff;
    border: 1.5px solid #dbeafe;
    border-radius: 20px;
    padding: 2.2rem 2.5rem;
    margin-bottom: 2rem;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(219, 234, 254, 0.3);
}

.quiz-question::after {
    content: "";
    position: absolute;
    top: -30px;
    right: -30px;
    width: 90px;
    height: 90px;
    background-color: #fef08a;
    opacity: 0.6;
    border-radius: 50%;
    pointer-events: none;
}

.quiz-question-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.4;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.quiz-question-title img {
    display: block;     
    margin: 15px auto;
    max-width: 100%;     
    height: auto;
    border-radius: 8px;  
}

.answers {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    position: relative;
    z-index: 1;
}

.answer {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.85rem 1.25rem;
    background-color: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    color: #1e293b;
    font-size: 1.05rem;
    font-weight: 600;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.answer::before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 1.5px solid #cbd5e1;
    border-radius: 50%;
    margin-right: 1rem;
    background-color: #ffffff;
    transition: all 0.2s ease;
}

.answer:hover:not(:disabled) {
    border-color: #93c5fd;
    background-color: #ffffff;
    box-shadow: 0 4px 10px rgba(147, 197, 253, 0.2);
    transform: translateY(-1px);
}

.answer:hover:not(:disabled)::before {
    border-color: #3b82f6;
}

.answer:disabled {
    cursor: default;
}

.answer.correct, 
.answer.reveal-correct {
    background-color: #f0fdf4 !important;
    border-color: #22c55e !important;
    color: #15803d !important;
}

.answer.correct::before, 
.answer.reveal-correct::before {
    border-color: #22c55e !important;
    background-color: #22c55e !important;
    box-shadow: inset 0 0 0 3px #ffffff;
}

.answer.wrong {
    background-color: #fef2f2 !important;
    border-color: #ef4444 !important;
    color: #b91c1c !important;
}

.answer.wrong::before {
    border-color: #ef4444 !important;
    background-color: #ef4444 !important;
    box-shadow: inset 0 0 0 3px #ffffff;
}

.feedback {
    margin-top: 1rem;
    font-weight: 700;
    font-size: 1rem;
}

.feedback.ok {
    color: #16a34a;
}

.feedback.nope {
    color: #dc2626;
}

.explanation {
    display: none;
    margin-top: 0.75rem;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border-left: 4px solid var(--color-primary);
    border-radius: 0 8px 8px 0;
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
}

.explanation.show {
    display: block;
}

/* Reklamný slot na výšku pod popisom kvízu */
.quiz-ad-top {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1.5rem 0 2rem;
    min-height: 600px;
    text-align: center;
    clear: both;
}

/* --- 8. Tlačidlá na konci kvízu & Výsledok --- */
.quiz-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0 1.5rem;
    width: 100%;
}

.quiz-footer .quiz-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.6rem !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    border-radius: 12px !important;
    cursor: pointer;
    text-decoration: none !important;
    line-height: 1.2 !important;
    box-sizing: border-box;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease !important;
}

/* 1. Tmavé tlačidlo: Reštartovať kvíz -> modrý hover */
.quiz-footer #resetQuiz.quiz-button {
    background-color: #222222 !important;
    color: #ffffff !important;
    border: 2px solid #222222 !important;
}

.quiz-footer #resetQuiz.quiz-button:hover {
    background-color: #001eff !important;
    border-color: #001eff !important;
    color: #ffffff !important;
}

/* 2. Biele tlačidlo: Náhodný kvíz -> modrý hover */
.quiz-footer .quiz-button-random {
    background-color: #ffffff !important;
    color: #111827 !important;
    border: 2px solid #111827 !important;
    text-decoration: none !important;
}

.quiz-footer .quiz-button-random:hover {
    background-color: #001eff !important;
    border-color: #111827 !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

/* Výsledkový box po dokončení kvízu */
.quiz-result {
    display: none;
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    background-color: var(--color-primary);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-size: 1.25rem;
    font-weight: 800;
    text-align: center;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.3);
}

/* --- 9. Paginácia --- */
.pagination-wrapper {
    margin-top: 3.5rem;
    display: flex;
    justify-content: center;
}

.pagination-wrapper .nav-links {
    display: flex;
    gap: 0.4rem;
}

.pagination-wrapper .page-numbers {
    padding: 0.5rem 0.9rem;
    border: 1px solid var(--border-color);
    background: #ffffff;
    border-radius: 4px;
    font-size: 0.9rem;
}

.pagination-wrapper .page-numbers.current {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
    font-weight: 600;
}

/* --- 10. Stránka autora (Author Archive) --- */
.author-archive-container {
    max-width: 1180px;
    margin: 0 auto;
}

.author-header-box {
    margin-bottom: 3rem;
    text-align: left;
}

.author-main-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 1.25rem;
    letter-spacing: -0.5px;
}

.author-description-text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #374151;
    max-width: 980px;
}

.author-description-text p {
    margin-bottom: 1rem;
}

.author-meta:hover .author-name {
    text-decoration: underline;
}

/* --- 11. Sekcia: Vybrané pre Vás (Related Posts) --- */
.related-posts-section {
    max-width: 820px;
    margin: 3.5rem auto 1rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border-color);
}

.related-posts-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-text-dark);
    margin-bottom: 2rem;
    text-align: left;
    position: relative;
    padding-left: 0.75rem;
    border-left: 4px solid var(--color-primary);
}

.related-posts-section .cards-grid {
    gap: 1.5rem;
}

.related-posts-section .card-title {
    font-size: 1.15rem;
    line-height: 1.35;
}

.related-posts-section .card-content {
    padding: 1rem 0.25rem 0.25rem;
}

/* --- 12. Pätička (Footer) --- */
.site-footer {
    background-color: transparent;
    margin-top: auto;
    width: 100%;
}

.footer-social-wrapper {
    background-color: #ffffff;
    padding: 2.2rem 0 1.8rem;
    text-align: center;
}

.footer-social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: #ffffff !important;
    text-decoration: none !important;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.social-icon:hover {
    transform: translateY(-3px);
    opacity: 0.9;
}

.social-icon.fb {
    background-color: #3b5998;
}

.social-icon.ig {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

.footer-bottom-bar {
    background-color: #0c0d0e;
    color: #ffffff;
    padding: 1.8rem 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-copyright p {
    margin: 0;
    font-size: 1rem;
    color: #f3f4f6;
    font-weight: 500;
}

.footer-navigation {
    max-width: 480px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    list-style: none;
    gap: 0.6rem 1.4rem;
    margin: 0;
    padding: 0;
}

.footer-links li a {
    color: #f3f4f6;
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links li a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* --- 13. Responzivita (Mobil & Tablet) --- */
@media (max-width: 960px) {
    .menu-toggle {
        display: block;
    }

    .site-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        border-bottom: 1px solid var(--border-color);
        padding: 1rem 1.5rem;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    }

    .site-navigation.is-active {
        display: block;
    }

    .nav-menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu .sub-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
        display: block;
        background: #f8fafc;
        border-radius: 4px;
        margin: 0.3rem 0;
    }

    .header-right {
        gap: 0.75rem;
    }
    
    .header-search .search-field {
        width: 110px;
    }
    
    .header-search .search-field:focus {
        width: 140px;
    }
}

@media (max-width: 860px) {
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .single-post-wrapper {
        padding: 1.5rem;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 1.25rem;
    }

    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .entry-title-single {
        font-size: 1.65rem;
        line-height: 1.25;
    }
    
    .entry-meta-single {
        font-size: 0.85rem;
    }

    .quiz-question {
        padding: 1.5rem 1.25rem;
        border-radius: 16px;
    }

    .quiz-question-title {
        font-size: 1.1rem;
    }

    .answer {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    .quiz-ad-top {
        margin: 1rem 0 1.5rem;
        min-height: auto;
    }

    .quiz-footer {
        flex-direction: column;
        gap: 0.75rem;
    }

    .quiz-footer .quiz-button {
        width: 100%;
        padding: 0.75rem 1rem !important;
    }
}
/* ==========================================
   MATCHING KVÍZ (Priraďovacie kvízy)
========================================== */
:root {
  --bg: #ffffff;
  --card: #ffffff;
  --text: #222222;
  --muted: #667085;
  --border: #efd496;
  --border-strong: #ecd08c;
  --primary: #222222;
  --primary-soft: #fffaf0;
  --accent: #dfb757;
  --success-bg: #eaf7ed;
  --success-border: #48a868;
  --success-text: #185c31;
  --error-bg: #fde8e8;
  --error-border: #d9534f;
  --error-text: #8f1f1b;
  --shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  --radius: 16px;
}

.quiz-app {
  max-width: 860px;
  margin: 30px auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  box-sizing: border-box;
}

.quiz-app * {
  box-sizing: border-box;
}

.quiz-header {
  margin-bottom: 20px;
  text-align: center;
}

.quiz-title {
  margin: 0 0 10px;
  font-size: 26px;
  font-weight: 800;
  color: #111;
  letter-spacing: -0.5px;
}

.quiz-description {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.quiz-ad-top {
  margin: 20px auto;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
}

.quiz-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.quiz-meta-item {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 6px 16px;
  font-weight: 700;
  font-size: 14px;
  color: #333;
  box-shadow: var(--shadow);
}

.quiz-progress {
  width: 100%;
  height: 10px;
  background: #f1ebd8;
  border-radius: 999px;
  overflow: hidden;
  margin: 0 0 18px;
}

.quiz-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #dfb757, #c99c35);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.feedback-global {
  min-height: 24px;
  margin: 0 0 16px;
  font-weight: 700;
  font-size: 15px;
  text-align: center;
}

.feedback-global.ok {
  color: var(--success-text);
}

.feedback-global.nope {
  color: var(--error-text);
}

/* 2 stĺpce zostávajú VŽDY (aj na mobile aj na PC) */
.board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.panel {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.panel-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: #111;
  text-align: center;
}

.panel-subtitle {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.item-list {
  display: grid;
  gap: 10px;
}

/* Tlačidlá s orezaním na max 2 riadky */
.match-item {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #eaeaea;
  border-radius: 12px;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #222;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
  word-break: break-word;
  white-space: normal;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 44px;
}

/* Po kliknutí alebo pri označení sa zobrazí celý text */
.match-item.expanded,
.match-item.selected,
.match-item.correct {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
  line-clamp: unset;
}

.match-item:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--primary-soft);
  transform: translateY(-1px);
}

.match-item.selected {
  border-color: var(--accent);
  background: #fdf7e7;
  box-shadow: 0 0 0 3px rgba(223, 183, 87, 0.25);
  color: #111;
}

.match-item.correct {
  background: var(--success-bg) !important;
  border-color: var(--success-border) !important;
  color: var(--success-text) !important;
  font-weight: bold;
  transform: none !important;
  box-shadow: none !important;
}

.match-item.wrong {
  background: var(--error-bg) !important;
  border-color: var(--error-border) !important;
  color: var(--error-text) !important;
  font-weight: bold;
}

.match-item.matched {
  opacity: 0.65;
  cursor: default;
}

.match-item:disabled {
  cursor: default;
}

.quiz-footer {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.quiz-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: none;
  border-radius: 999px;
  background: #222;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.quiz-button:hover {
  background: #000;
  transform: translateY(-1px);
}

.quiz-button-random {
  background: #f4eee1;
  color: #222;
  border: 1px solid var(--border);
}

.quiz-button-random:hover {
  background: #eae2cf;
}

.quiz-result {
  margin-top: 24px;
  padding: 18px;
  border-radius: var(--radius);
  background: #fffdf9;
  border: 2px solid var(--border);
  display: none;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
  box-shadow: var(--shadow);
}

/* Mobilné zariadenia - 2 stĺpce striktne vedľa seba */
@media (max-width: 760px) {
  .quiz-app {
    margin: 10px auto;
    padding: 4px;
    width: 100%;
  }

  .quiz-title {
    font-size: 19px;
  }

  .board {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }

  .panel {
    padding: 8px 4px !important;
    min-width: 0 !important;
  }

  .panel-title {
    font-size: 13px !important;
  }

  .panel-subtitle {
    font-size: 11px !important;
    margin-bottom: 6px !important;
  }

  .item-list {
    gap: 6px !important;
  }

  .match-item {
    padding: 8px 6px !important;
    font-size: 12px !important;
    min-height: 44px !important;
    line-height: 1.25 !important;
  }

  .quiz-footer {
    flex-direction: column;
    gap: 8px;
  }

  .quiz-button {
    width: 100%;
  }
}