/*================  BASE  ================*/
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Montserrat:ital,wght@0,300..900;1,300..900&display=swap');

* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html {
    margin: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: #f8fafc;
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: 0;
    font-family: 'Inter', sans-serif;
    color: #1e293b;
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 12px;
    }
}

/* ==========================================
   OVLÁDÁNÍ ŠACHOVNICE
   ========================================== */
.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 12px;
    margin-top: 15px;
    margin-bottom: 10px;
}

.controls button {
    cursor: pointer;
    width: 36px;
    height: 36px;
    border: none;
    background-color: #f1f5f9;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
}

.controls button:hover {
    background-color: #e2e8f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.controls button img {
    cursor: pointer;
    height: 16px;
}

.autoplay-btn {
    display: block;
    background-color: #E31E25 !important;
}
.autoplay-btn:hover {
    background-color: #c4070d !important;
    box-shadow: 0 4px 12px rgba(227, 30, 37, 0.3) !important;
}
.autoplay-btn img {
    filter: brightness(0) invert(1);
}

.board {
    margin: auto;
}

.white-1e1d7 {
    background-color: #f0d9b5;
}

.black-3c85d {
    background-color: #b58863;
}

.notation-322f9 {
    display: none;
}

/* ==========================================
   HLAVIČKA & NAVIGACE
   ========================================== */
header {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.nav_bar1 {
    height: 40px;
    background-color: #f8fafc;
    display: flex;
    justify-content: center;
    width: 100%;
    border-bottom: 1px solid #e2e8f0;
}

.nav_bar1_container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 80%;
    max-width: 1350px;
}

.nav_bar1_container img {
    height: 28px;
    margin-right: auto;
}

.nav_bar1_container a {
    margin-left: auto;
    font-size: 0.75rem;
    text-decoration: none;
    color: #475569;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    transition: color 0.2s ease;
}
.nav_bar1_container a:hover {
    color: #E31E25;
}

.nav_bar2 {
    height: 85px;
    background-color: #E31E25;
    display: flex;
    justify-content: center;
    width: 100%;
    box-shadow: 0 4px 15px rgba(227, 30, 37, 0.15);
}

.nav_bar2_container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 80%;
    max-width: 1350px;
}

.nav_bar2_container img {
    height: 65px;
    margin-right: auto;
    transition: transform 0.3s ease;
}
.nav_bar2_container img:hover {
    transform: scale(1.02);
}

.nav_bar2_container_content a {
    margin-left: 20px;
    text-decoration: none;
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    transition: opacity 0.2s ease, transform 0.2s ease;
    opacity: 0.9;
}
.nav_bar2_container_content a:hover, .nav_bar2_container_content a.active {
    opacity: 1;
    transform: translateY(-1px);
}

.nav_bar3 {
    display: none;
    justify-content: center;
    align-items: center;
    width: 100%;
    background-color: #E31E25;
}

.nav_bar3_container {
    width: 80%;
    max-width: 1350px;
}

.nav_bar3_container_content {
    background-color: #E31E25;
    display: none;
    position: fixed;
    top: 85px;
    left: 0;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    gap: 15px;
    padding: 10px 10px 20px 10px;
    box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.15);
}

.nav_bar3_controls {
    display: flex;
    padding-top: 10px;
    padding-bottom: 10px;
    justify-content: space-between;
    align-items: center;
}

.menu_close {
    height: 24px;
}

.nav_bar3 a {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: white;
    margin-left: 0px !important;
    display: flex;
    flex-direction: row;
    text-align: center;
    justify-content: center;
    text-decoration: none;
    font-size: 18px;
    letter-spacing: 0.05em;
}

/* ==========================================
   LAYOUT
   ========================================== */
main {
    flex: 1;
    padding-top: 46px;
    background-color: #f8fafc;
    width: 80%;
    max-width: 1350px;
    margin: 0 auto;
}

main1 {
    background-color: #f8fafc;
    width: 80%;
    max-width: 1350px;
    margin: 0 auto;
}

main2 {
    width: 80%;
    max-width: 1350px;
    margin: 0 auto;
}

/* Notebook simulace 75% oddálení */
@media (max-width: 1536px) and (min-width: 1201px) {
    body {
        zoom: 0.71;
    }
}

@media (max-width: 1200px) {
    .nav_bar1_container, .nav_bar2_container, .nav_bar3_container, main, main1, main2 {
        width: 90%;
    }
}

@media (max-width: 700px) {
    .nav_bar1, .nav_bar2 {
        display: none;
    }
    .nav_bar3 {
        display: flex;
        height: 64px;
    }
    .nav_bar3_controls {
        height: 100%;
        padding-top: 0;
        padding-bottom: 0;
    }
    .nav_bar3_controls > a:first-child img {
        height: 48px;
        width: auto;
    }
    .nav_bar3_container_content {
        top: 64px;
    }
}

@media (max-width: 1100px) {
    .match-details {
        padding: 0px !important
    }
}

/* ==========================================
   AKTUALITY (NEWS SECTIONS)
   ========================================== */
.news {
    width: 100%;
    display: flex;
    flex-direction: row;
    height: 616px;
    margin-bottom: 25px;
    gap: 15px;
}

.main_news {
    background-color: #1e293b;
    height: 100%;
    width: 74.87%;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 300px;
}

.main_news_info {
    width: 100%;
    height: 60%;
    position: absolute;
    bottom: 0;
}

.shadow {
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
    z-index: 1;
}

.main_news_info_text {
    padding: 50px;
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.main_news_checkbox {
    display: flex;
    width: 100%;
    justify-content: space-between;
    margin-bottom: 5px;
}

#newsMain, #customEditNewsMladez, #newsMladez {
    float: right;
    flex: 0;
}

.main_news_info_text_container {
    position: absolute;
    bottom: 0;
    padding-bottom: 50px;
    width: 100%;
    padding-right: 40px;
}

.main_news_info_text h1 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    letter-spacing: 1px;
    font-size: 3.2rem;
    color: #ffffff;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 10px;
}

.main_news_info_text h2 {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    color: #cbd5e1;
    font-size: 1.2rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.main_news_info_text_button {
    background-color: #E31E25;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(227, 30, 37, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.main_news_info_text_button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(227, 30, 37, 0.4);
    background-color: #c4070d;
}

#loadingBar {
    height: 3px;
    width: calc(100% - 20px);
    margin-top: 25px;
    background-color: rgba(255,255,255,0.7);
    border: none;
    display: none;
    border-radius: 2px;
}

.more_news_phone {
    margin-top: 15px;
    width: calc(100% - 20px);
    justify-content: space-between;
    display: none;
}

.more_news_phone p, .more_news_phone a {
    color: white;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

.side_news {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
}

.side_news_container {
    width: 100%;
    height: calc(100% - 40px);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.side_news_box {
    height: calc(50% - 7.5px);
    border-radius: 16px;
    overflow: hidden;
    background-color: white;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.side_news_box:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}

.side_news_box_image, .side_news1_box_image {
    background-color: #f1f5f9;
    width: 100%;
    height: 65%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}
.side_news_box_image::after, .side_news1_box_image::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0; height: 40%;
    background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
}

.side_news_box_text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    display: flex;
    width: 100%;
    height: 35%;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 15px;
    color: #1e293b;
    font-size: 1.1rem;
    line-height: 1.3;
}

.side_news_box a {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

#moreNews {
    height: 30px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    font-size: 0.95rem;
    text-decoration: none;
    color: #E31E25;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    transition: color 0.2s ease;
}
#moreNews:hover {
    color: #c4070d;
}

.newsTitles {
    display: flex;
    margin-bottom: 5px;
    gap: 15px;
}

#mladezAktuality, #normalniAktuality {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

#mladezAktuality:active, #normalniAktuality:active {
    font-weight: 800;
    color: #E31E25;
}

@media (max-width: 1200px) {
    .news {
        display: flex;
        flex-direction: column;
        height: auto;
    }
    .main_news {
        width: 100%;
        margin-bottom: 10px;
        max-height: 500px;
        min-height: 400px;
    }
    .side_news_container {
        flex-direction: row !important;
        width: 100%;
        height: auto;
    }
    .side_news_box {
        width: 50%;
        min-height: 300px;
        height: 300px;
    }
    .side_news {
        margin-left: 0px;
    }
    .main_news_info_text {
        padding: 30px;
    }
    .main_news_info_text_container {
        padding-bottom: 20px;
    }
    #moreNews {
        display: none;
    }
}

/* ==========================================
   UPCOMING GAME BANNER
   ========================================== */
.upcoming_game {
    height: 160px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    border-radius: 16px;
    margin-top: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.upcoming_game_container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
}

.club1_container, .club2_container {
    width: calc(50% - 100px);
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 1px;
}
.club1_container {
    text-align: right;
    padding-right: 60px;
}
.club2_container {
    text-align: left;
    padding-left: 60px;
}

#teamLink {
    color: #E31E25;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s ease;
}
#teamLink:hover {
    color: #ff4d4d;
}

.game_section_countdown {
    text-align: center;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.countdown {
    font-size: 1.4rem;
    font-weight: 800;
    font-family: 'Montserrat', sans-serif;
    color: #fff;
}

.game_date {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 500;
}

.game_team {
    font-size: 1rem;
    font-weight: 600;
}

/* ==========================================
   CHESS GAMES (PARTIE)
   ========================================== */
.chess_games {
    margin-top: 40px;
    margin-bottom: 40px;
}

.chess_games h1 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 25px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    letter-spacing: 1px;
    color: #0f172a;
}

.chess_games_container {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 60px) / 4);
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 20px;
    padding-top: 10px;
}

.chess_games_container_box {
    background: white;
    border-radius: 16px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.chess_games_container_box:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.08);
}

.chess_games_container::-webkit-scrollbar,
.admin_news::-webkit-scrollbar,
.aktualita_content_images::-webkit-scrollbar {
    height: 8px;
}
.chess_games_container::-webkit-scrollbar-track,
.aktualita_content_images::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 8px;
}
.chess_games_container::-webkit-scrollbar-thumb,
.aktualita_content_images::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 8px;
}
.chess_games_container::-webkit-scrollbar-thumb:hover,
.aktualita_content_images::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
}

/* ŠACHOVNICE */
.chessboard_container,
[id^="board-"], 
[id^="board_"],
[id="boardModal"] {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    position: relative;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    border: 0px solid #e2e8f0;
}

/* Průhledná vrstva pro klikání na menší šachovnici na úvodní straně */
.board-click-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 3;
    cursor: pointer;
    background: rgba(255,255,255,0);
    transition: background 0.2s;
}
.board-click-overlay:hover {
    background: rgba(255,255,255,0.15);
}

.chessboard-63f37 {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1/1 !important;
}

.board-b72b1 {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1/1 !important;
    border: 0px !important;
}   

.square-55d63 {
    width: 12.5% !important;
    height: 12.5% !important;
    aspect-ratio: 1/1;
}

.square-55d63 img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
}

.result_container {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    background-color: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    color: white;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    z-index: 2;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.result_container.visible {
    opacity: 1;
}

.chess_game_info {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.chess_game_date {
    font-size: 0.85rem;
    color: #64748b;
    text-align: center;
    margin-bottom: 8px;
    font-weight: 500;
}

.chess_game_players {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.chess_game_players h2 {
    font-size: 1.1rem;
    font-family: 'Montserrat', sans-serif;
    color: #1e293b;
    font-weight: 700;
    margin: 0;
    text-align: center;
}

/* ==========================================
   TÝMY & MLÁDEŽ
   ========================================== */
.custom-line {
    width: 100%;
    height: 1px;
    background-color: #e2e8f0;
    margin-top: 40px;
    margin-bottom: 40px;
    border: none;
}

.teams_selection a {
    margin-right: 15px;
    text-decoration: none;
    color: #64748b;
    font-weight: 600;
    font-size: 1.2rem;
    transition: color 0.2s ease;
}
.teams_selection a:hover {
    color: #1e293b;
}
.teams_selection a.active {
    color: #E31E25;
    font-weight: 800;
}

.teams .slaviaTeams a {
    text-decoration: none;
    color: #64748b;
    font-size: 1.3rem;
    margin-right: 15px;
    font-weight: 600;
    transition: color 0.2s ease;
}
.teams .slaviaTeams a:hover { color: #1e293b; }
.slaviaTeams { margin-bottom: 30px; }
.slaviaTeams a.active { font-weight: 800; color: #E31E25; }

.teams_youth h1 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 2.2rem;
    color: #0f172a;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.teams_youth_conatiner {
    width: 100%;
    height: 410px;
    margin-top: 30px;
    margin-bottom: 60px;
    display: flex;
    gap: 20px;
}

.teams_conatiner {
    height: 100%;
    width: 60%;
    background: linear-gradient(135deg, #E31E25 0%, #b81218 100%);
    border-radius: 16px;
    padding: 30px;
    display: flex;
    gap: 20px;
    box-shadow: 0 10px 25px rgba(227, 30, 37, 0.2);
}

.teams_container_info {
    height: 100%;
    width: 60%;
    display: flex;
    flex-direction: column;
    color: white;
    gap: 10px;
    padding-right: 20px;
}

.teams_container_info h2 { 
    font-size: 2.8rem; 
    margin-bottom: 15px; 
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
}
.teams_container_info a, .teams_container_info p { 
    text-decoration: none; 
    color: rgba(255,255,255,0.9); 
    font-size: 1.1rem; 
    transition: color 0.2s ease;
}
.teams_container_info a:hover {
    color: white;
    text-decoration: underline;
}

.team_container_captain { height: 100%; width: 40%; display: flex; flex-direction: column; }
.teams_container_captain_img {
    width: 100%; height: 85%;
    background-size: cover; background-position: top center; background-repeat: no-repeat;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.teams_container_captain_caption {
    width: 100%; text-align: center; padding-inline: 10px; text-transform: uppercase; padding-top: 15px;
    font-weight: 700; font-family: 'Montserrat', sans-serif; color: white;
}

.team_upcoming_game { width: 100%; flex-grow: 1; display: flex; flex-direction: column; margin-top: 5px; }
.team_upcoming_game h3 { color: white; font-size: 1.1rem; margin-bottom: 10px; opacity: 0.9; }
.team_upcoming_game_container {
    width: 100%; background-color: rgba(0,0,0,0.15); display: flex; flex-direction: column; gap: 8px; padding: 15px; border-radius: 12px;
}
.team_upcoming_game_row { display: flex; width: 100%; justify-content: space-between; font-weight: 600; color: white; }


/* AKTUALIZOVANÝ YOUTH BOX PRO AMBASADORKY - TŘETÍ VERZE */
.youth_conatiner {
    height: 100%;
    width: 40%;
    background-color: #1e293b;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    position: relative;
    padding: 15px;
    display: flex;
    align-items: flex-end;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e2e8f0;
    cursor: pointer;
}

.youth_conatiner:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.youth_image_wrapper {
    position: absolute;
    top: 15px; left: 15px; right: 15px; bottom: 15px;
    border-radius: 12px;
    overflow: hidden;
    z-index: 1;
}

.youth_image {
    width: 100%; 
    height: 100%;
    background-image: url('../../img/aktuality/Ambasadorky.png');
    background-size: cover;
    background-position: center;
}

.youth_overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0; height: 65%;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.4) 50%, transparent 100%);
}

.youth_content {
    position: relative;
    z-index: 2;
    padding: 20px;
    width: 100%;
    text-align: center;
}

.youth_content h3 {
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.8rem;
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 1px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}


/* ==========================================
   DETAIL AKTUALITY A SPOJENÝ ZÁPAS
   ========================================== */
.aktualita_main_image { 
    width: 100%; 
    height: 500px; 
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat; 
    border-radius: 16px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); 
    margin-top: 20px;
}

.aktualita_content { 
    width: 100%; 
    max-width: 1500px; 
    margin: 0 auto; 
    position: relative; 
    top: -40px;
    display: flex;
    align-items: flex-start; /* FIX pro zbytečnou mezeru - zarovnání nahoru */
    gap: 40px;
}

.aktualita_left, .aktualita_right {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.04);
    border: 1px solid #e2e8f0;
    padding: 40px;
}

.aktualita_left { 
    flex: 1; 
    min-width: 0; 
}

.aktualita_right { 
    width: 450px; 
    flex-shrink: 0; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
}

.aktualita_left h2 { text-transform: uppercase; font-size: 2.5rem; margin-top: 0; font-family: 'Montserrat', sans-serif; font-weight: 800; color: #0f172a; line-height: 1.2;}
.aktualita_left hr { height: 4px; background-color: #E31E25; width: 100px; border: none; margin-top: 20px; margin-bottom: 20px; border-radius: 2px;}
.aktualita_left p { font-size: 0.95rem; color: #64748b; font-weight: 500;}
.aktualita_content_text { padding-top: 20px; font-size: 1.15rem; line-height: 1.7; color: #334155; }

/* Zabalený blok galerie v aktualitě */
.aktualita-gallery-wrapper {
    position: relative;
    width: 100%;
}
.aktualita-gallery-wrapper.collapsed {
    max-height: 520px; 
    overflow: hidden;
}
.gallery-fade-overlay {
    display: none;
}
.aktualita-gallery-wrapper.collapsed .gallery-fade-overlay {
    display: flex;
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 350px;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 75%, rgba(255,255,255,1) 100%);
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 10px;
    z-index: 10;
}

.gallery-collapse-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 25px;
}

/* Grid pro zobrazení fotek */
.aktualita_content_images { 
    margin-top: 30px; 
    width: 100%; 
    display: grid; 
    grid-template-columns: repeat(2, 1fr);
    gap: 15px; 
}
.aktualita_content_images img { 
    border-radius: 12px; 
    width: 100%;
    height: 100%;
    max-height: 400px; 
    object-fit: cover; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.aktualita_content_images img:hover {
    opacity: 0.85;
}

.aktualita_right h4 {
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 20px;
    color: #0f172a;
    font-size: 1.3rem;
    text-transform: uppercase;
    font-weight: 800;
}

.linked-match-header {
    padding: 0 0 15px 0;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.linked-match-header h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #0f172a;
    margin-bottom: 4px;
}

.linked-match-body {
    position: relative; 
    overflow: hidden; 
    margin-bottom: 15px;
}

.desktop-fade::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
    pointer-events: none;
}

.linked-match-footer {
    padding-top: 15px;
    background: white;
    border-top: 1px solid #f1f5f9;
    text-align: center;
}

.linked-match-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #E31E25;
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    width: 100%;
}

.linked-match-btn:hover {
    background-color: #c4070d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(227,30,37,0.3);
}

.aktualita_right .games-table-container {
    border: none;
    border-radius: 0;
    margin-bottom: 0;
}
.aktualita_right table.games-table {
    table-layout: fixed; 
}
.aktualita_right table.games-table th,
.aktualita_right table.games-table td {
    padding: 6px 4px;
    font-size: 0.8rem;
    white-space: nowrap; 
}
.aktualita_right .player-name {
    font-size: 0.8rem;
    max-width: 140px; 
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: middle;
}
.aktualita_right .player-elo {
    font-size: 0.7rem;
}
.aktualita_right .result-badge {
    padding: 4px 6px;
    font-size: 0.75rem;
    min-width: 45px;
}
.aktualita_right .games-table-date-row td {
    padding: 6px;
    font-size: 0.8rem;
}

.mobile-expand-btn {
    display: none;
}

main1 h5 { text-align: center; font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 1.8rem; color: #0f172a; }

/* ==========================================
   STRÁNKA TÝMY (SOUPISKY)
   ========================================== */
.teams { width: 100%; min-height: 100vh; padding-top: 20px;}
.teams h2 { font-size: 3.5rem; font-family: 'Montserrat', sans-serif; font-weight: 800; color: #0f172a; margin-bottom: 15px;}
.teams h3 { font-size: 2rem !important; margin-bottom: 20px; margin-top: 30px; font-family: 'Montserrat', sans-serif; color: #1e293b;}
.teams_container { width: 100%; display: flex; flex-direction: column; gap: 20px; }
.teams_row { width: 100%; display: flex; justify-content: flex-start; gap: 15px; flex-wrap: wrap; }

.player_content {
    width: calc((100% - (2 * 15px)) / 3);
    height: 380px; display: flex; justify-content: center; align-items: flex-end; padding: 20px; 
    background-size: cover; background-position: top center; background-repeat: no-repeat; 
    border-radius: 16px; overflow: hidden;
    box-shadow: inset 0px -80px 60px rgba(0, 0, 0, 0.8), 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    position: relative;
}
.player_content:hover { transform: translateY(-4px); box-shadow: inset 0px -90px 70px rgba(0, 0, 0, 0.85), 0 12px 25px rgba(0,0,0,0.1); }
.player_content h2 { text-align: center; font-size: 1.6rem; color: white; font-family: 'Montserrat', sans-serif; font-weight: 700; margin: 0; text-shadow: 0 2px 4px rgba(0,0,0,0.5);}

.gm-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #f59e0b;
    color: #111;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 0.9rem;
    padding: 4px 8px;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 10;
}

/* Odznak IM (mezinárodní mistr) - stejný tvar jako GM, jen stříbrný místo zlatého.
   Dvě třídy v selektoru schválně: přebije tím .gm-badge i ve stylech, které si
   jednotlivé stránky definují samy u sebe v <style>. */
.gm-badge.im-badge {
    background-color: #cbd5e1;
    color: #0f172a;
}


/* ==========================================
   STRÁNKA AKTUALITY (VÝPIS)
   ========================================== */
#title { text-align: center; margin-bottom: 15px; margin-top: 20px; font-size: 3.5rem; font-family: 'Montserrat', sans-serif; font-weight: 800; letter-spacing: 2px; color: #0f172a; }
#popisekDospeli, #popisekMladez { text-align: center; margin-bottom: 60px; margin-top: 20px; font-size: 2.2rem; font-family: 'Montserrat', sans-serif; font-weight: 700; color: #334155; }
#aktuality_container { margin-bottom: 50px; }
.mladezDospeli { position: fixed; bottom: 30px; right: 30px; z-index: 1000; display: flex; gap: 10px; background-color: #E31E25; color: white; border: none; padding: 14px 22px; border-radius: 30px; box-shadow: 0 8px 25px rgba(227,30,37,0.3); transition: transform 0.3s;}
.mladezDospeli:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(227,30,37,0.4); }
#scrollToMladez { gap: 10px; background-color: transparent; color: white; border: none; display: flex; align-items: center; font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 1rem; cursor: pointer; }
.arrowIcon { width: 18px; height: 18px; transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); filter: brightness(0) invert(1); }

.aktuality_container { width: 100%; min-height: 400px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.aktualita_box { height: 420px; background: white; border-radius: 16px; overflow: hidden; border: 1px solid #e2e8f0; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03); transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; }
.aktualita_box:hover { transform: translateY(-6px); box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08); }
.aktualita_text_container { height: 50%; display: flex; flex-direction: column; justify-content: space-between; padding-bottom: 20px; }
.aktualita_box a { text-decoration: none; color: #1e293b; height: 100%; display: flex; flex-direction: column; }

.aktualita_image { width: 100%; height: 50%; background-size: cover; background-position: center; background-repeat: no-repeat; border-bottom: 1px solid #f1f5f9; }
.aktualita_text { width: 100%; display: flex; flex-direction: column; padding: 20px 20px 10px 20px; }
.aktualita_text h2 { font-size: 1.2rem; margin-bottom: 10px; font-family: 'Montserrat', sans-serif; font-weight: 700; color: #0f172a; line-height: 1.3;}
.aktualita_box p { font-size: 0.95rem; color: #475569; line-height: 1.5; }
#readMore { color: #E31E25; font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 0.9rem; padding-inline: 20px; margin-top: auto; }

@media (min-width: 1024px) { .aktuality_container { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1023px) { .aktuality_container { grid-template-columns: repeat(3, 1fr); gap: 10px;  } }
@media (max-width: 768px) { .aktuality_container { grid-template-columns: repeat(2, 1fr); } }

/* =========================================================
   --- STYLY PRO VÝSLEDKY (vysledky.html) ---
   ========================================================= */

.page-title {
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    margin-bottom: 30px;
    margin-top: 10px;
    color: #0f172a;
    text-transform: uppercase;
    font-size: 2.5rem;
}

.loader {
    text-align: center;
    font-size: 1.2rem;
    color: #64748b;
    margin-top: 50px;
    font-weight: 500;
}

#team-events-container {
    min-height: 100vh;
}

.filter-controls-wrapper {
    display: flex;
    flex-direction: row; 
    flex-wrap: wrap; 
    gap: 15px;
    margin-bottom: 30px; 
    align-items: center;
    justify-content: space-between; 
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    border: 1px solid #e2e8f0;
    overflow: visible;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap; 
    white-space: nowrap; 
}

.filter-group label {
    font-family: 'Montserrat', sans-serif;
    color: #334155;
}

.filter-group select {
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 0.95rem;
    background: #f8fafc;
    outline: none;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    width: auto;
}

.filter-group select:focus {
    border-color: #E31E25;
    background: white;
    box-shadow: 0 0 0 3px rgba(227,30,37,0.1);
}

.custom-select-wrapper {
    position: relative;
    width: auto; 
    min-width: 180px; 
    max-width: 100%;
    user-select: none;
    font-size: 0.95rem;
    font-weight: 500;
}

.custom-select-trigger {
    border: 1px solid #cbd5e1;
    padding: 10px 16px;
    border-radius: 8px;
    background: #f8fafc;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    gap: 8px; 
    white-space: nowrap;
}
.custom-select-trigger:hover {
    background: white;
    border-color: #94a3b8;
}

.custom-options {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    min-width: 100%;
    width: max-content;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    display: none;
    z-index: 9999;
    padding: 5px 0;
    margin: 0;
    list-style: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.custom-select-wrapper.open .custom-options {
    display: block;
}

.custom-option {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    flex-wrap: wrap; 
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
    color: #334155;
    white-space: nowrap;
}

.custom-option:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.flyout-menu {
    display: none;
    position: absolute;
    top: -5px;
    left: calc(100% + 5px);
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    min-width: 240px;
    padding: 5px 0;
    margin: 0;
    list-style: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    max-height: 250px;
    overflow-y: auto;
    z-index: 9999;
}
.flyout-menu::-webkit-scrollbar { width: 6px; }
.flyout-menu::-webkit-scrollbar-track { background: transparent; }
.flyout-menu::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

.flyout-item {
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.9rem;
}
.flyout-item:hover {
    background: #f1f5f9;
}

@media (min-width: 769px) {
    .has-flyout:hover .flyout-menu {
        display: block;
    }
}

.year-group {
    margin-bottom: 30px; 
}
.year-summary {
    font-size: 1.5rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    color: #1e293b;
    list-style: none; 
    margin-bottom: 15px; 
    pointer-events: none; 
}
.year-summary::-webkit-details-marker { display: none; }

.event-section {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    width: 100%;
    transition: box-shadow 0.3s ease;
}
.event-section:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
}

.event-header {
    background-color: #ffffff;
    padding: 20px 25px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    cursor: pointer;
    transition: background 0.2s;
}

.event-header:hover {
    background-color: #f8fafc;
}

.event-header h2 {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: #0f172a;
    margin-bottom: 4px;
}

.event-meta {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.match-details {
    display: none;
    background-color: #f8fafc;
    padding: 25px;
    width: 100%;
}

.match-details-inner {
    display: flex;
    gap: 25px;
    align-items: stretch; 
    flex-wrap: nowrap;
}

.match-games-list {
    flex: 1 1 auto; 
    min-width: 0; 
}

.games-table-container {
    overflow-x: auto;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: white;
}

table.games-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

table.games-table th, 
table.games-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
}

table.games-table th:nth-child(2), 
table.games-table td:nth-child(2) {
    text-align: center;
}

table.games-table th {
    background-color: #f8fafc;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

table.games-table tr:hover {
    background-color: #f1f5f9;
}

.games-table-date-row td {
    background-color: #f1f5f9;
    border-bottom: 2px solid #e2e8f0;
    text-align: center;
    font-weight: 700;
    padding: 10px;
    color: #475569;
    font-size: 0.95rem;
}

.player-name {
    font-weight: 600;
    color: #1e293b;
}

.slavia-player {
    color: #E31E25 !important;
    font-weight: 800;
}

.player-elo {
    font-weight: 400; 
    font-size: 0.85em;
    color: #94a3b8 !important; 
    margin-left: 6px;
}

.result-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    background-color: #f1f5f9;
    color: #334155;
    min-width: 60px;
    text-align: center;
}

.result-W { background-color: #dcfce7; color: #166534; }
.result-L { background-color: #fee2e2; color: #991b1b; }
.result-D { background-color: #fef9c3; color: #854d0e; }

.pgn-btn {
    background: white;
    border: 1px solid #cbd5e1;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pgn-btn:hover {
    background: #E31E25;
    color: #fff;
    border-color: #E31E25;
    box-shadow: 0 4px 10px rgba(227,30,37,0.2);
}

.match-board-news {
    flex: 0 0 450px; 
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 25px;
    display: block;
    min-height: 480px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.match-linked-news {
    margin-top: 25px; 
    border: 1px solid #e2e8f0; 
    border-radius: 12px; 
    overflow: hidden; 
    width: 100%;
    background: white; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.match-linked-news:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
}

/* =========================================================
   --- STYLY PRO HISTORII ---
   ========================================================= */

.history {
    width: 100%;
    padding: 20px 0 50px 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    background-color: transparent;
    scroll-margin-top: 140px; 
}
.history h1 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 2.2rem;
    color: #0f172a;
    letter-spacing: 1px;
    margin-bottom: 25px;
    text-transform: uppercase;
}

.history_item {
    display: flex;
    flex-direction: column; 
    width: 100%;
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #e2e8f0;
    margin-bottom: 25px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.history_item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.history_header {
    display: flex;
    width: 100%;
    flex-direction: row;
}

.history_item:nth-child(even) .history_header {
    flex-direction: row-reverse;
}

.history_image {
    width: 40%;
    min-height: 280px;
    background-size: cover;
    background-position: center;
    background-color: #f1f5f9;
}

.history_content {
    width: 60%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; 
    text-align: center; 
    padding: 40px;
    position: relative;
}

.history_title_box {
    width: 100%;
}
.history_title_box h2 {
    font-size: 2.2rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    line-height: 1.2;
}

.history_date_box {
    margin-bottom: 25px;
}
.history_date_box span {
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    display: inline-block;
}

.history_read_more {
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    color: #E31E25;
    text-decoration: none;
    transition: all 0.2s ease;
}
.history_read_more:hover {
    color: #c4070d;
}

.history_read_more.history_close_btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    background-color: #fef2f2;
    color: #E31E25;
    border: 1px solid #fecaca;
    font-size: 0.85rem;
    font-weight: bold;
}
.history_read_more.history_close_btn:hover {
    background-color: #fee2e2;
}

.history_expanded_text_wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s ease, border-color 0.4s ease;
    width: 100%;
    background-color: #fafcff;
    border-top: 1px solid transparent;
}
.history_expanded_text_wrapper.open {
    grid-template-rows: 1fr;
    border-top: 1px solid #e2e8f0;
}
.history_expanded_text {
    overflow: hidden;
}
.history_expanded_text_inner {
    padding: 30px 40px;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #334155;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.history_expanded_text_wrapper.open .history_expanded_text_inner {
    opacity: 1;
    transition: opacity 0.4s ease 0.1s; 
}

/* Modální okna základ */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.9); 
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-wrapper {
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-content {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    background-color: transparent;
    display: block;
}

.modal-wrapper .modal-content {
    background-color: #000;
    object-fit: cover;
}

#imageModal .modal-content {
    max-width: 90%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    background-color: transparent;
    user-select: none;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    transition: background 0.3s;
    z-index: 2002;
    display: flex;
    align-items: center;
    justify-content: center;
}
.carousel-btn:hover { background: #E31E25; }
.prev-btn { left: 30px; }
.next-btn { right: 30px; }
#expandedImg { cursor: pointer; }

.modal-text {
    padding: 25px;
    background-color: #fff;
    color: #334155;
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    line-height: 1.6;
    border-top: 1px solid #e2e8f0;
}

.modal .close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 45px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 2001;
}

.modal .close:hover,
.modal .close:focus {
    color: #E31E25;
    text-decoration: none;
    cursor: pointer;
}

/* ==========================================
   CHESS GAME MODAL
   ========================================== */
.chess-modal-wrapper {
    max-width: 1400px; /* Zvětšeno pro větší partii */
    width: 95%;
    height: 85vh; /* Pevnější výška pro větší modal */
    max-height: 900px;
    display: flex;
    flex-direction: row;
    gap: 40px;
    padding: 50px 40px 40px 40px; /* Horní padding 50px pro vytvoření prostoru pro křížek */
    background: white;
    position: relative;
    border-radius: 16px;
    /* Pojistka: kdyby se i přes opravu šachovnice níže (sizing podle výšky
       místo odhadu přes vh) obsah někdy nevešel, radši se to scrolluje než
       aby to vizuálně "uřízlo" dole mimo zaoblený rámeček modalu. */
    overflow-y: auto;
}

#closeChessModal {
    position: absolute;
    top: 15px; /* Bezpečně nad pravým sloupcem kvůli padding-top */
    right: 20px;
    font-size: 35px;
    font-weight: bold;
    color: #1e293b;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s;
}

#closeChessModal:hover {
    color: #E31E25;
}

.chess-modal-left {
    flex: 1;
    min-width: 0; /* Zabrání přetečení */
    min-height: 0; /* Povolí šachovnici zmenšit se podle výšky místo přetečení dole */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; /* Vycentrování šachovnice */
}

.chess-modal-left > div {
    width: 100%;
    max-width: 75vh; /* Udrží design konzistentní a zabrání vertikálnímu přetečení */
}

/* PŘESNÉ řešení velikosti šachovnice v modalu partie:
   Místo odhadu dostupné výšky přes "max-width: 75vh" (což je jen přibližný
   přepočet a na nižších/širších obrazovkách mohlo způsobit, že šachovnice
   byla navržena větší, než kolik místa ve skutečnosti ve sloupci zbývalo -
   a dole se tak vizuálně "uřízla" mimo rámeček modalu), šachovnice teď
   vychází přímo z VÝŠKY, která jí ve sloupci reálně zbývá (box kolem jmen
   hráčů si vezme svůj přirozený prostor a zbytek dostane šachovnice přes
   flexbox shrink). Šířka se pak dopočítá z výšky přes aspect-ratio, takže
   čtverec vždy sedí na výšku i na šířku, ať je okno jakkoliv vysoké.
   Specificita těchto pravidel je vyšší než obecná .chessboard_container /
   [id^="board-"] pravidla výše, takže je bezpečně přebíjí jen v tomto modalu. */
@media (min-width: 801px) {
    .chess-modal-left .chessboard_container {
        width: auto !important;
        height: 100% !important;
        max-width: 100% !important;
        flex-shrink: 1;
    }

    .chess-modal-left #board-modal {
        width: auto !important;
        height: 100% !important;
    }
}

.chess-modal-right {
    flex: 0 0 450px; /* Pevná šířka zabrání zmenšování šachovnice při ztučnění textu */
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 30px;
    overflow: hidden; /* Skryje ošklivé přesahy a zamezí roztahování */
    max-height: 100%;
}

.modal-player-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent; /* Odstraněno šedé pozadí pro větší "clean" vzhled */
    padding: 10px 0;
    margin: 10px 0;
}

.modal-player-elo {
    font-size: 1.1rem;
    color: #64748b;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}

.modal-match-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #E31E25;
    text-align: center;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.pgn-notation {
    flex: 1;
    overflow-y: auto; /* Pouze zápis bude scrollovatelný */
    margin-top: 15px;
    padding-right: 5px;
    font-size: 1rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-family: 'Inter', sans-serif;
}

.pgn-notation::-webkit-scrollbar { width: 6px; }
.pgn-notation::-webkit-scrollbar-track { background: transparent; }
.pgn-notation::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 4px; }

.pgn-row {
    display: flex;
    align-items: center;
    padding: 4px 0;
}

.pgn-num {
    width: 50px;
    color: #94a3b8;
    font-weight: 600;
    font-size: 1rem;
}

.pgn-move {
    flex: 1;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s;
    color: #1e293b;
    font-weight: 600;
    text-align: left;
}

.pgn-move:hover {
    background-color: #e2e8f0;
}

.pgn-move.active {
    background-color: #E31E25;
    color: white;
    font-weight: 700;
}

@media (max-width: 800px) {
    .chess-modal-wrapper {
        flex-direction: column;
        padding: 40px 20px 20px 20px;
        overflow-y: auto;
        height: auto;
        max-height: 90vh;
    }
    .chess-modal-right {
        flex: none;
        width: 100%;
        height: auto;
        max-height: 400px;
    }
    .chess-modal-left > div {
        max-width: 100%;
    }
    .modal-player-name {
        font-size: 1.1rem;
    }
    /* Na telefonu se šachovnice nesmí smrštit podle výšky okna - zůstane
       čtvercová v plné šířce a okno se radši posouvá. */
    .chess-modal-wrapper .chess-modal-left {
        flex: none;
        min-height: auto;
    }
    .chess-modal-wrapper .chess-modal-left .chessboard_container {
        flex-shrink: 0;
        width: 100% !important;
        height: auto !important;
    }
    .chess-modal-wrapper .chess-modal-left #board-modal {
        width: 100% !important;
        height: auto !important;
    }
}


/* FOOTER ZÁKLAD */
footer { margin-top: auto; }
.footer1 {
    margin-top: 100px;
    background-color: #E31E25;
    width: 100%;
    height: 188px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.footer2 {
    width: 100%;
    height: 150px;
    background-color: #b81218;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================
   SPONZOŘI V PATIČCE (footer1 = hlavní sponzor,
   footer2 = ostatní sponzoři) - zatím jen index.html
   ========================================== */
.footer_sponsors_row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 25px;
    width: 90%;
    max-width: 1350px;
}

.footer-sponsor-card {
    display: flex;
    justify-content: center;
    align-items: center;
}
.footer-sponsor-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Řádek 1 (footer1) - hlavní sponzor, defaultně větší */
.footer-sponsor-card-main {
    width: 220px;
    height: 110px;
}

/* Řádek 2 (footer2) - ostatní sponzoři, menší */
.footer_sponsors_row_other .footer-sponsor-card {
    width: 140px;
    height: 70px;
}

@media (max-width: 768px) {
    .footer1 { height: auto; min-height: 150px; padding: 20px 0; }
    .footer2 { height: auto; min-height: 120px; padding: 20px 0; }
    .footer-sponsor-card-main { width: 160px; height: 85px; }
    .footer_sponsors_row_other .footer-sponsor-card { width: 110px; height: 55px; }
}
.footer3 {
    width: 100%;
    min-height: 230px;
    background-color: #0f172a;
    display: flex;
    align-items: center;
    padding: 40px 0;
}

/* ==========================================
   PATIČKA 3 - KONTAKTY A INSTAGRAM (zatím jen index.html)
   ========================================== */
.footer3_inner {
    width: 80%;
    max-width: 1350px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
}

.footer3_club {
    flex: 1 1 220px;
}
.footer3_club h3 {
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 12px;
    line-height: 1.3;
}
.footer3_club p {
    margin: 0 0 4px 0;
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.5;
}

.footer3_contacts {
    flex: 3 1 560px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 30px;
}
.footer3_contact h4 {
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 6px;
}
.footer3_contact p {
    margin: 0;
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.5;
}
.footer3_contact a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer3_contact a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer3_social {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}
.footer3_social img {
    width: 34px;
    height: 34px;
    opacity: 0.85;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.footer3_social a:hover img {
    opacity: 1;
    transform: scale(1.08);
}

@media (max-width: 900px) {
    .footer3 { padding: 30px 0; }
    .footer3_inner { flex-direction: column; gap: 20px; }
    /* Ve sloupci by se flex-basis (220px / 560px) změnil na VÝŠKU = velké mezery */
    .footer3_club, .footer3_contacts, .footer3_social { flex: 0 0 auto; }
    .footer3_contacts { grid-template-columns: 1fr; width: 100%; gap: 14px; }
    .footer3_social { align-self: flex-start; }
}

/* =========================================================
   RESPONZIVITA 
   ========================================================= */
@media (max-width: 1300px) {
    .chess_games_container {
        grid-auto-columns: calc((100% - 40px) / 3);
    }
}

@media (max-width: 1100px) { 
    .match-details-inner { flex-wrap: wrap; }
    .match-board-news { flex: 1 1 100%; max-width: 100%; }
    .board-controls-wrapper { max-width: 500px; margin: 0 auto; padding: 0; }
    
    .aktualita_content { flex-direction: column; gap: 30px; }
    .aktualita_right { width: 100%; padding: 30px; height: auto !important; overflow: visible;}
    .linked-match-body { overflow: visible; flex: none; }
    .desktop-fade::after { display: none; }
    
    .mobile-expand-btn {
        display: block;
        width: 100%;
        background: #f8fafc;
        border: none;
        border-top: 1px solid #f1f5f9;
        padding: 12px;
        font-family: 'Montserrat', sans-serif;
        font-weight: 600;
        color: #64748b;
        cursor: pointer;
        text-align: center;
        transition: background 0.2s;
    }
    .mobile-expand-btn:hover { background: #f1f5f9; color: #1e293b; }
    .mobile-collapsible:not(.expanded) table tbody tr:nth-child(n+6) { display: none; }
}

@media (max-width: 900px) {
    #title, .teams h2, .page-title, .main_news_info_text h1 { font-size: 2.2rem !important; line-height: 1.2 !important; }
    #popisekDospeli, #popisekMladez, .teams_youth h1, .history h1, .chess_games h1, main1 h5 { font-size: 1.8rem !important; line-height: 1.2 !important; margin-bottom: 35px !important; }
    #teamNazev, .aktualita_left h2, .teams_container_info h2, .history_title_box h2, .teams h3 { font-size: 1.6rem !important; line-height: 1.2 !important; margin-bottom: 10px !important; }
    .aktualita_right h4, .linked-match-header h3, .main_news_info_text h2 { font-size: 1.3rem !important; }
    .aktualita_text h2 { font-size: 1.2rem !important; margin-bottom: 5px !important; }
    .aktualita_box p, .aktualita_content_text, .history_expanded_text_inner, .countdown { font-size: 1.1rem !important; line-height: 1.4 !important; }
    #readMore, .game_date, .game_team, table.games-table th, table.games-table td { font-size: 1rem !important; }

    .nav_bar1_container, .nav_bar2_container, .nav_bar3_container {
        width: 100%; padding-inline: 20px;
    }
    main, main1, main2 { width: 100%; padding-inline: 15px; padding-top: 20px; }
    #main1 { padding-top: 0px !important; }
    .index main{ padding-inline: 0px; padding-top: 0px; }
    
    #loadingBar { display: block; }
    .more_news_phone { display: flex; }
    .chess_games { padding-inline: 20px; }
    
    .news { height: auto; margin-bottom: 0px; }
    .main_news { max-height: 500px; min-height: 450px; margin-bottom: 15px; border-radius: 0; }
    .main_news_info_text { padding: 25px; }
    .main_news_info_text_container { padding-bottom: 25px; padding-right: 25px;}
    
    .teams h2, .teams_youth h1, .slaviaTeams, .teams_selection { text-align: center; }
    .history h1 { margin-bottom: 40px; text-align: center; width: 100%; justify-content: center; }
    .heading-arrow { display: none !important; }
    .teams_youth h1 i { display: none; }
    
    .side_news_container { display: none; }

    .upcoming_game { height: auto; min-height: 120px; padding: 15px 5px; margin-top: 15px; margin-bottom: 15px; border-radius: 0px; }
    .upcoming_game_container { display: flex; flex-direction: row; justify-content: space-between; align-items: center; gap: 5px; position: static; width: 100%; }
    .club1_container, .club2_container { 
        width: 32% !important; 
        padding: 0 10px !important; 
        font-size: 1.1rem !important; 
        text-align: center !important; 
        word-wrap: break-word; 
        word-break: break-word;
        hyphens: auto;
        line-height: 1.3; 
    }
    .game_section_countdown { position: static; transform: none; width: 36%; left: auto; top: auto; text-align: center; gap: 4px; }
    
    .aktualita_box { height: 220px !important; }
    .aktualita_image { height: 150px !important; }
    .aktualita_text_container { padding-bottom: 10px !important; }
    .aktualita_text { padding: 10px 15px 5px 15px !important; }
    .aktualita_text p { display: none !important; }
    #readMore { padding-inline: 15px !important; margin-top: auto; }
    
    .teams_youth_conatiner { display: flex; flex-direction: column; height: auto !important; min-height: 500px; margin-top: 15px !important; margin-bottom: 20px; }
    .teams_conatiner { width: 100% !important; flex-direction: column; padding: 25px !important; margin-top: 25px;}
    .teams_container_info { width: 100%; padding-right: 0;}
    .team_container_captain { width: 100%; height: 300px; margin-top: 5px;}
    .youth_conatiner { width: 100% !important; min-height: 300px;}
    .youth_content h3 { font-size: 1.5rem !important; }
    
    .player_content { width: calc((100% - 15px) / 2); }
    .event-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .pgn-btn span { display: none; }
    .pgn-btn { padding: 8px; font-size: 1.2rem; justify-content: center; }
    table.games-table th, table.games-table td { padding: 10px 8px; }
    .aktualita_left { padding: 25px; width: 100%; }
    
    .aktualita_content_images { grid-template-columns: 1fr; }
    .aktualita-gallery-wrapper.collapsed { max-height: 650px; } 
    
    .history_header, .history_item:nth-child(even) .history_header { flex-direction: column-reverse; align-items: stretch; }
    
    .history_content { width: 100%; padding: 25px; }
    
    .history_image { width: 100%; height: 220px; min-height: 220px; }
    .history_expanded_text_inner { padding: 25px; }
    .chess_games_container { grid-auto-columns: calc((100% - 20px) / 2); }

    .chess_games h1 { margin-bottom: 25px !important; }
    .teams_youth h1 { margin-bottom: 15px !important; }

    .carousel-btn { font-size: 1.5rem; padding: 10px; }
    .prev-btn { left: 10px; }
    .next-btn { right: 10px; }
}

@media (max-width: 600px) {
    .board-controls-wrapper { max-width: 100%; }
    .player_content { width: 100%; height: 300px;}
    
    .club1_container, .club2_container { font-size: 0.85rem !important; line-height: 1.3; }
    
    .filter-controls-wrapper { padding: 10px 12px; gap: 10px; }
    .filter-group { gap: 6px; }
    .filter-group label { font-size: 0.95rem !important; }
    .filter-group select, .custom-select-trigger { padding: 8px 10px; font-size: 0.95rem !important; }
    .custom-select-wrapper { min-width: 100px; } 
    .chess_games_container { grid-auto-columns: 100%; }
    #customSelectTrigger { min-width: 120px; }
}

/* =========================================================
   --- STYLY PRO SPONZORY (sponzori.html a admin.html) ---
   ========================================================= */

.sponsors-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    margin: 0 auto;
    padding-bottom: 20px;
}

.sponsor-card {
    display: flex;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    align-items: center;
    padding: 25px;
    gap: 35px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sponsor-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.08);
}

.sponsor-logo-wrapper {
    width: 260px;
    height: 140px;
    flex-shrink: 0;
    border: 1px solid #f1f5f9;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    border-radius: 8px;
    background-color: #f8fafc;
}

.sponsor-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sponsor-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sponsor-info h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: #0f172a;
    margin-top: 0;
    margin-bottom: 12px;
}

.sponsor-info p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #475569;
    margin: 0;
}

@media (max-width: 768px) {
    .sponsor-card {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 20px;
    }

    .sponsor-logo-wrapper {
        width: 100%;
        height: 160px;
    }

    .sponsor-info h3 {
        font-size: 1.5rem;
    }
}