/* ==========================================================================
   BLOG & ARTICLES STYLESHEET - FUTURISTIC YELLOW & BLUE
   ========================================================================== */

.blog-hero {
    background: linear-gradient(135deg, rgba(7,10,18,0.85) 0%, rgba(19,28,49,0.8) 100%), url('../img/futuristic_domotics_bg.jpg') center/cover no-repeat fixed;
    color: white;
    padding: 150px 24px 70px 24px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.blog-hero h1 {
    color: white;
    font-size: 2.9rem;
    margin-bottom: 16px;
}

.blog-hero p {
    color: #cbd5e1;
    font-size: 1.2rem;
    max-width: 650px;
    margin: 0 auto;
}

/* Featured Article Banner */
.featured-article {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    margin-bottom: 50px;
    transition: var(--transition);
}

.featured-article:hover {
    border-color: var(--primary);
    box-shadow: 0 0 25px rgba(250, 204, 21, 0.25);
}

.featured-img {
    height: 100%;
    min-height: 340px;
    object-fit: cover;
    width: 100%;
}

.featured-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--accent-light);
    color: var(--accent-glow);
    border: 1px solid rgba(56, 189, 248, 0.3);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 20px;
    margin-bottom: 16px;
    width: fit-content;
}

.article-badge.edilizia {
    background: var(--primary-light);
    color: var(--primary);
    border-color: rgba(250, 204, 21, 0.3);
}

.article-meta {
    display: flex;
    gap: 16px;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.featured-content h2 {
    font-size: 1.8rem;
    margin-bottom: 16px;
    color: white;
}

.featured-content p {
    color: var(--text-muted);
    margin-bottom: 24px;
    font-size: 1.05rem;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.article-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.article-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 0 25px rgba(250, 204, 21, 0.3);
}

.article-thumb {
    height: 200px;
    width: 100%;
    object-fit: cover;
}

.article-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    line-height: 1.3;
    color: white;
}

.article-snippet {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.read-more-btn {
    color: var(--primary);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    transition: var(--transition);
}

.read-more-btn:hover {
    color: var(--primary-hover);
    gap: 10px;
    text-shadow: 0 0 10px rgba(250, 204, 21, 0.4);
}

/* Article Reader Modal */
.article-modal {
    position: fixed;
    inset: 0;
    z-index: 2100;
    background: rgba(7, 10, 18, 0.9);
    backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.article-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.article-modal-content {
    background: #111827;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    position: relative;
    box-shadow: 0 0 35px rgba(2, 132, 199, 0.3);
    color: #e2e8f0;
}

.article-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--primary);
    color: var(--secondary);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow-primary);
}

.article-modal-close:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

.article-full-body {
    margin-top: 24px;
    line-height: 1.8;
    color: #cbd5e1;
}

.article-full-body h3 {
    margin: 24px 0 12px 0;
    font-size: 1.4rem;
    color: var(--primary);
}

.article-full-body p {
    margin-bottom: 16px;
}

.article-full-body ul {
    margin: 16px 0 20px 24px;
}

.article-full-body li {
    margin-bottom: 8px;
}

@media (max-width: 992px) {
    .featured-article {
        grid-template-columns: 1fr;
    }
    .featured-img {
        height: 250px;
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 110px 16px 50px 16px;
        background-attachment: scroll;
    }
    .blog-hero h1 {
        font-size: 2rem;
    }
    .articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }

    .featured-content {
        padding: 24px 16px;
    }

    .featured-content h2 {
        font-size: 1.4rem;
    }

    .article-modal-content {
        padding: 20px 16px;
    }

    .article-modal-close {
        top: 12px;
        right: 12px;
    }
}
