/* Blog module — inherits Tajawal/Roboto from general_style.css */

.blog-page { padding-bottom: 4rem; }

.blog-hero {
    position: relative;
    min-height: 280px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #0074c1 0%, #00a8ff 50%, #0f172a 100%);
    margin-bottom: 0;
    overflow: hidden;
}
.blog-hero--with-image {
    min-height: 360px;
    max-height: 480px;
}
.blog-hero-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.blog-hero--with-image::after {
    display: none;
}
.blog-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 116, 193, 0.72) 0%, rgba(15, 23, 42, 0.65) 100%);
    z-index: 1;
}
.blog-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}
.blog-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: 4rem 1rem;
}
.blog-hero-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
}
.blog-hero-content p {
    font-size: 1.15rem;
    opacity: 0.9;
}

.blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.blog-filter-chip {
    display: inline-block;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    background: rgba(0, 116, 193, 0.08);
    color: #0074c1;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}
.blog-filter-chip:hover,
.blog-filter-chip.active {
    background: #0074c1;
    color: #fff;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}
.blog-grid-sm {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.blog-card {
    border-radius: 20px;
    overflow: hidden;
    background: var(--bs-body-bg, #fff);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    height: 100%;
}
html.dark-theme .blog-card {
    background: #1e1e1e;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}
.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 116, 193, 0.18);
}
.blog-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.blog-card-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}
.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.blog-card:hover .blog-card-image img {
    transform: scale(1.06);
}
.blog-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8f4fc, #cce5f7);
    color: #0074c1;
    font-size: 3rem;
}
.blog-card-category {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 116, 193, 0.92);
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.blog-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.blog-card-date {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}
.blog-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    color: inherit;
}
.blog-card-excerpt {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
    flex: 1;
    margin-bottom: 1rem;
}
.blog-card-read-more {
    color: #0074c1;
    font-weight: 600;
    font-size: 0.9rem;
}

.blog-loader {
    text-align: center;
    padding: 2rem;
}
.blog-empty {
    text-align: center;
    padding: 4rem 1rem;
    color: #64748b;
    grid-column: 1 / -1;
}

/* Single post */
.blog-single-hero {
    position: relative;
    min-height: 360px;
    display: flex;
    align-items: flex-end;
    background: linear-gradient(135deg, #0074c1, #0f172a);
}
.blog-single-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.blog-single-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
}
.blog-single-hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
    padding: 3rem 1rem 2.5rem;
}
.blog-single-category {
    display: inline-block;
    background: #0074c1;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.blog-single-hero-content h1 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 1rem;
    max-width: 800px;
}
.blog-single-hero-content time {
    opacity: 0.85;
    font-size: 0.95rem;
}

.blog-single-content.prose {
    font-size: 1.1rem;
    line-height: 1.85;
    color: inherit;
}
.blog-single-content.prose h2,
.blog-single-content.prose h3 {
    font-weight: 700;
    margin: 2rem 0 1rem;
    color: #0074c1;
}
.blog-single-content.prose p {
    margin-bottom: 1.25rem;
}
.blog-single-content.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5rem 0;
}
.blog-single-content.prose ul,
.blog-single-content.prose ol {
    margin-bottom: 1.25rem;
    padding-right: 1.5rem;
}
.blog-single-content.prose a {
    color: #0074c1;
    text-decoration: underline;
}

.blog-section-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: #0074c1;
    position: relative;
    padding-bottom: 0.5rem;
}
.blog-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 3px;
    background: #0074c1;
    border-radius: 2px;
}

.blog-listing-card {
    display: block;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bs-body-bg, #fff);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
    height: 100%;
}
html.dark-theme .blog-listing-card { background: #1e1e1e; }
.blog-listing-card:hover { transform: translateY(-4px); }
.blog-listing-card img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}
.blog-listing-placeholder {
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8f4fc;
    color: #0074c1;
    font-size: 2rem;
}
.blog-listing-body {
    padding: 1rem;
}
.blog-listing-body h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}
.blog-listing-price {
    font-size: 0.85rem;
    color: #0074c1;
    font-weight: 600;
}

@media (max-width: 576px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    .blog-single-hero {
        min-height: 280px;
    }
}
