/* =====================================================
   BLOG SYSTEM - PREMIUM DARK BLOG UI
===================================================== */


/* =====================================================
   GLOBAL BLOG WRAPPER
===================================================== */

.blog-container{
    max-width:1100px;
    margin:40px auto;
    padding:20px;
}


/* =====================================================
   POST CARD
===================================================== */

.post{

    margin-bottom:35px;

    border-radius:24px;

    overflow:hidden;

    background:
    linear-gradient(
        145deg,
        rgba(255,255,255,.05),
        rgba(255,255,255,.015)
    );

    border:1px solid rgba(255,255,255,.08);

    box-shadow:
    0 20px 50px rgba(0,0,0,.25);

    transition:
    transform .25s ease,
    border .25s ease,
    box-shadow .25s ease;
}


.post:hover{

    transform:translateY(-5px);

    border-color:
    rgba(14,165,233,.45);

    box-shadow:
    0 25px 70px rgba(14,165,233,.12);
}


/* =====================================================
   IMAGE
===================================================== */

.post img{

    width:100%;

    height:260px;

    object-fit:cover;

    display:block;

    filter:
    brightness(.9);
}


/* =====================================================
   POST CONTENT
===================================================== */

.post-content{

    padding:32px;
}


.post h2{

    font-size:28px;

    font-weight:800;

    letter-spacing:-.5px;

    color:#fff;

    margin-bottom:18px;

    line-height:1.25;
}


/* =====================================================
   POST TAG
===================================================== */

.post-tag{

    display:inline-flex;

    align-items:center;

    margin-bottom:14px;

    padding:6px 11px;

    border-radius:999px;

    background:
    rgba(14,165,233,.10);

    border:
    1px solid rgba(14,165,233,.25);

    color:#38bdf8;

    font-size:12px;

    font-weight:700;

    letter-spacing:.2px;

    line-height:1;

}


/* =====================================================
   TEXT
===================================================== */

.post p{

    font-size:16px;

    color:#cbd5e1;

    line-height:1.55;

    margin:0 0 10px;

}


/* =====================================================
   ARTICLE TEXT
===================================================== */

.post-text{

    max-height:140px;

    overflow:hidden;

    line-height:1.55;

    color:#cbd5e1;

    transition:
    max-height .5s ease;
}


/* =====================================================
   ARTICLE PARAGRAPHS
===================================================== */

.post-text p{

    margin:0 0 10px;

    padding:0;

    font-size:16px;

    line-height:1.55;

    color:#cbd5e1;

}


.post-text p:last-child{

    margin-bottom:0;

}


/* =====================================================
   ARTICLE HEADINGS
===================================================== */

.post-text h2{

    margin:24px 0 10px;

    line-height:1.2;

}


.post-text h3{

    margin:20px 0 8px;

    line-height:1.3;

}


/* =====================================================
   ARTICLE LISTS
===================================================== */

.post-text ul,
.post-text ol{

    margin:10px 0 14px;

    padding-left:28px;

}


.post-text li{

    margin-bottom:4px;

}


/* =====================================================
   ARTICLE LINKS
===================================================== */

.post-text a{

    color:#38bdf8;

    text-decoration:underline;

    text-underline-offset:3px;
}

.post-text a.post-cta{
    color:#fff !important;
    text-decoration:none;
}

/* =====================================================
   ARTICLE IMAGES
===================================================== */

.post-text img{

    max-width:100%;

    height:auto;

}


/* =====================================================
   ARTICLE BLOCKQUOTE
===================================================== */

.post-text blockquote{

    margin:16px 0;

}


/* =====================================================
   ARTICLE SEPARATOR
===================================================== */

.post-text hr{

    margin:20px 0;

}


/* =====================================================
   ARTICLE BOXES
===================================================== */

.post-text .dietetic-info-box,
.post-text .dietetic-warning-box,
.post-text .dietetic-tip-box{

    margin:16px 0;

}


/* =====================================================
   ARTICLE STRONG
===================================================== */

.post-text strong{

    color:#fff;

}


/* =====================================================
   ADMIN PANEL
===================================================== */

#admin-post-form{

    background:
    linear-gradient(
        160deg,
        rgba(15,23,42,.95),
        rgba(2,6,23,.95)
    ) !important;

    border:
    1px solid rgba(255,255,255,.08);

    box-shadow:
    0 30px 80px rgba(0,0,0,.4);
}


/* =====================================================
   ADMIN TITLE
===================================================== */

#admin-post-form h3{

    font-size:22px;

    color:white;

    margin-bottom:20px;
}


/* =====================================================
   INPUTS
===================================================== */

#admin-post-form input,
#admin-post-form textarea,
#admin-post-form select{

    background:
    rgba(255,255,255,.04);

    border:
    1px solid rgba(255,255,255,.12);

    color:white;

    border-radius:14px;

    padding:14px 16px;

    font-size:15px;

    outline:none;

    transition:.25s ease;
}


#admin-post-form textarea{

    resize:vertical;
}


#admin-post-form input::placeholder,
#admin-post-form textarea::placeholder{

    color:#64748b;
}


#admin-post-form input:focus,
#admin-post-form textarea:focus,
#admin-post-form select:focus{

    border-color:#0ea5e9;

    background:
    rgba(14,165,233,.08);

    box-shadow:
    0 0 0 4px rgba(14,165,233,.15);
}


/* SELECT - TAG */

#admin-post-form select{

    width:100%;

    appearance:none;

    cursor:pointer;
}


#admin-post-form select option{

    background:#0f172a;

    color:white;
}


/* =====================================================
   BUTTON SYSTEM
===================================================== */

button{

    border:none;

    border-radius:14px;

    padding:
    12px 20px;

    font-size:14px;

    font-weight:700;

    cursor:pointer;

    color:white;

    transition:
    transform .2s ease,
    box-shadow .2s ease,
    background .2s ease;
}


/* =====================================================
   MAIN BUTTON
===================================================== */

#add-post-btn{

    background:
    linear-gradient(
        135deg,
        #0ea5e9,
        #2563eb
    );

    box-shadow:
    0 10px 25px rgba(14,165,233,.25);
}


#add-post-btn:hover{

    transform:translateY(-2px);

    box-shadow:
    0 15px 35px rgba(14,165,233,.4);
}


/* =====================================================
   DRAFT
===================================================== */

#save-draft-btn{

    background:
    rgba(255,255,255,.08);

    border:
    1px solid rgba(255,255,255,.15);
}


#save-draft-btn:hover{

    background:
    rgba(255,255,255,.15);
}


/* =====================================================
   READ MORE BUTTON
===================================================== */

.read-more-btn{

    margin-top:22px;

    width:100%;

    padding:14px;

    border-radius:16px;

    background:
    linear-gradient(
        135deg,
        rgba(14,165,233,.15),
        rgba(37,99,235,.15)
    );

    border:
    1px solid rgba(14,165,233,.35);

    color:#38bdf8;
}


.read-more-btn:hover{

    background:
    rgba(14,165,233,.25);

    transform:translateY(-2px);
}


/* =====================================================
   LOCK BOX
===================================================== */

.locked{

    margin-top:25px;

    padding:18px;

    border-radius:18px;

    background:
    rgba(0,0,0,.25);

    border:
    1px solid rgba(255,255,255,.08);

    color:#94a3b8;

    text-align:center;

    font-size:14px;
}


/* =====================================================
   OPEN ARTICLE
===================================================== */

.post.open .post-text{

    max-height:5000px;

}


/* =====================================================
   SOURCES
===================================================== */

#preview-sources,
.sources{

    margin-top:35px;

    padding:22px;

    border-radius:18px;

    background:
    rgba(14,165,233,.06);

    border-left:
    4px solid #0ea5e9;
}


.sources h3,
#preview-sources h3{

    color:white;

    font-size:18px;
}


.sources a{

    color:#38bdf8;
}


/* =====================================================
   ADMIN POST LIST
===================================================== */

#admin-post-list > div{

    background:
    rgba(255,255,255,.04) !important;

    border:
    1px solid rgba(255,255,255,.08) !important;

    padding:18px !important;

    border-radius:18px !important;

    margin-bottom:12px;
}


#admin-post-list button{

    margin-right:8px;
}


/* =====================================================
   ADMIN TAG
===================================================== */

#admin-post-list small{

    color:#94a3b8;

    line-height:1.8;
}


/* =====================================================
   ADMIN ACTION BUTTONS
===================================================== */

.admin-edit-btn{

    background:
    linear-gradient(
        135deg,
        #0ea5e9,
        #2563eb
    );

    color:white;
}


.admin-delete-btn{

    background:
    linear-gradient(
        135deg,
        #ef4444,
        #b91c1c
    );

    color:white;
}


.admin-hide-btn{

    background:
    linear-gradient(
        135deg,
        #f59e0b,
        #d97706
    );

    color:white;
}


.admin-edit-btn:hover,
.admin-delete-btn:hover,
.admin-hide-btn:hover{

    transform:translateY(-2px);

    filter:brightness(1.15);
}


/* =====================================================
   FOOTER
===================================================== */

footer{

    text-align:center;

    padding:50px 20px;

    color:#64748b;
}


/* =====================================================
   CTA BUTTON
===================================================== */

.post-cta{

    position:relative;

    display:flex;

    align-items:center;

    justify-content:center;

    gap:14px;

    width:fit-content;

    margin:40px auto;

    padding:18px 34px;

    min-height:64px;

    border-radius:20px;

    background:
        linear-gradient(
            135deg,
            #1da1f2,
            #2563eb
        );

    color:#fff;

    text-decoration:none;

    font-size:17px;

    font-weight:700;

    line-height:1;

    white-space:nowrap;

    overflow:hidden;

    box-shadow:
        0 20px 45px rgba(37,99,235,.35);

    transition:
        .35s cubic-bezier(.22,.61,.36,1);
}


.post-cta::before{

    content:"";

    position:absolute;

    inset:0;

    background:
        linear-gradient(
            120deg,
            transparent 20%,
            rgba(255,255,255,.22) 50%,
            transparent 80%
        );

    transform:translateX(-140%);

    transition:.7s;
}


.post-cta:hover{

    transform:
        translateY(-4px)
        scale(1.03);

    box-shadow:
        0 28px 60px rgba(37,99,235,.45);
}


.post-cta:hover::before{

    transform:translateX(140%);
}


.post-cta::after{

    content:"→";

    font-size:22px;

    transition:.3s;
}


.post-cta:hover::after{

    transform:translateX(5px);
}


/* =====================================================
   POST HEADER
===================================================== */

.post-header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin-bottom:20px;

    gap:20px;
}


.post-meta{

    color:#94a3b8;

    font-size:14px;

    font-weight:500;

    display:flex;

    align-items:center;

    gap:8px;

    white-space:nowrap;
}


/* =====================================================
   MOBILE
===================================================== */

@media(max-width:700px){

    .blog-container{

        width:100%;

        max-width:100%;

        padding:10px;

        margin:25px auto;

        box-sizing:border-box;
    }


    .post{

        width:100%;

        max-width:100%;

        box-sizing:border-box;

        margin-bottom:25px;

        border-radius:18px;

        overflow:hidden;
    }


    .post img{

        width:100%;

        height:180px;

        object-fit:cover;
    }


    .post-content{

        width:100%;

        box-sizing:border-box;

        padding:20px 16px;

        overflow:hidden;
    }


    .post h2{

        font-size:22px;

        line-height:1.3;

        overflow-wrap:anywhere;

        word-break:break-word;
    }


    .post-header{

        flex-direction:column;

        align-items:flex-start;

        gap:10px;

        width:100%;
    }


    .post-meta{

        max-width:100%;

        white-space:normal;

        overflow-wrap:anywhere;

        word-break:break-word;

        line-height:1.5;
    }


    /* =================================================
       MOBILE ARTICLE
    ================================================= */

    .post-text{

        width:100%;

        max-width:100%;

        box-sizing:border-box;

        max-height:140px;

        overflow:hidden;

        overflow-wrap:anywhere;

        word-break:break-word;

        line-height:1.55;
    }


    .post-text p{

        margin:0 0 10px;

        padding:0;

        line-height:1.55;
    }


    .post-text h2{

        margin:20px 0 8px;

        line-height:1.2;
    }


    .post-text h3{

        margin:18px 0 6px;

        line-height:1.3;
    }


    .post-text ul,
    .post-text ol{

        margin:8px 0 12px;

        padding-left:24px;
    }


    .post-text li{

        margin-bottom:3px;
    }


    .post.open .post-text{

        max-height:none;

        overflow:visible;
    }


    /* =================================================
       NORMAL POST PARAGRAPHS
    ================================================= */

    .post p{

        font-size:16px;

        line-height:1.55;

        margin:0 0 10px;

        overflow-wrap:anywhere;

        word-break:break-word;
    }


    /* =================================================
       CTA — PRZYCISK Z LINKIEM
    ================================================= */

    .post-cta{

        width:100%;

        max-width:100%;

        box-sizing:border-box;

        margin:30px auto;

        padding:16px 20px;

        min-height:60px;

        white-space:normal;

        text-align:center;

        overflow-wrap:anywhere;

        word-break:break-word;

        line-height:1.35;
    }


    .post-cta::after{

        flex-shrink:0;

    }


    /* =================================================
       SOURCES
    ================================================= */

    #preview-sources,
    .sources{

        max-width:100%;

        box-sizing:border-box;

        padding:18px;

        overflow:hidden;

        overflow-wrap:anywhere;

        word-break:break-word;
    }


    .sources a{

        overflow-wrap:anywhere;

        word-break:break-word;
    }


    /* =================================================
       READ MORE
    ================================================= */

    .read-more-btn{

        width:100%;

        box-sizing:border-box;

        padding:14px 12px;
    }


    /* =================================================
       BUTTONS
    ================================================= */

    button{

        width:100%;

        box-sizing:border-box;

        margin-bottom:10px;
    }

}