/* General Background Settings */
.blog-listing {
/*    background-color: rgb(242, 101, 19); !* Base color *!*/
/*    background-image: radial-gradient(circle, rgba(242, 101, 19, 0.1) 1px, transparent 1px),*/
/*    radial-gradient(circle, rgba(242, 101, 19, 0.1) 1px, transparent 1px),*/
/*    linear-gradient(to bottom, rgba(255, 255, 255, 0.8), rgba(248, 249, 250, 1));*/
/*    background-size: 40px 40px, 40px 40px, 100% 100%;*/
/*    background-position: 0 0, 20px 20px, 0 0;*/
    padding: 50px 0;
}

.custom-blog-section {
    background-color: #f9f9f9;
    padding: 70px 0 50px;
    position: relative;
}

.custom-blog-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, rgba(242, 101, 19, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: 0;
}

/* Page Header Styling with Subtle Border */
.custom-blog-heading {
    font-size: 3.2rem;
    font-weight: 700;
    color: #384158;
    text-align: center;
    margin-bottom: 25px;
    text-transform: capitalize;
    position: relative;
    display: inline-block;
}

.custom-blog-heading::after {
    content: "";
    display: block;
    height: 4px;
    background: linear-gradient(90deg, #f26513, #ff8000);
    width: 70%;
    margin: 15px auto 0;
    border-radius: 3px;
}

.custom-blog-intro {
    font-size: 1.25rem;
    color: #656668;
    text-align: center;
    margin-bottom: 50px;
    line-height: 1.7;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Stylish Background for Each Card Section */
.card {
    border: none;
    background-color: #ffffff;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

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

.card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.card-body {
    padding: 25px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-family: 'Roboto Slab', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #384158;
    margin-bottom: 15px;
    line-height: 1.4;
}

.card-text {
    color: #656668;
    margin-bottom: 20px;
    flex-grow: 1;
}

.btn-primary {
    background: linear-gradient(135deg, #f26513, #ff8000);
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
    align-self: flex-start;
    box-shadow: 0 5px 15px rgba(242, 101, 19, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ff8000, #f26513);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(242, 101, 19, 0.4);
}

/* Featured Blog Styling */
.card.featured {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(0, 123, 255, 0.2);
}

.card.featured h5 {
    color: #ffffff;
}

.card.featured a {
    background-color: #ffffff;
    color: #0056b3;
    padding: 10px 20px;
    border-radius: 20px;
}

.card-text {
    text-align: start;
}

.featured-heading {
    font-size: 1.75rem;
    font-weight: bold;
    color: #212529;
    margin-bottom: 20px;
    text-transform: uppercase;
    padding-bottom: 8px;
    border-bottom: 3px solid #0d6efd;
}

/* Background for Sidebar */
.filter-section {
    background: #ffffff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border-left: 3px solid #f26513;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.filter-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.filter-section h5 {
    font-family: 'Roboto Slab', serif;
    font-size: 1.2rem;
    color: #384158;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eaeaea;
    position: relative;
}

.filter-section h5::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 30%;
    height: 2px;
    background-color: #f26513;
}

.filter-section ul {
    padding-left: 0;
}

.filter-section ul li {
    list-style: none;
    margin-bottom: 12px;
}

.filter-section ul li a {
    display: block;
    padding: 8px 10px;
    color: #656668;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.filter-section ul li a:hover {
    background-color: rgba(242, 101, 19, 0.1);
    color: #f26513;
    transform: translateX(5px);
    text-decoration: none;
}

/* Pagination Redesign */
.custom-pagination .custom-page-link {
    background-color: #ffffff;
    color: #0d6efd;
    padding: 10px 15px;
    margin: 0 5px;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.custom-pagination .custom-page-link:hover,
.custom-pagination .page-item.active .custom-page-link {
    background-color: #0d6efd;
    color: #ffffff;
}

/* Style for active filter links */
.custom-page-link.active {
    font-weight: 600;
    color: #f26513;
    background-color: rgba(242, 101, 19, 0.1);
    border-radius: 6px;
    padding-left: 10px !important;
    padding-right: 10px !important;
    position: relative;
    box-shadow: 0 2px 5px rgba(242, 101, 19, 0.15);
}

.custom-page-link.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background-color: #f26513;
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

/* Style for filter badges */
.filter-badges .badge {
    background: linear-gradient(135deg, #f26513, #ff8000);
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
    margin-right: 8px;
    margin-bottom: 8px;
    padding: 8px 12px;
    border-radius: 30px;
    box-shadow: 0 3px 6px rgba(242, 101, 19, 0.2);
    display: inline-block;
}

/* Empty state styling */
.empty-state {
    padding: 50px 20px;
    background-color: #f9f9f9;
    border-radius: 15px;
    text-align: center;
}

.empty-state h3 {
    color: #384158;
    margin: 15px 0;
}

.empty-state p {
    color: #656668;
}

/* Clear Filter Button Styling */
.clear-filter-btn {
    background: #ffffff;
    color: #f26513;
    border: 2px solid #f26513;
    border-radius: 30px;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(242, 101, 19, 0.15);
    text-align: center;
    display: inline-block;
}

.clear-filter-btn:hover {
    background: linear-gradient(135deg, #f26513, #ff8000);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(242, 101, 19, 0.3);
    text-decoration: none;
}

.clear-filter-btn i {
    margin-right: 5px;
}

/* Horizontal Tags Container */
.mobile-quick-filters {
    background: #ffffff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    position: relative;
}

.filter-chip-heading {
    font-family: 'Roboto Slab', serif;
    font-size: 1.1rem;
    color: #384158;
    margin-bottom: 12px;
    font-weight: 600;
}

.horizontal-tags-container {
    display: flex;
    overflow-x: auto;
    padding: 5px 0;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.horizontal-tags-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.tag-chip {
    flex: 0 0 auto;
    background: #f8f9fa;
    color: #384158;
    padding: 8px 15px;
    border-radius: 20px;
    margin-right: 10px;
    white-space: nowrap;
    transition: all 0.3s;
    scroll-snap-align: start;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.tag-chip i {
    color: #f26513;
    margin-right: 5px;
    font-size: 0.8rem;
}

.tag-chip.active {
    background: linear-gradient(135deg, #f26513, #ff8000);
    color: white;
    border-color: transparent;
    box-shadow: 0 3px 8px rgba(242, 101, 19, 0.3);
}

.tag-chip.active i {
    color: white;
}

.tag-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: #f26513;
}

.tag-chip.active:hover {
    color: white;
}

/* Active Filter Chips for Mobile */
.active-mobile-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.active-filter-chip {
    display: flex;
    align-items: center;
    background: rgba(242, 101, 19, 0.1);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 0.9rem;
    color: #f26513;
    box-shadow: 0 2px 5px rgba(242, 101, 19, 0.1);
}

.active-filter-chip span {
    margin-right: 6px;
}

.remove-filter {
    color: #f26513;
    margin-left: 5px;
}

.remove-filter:hover {
    color: #d55011;
    text-decoration: none;
}

.clear-all-mobile {
    font-size: 0.85rem;
    color: #6c757d;
    text-decoration: underline;
    padding: 5px;
}

.clear-all-mobile:hover {
    color: #f26513;
    text-decoration: none;
}

/* Mobile Filter Button */
.filter-button-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.filter-toggle-btn {
    background: linear-gradient(135deg, #f26513, #ff8000);
    color: white;
    border-radius: 50px;
    padding: 10px 20px;
    box-shadow: 0 4px 15px rgba(242, 101, 19, 0.3);
    border: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.filter-toggle-btn:hover,
.filter-toggle-btn:focus {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(242, 101, 19, 0.4);
    color: white;
    outline: none;
}

.filter-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #384158;
    color: white;
    font-size: 0.75rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

.filter-toggle-btn i {
    margin-right: 8px;
}

/* Off-Canvas Panel */
.offcanvas-container {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    z-index: 1050;
    visibility: hidden;
    background-color: rgba(0, 0, 0, 0.5);
    transition: visibility 0.3s, opacity 0.3s;
    opacity: 0;
    overflow-x: hidden;
}

.offcanvas-panel {
    position: fixed;
    right: -300px;
    top: 0;
    width: 280px;
    height: 100%;
    background: white;
    transition: right 0.3s ease;
    box-shadow: -2px 0 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.offcanvas-container.show {
    visibility: visible;
    opacity: 1;
}

.offcanvas-container.show .offcanvas-panel {
    right: 0;
}

.offcanvas-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.offcanvas-header h4 {
    margin-bottom: 0;
    font-family: 'Roboto Slab', serif;
    color: #384158;
    font-size: 1.3rem;
    font-weight: 600;
}

.offcanvas-header .close {
    font-size: 1.5rem;
    color: #6c757d;
    outline: none;
    background: transparent;
    border: none;
    padding: 0;
}

.offcanvas-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.offcanvas-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

.apply-filters-btn {
    background: linear-gradient(135deg, #f26513, #ff8000);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 10px;
    font-weight: 500;
    margin-bottom: 10px;
    box-shadow: 0 4px 10px rgba(242, 101, 19, 0.2);
}

.apply-filters-btn:hover {
    background: linear-gradient(135deg, #ff8000, #f26513);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(242, 101, 19, 0.3);
    color: white;
}

.clear-filters-btn {
    border: 1px solid #f26513;
    color: #f26513;
    background: white;
    border-radius: 30px;
    padding: 8px 12px;
    font-weight: 500;
    transition: all 0.3s;
    display: block;
    text-align: center;
}

.clear-filters-btn:hover {
    background: rgba(242, 101, 19, 0.1);
    text-decoration: none;
}

body.offcanvas-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Additional CSS for enhanced mobile off-canvas experience */
.offcanvas-body .filter-section {
  margin-bottom: 15px;
  padding: 0;
  box-shadow: none;
  border-left: none;
  background: transparent;
}

.offcanvas-body .filter-section:hover {
  transform: none;
  box-shadow: none;
}

.offcanvas-body .filter-section h5 {
  font-size: 1.1rem;
  padding-bottom: 8px;
}

.offcanvas-body .filter-section ul li {
  margin-bottom: 8px;
}

.offcanvas-body .filter-section ul li a {
  padding: 6px 10px;
  font-size: 0.9rem;
}

/* Add subtle dividers between filter sections */
.offcanvas-body .filter-section:not(:last-child) {
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

/* Enhanced Pagination Styling */
.custom-pagination {
    margin: 40px 0 20px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.custom-pagination .page-item .custom-page-link {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #ffffff;
    color: #384158;
    font-weight: 500;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 0;
    position: relative;
    overflow: hidden;
}

.custom-pagination .page-item .custom-page-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f26513, #ff8000);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
    z-index: 0;
}

.custom-pagination .page-item .custom-page-link:hover::before {
    opacity: 0.1;
}

.custom-pagination .page-item.active .custom-page-link {
    background: linear-gradient(135deg, #f26513, #ff8000);
    color: white;
    box-shadow: 0 4px 12px rgba(242, 101, 19, 0.3);
    transform: scale(1.1);
}

.custom-pagination .page-item.active .custom-page-link::before {
    opacity: 0;
}

.custom-pagination .page-item.disabled .custom-page-link {
    background-color: #f8f9fa;
    color: #bebebe;
    box-shadow: none;
}

.custom-pagination .page-item:not(.disabled):not(.active) .custom-page-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
    color: #f26513;
}

.blog-count-text {
    color: #6c757d;
    font-size: 0.95rem;
    font-style: italic;
}

/* Responsive adjustments for pagination */
@media (max-width: 767px) {
    .custom-pagination {
        gap: 5px;
    }

    .custom-pagination .page-item .custom-page-link {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }

    /* Hide some page numbers on very small screens */
    @media (max-width: 400px) {
        .custom-pagination .page-item:not(:first-child):not(:last-child):not(.active) {
            display: none;
        }
    }
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .filter-section {
        margin-bottom: 20px;
    }

    .sticky-top {
        position: relative !important;
        top: 0 !important;
    }

    .custom-blog-heading {
        font-size: 2.5rem;
    }
}

@media (max-width: 767px) {
    .card {
        margin-bottom: 20px;
    }

    .custom-blog-heading {
        font-size: 2rem;
    }

    .custom-blog-intro {
        font-size: 1rem;
    }

    /* Reorder filters to appear after blog content on mobile */
    .row.my-4 {
        display: flex;
        flex-direction: column;
    }

    .col-lg-9.col-md-8 {
        order: 1; /* Display blog cards first */
    }

    .col-lg-3.col-md-4 {
        order: 2; /* Display filters second */
        margin-top: 30px; /* Add space between blog cards and filters */
    }

    /* Make the filter sections a bit more compact on mobile */
    .filter-section {
        padding: 15px;
    }

    /* Adjusted card styles for mobile */
    .card {
        margin-bottom: 15px;
    }

    .card-body {
        padding: 15px;
    }
}
