/* Modern Blog Design */
:root {
    --blog-primary: #1e293b;
    --blog-secondary: #64748b;
    --blog-accent: #3b82f6;
    --blog-accent-hover: #2563eb;
    --blog-bg: #f8fafc;
    --blog-card-bg: #ffffff;
    --blog-border: #e2e8f0;
    --blog-text: #334155;
    --blog-heading: #0f172a;
    --blog-shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --blog-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --blog-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -2px rgba(0,0,0,0.03);
    --blog-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background-color: var(--blog-bg);
    color: var(--blog-text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    color: var(--blog-heading);
    font-weight: 700;
}

/* Hero Section */
.blog-hero {
    position: relative;
    padding: 2rem 0 1rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    overflow: hidden;
    margin-bottom: 1rem;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59,130,246,0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.blog-title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #0f172a, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    z-index: 1;
}

.blog-subtitle {
    font-size: 1.25rem;
    color: var(--blog-secondary);
    max-width: 600px;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

/* Search Bar */
.search-wrapper {
    position: relative;
    max-width: 500px;
    z-index: 1;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    padding-left: 3rem;
    border: 1px solid var(--blog-border);
    border-radius: 50px;
    background: white;
    box-shadow: var(--blog-shadow-md);
    transition: var(--blog-transition);
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--blog-accent);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.search-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--blog-secondary);
    pointer-events: none;
}

/* Category Filter */
.category-scroller {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 0.25rem;
    margin-bottom: 3rem;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.category-scroller::-webkit-scrollbar {
    display: none;
}

.category-pill {
    padding: 0.5rem 1.25rem;
    background: white;
    border: 1px solid var(--blog-border);
    border-radius: 50px;
    color: var(--blog-secondary);
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--blog-transition);
    text-decoration: none;
    font-size: 0.9rem;
}

.category-pill:hover,
.category-pill.active {
    background: var(--blog-accent);
    color: white;
    border-color: var(--blog-accent);
    transform: translateY(-1px);
    box-shadow: var(--blog-shadow-md);
}

/* Featured Article */
.featured-article {
    background: white;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: var(--blog-shadow-lg);
    margin-bottom: 4rem;
    transition: var(--blog-transition);
}

.featured-article:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

.featured-content {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.featured-img-container {
    height: 100%;
    min-height: 400px;
    position: relative;
    overflow: hidden;
}

.featured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.badge-custom {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: #eff6ff;
    color: var(--blog-accent);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

/* Article Grid */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-bottom: 4rem;
}

.article-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--blog-shadow-sm);
    transition: var(--blog-transition);
    border: 1px solid var(--blog-border);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--blog-shadow-lg);
    border-color: rgba(59, 130, 246, 0.2);
}

.article-img-wrapper {
    position: relative;
    padding-top: 60%;
    overflow: hidden;
}

.article-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.article-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-category {
    font-size: 0.75rem;
    color: var(--blog-accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    display: block;
}

.article-title {
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.article-title a {
    color: var(--blog-heading);
    text-decoration: none;
    transition: color 0.2s;
    background: linear-gradient(to right, var(--blog-heading), var(--blog-heading)),
                linear-gradient(to right, var(--blog-accent), var(--blog-accent));
    background-size: 100% 0px, 0px 2px;
    background-position: 100% 100%, 0 100%;
    background-repeat: no-repeat;
    padding-bottom: 2px;
}

.article-card:hover .article-title a {
    color: var(--blog-accent);
    background-size: 0px 0px, 100% 2px;
}

.article-excerpt {
    font-size: 0.95rem;
    color: var(--blog-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.article-meta {
    padding-top: 1rem;
    border-top: 1px solid var(--blog-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #94a3b8;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Animations */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

.stagger-delay-1 { transition-delay: 0.1s; }
.stagger-delay-2 { transition-delay: 0.2s; }
.stagger-delay-3 { transition-delay: 0.3s; }

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-top: 2rem;
}

.btn-load-more {
    background: white;
    color: var(--blog-heading);
    border: 1px solid var(--blog-border);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--blog-transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-load-more:hover {
    background: var(--blog-heading);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--blog-shadow-md);
}

.btn-load-more:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Newsletter Section */
.newsletter-section {
    background: var(--blog-heading);
    border-radius: 1.5rem;
    padding: 4rem 2rem;
    text-align: center;
    color: white;
    margin-bottom: 4rem;
    position: relative;
    overflow: hidden;
}

.newsletter-section::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.newsletter-title {
    color: white;
    margin-bottom: 1rem;
}

.newsletter-form {
    max-width: 500px;
    margin: 2rem auto 0;
    display: flex;
    gap: 0.5rem;
}

.newsletter-input {
    flex: 1;
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    color: white;
    transition: var(--blog-transition);
}

.newsletter-input:focus {
    outline: none;
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
}

.newsletter-input::placeholder {
    color: rgba(255,255,255,0.5);
}

.btn-subscribe {
    background: var(--blog-accent);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--blog-transition);
    cursor: pointer;
}

.btn-subscribe:hover {
    background: var(--blog-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

@media (max-width: 768px) {
    .blog-title {
        font-size: 2.5rem;
    }
    
    .featured-content {
        padding: 2rem;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .btn-subscribe {
        width: 100%;
    }
}
