/* ================================================
   Homepage Post Carousel
   Uses theme's Owl Carousel v1 (cmsmasters_owl_slider)
   Color refs: #c2b599 gold, #2a2825 dark, #6a6967 gray
================================================ */

/* --- Outer wrapper --- */
.ms_posts_carousel_wrap {
    padding: 40px 0 32px;
    margin-bottom: 16px;
}

.ms_posts_carousel_wrap .cmsmasters_owl_slider {
    position: relative;
}

/* --- Individual card --- */
.ms_carousel_item {
    min-width: 220px;
    margin: 0 10px;
}

/* --- Image block --- */
.ms_carousel_img_wrap {
    position: relative;
}

.ms_carousel_img_link {
    display: block;
    position: relative;
    overflow: hidden;
    padding-top: 115%;    /* portrait: taller than wide */
    background: #f3f2f3;
}

.ms_carousel_img_link img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.ms_carousel_item:hover .ms_carousel_img_link img {
    transform: scale(1.04);
}

/* --- Placeholder when no featured image --- */
.ms_carousel_img_placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #e6e6e6;
}

/* --- White card body: inset floating box overlapping the image bottom --- */
.ms_carousel_body {
    position: relative;
    z-index: 1;
    margin: -44px 10% 14px;   /* 10% inset each side, overlaps 44px into image, 14px gap at bottom */
    background: #fff;
    text-align: center;
    padding: 14px 14px 18px;
    box-shadow: 0 2px 14px rgba(42, 40, 37, 0.10);
}

/* --- Category badge — top of white box, centered --- */
.ms_carousel_cat {
    display: inline-block;
    margin-bottom: 12px;
    background: #c2b599;
    color: #fff;
    font-family: Montserrat, Arial, sans-serif;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 5px 14px;
    white-space: nowrap;
}

.ms_carousel_title {
    margin: 0 0 10px;
    font-family: Montserrat, Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    line-height: 1.45;
    text-transform: uppercase;
    /* Lock to 2 lines so all cards stay the same height — min-height (not height) so
       -webkit-line-clamp still computes its own exact box for real 2-line titles */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(2 * 1.45em);
}

.ms_carousel_title a {
    color: #2a2825;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ms_carousel_title a:hover {
    color: #c2b599;
}

.ms_carousel_date {
    margin: 0;
    font-family: Montserrat, Arial, sans-serif;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #959492;
}

/* ================================================
   Owl Carousel navigation arrows
================================================ */

.ms_posts_carousel_wrap .owl-buttons {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.ms_posts_carousel_wrap .cmsmasters_owl_slider:hover .owl-buttons {
    visibility: visible;
    opacity: 1;
}

/* Centre arrows on the image portion (115% padding = image is ~53% of total card height) */
.ms_posts_carousel_wrap .owl-buttons > div {
    top: 27%;
    margin-top: -23px;
}

.ms_posts_carousel_wrap .owl-buttons .cmsmasters_prev_arrow,
.ms_posts_carousel_wrap .owl-buttons .cmsmasters_next_arrow {
    width: 46px;
    height: 46px;
    background: rgba(255, 255, 255, 0.90);
    border: none;
    transition: background 0.2s ease;
}

.ms_posts_carousel_wrap .owl-buttons .cmsmasters_prev_arrow:hover,
.ms_posts_carousel_wrap .owl-buttons .cmsmasters_next_arrow:hover {
    background: #c2b599;
}

.ms_posts_carousel_wrap .owl-buttons .cmsmasters_prev_arrow span,
.ms_posts_carousel_wrap .owl-buttons .cmsmasters_next_arrow span {
    width: 18px;
    height: 18px;
}

.ms_posts_carousel_wrap .owl-buttons .cmsmasters_prev_arrow span:before,
.ms_posts_carousel_wrap .owl-buttons .cmsmasters_next_arrow span:before {
    font-size: 18px;
    line-height: 18px;
}

.ms_posts_carousel_wrap .owl-buttons .cmsmasters_prev_arrow:hover span:before,
.ms_posts_carousel_wrap .owl-buttons .cmsmasters_next_arrow:hover span:before {
    color: #fff;
}

.ms_posts_carousel_wrap .owl-wrapper-outer {
    overflow: hidden;
}

/* ================================================
   Responsive
================================================ */
@media only screen and (max-width: 768px) {
    .ms_posts_carousel_wrap {
        padding: 24px 0 20px;
        margin-bottom: 28px;
    }

    .ms_carousel_item {
        margin: 0 6px;
    }
}
