/* Reset a základní nastavení */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, sans-serif;
    /* Layered background: darker green at top, softer below, with highlights */
    background-color: #eaf6ef;
    /* fallback color */
    background-image:
        radial-gradient(1200px 400px at 8% 8%, rgba(255, 255, 255, 0.45), transparent),
        radial-gradient(800px 300px at 85% 85%, rgba(255, 255, 255, 0.28), transparent),
        linear-gradient(180deg, #5f9a2f 0%, #79b93b 30%, #9cd66a 70%, #dff5d9 100%);
    background-blend-mode: overlay, overlay, normal;
    background-attachment: fixed;
    color: #21321a;
    line-height: 1.6;
}

:root {
    --accent: #2e7d32;
    --muted: #6b8a5a;
    --panel-bg: rgba(255, 255, 255, 0.95);
    --radius: 12px;
}

.footer-basic {
    padding: 40px 0;
    background-color: #ffffff;
    color: #4b4c4d;
}


.footer-basic ul {
    padding: 0;
    list-style: none;
    text-align: center;
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 0;
}

.footer-basic li {
    padding: 0 10px;
}

.footer-basic ul a {
    color: inherit;
    text-decoration: none;
    opacity: 0.8;
}

.footer-basic ul a:hover {
    opacity: 1;
}

.footer-basic .social {
    text-align: center;
    padding-bottom: 25px;
}

.footer-basic .social>a {
    font-size: 24px;
    width: 40px;
    height: 40px;
    line-height: 40px;
    display: inline-block;
    text-align: center;
    border-radius: 50%;
    border: 1px solid #ccc;
    margin: 0 8px;
    color: inherit;
    opacity: 0.75;
}

.footer-basic .social>a:hover {
    opacity: 0.9;
}

.footer-basic .copyright {
    margin-top: 15px;
    text-align: center;
    font-size: 13px;
    color: #aaa;
    margin-bottom: 0;
}

.footer-basic .footer-logo {
    text-align: center;
    margin-top: 10px;
}

.footer-basic .footer-logo img {
    height: 40px;
    display: inline-block;
    /* vycentruje logo */
}

/* Grid layout */
.container {
    display: grid;
    grid-template-columns: 300px 550px 300px;
    gap: 20px;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
}

/* Levý panel */
aside.left {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.nav-logo {
    display: block;
    margin: 0 auto 12px;
    max-width: 160px
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0
}

.nav-list li {
    list-style: none
}

.nav-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    border: 1px solid transparent
}

.nav-list a:hover {
    background: linear-gradient(90deg, rgba(46, 125, 50, 0.06), rgba(46, 125, 50, 0.02));
    box-shadow: inset 0 0 0 1px rgba(46, 125, 50, 0.04)
}

.nav-list a:focus-visible {
    outline: 3px solid rgba(46, 125, 50, 0.12);
    outline-offset: 2px
}

.nav-list a.active {
    background: linear-gradient(90deg, rgba(46, 125, 50, 0.12), rgba(46, 125, 50, 0.06));
    box-shadow: none
}

.search-box {
    display: flex;
    flex-direction: column;
    gap: 6px
}

.search-box label {
    font-size: 0.9rem;
    color: var(--muted)
}

.search-box input {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(16, 24, 32, 0.06)
}

.contact-info {
    font-size: 0.95rem;
    color: var(--muted)
}


/* Střední panel */
main {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

main h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #567125;
    text-align: center;
}

main p {
    margin-bottom: 20px;
    color: #567125;
    text-align: center;
}

main h3 {
    margin-bottom: 5px;
    color: #567125;
    text-align: left;
}

/* Tabulka výboru */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

.styled-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
    font-size: 1rem;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #567125;
}

.styled-table thead tr {
    background-color: #567125;
    color: #ffffff;
    text-align: left;
    font-weight: bold;
}

.styled-table th,
.styled-table td {
    padding: 14px 18px;
    border: 1px solid #c9d6af;
}

.styled-table tbody tr:nth-child(even) {
    background-color: #f6fbe9;
}

.styled-table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

.styled-table tbody tr:hover {
    background-color: #e3f2d1;
    transition: background-color 0.2s ease-in-out;
}

/* Pravý panel */
aside.right {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

aside.right h2 {
    margin-bottom: 15px;
}

form {
    display: grid;
    gap: 15px;
}

label {
    display: flex;
    flex-direction: column;
    font-weight: bold;
}

input,
textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

button {
    background: #0066cc;
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background: #0055a3;
}

.confirmation {
    display: none;
    background: #e0ffe0;
    border: 1px solid #90ee90;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
}

/* Footer */
.footer-basic {
    padding: 40px 0;
    background-color: #ffffff;
    color: #4b4c4d;
}

.footer-basic ul {
    padding: 0;
    list-style: none;
    text-align: center;
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 0;
}

.footer-basic li {
    padding: 0 10px;
}

.footer-basic ul a {
    color: inherit;
    text-decoration: none;
    opacity: 0.8;
}

.footer-basic ul a:hover {
    opacity: 1;
}

.footer-basic .social {
    text-align: center;
    padding-bottom: 25px;
}

.footer-basic .social>a {
    font-size: 24px;
    width: 40px;
    height: 40px;
    line-height: 40px;
    display: inline-block;
    text-align: center;
    border-radius: 50%;
    border: 1px solid #ccc;
    margin: 0 8px;
    color: inherit;
    opacity: 0.75;
}

.footer-basic .social>a:hover {
    opacity: 0.9;
}

.footer-basic .copyright {
    margin-top: 15px;
    text-align: center;
    font-size: 13px;
    color: #aaa;
    margin-bottom: 0;
}

.footer-basic .footer-logo {
    text-align: center;
    margin-top: 10px;
}

.footer-basic .footer-logo img {
    height: 40px;
    display: inline-block;
    /* vycentruje logo */
}

/* Responsivita */
@media(max-width:900px) {
    .container {
        grid-template-columns: 1fr;
    }

    aside.left,
    aside.right,
    main {
        order: initial;
    }
}
/* --- MOBILNÍ MENU A ÚPRAVY ROZLOŽENÍ --- */

/* Výchozí stav: mobilní prvky jsou na desktopu skryté */
.mobile-header, .mobile-nav-overlay {
    display: none;
}

/* Responsivita pro mobily a tablety (pod 900px) */
@media(max-width: 900px) {
    
    /* 1. Změna rozložení stránky */
    .container {
        display: flex;
        flex-direction: column;
        margin-top: 60px; /* Místo pro fixní horní lištu */
    }

    /* PŘEHÁZENÍ POŘADÍ PRVKŮ (Order) */
    /* Hlavní obsah bude první */
    main {
        order: 1;
    }

    /* Pravý panel (Formulář) bude druhý */
    aside.right {
        order: 2;
    }

    /* Levý panel (Mapa a adresa) bude až nakonec */
    aside.left {
        order: 3;
        margin-top: 0;
    }

    /* 2. Skrytí duplicitní navigace a vyhledávání v levém panelu */
    /* Na mobilu nechceme navigaci dole, je v hamburger menu */
    aside.left nav, 
    aside.left .search-box, 
    aside.left .nav-logo {
        display: none;
    }

    /* Ujištění, že mapa a kontakt zůstanou viditelné */
    aside.left .contact-info, 
    aside.left iframe {
        display: block;
        width: 100%;
    }

    /* 3. Stylování horní lišty (Hamburger) */
    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background-color: var(--accent); /* Zelená */
        padding: 15px 20px;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        color: white;
    }

    .mobile-title {
        font-weight: 700;
        font-size: 1.1rem;
    }

    .hamburger {
        cursor: pointer;
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .hamburger span {
        display: block;
        width: 25px;
        height: 3px;
        background-color: white;
        border-radius: 3px;
    }

    /* 4. Stylování vyjížděcího menu */
    .mobile-nav-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: -100%; /* Skryté vlevo mimo obrazovku */
        width: 280px; /* Šířka menu */
        height: 100vh;
        background-color: #fff;
        z-index: 1001;
        transition: left 0.3s ease-in-out;
        box-shadow: 2px 0 10px rgba(0,0,0,0.2);
        padding: 20px;
        overflow-y: auto;
    }

    .mobile-nav-overlay.active {
        left: 0; /* Vysunutí */
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 20px;
        font-size: 40px;
        cursor: pointer;
        color: var(--accent);
    }

    .mobile-nav-logo {
        max-width: 120px;
        display: block;
        margin: 40px auto 20px;
    }

    .mobile-nav-list {
        list-style: none;
        padding: 0;
        text-align: center;
    }

    .mobile-nav-list li {
        margin: 15px 0;
    }

    .mobile-nav-list a {
        text-decoration: none;
        color: #21321a;
        font-size: 1.2rem;
        font-weight: 600;
        display: block;
        padding: 10px;
        border-radius: 8px;
    }

    .mobile-nav-list a:hover, 
    .mobile-nav-list a.active {
        background-color: #eaf6ef;
        color: var(--accent);
    }
    
    /* Vypnutí gridu z původního CSS, aby fungoval Flexbox */
    .container {
        grid-template-columns: none;
    }
}