/* ═══════════════════════════════════════════════
   Blog Listing Page — Editorial Premium Design
   Prefix: rnt-  |  Vars: --rnt-
   ═══════════════════════════════════════════════ */

/* ── Blog Color Tokens (editorial palette) ── */
.rnt-blog-page {
    --rnt-blog-blue: #163A5F;
    --rnt-blog-blue-rgb: 22, 58, 95;
    --rnt-blog-text: #1F2937;
    --rnt-blog-text-secondary: #4B5563;
    --rnt-blog-bg: #FFFFFF;
    --rnt-blog-bg-soft: #F7F9FC;
    --rnt-blog-hero-gradient: #E8F1FB;
    --rnt-blog-border: #D6E0EA;
    --rnt-blog-green-bg: #ECFDF5;
    --rnt-blog-green-border: #A7F3D0;
    --rnt-blog-orange-bg: #FFF7ED;
    --rnt-blog-orange-border: #FDBA74;
    --rnt-blog-shadow: rgba(15, 23, 42, 0.08);
    --rnt-blog-overlay: rgba(255, 255, 255, 0.12);
}

.rnt-blog-page {
    background: var(--rnt-blog-bg-soft);
    position: relative;
    overflow-x: hidden;
}


/* ═══════════════════════════════════════════════
   ANIMATED BACKGROUND DECORATIONS
   ═══════════════════════════════════════════════ */
.rnt-blog-bg-decor {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.rnt-blog-bg-decor__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: rntOrbFloat 20s ease-in-out infinite;
}

.rnt-blog-bg-decor__orb--1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(var(--rnt-blog-blue-rgb), 0.08) 0%, transparent 70%);
    top: 10%;
    left: -10%;
    animation-delay: 0s;
}

.rnt-blog-bg-decor__orb--2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(var(--rnt-primary-rgb), 0.06) 0%, transparent 70%);
    top: 50%;
    right: -8%;
    animation-delay: -7s;
    animation-duration: 25s;
}

.rnt-blog-bg-decor__orb--3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(var(--rnt-accent-rgb), 0.05) 0%, transparent 70%);
    bottom: 10%;
    left: 20%;
    animation-delay: -14s;
    animation-duration: 22s;
}

@keyframes rntOrbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(15px, 35px) scale(1.02); }
}


/* ═══════════════════════════════════════════════
   HERO — Blog variant with animated grid
   ═══════════════════════════════════════════════ */
.rnt-hero--blog {
    height: 520px;
}

.rnt-hero--blog .rnt-hero__overlay {
    background: linear-gradient(
        160deg,
        rgba(var(--rnt-blog-blue-rgb), 0.85) 0%,
        rgba(var(--rnt-blog-blue-rgb), 0.6) 40%,
        rgba(var(--rnt-primary-rgb), 0.3) 100%
    );
}

.rnt-hero__blog-desc {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 16px;
    max-width: 480px;
    line-height: 1.7;
    letter-spacing: 0.2px;
}

/* Animated grid lines in hero */
.rnt-hero-grid {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    opacity: 0.08;
}

.rnt-hero-grid__line {
    position: absolute;
    background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.6) 50%, transparent 100%);
    width: 1px;
    height: 200%;
    animation: rntGridSlide 8s linear infinite;
}

.rnt-hero-grid__line:nth-child(1) { left: 20%; animation-delay: 0s; }
.rnt-hero-grid__line:nth-child(2) { left: 40%; animation-delay: -2s; }
.rnt-hero-grid__line:nth-child(3) { left: 60%; animation-delay: -4s; }
.rnt-hero-grid__line:nth-child(4) { left: 80%; animation-delay: -6s; }

@keyframes rntGridSlide {
    0% { transform: translateY(-50%); }
    100% { transform: translateY(0%); }
}


/* ═══════════════════════════════════════════════
   SEARCH BAR
   ═══════════════════════════════════════════════ */
.rnt-blog-search-section {
    position: relative;
    z-index: 3;
    margin-top: -40px;
    padding-bottom: 0;
}

.rnt-blog-search {
    max-width: 680px;
    margin: 0 auto;
}

.rnt-blog-search__wrap {
    display: flex;
    align-items: center;
    background: var(--rnt-blog-bg);
    border-radius: 16px;
    box-shadow: 0 12px 40px var(--rnt-blog-shadow), 0 0 0 1px rgba(0,0,0,0.03);
    padding: 6px 6px 6px 20px;
    gap: 12px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.rnt-blog-search__wrap:focus-within {
    box-shadow: 0 16px 50px rgba(var(--rnt-blog-blue-rgb), 0.14), 0 0 0 2px rgba(var(--rnt-blog-blue-rgb), 0.15);
    transform: translateY(-2px);
}

.rnt-blog-search__icon {
    flex-shrink: 0;
    color: var(--rnt-blog-text-secondary);
    opacity: 0.5;
    width: 20px !important;
    height: 20px !important;
    max-width: none !important;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.rnt-blog-search__wrap:focus-within .rnt-blog-search__icon {
    color: var(--rnt-blog-blue);
    opacity: 0.8;
}

.rnt-blog-search__input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 15px;
    font-family: inherit;
    color: var(--rnt-blog-text);
    padding: 12px 0;
    min-width: 0;
}

.rnt-blog-search__input::placeholder {
    color: var(--rnt-blog-text-secondary);
    opacity: 0.55;
}

.rnt-blog-search__clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--rnt-blog-text-secondary);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.rnt-blog-search__clear svg {
    width: 18px !important;
    height: 18px !important;
    max-width: none !important;
}

.rnt-blog-search__clear:hover {
    background: rgba(var(--rnt-blog-blue-rgb), 0.06);
    color: var(--rnt-blog-blue);
}

.rnt-blog-search__btn {
    flex-shrink: 0;
    padding: 12px 28px;
    border: none;
    border-radius: 12px;
    background: var(--rnt-blog-blue);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.rnt-blog-search__btn:hover {
    background: #1a4571;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(var(--rnt-blog-blue-rgb), 0.3);
}

.rnt-blog-search__btn:active {
    transform: translateY(0);
}

/* Search results label */
.rnt-blog-search-results {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--rnt-blog-text-secondary);
}

.rnt-blog-search-results strong {
    color: var(--rnt-blog-blue);
    font-weight: 700;
}


/* ═══════════════════════════════════════════════
   IMAGE PLACEHOLDER (no featured image)
   ═══════════════════════════════════════════════ */
.rnt-blog-featured__img-wrap--no-img,
.rnt-blog-card__img-wrap--no-img {
    background: linear-gradient(135deg, var(--rnt-blog-hero-gradient) 0%, var(--rnt-blog-border) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.rnt-blog-featured__img-wrap--no-img::after,
.rnt-blog-card__img-wrap--no-img::after {
    content: '';
    display: block;
    width: 64px;
    height: 64px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 24 24' fill='none' stroke='%23163A5F' stroke-width='1' stroke-linecap='round' stroke-linejoin='round' opacity='0.2'%3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpolyline points='21 15 16 10 5 21'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.5;
}

.rnt-blog-card__img-wrap--no-img {
    aspect-ratio: 16 / 10;
}


/* ═══════════════════════════════════════════════
   SHARED BLOG COMPONENTS
   ═══════════════════════════════════════════════ */

/* Category badge */
.rnt-blog-cat {
    display: inline-flex;
    align-items: center;
    padding: 4px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    border-radius: 30px;
    background: rgba(var(--rnt-primary-rgb), 0.1);
    color: var(--rnt-primary);
    white-space: nowrap;
}

/* Date & read time */
.rnt-blog-date,
.rnt-blog-read-time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--rnt-blog-text-secondary);
    font-weight: 500;
}

.rnt-blog-date svg,
.rnt-blog-read-time svg {
    flex-shrink: 0;
    opacity: 0.6;
}

.rnt-blog-date--sm,
.rnt-blog-read-time--sm {
    font-size: 12px;
}

.rnt-blog-date--sm svg,
.rnt-blog-read-time--sm svg {
    width: 12px !important;
    height: 12px !important;
    max-width: none !important;
}


/* ═══════════════════════════════════════════════
   FEATURED POST
   ═══════════════════════════════════════════════ */
.rnt-blog-featured-section {
    padding-top: 0;
    padding-bottom: 0;
    margin-top: -80px;
    position: relative;
    z-index: 2;
}

.rnt-blog-featured {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    background: var(--rnt-blog-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px var(--rnt-blog-shadow), 0 0 0 1px rgba(0,0,0,0.03);
    text-decoration: none;
    color: inherit;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.rnt-blog-featured:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 80px rgba(var(--rnt-blog-blue-rgb), 0.15), 0 0 0 1px rgba(0,0,0,0.03);
    color: inherit;
}

.rnt-blog-featured__img-wrap {
    position: relative;
    overflow: hidden;
    min-height: 420px;
}

.rnt-blog-featured__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.rnt-blog-featured:hover .rnt-blog-featured__img {
    transform: scale(1.06);
}

.rnt-blog-featured__img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(var(--rnt-blog-blue-rgb), 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.rnt-blog-featured__body {
    padding: 48px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.rnt-blog-featured__top {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.rnt-blog-featured__title {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--rnt-blog-text);
    margin: 0 0 16px;
    letter-spacing: -0.5px;
    transition: color var(--rnt-transition);
}

.rnt-blog-featured:hover .rnt-blog-featured__title {
    color: var(--rnt-blog-blue);
}

.rnt-blog-featured__excerpt {
    font-size: 15px;
    line-height: 1.75;
    color: var(--rnt-blog-text-secondary);
    margin-bottom: 28px;
}

.rnt-blog-featured__cta {
    margin-top: auto;
}

.rnt-blog-featured__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--rnt-primary);
    text-decoration: none;
    transition: gap 0.3s ease, color var(--rnt-transition);
}

.rnt-blog-featured__link svg {
    width: 18px !important;
    height: 18px !important;
    max-width: none !important;
    transition: transform 0.3s ease;
}

.rnt-blog-featured:hover .rnt-blog-featured__link {
    gap: 12px;
    color: var(--rnt-blog-blue);
}

.rnt-blog-featured:hover .rnt-blog-featured__link svg {
    transform: translateX(4px);
}


/* ═══════════════════════════════════════════════
   GRID SECTION HEADER
   ═══════════════════════════════════════════════ */
.rnt-blog-grid-section {
    position: relative;
    z-index: 1;
}

.rnt-blog-grid-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 48px;
}

.rnt-blog-grid-header__title {
    font-size: 22px;
    font-weight: 700;
    color: var(--rnt-blog-text);
    white-space: nowrap;
    margin: 0;
    letter-spacing: -0.3px;
}

.rnt-blog-grid-header__line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--rnt-blog-border), transparent);
}


/* ═══════════════════════════════════════════════
   BLOG CARDS GRID
   ═══════════════════════════════════════════════ */
.rnt-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.rnt-blog-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--rnt-blog-bg);
    box-shadow: 0 4px 20px var(--rnt-blog-shadow), 0 0 0 1px rgba(0,0,0,0.02);
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.rnt-blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(var(--rnt-blog-blue-rgb), 0.12), 0 0 0 1px rgba(0,0,0,0.02);
}

.rnt-blog-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.rnt-blog-card__img-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.rnt-blog-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.rnt-blog-card:hover .rnt-blog-card__img {
    transform: scale(1.08);
}

.rnt-blog-card__img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.04) 100%);
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.rnt-blog-card:hover .rnt-blog-card__img-overlay {
    opacity: 0;
}

/* Category badge on card image */
.rnt-blog-cat--card {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--rnt-blog-blue);
    font-size: 10px;
    padding: 4px 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.rnt-blog-card__body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.rnt-blog-card__meta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.rnt-blog-card__title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--rnt-blog-text);
    margin: 0 0 10px;
    letter-spacing: -0.2px;
    transition: color var(--rnt-transition);
}

.rnt-blog-card:hover .rnt-blog-card__title {
    color: var(--rnt-blog-blue);
}

.rnt-blog-card__excerpt {
    font-size: 14px;
    line-height: 1.65;
    color: var(--rnt-blog-text-secondary);
    margin: 0 0 auto;
    padding-bottom: 18px;
}

.rnt-blog-card__read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--rnt-primary);
    transition: gap 0.3s ease, color var(--rnt-transition);
    padding-top: 16px;
    border-top: 1px solid var(--rnt-blog-border);
}

.rnt-blog-card__read-more svg {
    width: 16px !important;
    height: 16px !important;
    max-width: none !important;
    transition: transform 0.3s ease;
}

.rnt-blog-card:hover .rnt-blog-card__read-more {
    gap: 10px;
    color: var(--rnt-blog-blue);
}

.rnt-blog-card:hover .rnt-blog-card__read-more svg {
    transform: translateX(3px);
}


/* ═══════════════════════════════════════════════
   PAGINATION — Pill Style
   ═══════════════════════════════════════════════ */
.rnt-blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 64px;
    flex-wrap: wrap;
}

.rnt-blog-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--rnt-blog-text-secondary);
    background: var(--rnt-blog-bg);
    border: 1px solid var(--rnt-blog-border);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.rnt-blog-pagination .page-numbers:hover {
    background: var(--rnt-blog-hero-gradient);
    border-color: rgba(var(--rnt-blog-blue-rgb), 0.2);
    color: var(--rnt-blog-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--rnt-blog-shadow);
}

.rnt-blog-pagination .page-numbers.current {
    background: var(--rnt-blog-blue);
    border-color: var(--rnt-blog-blue);
    color: var(--rnt-text-white);
    box-shadow: 0 4px 16px rgba(var(--rnt-blog-blue-rgb), 0.3);
    pointer-events: none;
}

.rnt-blog-pagination .page-numbers svg {
    width: 18px !important;
    height: 18px !important;
    max-width: none !important;
}

.rnt-blog-pagination .page-numbers.prev,
.rnt-blog-pagination .page-numbers.next {
    background: transparent;
    border-color: transparent;
}

.rnt-blog-pagination .page-numbers.prev:hover,
.rnt-blog-pagination .page-numbers.next:hover {
    background: var(--rnt-blog-hero-gradient);
    border-color: rgba(var(--rnt-blog-blue-rgb), 0.15);
}

.rnt-blog-pagination .dots {
    background: transparent;
    border-color: transparent;
    pointer-events: none;
    color: var(--rnt-blog-text-secondary);
}


/* ═══════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════ */
.rnt-blog-empty {
    text-align: center;
    padding: 80px 24px;
}

.rnt-blog-empty svg {
    color: var(--rnt-blog-border);
    margin-bottom: 24px;
    width: 64px !important;
    height: 64px !important;
    max-width: none !important;
}

.rnt-blog-empty h2 {
    font-size: 24px;
    color: var(--rnt-blog-text);
    margin-bottom: 12px;
    font-weight: 700;
}

.rnt-blog-empty p {
    color: var(--rnt-blog-text-secondary);
    font-size: 16px;
    margin-bottom: 32px;
}


/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .rnt-blog-featured {
        grid-template-columns: 1fr;
    }

    .rnt-blog-featured__img-wrap {
        min-height: 300px;
        max-height: 360px;
    }

    .rnt-blog-featured__body {
        padding: 36px 32px;
    }

    .rnt-blog-featured__title {
        font-size: 24px;
    }

    .rnt-blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 767px) {
    .rnt-hero--blog {
        height: 400px;
    }

    .rnt-hero__blog-desc {
        font-size: 14px;
    }

    .rnt-blog-search-section {
        margin-top: -30px;
    }

    .rnt-blog-search__wrap {
        padding: 4px 4px 4px 16px;
        border-radius: 12px;
    }

    .rnt-blog-search__input {
        font-size: 14px;
        padding: 10px 0;
    }

    .rnt-blog-search__btn {
        padding: 10px 20px;
        font-size: 13px;
        border-radius: 10px;
    }

    .rnt-blog-featured-section {
        margin-top: -60px;
    }

    .rnt-blog-featured__body {
        padding: 28px 24px;
    }

    .rnt-blog-featured__title {
        font-size: 21px;
    }

    .rnt-blog-featured__excerpt {
        font-size: 14px;
    }

    .rnt-blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .rnt-blog-grid-header__title {
        font-size: 18px;
    }

    .rnt-blog-card__body {
        padding: 20px;
    }

    .rnt-blog-card__title {
        font-size: 16px;
    }

    .rnt-blog-pagination .page-numbers {
        min-width: 40px;
        height: 40px;
        font-size: 13px;
    }

    /* Reduce orb blur on mobile for performance */
    .rnt-blog-bg-decor__orb {
        filter: blur(60px);
        opacity: 0.25;
    }
}

@media (max-width: 480px) {
    .rnt-hero--blog {
        height: 350px;
    }

    .rnt-blog-featured-section {
        margin-top: -50px;
    }

    .rnt-blog-featured__img-wrap {
        min-height: 220px;
    }

    .rnt-blog-featured__body {
        padding: 24px 20px;
    }

    .rnt-blog-featured__title {
        font-size: 19px;
    }

    .rnt-blog-featured__top {
        gap: 10px;
    }

    .rnt-blog-pagination {
        gap: 4px;
    }
}


/* ═══════════════════════════════════════════════
   ACCESSIBILITY — Reduced Motion
   ═══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    .rnt-blog-bg-decor__orb,
    .rnt-hero-grid__line {
        animation: none;
    }

    .rnt-blog-featured,
    .rnt-blog-card,
    .rnt-blog-card__img,
    .rnt-blog-featured__img {
        transition-duration: 0.01ms;
    }
}
