/* =========================================================
   Blog Index — Prepa Medschool
   Follows the site's CSS variable system (style2.min.css)
   ========================================================= */

/* ---- Hero ---- */
.blg-hero {
    background: linear-gradient(135deg, var(--title-color) 0%, #2a3680 100%);
    padding: 96px 0 80px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.blg-hero::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .04);
    pointer-events: none;
}

.blg-hero::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -60px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .03);
    pointer-events: none;
}

.blg-hero__tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--theme-color2);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.blg-hero__tag::before,
.blg-hero__tag::after {
    content: '';
    display: inline-block;
    height: 1px;
    width: 28px;
    background: var(--theme-color2);
    opacity: .7;
}

.blg-hero__title {
    font-family: var(--title-font);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 16px;
}

.blg-hero__sub {
    color: rgba(255, 255, 255, .72);
    font-size: 17px;
    max-width: 520px;
    margin: 0 auto 28px;
    line-height: 1.75;
}

/* Breadcrumb inside hero */
.blg-hero__breadcrumb {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, .55);
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .12);
    padding: 8px 20px;
    border-radius: 100px;
}

.blg-hero__breadcrumb a {
    color: rgba(255, 255, 255, .6);
    text-decoration: none;
    transition: color .2s;
}

.blg-hero__breadcrumb a:hover {
    color: var(--theme-color2);
}

.blg-hero__breadcrumb .sep {
    opacity: .35;
    font-size: 10px;
}

.blg-hero__breadcrumb .current {
    color: #fff;
    font-weight: 500;
}

/* ---- Section wrapper ---- */
.blg-section {
    padding: 80px 0 100px;
    background: #f7f8fc;
}

/* ---- Section header ---- */
.blg-section__header {
    margin-bottom: 52px;
}

.blg-section__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--theme-color);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.blg-section__title {
    font-family: var(--title-font);
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 700;
    color: var(--title-color);
    margin-bottom: 10px;
}

.blg-section__sub {
    font-size: 16px;
    color: var(--body-color);
}

/* ---- Article grid ---- */
.blg-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

@media (max-width: 991px) {
    .blg-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
}

@media (max-width: 575px) {
    .blg-grid { grid-template-columns: 1fr; gap: 20px; }
}

/* ---- Card ---- */
.blg-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 28px rgba(28, 35, 89, .07);
    display: flex;
    flex-direction: column;
    transition: transform .32s ease, box-shadow .32s ease;
}

.blg-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 16px 48px rgba(28, 35, 89, .13);
}

/* Card image */
.blg-card__img-wrap {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    text-decoration: none;
}

.blg-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .5s ease;
}

.blg-card:hover .blg-card__img {
    transform: scale(1.06);
}

.blg-card__img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--title-color) 0%, #2a3680 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.blg-card__img-placeholder i {
    font-size: 2.8rem;
    color: rgba(255, 255, 255, .25);
}

/* Category badge */
.blg-card__cat {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--theme-color);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 100px;
    line-height: 1.6;
}

/* Card body */
.blg-card__body {
    padding: 26px 26px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Meta row: date + reading time */
.blg-card__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 13px;
    color: #9099b5;
    margin-bottom: 14px;
}

.blg-card__meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.blg-card__meta i {
    color: var(--theme-color2);
    font-size: 12px;
}

/* Title */
.blg-card__title {
    font-family: var(--title-font);
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.42;
    color: var(--title-color);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .2s;
}

.blg-card__title a {
    color: inherit;
    text-decoration: none;
}

.blg-card:hover .blg-card__title,
.blg-card__title a:hover {
    color: var(--theme-color);
}

/* Excerpt */
.blg-card__excerpt {
    font-size: 14.5px;
    line-height: 1.72;
    color: #6b7280;
    flex: 1;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Read more link */
.blg-card__link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 600;
    color: var(--theme-color);
    text-decoration: none;
    margin-top: auto;
    transition: gap .22s, color .2s;
}

.blg-card__link i {
    font-size: 12px;
    transition: transform .22s;
}

.blg-card__link:hover {
    color: var(--theme-color2);
    gap: 11px;
}

.blg-card__link:hover i {
    transform: translateX(2px);
}

/* Divider */
.blg-card__divider {
    height: 1px;
    background: #f0f1f6;
    margin: 0 26px 20px;
}

/* ---- Pagination ---- */
.blg-pagination {
    display: flex;
    justify-content: center;
    margin-top: 60px;
}

.blg-pagination .pagination {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.blg-pagination .page-item .page-link {
    min-width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border-radius: 10px;
    border: 2px solid #e9ecf3;
    font-weight: 600;
    font-size: 15px;
    color: var(--title-color);
    background: #fff;
    box-shadow: 0 2px 8px rgba(28, 35, 89, .06);
    transition: background .2s, color .2s, border-color .2s;
    text-decoration: none;
}

.blg-pagination .page-item .page-link:hover,
.blg-pagination .page-item.active .page-link {
    background: var(--theme-color);
    color: #fff;
    border-color: var(--theme-color);
}

.blg-pagination .page-item.disabled .page-link {
    opacity: .38;
    pointer-events: none;
}

/* ---- Empty state ---- */
.blg-empty {
    text-align: center;
    padding: 80px 20px;
    grid-column: 1 / -1;
}

.blg-empty__icon {
    font-size: 3.5rem;
    color: var(--theme-color2);
    margin-bottom: 24px;
    display: block;
    opacity: .6;
}

.blg-empty h3 {
    font-family: var(--title-font);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--title-color);
    margin-bottom: 12px;
}

.blg-empty p {
    font-size: 16px;
    color: var(--body-color);
    margin-bottom: 28px;
}

/* ---- CTA ---- */
.blg-cta {
    background: linear-gradient(135deg, var(--title-color) 0%, #2a3680 100%);
    padding: 88px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blg-cta::before {
    content: '';
    position: absolute;
    top: -60px;
    right: 10%;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .04);
    pointer-events: none;
}

.blg-cta__title {
    font-family: var(--title-font);
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
}

.blg-cta__text {
    color: rgba(255, 255, 255, .78);
    font-size: 17px;
    max-width: 480px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.blg-cta .btn-group {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---- Responsive tweaks ---- */
@media (max-width: 767px) {
    .blg-hero {
        padding: 72px 0 60px;
    }

    .blg-hero__title {
        font-size: 1.8rem;
    }

    .blg-hero__sub {
        font-size: 15px;
    }

    .blg-section {
        padding: 56px 0 72px;
    }

    .blg-card__body {
        padding: 20px 20px 18px;
    }

    .blg-cta {
        padding: 60px 0;
    }

    .blg-cta__title {
        font-size: 1.4rem;
    }

    .blg-cta__text {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .blg-hero {
        padding: 56px 0 48px;
    }

    .blg-hero__tag::before,
    .blg-hero__tag::after {
        width: 18px;
    }
}
