/* Blog Listing Page Styles */
:root {
    --primary-color: #0B1F3A;
    --secondary-color: #FF9900;
    --primary-rgb: 21, 87, 174;
    --gradient-primary: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    --heading-color: #1A1A1A;
    --text-color: #1e1e1e;
    --light-bg: #F8F9FA;
    --border-color: #E9ECEF;
    --white: #fff;
}

/* Blog Header Section */
.blog-header {
    position: relative;
    background: var(--primary-color);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 120px 0 80px;
    color: var(--white);
    text-align: center;
    margin-bottom: 0;
}

.blog-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-dark);
}

.blog-header .container {
    position: relative;
    z-index: 2;
}

.archive-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.archive-description {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Search and Filter Section */
.blog-filters {
    background: var(--white);
    padding: 40px 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.filter-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.blog-search {
    margin-bottom: 30px;
    position: relative;
}

.blog-search input {
    width: 100%;
    padding: 15px 25px;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: var(--light-gray);
}

.blog-search input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(26, 79, 124, 0.1);
}

.blog-search::after {
    content: '\f002';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--medium-gray);
}

.filter-section {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 250px;
}

.filter-group h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
}

.filter-group h3 i {
    margin-right: 10px;
}

.filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-item {
    background: var(--light-gray);
    padding: 8px 20px;
    border-radius: 30px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

.filter-item:hover,
.filter-item.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.filter-item i {
    margin-right: 8px;
    font-size: 0.9em;
}

/* Blog Grid Section */
.blog-grid-section {
    background: var(--light-gray);
    padding: 60px 0;
    position: relative;
}

.blog-grid-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(45deg, var(--border-color) 1px, transparent 1px),
        linear-gradient(-45deg, var(--border-color) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.3;
    pointer-events: none;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 30px;
    position: relative;
    z-index: 1;
}

.blog-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

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

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

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

.blog-card:hover .blog-card-image img {
    transform: scale(1.1);
}

.blog-card-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, var(--white) 0%, rgba(248, 249, 250, 0.5) 100%);
}

.post-categories {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.post-categories a {
    display: inline-flex;
    align-items: center;
    padding: 6px 15px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 20px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.post-categories a:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.post-categories a i {
    margin-right: 6px;
    font-size: 0.9em;
}

.blog-card h2 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.blog-card h2 a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
    background: linear-gradient(to right, var(--primary-color), var(--primary-color));
    background-size: 0 2px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    padding-bottom: 2px;
    transition: background-size 0.3s ease;
}

.blog-card h2 a:hover {
    color: var(--primary-color);
    background-size: 100% 2px;
}

.post-excerpt {
    color: var(--medium-gray);
    margin-bottom: 25px;
    line-height: 1.7;
    flex-grow: 1;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.post-meta span {
    display: flex;
    align-items: center;
    color: var(--medium-gray);
    font-size: 0.9rem;
}

.post-meta i {
    margin-right: 8px;
    color: var(--primary-color);
}

/* Engineering Theme Elements */
.technical-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(26, 79, 124, 0.9);
    color: var(--white);
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 0.85rem;
    font-family: 'Roboto Mono', monospace;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 2;
}

.technical-badge i {
    font-size: 1.1em;
}

/* Pagination */
.pagination {
    margin-top: 50px;
    text-align: center;
    place-self: center;
}

.page-numbers {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    margin: 0 5px;
    border-radius: 8px;
    background: var(--white);
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
}

.page-numbers.current {
    background: var(--primary-color);
    color: var(--white);
}

.page-numbers:hover:not(.current) {
    background: var(--light-gray);
    transform: translateY(-2px);
}

.page-numbers.prev,
.page-numbers.next {
    width: auto;
    padding: 0 25px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    }
}

@media (max-width: 768px) {
    .blog-header {
        padding: 80px 0 60px;
    }

    .archive-title {
        font-size: 2.5rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }

    .filter-group {
        flex: 100%;
    }

    .blog-card-image {
        height: 200px;
    }

    .blog-card h2 {
        font-size: 1.4rem;
    }

    .post-meta {
        flex-direction: column;
        gap: 12px;
    }
}

/* No Posts Found */
.no-posts-found {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--box-shadow);
}

.no-posts-found h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 2rem;
}

.no-posts-found p {
    color: var(--medium-gray);
    max-width: 500px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Category-specific Styles */
.category-archive .blog-header {
    padding: 100px 0 70px;
}

.category-icon {
    font-size: 4rem;
    color: var(--white);
    margin-bottom: 30px;
    opacity: 0.9;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.category-meta {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.category-meta span {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.95rem;
}

.category-meta i {
    font-size: 1.1em;
}

/* Category-specific Technical Badge Colors */
.technical-badge {
    background: var(--primary-color);
}

/* Automation Category */
.category-automation .technical-badge {
    background: linear-gradient(135deg, #2196F3, #0D47A1);
}

/* Industrial Category */
.category-industrial .technical-badge {
    background: linear-gradient(135deg, #455A64, #263238);
}

/* Technology Category */
.category-technology .technical-badge {
    background: linear-gradient(135deg, #3F51B5, #1A237E);
}

/* Solutions Category */
.category-solutions .technical-badge {
    background: linear-gradient(135deg, #4CAF50, #1B5E20);
}

/* Category Header Variations */
.category-automation .blog-header::before {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.95), rgba(13, 71, 161, 0.8));
}

.category-industrial .blog-header::before {
    background: linear-gradient(135deg, rgba(69, 90, 100, 0.95), rgba(38, 50, 56, 0.8));
}

.category-technology .blog-header::before {
    background: linear-gradient(135deg, rgba(63, 81, 181, 0.95), rgba(26, 35, 126, 0.8));
}

.category-solutions .blog-header::before {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.95), rgba(27, 94, 32, 0.8));
}

/* Related Categories Section */
.category-archive .filter-group h3 {
    position: relative;
    padding-bottom: 15px;
}

.category-archive .filter-group h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Category-specific Filter Items */
.category-archive .filter-item {
    border: 1px solid var(--border-color);
    background: var(--white);
}

.category-archive .filter-item:hover {
    border-color: var(--primary-color);
}

/* Responsive Adjustments for Category Page */
@media (max-width: 768px) {
    .category-archive .blog-header {
        padding: 70px 0 50px;
    }

    .category-icon {
        font-size: 3rem;
        margin-bottom: 20px;
    }

    .category-meta {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .category-meta span {
        width: 100%;
        justify-content: center;
    }
}

/* Add these styles for the select boxes */
.filter-select {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background-color: var(--white);
    color: var(--text-color);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23333' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 15px) center;
    background-size: 12px;
    transition: all 0.3s ease;
}

.filter-select:hover {
    border-color: var(--primary-color);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

/* Remove the old filter-list and filter-item styles if you want, 
   or keep them if you're using them elsewhere */ 