/* Dramaland 2.0 — finalne szlify bez zmiany charakteru strony */

/* Jednolity rytm sekcji strony głównej. */
.dl-home .dl-home-flow-section {
    padding-block: clamp(52px, 6vw, 82px);
}

/* Karty: subtelna reakcja, bez zmiany ich układu i danych. */
.dl-title-card {
    height: 100%;
    transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
    will-change: transform;
}

.dl-title-card:hover,
.dl-title-card:focus-within {
    transform: translateY(-5px);
    box-shadow: 0 18px 42px rgba(0, 0, 0, .24);
}

.dl-title-card-poster {
    overflow: hidden;
}

.dl-title-card-poster img {
    transition: transform .38s ease, filter .38s ease;
}

.dl-title-card:hover .dl-title-card-poster img,
.dl-title-card:focus-within .dl-title-card-poster img {
    transform: scale(1.035);
    filter: brightness(1.035);
}

.dl-title-card-title {
    min-height: 2.7em;
}

/* Ranking: nadal ten sam styl, ale pierwsza trójka jest czytelniejsza. */
.dl-home-ranking-list {
    border-top: 0;
    display: grid;
    gap: 12px;
}

.dl-home-ranking-item {
    grid-template-columns: 62px 72px minmax(0, 1fr) 44px;
    min-height: 108px;
    padding: 12px 16px;
    border: 1px solid rgba(217, 164, 65, .13);
    border-radius: 16px;
    background: rgba(255, 255, 255, .018);
    transition: transform .22s ease, background .22s ease, border-color .22s ease;
}

.dl-home-ranking-item:hover {
    padding-inline: 16px;
    transform: translateX(4px);
    background: rgba(255, 255, 255, .035);
    border-color: rgba(217, 164, 65, .32);
}

.dl-home-ranking-number {
    display: grid;
    place-items: center;
    min-width: 48px;
    font-family: inherit;
    font-size: 30px;
    line-height: 1;
}

.dl-home-ranking-number.is-plain {
    color: rgba(217, 164, 65, .65);
    font-family: Georgia, serif;
}

.dl-home-ranking-poster {
    width: 58px;
    height: 82px;
    border-radius: 10px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .26);
}

.dl-home-ranking-copy span {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
}

.dl-home-ranking-copy .dl-ranking-votes {
    color: rgba(247, 239, 228, .42);
}

/* Stopka — niewielki, spójny przycisk społeczności. */
.dl-footer-community p {
    margin: 0 0 14px;
    max-width: 260px;
}

.dl-footer-facebook {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    width: fit-content;
    padding: 10px 15px;
    border: 1px solid rgba(254, 233, 206, .24);
    border-radius: 999px;
    color: #fee9ce;
    text-decoration: none;
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.dl-footer-facebook:hover,
.dl-footer-facebook:focus-visible {
    transform: translateY(-2px);
    background: rgba(254, 233, 206, .08);
    border-color: rgba(254, 233, 206, .48);
    color: #fee9ce;
}

/* Delikatne wejście elementów, bez migania i z poszanowaniem ustawień systemu. */
.js .dl-home-flow-section.dl-polish-reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .5s ease, transform .5s ease;
}

.js .dl-home-flow-section.dl-polish-reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (max-width: 760px) {
    .dl-home .dl-home-flow-section {
        padding-block: 48px;
    }

    .dl-home-ranking-item {
        grid-template-columns: 44px 54px minmax(0, 1fr) 28px;
        gap: 10px;
        min-height: 88px;
        padding: 10px 12px;
        border-radius: 13px;
    }

    .dl-home-ranking-item:hover {
        padding-inline: 12px;
        transform: none;
    }

    .dl-home-ranking-number {
        min-width: 36px;
        font-size: 23px;
    }

    .dl-home-ranking-poster {
        width: 46px;
        height: 65px;
    }

    .dl-home-ranking-copy a {
        font-size: 15px;
    }

    .dl-title-card-title {
        min-height: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dl-title-card,
    .dl-title-card-poster img,
    .dl-home-ranking-item,
    .dl-footer-facebook,
    .js .dl-home-flow-section.dl-polish-reveal {
        transition: none !important;
        transform: none !important;
    }
}

/* =========================================================
   RC1.2 — NOWE ODCINKI: zwarte, równe i czytelne karty
   Zmiana dotyczy wyłącznie sekcji najnowszych aktualizacji.
========================================================= */
.dl-home-flow-section--episodes .dl-home-title-grid--episodes {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(18px, 2vw, 26px);
    align-items: start;
}

.dl-home-flow-section--episodes .dl-title-card {
    max-width: none;
    min-width: 0;
    height: auto;
}

.dl-home-flow-section--episodes .dl-title-card-poster {
    aspect-ratio: 2 / 3;
    border-radius: 18px;
}

.dl-home-flow-section--episodes .dl-title-card-poster img {
    object-position: center top;
}

/* Zachowujemy spójne oznaczenie typu: DRAMA + EP. */
.dl-home-flow-section--episodes .dl-title-card-type {
    display: inline-flex;
}

.dl-home-flow-section--episodes .dl-title-card-badge {
    top: auto;
    right: 12px;
    bottom: 12px;
    max-width: calc(100% - 24px);
    padding: 8px 12px;
    overflow: hidden;

    color: var(--dl-text);
    background: rgba(7, 24, 30, 0.82);
    border: 1px solid var(--dl-border);

    box-shadow: 0 8px 22px rgba(0, 0, 0, .30);
    font-size: 11px;
    line-height: 1;
    letter-spacing: .045em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dl-home-flow-section--episodes .dl-title-card-content {
    padding: 14px 4px 0;
}

.dl-home-flow-section--episodes .dl-title-card-title {
    min-height: 2.6em;
    font-size: clamp(17px, 1.45vw, 20px);
    line-height: 1.3;
    text-align: center;
}

/* Na stronie głównej w tej sekcji zostaje plakat + tytuł — bez ukrytych pustych przestrzeni. */
.dl-home-flow-section--episodes .dl-title-card-creators,
.dl-home-flow-section--episodes .dl-title-card-meta,
.dl-home-flow-section--episodes .dl-title-card-ratings,
.dl-home-flow-section--episodes .dl-title-card-genres,
.dl-home-flow-section--episodes .dl-title-card-status-row,
.dl-home-flow-section--episodes .dl-title-card-progress,
.dl-home-flow-section--episodes .dl-title-card-link {
    display: none !important;
}

@media (max-width: 1100px) {
    .dl-home-flow-section--episodes .dl-home-title-grid--episodes {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .dl-home-flow-section--episodes .dl-home-title-grid--episodes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .dl-home-flow-section--episodes .dl-title-card-poster {
        border-radius: 15px;
    }

    .dl-home-flow-section--episodes .dl-title-card-badge {
        right: 9px;
        bottom: 9px;
        max-width: calc(100% - 18px);
        padding: 7px 9px;
        font-size: 10px;
    }

    .dl-home-flow-section--episodes .dl-title-card-title {
        min-height: 2.5em;
        font-size: 16px;
    }
}

@media (max-width: 390px) {
    .dl-home-flow-section--episodes .dl-home-title-grid--episodes {
        gap: 12px;
    }

    .dl-home-flow-section--episodes .dl-title-card-title {
        font-size: 15px;
    }
}

/* =========================================================
   RC1.6 — pełna spójność plakatów na stronie głównej
   Ten sam rozmiar w: Polecane, Nowe odcinki, Ostatnio dodane.
========================================================= */
@media (min-width: 1101px) {
    .dl-home-recommendations .dl-home-title-grid--editorial,
    .dl-home-flow-section--episodes .dl-home-title-grid--episodes,
    .dl-home-flow-section--recent .dl-home-title-grid {
        grid-template-columns: repeat(4, minmax(0, 270px));
        justify-content: start;
        gap: 24px;
    }

    .dl-home-recommendations .dl-title-card,
    .dl-home-flow-section--episodes .dl-title-card,
    .dl-home-flow-section--recent .dl-title-card {
        width: 100%;
        max-width: 270px;
    }
}

/* EP wraca na górę plakatu, obok oznaczenia DRAMA. */
.dl-home-flow-section--episodes .dl-title-card-badge {
    top: 12px;
    right: 12px;
    bottom: auto;
    max-width: calc(100% - 24px);
}

@media (max-width: 1100px) and (min-width: 761px) {
    .dl-home-recommendations .dl-home-title-grid--editorial,
    .dl-home-flow-section--episodes .dl-home-title-grid--episodes,
    .dl-home-flow-section--recent .dl-home-title-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }
}

@media (max-width: 760px) {
    .dl-home-recommendations .dl-home-title-grid--editorial,
    .dl-home-flow-section--episodes .dl-home-title-grid--episodes,
    .dl-home-flow-section--recent .dl-home-title-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .dl-home-flow-section--episodes .dl-title-card-badge {
        top: 9px;
        right: 9px;
        bottom: auto;
    }
}

@media (max-width: 390px) {
    .dl-home-recommendations .dl-home-title-grid--editorial,
    .dl-home-flow-section--episodes .dl-home-title-grid--episodes,
    .dl-home-flow-section--recent .dl-home-title-grid {
        gap: 12px;
    }
}
