/**
 * PyziTheme - page.css (pyzitheme/assets/css/page.css)
 * 
 * Styl dla zwykłych stron i podstron na WP
 *
 * @package     PyziTheme
 * @subpackage  Assets/CSS
 * @author      Patryk Kowalski <p.kowalski@kamikstudio.pl>
 * @copyright   2025 KamikStudio & PyziPyzi
 * @license     Proprietary
 * @version     1.0.0
 * @since       1.0.0
 * 
 * Client: PyziPyzi - Domowe wyroby cukiernicze
 * Website: https://pyzipyzi.pl
 * 
 * This file is part of PyziTheme.
 * Unauthorized copying or distribution is prohibited.
 */

/* =============================================
   GŁÓWNY KONTENER + FONT Z EMOJI
   ============================================= */

.page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
}

/* =============================================
   NAGŁÓWEK STRONY
   ============================================= */

.page-header {
    margin-bottom: 50px;
    text-align: center;
}

.page-header-content {
    max-width: 800px;
    margin: 0 auto 40px;
}

.page-title {
    font-size: 48px;
    font-weight: 700;
    color: #5e341c;
    line-height: 1.2;
    margin-bottom: 20px;
}

.page-excerpt {
    font-size: 18px;
    color: #666;
    line-height: 1.6;
}

.page-featured-image {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    max-width: 1000px;
    margin: 0 auto;
}

.page-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* =============================================
   TREŚĆ STRONY
   ============================================= */

.page-content-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.entry-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

/* === NAGŁÓWKI === */
.entry-content h2 {
    font-size: 30px;
    font-weight: 700;
    color: #5e341c;
    margin: 50px 0 25px;
    line-height: 1.3;
    position: relative;
    padding-bottom: 15px;
}

.entry-content h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: #ef6341;
    border-radius: 2px;
}

.entry-content h3 {
    font-size: 27px;
    font-weight: 600;
    color: #5e341c;
    margin: 40px 0 20px;
    line-height: 1.4;
}

.entry-content h4 {
    font-size: 22px;
    font-weight: 600;
    color: #5e341c;
    margin: 35px 0 18px;
}

.entry-content h5 {
    font-size: 20px;
    font-weight: 600;
    color: #5e341c;
    margin: 30px 0 15px;
}

.entry-content h6 {
    font-size: 18px;
    font-weight: 600;
    color: #5e341c;
    margin: 25px 0 12px;
}

/* === PARAGRAFY I LINKI === */
.entry-content p {
    margin-bottom: 20px;
}

.entry-content a {
    color: #ef6341;
    text-decoration: underline;
    transition: opacity 0.3s;
}

.entry-content a:hover {
    opacity: 0.8;
}

/* === LISTY (z obsługą emoji) === */
.entry-content ul,
.entry-content ol,
.entry-content .wp-block-list {
    margin: 25px 0;
    padding-left: 40px;
    list-style-type: disc;
}

.entry-content ol,
.entry-content .wp-block-list.is-style-decimal {
    list-style-type: decimal;
}

.entry-content li,
.entry-content .wp-block-list li {
    margin-bottom: 12px !important;
    margin-top: 0 !important;
    line-height: 1.7;
    list-style-type: disc;
    display: list-item !important;
}

.entry-content ol li {
    list-style-type: decimal;
}

/* FIX dla WSZYSTKICH obrazków w listach (emoji WordPress) */
.entry-content li img,
.entry-content .wp-block-list li img {
    display: inline !important;
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    margin: 0 4px 0 0 !important;
    padding: 0 !important;
    vertical-align: middle !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    float: none !important;
}

/* Fix dla Gutenberg - usuń domyślne marginesy bloków */
.entry-content .wp-block-list li {
    margin-block-start: 0 !important;
    margin-block-end: 12px !important;
}

/* Listy zagnieżdżone */
.entry-content ul ul,
.entry-content ol ol,
.entry-content ul ol,
.entry-content ol ul {
    margin: 10px 0;
    padding-left: 30px;
}

/* Gutenberg nested lists */
.entry-content .wp-block-list .wp-block-list {
    margin: 10px 0;
    padding-left: 30px;
}

/* === CYTATY === */
.entry-content blockquote {
    border-left: 4px solid #ef6341;
    padding: 25px 30px;
    margin: 35px 0;
    background: #f5f0e8;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #5e341c;
    font-size: 17px;
}

.entry-content blockquote p:last-child {
    margin-bottom: 0;
}

.entry-content blockquote cite {
    display: block;
    margin-top: 15px;
    font-size: 14px;
    font-style: normal;
    color: #999;
}

/* === OBRAZKI === */
.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 30px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.entry-content figure {
    margin: 30px 0 !important;
    max-width: 100% !important;
    text-align: center !important;
}

.entry-content figure img {
    margin-bottom: 0 !important;
}

.entry-content figcaption {
    font-style: normal !important;
    text-align: center !important;
    font-size: 13px !important;
    color: #666 !important;
    margin-top: 10px !important;
    margin-bottom: 0 !important;
    padding: 8px 12px !important;
    background: #f5f0e8;
    border-radius: 6px;
    line-height: 1.4 !important;
    display: inline-block !important;
    max-width: 100% !important;
}

/* === RESPONSIVE - MOBILE === */
@media (max-width: 768px) {
    .entry-content figcaption {
        font-size: 12px !important;
        padding: 6px 10px !important;
        line-height: 1.3 !important;
    }
}

@media (max-width: 480px) {
    .entry-content figcaption {
        font-size: 11px !important;
        padding: 5px 8px !important;
        line-height: 1.2 !important;
    }
}

/* Alignmenty */
.entry-content .alignleft {
    float: left;
    margin: 10px 30px 20px 0;
}

.entry-content .alignright {
    float: right;
    margin: 10px 0 20px 30px;
}

.entry-content .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.entry-content .alignwide {
    max-width: 1100px;
    margin-left: calc(50% - 550px);
    width: auto;
}

.entry-content .alignfull {
    max-width: 100vw;
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

/* === KOD === */
.entry-content pre {
    background: #2a2a2a;
    color: #f5f5f5;
    padding: 25px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 30px 0;
    font-size: 14px;
    line-height: 1.6;
}

.entry-content code {
    background: #f5f0e8;
    color: #ef6341;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
}

.entry-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

/* === TABELE === */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 35px 0;
    font-size: 15px;
    overflow-x: auto;
    display: block;
}

.entry-content table th,
.entry-content table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #f5f0e8;
}

.entry-content table th {
    background: #f5f0e8;
    color: #5e341c;
    font-weight: 600;
}

.entry-content table tr:hover {
    background: #fafafa;
}

/* === SEPARATOR === */
.entry-content hr {
    border: none;
    border-top: 2px solid #f5f0e8;
    margin: 50px 0;
}

/* === GUTENBERG BLOCKS === */
.entry-content .wp-block-button {
    margin: 20px 0;
}

.entry-content .wp-block-button__link {
    background: #ef6341;
    color: white;
    padding: 14px 30px;
    border-radius: 30px;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
}

.entry-content .wp-block-button__link:hover {
    background: #d55431;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239,99,65,0.3);
}

.entry-content .wp-block-columns {
    display: flex;
    gap: 30px;
    margin: 30px 0;
}

.entry-content .wp-block-column {
    flex: 1;
}

.entry-content .wp-block-embed {
    margin: 40px 0;
}

.entry-content .wp-block-embed iframe {
    max-width: 100%;
    border-radius: 12px;
}

/* === PAGE LINKS === */
.page-links {
    margin: 50px 0;
    padding: 25px;
    background: #f5f0e8;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
}

.page-links a {
    display: inline-block;
    padding: 10px 18px;
    margin: 0 5px;
    background: white;
    color: #5e341c;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s;
}

.page-links a:hover,
.page-links .current {
    background: #ef6341;
    color: white;
}

.page-links .current {
    padding: 10px 18px;
    border-radius: 8px;
}

/* === ENTRY FOOTER === */
.entry-footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 2px solid #f5f0e8;
    text-align: center;
}

.edit-link a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f5f0e8;
    color: #5e341c;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.edit-link a:hover {
    background: #ef6341;
    color: white;
}

/* === KOMENTARZE === */
.comments-area {
    max-width: 900px;
    margin: 60px auto 0;
    padding: 40px;
    background: #f5f0e8;
    border-radius: 16px;
}

.comments-title {
    font-size: 28px;
    font-weight: 700;
    color: #5e341c;
    margin-bottom: 30px;
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.comment-author {
    font-weight: 600;
    color: #5e341c;
    margin-bottom: 10px;
}

.comment-meta {
    font-size: 13px;
    color: #999;
    margin-bottom: 15px;
}

.comment-content p {
    margin-bottom: 10px;
}

.comment-reply-link {
    color: #ef6341;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

/* =============================================
   SZABLON PEŁNEJ SZEROKOŚCI
   ============================================= */

.page-full-width {
    max-width: 100%;
    padding: 0;
}

.page-hero-full {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.page-hero-full img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(94,52,28,0.7) 0%, rgba(74,40,20,0.85) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-hero-content {
    text-align: center;
    color: white;
    max-width: 900px;
    padding: 0 20px;
}

.page-hero-content .page-title {
    font-size: 56px;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.page-hero-content .page-excerpt {
    font-size: 20px;
    color: rgba(255,255,255,0.95);
    line-height: 1.6;
}

.page-header-minimal {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 20px 40px;
    text-align: center;
}

.page-content-full {
    width: 100%;
}

.page-content-full .entry-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* =============================================
   RESPONSYWNOŚĆ
   ============================================= */

@media (max-width: 1024px) {
    .page-content {
        padding: 50px 20px;
    }

    .entry-content .wp-block-columns {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .page-content {
        padding: 40px 20px;
    }

    .page-title {
        font-size: 36px;
    }

    .page-excerpt {
        font-size: 16px;
    }

    .entry-content {
        font-size: 15px;
    }

    .entry-content h2 {
        font-size: 26px;
        margin: 40px 0 20px;
    }

    .entry-content h3 {
        font-size: 23px;
    }

    .entry-content h4 {
        font-size: 20px;
    }

    .entry-content .alignleft,
    .entry-content .alignright {
        float: none;
        margin: 20px 0;
    }

    .entry-content ul,
    .entry-content ol {
        padding-left: 25px;
    }

    .entry-content blockquote {
        padding: 20px;
        font-size: 16px;
    }

    .entry-content table {
        font-size: 13px;
    }

    .entry-content table th,
    .entry-content table td {
        padding: 10px;
    }

    .page-hero-full {
        height: 350px;
    }

    .page-hero-content .page-title {
        font-size: 36px;
    }

    .page-hero-content .page-excerpt {
        font-size: 16px;
    }

    .page-content-full .entry-content {
        padding: 40px 20px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 28px;
    }

    .entry-content {
        font-size: 14px;
    }

    .entry-content h2 {
        font-size: 22px;
    }

    .entry-content h3 {
        font-size: 20px;
    }

    .page-links a {
        padding: 8px 14px;
        margin: 0 3px;
        font-size: 13px;
    }
}