/* Articles Page Styles */

:root {
    --primary: #2563eb;
    --primary-2: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --bg-gray: #f8fafc;
}

/* Articles Hero Section */
/* Articles Hero Section */
/* Articles Hero Section */
.articles-hero {
    background: var(--bg-gray);
    padding: 60px 20px 40px;
    text-align: center;
    color: var(--text-primary);
    position: relative;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border);
}

.articles-hero .hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.articles-hero h1 {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-primary);
}

.articles-hero h1 i {
    font-size: 32px;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.articles-hero p {
    font-size: 16px;
    margin: 0 0 32px 0;
    color: var(--text-secondary);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Search Bar in Hero */
.hero-search {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

.hero-search input {
    width: 100%;
    padding: 14px 50px 14px 20px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Cairo', sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    background: white;
    color: var(--text-primary);
}

.hero-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

.hero-search button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 14px;
}

.hero-search button:hover {
    background: var(--primary-2);
    transform: translateY(-50%);
}

/* Main Container */
.articles-container {
    max-width: 1400px;
    margin: 0 auto 80px;
    padding: 0 20px;
}

/* Featured Articles Section */
.featured-articles {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.section-header i {
    font-size: 32px;
    color: var(--primary);
}

.section-header h2 {
    font-size: 32px;
    font-weight: 900;
    color: var(--text-primary);
    margin: 0;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Article Card */
.article-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.article-image {
    width: 100%;
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.article-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.article-card:hover .article-image::before {
    opacity: 1;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.1);
}

.article-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

.article-meta i {
    color: var(--primary);
}

.article-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-excerpt {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 20px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 2px solid var(--border);
}

.article-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 14px;
}

.author-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.btn-read-more {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-read-more:hover {
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Articles Grid Section */
.articles-main {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    margin-bottom: 60px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

/* Sidebar */
.articles-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    background: white;
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.widget-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-title i {
    color: var(--primary);
}

.recent-article-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    transition: all 0.3s ease;
}

.recent-article-item:last-child {
    border-bottom: none;
}

.recent-article-item:hover {
    transform: translateX(-4px);
}

.recent-article-thumb {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.recent-article-info {
    flex: 1;
}

.recent-article-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-article-date {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Pagination */
.articles-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 40px;
}

.pagination-btn {
    padding: 12px 20px;
    border: 2px solid var(--border);
    background: white;
    color: var(--text-primary);
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.pagination-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.pagination-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
    color: white;
    border-color: transparent;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.empty-state-icon {
    width: 120px;
    height: 120px;
    background: var(--bg-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 48px;
    color: var(--text-secondary);
}

.empty-state h3 {
    font-size: 28px;
    font-weight: 900;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 16px;
    margin: 0 0 32px 0;
}

/* Single Article Page */
/* Article Detail Layout */
.article-detail-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    margin-bottom: 60px;
}

.article-single {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.article-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.article-single-header {
    position: relative;
    height: 450px;
    background-size: cover;
    background-position: center;
}

.article-single-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
}

.article-single-header-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    color: white;
    z-index: 1;
}

.article-single-title {
    font-size: 42px;
    font-weight: 900;
    margin: 0 0 16px 0;
    line-height: 1.3;
}

.article-single-meta {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 15px;
}

.article-single-meta i {
    margin-left: 6px;
}

.article-single-body {
    padding: 50px;
}

.article-single-content {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-primary);
}

.article-single-content p {
    margin: 0 0 24px 0;
}

.article-single-content h2,
.article-single-content h3 {
    font-weight: 800;
    margin: 40px 0 20px 0;
    color: var(--text-primary);
}

.article-single-content h2 {
    font-size: 32px;
}

.article-single-content h3 {
    font-size: 24px;
}

.article-single-content ul,
.article-single-content ol {
    margin: 0 0 24px 0;
    padding-right: 24px;
}

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

/* Related Articles */
.related-articles {
    max-width: 1400px;
    margin: 0 auto 80px;
    padding: 0 20px;
}

.related-articles h2 {
    font-size: 32px;
    font-weight: 900;
    color: var(--text-primary);
    margin: 0 0 32px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.related-articles h2 i {
    color: var(--primary);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .articles-main {
        grid-template-columns: 1fr;
    }

    .articles-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .articles-hero h1 {
        font-size: 32px;
    }

    .articles-hero p {
        font-size: 16px;
    }

    .featured-grid,
    .articles-grid {
        grid-template-columns: 1fr;
    }

    .article-detail-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .article-sidebar {
        position: static;
    }

    .article-single-header {
        height: 300px;
    }

    .article-single-title {
        font-size: 28px;
    }

    .article-single-body {
        padding: 30px 20px;
    }

    .article-single-content {
        font-size: 16px;
    }

    .related-articles h2 {
        font-size: 24px;
    }
}

/* Loading Animation */
.article-skeleton {
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

/* Popular Topics Widget */
.popular-topics-widget .topics-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.topic-tag {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-gray);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.topic-tag:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
    color: white;
    transform: translateX(-4px);
    border-color: var(--primary);
}

.topic-tag i {
    color: var(--primary);
    font-size: 12px;
    transition: all 0.3s ease;
}

.topic-tag:hover i {
    color: white;
}

.topic-count {
    margin-right: auto;
    background: white;
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.topic-tag:hover .topic-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Newsletter Widget */
.newsletter-widget {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.newsletter-widget::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.newsletter-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 24px;
    position: relative;
    z-index: 1;
}

.newsletter-widget .widget-title {
    color: white;
    position: relative;
    z-index: 1;
}

.newsletter-widget .widget-title i {
    color: white;
}

.newsletter-desc {
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 20px 0;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.newsletter-form input {
    padding: 14px 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transition: all 0.3s ease;
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-form input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.25);
    border-color: white;
}

.newsletter-form button {
    padding: 14px 20px;
    background: white;
    color: var(--primary);
    border: none;
    border-radius: 10px;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Social Widget */
.social-widget {
    background: var(--bg-gray);
    border: 2px solid var(--border);
}

.social-links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: white;
    font-weight: 700;
    font-size: 13px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-link:hover::before {
    opacity: 1;
}

.social-link i {
    font-size: 24px;
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.social-link:hover i {
    transform: scale(1.2);
}

.social-link.facebook {
    background: #1877f2;
}

.social-link.twitter {
    background: #1da1f2;
}

.social-link.instagram {
    background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
}

.social-link.youtube {
    background: #ff0000;
}

/* Enhanced Empty State */
.empty-state {
    position: relative;
    overflow: hidden;
}

.empty-state::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
    animation: pulse-empty 3s ease-in-out infinite;
}

@keyframes pulse-empty {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.empty-state-icon {
    position: relative;
    z-index: 1;
    animation: float-icon 3s ease-in-out infinite;
}

@keyframes float-icon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .social-links-grid {
        grid-template-columns: 1fr;
    }

    .newsletter-widget {
        padding: 24px 20px;
    }

    .topic-tag {
        font-size: 13px;
        padding: 10px 14px;
    }
}

/* No Articles Widget */
.no-articles-widget {
    background: white;
    border-radius: 24px;
    padding: 80px 40px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.no-articles-widget::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
    animation: pulse-widget 3s ease-in-out infinite;
}

@keyframes pulse-widget {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.8;
    }
}

.no-articles-icon {
    width: 140px;
    height: 140px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 32px;
    font-size: 64px;
    color: white;
    position: relative;
    z-index: 1;
    animation: float-widget-icon 3s ease-in-out infinite;
    box-shadow: 0 10px 40px rgba(37, 99, 235, 0.3);
}

@keyframes float-widget-icon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.no-articles-widget h2 {
    font-size: 36px;
    font-weight: 900;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    position: relative;
    z-index: 1;
}

.no-articles-widget p {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 40px 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.no-articles-actions {
    position: relative;
    z-index: 1;
}

.btn-home {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
    color: white;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-home:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
}

.btn-home i {
    font-size: 18px;
}

/* Responsive for No Articles Widget */
@media (max-width: 768px) {
    .no-articles-widget {
        padding: 60px 30px;
    }

    .no-articles-icon {
        width: 100px;
        height: 100px;
        font-size: 48px;
    }

    .no-articles-widget h2 {
        font-size: 28px;
    }

    .no-articles-widget p {
        font-size: 16px;
    }
}