/* ============================================
   Rank4Sure Blog Page 
   ============================================ */

:root {
    --r4s-bg-light:       #eef1fb;
    --r4s-card-bg:        #ffffff;
    --r4s-border-light:   #dde2f0;
    --r4s-primary:        #1E2080;
    --r4s-primary-dim:    #1E208014;
    --r4s-primary-hover:  #2d2fa8;
    --r4s-accent:         #F5A623;
    --r4s-accent-dim:     #F5A62318;
    --r4s-text-dark:      #111a3e;
    --r4s-text-body:      #2c3050;
    --r4s-text-muted:     #6b7299;
    --r4s-radius-sm:      12px;
    --r4s-radius-lg:      20px;
    --r4s-shadow-sm:      0 1px 8px rgba(30, 32, 128, 0.04);
    --r4s-shadow-md:      0 4px 24px rgba(30, 32, 128, 0.08);
    --r4s-shadow-lg:      0 8px 32px rgba(30, 32, 128, 0.11);
    --r4s-transition:     0.25s ease;
}

/* ---- Reset (scoped) ---- */
.r4s-blog-wrap *,
.r4s-blog-wrap *::before,
.r4s-blog-wrap *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.r4s-blog-wrap {
    background: #ffffff;
    color: var(--r4s-text-body);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
}

.r4s-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========== HERO SECTION ========== */
.r4s-blog-hero {
    position: relative;
    background: var(--r4s-bg-light);
    padding: 100px 0 80px;
    text-align: center;
    overflow: hidden;
    border-bottom: 1px solid var(--r4s-border-light);
}

.r4s-blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 50% 0%, rgba(30, 32, 128, 0.06) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 80% 80%, rgba(245, 166, 35, 0.04) 0%, transparent 60%);
    pointer-events: none;
}

.r4s-blog-hero__glow {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--r4s-primary), transparent);
    opacity: 0.3;
}

.r4s-blog-hero__inner {
    position: relative;
    z-index: 1;
}

.r4s-badge {
    display: inline-block;
    background: var(--r4s-primary-dim);
    color: var(--r4s-primary);
    border: 1px solid rgba(30, 32, 128, 0.18);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.r4s-blog-hero__title {
    font-size: clamp(32px, 5vw, 54px);
    font-weight: 700;
    line-height: 1.2;
    color: var(--r4s-text-dark);
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.r4s-highlight {
    color: var(--r4s-accent);
}

.r4s-blog-hero__subtitle {
    font-size: 17px;
    color: var(--r4s-text-muted);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ========== FILTER BAR ========== */
.r4s-filter-bar {
    background: #ffffff;
    border-bottom: 1px solid var(--r4s-border-light);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(30, 32, 128, 0.06);
}

.r4s-filter-bar__inner {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.r4s-filter-label {
    color: var(--r4s-text-muted);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.r4s-filter-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.r4s-filter-tag {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    color: var(--r4s-text-muted);
    background: transparent;
    border: 1px solid var(--r4s-border-light);
    text-decoration: none;
    transition: all var(--r4s-transition);
    white-space: nowrap;
    cursor: pointer;
}

.r4s-filter-tag:hover {
    color: var(--r4s-primary);
    border-color: rgba(30, 32, 128, 0.3);
    background: var(--r4s-primary-dim);
}

.r4s-filter-tag.active {
    color: #ffffff;
    background: var(--r4s-primary);
    border-color: var(--r4s-primary);
    font-weight: 600;
}

/* ========== BLOG SECTION ========== */
.r4s-blog-section {
    padding: 60px 0 80px;
    background: #ffffff;
}

/* ========== FEATURED POST ========== */
.r4s-post-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: var(--r4s-card-bg);
    border: 1px solid var(--r4s-border-light);
    border-radius: var(--r4s-radius-lg);
    overflow: hidden;
    margin-bottom: 48px;
    transition: all var(--r4s-transition);
    box-shadow: 0 2px 20px rgba(30, 32, 128, 0.07);
    align-items: stretch;
}

.r4s-post-featured:hover {
    border-color: rgba(30, 32, 128, 0.25);
    box-shadow: var(--r4s-shadow-lg);
}

/* ---- Image Side: fills full height, no text overlay ---- */
.r4s-post-featured__image {
    position: relative;
    overflow: hidden;
    min-height: 380px;
}

.r4s-post-featured__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.r4s-post-featured:hover .r4s-post-featured__img {
    transform: scale(1.03);
}

.r4s-post-featured__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(30, 32, 128, 0.06), transparent);
    pointer-events: none;
}



/* Hide any stray text inside the image box */
.r4s-post-featured__image span,
.r4s-post-featured__image p,
.r4s-no-thumb span,
.r4s-no-thumb p {
    display: none !important;
}

/* ---- Content Side ---- */
.r4s-post-featured__content {
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    background: var(--r4s-card-bg);
}

.r4s-post-featured__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.r4s-cat-badge {
    display: inline-block;
    background: var(--r4s-primary-dim);
    color: var(--r4s-primary);
    border: 1px solid rgba(30, 32, 128, 0.18);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all var(--r4s-transition);
}

.r4s-cat-badge:hover {
    background: var(--r4s-primary);
    color: #ffffff;
}

.r4s-post-featured__badge {
    display: inline-block;
    background: var(--r4s-accent-dim);
    color: #c97d0a;
    border: 1px solid rgba(245, 166, 35, 0.3);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.r4s-post-featured__title {
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.r4s-post-featured__title a {
    color: var(--r4s-text-dark);
    text-decoration: none;
    transition: color var(--r4s-transition);
}

.r4s-post-featured__title a:hover {
    color: var(--r4s-primary);
}

.r4s-post-featured__excerpt {
    color: var(--r4s-text-muted);
    font-size: 15px;
    line-height: 1.7;
}

.r4s-post-featured__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.r4s-post-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.r4s-author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(30, 32, 128, 0.125);
}

.r4s-author-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--r4s-text-dark);
}

.r4s-post-date {
    display: block;
    font-size: 12px;
    color: var(--r4s-text-muted);
}

.r4s-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--r4s-primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    padding: 10px 20px;
    border: 1.5px solid var(--r4s-primary);
    border-radius: 50px;
    transition: all var(--r4s-transition);
    white-space: nowrap;
}

.r4s-read-more:hover {
    background: var(--r4s-accent);
    color: #ffffff;
    border-color: var(--r4s-accent);
}

.r4s-read-more svg {
    transition: transform var(--r4s-transition);
}

.r4s-read-more:hover svg {
    transform: translateX(3px);
}

/* ========== POSTS GRID ========== */
.r4s-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* ========== POST CARD ========== */
.r4s-post-card {
    background: var(--r4s-card-bg);
    border: 1px solid var(--r4s-border-light);
    border-radius: var(--r4s-radius-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all var(--r4s-transition);
    box-shadow: var(--r4s-shadow-sm);
}

.r4s-post-card:hover {
    border-color: rgba(30, 32, 128, 0.22);
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(30, 32, 128, 0.10);
}

.r4s-post-card__image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.r4s-post-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.r4s-post-card:hover .r4s-post-card__img {
    transform: scale(1.04);
}

.r4s-no-thumb-card {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--r4s-bg-light) 0%, #dde4f8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.r4s-no-thumb-card span {
    font-size: 32px;
    font-weight: 800;
    color: var(--r4s-primary);
    opacity: 0.2;
    text-transform: uppercase;
}

.r4s-post-card__cat {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.93);
    color: var(--r4s-primary);
    border: 1px solid rgba(30, 32, 128, 0.18);
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(6px);
    transition: all var(--r4s-transition);
}

.r4s-post-card__cat:hover {
    background: var(--r4s-primary);
    color: #ffffff;
    border-color: var(--r4s-primary);
}

.r4s-post-card__body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.r4s-post-card__title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.2px;
}

.r4s-post-card__title a {
    color: var(--r4s-text-dark);
    text-decoration: none;
    transition: color var(--r4s-transition);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.r4s-post-card__title a:hover {
    color: var(--r4s-primary);
}

.r4s-post-card__excerpt {
    font-size: 14px;
    color: var(--r4s-text-muted);
    line-height: 1.65;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.r4s-post-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--r4s-border-light);
    margin-top: auto;
}

.r4s-post-card__meta {
    display: flex;
    align-items: center;
    gap: 6px;
}

.r4s-post-card__author {
    font-size: 12px;
    font-weight: 600;
    color: var(--r4s-text-body);
}

.r4s-post-card__dot {
    color: var(--r4s-border-light);
    font-size: 14px;
}

.r4s-post-card__date {
    font-size: 12px;
    color: var(--r4s-text-muted);
}

.r4s-card-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--r4s-primary-dim);
    color: var(--r4s-primary);
    border: 1px solid rgba(30, 32, 128, 0.16);
    border-radius: 50%;
    text-decoration: none;
    transition: all var(--r4s-transition);
    flex-shrink: 0;
}

.r4s-card-link:hover {
    background: var(--r4s-accent);
    color: #ffffff;
    border-color: var(--r4s-accent);
    transform: translateX(2px);
}

/* ========== PAGINATION ========== */
.r4s-pagination {
    margin-top: 56px;
    display: flex;
    justify-content: center;
}

.r4s-pagination .page-numbers {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    flex-wrap: wrap;
    justify-content: center;
}

.r4s-pagination .page-numbers li a,
.r4s-pagination .page-numbers li span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--r4s-border-light);
    color: var(--r4s-text-muted);
    background: #ffffff;
    transition: all var(--r4s-transition);
    cursor: pointer;
}

.r4s-pagination .page-numbers li a:hover {
    border-color: rgba(30, 32, 128, 0.3);
    color: var(--r4s-primary);
    background: var(--r4s-primary-dim);
}

.r4s-pagination .page-numbers li .current {
    background: var(--r4s-primary);
    color: #ffffff;
    border-color: var(--r4s-primary);
    font-weight: 700;
}

/* ========== NO POSTS STATE ========== */
.r4s-no-posts {
    text-align: center;
    padding: 80px 24px;
}

.r4s-no-posts__icon {
    font-size: 56px;
    margin-bottom: 20px;
    opacity: 0.35;
}

.r4s-no-posts h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--r4s-text-dark);
    margin-bottom: 10px;
}

.r4s-no-posts p {
    color: var(--r4s-text-muted);
    margin-bottom: 28px;
}

.r4s-btn-primary {
    display: inline-block;
    background: var(--r4s-accent);
    color: #ffffff;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all var(--r4s-transition);
}

.r4s-btn-primary:hover {
    background: #d98e10;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 166, 35, 0.3);
}

/* ========== NEWSLETTER / CTA STRIP ========== */
.r4s-blog-cta {
    background: var(--r4s-primary);
    padding: 56px 0;
    position: relative;
    overflow: hidden;
}

.r4s-blog-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.r4s-blog-cta__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

.r4s-blog-cta__text h3 {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
}

.r4s-blog-cta__text p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.r4s-newsletter-form {
    display: flex;
    gap: 10px;
    flex: 1;
    max-width: 500px;
    flex-wrap: wrap;
}

.r4s-newsletter-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 14px;
    min-width: 220px;
    transition: border-color var(--r4s-transition);
    outline: none;
}

.r4s-newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.r4s-newsletter-input:focus {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.18);
}

.r4s-newsletter-btn {
    background: var(--r4s-accent);
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--r4s-transition);
}

.r4s-newsletter-btn:hover {
    background: #d98e10;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .r4s-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .r4s-post-featured {
        grid-template-columns: 1fr;
    }
    .r4s-post-featured__image {
        min-height: 280px;
        max-height: 320px;
    }
    .r4s-post-featured__content {
        padding: 36px;
    }
}

@media (max-width: 768px) {
    .r4s-blog-hero {
        padding: 70px 0 60px;
    }
    .r4s-blog-section {
        padding: 40px 0 60px;
    }
    .r4s-posts-grid {
        grid-template-columns: 1fr;
    }
    .r4s-post-featured__content {
        padding: 28px;
    }
    .r4s-post-featured__footer {
        flex-direction: column;
        align-items: flex-start;
    }
    .r4s-blog-cta__inner {
        flex-direction: column;
        text-align: center;
    }
    .r4s-newsletter-form {
        max-width: 100%;
        width: 100%;
    }
    .r4s-filter-bar__inner {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .r4s-blog-hero__title {
        font-size: 28px;
    }
    .r4s-container {
        padding: 0 16px;
    }
    .r4s-post-card__body {
        padding: 18px;
    }
    .r4s-newsletter-form {
        flex-direction: column;
    }
    .r4s-newsletter-btn {
        width: 100%;
    }
}