/* ==========================================================================
   OnTheRiver — стиль «В сердце леса»
   Тёмная цветовая гамма, природные акценты, минимализм, адаптив
   ========================================================================== */

/* --- Переменные темы --- */
:root {
  --otr-dark: #1a231c;
  --otr-darker: #121a14;
  --otr-forest: #2d3a2e;
  --otr-green: #3d5a45;
  --otr-green-light: #4a6b52;
  --otr-brown: #5c4a3a;
  --otr-beige: #c4b8a8;
  --otr-beige-light: #e8e0d5;
  --otr-white: #f5f5f0;
  --otr-text: rgba(255, 255, 255, 0.95);
  --otr-text-muted: rgba(255, 255, 255, 0.7);
  --otr-overlay: rgba(0, 0, 0, 0.45);
  --otr-font: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --otr-radius: 8px;
  --otr-transition: 0.3s ease;
}

/* --- Базовые стили и типографика --- */
body {
  font-family: var(--otr-font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--otr-text);
  background-color: var(--otr-darker);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-wrap {
  flex: 1;
}

/* Заголовки: чёткое разделение уровней */
h1, .h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; }
h2, .h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); font-weight: 600; }
h3, .h3 { font-size: 1.15rem; font-weight: 600; }

/* --- Хедер: минималистичный, тёмный --- */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  padding: 0.75rem 0;
  transition: background-color var(--otr-transition);
}

.page-home .site-header {
  background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, transparent 100%);
}

.page-home .site-header.navbar-solid {
  background: var(--otr-dark);
}

body:not(.page-home) .site-header {
  background: var(--otr-dark);
  position: relative;
}

.navbar-dark .navbar-brand {
  color: var(--otr-white) !important;
  font-weight: 700;
  font-size: 1.25rem;
}

.navbar-dark .navbar-brand:hover {
  color: var(--otr-beige-light) !important;
}

.navbar-dark .nav-link {
  color: var(--otr-text-muted) !important;
  font-weight: 500;
}

.navbar-dark .nav-link:hover,
.navbar-dark .nav-link:focus {
  color: var(--otr-white) !important;
}

.btn-contact {
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: var(--otr-radius);
  padding: 0.35rem 0.9rem;
}

/* --- Герой-раздел: параллакс-фон и контент --- */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--otr-darker) 0%, var(--otr-forest) 50%, var(--otr-brown) 100%);
  background-size: cover;
  background-position: center;
  /* Параллакс при скролле задаётся в JS */
}

/* Опционально: раскомментируйте и положите hero-bg.jpg в public/images для фона героя
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/images/hero-bg.jpg') center/cover no-repeat;
  opacity: 0.35;
  pointer-events: none;
} */

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--otr-overlay) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--otr-white);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--otr-text-muted);
  margin-bottom: 0.25rem;
}

.hero-lead {
  font-size: 1rem;
  color: var(--otr-beige);
  margin-bottom: 1rem;
}

.hero-text {
  color: var(--otr-text-muted);
  max-width: 540px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.btn-hero {
  background: var(--otr-green);
  color: var(--otr-white) !important;
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: var(--otr-radius);
  font-weight: 600;
  transition: background-color var(--otr-transition), transform 0.2s;
}

.btn-hero:hover {
  background: var(--otr-green-light);
  color: var(--otr-white);
  transform: translateY(-1px);
}

.btn-hero-outline {
  background: transparent;
  color: var(--otr-white) !important;
  border: 2px solid rgba(255,255,255,0.5);
  padding: 0.5rem 1.25rem;
  border-radius: var(--otr-radius);
  font-weight: 500;
  transition: border-color var(--otr-transition), color var(--otr-transition);
}

.btn-hero-outline:hover {
  border-color: var(--otr-white);
  color: var(--otr-white);
}

/* Ключевые цифры в герое */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 1.5rem;
}

.hero-stat {
  display: flex;
  flex-direction: column;
}

.hero-stat-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--otr-white);
  line-height: 1.2;
}

.hero-stat-label {
  font-size: 0.85rem;
  color: var(--otr-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Правая колонка героя: изображение домика */
.hero-image-col {
  position: relative;
  z-index: 2;
}

.hero-image-wrap {
  border-radius: var(--otr-radius);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}

.hero-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.min-vh-75 { min-height: 75vh; }

@media (max-width: 991.98px) {
  .hero {
    min-height: auto;
    padding: 6rem 0 3rem;
  }
  .hero-stats { gap: 1.5rem; }
  .hero-stat-num { font-size: 1.5rem; }
}

/* --- Секции: общие стили --- */
.section-title {
  color: var(--otr-white);
  margin-bottom: 1rem;
  text-align: center;
}

.section-lead {
  color: var(--otr-text-muted);
  text-align: center;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.section-about {
  background: var(--otr-dark);
}

.section-services {
  background: var(--otr-forest);
}

/* Карточки услуг с иконками */
.service-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--otr-radius);
  padding: 1.5rem;
  height: 100%;
  transition: border-color var(--otr-transition), transform var(--otr-transition);
}

.service-card:hover {
  border-color: var(--otr-green);
  transform: translateY(-2px);
}

.service-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--otr-green);
  border-radius: var(--otr-radius);
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: var(--otr-white);
}

.service-card-title {
  color: var(--otr-white);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.service-card-text {
  color: var(--otr-text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.service-link {
  color: var(--otr-beige);
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.service-link:hover {
  color: var(--otr-beige-light);
}

/* Кнопки действий в блоке услуг */
.services-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.btn-action {
  background: rgba(255,255,255,0.1);
  color: var(--otr-white) !important;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 0.6rem 1.25rem;
  border-radius: var(--otr-radius);
  font-weight: 500;
  transition: background-color var(--otr-transition), border-color var(--otr-transition);
}

.btn-action:hover {
  background: rgba(255,255,255,0.15);
  color: var(--otr-white);
  border-color: rgba(255,255,255,0.35);
}

.btn-action-primary {
  background: var(--otr-green);
  border-color: var(--otr-green);
}

.btn-action-primary:hover {
  background: var(--otr-green-light);
  border-color: var(--otr-green-light);
  color: var(--otr-white);
}

/* --- Галерея / слайдер --- */
.section-gallery {
  background: var(--otr-dark);
}

.gallery-slider {
  max-width: 900px;
  margin: 0 auto;
  border-radius: var(--otr-radius);
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.gallery-img {
  height: 400px;
  object-fit: cover;
  background: var(--otr-forest);
}

.carousel-caption-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 1.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: var(--otr-white);
  font-weight: 500;
}

.carousel-control-prev,
.carousel-control-next {
  opacity: 0.8;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  opacity: 1;
}

@media (max-width: 767.98px) {
  .gallery-img { height: 280px; }
}

/* --- Карточки домиков на главной --- */
.section-cabins {
  background: var(--otr-forest);
}

.section-activities {
  background: var(--otr-dark);
}

.cabin-card {
  border-radius: var(--otr-radius);
  overflow: hidden;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform var(--otr-transition), box-shadow var(--otr-transition);
}

.cabin-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}

.cabin-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.cabin-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--otr-darker);
}

.cabin-card-body {
  padding: 1rem;
}

.cabin-card-title {
  color: var(--otr-white);
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.cabin-card-meta {
  color: var(--otr-text-muted);
  font-size: 0.85rem;
  margin: 0;
}

.activity-tile {
  display: block;
  padding: 1rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--otr-radius);
  text-decoration: none;
  color: var(--otr-text);
  text-align: center;
  transition: background var(--otr-transition), border-color var(--otr-transition);
}

.activity-tile:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--otr-green);
  color: var(--otr-white);
}

.activity-tile-name {
  display: block;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.activity-tile-price {
  font-size: 0.85rem;
  color: var(--otr-text-muted);
}

.btn-outline-light {
  border-color: rgba(255,255,255,0.4);
  color: var(--otr-white);
}

.btn-outline-light:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--otr-white);
  color: var(--otr-white);
}

/* --- Футер --- */
.site-footer {
  background: var(--otr-darker);
  color: var(--otr-text-muted);
  margin-top: auto;
}

.footer-title {
  color: var(--otr-white);
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-heading {
  color: var(--otr-beige-light);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.footer-text {
  font-size: 0.95rem;
  margin-bottom: 0;
}

.footer-links a {
  color: var(--otr-text-muted);
  text-decoration: none;
  display: block;
  padding: 0.25rem 0;
  transition: color var(--otr-transition);
}

.footer-links a:hover {
  color: var(--otr-white);
}

.footer-address {
  font-style: normal;
  font-size: 0.95rem;
}

.footer-address a {
  color: var(--otr-beige);
}

.footer-address a:hover {
  color: var(--otr-beige-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  color: var(--otr-text-muted);
  font-size: 0.85rem;
}

/* --- Появление блоков при прокрутке (reveal) --- */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --- Страницы без hero: контейнер и фон --- */
body:not(.page-home) .main-wrap {
  padding-top: 1rem;
  padding-bottom: 2rem;
  background: var(--otr-darker);
}

body:not(.page-home) .main-wrap .container {
  color: var(--otr-text);
}

body:not(.page-home) .main-wrap h1,
body:not(.page-home) .main-wrap .card-title {
  color: var(--otr-white);
}

body:not(.page-home) .main-wrap .text-muted {
  color: var(--otr-text-muted) !important;
}

body:not(.page-home) .main-wrap .card {
  background: var(--otr-dark);
  border-color: rgba(255,255,255,0.08);
  color: var(--otr-text);
}

body:not(.page-home) .main-wrap .card:hover {
  border-color: var(--otr-green);
}

body:not(.page-home) .main-wrap .btn-primary {
  background: var(--otr-green);
  border-color: var(--otr-green);
}

body:not(.page-home) .main-wrap .btn-primary:hover {
  background: var(--otr-green-light);
  border-color: var(--otr-green-light);
}

body:not(.page-home) .main-wrap .breadcrumb {
  background: transparent;
}

body:not(.page-home) .main-wrap .breadcrumb-item a {
  color: var(--otr-beige);
}

body:not(.page-home) .main-wrap .breadcrumb-item.active {
  color: var(--otr-text-muted);
}

/* Nav pills (категории развлечений) в тёмной теме */
body:not(.page-home) .main-wrap .nav-pills .nav-link {
  background: rgba(255,255,255,0.08);
  color: var(--otr-text-muted);
  border: 1px solid rgba(255,255,255,0.1);
}

body:not(.page-home) .main-wrap .nav-pills .nav-link:hover {
  background: rgba(255,255,255,0.12);
  color: var(--otr-white);
}

body:not(.page-home) .main-wrap .nav-pills .nav-link.active {
  background: var(--otr-green);
  border-color: var(--otr-green);
  color: var(--otr-white);
}

/* Таблицы в админке и списках */
body:not(.page-home) .main-wrap .table {
  color: var(--otr-text);
}

body:not(.page-home) .main-wrap .table thead th {
  border-color: rgba(255,255,255,0.1);
  color: var(--otr-beige-light);
}

body:not(.page-home) .main-wrap .table td,
body:not(.page-home) .main-wrap .table th {
  border-color: rgba(255,255,255,0.08);
}

body:not(.page-home) .main-wrap .table-hover tbody tr:hover {
  background: rgba(255,255,255,0.05);
}

body:not(.page-home) .main-wrap .form-control,
body:not(.page-home) .main-wrap .form-select {
  background: var(--otr-dark);
  border-color: rgba(255,255,255,0.15);
  color: var(--otr-text);
}

body:not(.page-home) .main-wrap .form-control:focus,
body:not(.page-home) .main-wrap .form-select:focus {
  background: var(--otr-dark);
  border-color: var(--otr-green);
  color: var(--otr-text);
}

/* --- Утилиты и доработки Bootstrap --- */
.alert {
  border-radius: var(--otr-radius);
}

/* Плавные переходы между блоками */
section {
  transition: opacity 0.4s ease;
}
