/* ***********************************************************************
     Filename: header-footer.css
     Description: CSS file for header and footer of SACFinance website
     Last worked on by: Sarina Lalria 

     Related Files: 
         - header.cfm
         - footer.cfm
         - JS/header-footer_scripts.js
************************************************************************ */

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}


/* Navbar container */
.sac-navbar {
  width: 100%;
  background: #fff;
  z-index: 1000;
  border-bottom: 2px solid #ddd;
}

.sac-nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.5rem 1rem;
}

/* Logo */
.logo {
  max-height: 60px;
  display: block;
}

/* Nav items (horizontal on desktop) */
.sac-navbar-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  list-style: none;
  max-height: 50px;
}

.sac-navbar-nav .sac-nav-item {
  display: flex;
  align-items: center;
  margin-top: 10px;
  margin-right:4px
}

.sac-navbar-nav .sac-nav-item a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #043e6c;
  font-weight: 800;
  font-size: 16px;
  transition: color 0.3s ease;
  font-family: 'Calibri', sans-serif;
}

.sac-navbar-nav .sac-nav-item a:hover {
  color: #2A95D1;
}

.sac-navbar-nav .sac-nav-item .dropdown .dropdown-menu .dropdown-item:hover {
  color: #FFFFFF;
}

/* Icon circles */
.sac-navbar-nav i,
.sac-navbar-nav .user-icon,
.sac-navbar-nav .car-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  border-radius: 50%;
}

.sac-navbar-nav i {
  width: 35px;
  height: 35px;
  background-color: #043e6c;
  color: #fff;
  font-size: 20px;
}

.sac-navbar-nav .car-nav-icon {
  width: 35px;
  height: 35px;
  background-color: #fff;
  color: #043e6c;
  border: none;
  font-size: 35px;
}

.sac-navbar-nav .user-icon {
  width: 35px;
  height: 35px;
  background-color: #fff;
  color: #043e6c;
  border: 2px solid #043e6c;
  font-size: 20px;
}

/* Label wrap */
.sac-navbar-nav label {
  white-space: normal;
  width: 100px;
  margin-top: 10px;
  font-size: 15px;
}

/* Hamburger (hidden on desktop) */
.sac-navbar-toggler {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.sac-navbar-toggler .hamburger {
  width: 25px;
  height: 3px;
  background-color: #043e6c;
  border-radius: 2px;
}

/* Fullscreen Sidebar (Mobile & Tablet) */
.sidebar {
  position: fixed;
  top: 0;
  left: -100%;
  width: 100vw;
  height: 100vh;
  background: #fff;
  transition: left 0.3s ease;
  padding: 2rem 1.5rem;
  z-index: 1200;
  overflow-y: auto;
  font-family: 'Calibri', sans-serif;
}

.sidebar.active {
  left: 0;
}

/* Sidebar close button */
.sidebar .close-btn {
  font-size: 32px;
  font-weight: bold;
  color: #043e6c;
  position: absolute;
  top: 20px;
  right: 25px;
  padding: 10px;
  cursor: pointer;
  z-index: 1300;
}

/* Sidebar header with logo and divider */
.sidebar-header {
  text-align: center;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.sidebar-header .logo {
  max-height: 55px;
  margin-bottom: 0.75rem;
}

.sidebar-header hr {
  border: 0;
  border-top: 2px solid #ddd;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
}

/* Sidebar nav items */
.sac-sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sac-sidebar-nav li {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 1rem;
}

.sac-sidebar-nav li:last-child {
  border-bottom: none;
}

.sac-sidebar-nav li a {
  text-decoration: none;
  color: #043e6c;
  font-size: 1.3rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sac-sidebar-nav li a i {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: #043e6c;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Overlay to dim background */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1150;
}

.sidebar-overlay.active {
  display: block;
}


/* ----------------------------
   Mobile & Tablet Sidebar
   (full width, overrides above if needed)
-----------------------------*/
@media (max-width: 900px) {
    /* Sidebar full screen and active states */
    .sidebar {
        left: -100%;
        width: 100vw !important;
        height: 100vh !important;
    }

    .sidebar.active {
        left: 0;
    }

    .sidebar-overlay {
        width: 100vw !important;
        height: 100vh !important;
    }

    /* Hide desktop nav, show hamburger */
    .sac-navbar-nav { display: none; }
    .sac-navbar-toggler { display: flex; }

    /* Scale down logo, icons, text */
    .sidebar-header .logo { max-height: 45px; }

    .sac-sidebar-nav li a {
        font-size: 1.1rem;
        gap: 0.75rem;
    }

    .sac-sidebar-nav li a i {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .sac-navbar-nav i,
    .sac-navbar-nav .user-icon,
    .sac-navbar-nav .car-nav-icon {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .sac-navbar-nav label {
        font-size: 12px;
        margin-top: 20px;
        width: 80px;
    }
}


/* ============================================
   My Account Dropdown (Click-to-toggle version)
   ============================================ */
.dropdown {
  position: relative;
  margin-right: 20px;
}

.dropdown-label {
  max-width: 75px;
  margin-right: 0;
}

.dropdown .user-icon {
  width: 35px;
  height: 35px;
  background-color: #fff;
  color: #043e6c;
  border: 2px solid #043e6c;
  font-size: 20px;

}

/* Dropdown toggle - label + arrow inline without extra space */
.dropdown-toggle {
  display: inline-flex;       /* inline-flex keeps it inline */
  align-items: center;        /* vertically align label & arrow */
  justify-content: flex-start; /* keep them together on the left */
  gap: 4px;                   /* small space between label and arrow */
  cursor: pointer;
  font-weight: 800;
  color: #043e6c;
  font-size: 16px;
  font-family: 'Calibri', sans-serif;
  transition: color 0.3s ease;
  white-space: nowrap;        /* prevent wrapping */
}



/* Dropdown arrow */
.dropdown-toggle::after {
  content: "\f078"; /* Font Awesome down arrow */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 12px;
  margin-top: 8px;
  padding: 0;
  transition: transform 0.3s ease;
  margin-left: 0;

}


.dropdown.active .dropdown-toggle::after {
  transform: rotate(180deg);
}

/* Dropdown menu */
.dropdown-menu {
  list-style: none; /* remove bullets */
  margin: 0;
  padding: 0.3rem 0;
  display: none;
  position: absolute;
  top: 115%;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  min-width: 200px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 1500;
}

/* Show dropdown when active */
.dropdown.active .dropdown-menu {
  display: block;
}

/* Dropdown items */
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.7rem 1rem;
  color: #043e6c;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: background 0.3s ease, color 0.3s ease;
  border-bottom: 1px solid #eee;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item i {
  font-size: 16px;
  color: #043e6c;
  width: 20px;
  text-align: center;
}

.dropdown-item:hover {
  background-color: #2A95D1;
  color: #FFFFFF
  
}

.dropdown-item:hover a{
  color: #FFFFFF
}

.dropdown-item:hover i {
  color: #043e6c;
}

/* --------------------------------------------
   Sidebar / Mobile Adjustments
---------------------------------------------*/
@media (max-width: 900px) {
  .dropdown-menu {
    position: static;
    background: none;
    border: none;
    box-shadow: none;
    border-radius: 0;
    min-width: 150px;
    padding: 0;
    margin-left: 40px;

    
  }

  .dropdown-item {
    border-bottom: 1px solid #eee;
    margin: 0;
    font-size: 12px;
    font-family: 'Calibri', sans-serif;
    padding: 0;
    margin-bottom: 0;
    gap: 0;
    margin-top: 5px;
  }

  .dropdown-item:last-child {
    border-bottom: none;
  }

  .dropdown-item i {
    font-size: 12px;
    color: #043e6c;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .dropdown-item .fa-arrow-right {
    font-size: 12px;
    color: #043e6c;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .sac-sidebar-nav .dropdown-menu li {
    margin-bottom: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
  }

  .sac-sidebar-nav .dropdown-menu li:last-child {
    border-bottom: none;
  }

  /* Dropdown arrow */
  .dropdown-toggle::after {
    margin-top: 2px;

  }
}


/* ----------------------------
   Footer Styles
-----------------------------*/
.footer-style {
    background-color: #043e6c;
    color: #fff;
    font-family: 'Calibri', sans-serif;
    padding: 3rem 0.5rem 0.5rem;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
    overflow-y: hidden;
}

.footer-container {
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    height: auto;
    box-sizing: border-box;
    overflow-x: hidden;
    align-items: center;
    overflow-y: hidden;
}

/* BBB Logo */
.footer-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 0.5rem;
}

.footer-logo img {
    max-height: 60px;
    width: auto;
    max-width: 100%;
}

/* Footer Sections Wrapper - centers the columns */
.footer-sections-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0 auto;
 
}

/* Footer main sections */
.footer-sections {
    display: flex;
    justify-content: center;
    gap: 4rem;
    text-align: left;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
   
}

.footer-column {
    min-width: 200px;
    margin-left: 6rem;
    
}

.footer-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 0.5rem;
    margin-top: 2rem;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin-bottom: 2px;
    margin-top: 0.5rem;
}

.footer-column ul li {
    font-size: 13px;
    margin-bottom: 0.4rem;
}

.footer-column a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: #00aaff;
}

/* Footer bottom */
.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 0.5rem;
    font-size: 0.9rem;
    width: 100%;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
}

.footer-links a:hover {
    color: #00aaff;
}

.separator {
    margin: 0
}

/* ----------------------------
   Tablet View (601px–1100px)
-----------------------------*/
@media (min-width: 601px) and (max-width: 1100px) {
  .footer-sections-wrapper {
    justify-content: center;      /* centers the entire footer sections wrapper */
    width: 100%;
  }
  .footer-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    justify-content: center;       /* centers the grid columns */
    text-align: left;              /* keeps text left-aligned inside each */
    gap: 2rem;                     /* reduced gap to prevent overflow */
    max-width: 900px;              /* keeps content nicely contained */
    margin: 0 auto;                /* ensures grid is centered horizontally */
    padding: 0 4rem;                /* adds horizontal padding */
  }

  .footer-column {
        max-width: 300px;
        margin-left: 0;
    }

  
}


/* ----------------------------
   Mobile View (max-width: 620px)
-----------------------------*/
@media (max-width: 620px) {
    .footer-style {
        padding: 2rem 1rem;
    }

    .footer-sections {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.5rem;
        max-width: 100%;
    }

    .footer-column {
        margin-left: 0;
        width: 100%;
        max-width: 300px;
    }

    .footer-column ul {
        text-align: center;
    }

    .footer-bottom {
        font-size: 0.85rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.4rem;
    }
    
    .separator{
        display: none;
    }
}