/* ============================================================
   Blok: Slajder
   motyw-t/slajder
   ============================================================ */

/* ─────────────────────────────────────────────────────────────
   WSPÓLNE
   ───────────────────────────────────────────────────────────── */

.t-slajder {
    position: relative;
    overflow: hidden;
}

/* ─────────────────────────────────────────────────────────────
   TRYB HERO
   ───────────────────────────────────────────────────────────── */

.t-slajder--hero {
    height: var( --t-slider-h, 480px );
}

.t-slajder--hero .swiper-wrapper {
    height: 100%;
}

.t-slajder-slide {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size:     cover !important;
    background-position: center center !important;
    background-repeat:   no-repeat !important;
}

/* ── Nakładka (hero + cinematic) ── */
.t-slajder-overlay {
    position: absolute;
    inset: 0;
    background: var( --t-overlay-bg, rgba(0,0,0,0.55) );
    pointer-events: none;
    z-index: 1;
}

/* ── Treść na obrazie ── */
.t-slajder-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: 2.5rem 2rem;
    max-width: 800px;
    width: 100%;
}

.t-slajder-title {
    margin: 0 0 0.75rem;
    font-size: clamp( 1.6rem, 4vw, 2.8rem );
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    text-shadow: 0 2px 12px rgba( 0, 0, 0, 0.3 );
}

.t-slajder-subtitle {
    margin: 0 0 1.75rem;
    font-size: clamp( 1rem, 2.2vw, 1.2rem );
    color: rgba( 255, 255, 255, 0.88 );
    line-height: 1.6;
    text-shadow: 0 1px 6px rgba( 0, 0, 0, 0.25 );
}

.t-slajder-cta {
    display: inline-block;
    text-decoration: none;
}

/* ── Tryb "below" ── */
.t-slajder--below .t-slajder-slide {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    height: 100%;
}

.t-slajder--below .t-slajder-slide::before {
    content: '';
    display: block;
    flex: 1;
    background: inherit;
    background-size: cover !important;
    background-position: center !important;
}

.t-slajder-below-caption {
    flex-shrink: 0;
    padding: 1rem 1.5rem 1.25rem;
    text-align: center;
    background: #fff;
}

.t-slajder-below-title {
    margin: 0 0 0.4rem;
    font-size: clamp( 1.1rem, 2.5vw, 1.5rem );
    font-weight: 700;
    color: #1a1a1a;
}

.t-slajder-below-sub {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
}

/* ─────────────────────────────────────────────────────────────
   TRYB CINEMATIC
   ───────────────────────────────────────────────────────────── */

.t-slajder--cinematic {
    height: var( --t-slider-h, 480px );
}

.t-slajder-cin-img {
    position: absolute;
    inset: 0;
    background-size:     cover;
    background-position: center;
    background-repeat:   no-repeat;
    z-index: 0;
}

.t-slajder-cin-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
    pointer-events: none;
}

.t-slajder--cinematic .swiper-wrapper {
    height: 100%;
    z-index: 2;
}

.t-slajder-cin-slide {
    display: flex !important;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: transparent;
}

/* ─────────────────────────────────────────────────────────────
   PAGINATION (KROPKI) — hero + cinematic
   ───────────────────────────────────────────────────────────── */

.t-slajder-pagination {
    bottom: 18px !important;
    z-index: 10 !important;
}

.t-slajder--hero .swiper-pagination-bullet,
.t-slajder--cinematic .swiper-pagination-bullet {
    background: rgba( 255, 255, 255, 0.5 );
    opacity: 1;
    width: 10px;
    height: 10px;
    transition: background 0.2s, transform 0.2s;
}

.t-slajder--hero .swiper-pagination-bullet-active,
.t-slajder--cinematic .swiper-pagination-bullet-active {
    background: #fff;
    transform: scale( 1.25 );
}

/* ─────────────────────────────────────────────────────────────
   STRZAŁKI
   ───────────────────────────────────────────────────────────── */

.t-slajder-prev,
.t-slajder-next {
    color: #fff !important;
    width: 44px !important;
    height: 44px !important;
    background: rgba( 255, 255, 255, 0.15 );
    backdrop-filter: blur( 4px );
    border-radius: 50%;
    transition: background 0.2s;
    z-index: 10;
}

.t-slajder-prev:hover,
.t-slajder-next:hover {
    background: rgba( 255, 255, 255, 0.3 );
}

.t-slajder-prev::after,
.t-slajder-next::after {
    font-size: 1.1rem !important;
    font-weight: 700;
}

.t-slajder--logos .t-slajder-prev,
.t-slajder--logos .t-slajder-next {
    color: #333 !important;
    background: rgba( 0, 0, 0, 0.08 );
}

.t-slajder--logos .t-slajder-prev:hover,
.t-slajder--logos .t-slajder-next:hover {
    background: rgba( 0, 0, 0, 0.15 );
}

/* ─────────────────────────────────────────────────────────────
   TRYB LOGOS / KARUZELA — baza
   ───────────────────────────────────────────────────────────── */

.t-slajder--logos {
    padding: 1.5rem 3rem;
    height: auto !important;
}

.t-slajder--logos .swiper-wrapper {
    align-items: stretch;  /* wszystkie slajdy równej wysokości */
}

.t-slajder-logo-slide {
    display: flex !important;
}

/* Kontener kafla — wspólna baza */
.t-slajder-logo-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba( 0, 0, 0, 0.07 );
    background: #fff;
    transition: box-shadow 0.25s, transform 0.25s;
}

a.t-slajder-logo-wrap:hover {
    box-shadow: 0 4px 20px rgba( 0, 0, 0, 0.1 );
    transform: translateY( -2px );
}

/* ─────────────────────────────────────────────────────────────
   FIT: CONTAIN — cały obrazek widoczny
   ───────────────────────────────────────────────────────────── */

.t-slajder--fit-contain .t-slajder-logo-wrap {
    padding: 0.75rem;
    gap: 0;
    justify-content: flex-start; /* img rośnie, name na dole */
}

.t-slajder--fit-contain .t-slajder-logo-wrap img {
    flex: 1;
    min-height: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: filter 0.3s;
}

/* ─────────────────────────────────────────────────────────────
   FIT: COVER — zdjęcia portretowe
   ───────────────────────────────────────────────────────────── */

.t-slajder--fit-cover .t-slajder-logo-wrap {
    padding: 0;
    justify-content: flex-end;
}

.t-slajder--fit-cover .t-slajder-logo-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: filter 0.3s;
}

/* ─────────────────────────────────────────────────────────────
   PODPIS — .t-slajder-logo-name
   ───────────────────────────────────────────────────────────── */

/* Baza — domyślnie overlay na cover */
.t-slajder-logo-name {
    font-size: 0.8rem;
    font-weight: 400;
    color: #fff;
    text-align: center;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Pełna szerokość — KLUCZOWE */
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0.35rem 0.5rem;
    /* Overlay: przyklejony do dołu */
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    background: rgba( 0, 0, 0, 0.5 );
}

/* Contain: podpis w normalnym flow pod obrazkiem */
.t-slajder--fit-contain .t-slajder-logo-name {
    position: static;
    flex-shrink: 0;
    background: transparent;
    color: #888;
    padding: 0.3rem 0.25rem 0;
}

/* ── Tryb "pod zdjęciem" (names-below) ── */

/* Cover + below: podpis poza obrazkiem */
.t-slajder--names-below.t-slajder--fit-cover .t-slajder-logo-name {
    position: relative;
    z-index: 2;
    bottom: auto;
    left: auto;
    right: auto;
    background: transparent;
    color: #888;
}

/* Contain + below: bez zmian — już jest w flow */

/* Below: wrap musi "przepuścić" podpis poza absolute img */
.t-slajder--names-below.t-slajder--fit-cover .t-slajder-logo-wrap {
    padding: 0;
    padding-bottom: 0; /* podpis w flow za img */
}

/* ─────────────────────────────────────────────────────────────
   GRAYSCALE
   ───────────────────────────────────────────────────────────── */

.t-slajder--grayscale .t-slajder-logo-wrap img {
    filter: grayscale( 1 ) opacity( 0.65 );
}

.t-slajder--grayscale .t-slajder-logo-wrap:hover img {
    filter: grayscale( 0 ) opacity( 1 );
}

/* ─────────────────────────────────────────────────────────────
   RESPONSYWNOŚĆ
   ───────────────────────────────────────────────────────────── */

@media ( max-width: 767px ) {
    .t-slajder-content {
        padding: 2rem 1.25rem;
    }

    .t-slajder--hero .t-slajder-prev,
    .t-slajder--hero .t-slajder-next,
    .t-slajder--cinematic .t-slajder-prev,
    .t-slajder--cinematic .t-slajder-next {
        display: none !important;
    }

    .t-slajder--logos {
        padding: 1rem 2.5rem;
    }
}
