
body {
    font-family: Arial, sans-serif;
    background: #f4f4f4;
    padding: 0;
    margin: 0;
    padding-top: 90px;
}

.menu-container {
    max-width: 800px;
    margin: 0 auto;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    transition: top 0.3s ease-in-out;
    padding-bottom: 40px;
}

.menu-wrapper {
    position: relative;
}

.menu-shadow {
    position: absolute;
    top: 5px;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.2);
    clip-path: polygon(0 0, 100% 0, 95% 100%, 5% 100%);
    border-radius: 10px;
    z-index: 0;
}

.menu {
    position: relative;
    background: #004a80;
    color: white;
    display: flex;
    justify-content: center;
    padding: 10px 0;
    clip-path: polygon(0 0, 100% 0, 95% 100%, 5% 100%);
    border-radius: 10px;
    z-index: 1;
}

.menu-item a {
    text-decoration: none; 
    color: inherit; 
    display: inline-block;  
    padding: 10px 20px;   
}

.menu-item a:hover {
    background: #003366;
    color: white;
}

.menu-item a.active {
    background: #002244;
    color: white;
}



.container {
    position: relative;
    max-width: 800px;
    margin: 5px auto 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    border: 1px solid #ccc;
    padding: 10px;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s forwards;
}

th {
    background: #0077cc;
    color: white;
}

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

h1 {
    text-align: center;
}

.hidden {
    display: none !important;
}

.clickable-row {
    cursor: pointer;
}
.clickable-row:hover {
    background-color: #f0f0f0;
}

.user-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.user-header h1 {
    flex: 1;
    text-align: center;
    margin: 0;
}

.back-button {
    background-color: #e0e0e0;
    border: none;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: background-color 0.2s ease;
}

.back-button:hover {
    background-color: #d0d0d0;
}

.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.fade-in {
    opacity: 1;
    transition: opacity 0.5s ease;
}

.social-link {
    display: inline-block;
    padding: 10px 15px;
    background: #004a80;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease;
}

.social-link:hover {
    background: #003366;
}


#events-container {
    padding: 40px;
    margin-top: 80px;
}

.events-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    align-items: stretch;
}

.event-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex: 0 1 calc(33% - 30px);
    box-sizing: border-box;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding: 15px;
}

.event-footer {
    margin-top: auto; 
    text-align: center;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.event-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.event-card h2 {
    font-size: 1.6em;
    margin: 10px 0;
}

.event-card p {
    margin: 5px 0;
    line-height: 1.4;
    margin-top: auto;
    text-align: center;
}

.event-date {
    font-weight: bold;
    color: #333;
    margin-top: 10px;
}

.event-past {
    color: #aa5555;          
    font-weight: 600;
    font-size: 0.9em;
    text-align: center;
    margin: 8px 0;
    text-transform: uppercase;
    letter-spacing: 1px;     
    opacity: 0.8;      
}

/* ANIMATION */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.modal {
    display: none; 
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    animation: fadeOut 0.3s forwards;
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s forwards;
}

.modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    transform: scale(0.8);
    opacity: 0;
    animation: zoomOut 0.3s forwards;
}

.modal.show .modal-content {
    animation: zoomIn 0.3s forwards;
}

.gallery {
    position: relative; /* důležité pro absolutní pozicování tlačítek */
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery img {
    display: block;
}

.gallery button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 2.5px;
    border-radius: 50%;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 40px;
    height: 40px;
}

.gallery button span {
    display: flex;
    align-items: center;
    justify-content: center;
}


#prev-btn {
    left: 5px; /* posunutí vlevo mimo obrázek */
}

#next-btn {
    right: 5px; /* posunutí vpravo mimo obrázek */
}

.gallery button:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Animace */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes zoomOut {
    from { transform: scale(1); opacity: 1; }
    to { transform: scale(0.8); opacity: 0; }
}

.close {
    position: absolute;
    top: 4px;
    right: 6px;
    font-size: 28px;
    cursor: pointer;
    color: #333;
    transition: transform 0.2s;
    z-index: 9999;
    border-radius: 6px;
}

.close:hover {
    transform: rotate(90deg);
    color: #e74c3c;
}

.modal-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
}


/* Mobile override */
@media only screen and (max-width: 768px) {
    body {
        background: #002244;
    }

    .event-card {
        flex: 0 1 100%;
        margin-bottom: 20px;
    }

    h1 {
        font-size: 1.3em;
    }
    .container {
        max-width: 100% !important;
        padding: 30px 10px 10px 10px; /* větší prostor nahoře */
    }

    table {
        width: 100% !important;
        font-size: 0.85rem; /* menší písmo pro mobil */
        /*table-layout: fixed; /* zabrání přetékání textu */
        word-wrap: break-word;
    }

    table th,
    table td {
        padding: 6px;
    }

    colgroup col {
        width: auto !important;
    }
    
    .user-table {
        table-layout: fixed;
        word-wrap: break-word;
    }

    .user-table th,
    .user-table td {
        padding: 6px;
        font-size: 0.85rem;
    }
}
