/* Base Styles */
body {
  background-color: #f5f5f5;
  color: #000;
  font-family: "Inter", sans-serif;
  overflow-x: hidden;
}

/* Background Pattern */
.himti-structure,
.department-page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.background-pattern {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.1;
}

.pattern-right {
  position: absolute;
  right: 0;
  top: 25%;
  width: 50%;
  height: 50%;
  transition: transform 0.3s ease-out;
}

.pattern-right img {
  opacity: 0.3;
  max-width: 100%;
}

/* Navigation */
.custom-navbar {
  background-color: white;
  border-radius: 50px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin: 1rem auto;
  padding: 0.5rem 1.5rem;
  max-width: 1140px;
  z-index: 10;
  position: relative;
  transition: all 0.3s ease;
}

.custom-navbar.scrolled {
  padding: 0.3rem 1.5rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.logo-circle {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background-color: #133d87;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.5rem;
  transition: transform 0.3s ease;
}

.navbar-brand:hover .logo-circle {
  transform: rotate(45deg);
}

.logo-circle span {
  color: white;
  font-size: 0.75rem;
}

.logo-text {
  color: #133d87;
  font-weight: 600;
  font-size: 0.875rem;
}

.navbar-nav .nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  position: relative;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: #133d87;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
  width: 70%;
}

.navbar-toggler {
  border: none;
  padding: 0;
  width: 30px;
  height: 30px;
  position: relative;
  transition: all 0.3s ease-in-out;
  background-color: transparent;
}

.navbar-toggler:focus {
  box-shadow: none;
}

.navbar-toggler span {
  width: 30px;
  height: 2px;
  background-color: #133d87;
  display: block;
  margin: 6px 0;
  transition: all 0.3s ease-in-out;
}

.navbar-toggler.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.navbar-toggler.active span:nth-child(2) {
  opacity: 0;
}

.navbar-toggler.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Main Content */
.main-content {
  position: relative;
  z-index: 1;
  padding-top: 2rem;
  padding-bottom: 4rem;
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.active {
  opacity: 1;
  transform: translateY(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.scale-in.active {
  opacity: 1;
  transform: scale(1);
}

/* Card hover effects */
.card-hover {
  transform: translateY(-10px) !important;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2) !important;
}

/* Back to top button */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 40px;
  height: 40px;
  background-color: #133d87;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 99;
}

#back-to-top.show {
  opacity: 1;
  visibility: visible;
}

#back-to-top:hover {
  background-color: #608bc0;
  transform: translateY(-5px);
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 90vh;
  border: 5px solid white;
  border-radius: 5px;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 30px;
  cursor: pointer;
}

/* Footer */
.footer {
  background-color: #133d87;
  color: white;
  padding: 3rem 0 1rem;
  position: relative;
  z-index: 1;
}

.footer-logo .logo-circle {
  background-color: white;
  transition: transform 0.3s ease;
}

.footer-logo:hover .logo-circle {
  transform: rotate(45deg);
}

.footer-logo .logo-circle span {
  color: #133d87;
}

.footer-logo .logo-text {
  color: white;
}

.footer-heading {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-heading:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 2px;
  background-color: #608bc0;
  transition: width 0.3s ease;
}

.footer-heading:hover:after {
  width: 100px;
}

.footer-contact {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-contact li {
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  transition: transform 0.3s ease;
}

.footer-contact li:hover {
  transform: translateX(5px);
}

.footer-contact .icon {
  margin-right: 0.5rem;
  font-style: normal;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.social-link {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 2rem;
  transition: all 0.3s ease;
}

.social-link:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  transform: translateY(-3px);
}

.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Responsive Adjustments for Common Elements */
@media (max-width: 767.98px) {
  .custom-navbar {
    border-radius: 25px;
    padding: 0.5rem 1rem;
  }

  .footer {
    padding: 2rem 0 1rem;
  }

  .social-links {
    flex-direction: column;
    gap: 0.5rem;
  }

  #back-to-top {
    bottom: 20px;
    right: 20px;
  }
}
