/* style.css */
@import url('https://fonts.googleapis.com/css2?family=Google+Sans+Code:ital,wght@0,300..800;1,300..800&family=Google+Sans+Flex:opsz,wght@6..144,1..1000&display=swap');

* {
    font-family: 'Google Sans Flex';
}

:root {
    --bg-light: #DAD7CD;    /* [cite: 1] */
    --accent-light: #A3B18A; /* [cite: 2] */
    --primary: #588157;      /* [cite: 3] */
    --text-dark: #3A5A40;    /* [cite: 4] */
    --text-darker: #344E41;  /* [cite: 6] */
    --white: #ffffff;
}

body {
    background-color: var(--bg-light);
    color: var(--text-darker);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
}

.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Status Panel (Fajfka/Křížek) */
.status-card {
    background-color: var(--white);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    border: 2px solid var(--primary);
}

.icon-large {
    font-size: 80px;
    display: block;
    margin-bottom: 10px;
}

.status-free { color: var(--primary); }
.status-busy { color: #d9534f; /* Červená pro obsazeno - výjimka z palety pro signalizaci */ }

h1, h2 { color: var(--text-darker); }

/* Formuláře a tlačítka */
input, select, textarea {
    width: 100%;
    padding: 10px;
    margin: 5px 0 15px 0;
    border: 1px solid var(--accent-light);
    border-radius: 5px;
    box-sizing: border-box;
}

button {
    background-color: var(--primary);
    color: var(--white);
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

button:hover {
    background-color: var(--text-dark);
}

button.delete-btn {
    background-color: #344E41;
    margin-left: 10px;
}

/* Tabulka a Kalendář */
#calendar {
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
}

/* Úprava FullCalendar barev */
.fc-event {
    border: none;
}
.fc-toolbar-title {
    color: var(--text-darker) !important;
}
.fc-button-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}
.fc-button-active {
    background-color: var(--text-dark) !important;
}

/* Login box */
.login-box {
    max-width: 400px;
    margin: 100px auto;
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.modal {
    display: none; /* Ve výchozím stavu skryté */
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.5); /* Poloprůhledné pozadí */
    backdrop-filter: blur(2px); /* Rozmazání pozadí */
}

.modal-content {
    background-color: var(--white);
    margin: 15% auto; 
    padding: 25px;
    border: 2px solid var(--primary);
    border-radius: 10px;
    width: 80%; 
    max-width: 500px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {opacity: 0; transform: translateY(-20px);}
    to {opacity: 1; transform: translateY(0);}
}

.close-btn {
    color: var(--text-darker);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close-btn:hover,
.close-btn:focus {
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
}

.modal-label {
    font-weight: bold;
    color: var(--text-dark);
    display: block;
    margin-top: 10px;
}
/* --- FOOTER --- */
/* Přidat na konec style.css */

/* Zajistíme, aby patička byla vždy dole, i když je málo obsahu */
html, body {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.container, .login-box {
    flex: 1 0 auto; /* Obsah se roztáhne */
}

footer {
    flex-shrink: 0;
    text-align: center;
    padding: 20px;
    background-color: var(--primary); /* Zelená z palety */
    color: var(--white);
    margin-top: 40px;
    font-size: 0.9em;
}

footer a {
    color: var(--white);
    text-decoration: none;
    font-weight: bold;
}
/* --- MOBILE FIRST ÚPRAVY --- */
@media (max-width: 768px) {
    .container {
        padding: 10px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    h1 {
        font-size: 24px;
        margin-top: 10px;
    }

    /* Status karta kompaktnější */
    .status-card {
        padding: 20px 10px;
        margin-bottom: 20px;
    }
    
    .icon-large {
        font-size: 60px;
    }
    
    h2#status-text {
        font-size: 1.2rem;
    }

    /* Kalendář na mobilu */
    #calendar {
        padding: 10px;
    }
    
    /* Hlavička kalendáře - zmenšení písma a tlačítek */
    .fc-toolbar-title {
        font-size: 1.2em !important;
    }
    
    .fc .fc-button {
        padding: 0.4em 0.65em;
        font-size: 0.9em;
    }

    /* V modálním okně na mobilu roztáhnout na šířku */
    .modal-content {
        width: 90%;
        margin: 20% auto;
        padding: 20px;
    }

    /* Formuláře na admin stránce */
    input, select, textarea {
        font-size: 16px; /* Zabraňuje zoomování na iPhonech */
    }

    /* Skládání elementů v adminu pod sebe */
    #event-form > div[style*="display: flex"] {
        flex-direction: column;
        gap: 0;
    }
    
    #event-form > div[style*="display: flex"] > div {
        margin-bottom: 0;
    }
}
/* --- LANDING PAGE (ROZCESTNÍK) - OPRAVA --- */

/* Nastavení pro celou stránku - centruje vertikálně */
.landing-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    justify-content: center;
    background-color: var(--bg-light);
}

.landing-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centruje obsah vertikálně */
    align-items: center;     /* Centruje obsah horizontálně */
    width: 100%;
}

/* Obalovač tlačítek - drží je vedle sebe */
.selection-wrapper {
    display: flex !important;       /* Důležité: vynutí flexbox */
    flex-direction: row;            /* Důležité: řadí vedle sebe */
    justify-content: center;        /* Zarovná na střed */
    align-items: center;            /* Zarovná na svislý střed */
    gap: 40px;                      /* Mezera mezi kartami */
    width: 100%;
    max-width: 900px;
    flex-wrap: wrap;                /* Povolí zalomení jen na malých mobilech */
}

/* Styl karet (tlačítek) */
.club-card {
    background-color: var(--white);
    border: 3px solid var(--primary); /* Silnější rámeček */
    border-radius: 15px;
    padding: 40px 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text-darker);
    width: 220px;                   /* Pevná šířka pro konzistenci */
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    cursor: pointer;
}

/* Efekt při najetí myší */
.club-card:hover {
    
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.club-card h2 {
    margin: 0 0 15px 0;
    font-size: 22px;
    color: inherit;
    text-decoration: none;
}

.arrow {
    font-size: 28px;
    font-weight: bold;
}

/* Svislá čára */
.vertical-separator {
    width: 2px;
    height: 120px;
    background-color: var(--text-darker);
    opacity: 0.3;
}

/* --- MOBILNÍ ZOBRAZENÍ (pouze pro malé displeje) --- */
@media (max-width: 600px) {
    .selection-wrapper {
        flex-direction: column; /* Pod sebe jen na mobilu */
        gap: 20px;
    }

    .club-card {
        width: 80%; /* Širší tlačítka na mobilu */
    }

    .vertical-separator {
        width: 50%;
        height: 2px; /* Změna na vodorovnou čáru */
        margin: 10px 0;
    }
}