/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/

/* ---------------------------
   Custom Navbar Styling
---------------------------- */

/* === Body background === */
body {
  background-color: #eaf4fb;
  font-family: 'Inter', sans-serif;
  margin: 0;
}

/* === Navbar styling === */
.navbar {
  background: #fff;
  padding: 10px 20px;
  position: relative;
  z-index: 10000;
  display: flex;
  align-items: center;
  border-bottom: 2px solid #1d72b8;
  justify-content: space-between;
}

.navbar-left {
  display: flex;
  align-items: center;
}

.site-title {
  font-size: 22px;
  font-weight: bold;
  text-decoration: none;
}
.site-title .calcify {
  color: #1d72b8;
}
.site-title .labs {
  color: #000;
}

.navbar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
}
.navbar li {
  position: relative;
}
.navbar > ul > li {
  margin-right: 20px;
}
.navbar a {
  color: #000;
  text-decoration: none;
  padding: 14px 15px;
  font-weight: 500;
  display: block;
}

/* === Mega menu desktop with category colors === */
.mega-menu {
  position: absolute;
  left: 0;
  top: 100%;
  width: 900px;
  padding: 20px;
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  border-radius: 12px;
  z-index: 1000;
}
.navbar li:hover .mega-menu {
  display: grid;
}

/* Finance menu */
.navbar li:nth-child(1) .mega-menu {
  background: #e6f2ff; /* light finance blue */
}
/* Health menu */
.navbar li:nth-child(2) .mega-menu {
  background: #eafbea; /* light health green */
}
/* Cost menu */
.navbar li:nth-child(3) .mega-menu {
  background: #fff7e6; /* light cost yellow */
}

.menu-section {
  background: #fff;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}
.menu-title {
  font-weight: bold;
  margin-bottom: 10px;
  font-size: 14px;
  color: #555;
  text-transform: uppercase;
}
.menu-item {
  display: flex;
  align-items: center;
  margin: 8px 0;
  color: #333;
  font-size: 14px;
}
.menu-item i {
  margin-right: 8px;
  font-size: 14px;
  color: #1d72b8;
}
.menu-item:hover {
  color: #1d72b8;
}

/* === Mobile hamburger & close === */
.hamburger,
.close-menu {
  font-size: 26px;
  color: #1d72b8;
  cursor: pointer;
  background: none;
  border: none;
  display: none; /* hidden on desktop */
}

/* === Mobile menu overlay === */
@media (max-width: 768px) {
  .navbar {
    justify-content: space-between;
  }

  .navbar-left {
    flex: 1;
  }

  .hamburger {
    display: block;
  }
  .close-menu {
    display: none;
    margin-left: auto;
  }

  .navbar ul {
    display: none;
    flex-direction: column;
    background: #fff;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 15px 20px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 9999;
    max-height: 80vh;
    overflow-y: auto;
  }

  .navbar ul.show {
    display: flex;
  }

  .navbar > ul > li > a {
    padding: 16px 12px;
    font-size: 16px;
    border-bottom: 1px solid #e0e0e0;
  }

  /* Mobile category backgrounds */
  .navbar li:nth-child(1).open .mega-menu {
    background: #e6f2ff;
  }
  .navbar li:nth-child(2).open .mega-menu {
    background: #eafbea;
  }
  .navbar li:nth-child(3).open .mega-menu {
    background: #fff7e6;
  }

  .mega-menu {
    position: static;
    width: 100%;
    display: none;
    grid-template-columns: 1fr;
    box-shadow: none;
    padding: 10px 0;
  }

  .navbar li.open .mega-menu {
    display: block;
  }

  .menu-section {
    margin-bottom: 15px;
  }
}
