/* ═══════════════════════════════════════════════════════════
   SKYRISE BLOG / NEWS STYLES
   ═══════════════════════════════════════════════════════════ */

/* ─── Blog Hero ──────────────────────────────────────────── */
.blog-hero {
    position: relative;
    background: linear-gradient(180deg, #F4F8FB 0%, #FFFFFF 100%);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}
.blog-hero .display-4 {
    letter-spacing: -0.02em;
}

.blog-search {
    max-width: 560px;
}
.blog-search .input-group-text {
    border-radius: 99px 0 0 99px;
    padding-left: 1.25rem;
}
.blog-search .form-control {
    border-radius: 0;
}
.blog-search .btn {
    border-radius: 0 99px 99px 0;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* ─── Blog Cards ─────────────────────────────────────────── */
.blog-card {
    background: #FFFFFF;
    border-radius: var(--card-radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s ease;
    height: 100%;
    box-shadow: var(--shadow-sm);
}
.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(0, 124, 145, 0.25);
}
.blog-card--accent-top {
    border-top: 3px solid var(--accent);
}
.blog-card a {
    color: inherit;
    display: block;
    height: 100%;
}
.blog-card a:hover {
    color: inherit;
}

.card-image {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    overflow: hidden;
    background: var(--bg-secondary);
}
.card-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s var(--ease-out);
}
.blog-card:hover .card-image img {
    transform: scale(1.04);
}
.card-image-placeholder {
    position: absolute;
    inset: 0;
}

.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 0.35rem 0.75rem;
    border-radius: 99px;
    color: #fff;
    z-index: 2;
}

.blog-card-featured .card-image {
    padding-top: 42%; /* wider aspect */
}
.blog-card-featured h2 {
    font-size: 1.5rem;
    line-height: 1.25;
}

/* ─── Author avatar ──────────────────────────────────────── */
.author-avatar-sm {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-secondary);
}

/* ─── Sidebar ────────────────────────────────────────────── */
.blog-sidebar {
    position: sticky;
    top: 100px;
}
.sidebar-widget {
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.sidebar-widget--highlight {
    border-color: rgba(0, 124, 145, 0.2);
    background: #FFFFFF;
}
.sidebar-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
    color: var(--text);
}
.sidebar-widget .list-group-item {
    border: none;
    padding-left: 0;
    padding-right: 0;
    font-size: 0.9rem;
}
.sidebar-widget .list-group-item.active {
    background: transparent;
    color: var(--accent);
    font-weight: 600;
}
.sidebar-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}
.sidebar-newsletter .form-control {
    border-radius: 99px 0 0 99px;
    background: #FFFFFF;
    border-color: var(--border);
}
.sidebar-newsletter .btn {
    border-radius: 0 99px 99px 0;
}

/* Empty state illustration replacement */
.blog-empty-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    color: var(--text-muted);
    opacity: 0.6;
}

/* ─── Single Post ────────────────────────────────────────── */
.blog-post-hero {
    width: 100%;
    height: 50vh;
    min-height: 320px;
    max-height: 520px;
    position: relative;
    overflow: hidden;
}
.blog-post-hero-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}
.blog-post-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0.1) 0%, rgba(244,248,251,0.35) 100%);
}

.blog-article-body {
    max-width: 680px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text);
}
.blog-article-body h2,
.blog-article-body h3,
.blog-article-body h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.blog-article-body p {
    margin-bottom: 1.25rem;
}
.blog-article-body img {
    border-radius: var(--card-radius);
    margin: 1.5rem 0;
}
.blog-article-body ul,
.blog-article-body ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}
.blog-article-body blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 1.25rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-secondary);
}

.blog-share-sticky {
    position: sticky;
    top: 120px;
    text-align: center;
}

/* ─── Utilities ──────────────────────────────────────────── */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.smaller {
    font-size: 0.8rem;
}

/* ─── Pagination ─────────────────────────────────────────── */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 0.25rem;
    color: var(--text);
    border-color: var(--border);
}
.pagination .page-item.active .page-link {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .blog-sidebar {
        position: static;
        margin-top: 2rem;
    }
    .blog-post-hero {
        height: 35vh;
        min-height: 240px;
    }
    .blog-card-featured .card-image {
        padding-top: 56.25%;
    }
}
@media (max-width: 575.98px) {
    .blog-post-hero {
        height: 30vh;
        min-height: 200px;
    }
    .blog-article-body {
        font-size: 1rem;
    }
}

/* Auto-generated placeholder styling */
.card-image-placeholder {
    background: linear-gradient(135deg, var(--accent-mint) 0%, #E0F4F7 50%, var(--bg-secondary) 100%);
}
.card-image-placeholder::before {
    content: '';
    width: 48px;
    height: 48px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E85D4E' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%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.35;
}
