/* ========================================
   Дневник пляжа — maritel-beach-diary.css
   Кладём в: /wp-content/uploads/beach/maritel-beach-diary.css
   ======================================== */

.mbd-section {
  padding: 60px 0 50px;
  background: #0d1b2e;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.mbd-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('https://maritel.ru/wp-content/uploads/2025/08/maritel-64-992x992.jpg') center/cover no-repeat;
  opacity: 0.07;
  pointer-events: none;
}

.mbd-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* Заголовок */
.mbd-header {
  text-align: center;
  margin-bottom: 36px;
}

.mbd-header h2 {
  font-size: 2.4rem;
  font-weight: 700;
  color: #fff !important;
  margin: 0 0 8px;
  padding-bottom: 20px;
  position: relative;
  font-family: inherit;
}

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

.mbd-header p {
  color: rgba(255,255,255,0.5);
  font-size: 0.95rem;
  margin: 12px 0 0;
}

/* Главный плеер */
.mbd-player-wrap {
  margin-bottom: 16px;
}

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

.mbd-main-video.horizontal { aspect-ratio: 16/9; }
.mbd-main-video.vertical {
  aspect-ratio: 9/16;
  max-width: 360px;
  margin: 0 auto;
}

.mbd-main-video video {
  width: 100%;
  height: 100%;
  display: block;
}

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

/* Мета строка */
.mbd-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding: 0 2px;
}

.mbd-meta-date {
  font-size: 1.25rem;
  color: #fff;
  font-weight: 600;
}

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

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

@keyframes mbdPulse {
  0%,100%{opacity:1} 50%{opacity:.4}
}

/* Несколько видео за день */
.mbd-multi {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.mbd-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;
}

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

/* Лента миниатюр */
.mbd-thumbs-label {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 24px 0 10px;
}

.mbd-track-wrap {
  position: relative;
}

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

.mbd-track::-webkit-scrollbar { height: 3px; }
.mbd-track::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
}

.mbd-thumb {
  flex: 0 0 130px;
  border-radius: 7px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background: #000;
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
}

.mbd-thumb:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.35); }
.mbd-thumb.active { border-color: #27D246; }
.mbd-thumb.vert .mbd-thumb-img,
.mbd-thumb.vert .mbd-thumb-ph { aspect-ratio: 9/16; }

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

.mbd-thumb-ph {
  width: 100%;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a2a3a;
  font-size: 1.4rem;
  color: rgba(255,255,255,0.15);
}

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

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

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

/* Стрелки */
.mbd-arr {
  position: absolute;
  top: 50%;
  transform: translateY(-60%);
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 2;
  font-size: 0.9rem;
}
.mbd-arr:hover { background: rgba(255,255,255,0.22); }
.mbd-arr.l { left: -15px; }
.mbd-arr.r { right: -15px; }

/* Пусто */
.mbd-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.1);
  color: rgba(255,255,255,0.3);
  font-size: 0.9rem;
  gap: 8px;
}

/* Спиннер */
.mbd-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  gap: 14px;
}

.mbd-spinner {
  width: 34px; height: 34px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: #27D246;
  border-radius: 50%;
  animation: mbdSpin 0.8s linear infinite;
}

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

.mbd-loading p {
  color: rgba(255,255,255,0.35);
  font-size: 0.85rem;
}

/* Адаптив */
@media (max-width: 768px) {
  .mbd-section { padding: 40px 0 35px; }
  .mbd-header h2 { font-size: 1.8rem; }
  .mbd-thumb { flex: 0 0 95px; }
  .mbd-meta-desc { text-align: left; width: 100%; }
  .mbd-main-video.vertical { max-width: 240px; }
  .mbd-arr { display: none; }
}
