:root {
    /* Color Palette */
    --primary-blue: #007aff;
    --secondary-blue: #5ac8fa;
    --accent-yellow: #ffd60a;
    --dark-blue: #003366;
    --dark-grey: #333333;
    --light-grey-text: #999999;
    --white: #ffffff;
    --background-light: #f4f4f4;
    --background-dark: #002855;
    --light-grey: #d1d1d1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
        Cantarell, sans-serif;
    background-color: var(--background-light);
    color: var(--dark-grey);
    padding-top: 70px; /* Add padding for fixed navbar */
}

/* Hero Section */
.blogs-hero {
    background: linear-gradient(
        135deg,
        var(--primary-blue) 0%,
        var(--secondary-blue) 100%
    );
    padding: 5rem 0 3rem;
    text-align: center;
    color: var(--white);
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}

/* Blogs Content Section */
.blogs-content {
    padding: 3rem 0;
}

/* Filters Section */
.filters-section {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.search-box {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--light-grey-text);
    pointer-events: none;
}

.search-input {
    padding-left: 3rem;
    border: 2px solid var(--light-grey);
    border-radius: 10px;
    height: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(0, 122, 255, 0.15);
    outline: none;
}

.category-select {
    border: 2px solid var(--light-grey);
    border-radius: 10px;
    height: 50px;
    font-size: 1rem;
    color: var(--dark-grey);
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(0, 122, 255, 0.15);
    outline: none;
}

.results-count {
    text-align: center;
    color: var(--light-grey-text);
    font-size: 0.95rem;
    padding: 0.75rem;
}

/* Blogs Grid */
.blogs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    transition: opacity 0.3s ease;
}

/* Blog Card */
.blog-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.blog-image {
    width: 100%;
    height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.blog-category {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent-yellow);
    color: var(--dark-blue);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.blog-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.blog-date,
.blog-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--light-grey-text);
    font-size: 0.9rem;
}

.blog-date svg,
.blog-author svg {
    flex-shrink: 0;
}

.blog-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark-blue);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.blog-excerpt {
    color: var(--dark-grey);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.blog-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.blog-read-more:hover {
    gap: 0.75rem;
    color: var(--dark-blue);
}

.blog-read-more svg {
    transition: transform 0.3s ease;
}

.blog-read-more:hover svg {
    transform: translateX(5px);
}

/* No Results State */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: var(--white);
    border-radius: 20px;
}

.no-results svg {
    color: var(--light-grey);
    margin-bottom: 1.5rem;
}

.no-results h3 {
    color: var(--dark-blue);
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
}

.no-results p {
    color: var(--light-grey-text);
    font-size: 1.1rem;
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 2rem;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.pagination-nav {
    background: var(--white);
    border-radius: 15px;
    padding: 1rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.pagination {
    margin: 0;
    gap: 0.5rem;
}

.page-item {
    list-style: none;
}

.page-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    background: var(--background-light);
    color: var(--dark-grey);
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.page-link:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
}

.page-item.active .page-link {
    background: var(--primary-blue);
    color: var(--white);
}

.page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Footer */
.footer {
    background: var(--dark-blue);
    color: var(--white);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

.footer h3 {
    color: var(--accent-yellow);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer p {
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .blogs-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .filters-section .row {
        gap: 1rem;
    }

    .results-count {
        text-align: left;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .blogs-hero {
        padding: 3rem 0 2rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .filters-section {
        padding: 1rem;
    }

    .blog-card {
        border-radius: 15px;
    }

    .blog-image {
        height: 200px;
    }

    .blog-content {
        padding: 1.25rem;
    }

    .blog-title {
        font-size: 1.2rem;
    }
}
