/* 
 * Modern Room Cards CSS
 * Version: 2.0
 * Description: Современный дизайн карточек номеров с анимациями, shadows, и responsive layout
 */

/* ============================================================================
   Room Cards Container & Grid
   ============================================================================ */

.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    padding: 20px 0;
    width: 100%;
}

@media (max-width: 768px) {
    .rooms-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (min-width: 769px) and (max-width: 1200px) {
    .rooms-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1201px) {
    .rooms-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================================================
   Room Card Base Styles
   ============================================================================ */

.room-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07),
        0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.room-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12),
        0 8px 16px rgba(0, 0, 0, 0.08);
}

/* ============================================================================
   Room Image Section
   ============================================================================ */

.room-image {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.room-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.room-card:hover .room-image img {
    transform: scale(1.1);
}

/* Skeleton Loader */
.room-image.loading {
    background: linear-gradient(90deg,
            #f0f0f0 25%,
            #e0e0e0 50%,
            #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Lazy Load Blur Effect */
.room-image img[data-src] {
    filter: blur(10px);
    transition: filter 0.3s;
}

.room-image img.loaded {
    filter: blur(0);
}

/* ============================================================================
   Badges & Labels
   ============================================================================ */

.room-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.room-badge.available {
    background: rgba(16, 185, 129, 0.9);
    color: white;
}

.room-badge.unavailable {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

.room-discount-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    color: white;
    padding: 8px 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    animation: pulse-scale 2s infinite;
}

@keyframes pulse-scale {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.room-photo-count {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ============================================================================
   Room Content Section
   ============================================================================ */

.room-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.room-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 16px;
}

.room-info h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.room-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 14px;
}

.room-meta i {
    color: #3b82f6;
}

/* ============================================================================
   Pricing Section
   ============================================================================ */

.room-price {
    text-align: right;
    flex-shrink: 0;
}

.price {
    font-size: 26px;
    font-weight: 800;
    color: #3b82f6;
    line-height: 1.2;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-old {
    font-size: 16px;
    color: #9ca3af;
    text-decoration: line-through;
    margin-bottom: 4px;
}

.price-with-discount {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.price-period {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
}

/* ============================================================================
   Room Description
   ============================================================================ */

.room-description {
    color: #4b5563;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 16px 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================================================
   Amenities (если добавите)
   ============================================================================ */

.room-amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.amenity-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f3f4f6;
    border-radius: 20px;
    font-size: 12px;
    color: #4b5563;
}

.amenity-tag i {
    color: #3b82f6;
    font-size: 14px;
}

/* ============================================================================
   Action Buttons
   ============================================================================ */

.room-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.room-actions button {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover {
    background: #e5e7eb;
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

.btn-primary i {
    transition: transform 0.3s ease;
}

.btn-primary:hover i {
    transform: translateX(4px);
}

/* ============================================================================
   Loading State
   ============================================================================ */

.room-card.loading {
    pointer-events: none;
}

.room-card.loading .room-content {
    position: relative;
}

.room-card.loading .room-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(2px);
    z-index: 10;
}

/* ============================================================================
   Empty State
   ============================================================================ */

.rooms-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
}

.rooms-empty i {
    font-size: 64px;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.rooms-empty h3 {
    font-size: 24px;
    color: #64748b;
    margin-bottom: 12px;
}

.rooms-empty p {
    color: #94a3b8;
    font-size: 16px;
}

/* ============================================================================
   Animations
   ============================================================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.room-card[data-aos="fade-up"] {
    animation: slideUp 0.6s ease-out forwards;
}

/* Stagger animation for multiple cards */
.room-card:nth-child(1) {
    animation-delay: 0s;
}

.room-card:nth-child(2) {
    animation-delay: 0.1s;
}

.room-card:nth-child(3) {
    animation-delay: 0.2s;
}

.room-card:nth-child(4) {
    animation-delay: 0.3s;
}

.room-card:nth-child(5) {
    animation-delay: 0.4s;
}

.room-card:nth-child(6) {
    animation-delay: 0.5s;
}

/* ============================================================================
   Responsive Adjustments
   ============================================================================ */

@media (max-width: 480px) {
    .room-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .room-price {
        text-align: left;
    }

    .room-actions {
        flex-direction: column;
    }

    .room-actions button {
        width: 100%;
    }
}

/* ============================================================================
   Dark Mode Support (Optional)
   ============================================================================ */

@media (prefers-color-scheme: dark) {
    .room-card {
        background: #1f2937;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }

    .room-card:hover {
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    }

    .room-info h3 {
        color: #f9fafb;
    }

    .room-description {
        color: #d1d5db;
    }

    .btn-secondary {
        background: #374151;
        color: #f9fafb;
    }

    .btn-secondary:hover {
        background: #4b5563;
    }
}