/* Import Google Fonts - Amatic SC, Nunito a PT Sans Narrow */
@import url('https://fonts.googleapis.com/css2?family=Amatic+SC:wght@400;700&family=Nunito:wght@400;600;700&family=PT+Sans+Narrow:wght@400;700&display=swap');

/* Základní styly */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #f7ede2;
    color: #281207;
    line-height: 1.6;
    font-family: 'Nunito', sans-serif;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Banner bez titulku */
.banner {
    width: 100%;
    height: 200px;
    overflow: hidden;
    margin-bottom: 0;
    border-radius: 15px 15px 0 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    position: relative;
    background-color: #b97438;
}

.banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Navigace */
nav {
    background-color: #b97438;
    padding: 4px 0;
    margin-bottom: 30px;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: white;
    font-size: 2.8rem;
    font-weight: 700;
    font-family: 'Amatic SC', cursive;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.5);
    letter-spacing: 2px;
}

.menu-toggle {
    display: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    background: rgba(255,255,255,0.2);
    padding: 8px 12px;
    border-radius: 8px;
}

.menu {
    display: flex;
    list-style: none;
}

.menu li {
    position: relative;
    margin: 0 5px;
}

.menu a {
    color: white;
    text-decoration: none;
    padding: 6px 18px;
    display: block;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-family: 'Amatic SC', cursive;
    font-size: 1.3rem;
}

.menu a:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.submenu {
    display: none;
    position: absolute;
    background-color: #804000;
    width: 200px;
    z-index: 1;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    top: 100%;
    left: 0;
}

.submenu a {
    font-size: 1.3rem;
    border-radius: 0;
    font-weight: 700;
    color: white;
}

.submenu a:hover {
    background: rgba(255,255,255,0.3);
}

.menu li:hover .submenu {
    display: block;
}

/* Obsah */
.content {
    background-color: #ffe6cc;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background-color: #b97438;
}

h1 {
    font-family: 'Amatic SC', cursive;
    font-size: 3rem;
    margin-bottom: 25px;
    color: #804000;
    text-align: center;
    font-weight: 700;
}

h2 {
    font-family: 'Amatic SC', cursive;
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: #804000;
    font-weight: 700;
}

h3 {
    font-family: 'Amatic SC', cursive;
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #b97438;
    font-weight: 700;
}

p {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #281207;
}

strong {
    color: #804000;
}

/* Citát */
.quote {
    font-style: italic;
    font-size: 1.1rem;
    margin: 20px 0;
    color: #b97438;
    font-family: 'Georgia', serif;
}

/* Tabulka s jmény */
.names-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    font-family: 'PT Sans Narrow', sans-serif;
    font-size: 0.85rem;
}

.names-table th {
    background-color: #b97438;
    color: white;
    padding: 12px 8px;
    text-align: center;
    font-weight: bold;
    font-size: 1rem;
}

.names-table td {
    padding: 6px 8px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.8rem;
    line-height: 1.2;
}

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

.names-table tr:hover {
    background-color: #f0f0f0;
}

/* Barevné hlavičky podle skutečných barev */
.names-table th:nth-child(1) { background-color: #4a90e2; } /* MODRÁ */
.names-table th:nth-child(2) { background-color: #8b4513; } /* HNĚDÁ */
.names-table th:nth-child(3) { background-color: #d2b48c; color: #333; } /* BÉŽOVÁ */
.names-table th:nth-child(4) { background-color: #228b22; } /* ZELENÁ */
.names-table th:nth-child(5) { background-color: #ff69b4; } /* RŮŽOVÁ */

/* Iframe pro Google tabulku s výsledky - AKTUALIZOVÁNO */
.results-iframe {
    width: 100% !important;
    height: 800px; /* Zvětšeno z 500px na 800px */
    border: none;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin: 30px 0;
    display: block;
}

/* Iframe pro galerii oddílů */
.oddily-gallery {
    width: 100% !important;
    min-height: 800px;
    border: none;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin: 30px 0;
    background-color: white;
    display: block;
}

/* Responzivita pro iframe - AKTUALIZOVÁNO */
@media (max-width: 768px) {
    .results-iframe {
        height: 700px; /* Zvětšeno z 400px na 700px */
    }
    
    .oddily-gallery {
        min-height: 600px;
    }
}

@media (max-width: 480px) {
    .results-iframe {
        height: 600px; /* Zvětšeno z 350px na 600px */
    }
    
    .oddily-gallery {
        min-height: 500px;
    }
}

/* Responzivita pro tabulku */
@media (max-width: 768px) {
    .names-table {
        font-size: 0.65rem;
    }
    
    .names-table th,
    .names-table td {
        padding: 3px 2px;
    }
    
    .names-table th {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .names-table {
        font-size: 0.6rem;
        margin: 20px -10px;
    }
    
    .names-table th,
    .names-table td {
        padding: 2px 1px;
        line-height: 1.1;
    }
    
    .names-table th {
        font-size: 0.65rem;
        padding: 4px 2px;
    }
    
    /* Tučný font pro vedoucí - mobilní verze */
    .names-table .leaders td {
        font-weight: bold;
        font-size: 0.58rem;
    }
}

/* Fotogalerie */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 30px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    background: white;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.gallery-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Modal pro zvětšené obrázky */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image {
    max-width: 100vw;
    max-height: 100vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.close {
    position: fixed;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1001;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
}

.prev, .next {
    cursor: pointer;
    position: fixed;
    top: 50%;
    width: auto;
    padding: 20px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: 0.3s ease;
    border-radius: 0 8px 8px 0;
    background-color: rgba(0,0,0,0.6);
    user-select: none;
    z-index: 1001;
}

.next {
    right: 20px;
    border-radius: 8px 0 0 8px;
}

.prev {
    left: 20px;
}

.prev:hover, .next:hover {
    background-color: rgba(0,0,0,0.8);
}

.image-counter {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background-color: rgba(0,0,0,0.7);
    padding: 8px 16px;
    border-radius: 20px;
    font-family: 'Nunito', sans-serif;
    z-index: 1001;
}

/* Patička */
footer {
    background-color: #f7ede2;
    color: #804000;
    text-align: center;
    padding: 25px 0;
    margin-top: 40px;
    border-radius: 15px 15px 0 0;
    font-family: 'Amatic SC', cursive;
    font-size: 1.3rem;
    border-top: 3px solid #b97438;
}

/* Barevné třídy */
.color1 { color: #e7bd35; }
.color2 { color: #ece458; }
.color3 { color: #281207; }
.color4 { color: #847770; }
.color5 { color: #f3eae8; }

/* Responzivita */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .menu {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 15px;
    }
    
    .menu.active {
        display: flex;
    }
    
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .submenu {
        position: static;
        width: 100%;
        background-color: #804000;
        border-radius: 10px;
        margin-top: 5px;
    }
    
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }
    
    .banner {
        height: 150px;
    }
    
    .logo {
        font-size: 2.2rem;
        letter-spacing: 1px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .content {
        padding: 25px;
    }
    
    .banner-title {
        font-size: 2.5rem;
        padding: 15px 25px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .banner {
        height: 120px;
    }
    
    .logo {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }
    
    .banner-title {
        font-size: 2rem;
        padding: 10px 20px;
    }
}