/* ArabicDiscord Blogs & Article Details Premium Styles */

:root {
    --primary-blue: #4156BD;
    --accent-blue: #6679D8;
    --hover-blue: #2F49FF;
    --dark-bg: #050816;
    --panel-bg: rgba(255, 255, 255, 0.03);
    --panel-border: rgba(255, 255, 255, 0.08);
    --panel-border-hover: rgba(102, 121, 216, 0.3);
    --glass-blur: 16px;
}

body {
    background-color: var(--dark-bg);
    color: #F5F7FF;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Glassmorphism Panel Standard */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--panel-border);
    border-radius: 1.25rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover {
    border-color: var(--panel-border-hover);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 25px rgba(47, 73, 255, 0.06);
}

/* Hero Section Background */
.blogs-hero {
    position: relative;
    padding-top: calc(7rem - 75px);
    padding-bottom: 4.5rem;
    overflow: hidden;
}

/* ============================================================
   PREMIUM HERO-TO-CONTENT TRANSITION
   Multi-layered fade with gradient and blur
   ============================================================ */

.hero-transition-zone {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 180px;
    z-index: 15;
    pointer-events: none;
    overflow: visible;
}

/* Layer 1 – tall multi-stop gradient dissolve */
.hero-transition-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(5, 8, 22, 0.05) 15%,
        rgba(5, 8, 22, 0.18) 30%,
        rgba(5, 8, 22, 0.42) 50%,
        rgba(5, 8, 22, 0.72) 70%,
        rgba(5, 8, 22, 0.92) 85%,
        #050816 100%
    );
}

/* Layer 2 – blurred glow band softening the hard edge */
.hero-transition-glow {
    position: absolute;
    bottom: -20px;
    left: -5%;
    right: -5%;
    height: 80px;
    background: linear-gradient(to bottom, rgba(5, 8, 22, 0) 0%, rgba(5, 8, 22, 0.6) 50%, #050816 100%);
    filter: blur(12px);
}

.blogs-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.blogs-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(5, 8, 22, 0.45) 0%, rgba(5, 8, 22, 0.85) 70%, var(--dark-bg) 100%);
    z-index: 1;
}

/* Reduced Opacity Background for Article Reader to ensure comfortable readability */
.article-reader-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(5, 8, 22, 0.65) 0%, rgba(5, 8, 22, 0.92) 60%, var(--dark-bg) 100%);
    z-index: 1;
}

/* Blog Listing Grid & Cards */
.blog-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    height: 100%;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 1.25rem;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    border-color: rgba(102, 121, 216, 0.4);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(65, 86, 189, 0.12);
}

.blog-card-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.05);
}

.blog-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-img {
    transform: scale(1.05);
}

.blog-badge-featured {
    position: absolute;
    top: 1rem;
    inset-inline-start: 1rem;
    background: rgba(65, 86, 189, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #FFFFFF;
    font-size: 0.725rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    z-index: 5;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.blog-badge-category {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--accent-blue);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.2rem 0.65rem;
    border-radius: 0.5rem;
    display: inline-block;
}

/* Category Filter Pills */
.category-pill {
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #9BA3C7;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.category-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.2);
}

.category-pill.active {
    background: #4156BD;
    color: #FFFFFF;
    border-color: #6679D8;
    box-shadow: 0 4px 16px rgba(65, 86, 189, 0.35);
}

/* Article Reader Content Prose */
.article-prose {
    font-size: 1.05rem;
    line-height: 1.9;
    color: #E2E8F0;
}

.article-prose p {
    margin-bottom: 1.5rem;
}

.article-prose h1,
.article-prose h2,
.article-prose h3,
.article-prose h4 {
    color: #FFFFFF;
    font-weight: 700;
    margin-top: 2.25rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.article-prose h1 { font-size: 2rem; }
.article-prose h2 { font-size: 1.6rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding-bottom: 0.5rem; }
.article-prose h3 { font-size: 1.3rem; }
.article-prose h4 { font-size: 1.1rem; }

.article-prose blockquote {
    border-inline-start: 4px solid var(--accent-blue);
    background: rgba(65, 86, 189, 0.08);
    padding: 1.25rem 1.5rem;
    border-radius: 0.75rem;
    margin: 1.75rem 0;
    font-style: italic;
    color: #CBD5E1;
}

.article-prose ul,
.article-prose ol {
    margin: 1.25rem 0;
    padding-inline-start: 1.75rem;
}

.article-prose ul { list-style-type: disc; }
.article-prose ol { list-style-type: decimal; }

.article-prose li {
    margin-bottom: 0.5rem;
}

.article-prose code {
    background: rgba(255, 255, 255, 0.08);
    color: #93C5FD;
    padding: 0.2rem 0.4rem;
    border-radius: 0.375rem;
    font-size: 0.9em;
    font-family: monospace;
}

.article-prose pre {
    background: #0D1117;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 1.25rem;
    overflow-x: auto;
    margin: 1.75rem 0;
}

.article-prose pre code {
    background: transparent;
    padding: 0;
    color: #E2E8F0;
}

.article-prose a {
    color: var(--accent-blue);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.article-prose a:hover {
    color: #93C5FD;
}

.article-prose img {
    border-radius: 1rem;
    margin: 2rem 0;
    width: 100%;
    height: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Image Gallery Modal / Grid */
.gallery-thumbnail {
    aspect-ratio: 16 / 9;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.gallery-thumbnail:hover {
    transform: scale(1.03);
    border-color: var(--accent-blue);
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Source Box Styling */
.source-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    transition: border-color 0.3s ease;
}

.source-box:hover {
    border-color: rgba(102, 121, 216, 0.3);
}

/* Custom 404 Container */
.error-page-container {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1.5rem;
    position: relative;
}

.error-card {
    max-width: 520px;
    width: 100%;
    text-align: center;
    padding: 3.5rem 2.5rem;
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
}

.error-404-number {
    font-size: 5.5rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, #FFFFFF 0%, #6679D8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.error-btn {
    padding: 0.75rem 1.75rem;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.error-btn-primary {
    background: #4156BD;
    color: #FFFFFF;
}

.error-btn-primary:hover {
    background: #2F49FF;
    transform: scale(1.03);
}

.error-btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
}

.error-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: scale(1.03);
}
