/* =========================================
   1. ПЕРЕМЕННЫЕ И БАЗОВЫЕ НАСТРОЙКИ
   ========================================= */
:root {
  --primary: #0f766e;       /* Глубокий бирюзовый (цвет моря/природы) */
  --primary-hover: #115e59;
  --accent: #f59e0b;        /* Теплый янтарный для акцентов */
  --bg-body: #f8fafc;       /* Светлый нейтральный фон */
  --bg-card: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --container-width: 1200px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-body);
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-hover);
}

button {
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: none;
  background-color: var(--primary);
  color: #fff;
  transition: background-color 0.2s, transform 0.1s;
}

button:hover:not(:disabled) {
  background-color: var(--primary-hover);
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

button:disabled {
  background-color: #cbd5e1;
  color: #64748b;
  cursor: not-allowed;
}

/* =========================================
   2. ШАПКА САЙТА (HEADER)
   ========================================= */
body > header {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

body > header > div:first-child strong {
  font-size: 1.5rem;
  color: var(--primary);
  letter-spacing: -0.5px;
}

body > header > div:first-child p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

body > header nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

body > header nav a {
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.95rem;
}

body > header nav a:hover {
  color: var(--primary);
}

body > header > div:last-child {
  display: flex;
  align-items: center;
  gap: 1rem;
}

body > header > div:last-child a {
  font-weight: 700;
  color: var(--text-main);
}

/* =========================================
   3. ОБЩИЕ КОНТЕЙНЕРЫ СЕКЦИЙ
   ========================================= */
main > section,
main > aside {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

section h2,
aside h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

section > p {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-size: 1.1rem;
}

/* =========================================
   4. ГЛАВНЫЙ ЭКРАН (HERO) И ФОРМА ПОИСКА
   ========================================= */
#hero {
  max-width: 100%;
  background: linear-gradient(135deg, #0f766e 0%, #1e3a8a 100%);
  color: #ffffff;
  padding: 5rem 1.5rem;
  text-align: center;
}

#hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  max-width: 800px;
  margin: 0 auto 1rem;
  line-height: 1.2;
}

#hero > p {
  color: #e2e8f0;
  max-width: 650px;
  margin: 0 auto 2.5rem;
}

#hero form {
  max-width: var(--container-width);
  margin: 0 auto;
  background: var(--bg-card);
  color: var(--text-main);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  text-align: left;
}

#hero fieldset {
  border: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  align-items: end;
}

#hero legend {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--primary);
  grid-column: 1 / -1;
}

#hero fieldset div {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

#hero label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

#hero input[type="text"],
#hero input[type="date"],
#hero input[type="number"],
#hero select {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  width: 100%;
}

#hero fieldset div:has(input[type="checkbox"]) {
  justify-content: center;
  padding-bottom: 0.6rem;
}

#hero fieldset div:has(input[type="checkbox"]) label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--text-main);
}

/* =========================================
   5. КАРТОЧКИ НАПРАВЛЕНИЙ (#destinations)
   ========================================= */
#destinations > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.5rem;
}

#destinations article {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s;
}

#destinations article:hover {
  transform: translateY(-4px);
}

#destinations figure {
  position: relative;
}

#destinations img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background-color: #cbd5e1; /* Заглушка, если картинка еще не загружена */
}

#destinations figcaption {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  backdrop-filter: blur(4px);
}

#destinations article h3 {
  padding: 1.25rem 1.25rem 0.5rem;
  font-size: 1.2rem;
}

#destinations article p {
  padding: 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

#destinations article ul {
  list-style: none;
  padding: 0 1.25rem;
  margin-top: auto;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

#destinations article ul li {
  margin-bottom: 0.25rem;
}

#destinations article > a {
  display: block;
  text-align: center;
  padding: 0.85rem;
  background-color: #f1f5f9;
  font-weight: 600;
  border-top: 1px solid var(--border);
}

#destinations article > a:hover {
  background-color: var(--primary);
  color: #fff;
}

/* =========================================
   6. ТАБЛИЦА ТУРОВ (#tours)
   ========================================= */
#tours table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: none;
}

#tours caption {
  text-align: left;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

#tours th,
#tours td {
  padding: 1rem;
  text-align: left;
  border: none;
  border-bottom: 1px solid var(--border);
}

#tours th {
  background-color: #f1f5f9;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

#tours tbody tr:hover {
  background-color: #f8fafc;
}

#tours tfoot td {
  font-size: 0.85rem;
  color: var(--text-muted);
  background-color: #f8fafc;
}

/* =========================================
   7. БЛОГ И ИНСТРУМЕНТЫ (#blog, #guides)
   ========================================= */
#blog article {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

#blog article header {
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}

#blog article header p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

#blog h4 {
  margin: 1rem 0 0.5rem;
}

#blog ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

#blog blockquote {
  border-left: 4px solid var(--accent);
  padding: 0.75rem 1.25rem;
  margin: 1.25rem 0;
  background: #fffbeb;
  font-style: italic;
  border-radius: 0 8px 8px 0;
}

#guides {
  background: #e6f4f1;
  border-radius: var(--radius);
  padding: 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

#guides form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

#guides input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}

#guides ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

#guides ul a {
  display: inline-block;
  background: var(--bg-card);
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-size: 0.9rem;
  border: 1px solid var(--border);
}

/* =========================================
   8. ОТЗЫВЫ И FAQ (#reviews, #faq)
   ========================================= */
#reviews {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

#reviews h2 {
  grid-column: 1 / -1;
}

#reviews article {
  background: var(--bg-card);
  padding: 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

#reviews article p:nth-of-type(1) {
  color: var(--accent);
  font-weight: 700;
  margin: 0.25rem 0 0.75rem;
}

#reviews time {
  display: block;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

#faq details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.75rem;
  padding: 1rem 1.25rem;
}

#faq summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#faq summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--primary);
}

#faq details[open] summary::after {
  content: "−";
}

#faq details p {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}

/* =========================================
9. ИНДИВИДУАЛЬНЫЙ ТУР (#custom-tour)
========================================= */
#custom-tour form {
background: var(--bg-card);
padding: 2rem;
border-radius: var(--radius);
border: 1px solid var(--border);
box-shadow: var(--shadow);
max-width: 700px;
display: flex;
flex-direction: column;
gap: 1.25rem;
}
#custom-tour form > div {
display: flex;
flex-direction: column;
gap: 0.4rem;
}
#custom-tour input[type="text"],
#custom-tour input[type="tel"],
#custom-tour textarea {
padding: 0.75rem;
border: 1px solid var(--border);
border-radius: 8px;
font-family: inherit;
font-size: 1rem;
}
#custom-tour label:has(input[type="radio"]),
#custom-tour label:has(input[type="checkbox"]) {
display: flex;
align-items: center;
gap: 0.5rem;
font-weight: 400;
cursor: pointer;
}
/* =========================================
10. ПОДВАЛ САЙТА (FOOTER)
========================================= */
body > footer {
background-color: #0f172a;
color: #cbd5e1;
padding: 4rem 2rem 2rem;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 2rem;
}
body > footer h3,
body > footer h4 {
color: #ffffff;
margin-bottom: 1rem;
}
body > footer ul {
list-style: none;
}
body > footer li {
margin-bottom: 0.5rem;
}
body > footer a {
color: #94a3b8;
}
body > footer a:hover {
color: #ffffff;
}
body > footer address {
font-style: normal;
line-height: 1.8;
}
body > footer > div:last-child {
grid-column: 1 / -1;
border-top: 1px solid #1e293b;
padding-top: 1.5rem;
text-align: center;
font-size: 0.9rem;
}
/* =========================================
11. АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ
========================================= */
@media (max-width: 768px) {
body > header {
flex-direction: column;
align-items: flex-start;
}
#tours table {
display: block;
overflow-x: auto;
white-space: nowrap;
}
}