/* ==========================================================================
   Štítky inzerátů (Rezervováno / Prodáno)
   ========================================================================== */
.project-item-img-container,
.ad-img-wrap {
    position: relative;
}

.ad-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ad-labels--overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 6;
    justify-content: flex-end;
    max-width: calc(100% - 16px);
    pointer-events: none;
}

.ad-labels--inline {
    display: inline-flex;
    vertical-align: middle;
}

.ad-label {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
    white-space: nowrap;
}

.ad-labels--inline .ad-label {
    padding: 7px 14px;
    font-size: 13px;
    box-shadow: none;
}

.ad-label--reserved {
    background: #e0a526;
}

.ad-label--sold {
    background: #c0392b;
}

/* Prodaný inzerát – černobílé obrázky */
.ad-is-sold img {
    filter: grayscale(100%);
}

/* Logo poradce zůstává barevné */
.ad-is-sold .advisor-badge-overlay-list img,
.ad-is-sold .advisor-badge-overlay img {
    filter: none;
}

/* Pokud má inzerát štítky, odsuneme badge poradce doleva, aby se nepřekrývaly */
.has-ad-labels .advisor-badge-overlay-list,
.has-ad-labels .advisor-badge-overlay {
    right: auto;
    left: 8px;
}

.ad-labels--inline {
    margin-left: 10px;
}

/* ==========================================================================
   YouTube videa v pravém bloku
   ========================================================================== */
.widget-yt-videos {
    margin-top: 30px;
}

.widget-yt-videos--boxed {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
}

.widget-yt-videos--boxed .widget-yt-title {
    margin-bottom: 20px;
    color: #333;
    font-size: 18px;
    border-bottom: 2px solid #d4af37;
    padding-bottom: 10px;
}

.yt-video-item {
    display: block;
    margin-bottom: 18px;
    color: #333;
    text-decoration: none;
}

.yt-video-item:hover,
.yt-video-item:focus {
    color: #d4af37;
    text-decoration: none;
}

.yt-video-thumb {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 6px;
    background: #111;
}

.yt-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.yt-video-item:hover .yt-video-thumb img {
    transform: scale(1.04);
}

.yt-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 48px;
    height: 34px;
    margin: -17px 0 0 -24px;
    border-radius: 8px;
    background: rgba(204, 0, 0, .9);
    color: #fff;
    font-size: 16px;
    line-height: 34px;
    text-align: center;
}

.yt-video-title {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.yt-channel-link {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: #c00;
}

.yt-channel-link:hover {
    color: #900;
}

/* ==========================================================================
   Slideshow nejnovějších inzerátů nad patičkou (světlé pozadí)
   ========================================================================== */
.latest-ads-slider {
    padding: 50px 0 55px;
    background: #f7f7f7;
    border-top: 1px solid #ececec;
}

.footer-labeled-ads__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.footer-labeled-ads__head .title-inline {
    margin: 0;
    color: #333;
}

.footer-labeled-ads__nav {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.footer-labeled-ads__btn {
    width: 36px;
    height: 36px;
    border: 2px solid #d4af37;
    border-radius: 50%;
    background: #fff;
    color: #d4af37;
    line-height: 1;
    cursor: pointer;
    transition: background-color .2s, color .2s;
}

.footer-labeled-ads__btn:hover,
.footer-labeled-ads__btn:focus-visible {
    background: #d4af37;
    color: #fff;
}

.footer-labeled-ads__track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.footer-labeled-ads__track::-webkit-scrollbar {
    display: none;
}

.footer-labeled-ads__item {
    flex: 0 0 calc((100% - 60px) / 4);
    scroll-snap-align: start;
    overflow: hidden;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #fff;
    color: #333;
    text-decoration: none;
    transition: box-shadow .2s;
}

.footer-labeled-ads__item:hover,
.footer-labeled-ads__item:focus {
    color: #d4af37;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
}

.footer-labeled-ads__img {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #eee;
}

.footer-labeled-ads__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.footer-labeled-ads__name {
    display: block;
    padding: 12px 14px 14px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}

@media (max-width: 991px) {
    .footer-labeled-ads__item {
        flex-basis: calc((100% - 20px) / 2);
    }
}

@media (max-width: 575px) {
    .footer-labeled-ads__item {
        flex-basis: 80%;
    }
}

/* ==========================================================================
   YouTube videa vložená do textu inzerátu – shorts na výšku, ostatní na šířku
   (rozměry nastavuje editor: 315×560 = shorts, 560×315 = běžné video)
   ========================================================================== */
.machine-text-content iframe[src*="youtube.com/embed/"],
.ad-text-content iframe[src*="youtube.com/embed/"],
.ad-text-block-item iframe[src*="youtube.com/embed/"] {
    display: block;
    max-width: 100%;
    height: auto;
    border: 0;
    border-radius: 8px;
}

.machine-text-content iframe[src*="youtube.com/embed/"]:not([height="560"]),
.ad-text-content iframe[src*="youtube.com/embed/"]:not([height="560"]),
.ad-text-block-item iframe[src*="youtube.com/embed/"]:not([height="560"]) {
    width: 560px;
    aspect-ratio: 16 / 9;
}

.machine-text-content iframe[src*="youtube.com/embed/"][height="560"],
.ad-text-content iframe[src*="youtube.com/embed/"][height="560"],
.ad-text-block-item iframe[src*="youtube.com/embed/"][height="560"] {
    width: 315px;
    aspect-ratio: 9 / 16;
}

/* ==========================================================================
   Detail inzerátu – šikmý pruh „Prodáno“ přes obrázek
   ========================================================================== */
.ad-sold-ribbon-host {
    position: relative;
    overflow: hidden;
}

.ad-sold-ribbon {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 5;
    width: 150%;
    transform: translate(-50%, -50%) rotate(-30deg);
    padding: 14px 0;
    background: rgba(192, 57, 43, .92);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
    text-align: center;
    pointer-events: none;
}

.ad-sold-ribbon span {
    color: #fff;
    font-size: 34px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .25em;
    text-transform: uppercase;
}

@media (max-width: 767px) {
    .ad-sold-ribbon {
        padding: 10px 0;
    }

    .ad-sold-ribbon span {
        font-size: 24px;
    }
}

/* Bílé logo v patičce – na mobilu ve stejné velikosti jako na počítači */
.logo-footer img {
    max-width: 270px;
}
