/* Reset & Global Overrides */
header,
footer {
    display: none !important;
}

#ast-scroll-top {
    display: none !important;
}

body {
    background: #0f172a !important;
    margin: 0 !important;
    padding: 0 !important;
    font-family: sans-serif !important;
    color: white !important;
}

/* Force Reset for Astra's default spacing on ALL screen sizes */
#primary,
#main,
.site-main,
.site-content,
.ast-container,
#content {
    margin-top: 0 !important;
    padding-top: 0 !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.ast-article-single,
.entry-content {
    margin: 0 !important;
    padding: 0 !important;
}

/* Force override Astra/WordPress mobile padding */
@media screen and (max-width: 921px) {
    html body .ast-container,
    html body #content .ast-container,
    html body .site-content .ast-container,
    html body .ast-separate-container .ast-article-single,
    html body .ast-plain-container .ast-article-single,
    html body .entry-content,
    html body .read-lesson-wrapper {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* FORCE RESET UNTUK DIV UTAMA DI BAWAH CONTAINER */
    html body #primary,
    html body #main,
    html body .site-main {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

.read-lesson-wrapper {
    max-width: 400px;
    margin: 0 auto; /* Removed top margin 20px to stick to the top */
    padding: 20px 0; /* Add internal vertical padding instead of margin if needed */
    box-sizing: border-box;
}

.read-lesson-card {
    position: relative;
    background-color: #20263b;
    border-radius: 15px;
    padding: 30px 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    color: white;
}

.back-button {
    position: absolute;
    top: 30px; /* Align with title's top position */
    left: 10px;
    color: #77c9f8;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.read-lesson-title {
    font-size: 28px;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
    color: #77c9f8;
}

.read-lesson-content {
    font-size: 18px;
    line-height: 1.6;
    overflow-wrap: break-word;
    word-break: break-word;
}

.read-lesson-content p {
    margin-bottom: 1.5em;
}

.read-lesson-content strong {
    color: #77c9f8;
}

.read-lesson-done-section {
    margin-top: 30px;
    padding-bottom: 40px;
}

#read-lesson-done {
    width: 100%;
    padding: 15px;
    background-color: #59942c;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

#read-lesson-done:hover {
    background-color: #4a7c24;
}

#read-lesson-done:disabled {
    background-color: #65799c;
    cursor: not-allowed;
}

#read-lesson-status {
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
    color: #77c9f8;
}

/* Mobile specific tweaks for maximum width */
@media (max-width: 600px) {
    .read-lesson-wrapper {
        margin: 0 auto;
        padding: 10px;
    }

    .read-lesson-card {
        padding: 20px 15px;
        border-radius: 10px;
    }

    .read-lesson-title {
        font-size: 24px;
    }

    .back-button {
        top: 15px;
        left: 5px;
    }

    .read-lesson-content {
        font-size: 16px;
    }
}
