﻿ /* =========================================
   BlueGrammar Brand Colors
   ========================================= */

:root {
    --bg-h1: #ce434b;
    --bg-h2: #065fd0;
    --bg-h3: #ce434b;
    --bg-header: #ddf1fe;
    --bg-button: #f7d8da;
}


/* =========================================
   BlueGrammar - Public Posts
   ========================================= */

.post-page {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 45px 20px 70px;
    box-sizing: border-box;
}


/* =========================================
   Post Header
   ========================================= */

.post-header {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-bottom: 30px;
    box-sizing: border-box;
}

    .post-header h1 {
        margin: 0 0 15px;
        font-size: 40px;
        line-height: 1.25;
        font-weight: 700;
        color: var(--bg-h1);
    }

.post-date {
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 700;
    color: var(--bg-h2);
}

.post-excerpt {
    margin: 15px 0 0;
    font-size: 18px;
    line-height: 1.7;
    color: #090909;
}


/* =========================================
   Featured Image
   ========================================= */

.post-featured-image {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 25px 0 35px;
    box-sizing: border-box;
    overflow: hidden;
}

    .post-featured-image img {
        display: block;
        width: 100%;
        max-width: 100%;
        height: auto;
        border-radius: 8px;
    }


/* =========================================
   Post Content
   ========================================= */

.post-content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    font-size: 17px;
    line-height: 1.85;
    color: #090909;
    box-sizing: border-box;
    overflow-wrap: break-word;
}


    /* ---------- Paragraphs ---------- */

    .post-content p {
        margin: 0 0 20px;
    }


    /* ---------- Headings ---------- */

    .post-content h2 {
        margin: 38px 0 15px;
        font-size: 24px;
        font-weight: 700;
        line-height: 1.3;
        color: var(--bg-h2);
    }

    .post-content h3 {
        margin: 30px 0 12px;
        font-size: 22px;
        font-weight: 700;
        line-height: 1.35;
        color: var(--bg-h3);
    }

    .post-content h4 {
        margin: 25px 0 10px;
        font-size: 20px;
        font-weight: 700;
        line-height: 1.4;
        color: var(--bg-h2);
    }


    /* ---------- Links ---------- */

    .post-content a {
        color: var(--bg-h2);
    }

        .post-content a:hover {
            color: #044da8;
        }


    /* =========================================
   Lists
   ========================================= */

    .post-content ul {
        margin: 0 0 22px;
        padding-left: 30px;
        list-style-type: disc;
    }

    .post-content ol {
        margin: 0 0 22px;
        padding-left: 30px;
        list-style-type: decimal;
    }

    .post-content li {
        margin-bottom: 8px;
        padding-left: 4px;
    }

    .post-content ul li {
        list-style-type: disc;
    }

    .post-content ol li {
        list-style-type: decimal;
    }


    /* ---------- Nested Lists ---------- */

    .post-content ul ul {
        margin-top: 8px;
        margin-bottom: 8px;
        list-style-type: circle;
    }

        .post-content ul ul li {
            list-style-type: circle;
        }

        .post-content ul ul ul {
            list-style-type: square;
        }

            .post-content ul ul ul li {
                list-style-type: square;
            }


    /* =========================================
   Content Images
   ========================================= */

    /*
   Important:
   Prevent images inserted inside the article
   from becoming wider than the post column.
*/

    .post-content img {
        display: block;
        max-width: 100%;
        width: auto;
        height: auto;
        box-sizing: border-box;
    }


    /* =========================================
   Tables
   ========================================= */

    .post-content table {
        width: 100%;
        max-width: 100%;
        margin: 25px 0;
        border-collapse: collapse;
        box-sizing: border-box;
    }

    .post-content th,
    .post-content td {
        padding: 10px 12px;
        border: 1px solid #dbe4ea;
        text-align: left;
    }

    .post-content th {
        background: var(--bg-header);
        color: var(--bg-h2);
        font-weight: 700;
    }


    /* =========================================
   Blockquotes
   ========================================= */

    .post-content blockquote {
        margin: 25px 0;
        padding: 15px 20px;
        border-left: 4px solid var(--bg-h2);
        background: #ddf1fe;
        color: #455a64;
    }


    /* =========================================
   Inline Code
   ========================================= */

    .post-content code {
        padding: 2px 5px;
        border-radius: 4px;
        background: #f1f5f9;
        font-size: 0.9em;
    }


    /* =========================================
   Code Blocks
   ========================================= */

    .post-content pre {
        max-width: 100%;
        overflow-x: auto;
        margin: 25px 0;
        padding: 18px;
        border-radius: 7px;
        background: #f1f5f9;
        box-sizing: border-box;
    }

        .post-content pre code {
            padding: 0;
            background: transparent;
        }


    /* =========================================
   Long Words / URLs Protection
   ========================================= */

    .post-content a,
    .post-content code,
    .post-content pre {
        overflow-wrap: anywhere;
    }



/* =========================================
   Two Column Content Section
   ========================================= */
.post-two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 400px);
    gap: 15px;
    align-items: center;
    margin: 25px 0 40px;
}

.post-two-column-text {
    min-width: 0;
}

.post-two-column-image {
    width: 100%;
    min-width: 0;
}

    .post-two-column-image img {
        display: block;
        width: 100%;
        max-width: 100%;
        height: auto;
        border-radius: 8px;
    }

.post-content-button {
    display: inline-block;
    margin-top: 5px;
    padding: 10px 18px;
    border: 1px solid #edbcc0;
    border-radius: 6px;
    background: var(--bg-button);
    color: var(--bg-h1);
    font-weight: 600;
    text-decoration: none;
}

    .post-content-button:hover {
        background: #f2c9cc;
        color: var(--bg-h1);
    }


/* =========================================
   Mobile
   ========================================= */

@media (max-width: 767px) {

    .post-two-column {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .post-two-column-image {
        max-width: 100%;
    }
}

/* =========================================
   Mobile
   ========================================= */
@media (max-width: 767px) {

    .post-page {
        padding: 30px 17px 50px;
    }

    .post-header h1 {
        font-size: 31px;
    }

    .post-excerpt {
        font-size: 17px;
    }

    .post-content {
        font-size: 16px;
        line-height: 1.75;
    }

        .post-content h2 {
            font-size: 22px;
        }

        .post-content h3 {
            font-size: 20px;
        }

        .post-content h4 {
            font-size: 18px;
        }

        .post-content table {
            display: block;
            max-width: 100%;
            overflow-x: auto;
            white-space: nowrap;
        }

        .post-content img {
            max-width: 100%;
            height: auto;
        }
}

.post-quiz {
    margin-top: 40px;
    padding: 25px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #f8f9fa;
}

.post-quiz-header {
    margin-bottom: 25px;
}

    .post-quiz-header h2 {
        margin-bottom: 8px;
    }

    .post-quiz-header p {
        margin: 0;
        color: #666;
    }

.quiz-question {
    margin-bottom: 25px;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}

    .quiz-question h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .quiz-options label {
        display: block;
        padding: 10px 12px;
        border: 1px solid #ddd;
        border-radius: 6px;
        cursor: pointer;
    }

        .quiz-options label:hover {
            background: #f1f1f1;
        }

    .quiz-options input {
        margin-right: 8px;
    }

.quiz-submit {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
}

.quiz-result {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
}

/* =========================================
   BlueGrammar Grammar Article
   ========================================= */

.grammar-article {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-wrap: break-word;
}

    .grammar-article section {
        margin: 35px 0;
    }

        .grammar-article section:first-of-type {
            margin-top: 0;
        }


/* =========================================
   Grammar Article - Mobile
   ========================================= */

@media (max-width: 767px) {

    .grammar-article section {
        margin: 30px 0;
    }
}