/*--------------------------------------------------------------
# CUSTOM CSS - FINANSOWE SZOTY - KOMPLETNY PLIK
# Zachowane wszystkie istniejące style + poprawki dla sekcji blog
--------------------------------------------------------------*/

/* Import komponentów CSS */
@import url('base/variables.css');
@import url('base/global.css');
@import url('components/header.css');
@import url('components/hero.css');
@import url('components/calculators.css');
@import url('components/categories.css');
@import url('components/newsletter.css');
@import url('components/quote.css');
@import url('components/footer.css');

/*--------------------------------------------------------------
# Blog Section - Najnowsze Artykuły - POPRAWIONA WERSJA
--------------------------------------------------------------*/

/* Blog Section Container */
.blog-section {
    padding: 80px 0;
    background: var(--white, #ffffff);
    position: relative;
}

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

/* Section Title */
.blog-section .section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark, #333333);
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
}

.blog-section .section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-blue, #4285f4);
    border-radius: 2px;
}

.blog-section .section-subtitle {
    text-align: center;
    color: var(--text-gray, #666666);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* Blog Grid Layout */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Post Cards */
.post-card {
    background: var(--white, #ffffff);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--border-light, #e0e0e0);
    position: relative;
    display: flex;
    flex-direction: column;
}

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

/* Post Image Container */
.post-image {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--border-light, #e0e0e0);
}

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

.post-card:hover .post-image img {
    transform: scale(1.05);
}

/* POPRAWIONY PLACEHOLDER - Wycentrowana ikona jak w kategoriach */
.post-image-placeholder {
    width: 100%;
    height: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--primary-blue, #4285f4) 0%, #3367d6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.post-image-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="3" fill="rgba(255,255,255,0.08)"/></svg>');
    opacity: 0.3;
    z-index: 1;
}

.placeholder-gradient {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.placeholder-icon {
    font-size: 4rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px); 
    }
    50% { 
        transform: translateY(-10px); 
    }
}

/* ALTERNATYWNA STRUKTURA - post-placeholder (dla kompatybilności) */
.post-placeholder {
    width: 100%;
    height: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--primary-blue, #4285f4) 0%, #3367d6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.post-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="3" fill="rgba(255,255,255,0.08)"/></svg>');
    opacity: 0.3;
    z-index: 1;
}

.post-placeholder .placeholder-icon {
    position: relative;
    z-index: 2;
    font-size: 4rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    animation: float 6s ease-in-out infinite;
}

/* Post Content */
.post-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Category Badge - Base styles (colors added via PHP) */
.post-category {
    display: inline-block;
    background: var(--primary-blue, #4285f4);
    color: var(--white, #ffffff);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.post-category:hover {
    background: #3367d6;
    color: var(--white, #ffffff);
    text-decoration: none;
    transform: translateY(-1px);
}

/* Post Title */
.post-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-title a {
    color: var(--text-dark, #333333);
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: var(--primary-blue, #4285f4);
}

/* Post Excerpt */
.post-excerpt {
    color: var(--text-gray, #666666);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

/* Post Meta */
.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light, #e0e0e0);
    font-size: 0.9rem;
    color: var(--text-gray, #666666);
}

.post-date {
    color: var(--text-gray, #666666);
}

.post-reading-time {
    color: var(--text-gray, #666666);
}

.post-link {
    color: var(--secondary-orange, #ff9500);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.post-link:hover {
    color: #e6850e;
    text-decoration: none;
}

/* Category Colors */
.post-category.zarabianie {
    background: #4caf50;
}

.post-category.inwestowanie {
    background: #2196f3;
}

.post-category.oszczedzanie {
    background: #ff9800;
}

.post-category.zdrowie {
    background: #e91e63;
}

.post-category.efektywnosc {
    background: #9c27b0;
}

.post-category.ksiazki,
.post-category.wiedza {
    background: #795548;
}

/* View All Posts Button */
.section-cta {
    text-align: center;
    margin-top: 2rem;
}

.view-all-posts {
    display: inline-block;
    padding: 14px 32px;
    background: var(--primary-blue, #4285f4);
    color: var(--white, #ffffff);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.view-all-posts:hover {
    background: #3367d6;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 133, 244, 0.4);
    color: var(--white, #ffffff);
    text-decoration: none;
}

/* No Posts Fallback */
.no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-gray, #666666);
    font-size: 1.1rem;
    background: var(--background-light, #f8f9fa);
    border-radius: 12px;
}

.no-posts-message {
    text-align: center;
    padding: 3rem;
    background: var(--white, #ffffff);
    border: 2px dashed var(--border-light, #e0e0e0);
    border-radius: 12px;
    grid-column: 1 / -1;
}

.no-posts-message h3 {
    color: var(--text-dark, #333333);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.no-posts-message p {
    color: var(--text-gray, #666666);
    font-size: 1rem;
}

/* Blog Section Footer */
.blog-section-footer {
    text-align: center;
    margin-top: 2rem;
}

/*--------------------------------------------------------------
# Responsive Design dla Blog Section
--------------------------------------------------------------*/

/* Tablet */
@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .placeholder-icon,
    .post-placeholder .placeholder-icon {
        font-size: 3.5rem;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .blog-section {
        padding: 60px 0;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .post-content {
        padding: 1.25rem;
    }
    
    .post-title {
        font-size: 1.1rem;
    }
    
    .placeholder-icon,
    .post-placeholder .placeholder-icon {
        font-size: 3rem;
    }
    
    .blog-section .section-title {
        font-size: 2rem;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .post-link {
        align-self: flex-end;
    }
    
    .view-all-posts {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .blog-section {
        padding: 40px 0;
    }
    
    .blog-section .section-container {
        padding: 0 15px;
    }
    
    .post-content {
        padding: 1rem;
    }
    
    .placeholder-icon,
    .post-placeholder .placeholder-icon {
        font-size: 2.5rem;
    }
}

/*--------------------------------------------------------------
# Stare klasy dla kompatybilności (zachowane z oryginalnego pliku)
--------------------------------------------------------------*/

/* Blog Cards (stare - dla kompatybilności) */
.blog-card {
    background: var(--white, #ffffff);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--border-light, #e0e0e0);
}

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

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

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-content {
    padding: 1.5rem;
}

.blog-category {
    display: inline-block;
    background: var(--primary-blue, #4285f4);
    color: var(--white, #ffffff);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.blog-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.blog-title a {
    color: var(--text-dark, #333333);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-title a:hover {
    color: var(--primary-blue, #4285f4);
}

.blog-excerpt {
    color: var(--text-gray, #666666);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.2rem;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light, #e0e0e0);
}

.blog-date {
    color: var(--text-gray, #666666);
    font-size: 0.9rem;
}

.blog-read-more {
    color: var(--secondary-orange, #ff9500);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.blog-read-more:hover {
    color: var(--secondary-orange-hover, #e6850e);
    text-decoration: none;
}


/*--------------------------------------------------------------
# UKRYCIE LICZNIKA WYŚWIETLEŃ
# Dodane: 14.10.2025
# Funkcjonalność: Ukrywa wizualnie licznik wyświetleń artykułów
# UWAGA: Dane nadal są zbierane w bazie danych!
# Aby przywrócić licznik - usuń poniższy kod
--------------------------------------------------------------*/

/* GŁÓWNE UKRYCIE - licznik w single post (4. element meta-item) */
.article-meta .meta-item:nth-child(4) {
    display: none !important;
}

/* Ukryj licznik w archiwach kategorii */
.archive-post-meta .post-views,
.category-posts .post-views {
    display: none !important;
}

/* Ukryj w listach artykułów (strony archiwów) */
.archive-posts .post-views,
.archive-post-views {
    display: none !important;
}

/* Ukryj na stronie głównej w sekcji blog */
.blog-section .post-views,
.blog-grid .post-views {
    display: none !important;
}

/* BACKUP - dodatkowe selektory CSS */
.article-meta > div:nth-of-type(4) {
    display: none !important;
}

/* Dla starszych przeglądarek - ukryj ostatni element meta */
.single-post .article-meta .meta-item:last-child {
    display: none !important;
}

/*--------------------------------------------------------------
# KONIEC - Ukrycie licznika wyświetleń
--------------------------------------------------------------*/