/* Math Master Blog — listing & detail page styles.
   Colors/typography/container-box/heading-2/paragraph utilities come from the
   main site's style.css and Hero.css, loaded alongside this file. */

.blog-listing__head {
    padding: 60px 0 40px;
    text-align: center;
}

.blog-listing .container-box {
    padding-bottom: 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    padding-bottom: 60px;
    padding-top: 40px;
}

.blog-card {
    border: 1px solid #E5EEF7;
    border-radius: 16px;
    overflow: hidden;
    background: #FFFFFF;
    box-shadow: 0 4px 20px rgba(31, 152, 244, 0.199);
    transition: transform .25s ease, box-shadow .25s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(31, 152, 244, 0.295);
}

.blog-card__thumb {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #EAF4FE;
}

.blog-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card__body {
    padding: 20px 24px 28px;
}

.blog-card__date {
    font-size: 14px;
    font-weight: 500;
    color: #6C90B0;
}

.blog-card__title {
    margin: 8px 0 12px;
    font-size: 20px;
    font-weight: 700;
    line-height: 130%;
}

.blog-card__title a {
    color: #1A1A1A;
}

.blog-card__title a:hover {
    color: #1F97F4;
}

.blog-card__excerpt {
    font-size: 15px;
    line-height: 150%;
    color: #4A6178;
    margin-bottom: 16px;
}

.blog-card__link {
    font-size: 15px;
    font-weight: 600;
    color: #1F97F4;
}

.blog-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding-bottom: 60px;
}

.blog-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid #E5EEF7;
    color: #1A1A1A;
    font-weight: 600;
    font-size: 14px;
    transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}

.blog-pagination a.page-numbers:hover {
    border-color: #1F97F4;
    color: #1F97F4;
}

.blog-pagination .page-numbers.current {
    background: #1F97F4;
    border-color: #1F97F4;
    color: #FFFFFF;
}

.blog-pagination .page-numbers.dots {
    border-color: transparent;
    color: #8FA7BD;
}

.blog-pagination .page-numbers.prev,
.blog-pagination .page-numbers.next {
    padding: 0 18px;
}

.blog-single {
    padding: 30px 0;
}

.blog-single__head {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 32px;
}

.blog-single__date {
    display: inline-block;
    margin-top: 12px;
    font-size: 15px;
    color: #6C90B0;
}

.blog-single__thumb {
    max-width: 900px;
    margin: 0 auto 40px;
    border-radius: 16px;
    overflow: hidden;
}

.blog-single__thumb img {
    width: 100%;
    height: auto;
    display: block;
}

.blog-single__content {
    max-width: 760px;
    margin: 0 auto;
    font-size: 17px;
    line-height: 170%;
    color: #33475B;
}

.blog-single__content.container-box {
    padding-bottom: 0;
}

.blog-single__content h1,
.blog-single__content h2,
.blog-single__content h3,
.blog-single__content h4,
.blog-single__content h5,
.blog-single__content h6 {
    color: #1A1A1A;
    font-weight: 700;
    line-height: 130%;
    margin-top: 28px;
    margin-bottom: 12px;
}

.blog-single__content h1 {
    font-size: 38px;
}

.blog-single__content h2 {
    font-size: 28px;
}

.blog-single__content h3 {
    font-size: 23px;
}

.blog-single__content h4 {
    font-size: 20px;
}

.blog-single__content h5 {
    font-size: 18px;
}

.blog-single__content h6 {
    font-size: 17px;
}

.blog-single__content p {
    margin-bottom: 20px;
}

.blog-single__content ul,
.blog-single__content ol {
    margin: 0 0 20px;
    padding-left: 24px;
}

.blog-single__content li {
    margin-bottom: 8px;
}

.blog-single__content li>ul,
.blog-single__content li>ol {
    margin-top: 8px;
    margin-bottom: 0;
}

.blog-single__content blockquote {
    margin: 0 0 20px;
    padding: 12px 20px;
    border-left: 3px solid #1F97F4;
    color: #4A6178;
    font-style: italic;
    background: #F4F9FE;
}

.blog-single__content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
    font-size: 16px;
}

.blog-single__content th,
.blog-single__content td {
    padding: 12px 16px;
    border: 1px solid #E5EEF7;
    text-align: left;
}

.blog-single__content th {
    background: #EAF4FE;
    color: #1A1A1A;
    font-weight: 600;
}

.blog-single__content img {
    width: 100%;
    height: auto;
    border-radius: 12px !important;
    margin: 12px 0;

}

.blog-single__content a {
    color: #1F97F4;
    text-decoration: underline;
}

.blog-single__content hr {
    border: none;
    border-top: 1px solid #E5EEF7;
    margin: 32px 0;
}

.blog-single__content .search-form,
.blog-empty-state .search-form,
.header-section .search-form {
    display: flex;
    align-items: center;
    width: 400px;
    margin: 0 auto 32px;
    background: #FFFFFF;
    border: 1px solid #d3e2f1;
    border-radius: 999px;
    box-shadow: 0 4px 16px rgba(31, 151, 244, 0.1);
    padding: 4px 4px 4px 22px;
    transition: border-color .25s ease, box-shadow .25s ease;
}

.header-section .search-form {
    margin-top: 28px;
}

.blog-listing .searched-heading {
    font-size: 30px;
    line-height: 1.2;
    margin-top: 30px;
}

.blog-single__content .search-form:focus-within,
.blog-empty-state .search-form:focus-within,
.header-section .search-form:focus-within {
    border-color: #1F97F4;
    box-shadow: 0 6px 22px rgba(31, 151, 244, 0.2);
}

.blog-single__content .search-form label,
.blog-empty-state .search-form label,
.header-section .search-form label {
    flex: 1;
    display: flex;
    margin: 0;
}

.blog-single__content .search-form .search-field,
.blog-empty-state .search-form .search-field,
.header-section .search-form .search-field {
    flex: 1;
    width: 100%;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 15px;
    line-height: 1;
    color: #1A1A1A;
    padding: 12px 0;
}

.blog-single__content .search-form .search-field::placeholder,
.blog-empty-state .search-form .search-field::placeholder,
.header-section .search-form .search-field::placeholder {
    color: #8FA7BD;
}

.blog-single__content .search-form .search-submit,
.blog-empty-state .search-form .search-submit,
.header-section .search-form .search-submit {
    display: inline-block;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    margin-left: 12px;
    border: none;
    border-radius: 50%;
    background-color: #1F97F4;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px 18px;
    color: transparent;
    font-size: 0;
    cursor: pointer;
    transition: background-color .25s ease, transform .15s ease;
}

.blog-single__content .search-form .search-clear,
.blog-empty-state .search-form .search-clear,
.header-section .search-form .search-clear {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
    background-size: 16px 16px;
}

.blog-single__content .search-form .search-submit:hover,
.blog-empty-state .search-form .search-submit:hover,
.header-section .search-form .search-submit:hover {
    background-color: #1A1A1A;
    transform: scale(1.06);
}

.blog-single__content .search-form .search-submit:active,
.blog-empty-state .search-form .search-submit:active,
.header-section .search-form .search-submit:active {
    transform: scale(0.94);
}

.blog-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
    padding: 72px 20px;
}

.blog-empty-state__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 24px;
    border-radius: 50%;
    background: #EAF4FE;
    color: #1F97F4;
}

.blog-empty-state__title {
    font-size: 22px;
    font-weight: 700;
    color: #1A1A1A;
    margin-bottom: 10px;
}

.blog-empty-state__text {
    font-size: 15px;
    line-height: 150%;
    color: #4A6178;
    margin-bottom: 24px;
}

.blog-coming-soon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.blog-coming-soon__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
    padding: 96px 20px;
}

.blog-coming-soon__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-bottom: 28px;
    border-radius: 50%;
    background: #EAF4FE;
    color: #1F97F4;
}

.blog-coming-soon__title {
    font-size: 32px;
    font-weight: 700;
    color: #1A1A1A;
    margin-bottom: 12px;
}

.blog-coming-soon__text {
    font-size: 15px;
    line-height: 150%;
    color: #4A6178;
    margin-bottom: 28px;
}

.blog-coming-soon__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 999px;
    background-color: #1F97F4;
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(31, 151, 244, 0.25);
    transition: background-color .25s ease, transform .15s ease;
}

.blog-coming-soon__cta:hover {
    background-color: #1A1A1A;
    color: #FFFFFF;
    transform: translateY(-1px);
}

.blog-single__back {
    max-width: 760px;
    margin: 40px auto 0;
}

.blog-single__back a {
    font-weight: 600;
    color: #1F97F4;
}

.blog-related {
    padding: 60px 0 0px;
    border-top: 1px solid #E5EEF7;
}

.blog-related__title {
    text-align: center;
    font-size: 30px;
    font-weight: 700;
    color: #1A1A1A;
    margin-bottom: 8px;
}


.blog-related .container-box {
    padding-bottom: 0;
}

.blog-related .blog-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* 992px — tablets landscape */
@media (max-width: 992px) {

    .blog-grid,
    .blog-related .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 768px — tablets portrait / large phones */
@media (max-width: 768px) {
    .blog-listing__head {
        padding: 40px 0 24px;
    }

    .blog-single__content .search-form,
    .blog-empty-state .search-form,
    .header-section .search-form {
        width: 100%;
    }

    .blog-single__content h1 {
        font-size: 32px;
    }

    .blog-related {
        padding: 40px 0 0;
    }

    .blog-related__title {
        font-size: 24px;
    }

    .blog-listing .searched-heading {
        font-size: 25px;
    }
}

/* 580px — small phones */
@media (max-width: 580px) {

    .blog-grid,
    .blog-related .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-pagination {
        padding-bottom: 0px;
    }

    .blog-single__content h1 {
        font-size: 29px;
        margin-top: 16px;

    }

    .blog-listing .searched-heading {
        font-size: 20px;
    }
}