/* Articles-specific styles */

.articles-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('images/Kigali.png') no-repeat center center/cover;
    color: white;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 60px;
}

.articles-hero-content h1 {
    font-size: 3em;
    margin-bottom: 20px;
    color: white;
}

.articles-hero-content p {
    font-size: 1.3em;
    max-width: 600px;
    margin: 0 auto;
}

/* Articles Main Section */
.articles-main {
    padding: 60px 20px;
    background: #f5f5f5;
    min-height: 60vh;
}

.articles-container {
    max-width: 1200px;
    margin: 0 auto;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

/* Loading Placeholder */
.loading-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.loading-placeholder i {
    font-size: 3em;
    margin-bottom: 20px;
    color: #ff4500;
}

.loading-placeholder p {
    font-size: 1.2em;
}

/* Article Card */
.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.article-preview {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
    background: #f0f0f0;
}

.article-preview iframe {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
    transform: scale(1);
}

.article-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.article-card:hover .article-preview-overlay {
    background: rgba(0, 0, 0, 0.4);
}

.article-preview-overlay i {
    font-size: 3em;
    color: white;
    opacity: 0;
    transition: all 0.3s ease;
    transform: scale(0.5);
}

.article-card:hover .article-preview-overlay i {
    opacity: 1;
    transform: scale(1);
}

.article-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-source {
    display: inline-block;
    padding: 5px 12px;
    background: #ff4500;
    color: white;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: bold;
    margin-bottom: 15px;
    align-self: flex-start;
}

.article-source.facebook {
    background: #1877f2;
}

.article-source.focusonafrica {
    background: #2d9b37;
}

.article-title {
    font-size: 1.4em;
    margin-bottom: 15px;
    color: #333;
    line-height: 1.4;
    flex-grow: 1;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.article-date {
    color: #666;
    font-size: 0.9em;
}

.article-read-more {
    color: #ff4500;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.article-card:hover .article-read-more {
    gap: 10px;
}

/* Article Modal */
.article-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    overflow: auto;
    padding: 20px;
}

.article-modal-container {
    max-width: 1200px;
    margin: 40px auto;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    animation: modalSlideIn 0.4s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.article-modal-close:hover {
    background: #ff4500;
    transform: rotate(90deg);
}

.article-modal-content {
    width: 100%;
    height: 70vh;
    min-height: 500px;
}

.article-modal-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.article-modal-footer {
    padding: 20px;
    background: #f8f9fa;
    text-align: center;
}

.external-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    background: #ff4500;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.external-link-btn:hover {
    background: #e03e00;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 69, 0, 0.3);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #ff4500;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

.back-to-top:hover {
    background: #e03e00;
    transform: translateY(-5px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .articles-hero-content h1 {
        font-size: 2em;
    }

    .articles-hero-content p {
        font-size: 1.1em;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .article-modal {
        padding: 10px;
    }

    .article-modal-container {
        margin: 20px auto;
    }

    .article-modal-content {
        height: 60vh;
        min-height: 400px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}
