/**
 * Blog Widget - Styles
 * 
 * @package BBAdria
 */

/* ======= Blog Section ======= */
.blog_section {
    position: relative;
    padding: 0;
    margin: var(--section-margin-desktop) 0;
}

@media (max-width: 991px) {
    .blog_section {
        margin: var(--section-margin-tablet) 0;
    }
}

@media (max-width: 767px) {
    .blog_section {
        margin: var(--section-margin-mobile) 0;
    }
}

.blog_section__bg-color {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-bg-main);
    z-index: -1;
}

/* Box Contents */
.blog_section .box_contents {
    display: block;
    text-decoration: none;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    background: var(--color-white);
    /* padding: var(--spacing-md); */
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.blog_section .box_contents:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.blog_section .box_contents figure {
    position: relative;
    overflow: hidden;
    border-radius: calc(var(--radius-md) - 2px);
    margin-bottom: 20px;
    background: transparent;
}

.blog_section .box_contents figure img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
    display: block;
    border-radius: calc(var(--radius-md) - 8px);
}

.blog_section .box_contents:hover figure img {
    transform: scale(1.1);
}

.blog_section .box_contents figure em {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: #fff;
    color: #2C3E3F;
    padding: 10px 15px;
    border-radius: 5px;
    font-style: normal;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

/* Wrapper */
.blog_section .box_contents .wrapper {
    padding: 0 10px;
    padding: var(--spacing-md);
}

.blog_section .box_contents .wrapper small {
    color: #4A7C59;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
    font-weight: 600;
    display: block;
    margin-bottom: 10px;
    position: relative;
    padding-right: 0;
}

.blog_section .box_contents .wrapper small span {
    display: none;
}

.blog_section .box_contents .wrapper h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--color-text-secondary);
    line-height: 1.4;
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.blog_section .box_contents:hover .wrapper h2 {
    color: var(--color-cta-primary);
}

.blog_section .box_contents .wrapper em {
    color: #666;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    position: relative;
    padding-left: 20px;
    transition: padding-left 0.3s ease;
}

.blog_section .box_contents .wrapper em:before {
    content: '\2192';
    position: absolute;
    left: 0;
    transition: left 0.3s ease;
}

.blog_section .box_contents:hover .wrapper em {
    padding-left: 25px;
}

.blog_section .box_contents:hover .wrapper em:before {
    left: 5px;
}

/* Responsive */
@media (max-width: 991px) {
    .blog_section .title h2 {
        font-size: 32px;
    }
    
    .blog_section .box_contents .wrapper h2 {
        font-size: 20px;
    }

    .blog_section .box_contents {
        padding: var(--spacing-sm);
    }
}

@media (max-width: 575px) {
    .blog_section .box_contents figure em {
        top: 15px;
        right: 15px;
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* ========== MOBILE CAROUSEL ========== */
.blog_mobile {
    padding: 0 0 20px 0;
    overflow: visible;
}

.blog-carousel.owl-carousel {
    overflow: visible;
    padding-bottom: 10px;
}

.blog-carousel.owl-carousel .owl-stage-outer {
    overflow: visible;
    padding: 10px 0;
    margin: -10px 0;
}

.blog-card {
    background: var(--color-white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    height: 100%;
}

.blog-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.blog-card-img {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: var(--color-cream, #f5f5f5);
}

.blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-cta-primary) 0%, var(--color-cta-secondary) 100%);
}

.blog-card-date {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--color-white);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.blog-card-content {
    padding: 20px;
}

.blog-card-category {
    display: block;
    color: var(--color-cta-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 8px;
}

.blog-card-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin: 0;
    line-height: 1.3;
}

/* Owl Carousel dots per blog */
.blog-carousel.owl-carousel .owl-dots {
    margin-top: 50px;
    padding-top: 20px;
    text-align: center;
    position: relative;
}

.blog-carousel.owl-carousel .owl-dot {
    display: inline-block;
    margin: 0 5px;
}

.blog-carousel.owl-carousel .owl-dot span {
    width: 12px;
    height: 12px;
    background: rgba(32, 149, 174, 0.3);
    display: block;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.blog-carousel.owl-carousel .owl-dot.active span {
    background: var(--color-cta-primary);
    transform: scale(1.2);
}

@media (max-width: 575px) {
    .blog-card-img {
        height: 160px;
    }
    
    .blog-card-content {
        padding: 15px;
    }
    
    .blog-card-title {
        font-size: 16px;
    }
}
