/* Base styles */
* {
    box-sizing: border-box;
}
body, html {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background-color: #f5f5f5; /* Light gray background */
}
img {
    max-width: 100%;
    height: auto;
}
.container {
  max-width: 960px; /* Optimal for most screens */
  margin: 0 auto;
  padding: 0 20px 20px;
}

.nav ul {
  list-style-type: none;
  padding: 0;
  display: flex;
  justify-content: center;
  background-color: #333; /* Dark background for nav */
  margin-bottom: 20px; /* Space between nav and content */
  margin-top: 0;
}

.nav ul li {
  margin: 0 10px;
}

.nav ul li a {
  text-decoration: none;
  color: white;
  padding: 10px;
  display: block;
}

.nav ul li a:hover {
  background-color: #ddd;
  color: black; /* Hover effect for nav links */
}

.nav ul li.current a, .nav ul li a:hover {
  background-color: #007bff; /* Highlight color for current page */
  color: white; /* Ensuring text is readable */
}

.header h1, h1 {
  text-align: center;
  color: #333;
  font-size: 26px;
}
h2 {
  text-align: center;
  color: #333;
  font-size: 20px;
}

/* Quiz and exam specific styles */
#question, #options {
  text-align: center;
  margin-bottom: 20px;
  display: block;
}

.button, button {
  padding: 10px 20px;
  margin: 10px;
  background-color: #007bff; /* Primary button color */
  color: white;
  border: none;
  border-radius: 5px; /* Rounded corners for buttons */
  cursor: pointer;
}

.button:hover, button:hover {
  background-color: #0056b3; /* Darker on hover */
}
#question {
    margin-top: 30px;
}
#nextButton {
  margin: 30px auto 0;
  clear: both;
}    

.hidden {
  display: none;
}

#debugInfo {
  color: #007bff;
  text-align: center;
}

/* Study page card styles */
.technique-card {
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  margin: 20px 0;
  padding: 20px;
  border-radius: 8px; /* Rounded corners */
  background-color: #fff; /* White background */
  text-align: center;
}

#techniquesContainer img {
  max-width: 100%;
  height: auto;
  border: none; /* Remove blue borders */
}

iframe, select {
  width: 100%;
  margin-bottom: 20px;
}

select {
  padding: 10px;
  border-radius: 4px; /* Slightly rounded corners for the dropdown */
}

.image-container {
  position: relative;
  cursor: pointer;
}

.image-container .technique-image {
  width: 100%;
  display: block;
  margin-bottom: -4px; /* Overlap the image and the iframe */
}

.image-container .play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px; /* Adjust as necessary */
  height: 64px; /* Adjust as necessary */
  background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent black background */
  border-radius: 50%; /* Makes the background circle */
  color: white; /* Color of the play character */
  font-size: 2em; /* Size of the play character */
  font-family: "Arial", sans-serif; /* Explicit font family */
  text-align: center; /* Centers the play character horizontally */
  transform: translate(-50%, -50%); /* Centers the play icon */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10; /* Ensure it is above the image */
}

.image-container .play-icon::before {
  content: '▶'; /* Directly put the unicode character */
}


@media screen and (max-width: 768px) {
  .nav ul {
    flex-direction: row; /* Changed from column to row */
    flex-wrap: wrap; /* Allows items to wrap onto the next line if needed */
    justify-content: space-around; /* Adjusts items to space out accordingly */
  }

  .nav ul li {
    margin: 5px; /* Provide some space around each item */
  }

  .container {
    width: 95%;
  }

  iframe {
    height: auto; /* Adjust height automatically */
  }
}

#quiz .option-button, #options button {
    color: #000;
    padding: 0;
    background: none;
    border: 5px solid transparent;
    width: 33.33%;
    margin: 0;
    display: inline-block;
    clear: none;
}

/* Exam page image buttons */
#exam #options button {
    width: auto;
    margin: 0 5px;
    flex: 0 0 85%;
    scroll-snap-align: center;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

#exam #options button .technique-image {
    width: 100%;
    height: auto;
    display: block;
    max-height: 300px;
    object-fit: contain;
}

#exam #options {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Hide scrollbar in Firefox */
    -ms-overflow-style: none; /* Hide scrollbar in IE and Edge */
    padding: 10px 0;
    gap: 10px;
    position: relative;
    margin-bottom: 40px; /* Make room for swipe indicator */
}

#exam #options::-webkit-scrollbar {
    display: none; /* Hide scrollbar in Chrome, Safari, and Opera */
}

/* Add styles for new technique-button and swipe-instruction classes */
.technique-button {
    padding: 10px;
    border: 5px solid transparent;
    background: none;
    border-radius: 8px;
    overflow: hidden;
}

.swipe-instruction {
    text-align: center;
    font-size: 14px;
    color: #666;
    font-style: italic;
    margin-top: 10px;
    margin-bottom: 20px;
}

/* Make images larger on mobile */
@media screen and (max-width: 767px) {
    #exam #options {
        align-items: center;
        padding: 20px 0;
        height: 300px; /* Fixed height container */
    }
    
    #exam #options button {
        flex: 0 0 80%;
        min-width: 250px;
        padding: 5px;
        height: 280px; /* Fixed height buttons */
    }
    
    #exam #options button .technique-image {
        width: 100%;
        height: 100%;
        max-height: none;
        object-fit: contain;
        background-color: #f5f5f5;
    }
    
    /* Add swipe indicator */
    #exam::after {
        content: "← Swipe to see more options →";
        display: block;
        text-align: center;
        margin-top: 10px;
        color: #666;
        font-style: italic;
        font-size: 14px;
    }
}

/* Desktop view - show all options side by side */
@media screen and (min-width: 768px) {
    #exam #options {
        flex-wrap: nowrap;
        justify-content: space-around;
    }
    
    #exam #options button {
        flex: 0 0 30%;
        max-width: 300px;
    }
}
.footer-box {
    padding: 30px 0;
}
#debugInfo {
    padding: 30px 0;
}
#scoreDisplay {
    text-align:center;
    padding: 30px 15px;
}
/* Adjusting the techniqueTypeSelector for desktop */
@media screen and (min-width: 768px) {
    .header h1, h1 {
  font-size: 32px;
}
 h2 {
  font-size: 26px;
}
    .lightbox-content .technique-video {
        height: 450px;
    }
    #techniqueTypeSelector, #showAllSelector, #cardSelector {
        width: 50%;
        margin: 0 auto; /* Centering the select box */
        display: block; /* Ensuring it takes its own line */
    }
    
    .filter-controls {
        margin-bottom: 20px;
    }
    
    .filter-controls select {
        margin-bottom: 10px;
    }
    
    .required-2025 {
        border: 2px solid #007bff;
    }
}

/* Ensuring margin on mobile */
@media screen and (max-width: 767px) {
    #techniqueTypeSelector, #cardSelector {
        width: calc(100% - 20px); /* Providing space for margin */
        margin: 0 10px; /* 10px margin on the left and right */
    }
}

/* Lightbox styles */
.lightbox {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 100; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0, 0, 0); /* Fallback color */
  background-color: rgba(0, 0, 0, 0.9); /* Black w/ opacity */
  justify-content: center;
  align-items: center;
}

.lightbox-content {
  position: relative;
  margin: auto;
  padding: 20px;
  width: 100%;
  max-width: 840px; /* Adjust as needed */
}

.lightbox .close-btn {
  position: absolute;
  top: 20px;
  right: 25px;
  color: #fff;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
}

.technique-video {
  width: 100%;
  height: 230px; /* You can set a specific height if you want */
}

/* Styles for text options, which should be displayed horizontally */
.options-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px; /* Adjust the space between options as needed */
  padding: 20px 0; /* Space above and below the container */
}

/* Specific styles for image options, which should be stacked vertically */
.options-container.vertical {
  flex-direction: column;
  align-items: center;
}

/* Styles for individual buttons within the options-container */
.option-button {
  padding: 10px 20px;
  margin: 10px; /* Adjust the space around each button as needed */
  background-color: #007bff; /* Button background color */
  color: white; /* Button text color */
  border: none;
  border-radius: 5px; /* Rounded corners for buttons */
  cursor: pointer;
  font-size: 1em; /* Adjust the font size as needed */
}

/* Styles for images within the quiz */
.quiz-image {
  max-width: 70%; /* Full width within its container */
  height: auto; /* Keep the aspect ratio of the image */
  margin:20px auto; /* Space below the image */
}

/* You might also want to add styles for when a button is selected, 
   indicating whether the choice was correct or incorrect */
.option-button.correct {
  background-color: green;
}

.option-button.incorrect {
  background-color: red;
}

/* Responsive styles for smaller screens */
@media screen and (max-width: 767px) {
  .options-container {
    flex-direction: column;
  }

  .option-button {
    width: 100%; /* Full width for better touch targets on mobile */
  }

  /* Adjust image size on smaller screens if needed */
  .quiz-image {
    width: 100%; /* Full width */
    height: auto; /* Keep the aspect ratio */
  }
}
