/* Airbnb 2025 Enhanced Design System */

/* Smooth transitions for everything */
* {
    transition: all 0.2s ease;
}

/* Enhanced card hover effects */
.listing-card {
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.listing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

/* Image hover zoom effect */
.image-container {
    overflow: hidden;
    position: relative;
}

.image-container img {
    transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.image-container:hover img {
    transform: scale(1.05);
}

/* Heart button animation */
.heart-button {
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.heart-button:hover {
    transform: scale(1.1);
}

.heart-button:active {
    transform: scale(0.95);
}

/* Smooth fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Staggered animation for grid items */
.listing-card:nth-child(1) { animation-delay: 0.05s; }
.listing-card:nth-child(2) { animation-delay: 0.1s; }
.listing-card:nth-child(3) { animation-delay: 0.15s; }
.listing-card:nth-child(4) { animation-delay: 0.2s; }
.listing-card:nth-child(5) { animation-delay: 0.25s; }
.listing-card:nth-child(6) { animation-delay: 0.3s; }

/* Skeleton loading animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Button ripple effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::before {
    width: 300px;
    height: 300px;
}

/* Map marker bounce */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.marker-bounce {
    animation: bounce 0.5s ease;
}

/* Search bar focus effect */
.search-input {
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.search-input:focus {
    box-shadow: 0 0 0 4px rgba(255, 56, 92, 0.1);
    border-color: #FF385C;
}

/* Photo gallery slide effect */
.photo-slide {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.photo-slide-active {
    opacity: 1;
    transform: translateX(0);
}

.photo-slide-prev {
    opacity: 0;
    transform: translateX(-100%);
}

.photo-slide-next {
    opacity: 0;
    transform: translateX(100%);
}

/* Sticky header shadow on scroll */
.header-scrolled {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Filter pill hover effect */
.filter-pill {
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.filter-pill:hover {
    background-color: #F7F7F7;
    transform: translateY(-1px);
}

.filter-pill:active {
    transform: translateY(0);
}

/* Loading spinner */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner {
    animation: spin 1s linear infinite;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Tooltip animation */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    background: #222;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
}

.tooltip:hover::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* Card layout - align prices at bottom using flexbox */
.listing-card {
    display: flex !important;
    flex-direction: column;
    min-height: 100%;
}

.card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-price-section {
    margin-top: auto !important;
}

/* Map price marker hover effect */
.price-marker {
    transition: all 0.15s ease !important;
}

.price-marker:hover {
    background-color: #222222 !important;
    color: #FFFFFF !important;
    border-color: #222222 !important;
    box-shadow: 0 6px 16px rgba(0,0,0,0.35) !important;
    font-weight: 700 !important;
    transform: scale(1.1) !important;
    z-index: 1000 !important;
}

/* Leaflet zoom controls - keep below header (z-900) */
.leaflet-control-zoom,
.leaflet-bar {
    z-index: 100 !important;
}