/* TMDb Portfolio Slider - Green Theme (#2C541D)
   Includes: scrollable modal + poster-only cards (no title bar under posters)
*/

:root{
  --tmdb-green: #2C541D;
  --tmdb-green-2: #3A6A28;
  --tmdb-green-3: #4C8A36;
  --tmdb-bg: #071007;
  --tmdb-border: rgba(255,255,255,.12);
  --tmdb-text: rgba(255,255,255,.92);
  --tmdb-muted: rgba(255,255,255,.72);
  --tmdb-shadow: 0 18px 50px rgba(0,0,0,.45);
  --tmdb-radius: 18px;
  --tmdb-ring: 0 0 0 3px rgba(44,84,29,.28);
  --tmdb-grad: linear-gradient(135deg, rgba(44,84,29,.95), rgba(7,16,7,.92));
  --tmdb-grad-soft: linear-gradient(180deg, rgba(7,16,7,0), rgba(7,16,7,.88));
}

/* Wrapper */
.tmdbps-wrap{ color: var(--tmdb-text); }

/* Optional title */
.tmdbps-titlebar{
  margin: 10px 0 14px;
  padding: 14px 16px;
  border-radius: var(--tmdb-radius);
  background: var(--tmdb-grad);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.tmdbps-title{
  margin: 0;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: .2px;
  color: rgba(255,255,255,.95);
}

/* Swiper spacing */
.tmdbps-swiper{ padding: 6px 2px 18px; }

/* Poster-only card (avoid theme hover/blue backgrounds) */
.tmdbps-wrap .tmdbps-card,
.tmdbps-wrap .tmdbps-card:hover,
.tmdbps-wrap .tmdbps-card:focus,
.tmdbps-wrap .tmdbps-card:active{
  background: transparent !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  text-decoration: none !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
}

.tmdbps-wrap .tmdbps-card::before,
.tmdbps-wrap .tmdbps-card::after{
  content: none !important;
  display: none !important;
}

.tmdbps-card img{
  width: 100%;
  border-radius: var(--tmdb-radius);
  display: block;
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.10);
  transition: box-shadow .20s ease, border-color .20s ease;
}
.tmdbps-card:hover img{
  box-shadow: 0 16px 44px rgba(0,0,0,.42);
  border-color: rgba(200,255,210,.18);
}

.tmdbps-empty{
  height: 260px;
  border-radius: var(--tmdb-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.06);
  border: 1px dashed rgba(255,255,255,.18);
  color: rgba(255,255,255,.70);
  font-size: 14px;
}

/* Arrows */
.tmdbps-wrap .swiper-button-prev,
.tmdbps-wrap .swiper-button-next{
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(7,16,7,.72);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 12px 30px rgba(0,0,0,.30);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.tmdbps-wrap .swiper-button-prev:hover,
.tmdbps-wrap .swiper-button-next:hover{
  transform: translateY(-1px);
  background: rgba(44,84,29,.75);
  border-color: rgba(255,255,255,.22);
}
.tmdbps-wrap .swiper-button-prev:after,
.tmdbps-wrap .swiper-button-next:after{
  font-size: 16px;
  font-weight: 700;
  color: rgba(255,255,255,.92);
}

/* -------------------------
   SCROLLABLE MODAL
------------------------- */
.tmdbps-modal{
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 24px;
  overflow: auto;                 /* allow scroll */
  -webkit-overflow-scrolling: touch;
}
.tmdbps-modal.open{ display: block; }

.tmdbps-modal-card{
  max-width: 920px;
  margin: 4vh auto 4vh;
  border-radius: calc(var(--tmdb-radius) + 2px);
  overflow: hidden;
  background: radial-gradient(circle at 20% 0%, rgba(44,84,29,.35), rgba(7,16,7,.98));
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: var(--tmdb-shadow);
  position: relative;

  max-height: 92vh;               /* constrain height */
  display: flex;                   /* allow body to scroll */
  flex-direction: column;
}

.tmdbps-close{
  position: absolute;
  top: 12px;
  right: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(7,16,7,.55);
  color: rgba(255,255,255,.88);
  padding: 10px 12px;
  cursor: pointer;
  border-radius: 999px;
  z-index: 3;
}
.tmdbps-close:hover{ background: rgba(44,84,29,.55); }

.tmdbps-modal-body{
  padding: 0;
  color: var(--tmdb-text);
  overflow-y: auto;               /* scroll inside */
  -webkit-overflow-scrolling: touch;
}

/* top bar */
.tmdbps-topbar{
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 16px 14px;
  background: linear-gradient(90deg, rgba(44,84,29,.55), rgba(7,16,7,.25));
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.tmdbps-movie-title{
  font-size: 20px;
  font-weight: 780;
  letter-spacing: .2px;
  color: rgba(255,255,255,.96);
}
.tmdbps-movie-meta{
  margin-top: 3px;
  font-size: 12px;
  color: var(--tmdb-muted);
}
.tmdbps-rating{
  font-size: 13px;
  font-weight: 760;
  color: rgba(230,255,235,.95);
  background: rgba(44,84,29,.35);
  border: 1px solid rgba(255,255,255,.12);
  padding: 8px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

/* hero */
.tmdbps-hero{
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 14px;
  padding: 14px 16px 6px;
}
.tmdbps-poster img{
  width: 100%;
  border-radius: var(--tmdb-radius);
  display: block;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 16px 45px rgba(0,0,0,.38);
}
.tmdbps-backdrop{
  position: relative;
  border-radius: var(--tmdb-radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 16px 45px rgba(0,0,0,.34);
}
.tmdbps-backdrop img{
  width: 100%;
  display: block;
  max-height: 280px;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
  transform: scale(1.01);
}
.tmdbps-backdrop::after{
  content: "";
  position: absolute;
  inset: 0;
  background: var(--tmdb-grad-soft);
  pointer-events: none;
}
.tmdbps-hero-play{
  position: absolute;
  left: 16px;
  bottom: 16px;
  width: 62px;
  height: 62px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(7,16,7,.55);
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 16px 45px rgba(0,0,0,.30);
}
.tmdbps-hero-play:hover{ background: rgba(44,84,29,.62); }
.tmdbps-hero-play:before{
  content: "";
  position: absolute;
  left: 25px;
  top: 20px;
  width: 0;
  height: 0;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 16px solid rgba(255,255,255,.95);
}

/* sections */
.tmdbps-section{ padding: 12px 16px; }
.tmdbps-section-title{
  font-weight: 780;
  letter-spacing: .2px;
  margin-bottom: 8px;
  color: rgba(255,255,255,.94);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.tmdbps-section-title::before{
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(76,138,54,.85);
  box-shadow: 0 0 0 3px rgba(76,138,54,.20);
}
.tmdbps-overview{ color: rgba(255,255,255,.86); line-height: 1.65; }

/* videos strip */
.tmdbps-videos-strip{
  display: flex;
  gap: 12px;
  overflow: auto;
  padding: 8px 2px 6px;
  -webkit-overflow-scrolling: touch;
}
.tmdbps-video-thumb{
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  text-align: left;
  cursor: pointer;
  width: 178px;
  flex: 0 0 auto;
  border-radius: var(--tmdb-radius);
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
  box-shadow: 0 14px 40px rgba(0,0,0,.28);
}
.tmdbps-video-thumb:hover{
  transform: translateY(-2px);
  border-color: rgba(200,255,210,.22);
  background: rgba(44,84,29,.20);
}
.tmdbps-video-thumb img{
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.tmdbps-video-thumb-title{
  padding: 10px 10px 12px;
  font-size: 12px;
  line-height: 1.25;
  color: rgba(255,255,255,.85);
}

/* cast */
.tmdbps-cast-head{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
}
.tmdbps-cast-actions{
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.tmdbps-cast-toggle{
  border: 1px solid rgba(255,255,255,.14);
  cursor: pointer;
  border-radius: 999px;
  padding: 9px 12px;
  background: rgba(7,16,7,.45);
  color: rgba(255,255,255,.88);
}
.tmdbps-cast-toggle:hover{ background: rgba(44,84,29,.42); }
.tmdbps-cast-link{
  font-size: 12px;
  color: rgba(200,255,210,.92);
}
.tmdbps-cast-row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,.10);
}
.tmdbps-cast-name{ font-weight: 650; color: rgba(255,255,255,.92); }
.tmdbps-cast-role{ color: rgba(255,255,255,.70); }

.tmdbps-cast-full{ display: none; }
.tmdbps-cast-block.is-expanded .tmdbps-cast-full{ display: block; }
.tmdbps-cast-block.is-expanded .tmdbps-cast-short{ display: none; }

/* footer info */
.tmdbps-foot{
  padding: 14px 16px 18px;
  background: rgba(255,255,255,.03);
  border-top: 1px solid rgba(255,255,255,.10);
  display: grid;
  gap: 8px;
  color: rgba(255,255,255,.82);
}

/* Video overlay */
.tmdbps-video-overlay{
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000000;
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 24px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.tmdbps-video-overlay.open{ display: block; }
.tmdbps-video-card{
  background: radial-gradient(circle at 20% 0%, rgba(44,84,29,.28), rgba(7,16,7,.98));
  max-width: 980px;
  margin: 8vh auto 0;
  border-radius: calc(var(--tmdb-radius) + 2px);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: var(--tmdb-shadow);
  position: relative;
}
.tmdbps-video-close{
  position: absolute;
  top: 12px;
  right: 12px;
  border: 1px solid rgba(255,255,255,.14);
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(7,16,7,.55);
  color: rgba(255,255,255,.88);
  cursor: pointer;
  z-index: 2;
}
.tmdbps-video-frame-wrap{ aspect-ratio: 16 / 9; }
.tmdbps-video-frame-wrap iframe{
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Responsive */
@media (max-width: 820px){
  .tmdbps-modal{ padding: 14px; }
  .tmdbps-hero{ grid-template-columns: 1fr; }
  .tmdbps-backdrop img{ max-height: 220px; }
}
@media (max-width: 520px){
  .tmdbps-wrap .swiper-button-prev,
  .tmdbps-wrap .swiper-button-next{
    width: 40px;
    height: 40px;
  }
  .tmdbps-video-thumb{ width: 155px; }
}
