/* Jednotný dvousloupcový layout pod hero: hlavní obsah + vpravo panel dokumentů */

.page-content-shell {
    --page-aside-sticky-top: calc(var(--header-height, 127px) + 1rem);
}

.page-content-shell .page-content-aside-sticky {
    position: sticky;
    top: var(--page-aside-sticky-top);
    z-index: 2;
}

.page-aside {
    overflow: hidden;
}

.page-aside .card-header {
    border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
}

.page-aside-doc-list .list-group-item {
    padding: 0.85rem 1rem;
    border-color: rgba(15, 23, 42, 0.06);
}

.page-aside-doc-link {
    gap: 0.75rem;
    align-items: flex-start;
}

.page-aside-doc-link .page-aside-doc-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    font-size: 1.15rem;
}

.page-aside-doc-link .page-aside-doc-title {
    font-weight: 800;
    font-size: 0.92rem;
    color: var(--fl-text-dark);
    line-height: 1.25;
}

.page-aside-doc-link .page-aside-doc-meta {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

.page-aside-doc-link:hover .page-aside-doc-title {
    color: var(--fl-green-primary, var(--fl-green-primary));
}

.page-aside-empty {
    padding: 1.25rem 1rem;
    font-size: 0.88rem;
    line-height: 1.45;
    color: #64748b;
    background: #f8fafc;
}

@media (max-width: 991.98px) {
    .page-content-shell .page-content-aside-sticky {
        position: static;
    }
}

/* Na stránce návazné dopravy už má sekce vlastní podklad — zdvojení šedé zbytečně */
.page-connected-transport .section-transport.bg-light {
    background-color: transparent !important;
}

/* Spodní reklamní strip (sdílený přes page-content-shell-close) */
.page-bottom-ad {
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    scroll-margin-top: calc(var(--header-height, 127px) + 24px);
}

.page-content-shell.pb-5:has(.page-bottom-ad--full) {
    padding-bottom: 0.85rem !important;
}

.page-bottom-ad--full {
    margin-top: 2.75rem;
    margin-bottom: 0;
}

.page-bottom-ad--full::before {
    content: "";
    display: block;
    width: 72px;
    height: 4px;
    margin: 0 0 1.15rem;
    border-radius: 999px;
    background: var(--fl-green-primary);
}

.page-bottom-ad__inner {
    border-radius: 20px;
    padding: 1.35rem 1.35rem 1.45rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 45%, #ecfdf5 100%);
    border: 1px solid rgba(34, 197, 94, 0.16);
    box-shadow: 0 16px 40px -32px rgba(15, 23, 42, 0.22);
}

.page-bottom-ad__tag {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.45rem;
}

.page-bottom-ad__title {
    font-size: clamp(1.1rem, 2.2vw, 1.35rem);
    font-weight: 900;
    color: var(--fl-text-dark);
    letter-spacing: -0.02em;
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

.page-bottom-ad__text {
    font-size: 0.9rem;
    line-height: 1.65;
    color: #475569;
    max-width: 36rem;
}

.page-bottom-ad__media-link {
    border-radius: 16px;
    overflow: hidden;
    line-height: 0;
    box-shadow: 0 12px 28px -18px rgba(15, 23, 42, 0.25);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    max-width: 100%;
}

.page-bottom-ad__media-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px -20px rgba(22, 163, 74, 0.25);
}

.page-bottom-ad__media-link:focus-visible {
    outline: 2px solid #22c55e;
    outline-offset: 3px;
}

.page-bottom-ad--full .page-bottom-ad__inner {
    padding: 0;
    overflow: hidden;
    background: #fff;
}

.page-bottom-ad__slides {
    position: relative;
    aspect-ratio: 1240 / 440;
}

.page-bottom-ad__slides a {
    position: absolute;
    inset: 0;
    display: block;
    opacity: 0;
    animation: bottomAdFade 27s infinite;
}

.page-bottom-ad__slides a:first-child {
    opacity: 1;
    animation: none;
}

.page-bottom-ad__slides a:nth-child(1) { animation-delay: 0s; }
.page-bottom-ad__slides a:nth-child(2) { animation-delay: 9s; }
.page-bottom-ad__slides a:nth-child(3) { animation-delay: 18s; }

.page-bottom-ad__slides--pair a {
    animation-name: bottomAdFadePair;
    animation-duration: 18s;
}

.page-bottom-ad__slides--pair a:nth-child(2) { animation-delay: 9s; }

.page-bottom-ad__slides img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    object-position: center;
    background: #fff;
}

@keyframes bottomAdFade {
    0% { opacity: 0; }
    4% { opacity: 1; }
    31% { opacity: 1; }
    36% { opacity: 0; }
    100% { opacity: 0; }
}

@keyframes bottomAdFadePair {
    0% { opacity: 0; }
    4% { opacity: 1; }
    46% { opacity: 1; }
    54% { opacity: 0; }
    100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .page-bottom-ad__slides a {
        animation: none;
        opacity: 0;
    }

    .page-bottom-ad__slides a:first-child {
        opacity: 1;
    }
}

.page-bottom-ad__img {
    width: 100%;
    max-width: 360px;
    height: auto;
    max-height: 200px;
    object-fit: contain;
    object-position: center;
    vertical-align: middle;
    background: #f1f5f9;
}

@media (max-width: 991.98px) {
    .page-bottom-ad__inner {
        text-align: center;
    }

    .page-bottom-ad__text {
        margin-left: auto;
        margin-right: auto;
    }

    .page-bottom-ad__media-link {
        margin-top: 0.25rem;
    }
}
