/* ================================================================
   ПРЕМИАЛЬНЫЕ ОТЕЛИ ЮГА РОССИИ — ОБЩИЕ СТИЛИ
   ================================================================ */

:root {
    --primary: #1e293b;
    --secondary: #b45309;
    --accent: #0f766e;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #334155;
    --text-light: #64748b;
    --border: #e2e8f0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ===== HEADER ===== */
header {
    text-align: center;
    margin-bottom: 50px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 30px;
}

h1 {
    color: var(--primary);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
}

/* Блок-подсказка под подзаголовком */
.user-info {
    max-width: 780px;
    margin: 25px auto 0;
    text-align: left;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 16px 22px;
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.55;
}
.user-info p { margin: 0 0 10px 0; }
.user-info ul { margin: 0; padding-left: 20px; }

/* ===== ЗАГОЛОВКИ КЛАСТЕРОВ ===== */
.cluster-title {
    color: var(--primary);
    font-size: 1.8rem;
    border-left: 5px solid var(--secondary);
    padding-left: 15px;
    margin-top: 50px;
    margin-bottom: 25px;
}

/* Вариант 1 — заголовок внутри .cluster-block + карта/погода */
.cluster-block { margin-top: 50px; }

.cluster-v1 .cluster-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    padding-left: 15px;
    border-left: 5px solid var(--secondary);
}
.cluster-v1 .cluster-emoji { font-size: 1.6rem; line-height: 1; }
.cluster-v1 .cluster-name  { color: var(--primary); font-size: 1.8rem; font-weight: 700; }

/* Двухколоночный блок: карта + погода */
.cluster-v1 .cluster-hero {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 2fr;
    gap: 14px;
    margin-bottom: 24px;
}

/* Карта (Яндекс iframe) */
.cluster-v1 .cluster-map-wrap {
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #bae6fd;
    box-shadow: 0 2px 6px rgba(7,89,133,0.08);
    background: #f1f5f9;
}
.cluster-v1 .cluster-map-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ===== СЕТКА КАРТОЧЕК ===== */
.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}
@media (min-width: 768px) {
    .grid { grid-template-columns: 1fr 1fr; }
}

/* ===== КАРТОЧКА ОТЕЛЯ ===== */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 10px;
}
.hotel-name {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary);
    margin: 0 0 5px 0;
}
.photo-icon {
    cursor: pointer;
    margin-left: 6px;
    font-size: 17px;
    opacity: 0.75;
    transition: opacity 0.2s;
}
.photo-icon:hover { opacity: 1; }

.location {
    color: var(--text-light);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}
.distance {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 3px;
}
.badge {
    background: #fef3c7;
    color: #92400e;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.badge-5 { background: #ecfdf5; color: #065f46; }
.badge-4 { background: #fef3c7; color: #92400e; }

.features {
    font-size: 0.95rem;
    margin-bottom: 20px;
    color: var(--text);
}
.meta-info {
    border-top: 1px dashed var(--border);
    padding-top: 15px;
    margin-top: auto;
}
.price-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.price-label { font-size: 0.85rem; color: #166534; font-weight: 500; }
.price-value { font-size: 1.05rem; font-weight: bold; color: #15803d; }

.contacts { font-size: 0.9rem; }
.contacts p { margin: 5px 0; word-break: break-word; }
.contacts a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    word-break: break-all;
}
.contacts a:hover { text-decoration: underline; }



/* ===== Отметка «Я тут был» ===== */
.visit-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    font-size: 0.9rem;
}

.visit-label {
    color: var(--text-light);
    font-weight: 500;
}

.visit-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px dashed #cbd5e1;
    background: #fff;
    color: transparent;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
    line-height: 1;
}
.visit-circle:hover {
    border-color: #16a34a;
    color: #16a34a;
    transform: scale(1.1);
}

/* Отмеченное состояние */
.card.visited .visit-circle {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    border: 2px solid #16a34a;
    color: #fff;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.35);
}
.card.visited .visit-circle:hover {
    border-color: #15803d;
    color: #fff;
    transform: scale(1.1);
}

/* Опционально — лёгкая подсветка всей карточки */
/* ===== Подсветка карточки, где я был ===== */
.card.visited {
    border-color: #86efac;
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 60%);
    box-shadow: 0 4px 14px -2px rgba(22, 163, 74, 0.18);
}



/* ===== ЗАМЕТКИ ===== */
.notes-box {
    margin-top: 15px;
    border-top: 1px dashed #eee;
    padding-top: 12px;
}
.notes-box label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
    font-weight: bold;
}
.notes-box textarea {
    width: 100%;
    height: 60px;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px;
    font-size: 13px;
    font-family: sans-serif;
    resize: vertical;
    box-sizing: border-box;
}
.char-count {
    text-align: right;
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

/* ===== Обёртка бейджей в шапке карточки ===== */
.card-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

/* ===== Бейдж «⭐ Новый» ===== */
.badge-new {
    background: linear-gradient(135deg, #f59e0b 0%, #dc2626 100%);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.35);
    animation: badge-new-pulse 1.6s ease-in-out infinite;
    transform-origin: center;
    will-change: transform, box-shadow;
}

@keyframes badge-new-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 6px rgba(220, 38, 38, 0.35);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 4px 16px rgba(220, 38, 38, 0.7);
    }
}

/* ===== Карточка «Нового» отеля ===== */
.card.is-new {
    border-color: #fcd34d;
    background: linear-gradient(180deg, #fffbeb 0%, #ffffff 60%);
    box-shadow: 0 4px 14px -2px rgba(245, 158, 11, 0.25);
}

/* ===== МОДАЛЬНОЕ ОКНО ГАЛЕРЕИ ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
}
.modal.active { display: flex; }
.modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    font-family: sans-serif;
}
.close-modal {
    position: absolute;
    right: 15px; top: 10px;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    font-weight: bold;
    line-height: 1;
}
.close-modal:hover { color: #000; }
#modalHotelName {
    margin-top: 0;
    color: #333;
    padding-right: 25px;
    font-size: 1.2rem;
}
#photoGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
    max-height: 350px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 8px;
    border: 1px solid #eee;
    border-radius: 4px;
    background: #f9f9f9;
    min-height: 60px;
}
#photoGrid .empty-msg {
    grid-column: 1 / -1;
    color: #999;
    font-size: 13px;
    text-align: center;
    padding: 20px 0;
}
.upload-btn {
    background: #4a76a8;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-block;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.2s;
}
.upload-btn:hover { background: #3a5f8a; }

/* ================================================================
   ВИДЖЕТ ПОГОДЫ КЛАСТЕРА
   ================================================================ */
.cluster-weather {
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 50%, #ecfeff 100%);
    border: 1px solid #bae6fd;
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 18px;
    box-shadow: 0 2px 6px rgba(7, 89, 133, 0.06);
}

/* Если виджет внутри .cluster-v1 — делаем его «во всю высоту» карты */
.cluster-v1 .cluster-weather {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cw-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    flex-wrap: wrap;
    gap: 4px;
}
.cw-title   { font-weight: 600; color: #075985; font-size: 0.82rem; }
.cw-place   { color: #0369a1; font-weight: 500; }
.cw-updated { font-size: 0.7rem; color: #64748b; }

.cw-body {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 5px;
}
.cw-day {
    text-align: center;
    background: #ffffff;
    border-radius: 6px;
    padding: 4px 2px 5px;
    border: 1px solid #e0f2fe;
    line-height: 1.15;
    cursor: default;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.cw-day:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(7, 89, 133, 0.14);
    border-color: #7dd3fc;
}
.cw-day.cw-today {
    background: linear-gradient(180deg, #fef3c7 0%, #fffbeb 100%);
    border-color: #fcd34d;
}
.cw-day .cw-name {
    font-size: 0.62rem;
    color: #0369a1;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-weight: 600;
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cw-day.cw-today .cw-name { color: #b45309; }
.cw-day .cw-date     { font-size: 0.58rem; color: #94a3b8; margin-bottom: 2px; }
.cw-day .cw-icon     { font-size: 1.05rem; line-height: 1; margin: 1px 0; }
.cw-day .cw-temp     { font-weight: 700; color: #0c4a6e; font-size: 0.76rem; }
.cw-day .cw-temp-min { color: #64748b; font-weight: 500; font-size: 0.65rem; }

.cw-loading, .cw-error {
    grid-column: 1 / -1;
    text-align: center;
    color: #64748b;
    font-size: 0.78rem;
    padding: 6px 0;
}
.cw-error { color: #dc2626; }

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 900px) {
    .cw-body { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
    .cluster-v1 .cluster-hero    { grid-template-columns: 1fr; }
    .cluster-v1 .cluster-name    { font-size: 1.4rem; }
    .cluster-v1 .cluster-map-wrap { height: 180px; }
}
@media (max-width: 520px) {
    .cw-body { grid-template-columns: repeat(3, 1fr); }
}

/* ===== ФУТЕР ===== */
/* ================================================================
   ФУТЕР
   Выделяется только фоном, без линий и рамок.
   Тон подобран светлее оригинального #1e293b —
   контрастирует с основной страницей, но не «бьёт по глазам».
   ================================================================ */

/* ================================================================
   ФУТЕР
   Тёмно-песочный фон, выделяется только цветом.
   Без линий, без рамок.
   ================================================================ */

.site-footer {
    margin-top: 60px;
    background: #4a4238;          /* тёмный песок */
    color: #e8e0d5;               /* тёплый светлый текст */
    padding: 45px 20px 25px;
    border-radius: 12px 12px 0 0;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
}

.footer-col h4 {
    color: #f5ebdd;               /* почти белый с тёплым подтоном */
    font-size: 0.92rem;
    margin: 0 0 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.footer-col p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #c9bda9;               /* тёплый серо-бежевый */
    margin: 0;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li {
    font-size: 0.85rem;
    color: #c9bda9;
    margin-bottom: 8px;
}

.footer-col a {
    color: #f2b775;               /* тёплый янтарный, в тон --secondary */
    text-decoration: none;
    transition: color 0.2s;
}
.footer-col a:hover {
    color: #fcd9a8;
    text-decoration: underline;
}

.footer-bottom {
    max-width: 1100px;
    margin: 36px auto 0;
    text-align: center;
    font-size: 0.78rem;
    color: #a89b85;               /* приглушённый песочный */
}

/* ===== Меню кластеров ===== */
.cluster-menu {
    position: sticky;
    top: 0;
    z-index: 100;
    margin: -20px -20px 20px;
    padding: 10px 20px;
    background: rgba(248, 250, 252, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

.cluster-menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    color: var(--primary);
    border: 2px solid var(--secondary);
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 2px 6px rgba(180, 83, 9, 0.1);
    transition: background 0.15s, transform 0.15s;
}
.cluster-menu-btn:hover {
    background: #fef3c7;
    transform: translateY(-1px);
}
.cluster-menu-count {
    background: var(--secondary);
    color: #ffffff;
    font-size: 0.72rem;
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 700;
}

.cluster-menu-arrow {
    font-size: 0.7rem;
    transition: transform 0.2s;
}
.cluster-menu.open .cluster-menu-arrow {
    transform: rotate(180deg);
}

.cluster-menu-dropdown {
    position: absolute;
    top: calc(100% - 4px);
    left: 20px;
    right: 20px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    padding: 20px;
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    max-height: 70vh;
    overflow-y: auto;
}
.cluster-menu.open .cluster-menu-dropdown {
    display: grid;
}
.cluster-menu-col h5 {
    margin: 0 0 10px;
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}
.cluster-menu-col a {
    display: block;
    padding: 5px 8px;
    border-radius: 6px;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.88rem;
    transition: background 0.15s;
}
.cluster-menu-col a:hover {
    background: #fef3c7;
    color: #92400e;
}
