/* ===== BLOG SPECIFIC STYLES ===== */
/* Extends main.css with blog-specific components */

/* Blog Index Page */
.blog-header {
    padding: 220px 0 60px;
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(20, 20, 20, 0.95) 100%);
    position: relative;
    overflow: hidden;
    height: 80vh;
}

/* Hero Background Image */
.blog-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../../images/blog/lunexsova-blog.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.3;
    z-index: 0;
}

.blog-header .container {
    position: relative;
    z-index: 1;
}

.blog-header .section-title {
    margin-bottom: 15px;
    color: var(--gold);
}

.blog-header .section-subtitle {
    color: var(--gold);
    margin-bottom: 20px;
}

.blog-header .blog-description {
    max-width: 600px;
    margin: 0 auto;
    color: var(--text-light);
    line-height: 1.6;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.blog-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

.blog-card:hover {
    transform: translateY(-8px);
    border-color: var(--gold);
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.2);
}

.blog-card-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.blog-card-content {
    padding: 30px;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.blog-card-date,
.blog-card-readtime {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;

}

.blog-card-category {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.blog-card-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--gold);
    line-height: 1.3;
}

.blog-card-excerpt {
    color: white;
    line-height: 1.6;
    margin-bottom: 20px;
}

.blog-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gold);
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.3s ease;
}

.blog-read-more:hover {
    gap: 12px;
}

/* Article Hero Section */
.article-hero {
    height: 80vh;
    min-height: 500px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(20, 20, 20, 0.95) 100%);
    display: flex;
    align-items: center;
    padding-top: 100px;
    /* Offset for fixed header */
    text-align: center;
}

/* Article Hero Background - Each page has its own style tag */
.article-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.4;
    z-index: 0;
}

.article-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    z-index: 1;
}

.article-hero .container {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease;
}

.article-meta-top {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.article-meta-top .article-category {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.article-meta-top .article-date {
    color: var(--text-light);
    font-size: 0.9rem;
}

.article-hero .article-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 30px;
    color: var(--color-white);
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.article-author {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    color: var(--gold);
    font-weight: 600;
    font-size: 1rem;
}

.article-author .read-time {
    color: var(--text-light);
    font-weight: 400;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-author .read-time::before {
    content: '•';
    color: var(--gold);
    margin-right: 4px;
}

/* Blog Article Page */
.blog-article {
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px 20px 80px;
}

.article-header {
    display: none;
    /* Hide old header structure if still present */
}

/* Article Content */
.article-content {
    line-height: 1.8;
    color: var(--text-light);
    font-size: 1.1rem;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: var(--gold);
    margin: 40px 0 20px;
}

.article-content h2 {
    font-size: 2rem;
}

.article-content h3 {
    font-size: 1.5rem;
}

.article-content p {
    margin-bottom: 25px;
}

.article-content a {
    color: var(--gold);
    text-decoration: underline;
    transition: opacity 0.3s ease;
}

.article-content a:hover {
    opacity: 0.8;
}

.article-content ul,
.article-content ol {
    margin: 25px 0;
    padding-left: 30px;
}

.article-content li {
    margin-bottom: 12px;
}

.article-content blockquote {
    margin: 30px 0;
    padding: 20px 30px;
    border-left: 4px solid var(--gold);
    background: rgba(212, 175, 55, 0.05);
    font-style: italic;
    color: var(--text-white);
}

.article-content code {
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
}

.article-content pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 30px 0;
}

.article-content pre code {
    background: none;
    padding: 0;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 30px 0;
}

/* Article Footer */
.article-footer {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.article-share {
    text-align: center;
    margin-bottom: 60px;
}

.article-share h3 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: var(--gold);
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-white);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
}

.share-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--gold);
    transform: translateY(-2px);
}

.share-btn svg {
    width: 20px;
    height: 20px;
}

/* Related Posts */
.related-posts {
    margin-top: 80px;
}

.related-posts h3 {
    font-size: 1.8rem;
    margin-bottom: 40px;
    text-align: center;
    color: var(--gold);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* Back to Blog Link */
.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 40px;
    transition: gap 0.3s ease;
}

.back-to-blog:hover {
    gap: 15px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .article-hero {
        height: 60vh;
        min-height: 450px;
        padding-top: 90px;
    }

    .article-title {
        font-size: 3rem;
    }
}

@media (max-width: 992px) {
    .article-hero {
        height: 55vh;
        min-height: 400px;
    }

    .article-hero .article-title {
        font-size: 2.8rem;
    }

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

@media (max-width: 770px) {
  
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

 

    .article-hero .article-title {
        font-size: 2.2rem;
        padding: 0 15px;
    }

    .article-meta-top {
        flex-direction: row;
        /* Keep meta in one line if possible, or wrap nicely */
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 20px;
    }

    .article-author {
        flex-direction: column;
        gap: 8px;
    }

    .article-author .read-time::before {
        display: none;
    }

    .article-meta {
        gap: 15px;
    }

    .article-content {
        font-size: 1.05rem;
        padding: 0 10px;
    }

    .article-content h2 {
        font-size: 1.8rem;
    }

    .article-content h3 {
        font-size: 1.5rem;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }

    .share-buttons {
        flex-direction: row;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .blog-header .section-title {
        font-size: 1.8rem;
    }

    .article-hero {
        padding: 120px 0 50px;
        height: 60vh;

    }

    .article-hero .article-title {
        font-size: 2rem;
        line-height: 1.2;
    }

    .article-meta-top .article-category {
        font-size: 0.75rem;
        padding: 4px 12px;
    }

    .article-author {
        font-size: 0.9rem;
    }

    .blog-article {
        padding: 40px 15px 60px;
    }

}

@media (max-width: 320px) {


    .article-hero .article-title {
        font-size: 1.7rem;
    }

    .article-meta-top {
        flex-direction: column;
    }
}

/* Table Styles */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin: 30px 0;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.02);
    min-width: 600px;
}

.article-content th,
.article-content td {
    padding: 18px 25px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.article-content th {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.article-content tr:last-child td {
    border-bottom: none;
}

.article-content tr:hover {
    background: rgba(212, 175, 55, 0.05);
    transition: background 0.3s ease;
}

/* RTL Support for Arabic */
.rtl .blog-card-meta,
.rtl .article-meta,
.rtl .share-buttons {
    direction: rtl;
}

.rtl .article-content blockquote {
    border-left: none;
    border-right: 4px solid var(--gold);
}

.rtl .article-content ul,
.rtl .article-content ol {
    padding-left: 0;
    padding-right: 30px;
}

/* RTL Support for Tables */
.rtl .article-content th,
.rtl .article-content td {
    text-align: right;
}