body {
    background: rgb(218, 218, 218);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    color: #1c1e21;
    display: block;
    height: 100%;
}


.wrapper {
    position: relative;
    z-index: 4;
    width: 88%;
    margin: 100px auto 0 auto;
    border-top-left-radius: 9999px;
    border-top-right-radius: 9999px;
    background-color: #FFFFE0;
    padding-top: 10.5277777778vw;
    padding-left: 7.6388888889vw;
    padding-right: 7.6388888889vw;
    box-sizing: border-box;
}



.blog-header {
    text-align: center;
    margin-bottom: 36px;

}

.blog-header h1 {
    font-size: 3em;
    font-weight: 800;
    color: rgb(250, 188, 5);
    letter-spacing: 1.2px;
    margin: 0;

}

.blog-wrapper {
    width: 85%;
    /* height: 600px; */
    margin: 40px auto;

}

.blog-wrapper::-webkit-scrollbar {
    display: none;
}

#confirmModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#confirmModal .modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 320px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

#confirmModal button {
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    margin: 0 8px;
    border-radius: 4px;
    border: none;
}

#confirmYes {
    background-color: #d9534f;
    color: white;
}

#confirmNo {
    background-color: #6c757d;
    color: white;
}

.delete_class {
    background: none;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}


/* -------------like value */
.post-actions {
    display: flex;
    align-items: center;
    font-family: Arial, sans-serif;
    gap: 10px;
}

.like-button {
    cursor: pointer;
    font-size: 28px;
    color: #b82424 !important;
    border: none;
    background: none;
    padding: 5px;
    border-radius: 50%;
    transition: color 0.3s ease, background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}

.like-button:hover {
    background-color: #f0f0f0;
}

.like-button.liked {
    color: #e0245e !important;
    background-color: #ffe6eb !important;
}

.like-count {
    font-size: 18px;
    color: #333;
    user-select: none;
    margin-left: -3% !important;
}

.total-likes {
    margin-top: 20px;
    font-size: 20px;
    color: #555;
}

/* -------- */


.blog-post {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: absolute;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.blog-post.expanded {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);

    overflow-y: auto;
}



.post-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}


.custom-comment-count {
    font-size: 18px;
    margin-left: -3%;
    color: #333 !important;
}


.single-comment {
    border-bottom: 1px solid #eee;
    padding: 10px 0 10px 0;
    margin-bottom: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 3px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 8px;
    object-fit: cover;
}

.comment-date {
    color: #aaa;
    font-size: 0.9em;
}

.comment-content {
    color: #555;
    margin-left: 40px;
}


.comments-section::-webkit-scrollbar {
    width: 6px;
}

.comments-section::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.comments-section::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.comments-section::-webkit-scrollbar-thumb:hover {
    background: #555;
}


.comments-section {
    position: relative;
    height: 250px;
    overflow-y: auto;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    padding-bottom: 55px;
}

.custom-comment-form {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    gap: 10px;
    padding: 10px;
    background: #fff;
    border-top: 1px solid #eee;
    z-index: 2;
    width: 95%;
    margin-left: 3%;
}




.custom-comment-input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    border: 2px solid rgb(250, 188, 5)
}

.custom-comment-submit {
    padding: 8px 15px;
    background-color: rgb(250, 188, 5);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.custom-comment-submit:hover {
    background: rgb(209, 195, 90);
}


.single-comment {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 5px 0 5px 10px;
    color: #555;
    border-left: 2px solid #eee;
    font-size: 15px;
}

.single-comment.no-comment {
    color: #aaa;
    border: none;
    padding-left: 0;
}

.comment-profile-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
}

.comment-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.comment-text {
    font-size: 15px;
    margin-top: 5px;
}

.comment-time {
    font-size: 12px;
    color: #aaa;

    text-align: right;
    align-self: flex-end;
}





/* ----------------- */




.wrapper #login_button {
    background-color: transparent;
    color: rgb(226, 187, 71);
    border: 2px solid rgb(226, 187, 71);
    padding: 12px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-left: 75%;
    box-shadow: 0 2px 6px rgb(226, 187, 71);
    transition: background 0.2s, transform 0.2s;


}

.wrapper #login_button:hover {
    background-color: rgb(226, 187, 71);
    transform: translateY(-2px) scale(1.03);
    color: white;
}

.wrapper #login_button1 {
    background-color: transparent;
    color: rgb(226, 187, 71);
    border: 2px solid rgb(226, 187, 71);
    padding: 12px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-left: 63%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: background 0.2s, transform 0.2s;
}

.wrapper #login_button1:hover {
    background-color: rgb(226, 187, 71);
    transform: translateY(-2px) scale(1.03);
    color: white;
}









label[for="toggle-post-form"] {
    cursor: pointer;
    color: rgb(226, 187, 71);
    font-weight: 700;
    display: inline-block;
    margin-bottom: -24px;
    user-select: none;
    font-size: 1em;
    margin-left: 10%;
    padding: 12px 24px;
    border: 2px solid rgb(226, 187, 71);
    border-radius: 12px;
    transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
    user-select: none;
}

label[for="toggle-post-form"]:hover {
    background-color: rgb(226, 187, 71);
    color: white;
    box-shadow: 0 6px 20px rgb(212, 182, 90);
}



.label-close {
    display: none;
    color: #d93025;
}

.menu-toggle:checked+label .label-open {
    display: none;
}

.menu-toggle:checked+label .label-close {
    display: inline;
}



.blog-form {
    border: 1px solid #d3d6db;
    background: #fafafa;
    border-radius: 16px;
    padding: 28px 24px 24px 24px;
    margin-bottom: 36px;
    box-shadow: 0 4px 16px rgba(24, 119, 242, 0.15);
    display: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#toggle-post-form:checked~.blog-form {
    display: block;
    opacity: 1;
    transform: translateY(0);
}



.blog-form label {
    font-weight: 700;
    color: #3b3b3b;
    margin-bottom: 12px;
    display: block;
    font-size: 1.1em;
}


.blog-form input[type="file"] {
    margin-bottom: 22px;
    width: 100%;
    cursor: pointer;
    border-radius: 10px;
    padding: 10px 12px;
    border: 1.5px solid #cfd2d8;
    background-color: #fff;
    transition: border-color 0.3s ease;
}

.blog-form input[type="file"]:hover,
.blog-form input[type="file"]:focus {
    border-color: rgb(226, 187, 71);
    outline: none;
}


.blog-form textarea {
    width: 100%;
    border-radius: 16px;
    border: 2px solid #cfd2d8;
    padding: 18px 20px;
    font-size: 1.15em;
    margin-bottom: 24px;
    resize: vertical;
    min-height: 120px;
    background-color: #fff;
    box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.08);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.blog-form textarea:focus {
    border-color: rgb(226, 187, 71);
    box-shadow: 0 0 12px rgb(226, 187, 71);
    outline: none;
}


.blog-form button {
    background: linear-gradient(90deg, rgb(250, 188, 5), rgb(201, 158, 30));
    color: #fff;
    border: none;
    border-radius: 16px;
    padding: 14px 36px;
    font-size: 1.25em;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 20px rgb(226, 187, 71);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    user-select: none;
    display: block;
    margin-left: auto;
}

.blog-form button:hover,
.blog-form button:focus {
    background: linear-gradient(90deg, rgb(214, 176, 61), rgb(201, 158, 30));
    box-shadow: 0 10px 28px rgb(226, 187, 71);
    outline: none;
}

/* post section */

.blog-post {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform;
}

.blog-post.fade-in {
    opacity: 1;
    transform: translateY(0);
}


@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fade-in {
    opacity: 0;
    animation-name: fadeIn;
    animation-duration: 1s;
    animation-fill-mode: forwards;
    animation-timing-function: ease-in;
}



.blog {
    margin-top: 10px !important;
    width: 70vw !important;
    display: flex !important;
    flex-wrap: wrap;
    margin-left: -18% !important;
    gap: 20px !important;
}

.blog > .blog-post { 
    flex: 1 1 calc(40% - 40px);   
    box-sizing: border-box;     
    max-width: calc(50% - 20px);
    border: 1px solid #e4e6eb;
    background: #fff;
    border-radius: 20px;
    padding: 24px 28px 28px 28px;
    margin-bottom: 30px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
    position: relative;    
}

.blog-post:hover {
    box-shadow: 0 10px 30px rgba(24, 119, 242, 0.25);
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
    position: relative;
}

.profile-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 18px;
    border: 2.5px solid rgb(250, 188, 5);
    box-shadow: 0 3px 8px rgba(24, 119, 242, 0.35);
}

.user-name {
    font-weight: 800;
    color: #1c1e21;
    font-size: 1.1em;
}

.post-time {
    font-size: 13px;
    color: #8a8d91;
    margin-top: 4px;
    font-weight: 600;
}


.menu-label {
    cursor: pointer;
    font-size: 26px;
    user-select: none;
    padding: 8px 12px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    color: #8a8d91;
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.menu-label:hover {
    background-color: #f0f2f5;
    color: #1877f2;
}


.post-image {
    margin-bottom: 20px;
    border-radius: 20px;
    overflow: hidden;
}

.post-image img {
    height: auto;
    width: 100%;
    border-radius: 20px;
    display: flex;
    background: content-box;

    transition: transform 0.3s ease;
}


/* .post-image img {
    height: 40vh;
    object-fit: contain;
    width: 100%;
    border-radius: 20px;
    display: flex;
    background: content-box;
} */






.post-content {
    margin-top: 40px;
    width: 100%;
    font-size: 1.15em;
    color: #050505;
    white-space: pre-wrap;
    line-height: 1.6;
    font-weight: 500;
}


.post-actions {
    display: flex;
    gap: 32px;
    border-top: 1px solid #e4e6eb;
    padding-top: 14px;
}

.post-actions button {
    background: none;
    border: none;
    color: #65676b;
    font-weight: 700;
    cursor: pointer;
    padding: 12px 0;
    font-size: 1.1em;
    border-radius: 12px;
    transition: background 0.3s ease, color 0.3s ease;

    align-items: center;
    gap: 10px;
    user-select: none;
}

.post-actions button:hover {
    background: #f0f2f5;
    color: #1877f2;
}

@media (min-width: 320px) and (max-width: 374px) {


    .blog-wrapper {
        width: 98%;
        height: auto;
        padding: 16px 12px;

    }

    .blog-header h1 {
        font-size: 2em;

    }

    .wrapper #login_button {
        width: 90px;
        padding: 10px 20px;
        font-size: 14px;
        display: block;
        margin-left: 65%;

    }

    .wrapper #login_button1 {
        width: 90px;
        padding: 10px 20px;
        font-size: 14px;
        display: block;
        margin-left: 65%;
        margin-top: -9%;
    }

    .blog-post {
        padding: 12px 16px;
        margin-bottom: 20px;
        width: 50%;
        margin-left: 4%;
    }

    .profile-img {
        width: 40px;
        height: 40px;
        margin-right: 12px;
        border-width: 2px;
    }

    .user-name {
        font-size: 1em;
    }

    .post-time {
        font-size: 11px;
    }

    .post-content {
        font-size: 1em;
    }

    .post-actions button {
        font-size: 0.8em;
        padding: 8px 6px;
    }

    .wrapper .toggle-post-label {
        width: 130px;
        padding: 10px 20px;
        font-size: 14px;

    }

    .like-count {
        font-size: 18px;
        color: #333;
        user-select: none;
        margin-left: -13% !important;
    }

    .custom-comment-count {
        font-size: 18px;
        margin-left: -17%;
        color: #333 !important;
    }



    .comments-section {
        height: 150px;
        padding-top: 6px;
    }



    .custom-comment-input {
        font-size: 12px;
        padding: 6px;
        width: 10%;
    }

    .custom-comment-submit {
        font-size: 12px;
        padding: 6px 10px;
    }

    .single-comment {
        display: flex;
        align-items: flex-start;
        gap: 6px;
        padding: 4px 0 4px 6px;
        color: #555;
        border-left: 2px solid #eee;
        font-size: 12px;
    }

    .single-comment.no-comment {
        color: #aaa;
        font-size: 12px;
        border: none;
        padding-left: 0;
    }

    .comment-profile-img {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        object-fit: cover;
        margin-top: 2px;
        margin-right: 4px;
    }

    .comment-body {
        display: flex;
        flex-direction: column;
        flex: 1;
    }

    .comment-text {
        font-size: 11px;
        word-break: break-word;
        margin-top: 2px;
    }

    .comment-time {
        font-size: 9px;
        color: #aaa;
        margin-top: 2px;
        text-align: right;
        align-self: flex-end;
    }

}


@media (min-width: 375px) and (max-width: 425px) {


    .blog-wrapper {
        width: 95%;
        height: auto;
        padding: 20px 16px;
        margin: 25px auto;
    }

    .blog-header h1 {
        font-size: 2.3em;
        margin-top: 50px;
    }



    .wrapper #login_button {

        padding: 12px 24px;
        font-size: 15px;
        display: block;
        margin-left: 68%;
    }

    .wrapper #login_button1 {
        width: 90px;
        padding: 10px 20px;
        font-size: 14px;
        display: block;
        margin-left: 65%;
        margin-top: -9%;
    }


    .profile-img {
        width: 44px;
        height: 44px;
        margin-right: 14px;
        border-width: 2.2px;
    }

    .user-name {
        font-size: 1.05em;
    }

    .post-time {
        font-size: 12px;
    }

    .post-content {
        font-size: 1.05em;
    }

    .post-actions button {
        font-size: 1.05em;
        padding: 10px 8px;
    }

    .wrapper .toggle-post-label {
        width: 130px;
        padding: 10px 20px;
        font-size: 14px;

    }

    .like-count {
        font-size: 18px;
        color: #333;
        user-select: none;
        margin-left: -5% !important;
    }

    .comments-section {
        height: 150px;
        padding-top: 6px;
    }

    .custom-comment-count {
        font-size: 18px;
        margin-left: -5%;
        color: #333 !important;
    }

    .custom-comment-input {
        font-size: 12px;
        padding: 6px;
        width: 10%;
    }

    .custom-comment-submit {
        font-size: 12px;
        padding: 6px 10px;
    }

    .single-comment {
        font-size: 12px;
    }

    .blog-post {
        padding: 16px 20px;
        margin-bottom: 22px;
        width: 60% !important;
        margin-left: 7%;
    }
}

@media (min-width: 426px) and (max-width: 768px) {


    .blog-wrapper {
        width: 90%;
        height: auto;
        padding: 24px 20px;
        margin: 30px auto;
    }


    .blog {
        display: flex;
        width: 80vw !important;
    }




    .blog-header h1 {
        font-size: 2.8em;
        margin-top: 60px;
    }

    .wrapper #login_button {
        padding: 14px 28px;
        font-size: 16px;
        display: block;
        margin-left: 65%;


    }

    .wrapper #login_button1 {
        width: 90px;
        padding: 10px 20px;
        font-size: 14px;
        display: block;
        margin-left: 80%;
        margin-top: -4%;
    }

    .blog-post {
        padding: 16px 20px;
        margin-bottom: 22px;
        width: 60% !important;
        margin-left: 1%;
    }

    .profile-img {
        width: 48px;
        height: 48px;
        margin-right: 16px;
        border-width: 2.5px;
    }

    .user-name {
        font-size: 1.1em;
    }

    .post-time {
        font-size: 13px;
    }

    .post-content {
        font-size: 1.1em;
    }

    .post-actions button {
        font-size: 1.1em;
        padding: 12px 10px;
    }

    .wrapper .toggle-post-label {
        width: 130px;
        padding: 10px 20px;
        font-size: 14px;

    }

    .like-count {
        font-size: 18px;
        color: #333;
        user-select: none;
        margin-left: -1% !important;
    }

    .custom-comment-count {
        font-size: 18px;
        margin-left: -1%;
        color: #333 !important;
    }
}


@media (min-width: 769px) and (max-width: 1024px) {


    .blog-wrapper {
        width: 80%;
        height: auto;
        padding: 28px 24px;
        margin: 40px auto;
    }


    .blog {
        display: flex;
        margin-left: -22% !important;
    }



    #login_button1 {
        width: 90px;
        padding: 10px 20px !important;
        font-size: 14px !important;
        display: block;
        margin-left: 83% !important;
        margin-top: -3.9%;
    }

    .blog-header h1 {
        font-size: 3.2em;
        margin-top: 80px;
    }

    #login_button {
        margin-left: 75%;
        padding: 14px 32px;
        font-size: 17px;
        display: block;
    }

    .toggle-post-label {
        width: 130px;
        padding: 10px 20px !important;
        font-size: 14px !important;


    }

    .like-count {
        font-size: 18px;
        color: #333;
        user-select: none;
        margin-left: -1% !important;
    }

    .custom-comment-count {
        font-size: 18px;
        margin-left: -1%;
        color: #333 !important;
    }
}

@media (min-width: 1025px) and (max-width: 1440px) {


    .blog-wrapper {
        width: 75%;
        height: auto;
        padding: 32px 28px;
        margin: 50px auto;
    }




    .blog-header h1 {
        font-size: 3.6em;
        margin-top: 100px;
    }

    #login_button {
        margin-left: 70%;
        padding: 16px 36px;
        font-size: 18px;
        display: block;
    }

    .blog-post {
        padding: 28px 32px;
        margin-bottom: 30px;
    }

    .profile-img {
        width: 56px;
        height: 56px;
        margin-right: 20px;
        border-width: 3px;
    }

    .user-name {
        font-size: 1.2em;
    }

    .post-time {
        font-size: 14px;
    }

    .post-content {
        font-size: 1.2em;
        width: 100%;
    }

    .post-actions button {
        font-size: 1.2em;
        padding: 14px 12px;
    }

    .like-count {
        font-size: 18px;
        color: #333;
        user-select: none;
        margin-left: -3% !important;
    }

    .custom-comment-count {
        font-size: 18px;
        margin-left: -3%;
        color: #333 !important;
    }

}



@media (min-width: 1441px) and (max-width: 2560px) {


    .blog-wrapper {
        width: 65%;
        height: auto;
        padding: 40px 36px;
        margin: 60px auto;
    }



    .blog-header h1 {
        font-size: 4.2em;
        margin-top: 120px;
    }

    .wrapper #login_button {
        width: 7%;
        padding: 10px 20px;
        font-size: 30px;
        display: block;
        margin-left: 74%;
    }

    .wrapper #login_button1 {
        width: 7%;
        padding: 10px 20px;
        font-size: 30px;
        display: block;
        margin-left: 74%;
        margin-top: -1.8%;

    }

    .blog-post {
        padding: 32px 36px;
        margin-bottom: 35px;
    }

    .profile-img {
        width: 64px;
        height: 64px;
        margin-right: 24px;
        border-width: 3.5px;
    }

    .user-name {
        font-size: 1.3em;
    }

    .post-time {
        font-size: 15px;
    }

    .post-content {
        font-size: 1.3em;
        width: 100%;
    }

    .post-actions button {
        font-size: 1.3em;
        padding: 16px 14px;
    }

    .wrapper .toggle-post-label {
        width: 10%;
        padding: 10px 20px;
        font-size: 30px;
        margin-left: 20%;

    }

    .like-count {
        font-size: 18px;
        color: #333;
        user-select: none;
        margin-left: -1% !important;
    }

    .custom-comment-count {
        font-size: 18px;
        margin-left: -1%;
        color: #333 !important;
    }
}