/* Define Poppins font */
@font-face {
    font-family: 'Poppins';
    src: url('/assets/fonts/Poppins-Light.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Reset default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body styles */
body {
    background-color: black;
    font-family: 'Poppins', sans-serif;
    color: #fff;
    overflow-y:hidden;
}

.bgImage {
    width: 75%;
    height: auto;
    position: fixed;
    top: 5%;
    left:25%;
    pointer-events: none; /* Prevent bgImage from blocking clicks */
    z-index: -1; /* Ensure it’s behind all content */
}
/* Header styles */
header {
    background-color: #1a1a1a;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

/* Logo placeholder */
.logo{
    width: auto;
    height: 80px;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
}

/* Navigation menu */
nav {
    flex-grow: 1;
    margin-left: 30px;
    position: relative;
    min-width: 200px; 
}

.nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: nowrap; /* Prevent wrapping */
    overflow: hidden; /* Hide overflowing items */
}

.nav-list li {
    font-size: 2em;
    color: #fff;
    cursor: pointer;
    transition: color 0.3s;
    white-space: nowrap; /* Prevent text wrapping */
}

.nav-list li:hover {
    color: #ff5555;
}
.nav-list li.selected {
    color: #93C63C; /* Persistent highlight */
}
/*search bar stuff*/
.search-icon {
    height: 03vh;
    width: auto;
    aspect-ratio: auto;
    background-color: transparent;
}

.search-container {
    display:none;
    align-items: center;
    position: fixed;
    top: 70px; /* Below header */
    left: 60vw;
    width: 40vw; /* Full viewport width */
    margin-right:10px;
    background-color:black; /* rgba(0, 0, 0, 0.75); /* Gray with 25% transparency */
    padding: 10px 30px;
    z-index: 10000; /* Above main content */
    flex-wrap: wrap; /* Allow multiple lines */
    gap: 20px; /* Match nav-list spacing */
}


.search-container.show {
    display: flex;
}

#inSearch {
    width: 100%;
    height:60px;
    margin:5px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: white;
    color: black;
}

#searchResults {
    position: flex  ;
    left: 0;
    width: 100%;
    max-height: 50vh; /* Limit height */
    overflow-y: auto; /* Scroll if too tall */
    background-color: rgba(0, 0, 0, 0.75); /* Gray with 25% transparency */
    border: 1px solid #ccc;
    border-radius: 4px;
    z-index: 10000; /* Above other content */
}

#divScrollers{
    height: 1fr;
    max-height: 50vh;
    overflow-x: hidden;
    overflow-y: scroll;
}


.search-list-item {
  position: relative;   /* allows absolutely positioned children */
  display: inline-block;
  width:80%;
  height: auto;
  margin-left:10%; 
  background-color: rgba(255,255,255,0.1); /* semi-transparent background */
}

.search-list-img {
  height: auto;
  width: 100%;
  object-fit: cover;
  flex-shrink: 0;
  min-width: 100px;
  max-width:30vw;
  cursor: pointer;
  pointer-events: auto;
}


/* Dropdown styles */
.dropdown-container {
    position: relative;
    margin-right: 20px;
}

.dropdown-toggle {
    width: 24px;
    height: 24px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #000;
    font-size: 16px;
    border-radius: 4px;
}

.dropdown-menu {
    display: none; /* Hidden by default */
    position: fixed;
    top: 70px; /* Below header */
    left: 0;
    width: 100vw; /* Full viewport width */
    background-color: rgba(0, 0, 0, 0.75); /* Gray with 25% transparency */
    list-style: none;
    padding: 10px 30px;
    z-index: 10000; /* Above main content */
    flex-wrap: wrap; /* Allow multiple lines */
    gap: 20px; /* Match nav-list spacing */
}

.dropdown-menu li {
    font-size:2em;
    color: #ff5555;
    cursor: pointer;
    white-space: nowrap; /* Keep items from wrapping individually */
}

.dropdown-menu li:hover {
    color: White;
}

.dropdown-menu.show {
    display: flex;
    flex-direction: column;   /* stack children vertically */
    align-items: flex-start;  /* align items to the left */
    justify-content: flex-start;
    min-height: 150px; /* Only shown when .show is added */
}

.title-bar {
  display: flex;
  justify-content: flex-start;
  align-items: left;
  height: calc(100% / 15);
  width: 100%;
  Padding-top:25px;
  font-size: 1.75em;
  color: #ff5555;
}

.title-bar label{
    font-size: x-large;
    color: #ff5555;
}

.contentTitle{
    padding: 10%;
    width: 100%;
    font-size: 1.25em;
    text-wrap: wrap;
}

.content-button{
    display: absolute;
    font-size: 1.5em;
    height:20%;
    top:80%;
    left: 10%;
    position: relative;    
    justify-content: left;
    align-items: left;
}

.video-container {
    display: flex;
    max-width: 100vw;
    place-items:center;
    height: 50vh; /* Video.js player limited to 50% of viewport height */
    overflow: hidden;
    padding-top: 20px;
    box-sizing: border-box;
}

/* Video.js player styling */
.video-container .video-js {
    height: 100% ; /* Use full container height (up to 50vh) */
    max-width:55%;
    min-width:45%;
    max-height: 50vh; /* Ensure player respects container height limit */
    aspect-ratio: 16 / 9 !important; /* Automatically enforces 16:9 ratio */
    object-fit:scale-down; /* Scale video to fit while maintaining aspect ratio */
    margin: 0;
}

/* Right-side container for title and button */
.video-container .content {
    flex:1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 10px;
    box-sizing: border-box;
}

/* Title styling (up to two lines) */
.video-container .title {
    font-size: 1.5em;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit to two lines */
    line-clamp: 2; /* Standard property for compatibility */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-wrap: wrap;
    margin: 0 0 20px 0; /* Space below title */
    color:white;
}

.video-container .description  {
    font-size: 1rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 5; /* Limit to two lines */
    line-clamp:5;
    -webkit-box-orient: vertical;
    overflow: wrap;
    margin: 20px 0 20px 0; /* Space below title */
    color:white;
}


/* Button styling */
.video-container .action-button {
    padding: 10px 20px;
    font-size: 1rem;
    background-color: gainsboro;
    color: black;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: fit-content;
    align-self: left; /* Align button to the start of the content area */
    vertical-align: bottom;
}

/* Add to existing CSS */


/* Scroller */
.content-list {
  width: 100%;
  height: 35vh;
  padding: 20px;
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  align-items: center;     /* vertically center items within the strip */
  gap: 40px;               /* spacing between items */
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  pointer-events: auto;
  z-index: 10;
}

/* Each card auto-sizes to the image width at full height */
.content-list-item {
  position: relative;
  flex: 0 0 auto;          /* do not shrink; keep natural width */
  height: 100%;            /* fill the strip’s height */
  padding: 5px;            /* inner pad between image and edges */
  box-sizing: border-box;  /* include padding in the 100% height */
  background-color: rgba(255,255,255,0.1);
  overflow: hidden;        /* ensure nothing bleeds outside the card */
  display: block;          /* width will shrink-wrap the content (the image) */
  /* Remove width/min-width/aspect-ratio constraints */
}

/* Image: height-constrained, width auto from aspect ratio */
.content-list-img {
  display: block;          /* remove inline gaps */
  height: 100%;            /* match the card’s content box height */
  width: auto;             /* let width follow intrinsic aspect ratio */
  max-width: none;         /* don’t clamp to parent width */
  object-fit: contain;     /* safe if a non-image element ends up here */
  cursor: pointer;
  pointer-events: auto;
  /* Remove min-width and aspect-ratio on the image */
}

/* Optional: title overlay stays within the card */
.content-list-title {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0,0,0,0.6);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 1.5em;
  pointer-events: none;
  max-width: calc(100% - 16px);
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(3, 30%);
  grid-auto-rows: 20vw; /* ensure rows expand */
  background: rgba(0,0,0,0.6);
  gap: 4%;
  height:1fr;
  overflow-y: scroll;
  overflow-x: hidden;
  max-height: 35vh;
}

.grid-item {
  position: relative;   /* allows absolutely positioned children */
  display: inline-block;
  aspect-ratio: 16 / 9; /* keeps 16:9 */
  background: rgba(255,255,255,0.1);;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
 overflow: hidden; 
}

/* Main content placeholder */
main {
    margin-top: 70px;
    padding: 30px;
    min-height: calc(100vh - 70px);
    position: relative;
    z-index: 0; /* Ensure below dropdown */
}

/* Responsive design */
@media (max-width: 768px) {

    .bgImage {
        display: none; /* Hide background image on small screens */
    }
  /* Already existing mobile rules… */
  .logo {
    height: 8vh;        /* fixed typo: “08vh” → “8vh” */
    width: auto;
    margin-left: 50%;
    align-self: center;
    transform: translateX(-35%);
    justify-content: center; /* redundant but explicit */
    display: flex;           /* ensure flex context persists */
  }
  nav {
    flex-grow: 0;
    align-self: right;
    
    transform: translateX(-35%);
    position: relative;
    min-width: 200px; 
}

  /* Stack video and content vertically */
    .video-container {
        flex-direction: column;
        min-height:50vw;
        height: auto; /* allow height to grow naturally */
    }

    .video-container .video-js {
        width: 100%;
        max-width: 100%;
        padding: 10px;
        height: auto;   /*adjust for mobile */
        max-height: 50vh; /* optional: limit video height */
    }

    .video-container .content {
        width: 100%;
        min-height:50vw;
        padding: 15px;
        font-size: .5em;
        order: 2; /* ensure content comes after video */
    }

    #contentTitle {
        font-size: 3em;
    }
    
    #contentDesc {
        font-size: 1em;
    }

    .title-bar label{
        font-size: .5em;
        color: #ff5555;
    }
    .description{
        font-size: .5em;
    }
    .dropdown-menu li {
        font-size: 1em;
    }

    .content-list {
        overflow-y: scroll;
        overflow-x: hidden;
        flex-direction: column;
        width: 95%;
    }

    .content-list-item{
        width:100%; 
        height: auto;
    }

    .content-list-img {
        width: 100%;
        height: auto;
        min-width: auto;
    }

.grid-container {
    display: grid;
    grid-template-columns: repeat(1, 75%);
    /* Let rows auto-size instead of forcing a fixed height */
    grid-auto-rows: auto;
    background: rgba(0,0,0,0.6);
    gap: 10px; /* this gives spacing between items */
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 33vh;
}

.grid-item {
    display: flex;
    flex-direction: column;
    aspect-ratio: 16 / 9; /* keeps 16:9 */
    background: rgba(255,255,255,0.1);
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden; 
}
}