/* ==========================================================================
   Card slider – slider z kartami (formaty reklamowe)
   ========================================================================== */
/* No vertical padding on any screen – spacing comes from the page / Stackable blocks around it.
   No overflow: hidden on mobile – cards run out to the screen edge, #main-container clips them */
.ad-formats {
    width: 100%;
    padding-top: 0;
    padding-bottom: 0;
}

.ad-formats__inner {
    box-sizing: content-box;
    display: flex;
    flex-direction: column;
    gap: 48px;
    margin-inline: auto;
}

/* Slider wrapper */
.ad-formats__slider {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

/* Counter + arrows */
.ad-formats__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ad-formats__counter {
    margin: 0;
    font-family: "DM Mono", monospace;
    font-size: 12px;
    color: var(--theme-palette-color-8);
}

.ad-formats__nav {
    display: flex;
    gap: 8px;
}

.ad-formats__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--theme-palette-color-3);
    border-radius: 0;
    background: var(--theme-palette-color-8);
    color: var(--theme-palette-color-3);
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
}

.ad-formats__prev svg {
    transform: rotate(180deg);
}

.ad-formats__next {
    border-color: var(--theme-palette-color-1);
    background: var(--theme-palette-color-1);
    color: var(--theme-palette-color-8);
}

.ad-formats__arrow:hover {
    border-color: var(--theme-palette-color-3);
    background: var(--theme-palette-color-3);
    color: var(--theme-palette-color-8);
}

.ad-formats__arrow:focus-visible {
    outline: 2px solid var(--theme-palette-color-3);
    outline-offset: 3px;
}

.ad-formats__arrow.swiper-button-disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

/* Swiper */
.ad-formats__swiper {
    width: 100%;
    overflow: visible !important;
}

.ad-formats__swiper .swiper-slide {
    height: auto; /* equal-height cards */
}

/* Card */
.ad-format {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 320px;
    padding: 32px 28px 28px;
    border: 1px solid var(--theme-palette-color-5);
    background: var(--theme-palette-color-8);
}

/* Icon + title – same height in every card (min-height set by card-slider.js), so descriptions line up */
.ad-format__head {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ad-format__title {
    margin: 0;
    font-size: 24px;
}

/* SVG used as a mask (mask-image set inline) – colour comes from the background */
.ad-format__icon {
    display: block;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    background-color: var(--theme-palette-color-1);
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

/* Link in the style of category labels */
.ad-format__link {
    display: inline-flex;
    flex-direction: column;
    align-self: flex-start;
    gap: 6px;
    margin-top: auto;
    font-family: "DM Mono", monospace;
    font-size: 12px;
    color: var(--theme-palette-color-3);
    text-decoration: none;
}

.ad-format__link::after {
    content: "";
    width: 40px;
    height: 2px;
    background: var(--theme-palette-color-1);
    transition: width 0.2s;
}

.ad-format__link:hover {
    color: var(--theme-palette-color-1);
}

.ad-format__link:hover::after {
    width: 100%;
}

/* Pagination – bars instead of dots */
.ad-formats__pagination {
    position: static;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.ad-formats__pagination .swiper-pagination-bullet {
    width: 16px;
    height: 4px;
    margin: 0 !important;
    border-radius: 0;
    background: var(--theme-palette-color-5);
    opacity: 1;
    transition: width 0.3s, background-color 0.3s;
}

.ad-formats__pagination .swiper-pagination-bullet-active {
    width: 40px;
    background: var(--theme-palette-color-1);
}

/* Everything fits – no controls needed */
.ad-formats__slider.is-locked .ad-formats__bar,
.ad-formats__slider.is-locked .ad-formats__pagination {
    display: none;
}

@media (max-width: 781px) {
    .ad-formats__inner {
        gap: 32px;
    }

    .ad-format {
        min-height: 280px;
        padding: 28px 24px 24px;
    }
}
