/* CalibreEdge Marketing - Media Section */

/* ── Container ── */
.media-section {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 25;
  display: none;
  background: #03324a;
  overflow: hidden;
  color: #f8dcbf;
  cursor: default;
}

/* ── Close Button ── */
.media-close-btn {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  width: 48px;
  height: 48px;
  background: rgba(3, 50, 74, 0.6);
  border: 1px solid rgba(248, 220, 191, 0.2);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.media-close-btn svg {
  width: 20px;
  height: 20px;
  color: rgba(248, 220, 191, 0.8);
}

.media-close-btn:hover {
  background: rgba(248, 220, 191, 0.15);
  transform: scale(1.1);
}

/* ── Wave Slider Pages ── */
.media-ws-pages {
  overflow: hidden;
  position: relative;
  height: 100vh;
  width: 100%;
}

.media-ws-bgs {
  position: relative;
  height: 100%;
}

.media-ws-bg {
  display: flex;
  height: 100%;
  background-size: cover;
  background-position: center center;
}

.media-ws--ready .media-ws-bg {
  background: none;
}

.media-ws-bg__part {
  overflow: hidden;
  position: relative;
  height: 100%;
  cursor: pointer;
  user-select: none;
}

.media-ws-bg__part-inner {
  position: absolute;
  top: 0;
  width: 100vw;
  height: 100%;
  background-size: cover;
  background-position: center center;
}

/* Play icon for video slides */
.media-ws-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: rgba(3, 50, 74, 0.7);
  border: 2px solid rgba(248, 220, 191, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform 0.3s ease;
}

.media-ws-play-icon svg {
  width: 32px;
  height: 32px;
  color: rgba(248, 220, 191, 0.9);
  margin-left: 4px;
}

.media-ws-bg__part:hover .media-ws-play-icon {
  transform: translate(-50%, -50%) scale(1.1);
}

/* ── Text Overlay ── */
.media-ws-text {
  overflow: hidden;
  position: absolute;
  left: 5%;
  top: 50%;
  width: 90%;
  height: 80px;
  margin-top: -40px;
  pointer-events: none;
  z-index: 100;
}

.media-ws-text__heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 80px;
  color: #fff;
  text-shadow: 2px 2px 20px rgba(0, 0, 0, 0.8);
}

.media-ws-text__heading span:first-child {
  font-size: clamp(2rem, 6vw, 5rem);
  letter-spacing: 0.1em;
  color: #f8dcbf;
}

.media-ws-text__heading span:last-child {
  font-size: clamp(0.7rem, 1.5vw, 1rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.6;
  color: rgba(248, 220, 191, 0.7);
}

/* ── Counter ── */
.media-ws-counter {
  position: fixed;
  bottom: 3rem;
  right: 3rem;
  z-index: 200;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.1em;
}

.media-ws-counter__current {
  color: #f8dcbf;
  font-size: 1.5rem;
}

.media-ws-counter__divider {
  color: rgba(248, 220, 191, 0.3);
  margin: 0 0.3rem;
}

.media-ws-counter__total {
  color: rgba(248, 220, 191, 0.5);
}

/* ── Navigation Arrows ── */
.media-nav-arrow {
  position: fixed;
  z-index: 200;
  width: 48px;
  height: 48px;
  background: rgba(3, 50, 74, 0.5);
  border: 1px solid rgba(248, 220, 191, 0.2);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.media-nav-arrow svg {
  width: 22px;
  height: 22px;
  color: rgba(248, 220, 191, 0.8);
}

.media-nav-arrow:hover {
  background: rgba(248, 220, 191, 0.12);
  transform: scale(1.1);
}

.media-nav-prev {
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
}

.media-nav-prev:hover {
  transform: translateY(-50%) scale(1.1);
}

.media-nav-next {
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
}

.media-nav-next:hover {
  transform: translateY(-50%) scale(1.1);
}

/* ── Thumbnail Strip ── */
.media-thumb-strip {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(3, 50, 74, 0.6);
  border: 1px solid rgba(248, 220, 191, 0.15);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  max-width: 80vw;
  overflow-x: auto;
}

.media-thumb-strip::-webkit-scrollbar {
  height: 3px;
}

.media-thumb-strip::-webkit-scrollbar-thumb {
  background: rgba(248, 220, 191, 0.3);
  border-radius: 2px;
}

.media-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  background-color: rgba(4, 81, 116, 0.5);
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-thumb svg {
  color: rgba(248, 220, 191, 0.7);
}

.media-thumb:hover {
  border-color: rgba(248, 220, 191, 0.5);
  transform: scale(1.08);
}

.media-thumb.active {
  border-color: #aacdbe;
  box-shadow: 0 0 12px rgba(170, 205, 190, 0.4);
}

/* ── Empty State ── */
.media-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.media-empty p {
  font-family: var(--font-body);
  font-size: 1.2rem;
  color: rgba(248, 220, 191, 0.5);
  letter-spacing: 0.1em;
}

/* ── Modal Overlay ── */
.media-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(2, 20, 30, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.media-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.media-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 310;
  width: 44px;
  height: 44px;
  background: rgba(248, 220, 191, 0.1);
  border: 1px solid rgba(248, 220, 191, 0.25);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.media-modal-close svg {
  width: 20px;
  height: 20px;
  color: rgba(248, 220, 191, 0.8);
}

.media-modal-close:hover {
  background: rgba(248, 220, 191, 0.2);
  transform: scale(1.1);
}

.media-modal-content {
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-modal-image {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  animation: mediaModalIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.media-modal-video {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  background: #000;
  animation: mediaModalIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes mediaModalIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.media-modal-caption {
  margin-top: 1.25rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: rgba(248, 220, 191, 0.7);
  letter-spacing: 0.05em;
  text-align: center;
  max-width: 600px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .media-ws-text {
    left: 1.5rem;
    right: 1.5rem;
    width: auto;
  }

  .media-ws-text__heading {
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    line-height: 1.2;
    gap: 0.4rem;
  }

  .media-ws-counter {
    right: 1.5rem;
    bottom: 5rem;
  }

  .media-close-btn {
    top: 1rem;
    right: 1rem;
    width: 42px;
    height: 42px;
  }

  .media-nav-arrow {
    width: 40px;
    height: 40px;
  }

  .media-nav-prev {
    left: 0.75rem;
  }

  .media-nav-next {
    right: 0.75rem;
  }

  .media-thumb-strip {
    bottom: 1rem;
    max-width: 90vw;
  }

  .media-thumb {
    width: 36px;
    height: 36px;
  }

  .media-ws-play-icon {
    width: 60px;
    height: 60px;
  }

  .media-ws-play-icon svg {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 480px) {
  .media-nav-arrow {
    display: none;
  }

  .media-ws-text__heading span:first-child {
    font-size: clamp(1.5rem, 8vw, 2.5rem);
  }
}
