/*--------------------------------------------------------------
# Category Archive Styles - Finansowe Szoty
# Complete CSS file for category archive pages
# POPRAWIONA WERSJA - SpÃ³jne marginesy boczne 3/2/1 kolumny
--------------------------------------------------------------*/

/* Category Hero Header */
.category-hero-header {
    background: linear-gradient(135deg, var(--primary-blue, #4285f4) 0%, #3367d6 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
    margin-bottom: 40px;
}

.category-hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.category-hero-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.category-hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.category-hero-description {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    line-height: 1.6;
}

.category-meta {
    font-size: 0.9rem;
    opacity: 0.8;
}

.articles-count {
    background: rgba(255,255,255,0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
}

/* Other Categories Section */
.other-categories {
    margin-top: 60px;
    padding: 40px 0;
    background: #f8f9fa;
    border-radius: 16px;
    text-align: center;
}

.section-subtitle {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark, #333);
    margin-bottom: 2rem;
}

/* NOWY LAYOUT - 3 kategorie w linii z inteligentnym max-width */
.categories-grid {
    display: grid;
    gap: 24px;
    margin: 0 auto;
    grid-template-columns: repeat(3, 1fr);
    max-width: 1000px;
}

/* Dla dokÅ‚adnie 2 kategorii */
.categories-grid[data-count="2"] {
    grid-template-columns: repeat(2, 1fr);
    max-width: 700px;
}

/* Dla dokÅ‚adnie 1 kategorii - NIE ROZCIÄ„GA SIÄ˜ */
.categories-grid[data-count="1"] {
    grid-template-columns: 1fr;
    max-width: 400px;
}

.category-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-align: center;
}

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

.category-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    display: block;
}

.category-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark, #333);
}

.category-count {
    font-size: 0.9rem;
    color: var(--text-gray, #666);
}

/*--------------------------------------------------------------
# Archive Posts Grid - POPRAWKA: Wrapper + 3/2/1 kolumny
--------------------------------------------------------------*/

/* POPRAWKA: Wrapper dla marginesÃ³w bocznych */
.archive-posts-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 60px; /* Desktop */
}

.archive-posts {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* POPRAWKA: 3 kolumny desktop */
    gap: 30px; /* POPRAWKA: zwiÄ™kszono gap */
    padding: 20px 0;
}

/*--------------------------------------------------------------
# Archive Post Card Styles
--------------------------------------------------------------*/

.archive-post-card {
    background-color: var(--primary-blue, #4285f4);
    border-radius: 12px;
    box-shadow: var(--shadow-light, 0 2px 8px rgba(0,0,0,0.1));
    padding: 20px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 320px;
    max-height: 320px;
    overflow: hidden;
}

.archive-post-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(66, 133, 244, 0.45);
}

.archive-post-image {
    width: 100%;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    flex-shrink: 0;
}

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

/* Hover effect for archive post images */
.archive-post-card:hover .archive-post-image img {
    transform: scale(1.05);
}

.post-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 100%);
    border-radius: 8px;
    text-decoration: none;
}

.placeholder-icon {
    font-size: 2rem;
    color: rgba(255,255,255,0.8);
}

.archive-post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.archive-post-category {
    background-color: var(--secondary-orange, #ff9500);
    color: #fff;
    border-radius: 12px;
    padding: 4px 10px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    text-decoration: none;
    align-self: flex-start;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.archive-post-category:hover {
    text-decoration: none;
    color: #fff;
}

.archive-post-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 0;
    min-height: 2.8em;
}

.archive-post-title a {
    color: #fff;
    text-decoration: none;
}

.archive-post-title:hover a {
    text-decoration: underline;
}

.archive-post-excerpt {
    flex-grow: 0;
    font-size: 1rem;
    margin-bottom: 12px;
    color: #eee;
    max-height: 3.5em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

.archive-post-meta {
    font-size: 0.85rem;
    margin-bottom: 12px;
    color: var(--accent-yellow, #ffca28);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.archive-post-actions {
    margin-top: auto;
}

.archive-readmore-btn {
    align-self: flex-start;
    background-color: var(--secondary-orange, #ff9500);
    color: #fff;
    border-radius: 12px;
    padding: 8px 16px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: var(--shadow-light, 0 2px 8px rgba(0,0,0,0.1));
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-size: 0.9rem;
}

.archive-readmore-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(255, 149, 0, 0.5);
    color: #fff;
    text-decoration: none;
}

/*--------------------------------------------------------------
# Header Styles
--------------------------------------------------------------*/

.category-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 3rem 0;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 2rem;
}

.category-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.category-description {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 2rem;
}

/*--------------------------------------------------------------
# Breadcrumbs
--------------------------------------------------------------*/

.breadcrumbs {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 2rem;
    padding: 1rem 0;
}

.breadcrumbs a {
    color: #4285f4;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumbs a:hover {
    color: #3367d6;
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 0.5rem;
}

.breadcrumb-current {
    color: #333;
    font-weight: 500;
}

/*--------------------------------------------------------------
# Pagination
--------------------------------------------------------------*/

.category-pagination {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
}

.category-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.category-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 44px;
    min-height: 44px;
}

.category-pagination .page-numbers:hover {
    background-color: #4285f4;
    color: #fff;
    border-color: #4285f4;
}

.category-pagination .current {
    background-color: #4285f4;
    color: #fff;
    border-color: #4285f4;
}

/*--------------------------------------------------------------
# No Posts State
--------------------------------------------------------------*/

.no-posts {
    text-align: center;
    padding: 4rem 2rem;
    background-color: #fff;
    border-radius: 12px;
    grid-column: 1 / -1;
}

.no-posts p {
    color: #666;
    font-size: 1.1rem;
    margin: 0;
}

/*--------------------------------------------------------------
# Responsive Design
--------------------------------------------------------------*/

/* Desktop Large (1025px+) - domyÅ›lne style powyÅ¼ej */

/* POPRAWKA: Tablet Landscape (769px - 1024px) - 2 kolumny */
@media (min-width: 769px) and (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 700px;
    }
    
    .categories-grid[data-count="3"] {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* POPRAWKA: Padding dla tablet */
    .archive-posts-wrapper {
        padding: 0 40px;
    }
    
    /* Archive posts - 2 kolumny na tablet */
    .archive-posts {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

/* POPRAWKA: Tablet & Mobile (max-width: 768px) - 1 kolumna */
@media (max-width: 768px) {
    /* Hero Header */
    .category-hero-header {
        padding: 40px 0;
    }
    
    .category-hero-title {
        font-size: 2rem;
    }
    
    .category-hero-icon {
        font-size: 3rem;
    }
    
    .category-hero-description {
        font-size: 1rem;
    }
    
    /* Other Categories Section */
    .other-categories {
        padding: 30px 20px;
        margin-top: 40px;
    }
    
    .section-subtitle {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    /* NA MOBILE WSZYSTKO W 1 KOLUMNIE */
    .categories-grid,
    .categories-grid[data-count="2"],
    .categories-grid[data-count="1"],
    .categories-grid[data-count="3"] {
        grid-template-columns: 1fr !important;
        max-width: 100% !important;
        gap: 16px;
    }
    
    .category-card {
        padding: 20px;
    }
    
    .category-icon {
        font-size: 2.5rem;
        margin-bottom: 8px;
    }
    
    .category-name {
        font-size: 1.1rem;
    }
    
    .category-count {
        font-size: 0.85rem;
    }
    
    /* POPRAWKA: Archive Posts - Mobile padding i 1 kolumna */
    .archive-posts-wrapper {
        padding: 0 20px;
    }
    
    .archive-posts {
        grid-template-columns: 1fr !important;
        gap: 20px;
        padding: 0;
    }

    .archive-post-card {
        min-height: 280px;
        max-height: 280px;
        padding: 16px;
    }

    .archive-post-image {
        height: 100px;
    }

    .archive-post-excerpt {
        font-size: 0.9rem;
    }

    .archive-post-title {
        font-size: 1.2rem;
    }

    .category-title {
        font-size: 2.2rem;
    }

    .category-header {
        padding: 2rem 0;
    }
    
    /* Pagination */
    .category-pagination {
        margin-top: 2rem;
        padding-top: 1.5rem;
    }
    
    .category-pagination .page-numbers {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
        min-width: 40px;
        min-height: 40px;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .category-hero-header {
        padding: 30px 0;
    }
    
    .category-hero-title {
        font-size: 1.75rem;
    }
    
    .category-hero-icon {
        font-size: 2.5rem;
    }
    
    .other-categories {
        padding: 20px 15px;
    }
    
    .section-subtitle {
        font-size: 1.3rem;
    }
    
    .archive-post-card {
        min-height: 260px;
        max-height: 260px;
        padding: 14px;
    }

    .archive-post-title {
        font-size: 1.1rem;
    }
    
    .archive-post-excerpt {
        font-size: 0.85rem;
    }
    
    .category-card {
        padding: 16px;
    }
    
    .category-icon {
        font-size: 2.2rem;
    }
}

/*--------------------------------------------------------------
# END OF FILE
--------------------------------------------------------------*/