/* ==================================================
   OBSAH
   1. Root / proměnné
   2. Reset / globální nastavení
   3. Základní layout a typografie
   4. Page system
   5. Header
   6. Navigace
   7. Opakovaně používané komponenty
   8. Textový obsah
   9. Tabulky
   10. Tlačítka
   11. Footer
   12. Responsive - tablet
   13. Responsive - mobil
================================================== */

/* ==================================================
   1. ROOT / PROMĚNNÉ
================================================== */
:root {
    --primary-color: #004aad;
    --hero-bg: #ebf2fa;
    --text-color: #222;
    --white: #fff;
    --footer-bg: #1a1a1a;
    --nav-bg: #2f2f2f;
    --muted-text: #666;
    --border-light: #ddd;
    --shadow-soft: 0 4px 10px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 8px 24px rgba(0, 36, 82, 0.06);
    --radius-md: 12px;
    --radius-lg: 16px;
}

/* ==================================================
   2. RESET / GLOBÁLNÍ NASTAVENÍ
================================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: "Montserrat", sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(
        90deg,
        #e9f0f8 0%,
        #f7faff 20%,
        #ffffff 50%,
        #f7faff 80%,
        #e9f0f8 100%
    );
}

/* ==================================================
   3. ZÁKLADNÍ LAYOUT A TYPOGRAFIE
================================================== */
main {
    display: block;
    flex: 1;
    width: 100%;
    max-width: 1080px;
    margin: 40px auto;
    padding: 30px 20px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 36, 82, 0.08);
}

main section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

main section + section {
    margin-top: 48px;
}

h2 {
    margin-bottom: 25px;
    font-size: 2rem;
    color: var(--primary-color);
}

/* ==================================================
   4. PAGE SYSTEM
================================================== */
.page-shell {
    max-width: 1040px;
    margin: 0 auto;
}

.page-intro {
    margin-bottom: 32px;
}

.page-intro h2 {
    margin-bottom: 0;
}

.page-intro p {
    max-width: 800px;
    margin-top: 10px;
    line-height: 1.7;
    color: #555;
}

.page-section {
    margin-top: 34px;
}

.page-section h3 {
    margin-bottom: 20px;
}

/* ==================================================
   5. HEADER
================================================== */
header {
    background: var(--white);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.header-container {
    display: flex;
    align-items: center;
    gap: 18px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 20px;
}

.main-logo {
    display: block;
    width: 72px;
    height: 72px;
    object-fit: contain;
    flex-shrink: 0;
}

.title-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.title-box h1 {
    margin: 0;
    font-size: 2.2rem;
    line-height: 1.1;
    font-weight: 700;
    color: var(--text-color);
}

.tagline {
    margin-top: 6px;
    font-size: 0.98rem;
    line-height: 1.4;
    color: var(--muted-text);
}

/* ==================================================
   6. NAVIGACE
================================================== */
#menu-bar,
.submenu-toggle {
    display: none;
}

nav {
    background: var(--nav-bg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    min-height: 64px;
}

.nav-container {
    display: flex;
    align-items: center;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.main-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 10px 0;
}

.main-nav li {
    position: relative;
}

.main-nav a,
.submenu-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.main-nav a:hover,
.submenu-label:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
}

.main-nav a.active {
    color: var(--white);
}

.main-nav a::after,
.submenu-label::after {
    content: "";
    position: absolute;
    left: 16px;
    bottom: 7px;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.25s ease;
}

.main-nav a:hover::after,
.submenu-label:hover::after,
.main-nav a.active::after {
    width: calc(100% - 32px);
}

.arrow {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--white);
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

/* Submenu - desktop */
.submenu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 210px;
    margin: 0;
    padding: 8px 0;
    list-style: none;
    background: var(--nav-bg);
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    z-index: 1000;
}

.submenu li a {
    display: block;
    padding: 11px 16px;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 500;
    border-radius: 0;
}

.submenu li a::after {
    display: none;
}

.submenu li a:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
}

.has-submenu:hover > .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.has-submenu:hover > .submenu-label .arrow {
    transform: rotate(180deg);
}

/* Hamburger animace */
#menu-bar:checked + .menu-toggle span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

#menu-bar:checked + .menu-toggle span:nth-child(2) {
    opacity: 0;
}

#menu-bar:checked + .menu-toggle span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ==================================================
   7. OPAKOVANĚ POUŽÍVANÉ KOMPONENTY
================================================== */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 30px 0 40px;
}

.card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
}

.card-header {
    padding: 15px;
    text-align: center;
    font-weight: 700;
    color: var(--white);
    background-color: var(--primary-color);
}

.card-body {
    padding: 15px;
    text-align: center;
    color: var(--text-color);
    font-weight: 700;
}

.card img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
}

/* ==================================================
   8. TEXTOVÝ OBSAH
================================================== */
.history-article p {
    margin-bottom: 18px;
    line-height: 1.8;
    color: #444;
}

.history-quote {
    margin: 28px 0;
    padding: 22px 24px;
    background: #f8fbff;
    border-left: 4px solid var(--primary-color);
    border-radius: 12px;
    line-height: 1.8;
}

.history-quote cite {
    display: block;
    margin-top: 10px;
    font-size: 0.92rem;
    color: #6b7280;
}

/* ==================================================
   9. TABULKY
================================================== */
.table-wrapper {
    margin: 20px 0;
    overflow-x: auto;
    border: 1px solid #dbe4f0;
    border-radius: var(--radius-lg);
    background-color: var(--white);
    box-shadow: var(--shadow-medium);
}

.table-wrapper table,
table {
    width: 100%;
    border-collapse: collapse;
}

.table-wrapper table {
    min-width: 650px;
}

th,
td {
    padding: 12px;
    text-align: left;
    border: 1px solid var(--border-light);
}

th {
    color: var(--white);
    background-color: var(--primary-color);
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

.table-wrapper thead {
    background: linear-gradient(180deg, #0a56be 0%, var(--primary-color) 100%);
}

.table-wrapper th {
    padding: 16px 18px;
    border: 0;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.table-wrapper td {
    padding: 15px 18px;
    border: 0;
    border-top: 1px solid #e9eef5;
    color: #334155;
    font-size: 0.96rem;
    vertical-align: middle;
}

.table-wrapper tbody tr:nth-child(even) {
    background-color: #f8fbff;
}

.table-wrapper tbody tr:hover {
    background-color: #eef5ff;
}

/* ==================================================
   10. TLAČÍTKA
================================================== */
.info-btn,
.back-btn {
    display: inline-block;
    padding: 12px 24px;
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    background-color: var(--primary-color);
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.info-btn:hover,
.back-btn:hover {
    background-color: #00357d;
    transform: translateY(-2px);
}

/* ==================================================
   11. FOOTER
================================================== */
footer {
    background: #1f1f1f;
    color: rgba(255, 255, 255, 0.8);
    border-top: 3px solid var(--primary-color);
}

.simple-footer {
    max-width: 1100px;
    margin: 0 auto;
    padding: 42px 20px 24px;
    text-align: center;
}

.simple-footer h3 {
    margin-bottom: 6px;
    font-size: 1.25rem;
    color: #fff;
}

.footer-tagline {
    margin-bottom: 6px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-location {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.55);
}

.footer-bottom {
    padding: 16px 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-bottom p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ==================================================
   12. RESPONSIVE - TABLET
================================================== */
@media (max-width: 850px) {
    main {
        margin: 32px auto;
        padding: 24px 18px;
        border-radius: 14px;
    }

    main section {
        padding: 0 14px;
    }

    h2 {
        font-size: 1.8rem;
    }

    .page-intro {
        margin-bottom: 28px;
    }

    .page-section {
        margin-top: 28px;
    }

    .page-section h3 {
        margin-bottom: 18px;
    }

    .table-wrapper {
        border-radius: 12px;
    }

    .table-wrapper th,
    .table-wrapper td {
        padding: 13px 14px;
        font-size: 0.92rem;
    }

    .back-btn {
        width: 100%;
        text-align: center;
    }
}

/* ==================================================
   13. RESPONSIVE - MOBIL
================================================== */
@media (max-width: 768px) {
    main {
        margin: 24px auto;
        padding: 20px 16px;
        border-radius: 12px;
    }

    main section {
        padding: 0 10px;
    }

    h2 {
        font-size: 1.65rem;
    }

    .page-intro {
        margin-bottom: 24px;
    }

    .page-intro p {
        font-size: 0.95rem;
    }

    .page-section {
        margin-top: 24px;
    }

    .page-section h3 {
        margin-bottom: 16px;
    }

    .header-container {
        gap: 14px;
        padding: 18px 16px;
    }

    .main-logo {
        width: 58px;
        height: 58px;
    }

    .title-box h1 {
        font-size: 1.6rem;
    }

    .tagline {
        font-size: 0.9rem;
    }

    .nav-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 0 16px 12px;
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        width: 100%;
        max-width: 760px;
        margin: 0 auto;
        padding: 18px 0 14px;
        cursor: pointer;
    }

    .menu-toggle span {
        display: block;
        width: 30px;
        height: 3px;
        background-color: var(--white);
        border-radius: 999px;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .main-nav {
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 760px;
        margin: 8px auto 0;
        gap: 0;
        padding: 8px 0;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 16px;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
        backdrop-filter: blur(6px);
        overflow: hidden;
    }

    #menu-bar:checked ~ .main-nav {
        display: flex;
    }

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

    .main-nav a,
    .submenu-label {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 15px 18px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 0;
        font-size: 0.98rem;
    }

    .main-nav li:first-child a {
        border-top: none;
    }

    .main-nav a::after,
    .submenu-label::after {
        display: none;
    }

    .main-nav a.active {
        color: var(--white);
        background: rgba(255, 255, 255, 0.1);
        box-shadow: inset 3px 0 0 var(--primary-color);
    }

    .submenu {
        position: static;
        min-width: 100%;
        margin: 0;
        padding: 6px 10px 10px;
        background: rgba(255, 255, 255, 0.03);
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
    }

    .submenu-toggle:checked + .submenu-label + .submenu {
        display: block;
    }

    .submenu li a {
        padding: 12px 14px;
        margin-top: 6px;
        font-size: 0.93rem;
        font-weight: 500;
        white-space: normal;
        border: none;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.04);
    }

    .submenu li a.active {
        background: rgba(255, 255, 255, 0.12);
        box-shadow: inset 3px 0 0 var(--primary-color);
    }

    .submenu li a:hover {
        padding-left: 18px;
        background: rgba(255, 255, 255, 0.1);
    }

    .submenu-toggle:checked + .submenu-label .arrow {
        transform: rotate(180deg);
    }

    .arrow {
        transition: transform 0.2s ease;
    }

    .has-submenu:hover > .submenu {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .footer-bottom {
        padding: 16px 20px;
    }
}