/* Základní styly */
body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    margin: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: var(--line-height);
}
a { color: var(--link-color); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--text-color); text-decoration: none; }

h1, h2, h3 { margin-top: 0; font-weight: 600; }
h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }

/* Hlavička */
.header-wrapper {
    padding: 2rem 2rem 0; /* Odsazení shora a ze stran */
}
.site-header {
    background-color: var(--header-bg-color);
    padding: var(--header-padding) 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: var(--container-width);
    margin: 0 auto;
    border-radius: 8px; /* Zaoblené rohy */
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}
.site-logo a {
    color: var(--text-color);
    font-weight: bold;
    font-size: 1.5rem;
}
.site-logo img {
    max-height: 60px;
    display: block;
}

/* Navigace */
.primary-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}
.primary-navigation ul li a {
    color: var(--nav-link-color);
    padding: 1rem;
    display: block;
    border-radius: 4px;
    font-weight: 500;
}
.primary-navigation ul li a:hover {
    background-color: var(--nav-link-hover-bg);
    color: var(--link-color);
}

/* Kontejner obsahu */
.container {
    max-width: var(--container-width);
    margin: 2rem auto;
    padding: var(--container-padding);
    background-color: var(--container-bg-color);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.page-content {
    margin-top: 2rem;
}

/* Patička */
.footer-wrapper {
    padding: 0 2rem 2rem; /* Odsazení zdola a ze stran */
}
.site-footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--footer-bg-color);
    color: var(--footer-text-color);
    max-width: var(--container-width);
    margin: 0 auto;
    border-radius: 8px; /* Zaoblené rohy */
}
.site-footer a {
    color: #fff;
}
.lang-switcher {
    margin-top: 1rem;
}
.lang-switcher a {
    color: #aaa;
    margin: 0 0.5rem;
}
.lang-switcher a.active {
    color: #fff;
    font-weight: bold;
}

/* Hamburger tlačítko */
.mobile-nav-toggle { display: none; }
.mobile-nav-toggle .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Responzivita */
@media (max-width: 768px) {
    .header-wrapper, .footer-wrapper { padding: 1rem 1rem 0; }
    .footer-wrapper { padding-bottom: 1rem; }
    .site-header { height: 70px; }
    .mobile-nav-toggle {
        display: block; position: relative; z-index: 2000;
        background: transparent; border: 0; padding: 0.5em; cursor: pointer;
    }
    .mobile-nav-toggle::before, .mobile-nav-toggle::after {
        content: ''; position: absolute; width: 2em; height: 3px; background: var(--text-color); border-radius: 3px; transition: transform 0.3s ease-in-out;
        right: 0;
    }
    .mobile-nav-toggle::before { transform: translateY(-6px); }
    .mobile-nav-toggle::after { transform: translateY(6px); }
    .mobile-nav-toggle[aria-expanded="true"]::before { transform: rotate(45deg); }
    .mobile-nav-toggle[aria-expanded="true"]::after { transform: rotate(-45deg); }

    .primary-navigation {
        position: fixed; z-index: 100; inset: 0 0 0 30%;
        flex-direction: column; padding: min(20vh, 10rem) 2em;
        background: hsl(0 0% 100% / 0.4);
        backdrop-filter: blur(1rem);
        transform: translateX(100%);
        transition: transform 350ms ease-out;
    }
    .primary-navigation[data-visible="true"] { transform: translateX(0%); }
    .primary-navigation ul { flex-direction: column; gap: 1.5rem; width: 100%; text-align: center; }
    .primary-navigation ul li a {
        color: #000; /* Nastavení barvy na černou pouze pro mobilní verzi */
    }

    .primary-navigation ul li a:hover {
        color: #000; /* Zajistí, že text bude černý i při hoveru v mobilní verzi */
    }
}

/* Styly pro obsah z editoru */
.editor-row { display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 1.5rem 0; }
.editor-col { flex: 1; min-width: 200px; }
.table-wrapper { overflow-x: auto; margin: 1.5rem 0; border: 1px solid #dee2e6; }
.container table { border-collapse: collapse; font-size: 0.9em; min-width: 600px; }
.container th, .container td { border: 1px solid #ccc; padding: 0.75rem; text-align: left; }
.container th { background-color: #f8f9fa; }
.video-wrapper { position: relative; overflow: hidden; max-width: 100%; margin-bottom: 1rem; aspect-ratio: 16 / 9; }
.video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.container figure { padding: 0; max-width: 100%; overflow: auto; }
.container figure a { border: none; display: inline-block; line-height: 0; }
.container figure img { max-width: 100%; height: auto; display: block; margin-left: auto; margin-right: auto; cursor: pointer; }
.container figcaption { text-align: center; font-size: 0.9em; color: #6c757d; margin-top: 0.5rem; clear: both; }
.align-left { float: left; margin: 0.2rem 1.5rem 1rem 0; }
.align-right { float: right; margin: 0.2rem 0 1rem 1.5rem; }
.align-center { display: table; margin-left: auto; margin-right: auto; float: none; }
.style-shadow img { box-shadow: 0 4px 15px rgba(0,0,0,0.15); }
.style-bordered img { border: 1px solid #dee2e6; padding: 5px; }

/* Lightbox */
.lightbox { position: fixed; z-index: 3000; inset: 0; background: rgba(0,0,0,0.8); display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
.lightbox.active { opacity: 1; visibility: visible; }
.lightbox-content { position: relative; max-width: 90%; max-height: 90%; }
.lightbox-image { max-width: 100%; max-height: 100%; display: block; animation: zoomIn 0.3s ease; }
.lightbox-close { position: absolute; top: -40px; right: 0; font-size: 2.5rem; color: white; cursor: pointer; line-height: 1; }
@keyframes zoomIn { from { transform: scale(0.8); } to { transform: scale(1); } }

/* Styly pro menu v patičce */
.footer-navigation ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 20px 0;
    gap: 25px;
}

.footer-navigation a {
    /* Používáme CSS proměnnou načtenou z databáze */
    color: var(--footer-menu-link-color);
    text-decoration: none;
    font-size: 14px;
}

.footer-navigation a:hover {
    /* Používáme CSS proměnnou pro barvu při najetí myší */
    color: var(--footer-menu-link-hover-color);
    text-decoration: underline;
}
