/* =============================================
   RT Blog – front styles
   ============================================= */

#module-rt_blog-list #content-wrapper,
#module-rt_blog-post #content-wrapper {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto;
}

/* ── Intro ── */

.rt-blog-intro {
    max-width: 760px;
    margin: 0 auto 2.5rem;
    text-align: center;
    color: #555;
    font-size: 1.05rem;
    line-height: 1.7;
}

/* ── Grid ── */

.rt-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

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

@media (max-width: 575px) {
    .rt-blog-grid { grid-template-columns: 1fr; }
}

/* ── Card ── */

.rt-blog-card {
    background: #fff;
    border: 1px solid rgba(0,0,0,.07);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,.05);
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s ease, transform .2s ease;
}

.rt-blog-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,.10);
    transform: translateY(-2px);
}

.rt-blog-card-img-wrap {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f4f4f4;
    flex-shrink: 0;
}

.rt-blog-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

.rt-blog-card:hover .rt-blog-card-img-wrap img {
    transform: scale(1.04);
}

.rt-blog-no-img {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8f0fe, #f0f4ff);
}

.rt-blog-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.rt-blog-date {
    font-size: .8rem;
    color: #999;
    display: block;
    margin-bottom: .4rem;
}

.rt-blog-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 .65rem;
    line-height: 1.35;
}

.rt-blog-card-title a {
    color: inherit;
    text-decoration: none;
}

.rt-blog-card-title a:hover {
    color: var(--primary-color, #d32f2f);
}

.rt-blog-excerpt {
    font-size: .9rem;
    color: #666;
    line-height: 1.55;
    margin-bottom: 1rem;
    flex: 1;
}

.rt-blog-read-more {
    align-self: flex-start;
    font-size: .85rem;
    padding: .45rem 1.1rem;
}

/* ── Pagination ── */

.rt-blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin: 2rem 0 1rem;
}

.rt-blog-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 .75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-size: .9rem;
    transition: background .15s, color .15s;
}

.rt-blog-page-btn:hover {
    background: var(--primary-color, #d32f2f);
    color: #fff;
    border-color: var(--primary-color, #d32f2f);
}

.rt-blog-page-btn.current {
    background: var(--primary-color, #d32f2f);
    color: #fff;
    border-color: var(--primary-color, #d32f2f);
    font-weight: 700;
    pointer-events: none;
}

.rt-blog-empty {
    text-align: center;
    color: #888;
    padding: 3rem 0;
}

/* ── Single post ── */

.rt-blog-post {
    max-width: 820px;
    margin: 0 auto;
}

.rt-blog-post-hero {
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 2rem;
    aspect-ratio: 16 / 6;
}

.rt-blog-post-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rt-blog-post-header {
    margin-bottom: 1rem;
}

.rt-blog-post-excerpt {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.7;
    border-left: 4px solid var(--primary-color, #d32f2f);
    padding-left: 1.25rem;
    margin-bottom: 1.75rem;
}

.rt-blog-post-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
}

.rt-blog-post-content h2,
.rt-blog-post-content h3,
.rt-blog-post-content h4 {
    margin-top: 2rem;
    margin-bottom: .75rem;
    font-weight: 700;
}

.rt-blog-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.rt-blog-post-content ul,
.rt-blog-post-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.rt-blog-post-content li {
    margin-bottom: .35rem;
}

.rt-blog-post-footer {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

/* ── Related posts ── */

.rt-blog-related {
    max-width: 1200px;
    margin: 3rem auto 1rem;
    padding-top: 2rem;
    border-top: 2px solid #f0f0f0;
}

.rt-blog-related-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #222;
}
