/* =====================================================
   GLOBAL
===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    font-family: 'Poppins', sans-serif;

    background: #f7f8fa;

    color: #252525;
}


a {
    text-decoration: none;
}


.container {
    width: 92%;

    max-width: 1250px;

    margin: auto;
}



/* =====================================================
   HEADER
===================================================== */

.main-header {
    background: #ffffff;

    border-bottom: 1px solid #e8e8e8;

    position: sticky;

    top: 0;

    z-index: 1000;
}


.header-content {
    min-height: 75px;

    display: flex;

    align-items: center;

    justify-content: space-between;
}


.logo {
    font-size: 22px;

    font-weight: 700;

    color: #253f5b;
}


.navigation {
    display: flex;

    gap: 30px;
}


.navigation a {
    color: #555;

    font-size: 14px;

    font-weight: 500;

    transition: 0.3s;
}


.navigation a:hover {
    color: #2d6da3;
}



/* =====================================================
   MAIN CONTAINER
===================================================== */

.main-container {
    display: grid;

    grid-template-columns: minmax(0, 1fr) 350px;

    gap: 45px;

    padding-top: 55px;

    padding-bottom: 70px;

    align-items: start;
}



/* =====================================================
   LEFT SIDE
===================================================== */

.main-blog-section {
    min-width: 0;
}


.topic-section {
    margin-bottom: 25px;
}


.section-label {
    display: inline-block;

    color: #3976a8;

    font-size: 11px;

    font-weight: 700;

    letter-spacing: 2px;

    text-transform: uppercase;
}


.topic-title {
    margin-top: 8px;

    font-size: 34px;

    line-height: 1.3;

    color: #1e293b;

    font-weight: 600;
}



/* =====================================================
   CHILD BLOG
===================================================== */

.child-blog {
    background: #ffffff;

    border: 1px solid #e7e9ec;

    border-radius: 10px;

    overflow: hidden;

    display: grid;

    grid-template-columns: 245px minmax(0, 1fr);

    min-height: 600px;
}



/* =====================================================
   CHILD PROFILE
===================================================== */

.child-profile {
    padding: 20px;

    background: #f8fafc;

    border-right: 1px solid #e5e7eb;
}


.child-image-wrapper {
    width: 100%;

    height: 300px;

    overflow: hidden;

    border-radius: 7px;

    background: #e5e7eb;
}


.child-image {
    width: 100%;

    height: 100%;

    display: block;

    object-fit: cover;
}



/* =====================================================
   RELATED TAGS
===================================================== */

.related-tags {
    margin-top: 22px;
}


.related-tags h3 {
    font-size: 13px;

    font-weight: 600;

    color: #344054;

    margin-bottom: 12px;
}


.tags {
    display: flex;

    flex-wrap: wrap;

    gap: 7px;
}


.tag {
    display: inline-flex;

    align-items: center;

    padding: 6px 10px;

    border: 1px solid #d9e0e7;

    background: #ffffff;

    border-radius: 4px;

    color: #59636e;

    font-size: 11px;

    line-height: 1;
}



/* =====================================================
   ARTICLE SECTION
===================================================== */

.article-section {
    min-width: 0;

    padding: 30px;
}


.article-header {
    padding-bottom: 20px;

    border-bottom: 1px solid #eeeeee;
}


.article-category {
    display: inline-block;

    font-size: 11px;

    color: #3976a8;

    font-weight: 600;

    text-transform: uppercase;

    letter-spacing: 1px;

    margin-bottom: 8px;
}


.article-header h2 {
    font-size: 25px;

    line-height: 1.4;

    font-weight: 600;

    color: #1f2937;
}



/* =====================================================
   SCROLLABLE ARTICLE
===================================================== */

.article-content {
    margin-top: 20px;

    height: 360px;

    overflow-y: auto;

    padding-right: 18px;
}


.article-content p {
    color: #606873;

    font-size: 14px;

    line-height: 1.9;

    margin-bottom: 17px;
}



/* Article scrollbar */

.article-content::-webkit-scrollbar {
    width: 6px;
}


.article-content::-webkit-scrollbar-track {
    background: #f1f3f5;

    border-radius: 10px;
}


.article-content::-webkit-scrollbar-thumb {
    background: #c5ccd3;

    border-radius: 10px;
}


.article-content::-webkit-scrollbar-thumb:hover {
    background: #aeb7c0;
}



/* =====================================================
   PUBLISH DATE
===================================================== */

.publish-date {
    margin-top: 20px;

    padding-top: 18px;

    border-top: 1px solid #eeeeee;

    display: flex;

    align-items: center;

    gap: 8px;

    font-size: 12px;

    color: #667085;
}


.publish-label {
    font-weight: 600;

    color: #344054;
}



/* =====================================================
   RIGHT SIDE
===================================================== */

.previous-section {
    background: #ffffff;

    border: 1px solid #e5e7eb;

    border-radius: 10px;

    overflow: hidden;

    position: sticky;

    top: 100px;
}



/* =====================================================
   PREVIOUS HEADER
===================================================== */

.previous-header {
    padding: 24px 22px 20px;

    border-bottom: 1px solid #e8eaed;

    background: #fbfcfd;
}


.previous-header h2 {
    font-size: 25px;

    font-weight: 600;

    color: #1f2937;

    margin-top: 4px;
}



/* =====================================================
   ARCHIVE LIST
===================================================== */

.archive-list {
    max-height: 750px;

    overflow-y: auto;

    padding: 20px;
}


.archive-list::-webkit-scrollbar {
    width: 6px;
}


.archive-list::-webkit-scrollbar-track {
    background: #f3f4f6;
}


.archive-list::-webkit-scrollbar-thumb {
    background: #c6ccd2;

    border-radius: 10px;
}



/* =====================================================
   MONTH
===================================================== */

.month-section {
    margin-bottom: 28px;
}


.month-section:last-child {
    margin-bottom: 0;
}


.month-title {
    position: relative;

    font-size: 15px;

    color: #263b50;

    font-weight: 600;

    padding-bottom: 10px;

    margin-bottom: 12px;

    border-bottom: 1px solid #e9ecef;
}


.month-title::before {
    content: "";

    display: inline-block;

    width: 4px;

    height: 17px;

    background: #3976a8;

    vertical-align: middle;

    margin-right: 8px;

    border-radius: 3px;
}



/* =====================================================
   ARCHIVE CARD
===================================================== */

.archive-items {
    display: flex;

    flex-direction: column;

    gap: 10px;
}


.archive-card {
    display: block;

    padding: 15px;

    background: #f8fafc;

    border: 1px solid #e6e9ed;

    border-radius: 6px;

    transition: all 0.25s ease;
}


.archive-card:hover {
    background: #ffffff;

    border-color: #b9cad8;

    transform: translateX(3px);

    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}


.archive-topic {
    display: inline-block;

    color: #3976a8;

    font-size: 10px;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 1px;

    margin-bottom: 6px;
}


.archive-card h4 {
    color: #263238;

    font-size: 13px;

    line-height: 1.5;

    font-weight: 600;

    margin-bottom: 6px;
}


.archive-card p {
    color: #727b84;

    font-size: 11px;

    line-height: 1.6;

    margin-bottom: 8px;
}


.archive-date {
    color: #9aa2aa;

    font-size: 10px;

    font-weight: 500;
}



/* =====================================================
   FOOTER
===================================================== */

.footer {
    background: #25394b;

    color: #ffffff;

    padding: 25px 0;

    text-align: center;
}


.footer p {
    font-size: 12px;

    color: #d8e0e7;
}



/* =====================================================
   TABLET
===================================================== */

@media (max-width: 1050px) {

    .main-container {
        grid-template-columns: minmax(0, 1fr) 300px;

        gap: 25px;
    }


    .child-blog {
        grid-template-columns: 210px minmax(0, 1fr);
    }


    .child-image-wrapper {
        height: 260px;
    }


    .article-section {
        padding: 25px;
    }

}



/* =====================================================
   MOBILE / SMALL TABLET
===================================================== */

@media (max-width: 800px) {

    .navigation {
        display: none;
    }


    .main-container {
        grid-template-columns: 1fr;

        padding-top: 35px;

        gap: 35px;
    }


    .child-blog {
        grid-template-columns: 1fr;
    }


    .child-profile {
        border-right: none;

        border-bottom: 1px solid #e5e7eb;
    }


    .child-image-wrapper {
        height: 380px;
    }


    .article-content {
        height: 350px;
    }


    .previous-section {
        position: static;
    }


    .archive-list {
        max-height: 600px;
    }

}



/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 500px) {

    .container {
        width: 94%;
    }


    .header-content {
        min-height: 65px;
    }


    .logo {
        font-size: 18px;
    }


    .topic-title {
        font-size: 27px;
    }


    .child-profile {
        padding: 15px;
    }


    .child-image-wrapper {
        height: 300px;
    }


    .article-section {
        padding: 20px;
    }


    .article-header h2 {
        font-size: 21px;
    }


    .article-content {
        height: 330px;

        padding-right: 10px;
    }


    .article-content p {
        font-size: 13px;

        line-height: 1.8;
    }


    .publish-date {
        flex-wrap: wrap;
    }


    .previous-header {
        padding: 20px;
    }


    .archive-list {
        padding: 15px;
    }

}
/* =========================================
   ADD BLOG PAGE
========================================= */

.add-blog-page {
    min-height: 100vh;

    padding: 50px 20px;

    background: #f5f7fa;
}


.add-blog-container {
    width: 100%;

    max-width: 850px;

    margin: auto;

    background: #ffffff;

    border: 1px solid #e3e7eb;

    border-radius: 10px;

    padding: 40px;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.05);
}


.form-header {
    padding-bottom: 25px;

    margin-bottom: 30px;

    border-bottom: 1px solid #eeeeee;
}


.form-header span {
    font-size: 11px;

    font-weight: 700;

    letter-spacing: 2px;

    color: #3976a8;
}


.form-header h1 {
    margin-top: 7px;

    font-size: 28px;

    font-weight: 600;

    color: #1f2937;
}


.form-header p {
    margin-top: 8px;

    color: #737b84;

    font-size: 13px;
}



/* =========================================
   MESSAGE
========================================= */

.form-message {
    padding: 12px 15px;

    margin-bottom: 25px;

    border-radius: 6px;

    font-size: 13px;
}


.form-message.success {
    background: #edf9f0;

    color: #28733c;

    border: 1px solid #c9e8d0;
}


.form-message.error {
    background: #fff1f1;

    color: #b42318;

    border: 1px solid #f3cccc;
}



/* =========================================
   FORM
========================================= */

.blog-form {
    display: flex;

    flex-direction: column;

    gap: 22px;
}


.form-group {
    display: flex;

    flex-direction: column;

    gap: 8px;
}


.form-group label {
    font-size: 13px;

    font-weight: 600;

    color: #344054;
}


.form-group label span {
    color: #d92d20;
}


.form-group input,
.form-group textarea {
    width: 100%;

    padding: 12px 13px;

    border: 1px solid #d6dbe1;

    border-radius: 6px;

    outline: none;

    background: #ffffff;

    color: #344054;

    font-family: 'Poppins', sans-serif;

    font-size: 13px;

    transition: 0.2s;
}


.form-group input:focus,
.form-group textarea:focus {
    border-color: #3976a8;

    box-shadow:
        0 0 0 2px rgba(57, 118, 168, 0.08);
}


.form-group textarea {
    resize: vertical;

    line-height: 1.7;
}


.form-group small {
    color: #8a929b;

    font-size: 11px;
}



/* =========================================
   IMAGE PREVIEW
========================================= */

.image-preview-container {
    display: none;

    width: 180px;

    height: 180px;

    border-radius: 8px;

    overflow: hidden;

    border: 1px solid #e0e4e8;
}


.image-preview-container img {
    width: 100%;

    height: 100%;

    object-fit: cover;
}



/* =========================================
   BUTTONS
========================================= */

.form-buttons {
    display: flex;

    justify-content: flex-end;

    gap: 12px;

    padding-top: 10px;
}


.cancel-button,
.save-button {
    height: 44px;

    padding: 0 24px;

    border-radius: 6px;

    font-family: 'Poppins', sans-serif;

    font-size: 13px;

    font-weight: 600;

    cursor: pointer;

    display: inline-flex;

    align-items: center;

    justify-content: center;
}


.cancel-button {
    background: #ffffff;

    color: #475467;

    border: 1px solid #d6dbe1;
}


.save-button {
    border: none;

    background: #3976a8;

    color: #ffffff;
}


.save-button:hover {
    background: #2e628e;
}



/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

    .add-blog-page {
        padding: 25px 12px;
    }


    .add-blog-container {
        padding: 25px 18px;
    }


    .form-header h1 {
        font-size: 23px;
    }


    .form-buttons {
        flex-direction: column-reverse;
    }


    .cancel-button,
    .save-button {
        width: 100%;
    }

}