/* ========================================
   Дневник пляжа — beach-diary.css
   ======================================== */

.beach-diary-section {
  padding: 5rem 0 4rem;
  background: #0d1b2e;
  position: relative;
  overflow: hidden;
}

.beach-diary-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/images/beach.webp') center/cover no-repeat;
  opacity: 0.08;
  pointer-events: none;
}

/* Заголовок */
.beach-diary-header {
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 1;
}

.beach-diary-header h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.6rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.4rem;
  position: relative;
  padding-bottom: 20px;
}

.beach-diary-header h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 1px;
  background: rgba(255,255,255,0.5);
}

.beach-diary-header p {
  color: rgba(255,255,255,0.55);
  font-size: 0.95rem;
  margin: 0.8rem 0 0;
}

/* Главный плеер */
.bd-player-wrap {
  position: relative;
  z-index: 1;
  margin-bottom: 1.25rem;
}

.bd-main-video {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  min-height: 200px;
}

/* горизонтальное видео */
.bd-main-video.horizontal {
  aspect-ratio: 16/9;
}

/* вертикальное видео — центрируем с ограничением ширины */
.bd-main-video.vertical {
  aspect-ratio: 9/16;
  max-width: 380px;
  margin: 0 auto;
}

.bd-main-video video,
.bd-main-video iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}

/* Оверлей до нажатия play */
.bd-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
  cursor: pointer;
  transition: background 0.2s;
  z-index: 2;
}

.bd-overlay:hover {
  background: rgba(0,0,0,0.2);
}

.bd-overlay.hidden {
  display: none;
}

.bd-play-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  border: 2px solid rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background 0.2s;
  flex-shrink: 0;
}

.bd-overlay:hover .bd-play-btn {
  transform: scale(1.08);
  background: rgba(255,255,255,0.28);
}

.bd-play-btn::after {
  content: '';
  border-left: 22px solid #fff;
  border-top: 13px solid transparent;
  border-bottom: 13px solid transparent;
  margin-left: 5px;
}

/* Мета-строка под плеером */
.bd-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1rem;
  padding: 0 2px;
}

.bd-meta-date {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.3rem;
  color: #fff;
  font-weight: 600;
}

.bd-meta-desc {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  flex: 1;
  text-align: right;
}

.bd-live-badge {
  display: inline-block;
  background: #e53935;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 8px;
  animation: bdPulse 2s infinite;
}

@keyframes bdPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Лента превью */
.bd-thumbs-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.6rem;
  position: relative;
  z-index: 1;
}

.bd-thumbs-outer {
  position: relative;
  z-index: 1;
}

.bd-thumbs-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.bd-thumbs-track::-webkit-scrollbar {
  height: 3px;
}
.bd-thumbs-track::-webkit-scrollbar-track {
  background: transparent;
}
.bd-thumbs-track::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
}

/* Одна миниатюра */
.bd-thumb {
  flex: 0 0 120px;
  cursor: pointer;
  border-radius: 7px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
  background: #000;
}

.bd-thumb:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,0.4);
}

.bd-thumb.active {
  border-color: #27D246;
}

.bd-thumb.no-video {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.bd-thumb-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: #1a2a3a;
}

/* Плейсхолдер когда нет превью */
.bd-thumb-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a2a3a;
  font-size: 1.2rem;
  color: rgba(255,255,255,0.2);
}

.bd-thumb-foot {
  background: rgba(0,0,0,0.75);
  padding: 4px 7px;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.bd-thumb-day {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.9);
  font-weight: 500;
  white-space: nowrap;
}

.bd-thumb-sub {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Вертикальная миниатюра */
.bd-thumb.vert .bd-thumb-img,
.bd-thumb.vert .bd-thumb-placeholder {
  aspect-ratio: 9/16;
}

/* Стрелки прокрутки */
.bd-scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 2;
}

.bd-scroll-btn:hover {
  background: rgba(255,255,255,0.25);
}

.bd-scroll-btn.left { left: -16px; }
.bd-scroll-btn.right { right: -16px; }

/* Состояние загрузки */
.bd-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  flex-direction: column;
  gap: 12px;
}

.bd-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255,255,255,0.15);
  border-top-color: #27D246;
  border-radius: 50%;
  animation: bdSpin 0.8s linear infinite;
}

@keyframes bdSpin {
  to { transform: rotate(360deg); }
}

.bd-loading-text {
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
}

/* Нет контента за день */
.bd-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16/9;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  border: 1px dashed rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.3);
  font-size: 0.9rem;
  gap: 8px;
}

/* Кнопка нескольких видео */
.bd-multi-nav {
  display: flex;
  gap: 6px;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}

.bd-multi-btn {
  padding: 4px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  color: rgba(255,255,255,0.6);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: "Roboto", sans-serif;
}

.bd-multi-btn.active,
.bd-multi-btn:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}

/* Адаптив */
@media (max-width: 767px) {
  .beach-diary-section {
    padding: 3rem 0 2.5rem;
  }
  .beach-diary-header h3 {
    font-size: 2rem;
  }
  .bd-thumb {
    flex: 0 0 90px;
  }
  .bd-meta-desc {
    text-align: left;
    width: 100%;
  }
  .bd-main-video.vertical {
    max-width: 260px;
  }
  .bd-scroll-btn { display: none; }
}
