* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, sans-serif;
  min-height: 200vh;
  background: url("../images/background.jpg") no-repeat center center fixed;
  background-size: cover;
  color: #374151;
}

/* ===== NAVBAR (larger + gray) ===== */
.navbar {
  position: fixed;
  top: 16px;
  left: 3.5%;
  right: 3.5%;
  height: 84px;
  /* NEW: taller bar */
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 20px;
  z-index: 9999;
  backdrop-filter: blur(6px);
  background: linear-gradient(135deg, #fff, rgba(255, 255, 255, .96));
  border: 2px solid rgba(255, 200, 220, .9);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(237, 168, 186, .35);
}

/* Ensure images never exceed the bar height */
.navbar img {
  height: 100%;
  /* fill the bar’s height */
  max-height: 100%;
  width: auto;
  /* keep aspect ratio */
  display: block;
  /* remove inline-gap baseline issues */
}

/* Order: left (second), middle (menu/hamburger), right (first) */
.navbar img.secondary-img {
  order: 1;
}

.navbar .hamburger,
.navbar .menu {
  order: 2;
  flex: 1 1 auto;
  direction: rtl;
  /* align Arabic text properly */
}

/* let center grow */
.navbar img.primary-img {
  order: 3;
  margin-left: auto;
}

/* Optional: control individual image sizes within the same bar height */
.navbar img.secondary-img {
  object-fit: contain;
}

.navbar img.primary-img {
  object-fit: contain;
}

.menu {
  display: flex;
  align-items: center;
  list-style: none;
  margin-left: 10px;
  gap: 22px;
}

.menu-item {
  position: relative;
}

.menu-button {
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 18px;
  padding: 10px 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  /* NEW: gray text */
}

.label {
  transition: transform .25s ease, color .25s ease;
}

.underline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  background: #9ca3af;
  /* NEW: gray underline */
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .25s ease, opacity .25s ease;
}

.dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 190px;
  background: #fff;
  border-radius: 10px;
  padding: 8px 0;
  display: none;
  flex-direction: column;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .08);
}

.dropdown a {
  padding: 10px 16px;
  text-decoration: none;
  color: #374151;
  font-size: 15px;
}

.dropdown a:hover {
  background: rgba(0, 0, 0, .04);
}

.menu-item:hover .dropdown {
  display: flex;
}

.menu-item:hover .underline {
  opacity: 1;
  transform: scaleX(1);
}

.menu-item:hover .label {
  color: #ef5da8;
  animation: label-bounce 420ms cubic-bezier(.22, .9, .28, 1);
}

@keyframes label-bounce {
  0% {
    transform: translateY(0)
  }

  30% {
    transform: translateY(-10px)
  }

  60% {
    transform: translateY(6px)
  }

  100% {
    transform: translateY(0)
  }
}

.hamburger {
  display: none;
  font-size: 28px;
  background: none;
  border: none;
  color: #374151;
  margin-left: auto;
  /* keep for desktop */
  cursor: pointer;
}

.navbar .hamburger {
  order: 4;
}

/* hamburger last (desktop hidden) */

@media (max-width: 820px) {
  .hamburger {
    display: block;
    order: 2;
    /* second item on small screens */
    margin-left: auto;
    /* push it to right */
  }

  .menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 84px;
    right: 0;
    /* open from right side */
    width: 100%;
    background: rgba(255, 253, 254, .96);
    padding: 10px 0;
    text-align: right;
  }

  .menu.active {
    display: flex;
  }

  .menu-item {
    width: 100%;
    text-align: center;
  }
}

main {
  padding-top: 100px;
}

.menu a {
  text-decoration: none;   /* removes the underline */
  color: inherit;          /* keeps the same text color */
}

/* ===== PAGE TITLE ===== */
.page-title {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 70px;
  /* smaller height than hero */
  margin: 2px 3.5%;
  border-radius: 15px;
  background: linear-gradient(120deg, rgba(246, 248, 255, 1), rgba(255, 255, 255, 1));
  text-align: center;
  padding: 5px;
}

.page-title h1 {
  font-size: clamp(26px, 3.5vw, 38px);
  color: #2c699e;
  line-height: 1.4;
}

/* ===== FOOTER ===== */
.footer {
  margin: 3px 3.5% 3px 3.5%;
  padding: 20px;
  text-align: center;
  font-size: 14px;
  color: #6b7280;
  background: linear-gradient(120deg, rgba(246, 248, 255, 1), rgba(255, 255, 255, 1));
  border-top: 2px solid rgba(255, 200, 220, .5);
  border-radius: 14px 14px 0 0;
}