/* Blog-specific styles that extend the main theme */

/* Blog Hero Section */
.blog-hero {
    position: relative;
    background: linear-gradient(90deg, #5e72e4 0%, #825ee4 50%, #a47dea 100%);
    padding: 120px 0 150px;
    color: white;
    overflow: hidden;
    text-align: center;
}

.blog-hero-content h1 {
    font-family: 'Fredoka', sans-serif;
    font-size: 3.6rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.blog-hero-content h1 .highlight {
    color: #ffd93d;
    text-shadow: 0 4px 20px rgba(255, 217, 61, 0.4);
}

.blog-hero-content p {
    font-size: 1.17rem;
    margin-bottom: 40px;
    line-height: 1.7;
    opacity: 0.95;
    font-weight: 400;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Blog Categories Section */
.blog-categories {
    position: relative;
    background: #faf8f5;
    padding: 100px 0;
    margin-top: -2px;
    z-index: 2;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.category-card {
    background: #ffffff;
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #5e72e4, #825ee4, #a47dea);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.category-card:nth-child(1) {
    border-color: rgba(255, 107, 157, 0.3);
}

.category-card:nth-child(2) {
    border-color: rgba(78, 205, 196, 0.3);
}

.category-card:nth-child(3) {
    border-color: rgba(102, 126, 234, 0.3);
}

.category-card:nth-child(4) {
    border-color: rgba(255, 217, 61, 0.3);
}

.category-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 2.5rem;
}

.category-card:nth-child(1) .category-icon {
    background: linear-gradient(135deg, #ff6b9d, #ffd93d);
}

.category-card:nth-child(2) .category-icon {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
}

.category-card:nth-child(3) .category-icon {
    background: linear-gradient(135deg, #5e72e4, #825ee4);
}

.category-card:nth-child(4) .category-icon {
    background: linear-gradient(135deg, #ffd93d, #ffb347);
}

.category-card h3 {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.62rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: #2d3748;
}

.category-card p {
    color: #4a5568;
    line-height: 1.7;
    font-size: 1rem;
}

/* Featured Articles Section */
.featured-articles {
    position: relative;
    background: #ffffff;
    padding: 100px 0;
    z-index: 1;
}

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

.section-header h2 {
    font-family: 'Fredoka', sans-serif;
    font-size: 3.15rem;
    font-weight: 600;
    color: #825ee4;
    margin-bottom: 20px;
}

.section-header h2 .highlight {
    color: #ffd93d;
}

.section-header p {
    font-size: 1.17rem;
    color: #4a5568;
    max-width: 700px;
    margin: 0 auto;
    font-weight: 400;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

/* Article Cards */
.article-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    position: relative;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.article-card.featured {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
}

.article-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.article-card.featured .article-image {
    height: 100%;
}

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

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

.article-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #ff6b9d, #ffd93d);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.article-content {
    padding: 30px;
}

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

.article-category {
    background: linear-gradient(135deg, #5e72e4, #825ee4);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-date {
    color: #718096;
    font-size: 0.9rem;
    font-weight: 500;
}

.article-content h3 {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.3;
}

.article-content h3 a {
    color: #2d3748;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-content h3 a:hover {
    color: #825ee4;
}

.article-content p {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 1rem;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(102, 126, 234, 0.1);
}

.read-time {
    color: #718096;
    font-size: 0.9rem;
    font-weight: 500;
}

.read-more {
    color: #825ee4;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
}

.read-more::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #825ee4;
    transition: width 0.3s ease;
}

.read-more:hover::after {
    width: 100%;
}

.read-more:hover {
    color: #5e72e4;
}

/* Newsletter CTA Section */
.newsletter-cta {
    position: relative;
    background: linear-gradient(90deg, #5e72e4 0%, #825ee4 50%, #a47dea 100%);
    padding: 100px 0;
    text-align: center;
    color: white;
    margin-top: -2px;
    z-index: 0;
}

.newsletter-cta h2 {
    font-family: 'Fredoka', sans-serif;
    font-size: 2.7rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.newsletter-cta p {
    font-size: 1.08rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255, 255, 255, 0.95);
}

.newsletter-cta .newsletter-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    gap: 16px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px;
    border-radius: 60px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.newsletter-cta .newsletter-form input {
    flex: 1;
    padding: 16px 24px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
    background: rgba(255, 255, 255, 0.9);
    color: #2d3748;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.newsletter-cta .newsletter-form button {
    padding: 16px 32px;
    background: #ffd93d;
    color: #2d3748;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.newsletter-cta .newsletter-form button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Active navigation link */
.nav-links a.active {
    color: #825ee4;
    text-decoration: underline;
    text-underline-offset: 6px;
    text-decoration-thickness: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-hero-content h1 {
        font-size: 2.5rem;
    }
    
    .blog-hero-content p {
        font-size: 1rem;
    }
    
    .section-header h2 {
        font-size: 2.2rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .article-card.featured {
        grid-column: span 1;
        display: block;
    }
    
    .article-card.featured .article-image {
        height: 250px;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .article-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .newsletter-cta h2 {
        font-size: 2rem;
    }
    
    .newsletter-cta .newsletter-form {
        flex-direction: column;
        gap: 16px;
        max-width: calc(100% - 40px);
        margin: 0 auto;
        padding: 18px;
    }
}

@media (max-width: 480px) {
    .blog-hero {
        padding: 80px 0 100px;
    }
    
    .blog-hero-content h1 {
        font-size: 2rem;
    }
    
    .article-content {
        padding: 20px;
    }
    
    .article-content h3 {
        font-size: 1.2rem;
    }
    
    .category-card {
        padding: 30px 20px;
    }
    
    .category-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .category-card h3 {
        font-size: 1.4rem;
    }
}

/* Animation for article cards */
@keyframes articleFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card {
    animation: articleFadeIn 0.6s ease-out;
}

.article-card:nth-child(1) { animation-delay: 0.1s; }
.article-card:nth-child(2) { animation-delay: 0.2s; }
.article-card:nth-child(3) { animation-delay: 0.3s; }
.article-card:nth-child(4) { animation-delay: 0.4s; }
.article-card:nth-child(5) { animation-delay: 0.5s; }
.article-card:nth-child(6) { animation-delay: 0.6s; }

/* Hover effects for category cards */
.category-card:hover .category-icon {
    transform: scale(1.1) rotate(5deg);
    transition: transform 0.3s ease;
}

/* Loading animation for images */
.article-image img {
    transition: opacity 0.3s ease;
}

.article-image img[loading="lazy"] {
    opacity: 0;
}

.article-image img[loading="lazy"].loaded {
    opacity: 1;
}
