/**
 * HRB Loop Post Carousel
 *
 * @package HRB_Loop_Post_Carousel
 * @version 1.0.0
 */

.hrb-loop-post-carousel {
    position: relative;
    width: 100%;
    font-family: inherit;
}

.hrb-loop-carousel-empty {
    padding: 40px;
    text-align: center;
    color: #9aa1b3;
}

/* ============================================
   Swiper container
   ============================================ */

.hrb-loop-post-carousel .swiper {
    width: 100%;
    overflow: hidden;
    padding: 6px 4px 50px;
}

.hrb-loop-post-carousel .swiper-slide {
    height: auto;
    display: flex;
}

/* Center Mode (opt-in via the Mode setting) */
.hrb-loop-post-carousel .swiper.hrb-center-scale .swiper-slide {
    opacity: 0.55;
    transform: scale(0.9);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
}

.hrb-loop-post-carousel .swiper.hrb-center-scale .swiper-slide-active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

/* ============================================
   Card
   ============================================ */

.hrb-loop-card {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(20, 30, 60, 0.10);
}

.hrb-loop-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
}

.hrb-loop-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hrb-loop-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 22px 24px 24px;
}

.hrb-loop-card-title {
    margin: 0 0 10px 0;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.35;
    color: #1b2236;
}

.hrb-loop-card-title a {
    color: inherit;
    text-decoration: none;
}

.hrb-loop-card-excerpt {
    margin: 0 0 18px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #6b7280;
    flex: 1;
}

.hrb-loop-card-price {
    font-size: 16px;
    font-weight: 700;
    color: #1b2236;
}

.hrb-loop-card-button {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    padding: 10px 22px;
    background-color: #FF8A00;
    color: #ffffff;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    position: relative;
    z-index: 3;
    transition: background-color 0.3s ease;
}

.hrb-loop-card-button:hover {
    background-color: #e67a00;
    color: #ffffff;
}

.hrb-loop-card-link-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* ============================================
   Navigation Arrows
   ============================================ */

.hrb-loop-post-carousel .swiper-button-next,
.hrb-loop-post-carousel .swiper-button-prev {
    width: 40px;
    height: 40px;
    background-color: #f1f3f7;
    border-radius: 50%;
    color: #aab0bf;
    transition: all 0.3s ease;
    top: 42%;
}

.hrb-loop-post-carousel .swiper-button-next:hover,
.hrb-loop-post-carousel .swiper-button-prev:hover {
    background-color: #1b2236;
    color: #ffffff;
}

.hrb-loop-post-carousel .swiper-button-next:after,
.hrb-loop-post-carousel .swiper-button-prev:after {
    font-size: 15px;
    font-weight: 700;
}

@media (max-width: 768px) {
    .hrb-loop-post-carousel .swiper-button-next,
    .hrb-loop-post-carousel .swiper-button-prev {
        display: none;
    }
}

/* ============================================
   Pagination Dots
   ============================================ */

.hrb-loop-post-carousel .swiper-pagination {
    bottom: 0;
}

.hrb-loop-post-carousel .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background-color: #d7dbe4;
    opacity: 1;
    transition: all 0.3s ease;
}

.hrb-loop-post-carousel .swiper-pagination-bullet-active {
    background-color: #1b2236;
    width: 20px;
    border-radius: 4px;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 480px) {
    .hrb-loop-card-content {
        padding: 18px 18px 20px;
    }

    .hrb-loop-card-title {
        font-size: 17px;
    }
}

/* ============================================
   Accessibility
   ============================================ */

.hrb-loop-post-carousel .swiper-slide:focus-visible {
    outline: 2px solid #FF8A00;
    outline-offset: 2px;
}

/* ============================================
   RTL Support
   ============================================ */

.rtl .hrb-loop-post-carousel .swiper-button-next {
    left: 10px;
    right: auto;
}

.rtl .hrb-loop-post-carousel .swiper-button-prev {
    right: 10px;
    left: auto;
}

.rtl .hrb-loop-post-carousel .swiper-button-next:after {
    content: 'prev';
}

.rtl .hrb-loop-post-carousel .swiper-button-prev:after {
    content: 'next';
}
