/* ============================================
   Featured & New Chalets - Premium Card Design
   Inspired by Similar Properties with Enhancements
   ============================================ */

/* ===== Card Container ===== */
.rb-chalet-card {
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(78, 160, 60, 0.08);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.06),
        0 1px 4px rgba(78, 160, 60, 0.04);
    transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    animation: cardFadeIn 0.5s ease forwards;
    opacity: 0;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation for cards */
.swiper-slide:nth-child(1) .rb-chalet-card { animation-delay: 0.05s; }
.swiper-slide:nth-child(2) .rb-chalet-card { animation-delay: 0.1s; }
.swiper-slide:nth-child(3) .rb-chalet-card { animation-delay: 0.15s; }
.swiper-slide:nth-child(4) .rb-chalet-card { animation-delay: 0.2s; }
.swiper-slide:nth-child(5) .rb-chalet-card { animation-delay: 0.25s; }

/* Top gradient border on hover */
.rb-chalet-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4ea03c, #55a6aa, #f9a23c, #eccd8b);
    background-size: 200% 100%;
    animation: gradientSlide 6s ease infinite;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 10;
}

@keyframes gradientSlide {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.rb-chalet-card:hover::before {
    opacity: 1;
}

.rb-chalet-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow:
        0 16px 48px rgba(78, 160, 60, 0.16),
        0 4px 16px rgba(85, 166, 170, 0.12);
    border-color: rgba(78, 160, 60, 0.15);
}

/* ===== Image Container ===== */
.rb-chalet-img-wrap {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
}

.rb-chalet-img-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.12) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.rb-chalet-card:hover .rb-chalet-img-wrap::after {
    opacity: 1;
}

.rb-chalet-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.rb-chalet-card:hover .rb-chalet-img {
    transform: scale(1.12) rotate(1.5deg);
    filter: brightness(1.04);
}

/* ===== Wishlist Button ===== */
.rb-wishlist-btn {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 5;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

[dir="rtl"] .rb-wishlist-btn {
    left: auto;
    right: 14px;
}

.rb-wishlist-btn i {
    font-size: 20px;
    color: #dc2626;
    transition: all 0.3s ease;
}

.rb-wishlist-btn:hover {
    transform: scale(1.15);
    background: #fff;
    box-shadow: 0 6px 18px rgba(220, 38, 38, 0.25);
}

.rb-wishlist-btn:hover i {
    transform: scale(1.1);
}

.rb-wishlist-btn:active {
    transform: scale(0.95);
}

/* ===== Badges on Image ===== */
.rb-img-badge-bottom {
    position: absolute;
    top: 10px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 5;
    align-items: flex-end;
}

[dir="rtl"] .rb-img-badge-bottom {
    right: auto;
    left: 12px;
    align-items: flex-start;
}

.rb-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    animation: badgePulse 0.5s ease;
    transition: all 0.3s ease;
}

@keyframes badgePulse {
    0% { transform: scale(0.85); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.rb-badge-featured {
    background: rgba(249, 162, 60, 0.95);
    color: #fff;
}

.rb-badge-new {
    background: rgba(80, 182, 195, 0.95);
    color: #fff;
}

.rb-badge-discount {
    background: rgba(220, 38, 38, 0.95);
    color: #fff;
    animation: badgeBounce 0.6s ease;
}

@keyframes badgeBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.rb-badge i {
    font-size: 13px;
}

.rb-chalet-card:hover .rb-badge {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* ===== Card Body ===== */
.rb-chalet-body {
    padding: 20px;
    position: relative;
}

.rb-chalet-title {
    font-size: 19px;
    font-weight: 800;
    background: linear-gradient(135deg, #0d1f2d 0%, #4ea03c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: letter-spacing 0.3s ease;
}

.rb-chalet-card:hover .rb-chalet-title {
    letter-spacing: 0.3px;
}

/* ===== Location ===== */
.rb-chalet-location {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    background: rgba(85, 166, 170, 0.06);
    border-radius: 9px;
    border-left: 2.5px solid #55a6aa;
    transition: all 0.3s ease;
}

[dir="rtl"] .rb-chalet-location {
    border-left: none;
    border-right: 2.5px solid #55a6aa;
}

.rb-chalet-card:hover .rb-chalet-location {
    background: rgba(85, 166, 170, 0.1);
    padding-left: 14px;
}

[dir="rtl"] .rb-chalet-card:hover .rb-chalet-location {
    padding-left: 11px;
    padding-right: 14px;
}

.rb-chalet-location i {
    color: #55a6aa;
    font-size: 15px;
}

/* ===== Rating Section ===== */
.rb-chalet-rating {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 14px;
    padding: 9px 12px;
    background: linear-gradient(135deg, rgba(249, 162, 60, 0.08), rgba(236, 205, 139, 0.08));
    border-radius: 11px;
    border: 1px solid rgba(249, 162, 60, 0.14);
    transition: all 0.3s ease;
}

.rb-chalet-card:hover .rb-chalet-rating {
    background: linear-gradient(135deg, rgba(249, 162, 60, 0.12), rgba(236, 205, 139, 0.12));
    transform: translateX(3px);
}

[dir="rtl"] .rb-chalet-card:hover .rb-chalet-rating {
    transform: translateX(-3px);
}

.rb-stars {
    color: #f9a23c;
    font-size: 17px;
    letter-spacing: 1px;
    filter: drop-shadow(0 2px 3px rgba(249, 162, 60, 0.25));
}

.rb-chalet-rating small {
    color: #0d1f2d;
    font-weight: 700;
    font-size: 14px;
}

/* ===== Facilities Grid ===== */
.rb-facilities {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
    margin-bottom: 16px;
}

.rb-facility {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: #374151;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(78, 160, 60, 0.06), rgba(113, 176, 94, 0.06));
    padding: 9px 11px;
    border-radius: 10px;
    border: 1px solid rgba(78, 160, 60, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.rb-facility:hover {
    background: linear-gradient(135deg, rgba(78, 160, 60, 0.1), rgba(113, 176, 94, 0.1));
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(78, 160, 60, 0.14);
}

.rb-facility i {
    color: #4ea03c;
    font-size: 16px;
    flex-shrink: 0;
}

/* ===== Price Section ===== */
.rb-price-section {
    border-top: 2px solid transparent;
    border-image: linear-gradient(90deg, #4ea03c, #55a6aa, #f9a23c) 1;
    padding-top: 16px;
    margin-top: 16px;
    position: relative;
}

.rb-price-header {
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, rgba(249, 162, 60, 0.08), rgba(236, 205, 139, 0.08));
    padding: 6px 11px;
    border-radius: 8px;
    width: fit-content;
}

.rb-price-header i {
    color: #f9a23c;
    font-size: 14px;
}

.rb-price-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Price with Discount */
.rb-price-with-discount {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.rb-old-price {
    font-size: 14px;
    color: #9ca3af;
    text-decoration: line-through;
    font-weight: 600;
    opacity: 0.75;
}

.rb-new-price-wrap {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.rb-new-price {
    font-size: 24px;
    font-weight: 900;
    background: linear-gradient(135deg, #4ea03c 0%, #55a6aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    filter: drop-shadow(0 2px 3px rgba(78, 160, 60, 0.18));
    transition: transform 0.3s ease;
}

.rb-chalet-card:hover .rb-new-price {
    transform: scale(1.04);
}

.rb-currency-small {
    font-size: 13px;
    color: #6b7280;
    font-weight: 700;
}

.rb-save-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #fff;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 3px 10px rgba(220, 38, 38, 0.3);
    animation: savePulse 2s ease infinite;
}

@keyframes savePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Normal Price */
.rb-price-normal {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex: 1;
}

.rb-price-num {
    font-size: 24px;
    font-weight: 900;
    background: linear-gradient(135deg, #4ea03c 0%, #55a6aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    filter: drop-shadow(0 2px 3px rgba(78, 160, 60, 0.18));
    transition: transform 0.3s ease;
}

.rb-chalet-card:hover .rb-price-num {
    transform: scale(1.04);
}

/* ===== View Details Button ===== */
.rb-chalet-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #4ea03c 0%, #71b05e 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(78, 160, 60, 0.25);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    flex-shrink: 0;
}

.rb-chalet-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.rb-chalet-btn:hover::before {
    left: 100%;
}

.rb-chalet-btn:hover {
    background: linear-gradient(135deg, #3d8030 0%, #5a9049 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(78, 160, 60, 0.35);
    color: #fff;
}

.rb-chalet-btn:active {
    transform: translateY(0);
}

.rb-chalet-btn i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.rb-chalet-btn:hover i {
    transform: translateX(3px);
}

[dir="rtl"] .rb-chalet-btn:hover i {
    transform: translateX(-3px);
}

/* ===== New Variant Styling (Blue Theme) ===== */
.rb-new-variant .rb-badge-new {
    background: rgba(80, 182, 195, 0.95);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .rb-chalet-img-wrap {
        height: 200px;
    }

    .rb-chalet-title {
        font-size: 17px;
    }

    .rb-new-price,
    .rb-price-num {
        font-size: 23px;
    }
}

@media (max-width: 576px) {
    .rb-chalet-img-wrap {
        height: 180px;
    }

    .rb-chalet-body {
        padding: 16px;
    }

    .rb-chalet-title {
        font-size: 16px;
    }

    .rb-chalet-btn {
        padding: 10px 18px;
        font-size: 12px;
    }
}
