:root {
    --primary-blue: #6582e0;
    --secondary-gray-blue: #a4aebf;
    --dark-gray-text: #4c535b;
    --light-bg: #f7f9fc;
    --white: #ffffff;
    --border-color: #e8eaf0;
    --gradient: linear-gradient(45deg, #5a78d8, #7fa0f0);
}

@font-face {
    font-family: 'Tilda Sans';
    src: url('../Fonts/TildaSans-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

.lang-button {
    background: none;
    border: none;
    color: inherit; /* Zdědí barvu textu z rodiče */
    cursor: pointer;
    padding: 0;
    font: inherit; /* Zdědí styl písma */
    outline: inherit;
}

.lang-button:hover {
    /* Můžete přidat styl pro najetí myší, např. */
    text-decoration: underline;
}

@font-face {
    font-family: 'Tilda Sans';
    src: url('../Fonts/TildaSans-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px;
}

body {
    font-family: 'Tilda Sans', sans-serif;
    line-height: 1.7;
    color: var(--dark-gray-text);
    background-color: var(--white);
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;

}

main {
    flex: 1;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-header {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    z-index: 1000;
    padding: 25px 0;
    transition: padding 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.main-header.header-scrolled {
    padding: 15px 0;
    border-color: var(--border-color);
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;

}

.header-logo img {
    height: 65px;
    transition: height 0.3s ease;
}



.main-header.header-scrolled .header-logo img {
    height: 45px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-nav a {
    color: var(--dark-gray-text);
    text-decoration: none;
    font-weight: 700;
    margin: 0 10px;
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: var(--primary-blue);
}

.language-switcher .lang-button {
    display: inline-block; padding: 6px 14px; margin-left: 8px; border: 1px solid var(--border-color); border-radius: 20px; background-color: #fff; color: var(--dark-gray-text); text-decoration: none; font-weight: 600; font-size: 0.9em; transition: all 0.2s ease-in-out;
}
.language-switcher .lang-button:hover { background-color: var(--light-bg); }
.language-switcher .lang-button.active { background-color: var(--primary-blue); color: white; border-color: var(--primary-blue); }

.hamburger-menu {
    display: none;
    cursor: pointer;
}
.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background-color: var(--dark-gray-text);
    transition: all 0.3s ease-in-out;
}

#hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-image: var(--gradient);
    color: var(--white);
    padding: 80px 20px;
}

#hero h1 {
    font-size: 3.5em;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#hero .subtitle {
    font-size: 1.3em;
    max-width: 700px;
    margin: 0 auto 30px auto;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background-color: var(--white);
    color: var(--primary-blue);
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s, color 0.2s;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.cta-button.inverted {
    background-color: var(--primary-blue);
    color: var(--white);
}
.cta-button.inverted:hover {
    background-color: #5a78d8;
}

section {
    padding: 80px 0;
    position: relative;
}
section.event-detail-page {
    padding-top: 20px;
}
section:nth-of-type(odd) {
    background-color: var(--light-bg);
}

h2 {
    font-size: 2.8em;
    color: var(--dark-gray-text);
    margin-top: 0;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

section h2, .event-detail-page h2 {
    display: block;
}

section h2 {
    text-align: center;
}

section > .container > h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-blue);
    border-radius: 2px;
}

h2 + p {
    text-align: center;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 50px;
    font-size: 1.1em;
}
.solution-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.card {
    background-color: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.07);
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.12);
}

.card h3 {
    font-size: 1.4em;
    color: var(--primary-blue);
    margin-top: 0;
}

footer {
    background-color: var(--dark-gray-text);
    color: #aeb8c2;
    text-align: center;
    padding: 40px 0 30px 0;
}
footer .footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding-bottom: 30px;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
footer h3 {
    font-size: 1em;
    color: var(--secondary-gray-blue);
    margin-top: 0;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

footer p {
    color: var(--white);
    margin: 0;
}

footer .footer-grid p {
    font-size: 1.1em;
    font-weight: 700;
}

footer a {
    color: var(--white);
    font-weight: 700;
    font-size: 1.1em;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}
footer a:hover {
    color: var(--primary-blue);
    border-color: var(--primary-blue);
}
footer .copyright {
    margin-top: 0;
    font-size: 0.9em;
    color: var(--secondary-gray-blue);
    opacity: 0.8;
    font-weight: 400;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

.header-funding {
    display: flex;
    align-items: center;
    gap: 25px;
    border-left: 1px solid var(--border-color);
    padding-left: 30px;
}

.header-funding img {
    max-height: 80px;
    opacity: 0.7;
    transition: max-height 0.3s ease, opacity 0.2s ease;
}

.header-funding img:hover {
    opacity: 1;
}

.main-header.header-scrolled .header-funding img {
    max-height: 76px;
}

.footer-partners {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin-top: 15px;
}

.footer-partners img {
    max-height: 45px;
    opacity: 0.9;
    /* TENTO ŘÁDEK ZAJIŠŤUJE VIDITELNOST LOG NA TMAVÉM POZADÍ */
    filter: brightness(0) invert(1);
}

.footer-partners .logo-thd {
    max-height: 32px;
}
.footer-partners .logo-zcu {
    max-height: 32px;
}


.event-list {
    max-width: 800px;
    margin: 50px auto 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.event-item {
    background-color: var(--white);
    padding: 20px 25px;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.07);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid var(--primary-blue);
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

a.event-item {
    text-decoration: none;
    color: inherit;
}

.event-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.event-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.event-date {
    font-size: 0.9em;
    color: var(--secondary-gray-blue);
    font-weight: 600;
}

.event-title {
    font-size: 1.3em;
    color: var(--dark-gray-text);
    margin: 0;
    font-weight: 700;
}

.event-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 700;
    white-space: nowrap;
}

.status-past {
    background-color: var(--light-bg);
    color: var(--secondary-gray-blue);
    border: 1px solid var(--border-color);
}

.status-upcoming {
    background-color: var(--primary-blue);
    color: var(--white);
}

#project-updates .event-list {
    max-width: 700px;
}

.events-cta-container {
    text-align: center;
    margin-top: 40px;
}

section.event-detail-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 40px;
    width: 3px;
    height: 100%;
    background-color: var(--primary-blue);
    opacity: 0.2;
    z-index: -1;
}

.event-detail-page .container {
    max-width: 900px;
}

.event-detail-page h2 {
    text-align: left;
    margin-bottom: 5px;
}

.event-detail-page h2::after {
    display: none;
}

.event-meta {
    text-align: left;
    color: var(--secondary-gray-blue);
    font-weight: 600;
    margin-top: -10px;
    margin-bottom: 10px;
    margin-left: 0;

}

.event-content h3 {
    font-size: 1.5em;
    color: var(--dark-gray-text);
    margin-top: 40px;
}

.event-content ul {
    list-style-type: disc;
    padding-left: 20px;
    line-height: 1.8;
}

.image-interspersed {
    max-width: 50%;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

.align-right {
    float: right;
    margin-left: 25px;
    margin-top: -35px;
}

.align-left {
    float: left;
    margin-right: 25px;
}

.back-link-container {
    text-align: center;
    margin-top: 50px;
    clear: both;
}

/* --- Team Section --- */
.team-list {
    display: flex;
    flex-direction: column;
    gap: 40px; /* Mezera mezi jednotlivými členy */
    max-width: 800px;
    margin: 50px auto 0 auto;
}

.team-member-row {
    display: flex;
    align-items: flex-start; /* Zarovnání na začátek (nahoru) */
    gap: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 40px;
}

.team-list article:last-child {
    border-bottom: none; /* Poslední člen nemá spodní čáru */
    padding-bottom: 0;
}

.member-photo {
    width: 180px;
    height: 180px;
    border-radius: 2%;
    object-fit: cover;
    flex-shrink: 0; /* Zabrání zmenšení obrázku, když je málo místa */
}

.member-details {
    flex-grow: 1; /* Detailům se přidělí zbytek místa */
}

.member-name {
    font-size: 1.6em;
    color: var(--dark-gray-text);
    margin: 0 0 5px 0;
}

.member-institution {
    color: var(--primary-blue);
    font-weight: 700;
    margin: 0 0 15px 0;
    font-size: 1em;
}

.member-bio {
    font-size: 1em;
    line-height: 1.7;
    margin-bottom: 0;
}

/* Responzivní chování pro mobilní zařízení */
@media (max-width: 600px) {
    .team-member-row {
        flex-direction: column; /* Změní rozložení na vertikální */
        align-items: center;   /* Vše vycentruje */
        text-align: center;
        gap: 20px;
    }
}

@media (max-width: 1200px) {
    section.event-detail-page::before {
        left: 20px;
    }
}

@media (max-width: 900px) {
    .header-left { gap: 15px; }
    .header-funding { gap: 15px; padding-left: 15px; }
}

@media (max-width: 768px) {

    html, body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }

    .main-header,
    .main-header.header-scrolled {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 10px 0 !important;

        transform: none !important;
        transition: none !important;
        opacity: 1 !important;

        background-color: #ffffff !important;
        z-index: 99999 !important;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        box-sizing: border-box !important;
        height: auto !important;
    }

    body {
        padding-top: 200px !important;
    }

    .main-header .container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 15px !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        gap: 10px !important;
    }

    .header-left {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        gap: 15px !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }

    .header-logo img {
        height: 45px !important;
        width: auto !important;
        display: block !important;
    }

    .header-funding {
        display: flex !important;
        align-items: center !important;
        border: none !important;
        margin: 0 !important;
        padding: 0 !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .header-funding img {
        height: 65px !important;
        width: auto !important;
        max-height: none !important;
        display: block !important;
    }

    .header-right {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        background: transparent !important;
        position: static !important;
        padding: 0 !important;
        margin: 0 !important;
        gap: 10px !important;
    }

    .main-nav {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 15px !important;
        width: 100% !important;
    }

    .main-nav a {
        font-size: 14px !important;
        color: var(--dark-gray-text) !important;
        margin: 0 !important;
    }

    .language-switcher {
        margin-top: 5px !important;
        display: block !important;
    }

    .hamburger-menu {
        display: none !important;
    }

    html {
        scroll-padding-top: 210px !important;
    }

    section h2::after { display: none !important; }

    .footer-partners img,
    .footer-partners .logo-thd,
    .footer-partners .logo-zcu {
        max-height: 18px !important;
        width: auto !important;
    }
}