* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Open Sans', sans-serif;
}

.top-section {
    text-align: center;
    margin-top: 1em;
}

.section-title {
    font-size: 2em;
    margin-top: 0.2em;
    color: #357256;
}

.section-description {
    font-size: 1.2em;
    color: #357256;
    margin-top: 1em;
}

body {
    background-color: #eeeeee;
}

header {
    display: flex;
    width: 100%;
    background-color: #357256;
    margin-bottom: 4em;
    justify-content: center;
}

.navbar {
    width: 100%;
    max-width: 1200px;
    background-color: #357256;
    color: white;
    padding: 1em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    margin: 0;
}

.logo {
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translate(-50%, -50%);
    height: 100px;
    width: 100px;
    border-radius: 50%;
    z-index: 10;
}

.navbar-title {
    font-size: 2em;
    font-weight: bold;
    flex: 1;
}

.social-icons {
    display: flex;
    gap: 15px;
    flex: 1;
    justify-content: flex-end;
    align-items: center;
}

.social-icons a {
    color: white;
    font-size: 24px;
    text-decoration: none;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.social-icons a:hover {
    opacity: 1;
    transform: scale(1.1);
}

.content {
    padding: 50px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.content h1 {
    color: #357256;
    margin-bottom: 20px;
}

.row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2em;
    width: 100%;
    max-width: 1200px;
}

.matches {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 1em;
}

.match {
    background-color: white;
    border-radius: 10px;
    padding: 0;
    color: white;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: start;
}

.match-top {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 1em;
    background-color: #357256;
    padding: 1em 2em;
    border-radius: 10px 10px 0 0;
}

.match-date,
.match-location {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    font-size: 1em;
    font-weight: bold;
    gap: 0.5em;
    text-align: center;
}

.match-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1em 1em 1em;
    width: 100%;
}

.team {
    flex: 0 0 auto;
    max-width: 100px;
}

.team-logo {
    width: 5em;
    height: 5em;
}

.score {
    flex: 0 0 auto;
    font-size: 1.5em;
    font-weight: bold;
    color: #357256;
    text-align: center;
}

.footer-content {
    text-align: center;
    font-size: 2em;
}

footer {
    background-color: #357256;
    color: white;
    padding: 0.5em 0;
    position: relative;
    bottom: 0;
    width: 100%;
}

.team-name {
    text-align: center;
    font-size: 1em;
    font-weight: bold;
    color: #357256;
    margin: 0.5em 0;
}

.sponsors {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 1em;
}

.row_sponsors {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2em;
    width: 100%;
    max-width: 1200px;
}

.row_history {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 1200px;
}

.sponsors-top {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 1em;
    background-color: #357256;
    padding: 1em 2em;
    border-radius: 10px 10px 0 0;
}

.sponsors-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 1em 1em 1em;
    width: 100%;
}

.sponsors-bottom2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1em 1em 1em;
    width: 100%;
}

/* --- ZMĚNA ZDE --- */
.sponsors-bottom3 {
    display: flex;
    /* Flexbox */
    width: 100%;
    padding: 0 1em 1em 1em;
    align-items: center;
    /* justify-content: space-between; - toto smažeme, vyřešíme to marginem */
}

.btn {
    background-color: #357256;
    color: white;
    padding: 0.5em 1em;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    margin-top: 2em;
}

/* --- TLAČÍTKA HISTORIE --- */
.btn_history {
    background-color: #357256;
    color: white;
    padding: 0.5em 1em;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    /* Aby se ikona a text zarovnaly hezky */
    align-items: center;
    gap: 0.5em;
    /* Mezera mezi ikonou a textem */
    font-weight: bold;
}

/* Trik: Pokud tlačítko obsahuje pravou šipku (tzn. je to "Následující"),
   dáme mu margin-left: auto. To ho v Flexboxu odtlačí úplně doprava.
*/
.btn_history:has(.ri-arrow-right-line) {
    margin-left: auto;
}

/* Pokud by náhodou existovalo jen levé, zůstane vlevo (defaultní chování) */

.sponsors-logo {
    flex: 1;
    max-width: 100px;
}

.vs-logo {
    flex: 2;
    max-width: 200px;
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.8em;
    }

    .navbar-title {
        font-size: 1.5em;
    }

    .logo {
        height: 65px;
        width: 65px;
        top: 53px;
        border-width: 2px;
    }

    .social-icons a {
        font-size: 20px;
    }

    .row_sponsors {
        display: grid;
        grid-template-columns: 1fr;
        gap: 2em;
        width: 100%;
    }
}

@media (max-width: 510px) {
    .navbar {
        flex-direction: column;
        align-items: center;
        padding: 0.6em;
        margin-bottom: 0;
    }

    .navbar-title {
        font-size: 1.2em;
        order: 1;
    }

    .social-icons {
        gap: 10px;
        order: 2;
    }

    .social-icons a {
        font-size: 18px;
    }

    .logo {
        position: static;
        transform: none;
        margin-top: 10px;
        height: 50px;
        width: 50px;
        order: 3;
    }

    .row_sponsors {
        display: grid;
        grid-template-columns: 1fr;
    }

    .sponsors-logo {
        flex: 1;
        max-width: 50px;
    }

    .vs-logo {
        flex: 2;
        max-width: 60px;
    }
}

.match-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.match-link[aria-disabled="true"] {
    pointer-events: none;
    opacity: 0.85;
}

.match-link .match {
    transition: transform .08s ease, box-shadow .08s ease;
}

.match-link:hover .match {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}