﻿:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --accent: #2f8dd0;
  --muted: #6b7780;
  --radius: 12px;
  --container: 1100px;
}



* {
  box-sizing: border-box;
}

/* ЗАМЕНИ ЭТОТ БЛОК */
body {
  font-family: "Montserrat", sans-serif;
  margin: 0;
  background: #0b141b; /* Сюда ставим темный цвет вместо var(--bg) */
  color: #1f2d36;
  line-height: 1.45;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#details-view, #search-view {
    transition: opacity 0.3s ease-in-out;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* HERO */
.hero {
  background-color: #175c8d;
  background-size: cover;
  background-position: center;
  padding: 56px 0 120px;
  position: relative;
  color: white;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 18, 24, 0.55),
    rgba(10, 18, 24, 0.35)
  );
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 1;
}
.hero .hero-text {
  padding: 24px 0;
}
.hero h1 {
  font-size: 44px;
  margin: 0 0 6px;
  font-weight: 800;
  margin-bottom: 80px;
}
.subtitle {
  margin: 0;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
}

h1 {
  padding-top: 120px;
}

/* SEARCH CARD */
.search-card {
  position: relative;
  z-index: 2;
  background: var(--card);
  border-radius: 10px;
  padding: 18px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  max-width: 1100px;
  margin: -80px auto 0;
  box-shadow: 0 12px 30px rgba(16, 30, 45, 0.12);
}
.search-form {
  flex: 1;
}
.row {
  display: flex;
  gap: 14px;
  margin-bottom: 12px;
  align-items: flex-end;
}
.col {
  flex: 1;
}
.col.small {
  max-width: 160px;
}
label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}
input[type="text"],
input[type="number"],
input[type="date"],
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d7dbe0;
  border-radius: 8px;
  font-size: 14px;
}
.actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 6px;
}
.btn {
  padding: 10px 16px;
  border-radius: 8px;
  border: 0;
  font-weight: 700;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-ghost {
  background: transparent;
  border: 1px solid #d7eafc;
  color: var(--accent);
}

/* try box */
.try-box {
  background: #f0fbff;
  padding: 14px;
  border-radius: 8px;
  min-width: 260px;
}
.try-box h4 {
  color: black;
  font-family: Inter, system-ui, Arial, sans-serif;
  font-weight: 600;
}
.try-box p {
  color: black;
  font-family: Inter, system-ui, Arial, sans-serif;
  font-weight: 500;
}

/* main sections */
.results-section {
  margin: 30px 0;
}
.results-title {
  margin: 0 0 12px;
  font-size: 20px;
}
.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

/* result card */
.result-card {
  background: var(--card);
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 8px 20px rgba(20, 30, 40, 0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.route {
  font-size: 16px;
}
.badge {
  background: #eef6ff;
  color: var(--accent);
  padding: 6px 10px;
  border-radius: 18px;
  font-weight: 700;
  font-size: 13px;
}
.rc-meta {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 14px;
  flex-wrap: wrap;
}
.rc-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.rc-contact {
  background: #fbfdff;
  padding: 10px;
  border-radius: 8px;
  border: 1px dashed #e6f3ff;
}

/* responsive */
@media (max-width: 1000px) {
  .results-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 700px) {
  .results-grid {
    grid-template-columns: 1fr;
  }
  .search-card {
    flex-direction: column;
  
  }
}
@media (max-width: 800px){
  .footer-nav{
   padding-top: 12px;
   padding-left: 15px;
  }

  .footer-left{
   padding-left: 14px;
   padding-top: 12px;
  }
 
}

.site-footer {
  background: #0b0f14;
  padding: 40px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: auto; /* Это прижмет футер к низу, если контента мало */
  width: 100%;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.footer-left {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
}

.footer-nav {
  display: flex;
  gap: 26px;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  transition: 0.3s;
}

.footer-nav a:hover {
  color: #00ffff;
  text-shadow: 0 0 6px rgba(0, 255, 255, 0.7);
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.7);
  transition: 0.3s;
}

.footer-social a:hover {
  color: #00ffff;
}


/* =================== HEADER / NAVBAR (ОСНОВА) =================== */
.navbar {
  width: 100%;
  background: transparent;
  padding: 20px;
  position: absolute; 
  z-index: 100;
  font-weight: 500;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1200px, 94%);
  margin: 0 auto;
}

.logo img {
  width: 110px;
  height: auto;
  transition: filter 0.3s ease; /* Плавный переход при наведении */
    /* Базовое легкое свечение (синее под твой акцентный цвет) */
  filter: drop-shadow(0 0 5px rgba(0, 123, 255, 0.3));
}

.logo:hover {
    /* Усиленное свечение при наведении */
    filter: drop-shadow(0 0 12px rgba(0, 123, 255, 0.6));
}

/* Опционально: Анимация "дыхания" логотипа */
@keyframes logo-glow {
    0% { filter: drop-shadow(0 0 5px rgba(0, 123, 255, 0.2)); }
    30% { filter: drop-shadow(0 0 15px rgba(0, 123, 255, 0.5)); }
    60% { filter: drop-shadow(0 0 5px rgba(0, 123, 255, 0.2)); }
}

.menu {
  display: flex;
  gap: 32px;
}

.menu a {
  color: #ffffff;
  text-decoration: none;
  font-size: 15px;
  transition: 0.3s;
}
.menu a:hover {
  color: var(--accent);
  text-decoration: none;
  font-size: 15px;
  transition: 0.3s;
}


/* Стили кнопок и инфо юзера */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logout-btn {
    background: #4a9eff; /* Тот самый синий цвет */
    color: #fff;
    border: none;
    border-radius: 12px; /* Более мягкий радиус как на скрине */
    padding: 8px 20px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s;
}

.logout-btn:hover {
    background: #357abd;
}

.signup {
  background: #fff;
  color: #000;
  border: none;
  border-radius: 20px;
  padding: 8px 24px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}

/* =================== BURGER & MOBILE MENU =================== */
.burger {
  display: none;
  width: 28px;
  height: 20px;
  cursor: pointer;
  position: relative;
  z-index: 1000; /* Самый верхний слой */
}

.burger span {
  display: block;
  height: 3px;
  background: #fff;
  margin: 5px 0;
  border-radius: 2px;
  transition: 0.3s;
}

/* Анимация бургера в крестик */
.burger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  background: #0b0f14;
  width: 300px;
  height: 100vh;
  flex-direction: column;
  padding: 80px 40px 40px 40px;
  gap: 5px;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.mobile-menu.active {
  display: flex;
}

/* =================== MEDIA QUERIES (МОБИЛЬНАЯ ВЕРСИЯ) =================== */
@media (max-width: 900px) {
  /* 1. ГЛАВНОЕ: Скрываем десктопные элементы полностью */
  .menu, 
  #auth-container-desktop {
    display: none !important; /* Теперь "Адиль" не будет мешать логотипу */
  }
  
  .burger {
    display: block;
  }

  /* Ссылки в мобильном меню */
  .mobile-menu a {
    color: #fff !important;
    text-decoration: none;
    font-size: 20px;
    font-weight: 600;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  /* Блок юзера в мобильном меню (внизу) */
  #auth-container-mobile {
    margin-top: 30px;
    display: block !important;
  }

  #auth-container-mobile .user-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .user-name {
      font-size: 18px !important;
      color: #fff;
  }

  /* Кнопка "Выйти" в меню */
  #auth-container-mobile .logout-btn,
  #auth-container-mobile .signup {
    width: auto;
    min-width: 120px;
    text-align: center;
  }
}

/* Стили для страницы деталей */
#details-view {
    background-color: #0b141b; 
    min-height: 100vh; /* Растягивает блок минимум на всю высоту экрана */
    display: flex;
    flex-direction: column;
}

.detail-card-main {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    color: #1a202c; /* Темный текст для контраста на белом */
}

.info-block {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

/* Кнопка назад в стиле твоего сайта */
.btn-back-custom {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
    margin-bottom: 20px;
}

.btn-back-custom:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Чтобы на главной под карточками был светлый фон, если хочешь как раньше */
#search-view {
    background: var(--bg); /* Светлый фон только для зоны поиска */
    flex: 1;
}

#details-view {
    background: #0b141b; /* Темный фон только для деталей */
    flex: 1;
}


.chat-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 20px;
}
.chat-window {
    width: 350px;
    height: 450px;
    background: white;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    overflow: hidden;
}
.chat-header {
    background: #2f8dd0;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chat-user-info { display: flex; gap: 10px; align-items: center; }
.mini-avatar {
    width: 35px; height: 35px; background: rgba(255,255,255,0.2);
    border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800;
}
.chat-body { flex: 1; padding: 15px; overflow-y: auto; background: #f0f2f5; display: flex; flex-direction: column; gap: 10px; }
.msg-system { text-align: center; font-size: 11px; color: #8a94a6; margin: 10px 0; }
.msg-own { 
    align-self: flex-end; background: #2f8dd0; color: white; 
    padding: 8px 12px; border-radius: 12px 12px 0 12px; max-width: 80%; font-size: 14px;
}
.chat-footer { padding: 10px; display: flex; gap: 8px; border-top: 1px solid #eee; }
.chat-footer input { flex: 1; border: none; background: #f0f2f5; padding: 10px; border-radius: 20px; outline: none; }
.chat-footer button { background: #2f8dd0; color: white; border: none; width: 35px; height: 35px; border-radius: 50%; cursor: pointer; }
.close-chat { background: none; border: none; color: white; font-size: 24px; cursor: pointer; }

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-weight: 600;
    font-size: 16px;
    color: #1e293b;
}

/* =================== КНОПКИ (ПОДРОБНЕЕ И СОХРАНИТЬ) =================== */

/* Общий сброс для кнопок-ссылок и обычных кнопок */
.btn-more, .btn-save {
    display: inline-flex;       
    align-items: center;
    justify-content: center;
    height: 40px;               /* Единая высота */
    padding: 0 24px;            
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

/* Кнопка "Подробнее" (Синяя) */
.btn-more {
    background-color: #007bff;
    color: #ffffff !important;
}

.btn-more:hover {
    background-color: #0056b3;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    transform: translateY(-1px);
}

/* Кнопка "Сохранить" (Зеленая) */
.btn-save {
    background-color: #28a745;
    color: #ffffff !important;
}

.btn-save:hover {
    background-color: #218838;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    transform: translateY(-1px);
}

/* Общий эффект при клике */
.btn-more:active, .btn-save:active {
    transform: scale(0.98);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Иконки внутри кнопок (если есть) */
.btn-more i, .btn-save i {
    margin-right: 8px;
}

/* Адаптивность для карточек */
@media (max-width: 600px) {
    .btn-more, .btn-save {
        width: 100%; /* На мобилках кнопки на всю ширину */
    }
}


.profile-avatar{
  width: 55px;
  height: auto;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.profile-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
}