/* ==========================================================================
   Река культур — Mini App
   Стиль: osetskayasalov.com (минимализм, Inter, #231F20)
   ========================================================================== */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  border: 0;
  box-sizing: border-box;
  line-height: inherit;
}

:root {
  --bg: var(--tg-theme-bg-color, #ffffff);
  --text: var(--tg-theme-text-color, #231F20);
  --hint: var(--tg-theme-hint-color, #8A8B8A);
  --link: var(--tg-theme-link-color, #231F20);
  --secondary-bg: var(--tg-theme-secondary-bg-color, #f5f5f4);
  --border: #e0dfdd;
  --accent: #231F20;
}

html {
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  line-height: 18px;
  color: var(--text);
  background: var(--bg);
  font-weight: normal;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

/* ==========================================================================
   Auth Gate (shown when NOT opened from Telegram)
   ========================================================================== */

.auth-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 30px;
  text-align: center;
  background: #000;
  color: #fff;
}

.auth-gate-title {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.auth-gate p {
  font-size: 14px;
  line-height: 21px;
  color: rgba(255,255,255,0.7);
}

.auth-gate.hidden { display: none; }

/* ==========================================================================
   App Layout
   ========================================================================== */

.app {
  min-height: 100vh;
  padding: 0 15px 30px;
}

/* ==========================================================================
   Header
   ========================================================================== */

.header {
  padding: 20px 0 6px;
  text-align: center;
}

.header h1 {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text);
}

.header .subtitle {
  font-size: 11px;
  color: var(--hint);
  margin-top: 2px;
  letter-spacing: 0.06em;
}

/* ==========================================================================
   Navigation Grid
   ========================================================================== */

.nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin: 16px 0;
}

.nav-card {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.nav-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}

.nav-card:active img {
  transform: scale(1.03);
}

.nav-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.55));
  font-size: 10px;
  font-weight: 400;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  text-align: left;
}

/* ==========================================================================
   Back Button
   ========================================================================== */

.back-btn {
  background: none;
  border: none;
  color: var(--hint);
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  padding: 14px 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* ==========================================================================
   Section Title
   ========================================================================== */

.section-title {
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  margin-bottom: 16px;
  color: var(--text);
}

.section-subtitle {
  font-size: 13px;
  line-height: 18px;
  color: var(--hint);
  margin: -10px 0 16px;
}

/* ==========================================================================
   Item Cards (list view)
   ========================================================================== */

.item-card {
  display: block;
  margin-bottom: 2px;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.item-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform 400ms ease;
}

.item-card:active img {
  transform: scale(1.03);
}

.item-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px 14px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
}

.item-card-title {
  font-size: 11px;
  font-weight: 400;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.item-card-desc {
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  margin-top: 2px;
}

/* Simple list cards (no image) */
.list-card {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.list-card:first-child {
  border-top: 1px solid var(--border);
}

.list-card-title {
  font-size: 13px;
  font-weight: 400;
  color: var(--text);
}

.list-card-desc {
  font-size: 11px;
  color: var(--hint);
  margin-top: 2px;
}

/* ==========================================================================
   Detail View
   ========================================================================== */

.detail {
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.detail-hero {
  width: calc(100% + 30px);
  margin-left: -15px;
  margin-bottom: 20px;
}

.detail-hero img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.detail-title {
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  margin-bottom: 14px;
  color: var(--text);
}

.detail-text {
  font-size: 14px;
  line-height: 21px;
  margin-bottom: 20px;
  color: var(--text);
}

.detail-text p {
  margin: 18px 0 0;
}

.detail-text p:first-child {
  margin: 0;
}

/* ==========================================================================
   Photo Gallery (horizontal scroll)
   ========================================================================== */

.gallery {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  margin: 0 -15px 20px;
  padding: 0 15px;
  scrollbar-width: none;
}

.gallery::-webkit-scrollbar { display: none; }

.gallery img {
  flex: 0 0 85%;
  height: 200px;
  object-fit: cover;
  scroll-snap-align: start;
  border-radius: 0;
}

.gallery-counter {
  font-size: 10px;
  color: var(--hint);
  text-align: right;
  margin: -16px 0 16px;
  letter-spacing: 0.06em;
}

/* ==========================================================================
   Info Blocks
   ========================================================================== */

.info-section {
  margin-bottom: 24px;
}

.info-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--hint);
  margin-bottom: 6px;
}

.info-value {
  font-size: 14px;
  line-height: 21px;
  color: var(--text);
}

.info-value code {
  font-family: inherit;
  font-weight: 500;
  user-select: all;
}

/* ==========================================================================
   Feature List (amenities, equipment)
   ========================================================================== */

.feature-list {
  list-style: none;
  margin-bottom: 20px;
}

.feature-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  line-height: 18px;
  color: var(--text);
}

.feature-list li:first-child {
  border-top: 1px solid var(--border);
}

/* ==========================================================================
   Steps (instructions)
   ========================================================================== */

.steps {
  list-style: none;
  counter-reset: step;
  margin-bottom: 20px;
}

.steps li {
  counter-increment: step;
  padding: 10px 0 10px 32px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  line-height: 18px;
  position: relative;
}

.steps li:first-child {
  border-top: 1px solid var(--border);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 10px;
  font-size: 10px;
  color: var(--hint);
  letter-spacing: 0.06em;
  width: 20px;
}

/* ==========================================================================
   Warning
   ========================================================================== */

.warning {
  padding: 12px 14px;
  border-left: 2px solid var(--accent);
  font-size: 12px;
  line-height: 17px;
  color: var(--text);
  margin: 16px 0;
  background: var(--secondary-bg);
}

/* ==========================================================================
   Divider
   ========================================================================== */

.divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

/* ==========================================================================
   Content section with header
   ========================================================================== */

.content-block {
  margin-bottom: 28px;
}

.content-block-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--hint);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

/* ==========================================================================
   Video Instruction Card
   ========================================================================== */

.video-card {
  position: relative;
  margin: 12px 0 16px;
  cursor: pointer;
  overflow: hidden;
  background: #000;
}

.video-card video {
  width: 100%;
  display: block;
  background: #000;
}

.video-card-external {
  position: relative;
  margin: 12px 0 16px;
  cursor: pointer;
  overflow: hidden;
  background: var(--secondary-bg);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
}

.video-card-external:active {
  background: var(--border);
}

.video-play-icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-play-icon svg {
  width: 16px;
  height: 16px;
  fill: #fff;
  margin-left: 2px;
}

.video-card-info {
  flex: 1;
  min-width: 0;
}

.video-card-title {
  font-size: 13px;
  font-weight: 400;
  color: var(--text);
  line-height: 18px;
}

.video-card-hint {
  font-size: 11px;
  color: var(--hint);
  margin-top: 2px;
}
