/* ==========================
   PDF-LIKE STORY VIEW
   ========================== */

.pdf-view {
    background: var(--bg-one);
}

.pdf-header {
    text-align: center;
    margin-bottom: 30px;
}

.pdf-pages {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
}
.pdf-author {
    display: flex;
    flex-direction: column;
    margin-bottom: 40px;
    align-items: center;
}

.pdf-page {
    background: var(--panel);
    width: 794px;           /* szerokość A4 w px przy 96 DPI */
    min-height: 1123px;
    padding: 60px 70px;
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    position: relative;
    color: var(--accent);
    font-size: 18px;
    line-height: 1.6;
    page-break-after: always; /* nowa strona przy druku */
}

/* Treść strony */
.pdf-text {
    white-space: pre-wrap;
    margin-top: 20px;
    text-indent: 2em;
    text-align: left; 
}
.pdf-author-text {
    position: absolute;
    bottom: 300px;
    right: 100px;
    font-size: 30px;
}

/* Meta informacje */
.pdf-meta {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

/* Obrazy w widoku PDF */
.pdf-page .story-image {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
    object-fit: contain;
}

/* cover w widoku PDF */
.pdf-covers {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
}

.pdf-cover {
    background: var(--panel);
    width: 794px;           /* szerokość A4 w px przy 96 DPI */
    min-height: 1123px;
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    position: relative;
    color: var(--accent);
    font-size: 18px;
    line-height: 1.6;
    page-break-after: always; /* nowa strona przy druku */
    margin-bottom: 40px;
}
.pdf-cover .pdf-cover-image {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
    object-fit: fill;
}
/* ==========================
   RESPONSYWNOŚĆ
   ========================== */

/* Ekrany o standardowej szerokości (laptopy, monitory) */
@media screen and (max-width: 1024px) {
    .pdf-page {
        width: 90%;
        padding: 50px 40px;
    }

    .pdf-page .story-image {
        max-height: 420px;
    }
}

/* Tablety w pionie */
@media screen and (max-width: 768px) {
    .pdf-page {
        width: 95%;
        padding: 40px 30px;
    }

    .pdf-page .story-image {
        max-height: 360px;
    }
}

/* Telefony i małe ekrany */
@media screen and (max-width: 480px) {
    .pdf-page {
        width: 100%;
        padding: 30px 20px;
    }

    .pdf-page .story-image {
        max-height: 280px;
    }
}

/* ==========================
   TRYB DO DRUKU (PDF)
   ========================== */
@media print {
    body {
        background: white;
    }

    .pdf-page {
        box-shadow: none;
        border: none;
        margin: 0;
        width: 210mm;
        min-height: 297mm;
        padding: 25mm 20mm;
        page-break-after: always;
    }

    .pdf-page .story-image {
        display: block;
        margin: 0 auto 16px auto;
        max-width: 100%;
        max-height: 120mm; /* zapewnia miejsce na tekst */
        object-fit: contain;
        page-break-inside: avoid;
    }

    .pdf-text {
        font-size: 14pt;
        line-height: 1.5;
    }

    .nav-top, footer, .btn {
        display: none !important;
    }
}
