/* Дополнительные стили для публичной части (поверх Tailwind CDN) */

/* Smooth transitions */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Sticky header */
.header-sticky {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Карточки студий и залов */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Галерея / Lightbox Slider */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    z-index: 10;
}

.lightbox-counter {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
}

.lightbox-close {
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    transition: background 0.2s;
    line-height: 1;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.25);
}

.lightbox-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 80px;
    box-sizing: border-box;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    user-select: none;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10;
    user-select: none;
}

.lightbox-nav:hover {
    background: rgba(255,255,255,0.3);
}

.lightbox-nav.prev {
    left: 16px;
}

.lightbox-nav.next {
    right: 16px;
}

.lightbox-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.lightbox-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.lightbox-dot.active {
    background: white;
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .lightbox-content {
        padding: 60px 16px;
    }
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    .lightbox-nav.prev { left: 6px; }
    .lightbox-nav.next { right: 6px; }
}

/* Мобильное меню (drawer) */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    z-index: 999;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
    left: 0;
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    display: none;
}

.mobile-overlay.active {
    display: block;
}

/* Фильтры drawer на мобильных */
.filters-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 90vw;
    height: 100vh;
    background: white;
    z-index: 999;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
}

.filters-drawer.active {
    right: 0;
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #3478c4;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Рейтинг звезды */
.stars {
    color: #fbbf24;
}

/* Метро бейдж */
.metro-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
}

.metro-badge-m {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
}

/* Truncate text */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Skeleton loader */
.skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive utilities */
@media (max-width: 768px) {
    .filters-sidebar {
        display: none;
    }
}

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

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #3478c4;
    outline-offset: 2px;
}

/* ==================== Photo Gallery (Airbnb Style) ==================== */
.photo-gallery {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 8px;
    height: 336px;
    border-radius: 16px;
    overflow: hidden;
}

.photo-gallery-hero {
    position: relative;
    overflow: hidden;
    border-radius: 12px 0 0 12px;
}

.photo-gallery-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-gallery-hero:hover img {
    transform: scale(1.05);
}

.photo-gallery-thumbs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
}

.photo-gallery-thumbs a {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.photo-gallery-thumbs a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.photo-gallery-thumbs a:hover img {
    transform: scale(1.05);
}

/* Галерея с одним фото — на всю ширину */
.photo-gallery-single {
    grid-template-columns: 1fr;
}

.photo-gallery-single .photo-gallery-hero {
    border-radius: 12px;
}

/* .photo-gallery-view-all теперь рендерится снаружи галереи через flex justify-end */

/* Mobile responsiveness for gallery */
@media (max-width: 768px) {
    .photo-gallery {
        grid-template-columns: 1fr;
        height: 220px;
    }
    
    .photo-gallery-hero {
        border-radius: 12px;
    }
    
    .photo-gallery-thumbs {
        display: none;
    }
    
    .photo-gallery-view-all {
        bottom: 16px;
        right: 16px;
    }
}

/* ==================== Map Section ==================== */
.map-section {
    width: 100%;
    margin-top: 48px;
    margin-bottom: 0;
}

#studio-map {
    width: 100%;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.address-fallback {
    width: 100%;
    margin-top: 48px;
    padding: 32px;
    background: white;
    border: 2px dashed #e5e7eb;
    border-radius: 12px;
    text-align: center;
    color: #6b7280;
    font-size: 16px;
}

/* ==================== Studio Info Card (on Hall Page) ==================== */
.studio-info-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 24px;
    transition: box-shadow 0.2s ease;
}

.studio-info-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.studio-info-photo {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f3f4f6;
}

.studio-info-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.studio-info-details {
    flex: 1;
    min-width: 0;
}

.studio-info-name {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
    transition: color 0.2s ease;
}

.studio-info-name:hover {
    color: #2460a8;
}

.studio-info-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #6b7280;
}

/* ==================== Badges ==================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.badge-primary {
    background: #ddeaf7;
    color: #1a4d85;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-gray {
    background: #f3f4f6;
    color: #4b5563;
}

/* Hall characteristics badges */
.hall-specs-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.hall-specs-badges .badge {
    font-size: 15px;
    padding: 8px 14px;
}

/* ==================== Current Day Highlight in Schedule ==================== */
.schedule-day {
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.schedule-day.today {
    background: #ddeaf7;
    font-weight: 600;
}

/* ==================== Featured Price Badge ==================== */
.pricing-item {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.pricing-item.featured {
    background: #eef5fb;
    border-color: #3478c4;
    box-shadow: 0 0 0 1px #3478c4;
}

.pricing-item.featured .pricing-label {
    color: #1a4d85;
    font-weight: 600;
}

/* ==================== Hall Cards with Price Overlay ==================== */
.hall-card-with-badge {
    position: relative;
}

.hall-card-price-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: white;
    color: #1f2937;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
}
