/* --- Root Variables and Global Styles --- */
:root {
    --primary-gradient: linear-gradient(135deg, #8b5cf6, #a855f7, #c084fc);
    --secondary-gradient: linear-gradient(135deg, #3b82f6, #1d4ed8);
    --accent-gradient: linear-gradient(135deg, #6366f1, #4f46e5);
    --light-gradient: linear-gradient(135deg, #ffffff, #f8fafc, #f1f5f9);
    --primary-color: #8b5cf6;
    --secondary-color: #3b82f6;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: #f8fafc;
    overflow-x: hidden;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 40px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    border-radius: 1px;
}

.nav-cta {
    background: var(--primary-gradient);
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

/* --- Hero Section --- */
.blog-hero {
    margin-top: 80px;
    padding: 6rem 2rem 4rem;
    background: var(--light-gradient);
    position: relative;
    overflow: hidden;
}

.blog-hero::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"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%238b5cf6" stroke-width="0.5" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
}

.hero-bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 1;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(168, 85, 247, 0.05) 100%);
}

.bg-circle-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    right: -150px;
}

.bg-circle-2 {
    width: 200px;
    height: 200px;
    bottom: -100px;
    left: -100px;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    animation: float 6s ease-in-out infinite;
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.1;
    background: linear-gradient(135deg, #1e293b 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 3rem;
    font-weight: 400;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
}

.hero-stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: block;
}

.hero-stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* --- Filter Section --- */
.filter-section {
    max-width: 1200px;
    margin: -3rem auto 4rem;
    padding: 0 2rem;
    position: relative;
    z-index: 3;
}

.filter-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 25px 60px rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.1);
}

.filter-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-tab {
    background: #f1f5f9;
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.filter-tab.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.filter-tab:hover:not(.active) {
    background: #e2e8f0;
    transform: translateY(-2px);
}

.search-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 1rem;
    background: #f8fafc;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
    background: white;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.1rem;
}

/* --- Blog Grid & Cards --- */
.blog-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.blog-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(139, 92, 246, 0.05);
    position: relative;
    cursor: pointer;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 60px rgba(139, 92, 246, 0.15);
}

.blog-card.featured {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 400px;
}

.blog-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card.featured .blog-image {
    height: 100%;
}

.blog-card:hover .blog-image {
    transform: scale(1.05);
}

.blog-content {
    padding: 2rem;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: center;
}

.blog-category {
    background: var(--primary-gradient);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.blog-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

.blog-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.blog-card.featured .blog-title {
    font-size: 2rem;
}

.blog-excerpt {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.blog-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.author-name {
    font-weight: 600;
}

.author-title {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.read-more:hover {
    transform: translateX(5px);
}

/* --- CTA Section --- */
.cta-background {
    background: var(--primary-gradient);
}

.cta-section {
    text-align: center;
    color: white;
    padding: 4rem 1rem;
}

.cta-section .section-title {
    color: white !important;
    font-size: 2.5rem;
    font-family: 'DM Sans', sans-serif;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.9) !important;
    font-family: 'DM Sans', sans-serif;
    font-size: 1.1rem;
    margin: 1rem auto 2rem;
    max-width: 600px;
}

.cta-button {
    background: white;
    color: var(--primary-color);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}


/* --- Load More Button --- */
.load-more {
    text-align: center;
    margin: 2rem 0;
}

.load-more-btn {
    display: none;
}

/* Hidden as we use pagination instead */

/* --- Pagination --- */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    margin: 3rem 0 2rem;
    padding: 2rem;
    width: 100%;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.1);
}

.pagination-info {
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

.pagination-info strong {
    color: #8b5cf6;
    font-weight: 700;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-btn {
    background: #ffffff !important;
    border: 2px solid rgba(139, 92, 246, 0.15);
    color: #64748b;
    padding: 0.65rem 1.1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    font-family: 'Inter', sans-serif;
    min-width: 44px;
}

.page-btn:hover:not(.disabled):not(.active) {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(168, 85, 247, 0.08)) !important;
    border-color: rgba(139, 92, 246, 0.4);
    color: #8b5cf6;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.2);
}

.page-btn.active {
    background: linear-gradient(135deg, #8b5cf6, #a855f7, #c084fc) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
}

.page-btn.disabled {
    opacity: 0.25;
    cursor: not-allowed;
    background: #f8fafc !important;
    border-color: #e2e8f0;
    color: #cbd5e1;
    transform: none;
}

.page-btn i {
    font-size: 0.7rem;
}

/* Number buttons specific styling */
.page-btn:not(:first-child):not(:last-child) {
    min-width: 44px;
    padding: 0.65rem 0.85rem;
}

@media (max-width: 991px) {
    .pagination {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .pagination-info {
        text-align: center;
        width: 100%;
    }

    .pagination-controls {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* --- Footer --- */
.footer {
    background: #ffffff;
    color: #cbd5e1;
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    margin-top: 1rem;
    line-height: 1.7;
    max-width: 300px;
}

.footer-section h4 {
    color: white;
    font-family: 'DM Sans', sans-serif;
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    text-decoration: none;
    color: #cbd5e1;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #334155;
    padding-top: 2rem;
    font-size: 0.9rem;
}


/* --- Animations --- */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .blog-card.featured {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }

    .blog-card.featured .blog-image {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-menu {
        display: none;
    }

    /* Needs JS to toggle */
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }
}