@font-face {
    font-family: Playfair;
    src: url(./font/Playfair-VariableFont_opsz\,wdth\,wght.ttf);
}
@font-face {
    font-family: Inter;
    src: url(./font/Inter-VariableFont_opsz\,wght.ttf);
}

*{
    margin: 0;
    padding: 0;
    color: #3f4e55;
    font-family: Inter;
    font-display: Inter;
}
p{
    font-family: Inter;
    font-size: normal;
    text-align: justify;
}
a{
    font-style: normal;
    text-decoration: none;
    font-size: 12px;
}
#loga{
    display: inline-block;
    padding-right: 25%;
    padding-left: 25%;
}
#logo{
    width: 35%;
    padding-right: 30%;
    padding-left: 5%;
}
#textLoga{
    width: 25%;
    padding-bottom: 2%;
}
main{
    background-color: white;
    margin-left: 23%;
    margin-right: 23%;
}
header{
    padding: 20px;
    clear: both;
    background-color: #f2f2f2;
    padding-right: 0;
    padding-left: 0;
}
label{
    font-size: 20px;
}
footer{
    padding: 20px;
    font-weight: bold;
    text-align: center;
    background-color: #f2f2f2;
    clear: both;
}
h1{
    padding: 0;
    margin: 0;
}
h2{
    font-family: Playfair;
    font-style: normal;
    text-decoration: none;
    font-size: 10px;
}
h3{
    font-family: Playfair;
    font-style: normal;
    font-size: 30px;
}
div {
    background-color: #f2f2f2;
}
#rozcestnik{
    padding-top: 10px;
    padding-bottom: 10px;
    margin-left: 23%;
    margin-right: 23%;
}
#oNas,#kandidati,#nasProgram,#kontakty{
    font-size: 1.5vw;
    font-weight: bold;
    color: #C4B99F;
    display: inline-block;
    width: 25%;
    padding-top: 0.8em;
    padding-bottom: 1em;
    text-align: center;
    height: 1.5vw;
}
#oNas:hover,#kandidati:hover,#nasProgram:hover,#kontakty:hover{
    opacity: 0.7;
    transition-duration: 600ms;
}
#oNas{
    background-color: #E7343F;
    transition-duration: 600ms;
}
#kandidati{
    background-color: #022A39;
    transition-duration: 600ms;
}
#nasProgram{
    background-color: #E7343F;
    transition-duration: 600ms;
}
#kontakty{
    background-color: #022A39;
    transition-duration: 600ms;
}
.fa{
    padding: 8px;
    font-size: 10px;
    width: 20px;
    height: 20px;
    text-align: center;
    text-decoration: none;
    border-radius: 25%;
    transition-duration: 600ms;
}
.fa:hover{
    opacity: 0.7;
    transition-duration: 600ms;
}
.fa-facebook{
    background: #3B5998;
    color: white;
}
.fa-instagram{
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); 
    background: -webkit-radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    color: white;
}
.fa-envelope{
    background: #C4B99F;
    color: #022A39;
}
.fa-phone{
    background: #C4B99F;
    color: #022A39;
}
.opacity{
    transition-duration: 600ms;
}
.opacity:hover{
    opacity: 0.7;
    transition-duration: 600ms;
}
#programUvod{
    font-size: 4vw;
    color: #E7343F;
}
#nadpisProgramu{
    text-align: center;
    padding: 1%;
    cursor: pointer;
    transition-duration: 600ms;
}
#nadpisProgramu:hover{
    opacity: 0.5;
    transition-duration: 600ms;
}
.textProgramu{
    display: none;
    padding: 3%;
    grid-template-columns: 5% auto;
    gap: 20px 15px;
    width: 100%;
    margin: 30px 0;
}
.oddelovac{
    margin-left: 23%;
    margin-right: 23%;
}

/* Scroll up button */
#myBtn{
    display: none;
    position: fixed;
    bottom: 20px;
    right: calc(50% - 15px);
    z-index: 99;
    border: none;
    outline: none;
    background-color: #000000;
    color: white;
    cursor: pointer;
    padding: 15px;
    padding-right: 31px;
    padding-bottom: 33px;
    border-radius: 10px;
    font-size: 18px;
}
#myBtn:hover{
    background-color: #555;
}

/* Postranní bannery */
.side-banner {
    position: fixed;
    top: 1vw;                   /* Odstup od horního okraje */
    bottom: 1vw;                 /* Odstup od spodního okraje -> výška se dopočítá sama */
    width: 20vw;                  /* Šířka se přizpůsobuje šířce okna (11 % šířky) */
    z-index: 100;
    border-radius: 8px;
    overflow: hidden;             /* Ořízne obrázek podle border-radiusu */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.side-banner-left {
    left: 1vw;
}

.side-banner-right {
    right: 1vw;
}

.side-banner img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;            /* Fotka vyplní banner bez deformace poměru stran */
    transition: opacity 1s ease-in-out; /* Rychlost prolínání */
}

.side-banner img.img-top {
    z-index: 2;
    opacity: 1;
}

.side-banner img.img-bottom {
    z-index: 1;
    opacity: 1;
}

/* Mřížka kandidátů */
.candidates-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* PC: 4 vedle sebe */
    gap: 20px 15px;
    width: 100%;
    margin: 30px 0;
}

.candidate-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    align-self: start;
}

.candidate-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.candidate-header {
    cursor: pointer;
}

.candidate-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 10px auto;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #C4B99F;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.candidate-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.candidate-name {
    font-size: 1rem;
    font-weight: bold;
    color: #1a1a1a;
    margin: 5px 0 0 0;
}

/* Pop-up modal - neprůstřelné vycentrování na PC i mobilu */
.modal {
    display: none; /* Ve výchozím stavu skryté */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box; /* Důležité: zabrání přetékání na mobilu */
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 99999; /* Zaručí, že bude nad všemi bannery a prvky stránky */
    padding: 15px;
    backdrop-filter: blur(4px);
}

/* Aktivní stav - zobrazení přes flexbox */
.modal.active {
    display: flex !important;
    justify-content: center; /* Horizontální vycentrování */
    align-items: center;     /* Vertikální vycentrování */
}

/* Vnitřní bílý box s obsahem */
.modal-content {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 600px;     /* Maximální šířka okna */
    max-height: 85vh;     /* Aby nebylo vyšší než 85 % výšky displeje */
    overflow-y: auto;     /* Povolí skrolování uvnitř okna u dlouhých textů */
    padding: 25px;
    position: relative;
    box-sizing: border-box;
    margin: auto;          /* Doplňková pojistka vycentrování */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    animation: modalPop 0.25s ease-out;
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Tlačítko zavřít (Křížek X) */
.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    font-weight: bold;
    color: #888;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: #e30613; /* Červená z loga */
}

/* Hlavička modalu (Fotka + Jméno) */
.modal-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.modal-avatar {
    width: 130px;
    height: 130px;
    margin: 0 auto 15px auto;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #C4B99F;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.modal-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-name {
    font-size: 1.4rem;
    color: #1a1a1a;
    margin: 0;
    font-weight: bold;
}

/* Text medailonku */
.modal-bio {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    text-align: justify;
}

.modal-bio p {
    margin-bottom: 12px;
}

/* Skrytí původních bio přímo v kartičkách mřížky */
.candidate-bio {
    display: none !important;
}

/* Mobile version */
@media screen and (max-width:702px){
    main{
        margin: 0;
        padding: 10px;
	}

    #oNas,#kandidati,#nasProgram,#kontakty{
        font-size: 7vw;
        padding-top: 0.3em;
        padding-bottom: 1.3em;
        height: 1.5vw;
        display: block;
        width: 100%;
        margin: none;
    }

    #rozcestnik{
        margin: 0;
    }

    .dropdown{
        width: 100%;
        display: block;
        transform: translateX(0px);
    }

    #kandidati{
        transform: translateX(0px);
    }

    .dropdown:hover .dropdown-content{display: none;}
    
    #loga{
        padding-right: 5%;
        padding-left: 5%;
    }

    #logo{
        width: 100%;
        padding: 0;
    }

    #textLoga{
        width: 90%;
        padding-right: 5%;
        padding-left: 5%;
    }

    p{
        font-size: large;
    }

    .oddelovac{
    margin-left: 0;
    margin-right: 0;
    }

    #programUvod{
    font-size: 12vw;
    }

    .side-banner {
        display: none;
    }

    .candidates-grid {
        grid-template-columns: repeat(2, 1fr); /* Mobil: 2 vedle sebe */
        gap: 12px 8px;
    }

    .candidate-card {
        padding: 10px 8px;
    }

    .candidate-avatar {
        width: 90px;
        height: 90px;
    }

    .candidate-name {
        font-size: 0.85rem;
    }
    
    .modal {
        padding: 10px; /* Menší vnější okraj na mobilech */
    }

    .modal-content {
        padding: 20px 15px;
        max-height: 90vh; /* Na mobilu může zabrat trochu více výšky */
        border-radius: 12px;
    }

    .modal-avatar {
        width: 100px;
        height: 100px;
    }

    .modal-name {
        font-size: 1.2rem;
    }

    .modal-bio {
        font-size: 0.95rem;
        text-align: left;
    }
}