/* resources/css/articles.css */

/* ============================================
   VARIABLES
   ============================================ */
:root {
    --primary: #1a2c5e;
    --primary-light: #2a4a8e;
    --primary-dark: #0d1a3a;
    --primary-gradient: linear-gradient(135deg, #1a2c5e 0%, #2a4a8e 100%);
    --secondary: #c9a84c;
    --secondary-light: #e8d5a3;
    --secondary-gradient: linear-gradient(135deg, #c9a84c 0%, #e8d5a3 100%);
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-muted: #8a8aaa;
    --bg-body: #f5f7fc;
    --bg-white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(26, 44, 94, 0.06);
    --shadow-md: 0 4px 20px rgba(26, 44, 94, 0.08);
    --shadow-lg: 0 8px 40px rgba(26, 44, 94, 0.12);
    --shadow-xl: 0 12px 60px rgba(26, 44, 94, 0.16);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   SECTION
   ============================================ */
.articles-section {
    padding: 80px 0 60px;
    background: var(--bg-body);
    min-height: 100vh;
}

/* ============================================
   HEADER
   ============================================ */
.section-header {
    text-align: center;
    margin-bottom: 50px;
    padding: 0 20px;
}

.section-header .section-title {
    font-size: 40px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.section-header .section-title .highlight {
    background: var(--secondary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.section-header .section-title .highlight::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--secondary-gradient);
    border-radius: 4px;
    -webkit-text-fill-color: transparent;
}

.section-header .section-description {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ============================================
   FEATURED ARTICLES
   ============================================ */
.featured-articles {
    margin-bottom: 50px;
    padding: 0 20px;
}

.featured-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.featured-title::before {
    content: '⭐';
    font-size: 28px;
}

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

.featured-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    border: 1px solid rgba(26, 44, 94, 0.05);
}

.featured-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--secondary);
}

.featured-card .featured-image {
    height: 230px;
    overflow: hidden;
    position: relative;
}

.featured-card .featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.featured-card:hover .featured-image img {
    transform: scale(1.08);
}

.featured-card .featured-image .featured-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--secondary-gradient);
    color: #fff;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(201, 168, 76, 0.4);
}

.featured-card .featured-image .category-badge {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(26, 44, 94, 0.9);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.featured-card .featured-content {
    padding: 22px 24px 24px;
}

.featured-card .featured-content h3 {
    font-size: 19px;
    font-weight: 700;
    margin: 8px 0 12px;
    line-height: 1.5;
}

.featured-card .featured-content h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.featured-card .featured-content h3 a:hover {
    color: var(--secondary);
}

.featured-card .featured-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-card .featured-content .article-meta {
    display: flex;
    gap: 18px;
    font-size: 13px;
    color: var(--text-muted);
}

.featured-card .featured-content .article-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ============================================
   FILTERS
   ============================================ */
.articles-filters {
    background: var(--bg-white);
    padding: 20px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 40px;
    margin: 0 20px 40px;
    border: 1px solid rgba(26, 44, 94, 0.05);
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.filter-form .filter-group {
    flex: 1;
    min-width: 170px;
}

.filter-form .filter-group select,
.filter-form .filter-group input {
    width: 100%;
    padding: 11px 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    background: var(--bg-white);
    color: var(--text-primary);
    transition: var(--transition);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234a4a6a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
    padding-left: 42px;
}

.filter-form .filter-group select:focus,
.filter-form .filter-group input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(26, 44, 94, 0.08);
}

.filter-form .filter-group select:hover,
.filter-form .filter-group input:hover {
    border-color: var(--primary-light);
}

.filter-form .search-group {
    display: flex;
    gap: 10px;
    flex: 2;
    min-width: 220px;
}

.filter-form .search-group input {
    padding-right: 16px;
    background-image: none;
}

.filter-form .search-group .btn-search {
    padding: 11px 24px;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.filter-form .search-group .btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(26, 44, 94, 0.3);
}

/* ============================================
   ARTICLES GRID
   ============================================ */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    padding: 0 20px;
}

.article-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(26, 44, 94, 0.04);
    position: relative;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: var(--transition);
}

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

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(26, 44, 94, 0.08);
}

.article-card .article-image {
    height: 200px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #f0f2f5, #e5e8ed);
}

.article-card .article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.article-card .article-image .placeholder-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 56px;
    color: var(--text-muted);
    background: linear-gradient(135deg, #f0f2f5, #e5e8ed);
}

.article-card .article-content {
    padding: 20px 22px 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card .article-content .article-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.article-card .article-content .article-meta-top .category-badge {
    display: inline-block;
    background: var(--primary-gradient);
    color: #fff;
    padding: 3px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.article-card .article-content .article-meta-top .date {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.article-card .article-content .article-title {
    font-size: 17px;
    font-weight: 700;
    margin: 6px 0 10px;
    line-height: 1.6;
}

.article-card .article-content .article-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.article-card .article-content .article-title a:hover {
    color: var(--secondary);
}

.article-card .article-content .article-excerpt {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 14px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card .article-content .article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 14px;
    border-top: 1.5px solid rgba(26, 44, 94, 0.06);
}

.article-card .article-content .article-footer .article-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.article-card .article-content .article-footer .article-tags .tag {
    font-size: 11px;
    color: var(--primary);
    background: rgba(26, 44, 94, 0.06);
    padding: 2px 12px;
    border-radius: 12px;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.article-card .article-content .article-footer .article-tags .tag:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-1px);
}

.article-card .article-content .article-footer .article-meta {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: var(--text-muted);
}

.article-card .article-content .article-footer .article-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

/* ============================================
   NO ARTICLES
   ============================================ */
.no-articles {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(26, 44, 94, 0.04);
}

.no-articles .empty-icon {
    font-size: 72px;
    margin-bottom: 20px;
    display: block;
}

.no-articles h3 {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-weight: 700;
}

.no-articles p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.no-articles .btn {
    display: inline-block;
    padding: 12px 32px;
    background: var(--primary-gradient);
    color: #fff;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.no-articles .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(26, 44, 94, 0.3);
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination-wrapper {
    margin-top: 50px;
    padding: 0 20px;
}

.pagination-wrapper .pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
}

.pagination-wrapper .pagination .page-item .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    border: 1.5px solid rgba(26, 44, 94, 0.08);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    background: var(--bg-white);
}

.pagination-wrapper .pagination .page-item .page-link:hover {
    background: var(--primary-gradient);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(26, 44, 94, 0.2);
}

.pagination-wrapper .pagination .page-item.active .page-link {
    background: var(--primary-gradient);
    color: #fff;
    border-color: var(--primary);
}

.pagination-wrapper .pagination .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

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

@media (max-width: 768px) {
    .articles-section {
        padding: 50px 0 40px;
    }

    .section-header .section-title {
        font-size: 30px;
    }

    .section-header .section-description {
        font-size: 15px;
    }

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

    .featured-card .featured-image {
        height: 190px;
    }

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

    .article-card .article-image {
        height: 180px;
    }

    .articles-filters {
        padding: 16px 18px;
        margin: 0 10px 30px;
        border-radius: var(--radius-sm);
    }

    .filter-form {
        flex-direction: column;
        gap: 12px;
    }

    .filter-form .filter-group {
        min-width: 100%;
    }

    .filter-form .search-group {
        flex-direction: column;
        min-width: 100%;
    }

    .filter-form .search-group .btn-search {
        width: 100%;
        justify-content: center;
    }

    .pagination-wrapper .pagination .page-item .page-link {
        min-width: 38px;
        height: 38px;
        font-size: 13px;
        padding: 0 12px;
    }

    .featured-articles {
        padding: 0 10px;
    }

    .section-header {
        padding: 0 10px;
    }
}

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

    .featured-card .featured-content {
        padding: 16px 18px 20px;
    }

    .featured-card .featured-content h3 {
        font-size: 16px;
    }

    .article-card .article-content {
        padding: 16px 18px 18px;
    }

    .article-card .article-content .article-title {
        font-size: 15px;
    }

    .article-card .article-content .article-excerpt {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.fade-in-up:nth-child(1) { animation-delay: 0.05s; }
.fade-in-up:nth-child(2) { animation-delay: 0.10s; }
.fade-in-up:nth-child(3) { animation-delay: 0.15s; }
.fade-in-up:nth-child(4) { animation-delay: 0.20s; }
.fade-in-up:nth-child(5) { animation-delay: 0.25s; }
.fade-in-up:nth-child(6) { animation-delay: 0.30s; }
