:root {
    --nsti-blue: #201b51;
    --nsti-purple: #862b91;
    --nsti-turquoise: #04b7a4;
    --nsti-yellow: #f8de08;
    --nsti-pink:  #872b91da;
    --white: #ffffff;
  }


/* Apply Poppins font to header and footer text */
#header-fonts,
#header-fonts *:not(.fa):not(.fab):not(.fas):not(.far):not(.fal):not(.fad),
#footer-fonts,
#footer-fonts *:not(.fa):not(.fab):not(.fas):not(.far):not(.fal):not(.fad) {
    font-family: "Poppins", sans-serif !important;
    box-sizing: border-box;
}

/* Apply Font Awesome font to icons */
#header-fonts .fa,
#header-fonts .fa::before,
#header-fonts .fa::after,
#header-fonts .fab,
#header-fonts .fab::before,
#header-fonts .fab::after,
#footer-fonts .fa,
#footer-fonts .fa::before,
#footer-fonts .fa::after,
#footer-fonts .fab,
#footer-fonts .fab::before,
#footer-fonts .fab::after {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: normal;
}

/*To solve the dir=RTL issue*/
/* Ensure top-bar maintains LTR layout regardless of page direction */
.header .top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  direction: ltr; /* Force LTR inside the header */
}

.header .left {
  float: left;
}

.header .right {
  float: right;
  display: flex;
  gap: 1rem; /* Adjust the gap between buttons */
}

.burger-menu {
  margin-left: auto;
}

/* Header */
.header {
  position: relative;
  width: 100%;
}

/* Top Bar */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background-color: var(--nsti-blue); /* Background color */
  position: relative; /* Add position relative to allow z-index stacking */
  z-index: 1100;
}

/* MOE Logo */
.moe-logo {
  height: 60px;
}

/* Right Section: Language Switch and Contact Us */
.right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Style for the Home link */
.top-bar-button {
  color: var(--white);
  text-decoration: none;
  font-size: 1.5rem;
  margin-right: 1rem; /* Adjust spacing */
  transition: color 0.3s ease;
}

.top-bar-button:hover {
  color: var(--nsti-turquoise);
}


/* Burger Menu */
.burger-menu {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 24px;
  width: 35px;
}

.burger-menu span {
  background-color: var(--white);
  height: 3px;
  width: 100%;
  transition: all 0.3s ease;
}

/* Burger Menu Active State */
.burger-menu.active span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
  background-color: var(--nsti-turquoise);
}

.burger-menu.active span:nth-child(2) {
  opacity: 0;
}

.burger-menu.active span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
  background-color: var(--nsti-turquoise);
}

/* Menu Overlay */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 30%; /* Now the overlay takes 70% of the viewport height */
  background-color: rgba(32, 27, 81, 0.95); /* --nsti-blue with opacity */
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1000;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Menu Content */
.menu-content {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Menu Grid */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  row-gap: 3rem; /* Controls the vertical space between rows */
  column-gap: 2rem; /* Controls the horizontal space between columns */
  text-align: center;
  width: 100%;
}

.menu-grid a {
  color: var(--white);
  text-decoration: none;
  font-size: 1.7rem;
  font-weight: bold;
  transition: color 0.3s ease, transform 0.3s ease;
}

.menu-grid a:hover {
  color: var(--nsti-turquoise);
  transform: scale(1.2);
}

/* Social Icons */
.social-icons {
  display: flex;
  gap: 1.5rem;
  margin-top: 5rem;
}

.social-icons a {
  color: var(--white);
  font-size: 2rem;
  transition: transform 0.3s ease, color 0.3s ease;
}

.social-icons a:hover {
  transform: scale(1.2);
  color: var(--nsti-turquoise);
}


/* Footer Styles */
.footer {
  background: #201b51;
  color: white;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
}

.footer .footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  gap: 20rem;
}

.footer .footer-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 1rem;
  flex: 1;
}

.footer .footer-logo .nsti-logo {
  width: 300px;
  height: auto;
  object-fit: contain;
  margin-bottom: 1rem;
}

.footer .footer-logo .social-icons {
  display: flex;
  gap: 2rem;
}

.footer .footer-logo .social-icons a {
  color: white;
  font-size: 2rem;
  transition: transform 0.3s ease, color 0.3s ease;
}

.footer .footer-logo .social-icons a:hover {
  transform: scale(1.2);
  color: var(--nsti-turquoise);
}

.footer .footer-nav {
  padding-top: 2rem;
  display: flex;
  flex: 1;
  justify-content: flex-end;
  font-size: 1.5rem;
}

.footer .footer-nav ul {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  grid-gap: 1rem 2.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer .footer-nav ul li {
  margin-bottom: 0.5rem;
}

.footer .footer-nav ul li a {
  color: white;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.footer .footer-nav ul li a:hover {
  opacity: 0.8;
  color: var(--nsti-turquoise);
}

.footer .footer-bottom {
  padding: 1rem 0;
  text-align: center;
}

.footer .footer-bottom p {
  margin: 0;
  font-size: 1rem;
  color: #fff;
}

.footer .footer-bottom p a {
  color: #fff;
  text-decoration: none;
  margin: 0 0.5rem;
}

.footer .footer-bottom p a:hover {
  text-decoration: underline;
  color: var(--nsti-turquoise);
}

/* Responsive Styles for Header and Footer on Mobile Screens */
@media (max-width: 768px) {

  /* Header Styles for Mobile */
  .moe-logo {
    height: 40px; /* Make MOE logo smaller */
  }

  /* Adjust Text Size for "Home", "EYSC" */
  .top-bar-button {
    font-size: 1.2rem; /* Smaller text size */
    margin-right: 0.5rem; /* Less gap between items */
  }

  /* Burger Menu Grid Items Smaller */
  .menu-grid a {
    font-size: 1.2rem; /* Decrease font size */
  }

  /* Footer Styles for Mobile */
  .footer .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
  }

  .footer .footer-logo {
    align-items: center;
  }

  .footer .footer-logo .nsti-logo {
    margin-bottom: 1rem;
  }

  .footer .footer-nav {
    justify-content: center;
    margin-top: 1rem;
  }

  .footer .footer-nav ul {
    grid-template-columns: repeat(2, auto);
    grid-gap: 0.5rem 1rem;
  }
}

