/* General Reset and Typography */
html {    
  margin: auto 2em;
}
body {
    margin: 0;
}
html, body {
    padding: 0;
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    color: #333;
    background-color: white;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: normal;
}

.card-grid {
    flex-direction: column;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    padding-top: 0px;
    justify-content: center;
    align-items: start;
    width: 100%;
    margin: 0 auto;
}

.card-grid .grid-item {
    width: 100%;
    height: auto; 
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card-footer-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.card-footer-container .card-date {
    color: rgba(0,0,0,.38);
}

.card-footer-container .card-more-btn {
   color: #007bff;
   cursor: pointer;
}

a.card-title {
    color: #004a8f;
    font-weight: 700;
    margin-bottom: 5px;
}

/* Card Structure */
.card {
    justify-content: space-between;
    border-top: 2px solid #004a8f;
    background: #fff;
    padding: 10px;
    display: flex;
    flex-direction: column;
}

.card .front {
    width: 100%;
    height: 100%;
    position: absolute;
    backface-visibility: hidden;
    border-radius: inherit;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.card .front {
    background-color: #ffffff;
}


/* Front Content */
.card .front img {
    width: 100%;
    height: 336px;
    object-fit: cover;
    border-bottom: 1px solid #ddd;
}

.card .front h2 {
    font-size: 18px;
    margin: 15px;
    text-align: center;
    color: #222;
}

.card .front .card-content {
    font-size: 14px;
    color: #666;
    text-align: center;
}

.chapter-separator {
    grid-column: 1 / -1; /*Span the entire width of the grid */
    padding: 0 20px;
    margin: 30px 0px 15px;
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    border-left: 15px solid #004a8f;
}

.chapter-separator h2 {
    color: #004a8f;
    font-weight: bold;
    font-size: 2rem;
    line-height: 2rem;
    text-transform: uppercase;
    text-decoration: none;
}

.chapter-separator p {
    margin: 5px 0 0;
    font-size: 0.9em;
    color: #555;
}

.course-info h3,
.contact h3 {
    font-size: 1.3em;
    font-weight: bold;
    color: #004a8f;
}

.contact {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}
.file-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.filter-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.filter-buttons button:hover,
.filter-buttons button.active {
    background-color: #0056b3;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    html {
        margin: 0;
    }
    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .card .front img {
        height: 180px;
    }
}

@media screen and (max-width: 480px) {
    .card-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .card .front img {
        height: 150px;
    }
}


/* Keywords */

.keyword-box {
    display: inline-block;
    margin: 4px;
    padding: 5px 10px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 15px;
    font-size: 0.9em;
    color: #333;
}
.keywords {
    margin-top: 10px;
}

/* Enforce 21:9 image aspect ratio */

.image-container {
    position: relative;
    width: 100%; /* Ensure it adapts to the card width */
    aspect-ratio: 21 / 9; /* Maintain 21:9 aspect ratio */
    background-color: #f0f0f0; /* Fallback background color */
     overflow: hidden;
   /* border-radius: 5px; /* Optional: Rounded corners */
}

.image-container img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image fills the container */
    transform: translate(-50%, -50%);
}


/* Image Carousel */

/*
*****************************************
! BANNER SLIDER ! ----------------------*
*****************************************
*/

/*reset*/
ul.bannerSlider{
    padding-left:0;
  }
  .bannerSlider{
      height: 336px;
  }
  .bannerSlider .slide__image::before{
      content: "";
      position: absolute;
      width: 100%;
      height: 336px;
      background: rgba(255, 255, 255, 0);
  }
  .bannerSlider .slick-slide {
      position: relative;
  }
  .bannerSlider .slide__image img {
      width: 100%;
      height: 336px;
      object-fit: cover;
  }
  img.slide__image__top-position {
      object-position:center bottom;
  }
  .bannerSlider .slide__text {
      position: absolute;
      z-index: 100;
      text-align: center;
      width: 100%;
      top: 50%;
        transform: translateY(-50%);
  }
  .bannerSlider .slide__text h2 {
      font-size: 48px;
      font-weight: 100;
  
      color: #fff;
  }

  ul.bannerSlider.slick-initialized.slick-slider.slick-dotted {
    margin-left: 0px;
    /* margin-top: 5.25em; */
  }

  /* Parent container for each lecture */
.lecture-container {
    background-color: #f4f7f7;  /* Grey background */
    padding: 20px;
    margin-bottom: 20px; /* Spacing between lectures */
}

.lecture-cards-wrapper {
    width: fit-content;
    display: flex;
    flex-wrap: wrap;
}

.lecture-card {
    /* flex: 1 1 calc(33.33% - 20px);  */
    min-width: 26em;
    max-width: calc(33.33% - 20px);  
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    flex: 0 1 auto;
    border-top: 2px solid #004a8f;
    margin: 10px;
    background: white;
    padding: 10px;
}

.lecture-img-container {
    position: relative;
    /* width: 100%;
    min-width: 24em; */
    aspect-ratio: 21 / 9;
    background-color: #f0f0f0;
    overflow: hidden;
    flex: 1 1 calc(33.33% - 20px); 
}

.lecture-img-container img {
    width: 100%;
    height: auto;
}
.lecture-title {
  font-size: 1.1em;
  font-weight: bold;
  overflow: hidden;
  text-overflow: ellipsis;
  text-wrap: auto;
  max-height: 3em;
  min-width: fit-content;
  margin-right: 10px;
}
.lecture-title-header {
    display: flex;
    justify-content: space-between;
    max-height: 2em;
    padding-top: 0.3em;
}
.lecture-title-section {
    display: flex;
    margin-right: 0.5em;
}
.lecture-title-container {
    max-height: 5em;
    width: 100%;
}
.file-link{
    margin-left: 10px;  
    width: 10px;
}
.file-link i {
    font-size: 1em;
}
.link-tooltip {
  position: relative;
  bottom: 3.6em;
  left: -2em;
  border-radius: 5px;
  font-size: 12px;
  white-space: nowrap;
  visibility: hidden;
  opacity: 0;
  z-index: 10;
  font-weight: bold;
  background-color: rgb(244,247,247);
  padding: 0.5em;
}
.file-link:hover, 
.link-tooltip:hover {
  visibility: visible;
  opacity: 1;
  text-decoration: none;
}
.lecture-footer {
    display: flex;
    justify-content: space-between;
    width: 100%;
}
div.lecture-card:last-child {
  margin-bottom: 10px;
}
/* :is(h1, p, div, ul, ol, table):last-child {
  margin-bottom: 0;
} */
.lecture-date {    
    color: rgba(0,0,0,.38);
    margin-bottom: 0;
    font-size: 13px;
    font-family: "Roboto",sans-serif;
}
.icon-right-open::before {
    content: "";
    font-family: "fontello";
    font-style: normal;
    font-weight: normal;
    display: inline-block;
    text-decoration: inherit;
    width: 1em;
    margin-right: .2em;
    text-align: center;
    font-variant: normal;
    text-transform: none;
    line-height: 1em;
    margin-left: .2em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.lecture-more-btn {
    display: flex;
}
.lecture-more-btn p {
    color: #004a8f;
    cursor: pointer;
}

.lecture-header {
    padding: 0 20px;
    margin: 30px 0px 15px;
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    border-left: 15px solid #004a8f;
    transition: #f5f5f5 0.3s ease;
}

.lecture-header:hover {
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: #004a8f;
}

.lecture-header h2 {
    color: #004a8f;
    font-weight: bold;
    font-size: 2rem;
    line-height: 2rem;
    text-transform: uppercase;
    text-decoration: none;

}
.lecture-description {
    font-size: 0.9rem;
    color: #555;
    overflow: hidden;
    text-wrap: wrap;
    text-overflow: ellipsis;
    white-space: collapse;
    height: 3em;
    width: 100%;
    margin-bottom: 0;
}

.resource-links {
    display: flex;
    justify-content: space-between;
}

.lecture-resource {
    font-size: 0.9rem;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    text-wrap: auto;
    margin-left: 1em;
}
.lecture-tooltip {
    height: 1em;
}
.lecture-tooltip i {
  position: relative;
  top: 1em;
  font-size: 1em;
  color: black;
}
.tooltip {
  position: relative;
  top: 2em;
  padding: 10px;
  background: slategrey;
  color: white;
  visibility: hidden;
  border-radius: 5px;
  opacity: 0;
  z-index: 10;
  height: fit-content;
  text-decoration: none;
}
.tooltip::before {
  content:"";
  position: absolute;
  top:-1px;
  left:3px;
  margin:auto;
  height: 10px;
  width: 20px;
  transform:rotate(45deg);
  background-color: slategrey;
}
/* Show tooltip on hover */
.lecture-title:hover .tooltip {
    visibility: visible;
    opacity: 1;
}


@media (max-width: 768px) {
    .lecture-card{
        margin: 0;
        width: 100%;
        max-width: 100%;
        max-width: -moz-available;          /* WebKit-based browsers will ignore this. */
        max-width: -webkit-fill-available;  /* Mozilla-based browsers will ignore this. */
        max-width: stretch;
     }
     .lecture-img-container {
        display: none;
     }
    #tileContainer .lecture-container {
        padding: 0;
        background-color: inherit;
    }
    #about .lecture-container {
        padding: 5px;
    }
    .slick-dotted.slick-slider, .bannerSlider .slide__image img {
        height: auto;
    }
    .course-description {
        margin: 5px;
    }
}

@media (min-width: 769px) and (max-width: 1023px) {
    .index .page-body,
    .page-header,
    .page-footer {
        width: 100%;
    }
    .lecture-card {
        flex: 1 1 calc(50% - 20px); 
        max-width: calc(50% - 20px);
    }
    .slick-dotted.slick-slider, .bannerSlider .slide__image img {
        height: auto;
    }
}
