/**
 * Wysoce zoptymalizowany komponent slidera województw dla motywu potomnego Listeo.
 * Część 2/3: Style CSS (Hardware Accelerated & Zero CLS)
 * Core Web Vitals Optimized
 */

/* Główny kontener komponentu */
.woj-slider-container {
    position: relative;
    width: 100%;
    margin: 24px 0;
    padding: 0;
    box-sizing: border-box;
    /* Izolacja renderowania dla wyższej wydajności */
    contain: paint;
}

/* Okno widokowe maskujące nadmiar slajdów */
.woj-slider-viewport {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 4px;
}

/* Szyna slidera - animowana sprzętowo */
.woj-slider-track {
    display: flex;
    display: -webkit-box;
    display: -ms-flexbox;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    will-change: transform;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    -webkit-transition: -webkit-transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    transition: -webkit-transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), -webkit-transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Pojedynczy slajd */
.woj-slide {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 100%;
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    padding: 12px;
    box-sizing: border-box;
    outline: none;
}

/* Link owijający kartę */
.woj-card-link {
    display: block;
    text-decoration: none !important;
    outline: none;
}

/* Karta województwa */
.woj-card {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    -webkit-box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), -webkit-box-shadow 0.3s ease;
    transition: -webkit-transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), -webkit-box-shadow 0.3s ease;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease, -webkit-transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), -webkit-box-shadow 0.3s ease;
    height: 100%;
}

.woj-card-link:hover .woj-card {
    -webkit-transform: translateY(-5px);
    transform: translateY(-5px);
    -webkit-box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Kontener obrazka - sztywne proporcje eliminujące CLS */
.woj-img-box {
    position: relative;
    width: 100%;
    aspect-ratio: 520 / 397;
    background: #f5f7fa;
    overflow: hidden;
}

.woj-img-box img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    -webkit-transition: -webkit-transform 0.5s ease;
    transition: -webkit-transform 0.5s ease;
    transition: transform 0.5s ease;
    transition: transform 0.5s ease, -webkit-transform 0.5s ease;
}

.woj-card-link:hover .woj-img-box img {
    -webkit-transform: scale(1.04);
    transform: scale(1.04);
}

/* Kontener tekstowy pod obrazkiem */
.woj-content-box {
    padding: 20px;
    text-align: center;
    background: #ffffff;
    -webkit-box-flex: 1;
    -ms-flex-positive: 1;
    flex-grow: 1;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

/* Tytuł województwa */
.woj-title {
    margin: 0 0 6px 0 !important;
    font-size: 20px;
    font-weight: 500;
    color: #222222;
    line-height: 1.3;
}

/* Liczba obiektów (Badge) */
.woj-badge {
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #b0b0b0;
    font-weight: 300;
}

.woj-count {
    font-weight: 300;
    color: #909090; /* Dopasowanie do domyślnego akcentu Listeo */
}

/* ======================================================================
 * ELEMENTY STERUJĄCE (ZINTEGROWANA KAPSUŁA)
 * ====================================================================== */
.woj-slider-controls {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f7f7f7;
    padding: 8px 10px; 
    border-radius: 50px;
    margin: 24px auto 0 auto;
    gap: 8px;
    
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

/* Stylizacja strzałek - powiększenie i pogrubienie */
.woj-arrow {
    background: transparent;
    border: none;
    width: 28px;  /* Stała szerokość pola klikalnego dla stabilizacji */
    height: 28px; /* Stała wysokość pola klikalnego */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    outline: none;
    color: #b0b0b0;
    transition: color 0.2s ease;
}

.woj-arrow:hover {
    background: transparent;
    color: #f91942;
    border-color: transparent;
}

/* Fizyczny rozmiar strzałek */
.woj-arrow::before {
    content: '';
    width: 11px;   /* Zwiększono z 7px */
    height: 11px;  /* Zwiększono z 7px */
    border-top: 2px solid currentColor;   /* Pogrubiono linię do 3px */
    border-right: 2px solid currentColor;  /* Pogrubiono linię do 3px */
    display: block;
}

.woj-prev::before {
    transform: rotate(-135deg);
    margin-left: 4px; /* Centrowanie optyczne strzałki w lewo */
}

.woj-next::before {
    transform: rotate(45deg);
    margin-right: 4px; /* Centrowanie optyczne strzałki w prawo */
}

/* Kontener kropek */
.woj-dots {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 0 4px; /* Drobny dystans między kropkami a strzałkami */
}

/* Kółka wskaźnika położenia */
.woj-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid #b0b0b0;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

/* Aktywna kropka (wypełniona) */
.woj-dot.active {
    background: #b0b0b0;
    border-color: #b0b0b0;
    transform: scale(1);
}

/* ======================================================================
 * RESPONSYWNOŚĆ
 * ====================================================================== */
@media (max-width: 768px) {
    .woj-slide {
        padding: 6px;
    }
    .woj-content-box {
        padding: 14px;
    }
    .woj-title {
        font-size: 17px;
    }
    .woj-badge {
        font-size: 13px;
    }
    .woj-slider-controls {
        display: none; /* Na mobile sterujemy gestem Swipe - ukrywa całą kapsułę */
    }
}