/* ФАЙЛ: /assets/css/style.css (ФИНАЛЬНАЯ, ИСПРАВЛЕННАЯ ВЕРСИЯ) */

/* ---------------------------------- */
/* 1. ГЛОБАЛЬНЫЕ НАСТРОЙКИ И ПЕРЕМЕННЫЕ */
/* ---------------------------------- */
:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --primary-light: #e6f2ff;
    --text-dark: #212529;
    --text-light: #6c757d;
    --background-color: #f8f9fa;
    --white-color: #fff;
    --border-color: #e9ecef;
    --star-color: #ffc107;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
    --font-main: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-heading: 'Playfair Display', serif;
    --border-radius: 12px;
}
/* Начиная отсюда */
.hotels-link-container { display: none; margin-top: 8px; text-align: right; } 
.hotels-link { font-size: 0.9rem; color: var(--primary-color); text-decoration: none; } 
.hotels-link:hover { text-decoration: underline; }
.tour-card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 15px; }
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.75); display: none; justify-content: center; align-items: center; z-index: 1000; padding: 20px; }
.modal-container { background: #fff; padding: 30px; border-radius: 12px; width: 100%; max-width: 900px; max-height: 90vh; overflow-y: auto; position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.modal-close { position: absolute; top: 10px; right: 15px; font-size: 2.5rem; cursor: pointer; line-height: 1; border: none; background: none; color: #aaa; } .modal-close:hover { color: #333; }
.modal-header h2 { margin-top: 0; font-size: 1.8rem; color: #333; }
.modal-body-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 30px; margin-top: 20px; }
.modal-image { width: 100%; border-radius: 8px; }
.modal-list { list-style: none; padding: 0; } .modal-list li { margin-bottom: 12px; font-size: 1.1rem; } .modal-list strong { color: #555; }
.modal-section h3 { border-bottom: 2px solid var(--primary-color); padding-bottom: 8px; margin-bottom: 15px; }
.review-card { border-left: 3px solid #007bff; padding-left: 15px; margin-bottom: 15px; }
.review-header { display: flex; justify-content: space-between; align-items: center; } .review-author { font-weight: bold; } .review-rating { color: #ffc107; }
.other-hotels-list li { margin-bottom: 15px; } .other-hotels-list a { margin-left: 10px; font-size: 0.9rem; }
#modal-loader { text-align: center; padding: 50px; font-size: 1.2rem; }
@media (max-width: 768px) { .modal-body-grid { grid-template-columns: 1fr; } }
/* И до сюда */

body {
    font-family: var(--font-main);
    margin: 0;
    background-color: var(--background-color);
    color: var(--text-dark);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

* {
    box-sizing: border-box;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ------------------------- */
/* 2. ОСНОВНЫЕ КОМПОНЕНТЫ    */
/* ------------------------- */
.button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 12px 25px;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.2s ease-in-out;
    border: none;
    cursor: pointer;
}
.button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}

.section-header {
    margin-bottom: 30px;
    text-align: center;
}
.section-header h2 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 2.5rem;
    display: inline-block;
    position: relative;
    padding-bottom: 10px;
}
.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

/* ------------------------- */
/* 3. ШАПКА (HEADER)         */
/* ------------------------- */
.main-header {
    background: var(--white-color);
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo a {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    text-decoration: none;
}
.main-nav { display: flex; gap: 30px; }
.main-nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 700;
    padding: 5px 0;
    position: relative;
}
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}
.main-nav a:hover::after, .main-nav a.active::after {
    transform: scaleX(1);
}

/* ------------------------------ */
/* 4. СЕКЦИЯ С ИИ-ПОИСКОМ (HERO)  */
/* ------------------------------ */
.ai-hero {
    background: linear-gradient(rgba(0, 38, 77, 0.7), rgba(0, 38, 77, 0.7)), url('https://images.unsplash.com/photo-1507525428034-b723a9ce6890?q=80&w=2070&auto=format&fit=crop') no-repeat center center/cover;
    color: var(--white-color);
    padding: 80px 20px;
    text-align: center;
}
.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    margin: 0 0 10px 0;
    font-weight: 700;
}
.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 30px;
}
.ai-search-container { max-width: 700px; margin: 0 auto; }
.ai-input-group { display: flex; box-shadow: 0 10px 30px rgba(0,0,0,0.2); border-radius: var(--border-radius); }
#ai-master-query {
    flex-grow: 1;
    border: none;
    padding: 18px 25px;
    font-size: 1.1rem;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}
#ai-master-query:focus { outline: 2px solid var(--primary-color); }
#ai-master-submit {
    flex-shrink: 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    padding: 0 25px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Результаты ИИ */
.ai-results-container {
    background: var(--white-color);
    color: var(--text-dark);
    text-align: left;
    margin-top: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 30px;
}
.ai-results-container .loading, .ai-results-container .error { padding: 20px; text-align: center; font-size: 1.1rem; }
.ai-response { display: flex; gap: 15px; }
.ai-avatar {
    width: 40px; height: 40px; line-height: 40px; text-align: center;
    background: var(--primary-light); color: var(--primary-color); border-radius: 50%;
    font-size: 1.5rem;
}
.ai-answer h3, .ai-answer h4 { font-family: var(--font-heading); }
.ai-answer ul { padding-left: 20px; }
.ai-answer li { margin-bottom: 15px; }
.ai-answer a { color: var(--primary-color); font-weight: bold; text-decoration: none; }
.ai-answer a:hover { text-decoration: underline; }

/* ------------------------------- */
/* 5. СЕКЦИЯ С ФИЛЬТРАМИ           */
/* ------------------------------- */
.search-section {
    padding: 0;
    margin-top: -60px;
    position: relative;
    z-index: 10;
    margin-bottom: 50px;
}
.search-form-container.advanced-search {
    background-color: var(--white-color);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 15px 40px rgba(0, 48, 102, 0.1);
    border: 1px solid var(--border-color);
}
.search-form-grid-advanced {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-light);
}
.input-with-icon { position: relative; }
.input-with-icon .icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    opacity: 0.7;
    pointer-events: none;
    transition: color 0.2s ease;
}
.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-main);
    background-color: var(--background-color);
    transition: all 0.2s ease;
}
.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--white-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}
.form-group input:focus + .icon {
    color: var(--primary-color);
    opacity: 1;
}
.form-group-double {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
.search-form-actions-advanced {
    display: flex;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}
.search-form-actions-advanced .button {
    font-size: 1.1rem;
    padding: 12px 30px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.hotels-link-container { display: none; margin-top: 8px; text-align: right; } 
.hotels-link { font-size: 0.9rem; color: var(--primary-color); text-decoration: none; } 
.hotels-link:hover { text-decoration: underline; }

/* ---------------------------------- */
/* 6. КАРТОЧКИ ТУРОВ И ДРУГОЙ КОНТЕНТ */
/* ---------------------------------- */
.page-section {
    padding: 60px 0;
}
.tours-grid-main {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}
.tour-card {
    background: var(--white-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.tour-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.1);
}
.tour-card__image {
    height: 220px;
    width: 100%;
    object-fit: cover;
}
.tour-card__content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.tour-card-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin: 0 0 15px 0;
}
.tour-card__details {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}
.tour-card__details li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    margin-bottom: 8px;
}
.tour-card__details li svg {
    width: 18px;
    height: 18px;
    color: var(--primary-color);
    flex-shrink: 0;
}
.tour-card__content .button { margin-top: auto; }

/* ------------------------- */
/* 7. АДАПТИВНОСТЬ            */
/* ------------------------- */
@media (max-width: 768px) {
    .hero-content h1 { font-size: 2.5rem; }
    .ai-input-group { flex-direction: column; }
    #ai-master-query { border-radius: var(--border-radius) var(--border-radius) 0 0; }
    #ai-master-submit { border-radius: 0 0 var(--border-radius) var(--border-radius); }
    .tours-grid-main { grid-template-columns: 1fr; }

    /* === ГЛАВНОЕ ИЗМЕНЕНИЕ ЗДЕСЬ === */
    
    /* 1. Делаем шапку вертикальной */
    .main-header .container {
        flex-direction: column;
        gap: 20px; /* Добавляем отступ между лого и меню */
    }

    /* 2. Показываем меню (вместо display: none) и ставим ссылки в столбик */
    .main-nav { 
        display: flex; 
        flex-direction: column; /* Ссылки друг под другом */
        align-items: center;   /* Центрируем их */
        gap: 15px;             /* Отступ между ссылками */
    }
}
