/* blog.css - Styles dédiés pour la page Blog & News */

/* Main Layout */
.blog-main {
    padding-top: 120px;
    min-height: 80vh;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.blog-hero {
    text-align: center;
    margin-bottom: 50px;
    padding: 0 20px;
}

.blog-hero .hero__title {
    font-size: 3.5rem;
    margin-bottom: 10px;
}

.blog-hero .hero__subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Container & Grid */
.blog-container {
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
    margin-bottom: 80px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* Individual Blog Card */
.blog-card {
    display: flex;
    flex-direction: column;
    background: rgba(20, 25, 45, 0.7);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    text-align: left;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(106, 0, 255, 0.4);
}

.blog-card__image-wrapper {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
    background: rgba(0, 0, 0, 0.3);
}

.blog-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card__image {
    transform: scale(1.05);
}

.blog-card__content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card__date {
    font-size: 0.85rem;
    color: var(--accent-violet);
    margin-bottom: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.blog-card__title {
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 15px;
    line-height: 1.3;
    /* Use standard font for blog titles to ensure all numbers/chars render correctly */
    font-family: var(--font-family);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.blog-card__excerpt {
    font-size: 0.95rem;
    color: #ccc;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
    font-family: var(--font-family);
}

.blog-card__read-more {
    color: var(--accent-blue);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
}

.blog-card:hover .blog-card__read-more {
    color: #fff;
}

/* Article Modal (Popup) */
.blog-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 10, 0.85);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.blog-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.blog-modal-content {
    background: rgba(15, 20, 35, 0.95);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.blog-modal-overlay.active .blog-modal-content {
    transform: translateY(0) scale(1);
}

.blog-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.2s, transform 0.2s;
    z-index: 10;
}

.blog-modal-close:hover {
    background: rgba(255, 50, 50, 0.3);
    transform: rotate(90deg);
}

.article-modal-scroll {
    overflow-y: auto;
    padding: 40px;
}

/* Article Styling inside Modal */
.article-header {
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
}

.article-title {
    font-size: 2.2rem;
    color: #fff;
    margin-bottom: 10px;
    font-family: var(--font-display);
    letter-spacing: 0.5px;
}

.article-date {
    color: var(--accent-violet);
    font-size: 0.9rem;
    font-weight: 600;
}

.article-body {
    font-size: 1.05rem;
    color: #ddd;
    line-height: 1.7;
}

.article-body p {
    margin-bottom: 20px;
}

.article-body strong {
    color: #fff;
}

/* INLINE IMAGES INSIDE THE ARTICLE */
.blog-inline-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 30px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-hero .hero__title {
        font-size: 2.5rem;
    }

    .article-modal-scroll {
        padding: 25px;
    }

    .article-title {
        font-size: 1.8rem;
    }
}