﻿/* ═══════════════════════════════════════════════════════
   UNIT PILOT — BLOG PAGE  (blog.css)
   Matches _Layout.cshtml brand: #020817 navy, #2563eb blue
   Lang switching: data-en / data-ar handled by site.js
   RTL: html[dir="rtl"]  ·  LTR: html[dir="ltr"] (default)
═══════════════════════════════════════════════════════ */

/* ── TOKENS ────────────────────────────────────────── */
:root {
    --bp-navy: #020817;
    --bp-navy-2: #0b1629;
    --bp-navy-3: #111f3a;
    --bp-blue: #2563eb;
    --bp-blue-light: #3b82f6;
    --bp-blue-glow: rgba(37,99,235,.18);
    --bp-white: #ffffff;
    --bp-off: #f8fafc;
    --bp-muted: #64748b;
    --bp-subtle: #94a3b8;
    --bp-text: #0f172a;
    --bp-text-2: #334155;
    --bp-border: rgba(15,23,42,.09);
    --bp-border-2: rgba(15,23,42,.05);
    --bp-cat-bg: #eef2ff;
    --bp-cat-fg: #3730a3;
    --bp-radius: 20px;
    --bp-radius-sm: 12px;
    --bp-radius-xs: 8px;
    --bp-ease: cubic-bezier(.22,.68,0,1.2);
    --bp-ease-plain: cubic-bezier(.4,0,.2,1);
}

/* ── HERO ───────────────────────────────────────────── */
.bp-hero {
    position: relative;
    background: var(--bp-navy);
    padding: 140px 24px 100px;
    overflow: hidden;
    text-align: left;
}

html[dir="rtl"] .bp-hero {
    text-align: right;
}

/* subtle noise texture overlay */
.bp-hero-noise {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(ellipse 80% 60% at 60% -10%, rgba(37,99,235,.25) 0%, transparent 65%), radial-gradient(ellipse 40% 40% at 90% 80%, rgba(37,99,235,.10) 0%, transparent 60%);
    pointer-events: none;
}

.bp-hero-inner {
    position: relative;
    width: min(900px, 92%);
    margin: 0 auto;
    z-index: 1;
}

/* back link */
.bp-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--bp-subtle);
    text-decoration: none;
    letter-spacing: .03em;
    margin-bottom: 36px;
    transition: color .2s var(--bp-ease-plain);
}

    .bp-back:hover {
        color: var(--bp-white);
    }

html[dir="rtl"] .bp-back {
    flex-direction: row-reverse;
}

/* eyebrow */
.bp-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(37,99,235,.15);
    border: 1px solid rgba(37,99,235,.3);
    border-radius: 999px;
    padding: 7px 18px;
    margin-bottom: 28px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .07em;
    color: #93c5fd;
    text-transform: uppercase;
}

.bp-eyebrow-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #3b82f6;
    animation: bp-pulse 2s ease infinite;
    flex-shrink: 0;
}

@keyframes bp-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: .5;
        transform: scale(.75);
    }
}

/* hero heading */
.bp-hero-title {
    font-size: clamp(36px, 6vw, 72px);
    font-weight: 900;
    line-height: 1.06;
    letter-spacing: -.04em;
    color: var(--bp-white);
    margin: 0 0 22px;
}

.bp-hero-sub {
    font-size: clamp(15px, 2vw, 18px);
    color: #94a3b8;
    line-height: 1.8;
    max-width: 600px;
    margin: 0 0 44px;
}

html[dir="rtl"] .bp-hero-sub {
    max-width: 100%;
}

/* hero stats */
.bp-hero-stats {
    display: flex;
    align-items: center;
    gap: 28px;
}

html[dir="rtl"] .bp-hero-stats {
    flex-direction: row-reverse;
}

.bp-stat-div {
    width: 1px;
    height: 34px;
    background: rgba(255,255,255,.12);
}

.bp-stat {
    display: flex;
    flex-direction: column;
}

.bp-stat-num {
    font-size: 24px;
    font-weight: 900;
    color: var(--bp-white);
    line-height: 1;
}

.bp-stat-label {
    font-size: 12px;
    color: var(--bp-subtle);
    margin-top: 4px;
    letter-spacing: .04em;
}

/* scroll hint */
.bp-hero-scroll-hint {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .bp-hero-scroll-hint span {
        display: block;
        width: 1px;
        height: 50px;
        background: linear-gradient(to bottom, rgba(255,255,255,.35), transparent);
        animation: bp-line 2s ease-in-out infinite;
    }

@keyframes bp-line {
    0% {
        opacity: 0;
        transform: scaleY(0);
        transform-origin: top;
    }

    40% {
        opacity: 1;
        transform: scaleY(1);
        transform-origin: top;
    }

    60% {
        opacity: 1;
        transform: scaleY(1);
        transform-origin: bottom;
    }

    100% {
        opacity: 0;
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

/* ── SECTION / CONTAINER ────────────────────────────── */
.bp-section {
    background: var(--bp-off);
    padding: 80px 24px 100px;
}

.bp-container {
    width: min(1280px, 92%);
    margin: 0 auto;
}

/* ── FEATURED CARD ──────────────────────────────────── */
.bp-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: var(--bp-white);
    border-radius: var(--bp-radius);
    border: 1px solid var(--bp-border);
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: 0 2px 6px rgba(15,23,42,.04);
    transition: box-shadow .25s var(--bp-ease-plain), transform .25s var(--bp-ease-plain);
}

    .bp-featured:hover {
        transform: translateY(-4px);
        box-shadow: 0 20px 50px rgba(15,23,42,.1);
    }

.bp-featured-img-wrap {
    position: relative;
    overflow: hidden;
    display: block;
    min-height: 400px;
}

html[dir="rtl"] .bp-featured {
    direction: rtl;
}

html[dir="rtl"] .bp-featured-img-wrap {
    order: 2;
}

html[dir="rtl"] .bp-featured-body {
    order: 1;
}

.bp-featured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s var(--bp-ease-plain);
}

.bp-featured:hover .bp-featured-img {
    transform: scale(1.04);
}

.bp-featured-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(37,99,235,.1) 0%, transparent 70%);
    pointer-events: none;
}

.bp-featured-body {
    padding: 50px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bp-featured-title {
    font-size: clamp(22px, 2.8vw, 34px);
    font-weight: 900;
    line-height: 1.14;
    letter-spacing: -.035em;
    margin: 16px 0 18px;
}

    .bp-featured-title a {
        color: var(--bp-text);
        text-decoration: none;
        transition: color .2s;
    }

        .bp-featured-title a:hover {
            color: var(--bp-blue);
        }

.bp-featured-excerpt {
    font-size: 15.5px;
    color: var(--bp-text-2);
    line-height: 1.85;
    margin: 0 0 32px;
}

/* ── CARD META (shared) ─────────────────────────────── */
.bp-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

html[dir="rtl"] .bp-card-meta {
    flex-direction: row-reverse;
}

.bp-cat {
    display: inline-flex;
    align-items: center;
    padding: 5px 13px;
    border-radius: 999px;
    background: var(--bp-cat-bg);
    color: var(--bp-cat-fg);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.bp-date {
    font-size: 12.5px;
    color: var(--bp-muted);
    white-space: nowrap;
}

/* ── READ BUTTON ────────────────────────────────────── */
.bp-read-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--bp-blue);
    color: var(--bp-white);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    border-radius: var(--bp-radius-xs);
    transition: background .2s var(--bp-ease-plain), transform .2s var(--bp-ease-plain), gap .2s;
    align-self: flex-start;
    letter-spacing: .01em;
}

    .bp-read-btn:hover {
        background: #1d4ed8;
        transform: translateY(-1px);
        gap: 12px;
    }

html[dir="rtl"] .bp-read-btn {
    align-self: flex-start;
    flex-direction: row-reverse;
}

/* ── CARD GRID ──────────────────────────────────────── */
.bp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ── REGULAR CARD ───────────────────────────────────── */
.bp-card {
    background: var(--bp-white);
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .25s var(--bp-ease-plain), box-shadow .25s var(--bp-ease-plain);
}

    .bp-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 20px 50px rgba(15,23,42,.09);
    }

.bp-card-img-wrap {
    display: block;
    height: 220px;
    overflow: hidden;
    background: #e2e8f0;
    flex-shrink: 0;
}

.bp-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s var(--bp-ease-plain);
}

.bp-card:hover .bp-card-img {
    transform: scale(1.05);
}

.bp-card-body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

html[dir="rtl"] .bp-card-body {
    text-align: right;
}

.bp-card-title {
    font-size: 19px;
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: -.025em;
    margin: 0 0 12px;
}

    .bp-card-title a {
        color: var(--bp-text);
        text-decoration: none;
        transition: color .2s;
    }

        .bp-card-title a:hover {
            color: var(--bp-blue);
        }

.bp-card-excerpt {
    font-size: 14px;
    color: var(--bp-text-2);
    line-height: 1.8;
    margin: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bp-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 22px;
    color: var(--bp-blue);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 700;
    transition: gap .2s var(--bp-ease-plain), color .2s;
    letter-spacing: .01em;
}

    .bp-card-link:hover {
        gap: 10px;
        color: #1d4ed8;
    }

html[dir="rtl"] .bp-card-link {
    flex-direction: row-reverse;
}

/* ── EMPTY STATE ────────────────────────────────────── */
.bp-empty {
    text-align: center;
    padding: 120px 24px;
}

.bp-empty-icon {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.bp-empty p {
    font-size: 16px;
    color: var(--bp-muted);
}

/* ── PAGINATION ─────────────────────────────────────── */
.bp-pagination {
    background: var(--bp-off);
    padding: 0 24px 80px;
}

.bp-pagination-inner {
    width: min(1280px, 92%);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.bp-page-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 22px;
    border: 1.5px solid var(--bp-border);
    border-radius: var(--bp-radius-xs);
    font-size: 13.5px;
    font-weight: 700;
    color: var(--bp-text);
    text-decoration: none;
    background: var(--bp-white);
    transition: border-color .2s, background .2s, color .2s;
}

    .bp-page-btn:hover {
        border-color: var(--bp-blue);
        background: var(--bp-blue);
        color: var(--bp-white);
    }

.bp-page-numbers {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bp-page-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--bp-radius-xs);
    border: 1.5px solid var(--bp-border);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--bp-muted);
    text-decoration: none;
    background: var(--bp-white);
    transition: all .2s;
}

    .bp-page-num:hover {
        border-color: var(--bp-blue);
        color: var(--bp-blue);
    }

    .bp-page-num.active {
        background: var(--bp-blue);
        border-color: var(--bp-blue);
        color: var(--bp-white);
        font-weight: 800;
    }

/* ── CTA BANNER ─────────────────────────────────────── */
.bp-cta {
    background: var(--bp-navy);
    padding: 100px 24px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

    .bp-cta::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(ellipse 70% 80% at 50% 50%, rgba(37,99,235,.2) 0%, transparent 70%);
        pointer-events: none;
    }

.bp-cta-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.bp-cta-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #60a5fa;
    margin: 0;
}

.bp-cta-title {
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 900;
    letter-spacing: -.04em;
    color: var(--bp-white);
    margin: 0 0 8px;
    line-height: 1.1;
}

.bp-cta .btn-primary {
    margin-top: 8px;
    padding: 16px 38px;
    font-size: 15px;
}

/* ── RTL GLOBAL ADJUSTMENTS ─────────────────────────── */
html[dir="rtl"] .bp-featured-body {
    text-align: right;
}

html[dir="rtl"] .bp-featured-title {
    letter-spacing: 0;
}

html[dir="rtl"] .bp-hero-title {
    letter-spacing: -.02em;
}

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 1100px) {
    .bp-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 860px) {
    .bp-featured {
        grid-template-columns: 1fr;
    }

    .bp-featured-img-wrap {
        min-height: 280px;
        max-height: 320px;
    }

    html[dir="rtl"] .bp-featured-img-wrap {
        order: unset;
    }

    html[dir="rtl"] .bp-featured-body {
        order: unset;
    }

    .bp-featured-body {
        padding: 36px 32px;
    }
}

@media (max-width: 640px) {
    .bp-hero {
        padding: 110px 20px 80px;
    }

    .bp-hero-title {
        font-size: 36px;
    }

    .bp-grid {
        grid-template-columns: 1fr;
    }

    .bp-featured-body {
        padding: 28px 24px;
    }

    .bp-section {
        padding: 56px 20px 72px;
    }

    .bp-hero-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    html[dir="rtl"] .bp-hero-stats {
        align-items: flex-end;
    }

    .bp-stat-div {
        display: none;
    }

    .bp-card-body {
        padding: 22px;
    }
}

@media (max-width: 400px) {
    .bp-hero-title {
        font-size: 30px;
    }

    .bp-hero-sub {
        font-size: 14px;
    }
}
