/**
 * Cards Widget Styles
 * Mega Boost Elementor Elements
 * Combined Marquee + Swiper modes
 */

/* Wrapper */
.mbe-cards-wrapper {
    position: relative;
    width: 100%;
    overflow: visible;
}

/* =====================
   SWIPER MODE
   ===================== */
.mbe-cards-mode-swiper .mbe-cards-slider {
    overflow: hidden;
    width: 100%;
}

.mbe-cards-mode-swiper .swiper-wrapper {
    display: flex;
    transition-timing-function: ease-out;
}

.mbe-cards-mode-swiper .swiper-slide {
    height: auto;
    flex-shrink: 0;
}

/* =====================
   MARQUEE MODE
   ===================== */
.mbe-cards-mode-marquee {
    overflow: hidden;
}

.mbe-cards-mode-marquee .mbe-cards-track {
    display: flex;
    width: max-content;
    animation-name: mbe-cards-marquee-scroll;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-duration: 20s;
    animation-direction: normal;
}

.mbe-cards-mode-marquee.mbe-pause-on-hover:hover .mbe-cards-track {
    animation-play-state: paused;
}

@keyframes mbe-cards-marquee-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* =====================
   CARD LINK
   ===================== */
.mbe-cards-link {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
    height: 100%;
    -webkit-user-drag: none;
    user-select: none;
}

.mbe-cards-link:hover,
.mbe-cards-link:focus {
    text-decoration: none;
    color: inherit;
}

/* =====================
   CARD STYLES (shared)
   ===================== */
.mbe-cards-item {
    position: relative;
    width: 320px;
    min-width: 320px;
    height: 400px;
    margin-right: 24px;
    border-radius: 16px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    flex-shrink: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Swiper mode: width handled by swiper */
.mbe-cards-mode-swiper .mbe-cards-item {
    width: 100%;
    min-width: 100%;
    margin-right: 0;
}

/* Hover effect only on devices with hover capability (not touch) */
@media (hover: hover) and (pointer: fine) {
    .mbe-cards-item:hover {
        transform: translateY(-4px);
    }
}

/* Video background - background-image is always the fallback */
.mbe-cards-item--has-video {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.mbe-cards-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    background: transparent;
}

/* Video error - hide and let background-image show through */
.mbe-cards-video.mbe-video-error {
    opacity: 0;
    pointer-events: none;
}

/* Hide native video controls and error states */
.mbe-cards-video::-webkit-media-controls,
.mbe-cards-video::-webkit-media-controls-enclosure,
.mbe-cards-video::-webkit-media-controls-panel,
.mbe-cards-video::-webkit-media-controls-start-playback-button {
    display: none !important;
    -webkit-appearance: none;
    opacity: 0;
}

/* Hide default poster play button on iOS */
.mbe-cards-video::-webkit-media-controls-overlay-play-button {
    display: none !important;
}

/* Overlay gradient */
.mbe-cards-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Content area */
.mbe-cards-content {
    position: relative;
    z-index: 2;
    padding: 20px 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Title */
.mbe-cards-title {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
}

/* Description */
.mbe-cards-description {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
    max-width: 100%;
}

/* =====================
   BUTTON STYLES
   ===================== */
.mbe-cards-button {
    display: inline-block;
    margin-top: 8px;
    padding: 10px 24px;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.mbe-cards-button:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.02);
    color: #ffffff;
    text-decoration: none;
}

/* Button Style: Primary */
.mbe-cards-button.mb-btn--primary {
    background-color: var(--mb-primary, #bb9a65);
    border-color: var(--mb-primary, #bb9a65);
    color: #ffffff;
}

.mbe-cards-button.mb-btn--primary:hover {
    background-color: var(--mb-primary-dark, #a38654);
    border-color: var(--mb-primary-dark, #a38654);
}

/* Button Style: Secondary */
.mbe-cards-button.mb-btn--secondary {
    background-color: var(--mb-secondary, #333333);
    border-color: var(--mb-secondary, #333333);
    color: #ffffff;
}

.mbe-cards-button.mb-btn--secondary:hover {
    background-color: var(--mb-secondary-dark, #1a1a1a);
    border-color: var(--mb-secondary-dark, #1a1a1a);
}

/* Button Style: Outline */
.mbe-cards-button.mb-btn--outline {
    background-color: transparent;
    border: 2px solid #ffffff;
    color: #ffffff;
}

.mbe-cards-button.mb-btn--outline:hover {
    background-color: #ffffff;
    color: var(--mb-text-dark, #1a1a1a);
}

/* Button Style: Arrow Circle */
.mbe-cards-button.mb-btn--arrow-circle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 50px;
    padding: 0;
    margin: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--mb-primary, #bb9a65);
    border: none;
    color: #ffffff;
    font-size: 12px;
    transition: all 0.5s ease-in-out;
    z-index: 3;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.mbe-cards-button.mb-btn--arrow-circle svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.mbe-cards-button.mb-btn--arrow-circle:hover {
    transform: none;
}

.mbe-cards-button.mb-btn--arrow-circle:hover svg {
    transform: rotate(45deg);
}

/* Arrow Circle: adjust content positioning */
.mbe-cards-content:has(.mb-btn--arrow-circle) {
    position: relative;
    padding-bottom: 70px;
    padding-right: 100px;
    align-items: flex-start;
    text-align: left;
}

/* Concave curve cutout for arrow-circle button */
.mbe-cards-item:has(.mb-btn--arrow-circle)::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 120px;
    height: 110px;
    background-color: #ffffff;
    z-index: 1;
    mask: url(../images/shape-bottom.svg) bottom right no-repeat;
    -webkit-mask: url(../images/shape-bottom.svg) bottom right no-repeat;
    mask-size: 100% 100%;
    -webkit-mask-size: 100% 100%;
}

/* =====================
   SWIPER CONTAINER
   ===================== */
.mbe-cards-swiper-container {
    display: flex;
    width: 100%;
    gap: 24px;
}

.mbe-cards-slider-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

/* =====================
   LEFT PANEL
   ===================== */
.mbe-cards-left-panel {
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px;
    background-color: #f8f8f8;
    border-radius: 16px;
}

.mbe-cards-left-panel-subtitle {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--mb-primary, #bb9a65);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.mbe-cards-left-panel-title {
    margin: 0 0 16px 0;
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
}

.mbe-cards-left-panel-description {
    margin: 0 0 24px 0;
    font-size: 15px;
    color: #666666;
    line-height: 1.6;
}

/* =====================
   NAVIGATION (Swiper)
   ===================== */
.mbe-cards-navigation {
    display: flex;
    gap: 8px;
    z-index: 10;
}

/* Custom position navigation (absolute to wrapper) */
.mbe-cards-wrapper > .mbe-cards-navigation.mbe-cards-nav-custom {
    position: absolute;
    right: auto;
    left: auto;
}

/* Left panel navigation */
.mbe-cards-navigation.mbe-cards-nav-left-panel {
    position: static;
    margin-top: auto;
}

.mbe-cards-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #ffffff;
    border: none;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.mbe-cards-nav-btn:hover {
    background-color: var(--mb-primary, #bb9a65);
    color: #ffffff;
}

.mbe-cards-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mbe-cards-nav-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
}

.mbe-cards-nav-btn:hover svg {
    stroke: currentColor;
}

/* =====================
   DOTS PAGINATION
   ===================== */
.mbe-cards-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.mbe-cards-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background-color: #e5e7eb;
    border-radius: 50%;
    opacity: 1;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mbe-cards-pagination .swiper-pagination-bullet:hover {
    background-color: #9ca3af;
}

.mbe-cards-pagination .swiper-pagination-bullet-active {
    background-color: #1a1a1a;
    transform: scale(1.2);
}

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 1024px) {
    .mbe-cards-mode-marquee .mbe-cards-item {
        width: 280px;
        min-width: 280px;
        height: 360px;
    }
    
    .mbe-cards-title {
        font-size: 20px;
    }
    
    .mbe-cards-description {
        font-size: 13px;
    }
    
    .mbe-cards-nav-btn {
        width: 40px;
        height: 40px;
    }
    
    .mbe-cards-left-panel {
        flex: 0 0 250px;
        padding: 24px;
    }
    
    .mbe-cards-left-panel-title {
        font-size: 24px;
    }
}

@media (max-width: 991px) {
    .mbe-cards-swiper-container {
        flex-direction: column;
    }
    
    .mbe-cards-left-panel {
        flex: none;
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 16px;
    }
    
    .mbe-cards-left-panel-subtitle {
        width: 100%;
        margin-bottom: 0;
    }
    
    .mbe-cards-left-panel-title {
        flex: 1;
        margin: 0;
    }
    
    .mbe-cards-left-panel-description {
        display: none;
    }
    
    .mbe-cards-navigation.mbe-cards-nav-left-panel {
        margin-top: 0;
    }
}

@media (max-width: 767px) {
    .mbe-cards-mode-marquee .mbe-cards-item {
        width: 260px;
        min-width: 260px;
        height: 320px;
        margin-right: 16px;
    }
    
    .mbe-cards-content {
        padding: 16px;
    }
    
    .mbe-cards-title {
        font-size: 18px;
    }
    
    .mbe-cards-description {
        font-size: 12px;
    }
    
    .mbe-cards-button:not(.mb-btn--arrow-circle) {
        padding: 8px 20px;
        font-size: 13px;
    }
    
    .mbe-cards-button.mb-btn--arrow-circle {
        width: 40px;
        height: 40px;
    }
    
    .mbe-cards-button.mb-btn--arrow-circle svg {
        width: 14px;
        height: 14px;
    }
    
    .mbe-cards-content:has(.mb-btn--arrow-circle) {
        padding-bottom: 55px;
        padding-right: 70px;
    }
    
    .mbe-cards-item:has(.mb-btn--arrow-circle)::after {
        width: 80px;
        height: 75px;
    }
    
    .mbe-cards-navigation {
        bottom: 15px;
        right: 15px;
        gap: 6px;
    }
    
    .mbe-cards-nav-btn {
        width: 36px;
        height: 36px;
    }
    
    .mbe-cards-nav-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* =====================
   REVIEW/TESTIMONIAL CARDS
   ===================== */
.mbe-cards-item--review {
    background-size: cover;
    background-position: center;
}

.mbe-cards-item--review .mbe-cards-review-stars {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}

.mbe-cards-star {
    width: 18px;
    height: 18px;
    display: block;
}

.mbe-cards-item--review .mbe-cards-review-location {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    display: block;
    margin-bottom: 8px;
}

.mbe-cards-item--review .mbe-cards-content {
    position: relative;
    padding-bottom: 70px;
    padding-right: 100px;
}

/* Shape-bottom curve for review card (same as arrow-circle) */
.mbe-cards-item--review::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 120px;
    height: 110px;
    background-color: #ffffff;
    z-index: 1;
    mask: url(../images/shape-bottom.svg) bottom right no-repeat;
    -webkit-mask: url(../images/shape-bottom.svg) bottom right no-repeat;
    mask-size: 100% 100%;
    -webkit-mask-size: 100% 100%;
}

/* Photo positioned like arrow-circle button */
.mbe-cards-item--review .mbe-cards-review-photo {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mbe-cards-item--review .mbe-cards-review-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hide shape and reset padding when no photo */
.mbe-cards-item--review.mbe-cards-item--no-photo::after {
    display: none;
}

.mbe-cards-item--review.mbe-cards-item--no-photo .mbe-cards-content {
    padding-right: 20px;
    padding-bottom: 24px;
}

@media (max-width: 767px) {
    .mbe-cards-item--review .mbe-cards-content {
        padding-bottom: 55px;
        padding-right: 70px;
    }
    
    .mbe-cards-item--review::after {
        width: 80px;
        height: 75px;
    }
    
    .mbe-cards-item--review .mbe-cards-review-photo {
        width: 40px;
        height: 40px;
    }
    
    .mbe-cards-item--review.mbe-cards-item--no-photo .mbe-cards-content {
        padding-right: 20px;
        padding-bottom: 24px;
    }
}
