/* ==========================================================================
   HEADER / NAVIGATION BAR
   ========================================================================== */
.header {
  height: 80px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent);
  border-bottom: none;
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

/* Left: hamburger + logo + search bar */
.left-section {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: 52px;
  flex-shrink: 0;
}

/* Right: nav buttons */
.right-section {
  display: flex;
  align-items: center;
  margin-right: 15px;
  flex-shrink: 0;
}

.search-section {
  display: flex;
  align-items: center;
  position: relative;
}

/* ==========================================================================
   HAMBURGER BUTTON
   ========================================================================== */
.hamburger-menu-button {
  height: 18px;
  width: 24px;
  background-color: transparent;
  border: none;
  cursor: pointer;
  position: fixed;
  top: 31px;
  left: 15px;
  z-index: 1001;
  transition: transform 0.2s ease, opacity 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
}

.hamburger-menu-button span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: white;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
  transform-origin: center;
}

.hamburger-menu-button.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
  background-color: black;
}

.hamburger-menu-button.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu-button.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
  background-color: black;
}

.hamburger-menu-button:hover {
  opacity: 0.5;
}

.hamburger-menu-button:active {
  opacity: 0.5;
  transform: translateY(0);
}


/* ==========================================================================
   OFF-SCREEN MENU
   ========================================================================== */
.off-screen-menu {
  position: fixed;
  top: 0;
  left: -240px;
  width: 240px;
  height: 100vh;
  transition: left 0.3s ease;
  z-index: 1000;
  padding-top: 70px;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
  box-sizing: border-box;
  background-color: white;
  overflow-y: auto;
}

.off-screen-menu.active {
  left: 0;
}

.off-screen-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.off-screen-menu li {
  margin: 20px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.menu-title {
  font-family: Roboto, Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: black;
  padding: 0 20px 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid black;
}

.off-screen-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Roboto, Arial, sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: black;
  text-decoration: none;
  padding: 10px 10px 10px 20px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.off-screen-menu a:hover {
  opacity: 0.6;
  transform: translateX(4px);
  text-decoration: underline;
}

.off-screen-menu img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
  position: relative;
  top: 1px;
}

.off-screen-menu .sign-up-icon,
.off-screen-menu .home-icon,
.off-screen-menu .events-icon,
.off-screen-menu .contact-icon {
  width: 20px;
  height: 20px;
  filter: none;
}

.rmu-logo { width: 24px; }
.catechism-logo { width: 14px; }
.ascension-logo { width: 20px; height: 20px; }

.colonial-catholics-image {
  height: 70px;
  width: auto;
  border: none;
  border-radius: 0;
  margin-left: 12px;
}

.off-screen-menu .pages-title,
.off-screen-menu .page-link {
  display: none;
}

/* ==========================================================================
   NAV BUTTONS (Home, Events, Contact, Sign Up)
   ========================================================================== */
.nav-buttons {
  display: flex;
  align-items: center;
  gap: 32px;
}

.home-button,
.events-button,
.contact-button {
  height: 36px;
  width: auto;
  padding: 0;
  background-color: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 4px;
  position: relative;
}

.sign-up-button {
  height: 42px;
  width: auto;
  padding: 0 18px;
  background-color: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 20px;
  position: relative;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.sign-up-button:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: white;
}

.sign-up-button:active {
  background-color: rgba(255, 255, 255, 0.25);
}

.nav-buttons .home-button,
.nav-buttons .events-button,
.nav-buttons .contact-button {
  border-right: none;
  padding-right: 0;
}

.nav-buttons .home-button::after,
.nav-buttons .events-button::after,
.nav-buttons .contact-button::after {
  content: '';
  position: absolute;
  right: -16px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 18px;
  background: white;
}

.home-icon,
.events-icon,
.contact-icon {
  height: 22px;
  filter: invert(1) opacity(0.8);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.sign-up-icon {
  height: 22px;
  width: 22px;
  filter: invert(1) opacity(0.8);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.home,
.events,
.contact {
  font-family: Roboto, Arial, sans-serif;
  font-size: 18px;
  letter-spacing: 0.06em;
  color: white;
  text-transform: uppercase;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.sign-up {
  font-family: Roboto, Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: white;
  text-transform: uppercase;
  transition: opacity 0.2s ease;
}

.home-button:hover .home-icon,
.home-button:hover .home,
.events-button:hover .events-icon,
.events-button:hover .events,
.contact-button:hover .contact-icon,
.contact-button:hover .contact {
  opacity: 0.5;
}

.home-button:active .home-icon,
.home-button:active .home,
.events-button:active .events-icon,
.events-button:active .events,
.contact-button:active .contact-icon,
.contact-button:active .contact {
  opacity: 0.5;
}

.sign-up-button:hover .sign-up-icon {
  opacity: 0.5;
  transform: translateX(4px);
}

.sign-up-button:hover .sign-up {
  opacity: 0.5;
}

.sign-up-button:active .sign-up-icon {
  opacity: 0.5;
  transform: translateX(0);
}

.sign-up-button:active .sign-up {
  opacity: 0.5;
}

.home a,
.events a,
.contact a {
  color: white;
  text-decoration: none;
}

.sign-up a {
  color: white;
  text-decoration: none;
}

.home a:visited,
.events a:visited,
.contact a:visited {
  color: white;
}

.sign-up a:visited {
  color: white;
}

/* ==========================================================================
   SEARCH BAR
   ========================================================================== */
.search-bar {
  box-sizing: border-box;
  height: 40px;
  width: 300px;
  padding-left: 16px;
  font-size: 11px;
  font-family: Roboto, Arial, sans-serif;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-right: none;
  border-radius: 20px 0 0 20px;
  background-color: rgba(255, 255, 255, 0.95);
  color: #111;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  transition: background-color 0.2s ease,
              border-color 0.2s ease,
              box-shadow 0.2s ease;
}

.search-bar:focus {
  outline: none;
  background-color: #fff;
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

.search-bar::placeholder {
  font-family: Roboto, Arial, sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.4);
}

.search-button {
  box-sizing: border-box;
  height: 40px;
  width: 58px;
  flex-shrink: 0;
  background-color: rgba(210, 210, 210, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-left: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 0 20px 20px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.search-button:hover {
  background-color: rgba(190, 190, 190, 0.95);
}

.search-icon {
  height: 16px;
  width: 16px;
  filter: invert(0) opacity(0.5);
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: auto;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 14px;
  width: 352px;
  max-height: 260px;
  overflow-y: auto;
  z-index: 2000;
  font-family: Roboto, Arial, sans-serif;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.search-dropdown div {
  padding: 10px 14px;
  font-size: 11px;
  cursor: pointer;
  color: rgba(0, 0, 0, 0.7);
  transition: background-color 0.15s ease, color 0.15s ease;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.search-dropdown div:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: #000;
}

.search-dropdown::-webkit-scrollbar { width: 6px; }
.search-dropdown::-webkit-scrollbar-thumb { background-color: rgba(0, 0, 0, 0.15); border-radius: 3px; }
.search-dropdown::-webkit-scrollbar-thumb:hover { background-color: rgba(0, 0, 0, 0.3); }

/* ==========================================================================
   RESPONSIVE — search bar only
   ========================================================================== */
@media screen and (max-width: 1100px) {
  .search-bar {
    width: 260px;
  }
  .search-dropdown {
    width: 312px;
  }
}

@media screen and (max-width: 900px) {
  .search-bar {
    width: 180px;
  }
  .search-dropdown {
    width: 232px;
  }
}

@media screen and (max-width: 750px) {
  .search-bar {
    width: 120px;
  }
  .search-dropdown {
    width: 172px;
  }
}
/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media screen and (max-width: 1024px) {
  .home, .events, .contact {
    font-size: 14px;
  }
  .nav-buttons {
    gap: 20px;
  }
  .colonial-catholics-image {
    height: 56px;
  }
}

@media screen and (max-width: 820px) {
  .home-button, .events-button, .contact-button, .sign-up-button {
    display: none;
  }
  .nav-buttons .home-button::after,
  .nav-buttons .events-button::after,
  .nav-buttons .contact-button::after {
    display: none;
  }
  .off-screen-menu .pages-title,
  .off-screen-menu .page-link {
    display: flex;
  }
  .colonial-catholics-image {
    height: 48px;
  }
  .header {
    gap: 12px;
  }
  .left-section {
    flex: 1;
    min-width: 0;
  }
  .search-section {
    flex: 1;
    min-width: 0;
  }
  .search-bar {
    flex: 1;
    width: 0;
    min-width: 0;
  }
  .search-dropdown {
    width: 100%;
    left: 0;
    right: 0;
  }
  .right-section {
    display: none;
  }
}

@media screen and (max-width: 520px) {
  .left-section {
    margin-left: 44px;
    gap: 10px;
  }
  .search-bar {
    font-size: 10px;
  }
  .colonial-catholics-image {
    height: 38px;
  }
}

@media screen and (max-width: 400px) {
  .header {
    height: 64px;
  }
  .hamburger-menu-button {
    top: 23px;
    left: 12px;
  }
  .left-section {
    margin-left: 38px;
    gap: 8px;
  }
  .colonial-catholics-image {
    height: 32px;
  }
  .search-bar {
    font-size: 9px;
    height: 34px;
  }
  .search-button {
    height: 34px;
    width: 46px;
  }
}

/* Shrink hamburger menu when nav buttons move into it */
@media screen and (max-width: 820px) {
  .off-screen-menu {
    padding-top: 52px;
  }
  .off-screen-menu li {
    margin: 10px 14px;
  }
  .menu-title {
    font-size: 11px;
    padding: 0 14px 8px;
    margin-bottom: 6px;
    letter-spacing: 0.05em;
  }
  .off-screen-menu a {
    font-size: 9px;
    padding: 6px 8px 6px 14px;
    letter-spacing: 0.05em;
    gap: 7px;
  }
  .off-screen-menu img {
    width: 15px;
    height: 15px;
  }
  .off-screen-menu .sign-up-icon,
  .off-screen-menu .home-icon,
  .off-screen-menu .events-icon,
  .off-screen-menu .contact-icon {
    width: 15px;
    height: 15px;
  }
  .rmu-logo { width: 18px; }
  .catechism-logo { width: 10px; }
}
