/* ========================================
   ARTICLES CATALOG PAGE STYLES
   Koodi - Корисні статті
======================================== */

/* ========== HERO SECTION ========== */

.articles-hero {
    background: var(--lime);
    padding: 80px 20px;
    text-align: center;
    margin-bottom: 60px;
}

.articles-hero h1 {
    font-size: clamp(32px, 6vw, 56px);
    font-weight: 800;
    color: var(--black);
    margin-bottom: 15px;
}

.articles-hero p {
    font-size: 18px;
    color: var(--black);
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto;
}

/* ========== CONTAINER ========== */

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

/* ========== FILTER BUTTONS ========== */

.articles-filter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 10px 24px;
    border-radius: 50px;
    border: 2px solid var(--black);
    background: var(--white);
    font-family: 'Rubik', sans-serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: var(--lightgray);
}

.filter-btn.active {
    background: var(--black);
    color: var(--white);
}

/* ========== ARTICLES GRID ========== */

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

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

/* ========== ARTICLE CARD ========== */

.article-card {
    background: var(--white);
    border-radius: 24px;
    border: 3px solid var(--black);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 8px 8px 0 var(--black);
}

/* Card Preview (Emoji Block) */
.article-card-preview {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    border-bottom: 3px solid var(--black);
    position: relative;
    overflow: hidden;
}

.article-card-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.15;
    background-image: 
        radial-gradient(circle at 20% 80%, currentColor 2px, transparent 2px),
        radial-gradient(circle at 80% 20%, currentColor 2px, transparent 2px),
        radial-gradient(circle at 40% 40%, currentColor 1px, transparent 1px),
        radial-gradient(circle at 60% 60%, currentColor 1px, transparent 1px);
    background-size: 100px 100px;
}

/* Card Image (if using real images) */
.article-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 3px solid var(--black);
}

/* Preview Colors for Each Article */
.preview-vscode {
    background: linear-gradient(135deg, #0078d4 0%, #005a9e 100%);
    color: white;
}

.preview-html {
    background: linear-gradient(135deg, #e44d26 0%, #f16529 100%);
    color: white;
}

.preview-python {
    background: linear-gradient(135deg, #3776ab 0%, #ffd43b 100%);
    color: white;
}

.preview-nodejs {
    background: linear-gradient(135deg, #339933 0%, #68a063 100%);
    color: white;
}

.preview-vue {
    background: linear-gradient(135deg, #42b883 0%, #35495e 100%);
    color: white;
}

.preview-git {
    background: linear-gradient(135deg, #f05033 0%, #24292e 100%);
    color: white;
}

/* Legend colors */
.legend-inactive { background: #B2AFAF; }
.legend-active { background: #FF9F00; }
.legend-today { background: #C6DF2B; }

/* Card Content */
.article-card-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Tags */
.article-card-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.article-card-tag {
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    border: 2px solid var(--black);
}

/* Tag Colors */
.tag-beginner { background: var(--lime); }
.tag-tools { background: var(--orange); color: white; }
.tag-frontend { background: var(--blue); color: white; }
.tag-backend { background: var(--pink); }
.tag-devtools { background: #24292e; color: white; }

/* Card Title */
.article-card-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 10px;
    line-height: 1.3;
}

.article-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* Card Description */
.article-card-description {
    font-size: 15px;
    color: var(--darkgray);
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
}

/* Card Meta (Date & Time) */
.article-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 2px dashed var(--lightgray);
}

.article-card-date,
.article-card-time {
    font-size: 13px;
    color: var(--darkgray);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Card Link Button */
.article-card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--black);
    color: var(--white);
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: 16px;
    width: fit-content;
}

.article-card-link:hover {
    background: var(--blue);
    transform: translateX(5px);
}

/* ========== SECTION HEADER ========== */

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 32px;
    font-weight: 800;
    color: var(--black);
    margin-bottom: 10px;
}

.section-header p {
    font-size: 16px;
    color: var(--darkgray);
}

/* ========== CTA SECTION ========== */

.articles-cta {
    background: var(--black);
    border-radius: 30px;
    padding: 60px 40px;
    text-align: center;
    margin-top: 60px;
}

.articles-cta h3 {
    font-size: 28px;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 15px;
}

.articles-cta p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 25px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.articles-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: var(--lime);
    color: var(--black);
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 3px solid var(--lime);
}

.articles-cta-btn:hover {
    background: transparent;
    color: var(--lime);
}

/* ========== RESPONSIVE ========== */

@media (max-width: 480px) {
    .articles-hero {
        padding: 60px 20px;
    }
    
    .articles-filter {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .article-card-preview {
        height: 160px;
        font-size: 56px;
    }
    
    .article-card-content {
        padding: 20px;
    }
    
    .article-card-title {
        font-size: 20px;
    }
    
    .articles-cta {
        padding: 40px 20px;
    }
    
    .articles-cta h3 {
        font-size: 24px;
    }
}

/* =========================================================================
   DROPDOWN NAVIGATION
   ========================================================================= */
.main-menu {
    display: flex;
    gap: 40px;
    margin: 0 auto;
    align-items: center;
}
.nav-dropdown {
    position: relative;
}
.dropdown-trigger {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dropdown-trigger i {
    font-size: 14px;
    transition: transform 0.3s ease;
}
.nav-dropdown:hover .dropdown-trigger i {
    transform: rotate(180deg);
}
/* Dropdown контент - БІЛЬШИЙ */
.dropdown-content {
    position: absolute;
    top: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 340px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}
/* Стрілочка зверху */
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid var(--white);
}
.nav-dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
/* Елементи dropdown - БІЛЬШІ */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    border-radius: 14px;
    text-decoration: none;
    color: var(--black);
    transition: all 0.2s ease;
}
.dropdown-item:hover {
    background: var(--gray-100, #f5f5f5);
}
.dropdown-item i {
    font-size: 26px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--gray-100, #f5f5f5);
    color: var(--black);
    transition: all 0.2s ease;
}
/* Кольори для іконок при hover */
.dropdown-item:hover i {
    background: var(--lime);
    color: var(--black);
}
.dropdown-item div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.dropdown-title {
    display: block;
    font-weight: 600;
    font-size: 18px;
}
.dropdown-desc {
    display: block;
    font-size: 14px;
    color: var(--gray-500, #6c757d);
}
/* Header actions group */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Точка-розділювач */
.nav-dot {
    color: var(--gray-400, #adb5bd);
    font-size: 10px;
    user-select: none;
}

/* =========================================================================
   RESPONSIVE - ховаємо dropdown на мобільних
   ========================================================================= */
@media (max-width: 1024px) {
    .nav-dropdown .dropdown-content {
        display: none;
    }

    .dropdown-trigger i {
        display: none;
    }

    .nav-dot {
        display: none;
    }
}
