/* =========================
   GLOBAL / BASE LOCK
========================= */

body, html {
  margin: 0;
  padding: 0;
}

body.modal-open {
  overflow: hidden;
}

/* Optional page-specific background */
body.single-project .sections {
  background-color: #000 !important;
}

/* =========================
   MODAL LAYER (NEW)
========================= */

#videoModal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition: opacity 0.35s ease, visibility 0.35s ease;
}

#videoModal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* backdrop (if separate element used) */
.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
}

/* =========================
   PROJECT LAYOUT WRAPPER
========================= */

.jw-project-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 88vh;

  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden;
  box-sizing: border-box;
}

/* =========================
   VIDEO PLAYER CONTAINER
========================= */

#jwplayer-container,
#jwplayer-container .jw-wrapper {
  width: min(65vw, calc(75vh * 16 / 9)) !important;
  max-width: 65vw !important;
  aspect-ratio: 16 / 9 !important;
  background: #000;
}

/* =========================
   CLOSE BUTTON
========================= */

#modalClose,
.project-close {
  position: fixed;
  display: inline-block;
  top: 1rem;
  right: 1rem;
  padding: 0.5rem;
  background: #000; /* default background */
  color: #fff; /* default text color */
  cursor: pointer;
  z-index: 10001;
  font-family: "amador", sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  border:none !important;
  border-radius: 4px;
  transition: background 0.3s ease, color 0.3s ease;
  line-height: 1;
  box-sizing: border-box;
}

#modalClose:hover,
.project-close:hover {
  background: #fff;
  color: #000 !important;
}

/* =========================
   CONTROLS WRAPPER
========================= */

.custom-controls {
  width: min(65vw, calc(75vh * 16 / 9));
  max-width: 65vw;

  background: rgba(0, 0, 0, 0.9);
  padding: 1rem 0rem;

  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* =========================
   PROGRESS BAR
========================= */

.progress-container {
  width: 100%;
  height: 2px;
  background: #333;
  cursor: pointer;
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: #666;
  transition: width 0.05s linear;
}

/* =========================
   CONTROL BAR
========================= */

.control-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

/* =========================
   PLAY BUTTON
========================= */

.play-pause-btn {
  background: none;
  border: none;
  padding: 0.5rem 0rem;
  cursor: pointer;
  position: relative;
}

.play-pause-btn .mask-container {
  overflow: hidden;
  height: 40px;
  padding: 0 0.5rem;
  display: inline-block;
  margin: 0 -0.4rem;
}

.play-pause-btn span {
  font-family: "amador", sans-serif;
  font-size: 24px;
  transform: scaleX(1.2);
  display: block;
  line-height: 1;
  color: #fff;
}

/* =========================
   TIME DISPLAY
========================= */

.time-display {
  font-family: 'DomiRegular', sans-serif;
  font-size: 0.7rem;
  color: #fff;
  white-space: nowrap;
}

/* =========================
   TITLES / CREDITS
========================= */

.project-title {
  font-family: "amador", sans-serif !important;
  font-size: 2.4rem !important;
  color: #f2f2f2 !important;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.credit-role {
  font-family: 'DomiRegular', sans-serif;
  font-size: 0.7rem;
  color: #777;
  text-transform: lowercase;
  letter-spacing: 0.2em;
}

.credit-name {
  font-family: 'DomiRegular', sans-serif;
  font-size: 0.9rem;
  color: #ababab;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.credit-item {
  white-space: nowrap;
}

.separator {
  padding: 0 0.5em;
  color: #333;
}

/* Credits Section - takes remaining space */
.credits-section {
  background: rgba(0, 0, 0, 0.95);
  padding: 4.5rem 0rem 4.5rem 0rem;
  text-align: left;
  height: 12vh;
  display: flex;
  flex-direction: column;
  justify-content: left;
  box-sizing: border-box;
  margin-bottom: 2rem;
}

/* =========================
   NAV OVERRIDE (Semplice)
========================= */

smp-nav-content[data-module="menu"] {
  display: none !important;
}