/********** Blog Section CSS **********/
.blog-section {
    background-color: #f9fafb;
    position: relative;
}

.blog-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(249,250,251,0) 100%);
    z-index: 0;
}

.blog-section .row {
    position: relative;
    z-index: 1;
}

.blog-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
}

.blog-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(185, 46, 65, 0.1);
}

.blog-item .position-relative {
    overflow: hidden;
    height: 240px;
}

.blog-item img {
    transition: all 0.5s ease;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.blog-item:hover img {
    transform: scale(1.1);
}

.blog-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(21, 36, 64, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.blog-item:hover .blog-overlay {
    opacity: 1;
}

.blog-item h4 {
    font-size: 1.25rem;
    line-height: 1.4;
    font-weight: 700;
    transition: all 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.blog-item:hover h4 {
    color: var(--primary);
}

.blog-item p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.6;
}

.blog-item .text-uppercase {
    font-size: 0.85rem;
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
}

.blog-item .text-uppercase:hover {
    color: var(--primary);
    transform: translateX(5px);
}

/* Featured post styling */
.featured-post {
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.featured-post:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.featured-image {
    overflow: hidden;
    border-radius: 15px 0 0 15px;
}

.featured-image img {
    transition: all 0.5s ease;
}

.featured-post:hover .featured-image img {
    transform: scale(1.05);
}

.featured-badge {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.featured-content h3 {
    font-size: 1.5rem;
    line-height: 1.4;
    transition: all 0.3s ease;
}

.featured-post:hover .featured-content h3 {
    color: var(--primary);
}

/* Categories and newsletter styling */
.category-item {
    border: 1px solid #eee;
    text-decoration: none;
    transition: all 0.3s ease;
    background-color: #fff;
}

.category-item:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.category-icon {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
}

.bg-primary-light {
    background-color: rgba(185, 46, 65, 0.1);
}

.bg-success-light {
    background-color: rgba(25, 135, 84, 0.1);
}

.bg-warning-light {
    background-color: rgba(255, 193, 7, 0.1);
}

.bg-info-light {
    background-color: rgba(13, 202, 240, 0.1);
}

.newsletter-section {
    background-image: linear-gradient(45deg, var(--primary), #d63384);
    border-radius: 15px;
}

.newsletter-form .form-control {
    height: 48px;
    font-size: 0.95rem;
}

.newsletter-form .btn {
    height: 48px;
}

.newsletter-form .form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .featured-image {
        height: 300px;
        border-radius: 15px 15px 0 0;
    }
    
    .featured-post .row {
        flex-direction: column;
    }
}

@media (max-width: 767.98px) {
    .blog-item .position-relative {
        height: 200px;
    }
    
    .blog-item h4 {
        font-size: 1.1rem;
    }
    
    .featured-image {
        height: 250px;
    }
    
    .featured-content {
        padding: 1.5rem !important;
    }
    
    .featured-content h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 575.98px) {
    .blog-section {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .category-item {
        flex-direction: column;
        text-align: center;
    }

    .category-icon {
        margin-right: 0 !important;
        margin-bottom: 10px;
    }
}

/* Custom Blog Carousel Styles */
.blog-carousel-container {
    position: relative;
    z-index: 1;
}

.blog-carousel-wrapper {
    overflow: hidden;
    position: relative;
}

.blog-carousel-track {
    display: flex;
    transition: transform 1000ms ease-in-out;
    width: 100%;
}

.blog-carousel-item {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    padding: 0 15px;
    box-sizing: border-box;
}

.blog-carousel-item .blog-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.blog-carousel-item .blog-item .bg-white {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-carousel-item .blog-item .bg-white p {
    flex-grow: 1;
}

/* Navigation Buttons */
.blog-carousel-nav {
    margin-top: 30px;
    text-align: center;
}

.blog-nav-btn {
    width: 45px;
    height: 45px;
    background-color: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    margin: 0 5px;
    font-size: 18px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.blog-nav-btn:hover:not(:disabled) {
    background-color: #152440;
    transform: scale(1.1);
}

.blog-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.blog-nav-btn i {
    line-height: 1;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .blog-carousel-item {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .blog-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 767.98px) {
    .blog-carousel-item {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0 10px;
    }

    .blog-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}