/* ==========================================================================
   СОДЕРЖАНИЕ (TABLE OF CONTENTS):
   1. VARIABLES & RESET      — Переменные, сброс стилей, базовые теги
   2. LAYOUT & UTILITIES     — Контейнеры, универсальные сетки и хелперы
   3. UI COMPONENTS          — Переиспользуемые кнопки, карточки, бейджи
   4. NAVIGATION, FOOTER     — Шапка, сайдбар, мобильное меню, подвал
   5. PAGE SECTIONS          — Hero, About, Gallery, Sliders
   6. INNER PAGES            — Прайс-лист, правила, контакты, соцсети
   7. MODALS & LIGHTBOX      — Модальные окна и просмотр фото
   8. ADMIN & AUTH           — Логин и панель администратора
   9. MEDIA QUERIES          — Адаптив (1024px, 992px, 768px, 576px, 380px)
   ========================================================================== */

/* ==========================================================================
   1. VARIABLES & RESET
   ========================================================================== */
:root {
    --primary-orange: #ff7a21;
    --primary-green: #34d399;
    --primary-red: #ef4444;
    --text-dark: #222222;
    --text-light: #ffffff;
    --bg-light: #f9f9f9;
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --font-main: 'Montserrat', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   2. LAYOUT & UTILITIES
   ========================================================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
}

.nowrap { white-space: nowrap; }
.mt-15 { margin-top: 15px; }

.table-container,
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

/* ==========================================================================
   3. UI COMPONENTS
   ========================================================================== */
/* --- Кнопки --- */
.btn-primary, .btn-gray {
    display: inline-block;
    padding: 16px 32px;
    border-radius: 30px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-orange);
    color: var(--text-light);
}
.btn-primary:hover {
    background-color: #e66a15;
}

.btn-gray {
    background-color: #e2e8f0;
    color: #334155;
    padding: 14px 32px;
    font-size: 16px;
}
.btn-gray:hover {
    background-color: #cbd5e1;
    color: #0f172a;
    transform: translateY(-2px);
}

.link-all {
    color: var(--primary-green);
    font-weight: 500;
    text-decoration: underline;
}

/* --- Инфо-карточки --- */
.info-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: -30px;
    position: relative;
    z-index: 2;
    margin-bottom: 40px;
}

.info-card {
    background: #fff;
    border-radius: 15px;
    padding: 25px 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}
.info-card:hover { transform: translateY(-5px); }

.info-icon {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
}
.info-text h4 {
    font-size: 16px;
    color: #64748b;
    margin-bottom: 5px;
    font-weight: 500;
}
.info-text p {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.highlight-card {
    background: linear-gradient(135deg, #ff7a00, #e05500);
    color: #fff;
}
.highlight-card .info-text h4 { color: rgba(255, 255, 255, 0.8); }
.highlight-card .info-text p,
.highlight-card .phone-link {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
}

/* --- Предупреждения и панели --- */
.alert-box {
    background: #fff1f2;
    border-left: 5px solid #f43f5e;
    padding: 20px 24px;
    border-radius: 12px;
    margin-bottom: 40px;
}
.alert-title {
    color: #be123c;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.alert-text {
    color: #9f1239;
    font-size: 14px;
    line-height: 1.6;
}
.alert-panel {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    padding: 15px 20px;
    border-radius: 0 8px 8px 0;
    color: #991b1b;
    margin-top: 15px;
    font-weight: 500;
}
.info-panel {
    background: #f0fdf4;
    border-left: 4px solid #10b981;
    padding: 15px 20px;
    border-radius: 0 8px 8px 0;
    color: #166534;
    margin-top: 15px;
    font-weight: 500;
}
.info-panel.center-msg {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    margin-top: 25px;
    border-left: none;
    border-radius: 8px;
}

/* --- Таблицы --- */
.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 500px;
}
.custom-table th,
.custom-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
}
.custom-table th {
    background-color: #f8fafc;
    color: #0f172a;
    font-weight: 700;
    font-size: 15px;
}
.custom-table tr:hover { background-color: #f8fafc; }


/* ==========================================================================
   4. NAVIGATION, HEADER & FOOTER
   ========================================================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
}
.logo { display: flex; flex-direction: column; }
.logo-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
}
.logo-subtitle { font-size: 12px; opacity: 0.8; }
.nav-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

/* --- Десктопное меню --- */
.desktop-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}
.desktop-nav a {
    color: var(--text-light);
    font-weight: 500;
    font-size: 16px;
    transition: color 0.3s ease;
}
.desktop-nav a:hover,
.desktop-nav a.active { color: var(--primary-orange); }

.contact-info {
    text-align: right;
    display: flex;
    flex-direction: column;
}
.phone { font-weight: 600; font-size: 18px; }
.contact-text { font-size: 12px; opacity: 0.8; }

/* --- Правый фиксированный сайдбар (ПК) --- */
.desktop-sidebar {
    position: fixed;
    top: 0; right: 0;
    width: 280px; height: 100vh;
    background: #1a212d;
    z-index: 1000;
    padding: 30px 20px;
    box-shadow: -5px 0 25px rgba(0,0,0,0.3);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.sidebar-nav ul { list-style: none; padding: 0; }
.sidebar-nav li { margin-bottom: 8px; }
.sidebar-nav a {
    color: #e2e8f0;
    font-size: 15px;
    font-weight: 500;
    display: block;
    padding: 12px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: right;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--primary-orange);
    padding-right: 30px;
}

/* --- Кнопка Бургера --- */
.burger-btn {
    width: 50px; height: 50px;
    background-color: var(--primary-green);
    border: none; border-radius: 50%;
    cursor: pointer;
    display: none;
    flex-direction: column; justify-content: center; align-items: center;
    gap: 5px; transition: transform 0.3s ease;
    flex-shrink: 0;
}
.burger-btn:hover { transform: scale(1.05); }
.burger-btn span {
    width: 20px; height: 2px;
    background-color: var(--text-light);
}

/* --- Мобильное меню --- */
.mobile-menu {
    position: fixed; top: 0; right: -100%;
    width: 100%; height: 100vh;
    z-index: 1000;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    visibility: hidden;
}
.mobile-menu.active { right: 0; visibility: visible; }
.mobile-menu-overlay {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0; transition: opacity 0.4s ease;
}
.mobile-menu.active .mobile-menu-overlay { opacity: 1; }
.mobile-menu-content {
    position: absolute; top: 0; right: 0;
    width: 320px; max-width: 85%; height: 100%;
    background: #1a212d; color: #fff;
    padding: 30px 25px;
    display: flex; flex-direction: column;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5);
    overflow-y: auto; z-index: 2;
}
.close-btn {
    position: absolute; top: 20px; right: 20px;
    background: none; border: none;
    color: #a0aec0; font-size: 32px;
    cursor: pointer; line-height: 1; transition: color 0.2s;
}
.close-btn:hover { color: var(--primary-orange); }
.menu-header {
    margin-bottom: 25px; padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex; flex-direction: column;
}
.menu-header .logo-title { font-size: 20px; font-weight: 700; }
.menu-header .logo-subtitle {
    font-size: 12px; color: #a0aec0;
    text-transform: uppercase; letter-spacing: 1px;
}
.mobile-nav ul { list-style: none; }
.mobile-nav li { margin-bottom: 6px; }
.mobile-nav a {
    color: #e2e8f0; font-size: 16px; font-weight: 500;
    display: block; padding: 10px 14px; border-radius: 8px;
    transition: all 0.2s ease;
}
.mobile-nav a:hover, .mobile-nav a.active {
    background: rgba(255, 255, 255, 0.08); color: #ff7a00; padding-left: 20px;
}
.mobile-menu-footer {
    margin-top: auto; padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.weather-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: linear-gradient(135deg, #ff7a00, #e05500); color: #fff;
    padding: 12px 18px; border-radius: 10px;
    font-weight: 600; font-size: 15px; transition: transform 0.2s, box-shadow 0.2s;
}
.weather-btn:hover {
    transform: translateY(-2px); box-shadow: 0 4px 15px rgba(255, 122, 0, 0.4);
}

/* --- Подвал (Footer) --- */
.site-footer {
    background-color: #171a21;
    color: #8f98a0;
    padding: 30px 20px;
    margin-top: 50px;
    font-family: Arial, sans-serif;
    border-top: 1px solid #2a475e;
}
.footer-container {
    max-width: 1200px; margin: 0 auto;
    display: flex; justify-content: space-between;
    align-items: center; flex-wrap: wrap;
}
.footer-info p { margin: 0; font-size: 13px; }
.footer-socials { display: flex; align-items: center; gap: 16px; }
.social-link { display: inline-flex; transition: transform 0.2s ease, opacity 0.2s ease; }
.social-link img { width: 24px; height: 24px; object-fit: contain; display: block; }
.social-link:hover { opacity: 0.8; transform: translateY(-2px); }


/* ==========================================================================
   5. PAGE SECTIONS (HOME & GENERAL)
   ========================================================================== */
.hero {
    position: relative; height: 100vh; min-height: 600px;
    background-image: url('images/bg.jpeg');
    background-size: cover; background-position: center;
    color: var(--text-light); display: flex; flex-direction: column;
}
.hero .overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.2) 100%); z-index: 1;
}
.hero-container {
    position: relative; z-index: 2; height: 100%; display: flex;
    flex-direction: column; width: 100%; padding: 0 30px;
}
.hero-content {
    margin: auto; text-align: center; width: 100%;
    max-width: 1400px; display: flex; flex-direction: column; align-items: center;
}
.hero-content h1 {
    font-size: 56px; font-weight: 700; margin-bottom: 20px;
    line-height: 1.2; text-shadow: 0 4px 15px rgba(0,0,0,0.7); width: 100%;
}
.hero-content p {
    font-size: 20px; margin-bottom: 40px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.7); opacity: 0.95; max-width: 900px;
}

.about-container { display: flex; align-items: center; gap: 60px; }
.about-image { flex: 1; border-radius: var(--border-radius-lg); overflow: hidden; height: 500px; }
.about-image img { width: 100%; height: 100%; object-fit: cover; }
.about-content { flex: 1; }
.about-content h2 { font-size: 36px; margin-bottom: 40px; }
.about-description {
    font-size: 16px; line-height: 1.6; color: #444;
    margin-bottom: 40px; padding-bottom: 20px; border-bottom: 1px solid #eee;
}
.feature-item { display: flex; gap: 20px; margin-bottom: 30px; }
.feature-icon {
    font-size: 32px; background-color: white; width: 60px; height: 60px;
    display: flex; justify-content: center; align-items: center;
    border-radius: var(--border-radius-md); box-shadow: 0 4px 15px rgba(0,0,0,0.05); flex-shrink: 0;
}
.feature-text h4 { font-size: 18px; margin-bottom: 5px; }
.feature-text p { color: #666; font-size: 14px; }

/* Варианты размещения */
.accommodation-section { padding: 100px 0; background-color: #f8fafc; }
.section-subtitle { color: #64748b; margin-bottom: 40px; font-size: 18px; }
.categories-grid { display: grid; grid-template-columns: 1fr; gap: 25px; }
@media (min-width: 768px) { .categories-grid { grid-template-columns: repeat(2, 1fr); } }

.category-card {
    display: flex; flex-direction: column; background: #fff;
    border-radius: 12px; overflow: hidden; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease; border: 1px solid #e2e8f0;
}
.category-card:hover { transform: translateY(-5px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); }
.card-image { height: 220px; background-size: cover; background-position: center; }
.card-content { padding: 20px; }
.card-content h3 { margin: 0 0 10px 0; color: #0f172a; font-size: 20px; font-weight: 700; }
.card-content p { margin: 0; color: #475569; font-size: 14px; line-height: 1.5; }

/* Галерея */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.gallery-item { border-radius: var(--border-radius-md); overflow: hidden; height: 200px; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; cursor: zoom-in; }
.gallery-item img:hover { transform: scale(1.1); }
.map-item { position: relative; }
.map-badge {
    position: absolute; bottom: 15px; left: 15px; background: rgba(0, 0, 0, 0.75);
    color: #fff; padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 600;
}
.sauna-gallery { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.sauna-gallery .gallery-item { border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }

/* Слайдер номеров */
.rooms-slider-wrapper { position: relative; margin-top: 40px; padding: 0 60px; }
.rooms-slider-window { overflow: hidden; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.06); }
.rooms-slider-track { display: flex; transition: transform 0.4s ease-in-out; will-change: transform; }
.room-catalog-item { flex: 0 0 100%; min-width: 100%; display: flex; background: #fff; gap: 30px; padding: 30px; }
.room-info-part { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.room-info-part h2 { font-size: 28px; color: #1e293b; margin-bottom: 15px; line-height: 1.2; }
.room-desc, .room-info-part ul { font-size: 15px; color: #64748b; line-height: 1.6; }
.room-desc { font-size: 16px; margin-bottom: 30px; }
.room-info-part ul { padding-left: 20px; margin-bottom: 15px; }
.room-info-part li { margin-bottom: 5px; }
.room-price {
    font-size: 22px; font-weight: 700; color: #1a212d; margin: 15px 0 25px 0;
    background: #f8fafc; padding: 10px 15px; border-radius: 8px; border-left: 4px solid #ff7a00; width: 100%;
}
.room-photos-part {
    flex: 1.5; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    grid-auto-rows: 160px; gap: 15px; align-content: start;
}
.room-photos-part img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; cursor: zoom-in; }
.room-photos-part img:hover { transform: scale(1.03); }

.slider-btn {
    position: absolute; top: 50%; transform: translateY(-50%); background: #1a212d; color: #fff;
    border: none; width: 45px; height: 45px; border-radius: 50%; font-size: 20px;
    cursor: pointer; z-index: 10; display: flex; align-items: center; justify-content: center;
}
.slider-btn:hover { background: #ff7a00; }
.slider-btn:disabled { background: #cbd5e1; cursor: not-allowed; opacity: 0.5; }
.prev-btn { left: 0; }
.next-btn { right: 0; }

/* ==========================================================================
   6. INNER PAGES (GENERAL, PRICE, RULES, CONTACTS)
   ========================================================================== */
.inner-page { background-color: #f8fafc; }
.page-header {
    position: relative; background-image: url('images/bg.jpeg');
    background-size: cover; background-position: center;
    color: #fff; padding-bottom: 70px; z-index: 1;
}
.page-header::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(26, 33, 45, 0.85); z-index: -1;
}
.page-title-content { margin-top: 60px; text-align: center; }
.page-title-content h1 { font-size: 42px; margin-bottom: 10px; }
.page-title-content p { color: #a0aec0; font-size: 18px; }

/* Фоны шапок */
.banya-header { background-image: url('images/banya-bg.jpeg'); }
.gazebos-header { background-image: url('images/gazebo-bg.jpg'); }
.sauna-header { background-image: url('images/sauna-bg.jpeg'); }
.gostinica-header { background-image: url('images/gostinica-bg.jpeg'); }
.bereg-header { background-image: url('images/gostinica-na-beregu-bg.jpeg'); }
.dnp-header { background-image: url('images/dom-na-plavu-bg.jpeg'); }
.dsb-header { background-image: url('images/domik-bg.jpeg'); }
.price-header { background-image: url('images/price-list-bg.jpeg'); }
.rules-header { background-image: url('images/rules-bg.jpeg'); }
.contacts-header { background-image: url('images/contacts-bg.jpeg'); }

/* Прайс-лист */
.price-banner { background-color: #1e293b; padding: 120px 20px 60px; text-align: center; }
.price-banner h1 { color: #ffffff; font-size: 42px; margin-bottom: 10px; }
.price-banner p { color: #94a3b8; font-size: 18px; }
.price-page { background-color: #f8fafc; padding: 50px 0; color: #334155; }
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-bottom: 40px; }
.price-card {
    background: #ffffff; border-radius: 16px; padding: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); border: 1px solid #e2e8f0; transition: transform 0.2s ease;
}
.price-card:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08); }
.price-card-title {
    font-size: 22px; font-weight: 700; color: #0f172a; margin-bottom: 20px;
    padding-bottom: 12px; border-bottom: 3px solid #10b981; display: flex; align-items: center; gap: 10px;
}
.price-item { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 0; border-bottom: 1px dashed #e2e8f0; }
.price-item:last-child { border-bottom: none; }
.price-name { font-size: 15px; color: #475569; padding-right: 15px; }
.price-subtext { display: block; font-size: 13px; color: #64748b; margin-top: 2px; }
.price-tag { font-weight: 700; font-size: 16px; color: #0f172a; background: #f1f5f9; padding: 4px 10px; border-radius: 6px; }
.price-tag-highlight { background: #ecfdf5; color: #059669; }
.goods-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
.goods-badge { background: #ffffff; border: 1px solid #cbd5e1; padding: 8px 14px; border-radius: 20px; font-size: 14px; }

/* Правила */
body.rules-page { background-color: #f8fafc; }
.rules-wrapper { max-width: 900px; margin: 0 auto; padding: 40px 20px; }
.rule-card { background: #ffffff; border-radius: 12px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); margin-bottom: 30px; border: 1px solid #e2e8f0; }
.rule-card-header { background: #1e293b; color: #ffffff; padding: 20px 25px; margin: 0; font-size: 22px; font-weight: 600; }
.rule-card-body { padding: 25px; color: #334155; line-height: 1.6; }
.rule-card-body h4 { color: #0f172a; font-size: 18px; margin-top: 20px; margin-bottom: 15px; }
.rule-card-body h4:first-child { margin-top: 0; }
.rule-card-body h4.danger-title { color: #ef4444; font-weight: bold; }
.rule-list { list-style-type: disc; padding-left: 20px; margin-bottom: 20px; }
.rule-list li { margin-bottom: 8px; }
.rule-list.forbidden li::marker { color: #ef4444; }
.capacity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 15px; }
.capacity-item { background: #f8fafc; padding: 10px 15px; border-radius: 6px; border: 1px solid #e2e8f0; }
.capacity-item span { font-weight: 600; color: #0f172a; }

/* Контакты */
.contacts-wrapper { max-width: 800px; margin: 0 auto; padding: 50px 20px; }
.contact-card { background: #ffffff; border-radius: 12px; padding: 30px; margin-bottom: 25px; border: 1px solid #e2e8f0; }
.contact-address { font-size: 18px; color: #1e293b; line-height: 1.5; text-align: center; margin-bottom: 20px; }
.contact-address span { display: block; font-weight: 600; font-size: 20px; margin-bottom: 5px; }
.contact-alert { background: #fef2f2; border: 2px dashed #ef4444; color: #b91c1c; padding: 15px 20px; border-radius: 8px; text-align: center; font-weight: 600; margin-bottom: 30px; }
.phone-group { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-bottom: 1px solid #f1f5f9; }
.phone-group:last-child { border-bottom: none; padding-bottom: 0; }
.phone-desc { color: #475569; font-size: 16px; flex: 1; padding-right: 20px; }
.phone-link { font-size: 22px; font-weight: 700; color: #10b981; transition: color 0.2s; }
.phone-link:hover { color: #059669; }

/* Блок соцсетей в контактах */
.contacts-socials { margin-top: 20px; }
.contacts-socials h3 { font-size: 16px; font-weight: 600; color: #1e293b; margin-bottom: 12px; }
.socials-list { display: flex; gap: 12px; flex-wrap: wrap; }
.contacts-social-item {
    display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px;
    background-color: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 10px;
    color: #0f172a; font-size: 14px; font-weight: 500; transition: all 0.2s ease;
}
.contacts-social-item img { width: 22px; height: 22px; object-fit: contain; }
.contacts-social-item:hover { background-color: #e2e8f0; transform: translateY(-2px); }

/* ==========================================================================
   7. MODALS & LIGHTBOX
   ========================================================================== */
#lightbox {
    position: fixed; z-index: 9999; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85); display: none; justify-content: center;
    align-items: center; cursor: zoom-out; padding: 15px;
}
#lightbox.active { display: flex; }
#lightbox img { max-width: 95vw; max-height: 85vh; border: 3px solid #fff; border-radius: 8px; }

.modal {
    display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.7); backdrop-filter: blur(4px);
    justify-content: center; align-items: center; padding: 12px;
}
.modal-content {
    background: white; padding: 25px; border-radius: 12px; width: 100%;
    max-width: 460px; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.3); position: relative;
    max-height: 90vh; overflow-y: auto;
}
.modal-content.modal-lg { max-width: 900px; padding: 35px 30px; }
.modal-catalog-item { padding: 0 !important; box-shadow: none !important; gap: 40px; }

/* Улучшенный круглый крестик для модалок */
.modal-close,
.modal-content.modal-lg .modal-close {
    position: absolute; top: 15px; right: 15px; z-index: 50;
    background-color: #ffffff; width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); font-size: 24px; color: #334155;
    line-height: 1; cursor: pointer; font-weight: bold; transition: all 0.2s ease;
}
.modal-close:hover { background-color: #f8fafc; transform: scale(1.1); color: #ef4444; }

/* ==========================================================================
   8. ADMIN & AUTH
   ========================================================================== */
body.login-body { background: #0f172a; display: flex; align-items: center; justify-content: center; min-height: 100vh; color: #f8fafc; padding: 20px; }
.login-card { background: #1e293b; padding: 35px; border-radius: 16px; width: 100%; max-width: 400px; border: 1px solid #334155; }
.login-card h1 { font-size: 22px; margin-bottom: 20px; text-align: center; color: #38bdf8; }
.login-card .form-group { margin-bottom: 18px; }
.login-card label { display: block; margin-bottom: 6px; font-size: 14px; color: #94a3b8; }
.login-card input { width: 100%; padding: 12px; border-radius: 8px; border: 1px solid #334155; background: #0f172a; color: #fff; }
.login-card input:focus { border-color: #38bdf8; }
.login-card .btn { width: 100%; padding: 12px; border-radius: 8px; background: #0284c7; color: white; font-weight: 600; border: none; cursor: pointer; }
.login-card .btn:hover { background: #0369a1; }
.login-card .error { background: #ef444422; border: 1px solid #ef4444; color: #fca5a5; padding: 10px; border-radius: 8px; margin-bottom: 15px; }
.captcha-box { background: #0f172a; border: 1px dashed #38bdf8; padding: 12px; border-radius: 8px; margin-bottom: 18px; text-align: center; }
.captcha-box p { font-size: 18px; font-weight: bold; color: #38bdf8; margin: 6px 0; }

body.admin-body { background: #f8fafc; padding-bottom: 60px; }
.admin-header { background: #0f172a; color: white; padding: 15px 30px; display: flex; justify-content: space-between; flex-wrap: wrap; }
.header-actions { display: flex; gap: 15px; }
.admin-container { max-width: 1150px; margin: 20px auto; padding: 0 15px; }
.tabs { display: flex; gap: 8px; border-bottom: 2px solid #e2e8f0; overflow-x: auto; padding-bottom: 4px; margin-bottom: 20px; }
.tab-btn { padding: 12px 18px; background: #e2e8f0; border: none; font-weight: 600; border-radius: 8px 8px 0 0; cursor: pointer; }
.tab-btn.active { background: #0284c7; color: white; }
.tab-content { display: none; }
.tab-content.active { display: block; }

.alert { background: #dcfce7; border: 1px solid #22c55e; color: #15803d; padding: 12px 18px; border-radius: 8px; margin-bottom: 20px; }
.alert-error { background: #fee2e2; border: 1px solid #ef4444; color: #991b1b; }
.card { background: white; padding: 20px; border-radius: 12px; border: 1px solid #e2e8f0; margin-bottom: 20px; }
.card h2 { font-size: 18px; margin-bottom: 15px; border-bottom: 1px solid #f1f5f9; padding-bottom: 8px; }

body.admin-body label { display: block; font-size: 12px; font-weight: 700; color: #475569; margin-bottom: 4px; }
body.admin-body input, body.admin-body textarea, body.admin-body select { width: 100%; padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 6px; }
.btn { background: #0284c7; color: white; padding: 8px 16px; border: none; border-radius: 6px; font-weight: 600; cursor: pointer; }
.btn:hover { background: #0369a1; }
.btn-secondary { background: #64748b; }
.btn-danger { background: #ef4444; }
.btn-success { background: #16a34a; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.tmpl-btn { background: #f1f5f9; border: 1px solid #cbd5e1; padding: 5px 10px; border-radius: 4px; cursor: pointer; font-size: 12px; }

.accordion { border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 10px; overflow: hidden; }
.accordion-head { background: #f1f5f9; padding: 12px 16px; cursor: pointer; display: flex; justify-content: space-between; font-weight: 600; }
.accordion-body { padding: 16px; display: none; background: white; border-top: 1px solid #e2e8f0; }
.accordion-body.active { display: block; }
.photo-gallery { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.photo-item { position: relative; width: 100px; height: 80px; border-radius: 6px; overflow: hidden; border: 1px solid #cbd5e1; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-item form { position: absolute; top: 2px; right: 2px; }
.photo-item button { background: rgba(239,68,68,0.85); color: white; border: none; width: 22px; height: 22px; cursor: pointer; }
.price-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; flex-wrap: wrap; }
.price-row input[name="title"] { flex: 2; min-width: 140px; }
.price-row input[name="subtitle"], .price-row input[name="price"] { flex: 1.5; min-width: 100px; }
.admin-item { display: flex; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid #f1f5f9; font-size: 13px; }

/* ==========================================================================
   9. MEDIA QUERIES (RESPONSIVE)
   ========================================================================== */

/* --- От 993px (ПК и широкие экраны - Сайдбар вкл) --- */
@media (min-width: 993px) {
    body { padding-right: 280px; }
    .contact-info, .desktop-nav { display: none !important; }
}

/* --- До 1024px (Планшеты Landscape) --- */
@media (max-width: 1024px) {
    .hero-content h1 { font-size: 44px; }
    .about-container { gap: 40px; }
    .about-image { height: 400px; }
    .desktop-sidebar { display: none !important; }
}

/* --- До 992px (Планшеты Portrait) --- */
@media (max-width: 992px) {
    body { padding-right: 0; }
    .desktop-nav, .desktop-sidebar { display: none !important; }
    .burger-btn { display: flex; }
    .section { padding: 60px 0; }
    .about-container { flex-direction: column; }
    .about-image { width: 100%; height: 350px; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .rooms-slider-wrapper { padding: 0 40px; }
    .room-catalog-item { flex-direction: column; padding: 20px; }
    .room-photos-part { grid-template-rows: auto; }
    .modal-catalog-item { flex-direction: column; gap: 20px; }
}

/* --- До 768px (Мобильные крупные) --- */
@media (max-width: 768px) {
    .nowrap { white-space: normal; }
    .container { padding: 0 16px; }
    .navbar { padding: 12px 0; }
    .contact-info { display: none; }
    .logo-title { font-size: 20px; }
    .hero { height: auto; min-height: 500px; padding: 0 0 40px 0; }
    .hero-content { padding-top: 40px; padding-bottom: 20px; }
    .hero-content h1 { font-size: 32px; margin-bottom: 16px; }
    .hero-content p { font-size: 16px; margin-bottom: 30px; }

    .site-footer { display: none !important; }

    .page-header { padding-bottom: 50px; }
    .page-title-content { margin-top: 35px; }
    .page-title-content h1, .price-banner h1 { font-size: 30px; }
    .page-title-content p, .price-banner p { font-size: 15px; }
    .price-banner { padding: 80px 16px 40px; }
    .info-cards-grid { margin-top: 20px; grid-template-columns: 1fr; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 30px; }
    .section-header h2 { font-size: 26px; }

    .contacts-wrapper { padding: 30px 16px; }
    .contact-card { padding: 20px; }
    .phone-group { flex-direction: column; align-items: flex-start; gap: 8px; }
    .phone-desc { padding-right: 0; }
    .phone-link { font-size: 18px; }

    .modal-content.modal-lg { padding: 40px 15px 20px; }
    .modal-catalog-item .room-info-part h2 { font-size: 24px; padding-right: 20px; }

    /* Админка на мобилках */
    .admin-header { padding: 12px 15px; flex-direction: column; align-items: flex-start; }
    .header-actions { width: 100%; justify-content: space-between; margin-top: 5px; }
    .admin-container { padding: 0 10px; margin: 10px auto; }
    .card { padding: 14px; border-radius: 10px; }
    .grid-2 { grid-template-columns: 1fr; }
    .price-row { background: #f8fafc; padding: 10px; flex-direction: column; align-items: stretch; }
    .price-row input, .price-row select { width: 100%; flex: none; }
}

/* --- До 600px (Мелкие правки футера) --- */
@media (max-width: 600px) {
    .footer-container { flex-direction: column; gap: 15px; text-align: center; }
}

/* --- До 576px (Смартфоны) --- */
@media (max-width: 576px) {
    .hero-content h1, .about-content h2 { font-size: 26px; }
    .card-image { height: 180px; }
    .about-image { height: 220px; }
    .about-description { font-size: 14px; }
    .gallery-grid, .price-grid { grid-template-columns: 1fr; }
    .gallery-item { height: 220px; }
    .rooms-slider-wrapper { padding: 0; }
    .slider-btn { display: none; }
    .rooms-slider-window { overflow-x: auto; scroll-snap-type: x mandatory; }
    .room-catalog-item { scroll-snap-align: start; }
    .room-info-part h2 { font-size: 22px; }
    .room-photos-part { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .room-photos-part img { height: 120px; }
    .price-card { padding: 18px; }
    .price-item { flex-direction: column; align-items: flex-start; gap: 6px; }
    .btn-primary, .btn-gray { width: 100%; padding: 14px 20px; }
}

/* --- До 380px (Компактные экраны) --- */
@media (max-width: 380px) {
    .logo-title { font-size: 18px; }
    .hero-content h1 { font-size: 22px; }
    .room-photos-part, .capacity-grid { grid-template-columns: 1fr; }
}

/* Базовые настройки для инпутов, чтобы они были одной высоты */
input[type="text"],
input[type="number"] {
  width: 100%;
  height: 38px;
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

/* -------------------------------------------
   БЛОК 1: Сетка для позиций
------------------------------------------- */
.item-grid-row {
  display: grid;
  /* 5 колонок: Название (тянется) | Подзаголовок (тянется) | Цена (тянется меньше) | Сорт (80px) | Кнопки (110px) */
  grid-template-columns: 2fr 2fr 1fr 80px 110px;
  gap: 15px;
  align-items: end; /* Выравнивает все элементы по нижнему краю */
}

/* Лейблы в позициях (1 строка) */
.item-grid-row .form-group label {
  font-size: 12px;
  color: #666;
  margin-bottom: 5px;
}

.buttons-wrap {
  display: flex;
  gap: 8px;
  height: 38px;
}

/* -------------------------------------------
   БЛОК 2: Сетка для зеленого блока
------------------------------------------- */
.new-category-block {
  background-color: #f0fdf4; /* Светло-зеленый фон */
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 20px;
}

.form-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 равные колонки */
  gap: 15px; /* Отступы между колонками и рядами */
}

/* МАГИЯ ВЫРАВНИВАНИЯ (Зеленый блок) */
.form-grid-4 .form-group label {
  font-size: 12px;
  color: #2c523e;
  font-weight: 600;
  /* Задаем фиксированную минимальную высоту для 3 строк текста */
  min-height: 48px;
  /* Прижимаем текст вниз */
  display: flex;
  align-items: flex-end;
  margin-bottom: 5px;
  line-height: 1.3;
}

/* -------------------------------------------
   Кнопки
------------------------------------------- */
.btn {
  height: 38px;
  padding: 0 15px;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
}
.btn-icon {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: #fff;
}
.btn-green { background-color: #10b981; }
.btn-blue { background-color: #0ea5e9; }
.btn-red { background-color: #ef4444; }

.w-100 { width: 100%; }
.mt-15 { margin-top: 15px; }