/* =========================================================
   NAVIGATION.CSS
   - Header
   - Menu system
   - Footer
   ========================================================= */

/* Header */
#page_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1vh 2vw;
    background-color: #EDF9F5;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 15px;
}

/* Logo */
#logo_image {
    height: 4vh;
}


/* ========================================================= */
/* BASE NAV CONTAINER                                        */
/* ========================================================= */

.nav-container {
  background-color: #EDF9F5;
  padding: 1rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
}


/* ========================================================= */
/* TOP LEVEL MENU                                            */
/* ========================================================= */

.nav-menu {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}

.nav-menu > li {
  position: relative;
  min-width: 0;
}

.nav-menu > li > a {
  text-decoration: none;
  color: #000;
  font-size: 1.05rem;
  padding: 0.75rem 1rem;
  display: block;
  transition: color 0.2s ease;
}

.nav-menu > li > a:hover {
  color: #00d4ff;
}

/* ========================================================= */
/* MEGA MENU (DESKTOP)                                       */
/* ========================================================= */

.mega-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;

  background-color: #EDF9F5;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-radius: 6px;

  padding: 1rem;
  z-index: 1000;

  flex-direction: row;
  min-width: 260px;
  max-width: calc(100vw - 2rem);
}

/* Only enable hover on hover-capable devices */
@media (hover: hover) {
  .nav-menu > li:hover > .mega-menu {
    display: flex;
  }
}

/* Flip near right edge */
.nav-menu > li:last-child > .mega-menu,
.nav-menu > li:nth-last-child(2) > .mega-menu {
  left: auto;
  right: 0;
}

/* ========================================================= */
/* LEFT PANEL                                                */
/* ========================================================= */

.mega-menu .left-panel {
  flex: 1;
  padding-right: 1rem;
  border-right: 1px solid rgba(0, 0, 0, 0.05);
}

.mega-menu .left-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mega-menu .left-panel li {
  position: relative;
}

.mega-menu .left-panel li a {
  text-decoration: none;
  color: #000;
  font-size: 0.95rem;
  padding: 0.6rem 0.8rem;
  display: block;
  transition: background 0.2s ease;
}

.mega-menu .left-panel li a:hover {
  background: rgba(0, 0, 0, 0.04);
}

/* ========================================================= */
/* RIGHT PANEL (FLYOUT)                                      */
/* ========================================================= */

.mega-menu .right-panel {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;

  width: 220px;
  padding: 0.8rem;

  background-color: #EDF9F5;
  box-shadow: 4px 4px 14px rgba(0, 0, 0, 0.12);
}

/* Hover flyout */
@media (hover: hover) {
  .mega-menu .left-panel li:hover > .right-panel {
    display: block;
  }
}

/* Flip flyout near right edge */
.nav-menu > li:last-child .right-panel,
.nav-menu > li:nth-last-child(2) .right-panel {
  left: auto;
  right: 100%;
}

.mega-menu .right-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mega-menu .right-panel ul li a {
  text-decoration: none;
  color: #555;
  font-size: 0.9rem;
  padding: 0.4rem 0;
  display: block;
  transition: color 0.2s ease;
}

.mega-menu .right-panel ul li a:hover {
  color: rgb(69, 34, 98);
}

/* ========================================================= */
/* TABLET CONSTRAINT                                         */
/* ========================================================= */

@media (max-width: 1200px) {

  .mega-menu {
    max-width: 90vw;
  }

  .mega-menu .right-panel {
    width: 180px;
  }

}

/* ========================================================= */
/* MOBILE NAV TOGGLE                                         */
/* ========================================================= */

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: #000;
  display: block;
}

@media (max-width: 900px) {
  
  #page_header {
    position: relative;
  }

  .nav-container{
    position: static;
    box-sizing: border-box;
    width: 100%;
  }

  #nav-container{
    width: 100%;
  }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .nav-menu {   
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;

    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;

    background: #EDF9F5;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }
    

  .nav-menu > li{
    width: 100%
  }

  .nav-menu > li > a{
    width: 100%;
    box-sizing: border-box;
  }

  .nav-menu.active {
    max-height: 85vh;
    overflow-y: auto;
    padding-bottom: 5px;  
  }

  /* Disable hover behavior */
  .nav-menu > li:hover > .mega-menu {
    display: none;
  }

  /* Convert mega to stacked layout */
  .mega-menu {
    position: relative;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    box-shadow: none;
    padding: 0.5rem 0;
    max-width: 100%;
  }


  .nav-menu > li.open > .mega-menu {
    display: flex;
  }

  .mega-menu .left-panel {
    border-right: none;
    padding: 0;
  }

  /* Disable flyout positioning */
  .mega-menu .right-panel {
    position: relative;
    left: auto;
    right: auto;
    width: 100%;
    box-shadow: none;
    padding-left: 1rem;
    display: none;
  }

  .mega-menu .left-panel li.open > .right-panel {
    display: block;
  }

  .demo-button{
    text-align: center;  
    width: 100%;
    box-sizing: border-box;
  }

}

/* ========================================================= */
/* LARGE DESKTOP ENHANCEMENT                                 */
/* ========================================================= */

@media (min-width: 1440px) {

  .mega-menu {
    padding: 1.25rem;
  }

  .mega-menu .right-panel {
    width: 260px;
  }

}

/* Footer Section__________________ */

.footer {
    background-color: rgb(0, 0, 0);
    color: #aca8a8;
    padding: 20px 10px;
  }
  
.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 5vh;
}

.footer-column {
    flex: 1;
    min-width: 250px;
    margin: 10px;
}

.footer-logo {
    max-width: 250px;
    /*margin-bottom: 10px;*/
}

.footer-column h4 {
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: #fcfbfb;
    text-align: left;
}

.footer-column p, 
.footer-column ul, 
.footer-column li {
    margin: 5px 0;
    font-size: 0.9rem;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li a {
    text-decoration: none;
    color: #aaa;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: #f4a261;
}

#page_footer {
    background-color: #f8f8f8;
    padding: 10px;
    text-align: center;
    font-size: 0.9rem;
    color: #555;
    
}


.footer-social p {
  margin-bottom: 10px;
  font-size: 14px;
}

.social-links {
  display: flex;
  gap: 14px;
}

.social-links a {
  display: inline-flex;
}

.social-links img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.social-links a:hover {
  opacity: 0.7;
}


@media (max-width: 768px) {
    .footer-container {
        display:grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        align-items: start;
        justify-content: center;
    }
    
    .footer-column {
        /*text-align: left;*/
        margin: 10px 0;
        min-width: auto;
    }

    .footer-logo {
        width: 200px;
        height: auto;
    }
}


/*Styling for smaller screens*/
@media (max-width: 690px) {

    .footer-container {
        display: flex;
        flex-direction: column ;
        justify-content: space-between;
        max-width: 1200px;
        margin: 3vw;
        gap: 0.5vh;
    }

    .footer-logo {
        max-width: 180px;
    }

    .footer-column {
        margin: 1vh;
    }

}


