/* Base Layout */
html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  scroll-behavior: smooth;
  overflow-x: hidden;
}


/* Main Content */
main {
  flex: 1;
  padding-top: 70px;
}

/* Hero Section */
.hero {
  position: relative;
  background: url('../img/lib.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: white;
  z-index: 1;
  display: flex;
  align-items: flex-start; /* Start at top */
  justify-content: center;
  text-align: center;
  padding-left: 2rem;
  padding-right: 2rem;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(2, 2, 2, 0.747);
  z-index: -1;
}
/* NDDU Green Gradient Background */
.bg-nddu-green {
  background: linear-gradient(90deg, #042914, #084421, #054220) !important;
}
/* Navbar Styles */
.navbar {
  z-index: 1030 !important;
}

.navbar .nav-link,
.navbar .dropdown-toggle {
  color: white !important;
}

.navbar .dropdown-menu {
  background-color: #042914;
  color: #084421;
  border: none;
}

.navbar .dropdown-item {
  color: white;
}

.navbar .dropdown-menu .dropdown-item:hover,
.navbar .dropdown-menu .dropdown-item:focus {
  background-color: #084421 !important;
  color: #fff;
}

/* Smooth hover transition */
.nav-link, .dropdown-item {
  transition: color 0.3s ease, background-color 0.3s ease;
}

/* Padding for containers */
.navbar .container, 
.navbar .container-fluid {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Desktop hover dropdown behavior 
@media (min-width: 992px) {
  .navbar .dropdown:hover > .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
  }

 
  .navbar .dropdown-menu {
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .navbar .dropdown.position-static .dropdown-menu {
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    width: 100% !important;
    min-width: unset;
  }
}
*/

/* Database Button */
.dbButton {
  background-color: white;
  color: black;
  transition: all 0.3s ease;
}

.dbButton:hover {
  background-color: #ffc107;
  color: black;
}

/* Responsive Navbar */
@media (min-width: 992px) {
  .navbar .container-fluid {
    justify-content: space-between !important;
  }
}

@media (max-width: 991.98px) {
  .navbar-nav {
    justify-content: flex-start;
  }

  .hero {
    padding: 1rem;
    font-size: 90%;
  }

  .library-access-section .btn-light {
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
  }
}

/* Scrollable Cards */
.scrolling-wrapper {
  display: flex;
  overflow-x: auto;
  gap: 1rem;
  padding: 1rem 0;
  scrollbar-width: none; /* Firefox */
  -webkit-overflow-scrolling: touch;
}

.scrolling-wrapper::-webkit-scrollbar {
  display: none;
}

.scrolling-wrapper .card {
  flex: 0 0 auto;
  width: 250px;
  transition: transform 0.3s;
}

.scrolling-wrapper .card:hover {
  transform: scale(1.05);
}

/* Carousel Scroll Animation */
.carousel-wrapper {
  overflow: hidden;
  position: relative;
}

.carousel-scroll {
  display: flex;
  width: max-content;
  animation: scroll-left 30s linear infinite;
  gap: 1rem;
  padding: 1rem 0;
}

.carousel-scroll .card {
  flex: 0 0 auto;
  width: 250px;
  transition: transform 0.3s ease;
}

.carousel-scroll .card:hover {
  transform: scale(1.05);
}

@keyframes scroll-left {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Sticky Navbar Shadow */
.sticky-top {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* OPAC & MyLOFT Section */
.library-access-section {
  text-align: center;
  padding: 2rem 1rem;
}

.library-access-section .btn-light {
  border-radius: 20px;
  padding: 10px 30px;
  background-color: #fff;
  color: #084421;
  transition: all 0.3s ease-in-out;
  display: inline-block;
}

.library-access-section .btn-light:hover {
  background-color: #ffc107;
  color: #084421;
}

.library-access-section a.text-success:hover {
  text-decoration: underline;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: none;
  z-index: 9999;
}

/* Responsive Font Sizes */
@media (max-width: 768px) {
  .hero {
    font-size: 85%;
  }

  .scrolling-wrapper .card,
  .carousel-scroll .card {
    width: 200px;
  }
}

@media (max-width: 576px) {
  .hero {
    font-size: 80%;
    padding: 1rem;
  }

  .library-access-section {
    padding: 1rem;
  }
}



