/* =========================================================
   Blog Article – Prepa Medschool
   Follows the site's CSS variable system (style2.css)
   ========================================================= */

/* ---------- Reading progress bar ---------- */
#blog-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--theme-color), var(--theme-color2));
    z-index: 9999;
    transition: width .1s linear;
}

/* ---------- Hero banner ---------- */
.blog-hero {
    position: relative;
    width: 100%;
    min-height: 420px;
    max-height: 560px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    background: var(--title-color);
}

.blog-hero__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    opacity: .55;
    transition: transform 6s ease;
}

.blog-hero:hover .blog-hero__img {
    transform: scale(1.03);
}

.blog-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(28, 35, 89, .92) 0%,
        rgba(28, 35, 89, .45) 55%,
        transparent 100%
    );
}

.blog-hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 0 0 48px;
}

/* ---------- Breadcrumb ---------- */
.blog-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
    font-size: 14px;
    color: rgba(255,255,255,.75);
}

.blog-breadcrumb a {
    color: rgba(255,255,255,.75);
    text-decoration: none;
    transition: color .2s;
}

.blog-breadcrumb a:hover {
    color: var(--theme-color2);
}

.blog-breadcrumb .sep {
    opacity: .5;
}

.blog-breadcrumb .current {
    color: #fff;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 260px;
}

/* ---------- Category badge ---------- */
.blog-category-badge {
    display: inline-block;
    background: var(--theme-color);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 100px;
    margin-bottom: 16px;
}

/* ---------- Hero title ---------- */
.blog-hero__title {
    font-family: var(--title-font);
    font-size: clamp(1.6rem, 4vw, 2.6rem);
    font-weight: 700;
    line-height: 1.25;
    color: #fff;
    margin-bottom: 20px;
}

/* ---------- Hero meta ---------- */
.blog-hero__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    color: rgba(255,255,255,.8);
    font-size: 14px;
}

.blog-hero__meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-hero__meta i {
    color: var(--theme-color2);
    font-size: 13px;
}

/* ---------- Article body wrapper ---------- */
.blog-article-section {
    padding: 72px 0 96px;
}

.blog-article-inner {
    max-width: 820px;
    margin: 0 auto;
}

/* ---------- Prose – TinyMCE output ---------- */
.blog-prose {
    font-family: var(--body-font);
    font-size: 17px;
    line-height: 1.85;
    color: var(--body-color);
}

.blog-prose > *:first-child {
    margin-top: 0;
}

.blog-prose p {
    margin-bottom: 1.4em;
}

.blog-prose h1,
.blog-prose h2,
.blog-prose h3,
.blog-prose h4,
.blog-prose h5,
.blog-prose h6 {
    font-family: var(--title-font);
    font-weight: 700;
    color: var(--title-color);
    line-height: 1.3;
    margin-top: 2em;
    margin-bottom: .6em;
}

.blog-prose h2 { font-size: 1.75rem; }
.blog-prose h3 { font-size: 1.4rem; }
.blog-prose h4 { font-size: 1.15rem; }

.blog-prose h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1em;
    background: var(--theme-color);
    border-radius: 2px;
    margin-right: 12px;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

.blog-prose ul,
.blog-prose ol {
    padding-left: 1.5em;
    margin-bottom: 1.4em;
}

.blog-prose li {
    margin-bottom: .5em;
}

.blog-prose ul li::marker {
    color: var(--theme-color);
}

.blog-prose ol li::marker {
    color: var(--theme-color);
    font-weight: 600;
}

.blog-prose a {
    color: var(--theme-color);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color .2s;
}

.blog-prose a:hover {
    color: var(--theme-color2);
}

.blog-prose strong {
    font-weight: 700;
    color: var(--title-color);
}

.blog-prose em {
    color: var(--body-color);
}

/* Blockquote */
.blog-prose blockquote {
    position: relative;
    margin: 2em 0;
    padding: 28px 32px 28px 64px;
    background: var(--smoke-color2);
    border-left: 4px solid var(--theme-color2);
    border-radius: 0 12px 12px 0;
    font-size: 1.05rem;
    font-style: italic;
    color: var(--title-color);
}

.blog-prose blockquote::before {
    content: '\201C';
    position: absolute;
    top: 12px;
    left: 20px;
    font-size: 4rem;
    line-height: 1;
    color: var(--theme-color2);
    font-family: Georgia, serif;
    opacity: .4;
}

.blog-prose blockquote p {
    margin-bottom: 0;
}

/* Images inside prose */
.blog-prose img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2em auto;
    box-shadow: 0 8px 32px rgba(28, 35, 89, .12);
}

.blog-prose figure {
    margin: 2em 0;
    text-align: center;
}

.blog-prose figcaption {
    margin-top: 10px;
    font-size: 13px;
    color: var(--light-color);
    font-style: italic;
}

/* Tables */
.blog-prose table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.6em;
    font-size: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.blog-prose th {
    background: var(--title-color);
    color: #fff;
    font-family: var(--title-font);
    font-weight: 600;
    padding: 12px 16px;
    text-align: left;
}

.blog-prose td {
    padding: 11px 16px;
    border-bottom: 1px solid var(--th-border-color);
}

.blog-prose tr:nth-child(even) td {
    background: var(--smoke-color2);
}

.blog-prose tr:last-child td {
    border-bottom: none;
}

/* Horizontal rule */
.blog-prose hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, var(--theme-color), transparent);
    margin: 2.5em 0;
    border-radius: 2px;
}

/* Code blocks */
.blog-prose pre {
    background: #1C2359;
    color: #e4e4e5;
    padding: 20px 24px;
    border-radius: 10px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 1.4em;
}

.blog-prose code {
    background: var(--smoke-color5);
    color: var(--theme-color);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: .9em;
}

.blog-prose pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* ---------- Article divider ---------- */
.blog-article-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--theme-color), var(--theme-color2));
    border-radius: 2px;
    margin: 40px auto;
}

/* ---------- CTA at bottom of article ---------- */
.blog-article-cta {
    background: linear-gradient(135deg, var(--title-color) 0%, #2a3680 100%);
    border-radius: 20px;
    padding: 48px 40px;
    text-align: center;
    margin-top: 56px;
    color: #fff;
}

.blog-article-cta__title {
    font-family: var(--title-font);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.blog-article-cta__text {
    font-size: 16px;
    opacity: .85;
    margin-bottom: 28px;
}

.blog-article-cta .btn-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------- Back to blog link ---------- */
.blog-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
    color: var(--title-color);
    text-decoration: none;
    margin-bottom: 40px;
    transition: color .2s, gap .2s;
}

.blog-back-link:hover {
    color: var(--theme-color);
    gap: 12px;
}

.blog-back-link i {
    font-size: 13px;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .blog-hero {
        min-height: 320px;
    }

    .blog-hero__content {
        padding-bottom: 36px;
    }

    .blog-article-section {
        padding: 48px 0 72px;
    }

    .blog-article-cta {
        padding: 36px 24px;
    }

    .blog-article-cta__title {
        font-size: 1.3rem;
    }
}

@media (max-width: 767px) {
    .blog-hero {
        min-height: 260px;
        max-height: none;
    }

    .blog-hero__title {
        font-size: 1.4rem;
    }

    .blog-prose {
        font-size: 16px;
    }

    .blog-prose blockquote {
        padding: 20px 20px 20px 48px;
    }

    .blog-prose h2 { font-size: 1.4rem; }
    .blog-prose h3 { font-size: 1.2rem; }

    .blog-breadcrumb .current {
        max-width: 180px;
    }
}
