/* Core carousel structure */
.carousel-container {
    position: relative;
    width: 100%;
    margin: 20px 0;
    overflow: hidden;
}

.carousel-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    cursor: grab;
    touch-action: pan-y pinch-zoom;
}

.carousel-track:active, .carousel-track.dragging {
    cursor: grabbing;
}

/* Item styling */
.carousel-item {
    flex: 0 0 calc(33.333% - 20px);
    box-sizing: border-box;
    padding: 0 10px;
    margin-bottom: 20px;
}

.carousel-content {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 420px;
}

/* Image container */
.carousel-image-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    background-color: #f5f5f5;
}

.carousel-content:hover .carousel-image {
    transform: scale(1.05);
}

/* Badge styling */
.carousel-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start; /* Align badges to the left */
}

.carousel-badge {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    color: white;
    margin: 0 5px 5px 0;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.carousel-badge i {
    margin-right: 5px;
}

/* Content details */
.carousel-details {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.carousel-content-wrapper {
    flex-grow: 1;
}

.carousel-button-wrapper {
    margin-top: 15px;
}

.carousel-title {
    margin: 0 0 5px 0;
    font-size: 18px;
}

.carousel-title a {
    color: #2c3e50;
    text-decoration: none;
}

.carousel-location {
    color: #7f8c8d;
    margin: 0 0 10px 0;
    font-size: 14px;
}

.carousel-features {
    display: flex;
    flex-wrap: wrap;
    margin: 0 0 15px 0;
}

.carousel-feature {
    margin: 0 15px 5px 0;
    font-size: 14px;
    color: #555;
}

.carousel-description {
    margin: 0 0 15px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
    flex-grow: 1;
}

/* Button styling */
.carousel-view-button {
    display: inline-block;
    background: #e67e22 !important;
    color: white !important;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none !important;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s ease;
    margin-top: auto;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

.carousel-view-button:hover {
    background: #d35400 !important;
    color: white !important;
    text-decoration: none !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(230, 126, 34, 0.3);
}

/* Title hover effect */
.carousel-title a:hover {
    color: #e67e22 !important;
    text-decoration: none !important;
}

/* Arrow controls */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9) !important;
    border: none;
    border-radius: 50%;
    width: 40px !important;
    height: 40px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    color: #333;
    font-size: 18px;
    transition: all 0.3s ease;
    opacity: 1 !important;
}

.carousel-arrow:hover {
    background-color: #e67e22 !important;
    color: white !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4) !important;
}

.carousel-prev {
    left: 5px;
}

.carousel-next {
    right: 5px;
}

/* Badge color classes */
.carousel-new { background-color: #f39c12; } /* Distinctive golden yellow for "New" badge */
.carousel-hot-tub { background-color: #e67e22; }
.carousel-wifi { background-color: #3498db; }
.carousel-beach { background-color: #1abc9c; }
.carousel-garden { background-color: #27ae60; }
.carousel-romantic { background-color: #e84393; }
.carousel-fishing { background-color: #2980b9; }
.carousel-pub { background-color: #8e44ad; }
.carousel-fire { background-color: #d35400; }
.carousel-rural { background-color: #16a085; }
.carousel-forest { background-color: #1e8449; }
.carousel-treehouse { background-color: #6d4c41; }
.carousel-hut { background-color: #795548; }
.carousel-pool { background-color: #0097e6; }
.carousel-golf { background-color: #7f8c8d; }
.carousel-miles { background-color: #566573; display: inline-flex !important; }

/* Responsive layout */
@media (max-width: 1024px) {
    .carousel-item {
        flex: 0 0 calc(50% - 20px);
    }
}

@media (max-width: 768px) {
    .carousel-item {
        flex: 0 0 90% !important;
        max-width: 90% !important;
    }
}

/* Card styling for active state */
.carousel-item.active-card .carousel-content {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

/* Improved mobile styling */
@media (max-width: 768px) {
    .carousel-container {
        padding: 0 10px;
        margin: 20px 0;
    }
    
    .carousel-wrapper {
        overflow: visible;
        padding: 0;
    }
    
    .carousel-track {
        padding: 10px 0;
        gap: 20px;
    }
    
    .carousel-item {
        flex: 0 0 90%;
        max-width: 90%;
        margin: 0;
        padding: 0;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }
    
    .carousel-item:not(.active-card) {
        opacity: 0.8;
        transform: scale(0.95);
    }
    
    .carousel-item.active-card {
        opacity: 1;
        transform: scale(1);
    }
    
    /* Make navigation buttons more prominent on mobile */
    .carousel-arrow {
        width: 50px !important;
        height: 50px !important;
        background-color: rgba(255, 255, 255, 0.95) !important;
        border: 2px solid #e67e22 !important;
        font-size: 20px !important;
        z-index: 200 !important;
    }
    
    .carousel-prev {
        left: 10px;
    }
    
    .carousel-next {
        right: 10px;
    }
    
    /* Ensure adequate spacing for touch targets */
    .carousel-view-button {
        padding: 12px 20px;
        margin-top: 5px;
        font-size: 16px;
        width: 100%;
        text-align: center;
    }
    
    /* Mobile content adjustments */
    .carousel-content {
        margin: 0 auto;
        max-width: 100%;
        min-height: 450px;
    }
    
    .carousel-details {
        padding: 20px;
    }
    
    .carousel-button-wrapper {
        margin-top: 20px;
    }
    
    .carousel-title {
        font-size: 20px;
        margin-bottom: 8px;
    }
    
    .carousel-location {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .carousel-features {
        margin-bottom: 16px;
    }
    
    .carousel-feature {
        margin-right: 20px;
        margin-bottom: 8px;
        font-size: 15px;
    }
    
    .carousel-description {
        font-size: 15px;
        line-height: 1.6;
        margin-bottom: 20px;
    }
}

.carousel-image-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.active-card {
    outline: 2px solid #e67e22;
}
