/* Header, footer and other global layout styles moved to `assets/system-wide.css`. */
/* Page-specific styles (sections, cards, carousel, etc.) remain here. */

/* STYLY SEKCE */
.content-section {
    margin-top: 40px;
}

main > .content-section:first-of-type {
    margin-top: 0;
}

.section-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    color: #D42E25;
    text-transform: uppercase;
    font-weight: normal;
    margin-top: 0;
    margin-bottom: 24px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    align-items: start; /* Zabrání natahování položek na stejnou výšku */
}

/* BASICBOX */
.card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease-in-out;
    height: 450px;
    position: relative;
}

.card:hover {
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
}

/* MODIFIKÁTOR PRO AUTO VÝŠKU */
.card--auto-height {
    height: auto;
}

.card-image-container {
    position: relative;
}

.card-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: #D42E25;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 10;
}

.card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.3s ease-in-out;
}

.card:hover .card-image {
    transform: scale(1.05);
}

.card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.card-content h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-family: 'Oswald', sans-serif;
    font-weight: normal;
    font-size: 1.3rem;
    color: #D42E25;
}

.card-date {
    display: block;
    font-size: 0.875rem;
    color: #606770;
    margin-top: -5px;
    margin-bottom: 24px;
}

.card-perex {
    margin: 0;
    color: #606770;
    font-size: 1rem;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    line-clamp: 4;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

/* Obalovací odkaz pro celé karty */
.card-link-wrapper {
    text-decoration: none;
    color: inherit;
}

/* DOUBLEBOX & OVERLAYBOX */
.card--double {
    grid-column: span 2;
}

.card-link-wrapper.card--overlay .card-image,
.card-link-wrapper.card--double .card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.card--overlay:hover .card-image,
.card--double:hover .card-image {
    transform: scale(1.05);
}

.card-link-wrapper.card--overlay .card-content-overlay,
.card-link-wrapper.card--double .card-content-overlay {
    position: relative;
    z-index: 1;
    height: 100%;
    color: white;
    background: linear-gradient(transparent 20%, rgba(0, 0, 0, 0.6) 60%, rgba(0, 0, 0, 0.9) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    flex-grow: 1; /* Zajistí, že se overlay roztáhne */
    padding: 20px;
    box-sizing: border-box;
}

.card-link-wrapper.card--overlay h3,
.card-link-wrapper.card--overlay .card-date,
.card-link-wrapper.card--overlay .card-perex,
.card-link-wrapper.card--double h3,
.card-link-wrapper.card--double .card-date,
.card-link-wrapper.card--double .card-perex {
    color: white;
}

.card-link-wrapper.card--overlay h3,
.card-link-wrapper.card--double h3 {
    font-family: 'Oswald', sans-serif;
    font-weight: normal;
    font-size: 1.8rem;
}

.card-link-wrapper.card--overlay .card-date,
.card-link-wrapper.card--double .card-date {
    margin-top: -15px;
}

/* KARUSEL */
.carousel-panel {
    padding: 0;
    display: flex;
    flex-direction: column;
}

.carousel-main-slides {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    flex-grow: 1;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Výchozí stav: slide je neviditelný a posunutý dolů */
    opacity: 0;
    transform: translateY(20px);
    transition: transform 1.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 1.5s ease-in-out;
    z-index: 1;
}

.carousel-slide.is-active {
    /* Aktivní stav: slide je viditelný a na své pozici */
    opacity: 1;
    transform: translateY(0);
    z-index: 2;
}

.carousel-slide.is-exiting {
    /* Odcházející slide: posune se nahoru a zmizí */
    transform: translateY(-20px);
    opacity: 0;
    z-index: 1; /* Ujistíme se, že je pod novým slidem */
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-slide__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
}

.carousel-slide__overlay h3 {
    font-family: 'Oswald', sans-serif;
    color: white;
    font-size: 1.8rem;
    font-weight: normal;
    margin: 0;
    line-height: 1.2;
}

.carousel-thumbnails {
    display: flex;
    gap: 4px;
    padding: 8px;
    background-color: white;
}

.carousel-thumbnail {
    cursor: pointer;
    border: 3px solid transparent;
    aspect-ratio: 16 / 9;
    transition: border-color 0.3s ease;

    border-radius: 0;
    background: none;
    padding: 0;
}

.carousel-thumbnail:hover {
    border-color: #f0f2f5;
}

.carousel-thumbnail.is-active {
    border-color: #D42E25;
}

.carousel-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* SPECIÁLNÍ MŘÍŽKA PRO HORNÍ ČÁST */
.top-grid-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    align-items: stretch;
}

.right-column-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* STYLY PRO PANEL BLESKOVEK */
.bleskovky-panel {
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bleskovka-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f2f5;
    text-decoration: none;
    color: inherit;
}

.bleskovky-panel a.bleskovka-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.bleskovka-icon {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
}

.bleskovka-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.bleskovka-content {
    flex-grow: 1;
}

.bleskovka-time {
    font-family: 'Oswald', sans-serif;
    color: #D42E25;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 4px;
}

.bleskovka-text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #333;
}

.bleskovka-link-icon {
    flex-shrink: 0;
    align-self: center;
    margin-left: 16px;
}

.bleskovka-link-icon svg {
    width: 16px;
    height: 16px;
    fill: #c0c0c0;
}

.bleskovka-text a {
    color: #D42E25;
    text-decoration: underline;
}

.bleskovka-link-icon div {
    display: flex;
}

/* STYLY PRO SPORTBOX */
.pozvanka-panel {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.sidebar-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    color: #D42E25;
    text-transform: uppercase;
    font-weight: normal;
    margin: 0;
    margin-top: -58px;
}

.zapas-item {
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    color: inherit;
    padding: 8px 12px;
    border-radius: 8px;
    margin: -8px -12px;
    transition: background-color 0.2s ease-in-out;
}

.zapas-item:hover {
    background-color: #f5f5f5;
}

.zapas-item+.zapas-item {
    border-top: 1px solid #f0f2f5;
    padding-top: 16px;
    margin-top: 16px;
}

.zapas-logo {
    flex-shrink: 0;
    width: 65px;
}

.zapas-logo img {
    width: 100%;
    height: auto;
}

.zapas-info {
    font-family: 'Oswald', sans-serif;
    font-weight: normal;
    text-transform: uppercase;
    text-align: center;
    width: 100%;
}

.zapas-info .tymy {
    font-size: 1.0rem;
    line-height: 1.2;
}

.zapas-info .vs {
    font-size: 0.7rem;
    color: #606770;
    margin: 2px 0;
}

.zapas-cas {
    font-family: 'Roboto', sans-serif;
    font-size: 0.75rem;
    color: #606770;
    text-transform: none;
    margin-top: 6px;
}

.zapas-item .tymy div:first-child,
.zapas-item .tymy div:last-child {
    color: #D42E25;
}

.zapas-item:first-child .tymy div:first-child,
.zapas-item:first-child .tymy div:last-child {
    color: #005dab; /* Modrá barva pro první zápas */
}


/* STYL PRO REKLAMNÍ BOX */
.ad-panel {
    padding: 0;
    height: fit-content;
}

.ad-panel img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

/* Styly pro dynamickou reklamu v pravém sloupci */
.ad-panel #affiliateWrap {
    position: relative;
    padding: 20px;
}

.ad-panel #affiliateWrap .reklama-text {
    position: absolute;
    top: 0px;
    right: 30px;
    font-size: 11px;
    color: gray;
}

.ad-panel #jsad_pozice_114 {
    max-width: 100%;
    aspect-ratio: 302 / 252;
    height: auto;
    border: 1px solid #cfcfcf;
    margin: 10px auto 10px auto;
    position: relative; /* Nutné pro vnitřní absolutní pozicování */
}

.ad-panel #jsad_pozice_112 {
    width: 250px;
    max-width: 100%;
    aspect-ratio: 250 / 200;
    height: auto;
    margin: 10px auto;
    position: relative; /* Nutné pro vnitřní absolutní pozicování */
}

/* Společné responzivní styly pro dynamicky vložený obsah reklam */
.ad-panel [id^="jsad_pozice_"] div[id^="div_ipozice_"],
.ad-panel [id^="jsad_pozice_"] div[id^="div_ipozice_"] object,
.ad-panel [id^="jsad_pozice_"] div[id^="div_ipozice_"] img {
    width: 100% !important;
    height: 100% !important;
    position: absolute;
    top: 0;
    left: 0;
    object-fit: cover;
}

/* STYLY PRO DYNAMICKÉ NAČÍTÁNÍ A TLAČÍTKO */
.hidden-article {
    display: none;
}

/* Společná třída pro outline tlačítka */
.button--outline {
    display: inline-block;
    padding: 10px 25px;
    background-color: transparent;
    color: #D42E25;
    border: 2px solid #D42E25;
    border-radius: 20px;
    font-family: 'Oswald', sans-serif;
    font-weight: normal;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.button--outline:hover {
    background-color: #D42E25;
    color: white;
}

.load-more-button {
    /* Specifické styly pro layout tohoto tlačítka.
       display: block je nutné pro fungování margin: auto */
    display: block;
    width: fit-content;
    margin: 40px auto 0 auto;
}

/* Hlavní obsah, který se roztáhne */
main {
    flex-grow: 1;
}

/* STYLY PRO UPRAVENÝ PROMO BOX */
.card--promo .promo-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.card--promo:hover .card-image {
    transform: none;
}

.card--promo .card-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card--promo .promo-card-details p {
    margin: 0 0 8px 0;
    line-height: 1.4;
    font-size: 0.95rem;
}

.card--promo .promo-card-details .promo-card-small-text {
    font-size: 0.85rem;
    color: #606770;
    margin-top: -4px;
}

.card--promo .promo-card-button-wrapper {
    margin-top: auto;
    padding-top: 16px;
}

/* promo card buttons use the shared `.button--outline` utility class; no local overrides */

.card--promo .promo-card-link:hover .promo-card-button {
    background-color: #D42E25;
    color: white;
}

/* STYLY PRO NAROZENINOVÝ BOX */
.card--birthday {
    padding: 24px 28px;
    height: auto;
}

.birthday-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.birthday-item {
    display: flex;
    align-items: baseline;
    padding: 6px 0;
    line-height: 1.5;
    font-size: 0.95rem;
}

.birthday-date {
    color: #D42E25;
    font-weight: 700;
    width: 55px;
    flex-shrink: 0;
}

.birthday-name {
    font-weight: 700;
    margin-right: 5px;
}

.birthday-main a {
    color: #D42E25; /* Stejná červená jako datum */
    text-decoration: none; /* Odstranění výchozího podtržení */
    transition: text-decoration 0.2s ease-in-out;
}

.birthday-main a:hover {
    text-decoration: underline; /* Podtržení při najetí myší */
}

/* Specifický layout pro mřížku s narozeninami */
.birthday-grid {
    /* Vynutí dvousloupcový layout a zabrání "uskakování" */
    grid-template-columns: 2fr 1fr;
}

@media (max-width: 1055px) {
    /* Skryje reklamní box vedle narozenin dříve, aby se předešlo "uskakování" */
    .top-grid-container:has(.card--birthday) .hide-on-mobile {
        display: none;
    }

    /* Roztáhne narozeninový box přes oba sloupce, když se reklama skryje */
    .top-grid-container:has(.card--birthday) .card--birthday {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    main {
        padding: 0;
    }

    .top-ad-banner {
        margin-top: 0;
    }

    .top-ad-banner img {
        width: 100%;
    }

    .top-ad-banner .adCounter, 
    .top-ad-banner .adReklama {
        top: -15px;
    }

    .top-grid-container,
    .card-grid {
        grid-template-columns: 1fr;
    }

    .card--double {
        grid-column: auto;
    }

    .card {
        height: auto;
        min-height: 400px;
    }

    .card--auto-height {
        min-height: 0;
    }

    .card--birthday {
        width: auto;
        min-height: 0px;
    }

    .carousel-slide__overlay h3 {
        font-size: 1.5rem;
    }

    .card--overlay h3,
    .card--double h3 {
        font-size: 1.5rem;
    }

    .sidebar-title {
        margin-top: 24px;
    }


    .bleskovka-item {
        display: flex;
        align-items: flex-start;
        gap: 12px;
    }

    .bleskovka-icon {
        width: 60px;
        height: 60px;
        flex-shrink: 0;
    }

    .bleskovka-content {
        margin: 0;
    }

    .bleskovka-time {
        display: inline;
        font-weight: 700;
        margin-right: 6px;
        margin-bottom: 0;
        font-size: 0.9rem;
    }

    .bleskovka-text {
        display: inline;
        font-size: 0.9rem;
    }

    .bleskovka-link-icon {
        display: none;
    }

    .carousel-thumbnails {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .carousel-thumbnail {
        flex-shrink: 0;
    }

    #promo-box {
        margin-top: 40px;
    }

    .hide-on-mobile {
        display: none;
    }

    /* Úprava pro reklamu v pravém sloupci v mobilním zobrazení */
    .ad-panel #jsad_pozice_114 {
        aspect-ratio: 300/250;
        height: 252px;       /* Nastavíme pevnou výšku podle obsahu */
        display: flex;       /* Povolíme centrování obsahu */
        justify-content: center;
    }
    /* Mobile footer rules moved to `assets/system-wide.css`. */
}

/* A11y focus outlines and skip-link helper moved to `assets/system-wide.css` */

/* Hidden cards until "ZOBRAZIT DALŠÍ" */
.is-hidden {
    display: none !important;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* === Carousel thumbnails: Responzivní layout === */
.carousel-thumbnails {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 0px; /* Zmenšení mezer na mobilu */
    padding: 5px; /* Zmenšení vnitřního okraje na mobilu */
    box-sizing: border-box;
    overflow: hidden;
    z-index: 10;
}

/* Thumbnail tiles */
.carousel-thumbnail {
    display: block;
    width: 100%;
    min-width: 0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.carousel-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

@media (min-width: 1024px) {
    .carousel-thumbnails {
        gap: 12px;
        padding: 12px;
    }
}
