/* Blog Page Styles */

/* Blog Hero */
.blog-hero {
    background: var(--accent-gradient);
    padding: 10rem 0 5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('foldable_pictures/fld-3.jpg') center/cover;
    opacity: 0.15;
}

.blog-hero::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: backgroundScroll 20s linear infinite;
    opacity: 0.3;
}

.blog-hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.blog-hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Blog Filter */
.blog-filter {
    background: var(--bg-light);
    padding: 2rem 0;
    position: sticky;
    top: 70px;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 160, 227, 0.1);
}

.filter-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-base);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Blog Section */
.blog-section {
    padding: 5rem 0;
    background: var(--bg-white);
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2.5rem;
}

/* Blog Card */
.blog-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition-smooth);
    border: 1px solid rgba(0, 160, 227, 0.1);
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.blog-card.hidden {
    display: none;
}

/* Blog Card Image */
.blog-card-image {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.1);
}

.blog-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--accent-gradient);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-category.article-cat {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.blog-category.news-cat {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
}

/* Blog Card Content */
.blog-card-content {
    padding: 1.75rem;
}

.blog-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.blog-date,
.blog-read-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-date::before {
    content: '📅';
}

.blog-read-time::before {
    content: '⏱️';
}

.blog-card-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-card-title {
    color: var(--primary-color);
}

.blog-card-excerpt {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Blog Stats */
.blog-stats {
    display: flex;
    gap: 1.5rem;
    padding: 1.25rem;
    background: var(--bg-light);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.blog-stat {
    text-align: center;
    flex: 1;
}

.blog-stat strong {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.blog-stat span {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Read More Link */
.blog-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-base);
}

.blog-read-more:hover {
    color: var(--primary-dark);
    gap: 1rem;
}

/* Load More */
.blog-load-more {
    text-align: center;
    margin-top: 4rem;
}

/* Newsletter Section */
.newsletter-section {
    background: var(--bg-dark);
    padding: 5rem 0;
}

.newsletter-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
}

.newsletter-content p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    transition: var(--transition-base);
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.15);
}

.newsletter-form .btn {
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-hero {
        padding: 8rem 0 4rem;
    }

    .blog-hero-title {
        font-size: 2.5rem;
    }

    .blog-hero-subtitle {
        font-size: 1rem;
    }

    .blog-filter {
        top: 60px;
    }

    .filter-buttons {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .blog-card-image {
        height: 200px;
    }

    .blog-card-title {
        font-size: 1.2rem;
    }

    .blog-stats {
        gap: 1rem;
        padding: 1rem;
    }

    .blog-stat strong {
        font-size: 1.25rem;
    }

    .newsletter-content h2 {
        font-size: 2rem;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form input,
    .newsletter-form .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .blog-hero-title {
        font-size: 2rem;
    }

    .blog-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .blog-stats {
        flex-direction: column;
        gap: 0.75rem;
    }

    .blog-stat {
        display: flex;
        align-items: center;
        justify-content: space-between;
        text-align: left;
    }

    .blog-stat strong {
        margin-bottom: 0;
        margin-right: 0.5rem;
    }
}

/* Animation for cards */
.blog-card {
    opacity: 0;
    transform: translateY(30px);
    animation: blogCardFadeIn 0.6s ease forwards;
}

.blog-card:nth-child(1) { animation-delay: 0.1s; }
.blog-card:nth-child(2) { animation-delay: 0.2s; }
.blog-card:nth-child(3) { animation-delay: 0.3s; }
.blog-card:nth-child(4) { animation-delay: 0.4s; }
.blog-card:nth-child(5) { animation-delay: 0.5s; }
.blog-card:nth-child(6) { animation-delay: 0.6s; }
.blog-card:nth-child(7) { animation-delay: 0.7s; }
.blog-card:nth-child(8) { animation-delay: 0.8s; }
.blog-card:nth-child(9) { animation-delay: 0.9s; }
.blog-card:nth-child(10) { animation-delay: 1.0s; }

@keyframes blogCardFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
