.publication_list {
  font-family: Arial, sans-serif;
  background-color: transparent !important;
}

.modal,
.modal-backdrop {
  z-index: 999999 !important;
}

.modal-backdrop.show {
  opacity: 0 !important;
  background-color: transparent !important;
}

.container {
  max-width: 1200px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #343a40;
  margin-bottom: 0;
  /* Bootstrap's mb-4 handles vertical spacing */
}

.content-item {
  /* Ensures items are stacked and centered within their grid cell if smaller than full width */
  text-align: center;
}

.lecture-img {
  /* This ensures the image covers the area without distortion */
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;

    /* Use 100% width to fill the column container */
    width: 100%;
    /* Let height be auto, aspect-ratio will control the height relative to the width */
    height: auto;
    /* Sets the ratio to 3 (width) to 4 (height) for a portrait shape */
}

.publication-img {
  /* This ensures the image covers the area without distortion */
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;

  /* Use 100% width to fill the column container */
  width: 100%;
  /* Let height be auto, aspect-ratio will control the height relative to the width */
  height: auto;
  /* Sets the ratio to 3 (width) to 4 (height) for a portrait shape */
  aspect-ratio: 3 / 4;
}

.publication-img:hover {
  transform: translateY(-3px);
}

.lecture-thumb {
  width: 100%;
  height: auto;
  max-height: 150px;
  /* Max height for video thumbnails */
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}

.lecture-thumb:hover {
  transform: translateY(-3px);
}

/* Style for the link wrapper to make the whole tile behave like a link */
.content-link {
  text-decoration: none;
  /* Remove underline from the link */
  color: inherit;
  /* Inherit text color */
  display: block;
  /* Make the anchor tag a block element to contain the content-item */
  transition: opacity 0.2s;
}

.content-link:hover {
  opacity: 0.9;
}

.item-text {
  font-size: 15px;
  color: #f8f9fa;
  margin-top: 5px;
}

/* Layout adjustment for the side-by-side structure on medium and larger screens */
@media (min-width: 768px) {
  .title-col {
    position: sticky;
    /* Keep the title visible */
    top: 20px;
    align-self: flex-start;
    /* Aligns the title to the top of the row */
  }
}

/* Modal Video Styles */
.modal-dialog {
  display: flex;
  flex-direction: column;
}

.modal-content {
  height: 100%;
  background-color: #000 !important;
  /* Entire content black */
}

.modal-header {
  background-color: #f8f9fa;
  color: #343a40;
  flex-shrink: 0;
  z-index: 1000001 !important;
  /* Ensure header is above external elements */
}

.modal-body {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #000 !important;
  /* Ensure body is completely black */
  padding: 0 !important;
  position: relative;
  /* Establish context for absolute video */
}

/* Video container to enforce aspect ratio and sizing */
.video-wrapper {
  position: relative;
  /* CRITICAL FIX: Shrinking the video height to avoid footer overlap */
  width: 90vw;
  height: 0;
  padding-bottom: 50.625%;
  /* Maintains 16:9 Aspect Ratio (9/16 * 100) based on width */
  max-width: 90%;

  /* Apply max height restriction to the wrapper */
  max-height: 70vh;
  /* Reduced height to avoid footer overlap */
  overflow: hidden;
  /* Hide anything that exceeds the max height */

  z-index: 1000000 !important;
}


#lectureVideoPlayer {
  /* Now absolutely positioned to guarantee stacking order and fill wrapper */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  margin: 0;
  z-index: 1000002 !important;
  /* HIGHEST Z-INDEX */
}

#videoModalLabel {
  color: #343a40;
  font-weight: bold;
}
