/* NAVBAR BASE */
header.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 9999;
  background-color: #FFFFFF;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
  padding: 50px 0;
}

/* SCROLLED STATE */
header.navbar.scrolled {
  background-color: #f2f2f2; /* light grey */
  padding: 20px 0; /* condensed height */
  box-shadow: none; /* remove shadow */
  transition: background-color 0.3s ease, padding 0.3s ease;
}

/* NAV INNER CONTAINER */
.nav-container {
  max-width: 1300px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 60px;
}

/* LOGO LEFT */
.navbar .logo {
  display: flex;
  align-items: center;
}

.navbar .logo img {
  height: 55px;
}

/* LINKS RIGHT */
.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
  align-items: center;
}

.nav-links .nav-link {
  text-decoration: none;
  color: #333;
  font-weight: 600;
  padding-bottom: 6px;
  position: relative;
  transition: color 0.2s ease;
  background: none !important; /* REMOVE BLUE BOX */
}
.nav-links .nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 3px;
  background-color: #5a9fb7;
  transition: width 0.25s ease;
}

.nav-links .nav-link:hover::after {
  width: 100%;
}
.nav-links .nav-link.active {
  color: #5a9fb7;
}
.nav-links .nav-link.active::after {
  width: 100%;
}
.nav-links .nav-btn {
  background-color: #5a9fb7 !important;
  color: white !important;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
.nav-links .nav-btn::after {
  display: none !important;
}
/* LINK STYLE */
.nav-link {
  text-decoration: none;
  color: #333;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: #5a9fb7;
}

/* BUTTON STYLE */
.nav-btn {
  padding: 10px 18px;
  border-radius: 12px;
  color: white !important;
  font-weight: 600;
  text-decoration: none;
}

/* MOBILE MENU */
.menu-toggle {
  display: none;
  font-size: 24px;
  cursor: pointer;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    right: 30px;
    background: #E6E3E3;
    flex-direction: column;
    padding: 20px;
    border-radius: 14px;
    width: 240px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  }

  .nav-links.active {
    display: flex;
  }
}

/* Container holding the image and the text */
/* Container holding the image */
.container {
  position: relative;
  width: calc(100% - 60px);
  margin: 0 auto 40px auto;
  border-radius: 30px;
  overflow: hidden;
}

/* Image fills container */
.container img {
  width: 100%;
  height: 600px; /* increased height */
  object-fit: cover;
  display: block;
}

/* Centered text — moved UP */
.centered {
  position: absolute;
  top: calc(50% - 160px); /* stays lifted */
  left: 50%;
  transform: translate(-50%, -50%);
  
  color: black;
  font-size: 80px;
  font-weight: 600;
  font-family: 'Lexend Exa', sans-serif;
  color: #5aa0b8;

  text-align: center;
  white-space: nowrap;
}

/* Events Intro Section */
.events-intro {
  max-width: 1200px;
  margin: 60px auto; /* space from hero and events */
  padding: 0 20px;
  text-align: center;
}

.events-intro-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

.events-intro-title {
  font-size: 36px;
  font-weight: 400;
  font-family: 'Lexend Deca', sans-serif;
  color: #000000;
  margin-bottom: -20px;
}

.events-intro-subtitle {
  font-size: 18px;
  font-weight: 400;
  font-family: 'Lexend Deca', sans-serif;
  color: #333;
  margin: 0;
}


/* EVENTS GRID */
.events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 per row */
  gap: 50px; /* more space between items */
  max-width: 1200px;
  margin: 50px auto;
  padding: 0 20px;
}

/* Event items */
.event-item {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: black;
  align-items: center;
  max-width: 100%;
  min-height: 420px;      /* keeps the items roughly the same height per row */
}

/* Images */
.event-item img {
  width: 100%;
  max-width: 350px; /* slightly bigger */
  height: auto;
  border-radius: 16px;
  object-fit: contain; /* fully visible, no cropping */
  transition: transform 0.3s ease;
}

/* Hover effect: only image pops */
.event-item img:hover {
  transform: scale(1.05);
}

/* Text inside image width */
.event-item-header,
.event-item p {
  width: 100%;
  max-width: 350px;       /* match image width */
  text-align: left;
  margin-top: 10px;
}

/* Housing support: left-aligned on new row */
.event-item.housing {
  grid-column: 1 / 2; /* first column only */
  justify-self: start;
  max-width: 400px; /* slightly bigger than others */
}

/* Header styling */
.event-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.event-item-header h3 {
  font-size: 15px;
  margin: 0;
  font-weight: 600;
  color: #5aa0b8;
  font-family: "Khula", sans-serif;
}

.event-item-header span {
  font-size: 16px;
  color: #666;
}

.event-item p {
  font-size: 16px;
  font-family: "Khula", sans-serif;
  color: #333;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 1200px) {
  .events-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 per row */
  }
}

@media (max-width: 900px) {
  .events-grid {
    grid-template-columns: 1fr; /* single column */
  }

  .event-item img,
  .event-item-header,
  .event-item p {
    max-width: 90%;
  }

  .event-item.housing {
    max-width: 95%;
  }
}

.nav-links .nav-link:hover {
  color: inherit; /* keep the original color */
}
.nav-links .nav-btn:hover {
  background-color: #5a9fb7; /* same as normal */
  color: white; /* keep the same */
}
