/* ============================================
   ОСНОВНЫЕ СТИЛИ RENTLY APARTMENTS AI 3.1
   ============================================ */

/* Сброс и базовые стили */
.rently-ai-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    padding: 20px;
    color: #333;
    line-height: 1.6;
    background: #f8fafc;
    min-height: 100vh;
}

/* ========== НОВЫЙ ХЕДЕР RENTLY ========== */
.rently-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 24px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.25);
    position: relative;
    overflow: hidden;
}

.rently-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.3;
    animation: floatBackground 60s linear infinite;
}

@keyframes floatBackground {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(30px, 30px) rotate(360deg); }
}

.rently-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 2;
}

.logo-icon {
    font-size: 70px;
    animation: bounce 3s ease-in-out infinite;
    filter: drop-shadow(0 8px 20px rgba(0,0,0,0.2));
}

@keyframes bounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-15px) scale(1.05); }
}

.rently-logo h1 {
    font-size: 52px;
    font-weight: 900;
    margin: 0;
    letter-spacing: -0.5px;
    text-shadow: 0 4px 12px rgba(0,0,0,0.2);
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-subtitle {
    font-size: 18px;
    opacity: 0.95;
    background: rgba(255, 255, 255, 0.15);
    padding: 10px 25px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    font-weight: 500;
}

/* ========== AI-ЧАТ ========== */
.ai-chat-widget {
    background: white;
    border-radius: 24px;
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 40px;
    border: 1px solid #eef2f7;
}

/* Аватар помощника */
.chat-header {
    padding: 25px 30px;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

.ai-avatar {
    display: flex;
    align-items: center;
    gap: 20px;
}

.avatar-icon {
    width: 75px;
    height: 75px;
    background: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    box-shadow: 0 10px 30px rgba(0, 210, 255, 0.3);
    border: 4px solid white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 10px 30px rgba(0, 210, 255, 0.3); }
    50% { box-shadow: 0 10px 40px rgba(0, 210, 255, 0.5); }
    100% { box-shadow: 0 10px 30px rgba(0, 210, 255, 0.3); }
}

.ai-info h3 {
    margin: 0 0 6px 0;
    font-size: 24px;
    color: #2d3748;
    font-weight: 700;
}

.ai-info p {
    margin: 0;
    color: #718096;
    font-size: 15px;
    font-weight: 500;
}

/* Сообщения чата */
.chat-messages {
    padding: 25px;
    min-height: 200px;
    max-height: 500px;
    overflow-y: auto;
    background: #f8fafc;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

.message {
    margin-bottom: 18px;
    padding: 18px 24px;
    border-radius: 20px;
    max-width: 85%;
    line-height: 1.7;
    font-size: 15.5px;
    word-wrap: break-word;
    animation: fadeInUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.ai-message {
    background: white;
    border: 1px solid #e2e8f0;
    margin-right: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    border-left: 5px solid #4299e1;
}

.ai-message h3 {
    color: #2d3748;
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 700;
}

.ai-message p {
    margin: 8px 0;
    color: #4a5568;
}

.user-message {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    margin-left: auto;
    box-shadow: 0 6px 20px rgba(66, 153, 225, 0.25);
}

/* Ссылка для перехода к результатам */
.scroll-to-results {
    display: inline-block;
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white !important;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 15px;
    transition: all 0.3s;
    border: none;
    font-size: 15px;
    cursor: pointer;
}

.scroll-to-results:hover {
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
    transform: translateX(8px);
    box-shadow: 0 8px 25px rgba(66, 153, 225, 0.3);
}

/* ========== ПОЛЕ ВВОДА И КНОПКИ ========== */
.chat-input {
    padding: 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 12px;
    background: white;
    align-items: center;
    flex-wrap: nowrap;
    flex-direction: column;
}

.chat-input input {
    flex: 1;
    padding: 16px 22px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 16px;
    transition: all 0.3s;
    outline: none;
    background: #f8fafc;
    min-width: 0;
    min-height: 55px;
    box-sizing: border-box;
    width: 100%;
}

.chat-input input:focus {
    border-color: #4299e1;
    background: white;
    box-shadow: 0 0 0 4px rgba(66, 153, 225, 0.1);
}

.chat-input-controls {
    display: flex;
    gap: 12px;
    width: 100%;
}

.chat-input-controls button {
    padding: 16px 28px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
    flex-shrink: 0;
    min-height: 55px;
}

#send-message {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    flex: 1;
}

#send-message:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(66, 153, 225, 0.3);
}

/* Упрощенный микрофон */
#voice-input {
    background: #4a5568;
    color: white;
    width: 55px;
    min-width: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    transition: all 0.3s;
    cursor: pointer;
}

#voice-input:hover {
    background: #2d3748;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

#voice-input.recording {
    background: #f56565;
    animation: pulse-simple 1.5s infinite;
    position: relative;
}

#voice-input.recording:before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(245, 101, 101, 0.3);
    animation: recording-ring 1.5s infinite;
}

@keyframes pulse-simple {
    0% { box-shadow: 0 0 0 0 rgba(245, 101, 101, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(245, 101, 101, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 101, 101, 0); }
}

@keyframes recording-ring {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* Быстрые кнопки */
.quick-buttons {
    padding: 15px 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.quick-btn {
    padding: 12px 22px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14.5px;
    font-weight: 600;
    transition: all 0.2s;
    color: #4a5568;
    flex-shrink: 0;
}

.quick-btn:hover {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    border-color: #4299e1;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 153, 225, 0.2);
}

/* Кнопка очистки чата */
.chat-actions {
    padding: 18px 20px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    text-align: center;
}

.clear-chat-btn {
    background: linear-gradient(135deg, #fc8181 0%, #f56565 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.clear-chat-btn:hover {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 101, 101, 0.3);
}

/* ========== СТИЛИ ДЛЯ КОНТАКТОВ В AI-ЧАТЕ ========== */
.contact-options {
    margin-top: 15px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.contact-option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 15px;
}

.contact-option i {
    color: #4299e1;
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.contact-option span {
    color: #718096;
    font-weight: 500;
}

.contact-link {
    color: #2d3748;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: #4299e1;
    text-decoration: underline;
}

.messenger-icons {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

.messenger-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 18px;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.messenger-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.messenger-icon.telegram {
    background: linear-gradient(135deg, #0088cc 0%, #34aadc 100%);
}

.messenger-icon.whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
}

.messenger-icon.viber {
    background: linear-gradient(135deg, #7360f2 0%, #8b5cf6 100%);
}

/* ========== КАРТОЧКИ КВАРТИР ========== */
.apartments-results {
    margin-top: 30px;
}

.apartment-card {
    background: white;
    border-radius: 20px;
    margin-bottom: 25px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.apartment-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border-color: #4299e1;
}

/* Фото в карточке */
.card-photo-container {
    width: 100%;
    height: 260px;
    overflow: hidden;
    position: relative;
}

.card-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.apartment-card:hover .card-photo {
    transform: scale(1.1);
}

.photo-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

/* Бейдж 3D тура на фото */
.panorama-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.2);
    z-index: 2;
    box-shadow: 0 4px 15px rgba(237, 137, 54, 0.3);
}

.card-content {
    padding: 25px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}

.card-header h3 {
    margin: 0;
    font-size: 23px;
    color: #2d3748;
    font-weight: 800;
    flex: 1;
    line-height: 1.3;
}

.apartment-price {
    font-size: 30px;
    font-weight: 900;
    color: #38a169;
    margin-left: 15px;
    white-space: nowrap;
}

.apartment-address {
    color: #718096;
    margin-bottom: 16px;
    font-size: 15.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.apartment-address i {
    color: #718096;
    margin-right: 6px;
    font-size: 14px;
}

.apartment-details {
    display: flex;
    gap: 15px;
    color: #4a5568;
    margin-bottom: 22px;
    font-size: 14px;
    flex-wrap: wrap;
}

.apartment-details span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #f7fafc;
    padding: 8px 15px;
    border-radius: 10px;
    font-weight: 500;
    border: 1px solid #e2e8f0;
}

.apartment-details span i {
    color: #4299e1;
    margin-right: 5px;
    font-size: 13px;
}

/* ========== КОМПАКТНЫЕ КОНТАКТЫ В КАРТОЧКЕ ========== */
.compact-contacts {
    margin: 15px 0;
    padding: 12px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.contacts-title {
    font-size: 13px;
    color: #718096;
    margin-bottom: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

.contacts-title:before {
    content: "📞";
    font-size: 14px;
}

.contact-icons-row {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.contact-icon-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    transition: all 0.3s ease;
    font-size: 18px;
    color: white;
    position: relative;
    border: 2px solid transparent;
}

.contact-icon-link:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    text-decoration: none !important;
    border-color: white;
}

.contact-icon-link i {
    font-size: 18px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Убираем любое подчеркивание для ссылок в контактах */
.contact-icon-link,
.contact-icon-link:hover,
.contact-icon-link:focus,
.contact-icon-link:active {
    text-decoration: none !important;
    outline: none;
}

/* Цвета иконок в компактных контактах */
.contact-icon-link.phone {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
}

.contact-icon-link.telegram {
    background: linear-gradient(135deg, #0088cc 0%, #34aadc 100%);
}

.contact-icon-link.whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
}

.contact-icon-link.viber {
    background: linear-gradient(135deg, #7360f2 0%, #8b5cf6 100%);
}

/* ========== КНОПКИ ДЕЙСТВИЙ В КАРТОЧКЕ ========== */
.card-actions {
    display: flex;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

/* Для 3 кнопок (когда есть 3D тур) */
.card-actions.has-3d {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 12px;
}

/* Для 2 кнопок (когда нет 3D тура) */
.card-actions.no-3d {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
}

/* Базовые стили для всех кнопок в карточках */
.card-actions > * {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15.5px;
    transition: all 0.3s;
    text-decoration: none !important;
    color: white !important;
    border: none;
    cursor: pointer;
    text-align: center;
    min-height: 54px;
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
}

.card-actions > *:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    text-decoration: none !important;
    color: white !important;
}

/* Конкретные цвета для кнопок */
.card-actions .btn-view-details {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
}

.card-actions .btn-3d-tour {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
}

.card-actions .btn-call {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
}

.card-actions i {
    margin-right: 8px;
    font-size: 15px;
    flex-shrink: 0;
}

/* Текст в кнопках */
.card-actions .btn-text {
    flex: 1;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    padding: 0 2px;
}

/* ========== МОДАЛЬНОЕ ОКНО ДЕТАЛЕЙ ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(5px);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    margin: 40px auto;
    width: 90%;
    max-width: 900px;
    border-radius: 28px;
    position: relative;
    animation: slideUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}

@keyframes slideUp {
    from { transform: translateY(80px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal .close {
    position: absolute;
    right: 25px;
    top: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #2d3748;
    z-index: 100;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: white;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
    line-height: 1;
    padding: 0;
    text-align: center;
}

.modal .close:hover {
    background: #f56565;
    color: white;
    border-color: #f56565;
    transform: rotate(90deg) scale(1.1);
}

.modal-body {
    padding: 40px;
}

/* Галерея в модальном окне */
.apartment-gallery {
    margin-bottom: 35px;
    border-radius: 20px;
    overflow: hidden;
    background: #f8fafc;
    padding: 20px;
}

.main-photo-container {
    width: 100%;
    height: 450px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
    background: #e2e8f0;
}

.main-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.photo-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 15px;
    transform: translateY(-50%);
    z-index: 10;
}

.nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e2e8f0;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2d3748;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 0;
    line-height: 1;
}

.nav-btn:hover {
    background: white;
    transform: scale(1.1);
    color: #4299e1;
    border-color: #4299e1;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.photo-thumbnails {
    display: flex;
    gap: 15px;
    padding: 15px 5px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f1f1f1;
}

.photo-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.photo-thumbnails::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.photo-thumbnails::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.photo-thumb {
    width: 110px;
    height: 85px;
    border-radius: 12px;
    object-fit: cover;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s;
    background: #e2e8f0;
}

.photo-thumb:hover {
    border-color: #4299e1;
    transform: translateY(-5px);
}

.photo-thumb.active {
    border-color: #4299e1;
    box-shadow: 0 6px 20px rgba(66, 153, 225, 0.4);
}

.modal-title {
    margin: 0 0 12px 0;
    color: #2d3748;
    font-size: 34px;
    font-weight: 900;
    line-height: 1.2;
}

.modal-price {
    font-size: 38px;
    font-weight: 900;
    color: #38a169;
    margin-bottom: 18px;
}

.modal-address {
    color: #718096;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 2px solid #e2e8f0;
    font-size: 19px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.modal-description {
    margin-bottom: 40px;
    font-size: 17px;
    line-height: 1.8;
    color: #4a5568;
    background: #f8fafc;
    padding: 25px;
    border-radius: 16px;
    border-left: 5px solid #4299e1;
}

/* Секция 3D тура в модальном окне */
.panorama-section {
    margin: 35px 0;
    padding: 25px;
    background: linear-gradient(135deg, #f8fafc 0%, #f0f4f8 100%);
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    text-align: center;
}

.panorama-section h4 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 24px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.panorama-section h4 i {
    color: #ed8936;
}

.panorama-section p {
    color: #718096;
    margin-bottom: 20px;
    font-size: 16px;
}

/* Большая кнопка 3D тура */
.btn-panorama {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    color: white;
    padding: 18px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(237, 137, 54, 0.3);
    border: 2px solid transparent;
}

.btn-panorama:hover {
    background: linear-gradient(135deg, #dd6b20 0%, #c05621 100%);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(237, 137, 54, 0.4);
    color: white;
    border-color: white;
}

.btn-panorama i {
    font-size: 22px;
}

.panorama-note {
    margin-top: 15px;
    color: #a0aec0;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.panorama-note i {
    color: #4299e1;
}

/* Удобства в модальном окне */
.amenities-section {
    margin: 35px 0;
}

.amenities-section h4 {
    color: #2d3748;
    margin-bottom: 22px;
    font-size: 24px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
}

.amenities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}

.amenity-item {
    padding: 18px;
    background: #f8fafc;
    border-radius: 14px;
    font-size: 15.5px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.3s;
    border-left: 5px solid #4299e1;
    border: 1px solid #e2e8f0;
}

.amenity-item:hover {
    background: #edf2f7;
    transform: translateX(8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

/* Контакты в модальном окне */
.contacts-section {
    margin-top: 45px;
    padding-top: 35px;
    border-top: 2px solid #e2e8f0;
}

.contacts-section h4 {
    color: #2d3748;
    margin-bottom: 28px;
    font-size: 26px;
    font-weight: 800;
}

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 22px;
}

.contact-item {
    padding: 28px;
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
    border-radius: 18px;
    text-align: center;
    transition: all 0.4s;
    border: 1px solid #e2e8f0;
}

.contact-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    border-color: #4299e1;
}

.contact-icon {
    margin-bottom: 15px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-icon i {
    font-size: 32px;
    transition: all 0.3s ease;
}

/* Цвета для иконок в модальном окне */
.contact-icon .fa-phone-alt {
    color: #4299e1;
}

.contact-icon .fa-telegram-plane {
    color: #0088cc;
}

.contact-icon .fa-whatsapp {
    color: #25d366;
}

.contact-icon .fa-viber {
    color: #7360f2;
}

/* Иконка в заголовке */
.contacts-section h4 .fa-headset {
    color: #4299e1;
    margin-right: 8px;
    font-size: 24px;
}

/* Эффекты при наведении */
.contact-item:hover .contact-icon i {
    transform: scale(1.1);
}

.contact-item:hover .contact-icon .fa-phone-alt {
    color: #3182ce;
}

.contact-item:hover .contact-icon .fa-telegram-plane {
    color: #0077b5;
}

.contact-item:hover .contact-icon .fa-whatsapp {
    color: #128c7e;
}

.contact-item:hover .contact-icon .fa-viber {
    color: #5b4bc4;
}

.contact-item h5 {
    margin: 0 0 12px 0;
    color: #2d3748;
    font-size: 18px;
    font-weight: 700;
}

.contact-link {
    color: #4299e1;
    text-decoration: none;
    font-weight: 600;
    font-size: 16.5px;
    word-break: break-all;
    display: inline-block;
    transition: color 0.3s;
}

.contact-link:hover {
    color: #3182ce;
    text-decoration: underline;
}

/* ========== МОДАЛЬНОЕ ОКНО ГАЛЕРЕИ ========== */
.gallery-modal .gallery-content {
    background: rgba(0, 0, 0, 0.95);
    margin: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gallery-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    cursor: pointer;
    color: white;
    z-index: 100;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    transition: all 0.3s;
    border: 1px solid rgba(255,255,255,0.3);
    line-height: 1;
    padding: 0;
}

.gallery-close:hover {
    background: #f56565;
    transform: rotate(90deg) scale(1.1);
    border-color: #f56565;
}

.gallery-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 35px;
    width: 100%;
    max-height: 75vh;
}

#gallery-main-img {
    max-width: 90%;
    max-height: 75vh;
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.gallery-thumbnails {
    display: flex;
    gap: 18px;
    justify-content: center;
    padding: 25px;
    overflow-x: auto;
    max-width: 90%;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
}

.gallery-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

.gallery-thumb {
    width: 130px;
    height: 95px;
    border-radius: 12px;
    object-fit: cover;
    cursor: pointer;
    border: 3px solid transparent;
    opacity: 0.7;
    transition: all 0.3s;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
}

.gallery-thumb:hover,
.gallery-thumb.active {
    opacity: 1;
    border-color: white;
    transform: scale(1.08);
    box-shadow: 0 8px 30px rgba(255,255,255,0.2);
}

/* ========== УТИЛИТЫ ========== */
.spinner {
    border: 4px solid rgba(66, 153, 225, 0.1);
    border-top: 4px solid #4299e1;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    animation: spin 1s linear infinite;
    margin: 50px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    color: #c53030;
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    margin: 25px 0;
    border-left: 5px solid #f56565;
    box-shadow: 0 8px 25px rgba(245, 101, 101, 0.1);
}

.error-message strong {
    font-size: 18px;
    display: block;
    margin-bottom: 10px;
}

.no-results {
    text-align: center;
    padding: 50px 30px;
    color: #718096;
    font-size: 18px;
    background: #f8fafc;
    border-radius: 20px;
    margin: 25px 0;
    border: 2px dashed #cbd5e0;
}

.welcome-screen {
    text-align: center;
    padding: 50px 30px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    margin: 30px 0;
}

.welcome-screen h2 {
    color: #2d3748;
    font-size: 32px;
    margin-bottom: 15px;
}

.welcome-text {
    color: #718096;
    font-size: 18px;
    margin-bottom: 40px;
}

button:focus,
input:focus {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
}

.ai-chat-widget,
.apartment-card,
.modal-content,
.gallery-content {
    transition: all 0.3s ease;
}

.voice-pulse {
    display: none;
}

/* Заголовок результатов */
.results-header {
    margin-bottom: 25px;
    text-align: center;
}

.results-header h2 {
    color: #2d3748;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.results-header p {
    color: #718096;
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 768px) {
    .rently-ai-container {
        padding: 15px;
    }
    
    .rently-header {
        padding: 25px 15px;
        border-radius: 20px;
    }
    
    .rently-logo h1 {
        font-size: 42px;
    }
    
    .logo-icon {
        font-size: 60px;
    }
    
    .logo-subtitle {
        font-size: 16px;
        padding: 8px 20px;
    }
    
    .ai-avatar {
        gap: 15px;
    }
    
    .avatar-icon {
        width: 65px;
        height: 65px;
        font-size: 32px;
    }
    
    .ai-info h3 {
        font-size: 20px;
    }
    
    .chat-input {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .chat-input input {
        width: 100%;
        order: 1;
        min-height: 50px;
        font-size: 16px;
        padding: 14px 20px;
    }
    
    .chat-input-controls {
        flex-direction: row;
        order: 2;
        width: 100%;
    }
    
    #send-message {
        order: 1;
        flex: 3;
        min-width: auto;
        padding: 14px;
        font-size: 15px;
        min-height: 50px;
        border-radius: 50px;
    }
    
    #voice-input {
        order: 2;
        flex: 1;
        width: auto;
        min-width: 50px;
        min-height: 50px;
        padding: 0;
        border-radius: 50%;
        margin-top: 0;
        font-size: 20px;
    }
    
    .quick-buttons {
        gap: 10px;
        justify-content: center;
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding: 12px;
        -webkit-overflow-scrolling: touch;
    }
    
    .quick-btn {
        padding: 10px 18px;
        font-size: 13.5px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px auto;
        border-radius: 20px;
    }
    
    .modal-body {
        padding: 25px 20px;
    }
    
    .main-photo-container {
        height: 300px;
    }
    
    .modal .close {
        right: 15px;
        top: 15px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .photo-nav {
        padding: 0 10px;
    }
    
    .amenities-grid {
        grid-template-columns: 1fr;
    }
    
    .contacts-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-content {
        padding: 20px 15px;
    }
    
    #gallery-main-img {
        max-width: 95%;
        max-height: 60vh;
    }
    
    .gallery-thumb {
        width: 90px;
        height: 65px;
    }
    
    .gallery-close {
        right: 15px;
        top: 15px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    .card-photo-container {
        height: 220px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .apartment-price {
        margin-left: 0;
        font-size: 28px;
    }
    
    .compact-contacts {
        padding: 10px;
        margin: 12px 0;
    }
    
    .contact-icons-row {
        gap: 10px;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .contact-icon-link {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        font-size: 18px;
    }
    
    .contact-icon-link i {
        font-size: 18px;
    }
    
    .contacts-title {
        font-size: 12px;
        justify-content: center;
    }
    
    .contact-options {
        padding: 12px;
    }
    
    .contact-option {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .messenger-icons {
        gap: 12px;
    }
    
    .messenger-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    /* Кнопки действий в карточках на мобильных */
    .card-actions.has-3d,
    .card-actions.no-3d {
        display: flex !important;
        flex-direction: column;
        grid-template-columns: none;
        gap: 12px;
        width: 100%;
    }
    
    .card-actions > * {
        width: 100% !important;
        min-height: 56px;
        padding: 16px 20px !important;
        font-size: 15px !important;
        border-radius: 14px !important;
        margin: 0;
    }
    
    .card-actions i {
        margin-right: 10px;
        font-size: 15px;
        flex-shrink: 0;
    }
    
    .card-actions .btn-text {
        flex: 1;
        text-align: center;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        min-width: 0;
        padding: 0 4px;
        font-size: 14.5px;
        letter-spacing: -0.2px;
    }
    
    .panorama-badge {
        top: 15px;
        left: 15px;
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .panorama-section {
        padding: 20px;
    }
    
    .btn-panorama {
        padding: 16px 28px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .rently-logo h1 {
        font-size: 36px;
    }
    
    .logo-subtitle {
        font-size: 14px;
        padding: 6px 16px;
    }
    
    .ai-info h3 {
        font-size: 18px;
    }
    
    .ai-info p {
        font-size: 13px;
    }
    
    .message {
        padding: 14px 18px;
        font-size: 14.5px;
        max-width: 95%;
    }
    
    .chat-input-controls {
        flex-direction: column;
    }
    
    #send-message, #voice-input {
        width: 100%;
        border-radius: 12px;
    }
    
    #voice-input {
        height: 46px;
        min-height: 46px;
    }
    
    .modal-content {
        width: 98%;
        margin: 10px auto;
        border-radius: 16px;
    }
    
    .main-photo-container {
        height: 250px;
    }
    
    .modal-title {
        font-size: 28px;
    }
    
    .modal-price {
        font-size: 32px;
    }
    
    .quick-buttons {
        gap: 8px;
    }
    
    .quick-btn {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .panorama-section {
        padding: 15px;
    }
    
    .panorama-section h4 {
        font-size: 20px;
    }
    
    .btn-panorama {
        padding: 14px 24px;
        font-size: 15px;
    }
    
    /* Для очень маленьких экранов */
    .card-actions > * {
        min-height: 52px;
        padding: 14px 16px !important;
        font-size: 14.5px !important;
        border-radius: 12px !important;
    }
    
    .card-actions .btn-text {
        font-size: 14px !important;
        padding: 0 2px;
        letter-spacing: -0.3px;
    }
    
    .card-actions i {
        font-size: 14px;
        margin-right: 8px;
    }
    
    .contact-icon-link {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        font-size: 16px;
    }
    
    .card-content {
        padding: 20px;
    }
    
    .compact-contacts {
        padding: 12px;
        margin: 12px 0;
    }
    
    .contact-icons-row {
        gap: 8px;
    }
}

/* Для очень узких экранов - делаем текст в кнопках многострочным */
@media (max-width: 360px) {
    .card-actions > * {
        white-space: normal;
        line-height: 1.3;
        padding: 12px 14px !important;
        min-height: auto;
        height: auto;
    }
    
    .card-actions i {
        margin-bottom: 4px;
        margin-right: 8px;
        align-self: flex-start;
        margin-top: 2px;
        font-size: 14px;
    }
    
    .card-actions .btn-text {
        white-space: normal;
        text-align: left;
        line-height: 1.3;
        font-size: 13.5px !important;
        letter-spacing: -0.4px;
    }
    
    /* Специально для длинного слова "Позвонить" */
    .btn-call .btn-text {
        font-size: 13px !important;
        letter-spacing: -0.5px;
    }
}

/* Для десктопа увеличиваем иконки мессенджеров */
@media (min-width: 769px) {
    .contact-icons-row {
        gap: 20px;
    }
    
    .contact-icon-link {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    
    .contact-icon-link i {
        font-size: 20px;
    }
    
    .messenger-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
}