/* Sidebar and Topbar Styles for Homepage */
.sidebar {
    position: fixed !important;
    top: 100px !important; /* header height for desktop */
    right: 0 !important;
    left: auto !important;
    width: 150px !important;
    height: calc(100% - 100px) !important;
    background: #232a3bdb;
    color: #fff;
    transform: translateX(100%) !important;
    transition: transform 0.3s ease;
    z-index: 1100;
    overflow-y: auto;
    box-shadow: -2px 0 8px rgba(0,0,0,0.1);
}
.sidebar.active {
    transform: translateX(0) !important;
}
.sidebar-header span {
    font-size: 1rem;
    font-weight: bold;
}
.sidebar-menu li {
    padding: 15px 20px;
}
.sidebar-menu li a {
    color: #fff;
    text-decoration: none;
    display: block;
}
.sidebar-menu li a:hover, .sidebar-menu .dropdown-item:hover {
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
}
.sidebar-topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100px;
    background-color: #232a3b94;
    z-index: 2000 !important; /* ensure header is above sidebar */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}
.sidebar-topbar.hide-on-scroll {
    transform: translateY(-120%);
    transition: transform 0.3s;
}
.sidebar-topbar {
    transition: transform 0.3s;
}
@media (max-width: 600px) {
    .sidebar {
        width: 60vw !important;
        top: 70px !important; /* header height for mobile */
        height: calc(100% - 70px) !important;
    }
    .sidebar-topbar {
        flex-direction: column !important;
        align-items: stretch !important;
        height: 70px !important;
        min-height: unset !important;
        padding: 6px 4px !important;
        background-position: center top !important;
    }
    #sidebar-logo {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin-bottom: 2px !important;
    }
    #sidebar-logo img {
        height: 38px !important;
        max-width: 80px !important;
        object-fit: contain !important;
    }
    .header-title {
        display: none !important;
    }
    .header-title h1 {
        font-size: 1.1rem !important;
        margin-bottom: 0.1rem !important;
        line-height: 1.2 !important;
    }
    .header-title p {
        font-size: 0.7rem !important;
        margin-top: 0 !important;
        line-height: 1 !important;
    }
    .sidebar-topbar > div:last-child {
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-top: 2px !important;
        padding: 0 2px !important;
    }
    .nav-toggle {
        font-size: 1.7rem !important;
        padding: 2px 10px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        background: #232a3b !important;
        border-radius: 4px !important;
    }
    #header-date-location {
        font-size: 0.8rem !important;
        margin-right: 0 !important;
        margin-left: 4px !important;
        white-space: normal !important;
        text-align: left !important;
        flex: 1 1 auto !important;
    }
}
@media (max-width: 780px) {
    .sidebar-topbar {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        height: auto !important;
        min-height: 60px !important;
        padding: 6px 8px !important;
        background-position: center top !important;
    }
    #sidebar-logo {
        width: auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        margin-bottom: 0 !important;
    }
    #sidebar-logo img {
        height: 38px !important;
        max-width: 90px !important;
        object-fit: contain !important;
    }
    .header-title {
        flex: 1 1 auto !important;
        width: 100% !important;
        text-align: center !important;
        margin: 0 !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .header-title h1 {
        font-size: 1.1rem !important;
        margin-bottom: 0.1rem !important;
        line-height: 1.2 !important;
        display: none;
    }
    .header-title p {
        font-size: 0.7rem !important;
        margin-top: 0 !important;
        line-height: 1 !important;
        display: none;
    }
    .sidebar-topbar > div:last-child {
        width: auto !important;
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
        margin-top: 0 !important;
    }
    .nav-toggle {
        font-size: 1.7rem !important;
        padding: 2px 10px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        background: #373636  !important;
        color: #232a3b !important;
        border-radius: 4px !important;
        border: none !important;
        box-shadow: 0 2px 8px #0001 !important;
        transition: background 0.2s, color 0.2s;
    }
    .nav-toggle:hover, .nav-toggle:focus {
        background: #f0f0f0 !important;
        color: #0d6efd !important;
    }
}
body.sidebar-open {
    overflow: hidden;
}
.sidebar .dropdown-menu {
    display: none;
    position: static;
    float: none;
    background: #232a3b;
    border: none;
    box-shadow: none;
    margin-left: 0rem;
    padding: 0.5rem 0;
}
.sidebar .dropdown-menu.show {
    display: block;
}
.sidebar .dropdown-item {
    color: #fff !important;
    padding: 8px 16px;
    white-space: nowrap;
}
.sidebar .dropdown-item:hover {
    background: rgba(255,255,255,0.1);
}
.sidebar .dropdown-toggle::after {
    display: inline-block;
    margin-left: 0.255em;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
}

/* Sidebar profile image/icon visibility */
.sidebar .dropdown img,
.sidebar .dropdown .bi-person-circle {
    background: #fff !important;
    border-radius: 50% !important;
    padding: 2px !important;
    box-shadow: 0 1px 4px #0002 !important;
    display: inline-block !important;
}

/* Profile Dropdown Styles */
.profile-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    margin-right: 16px;
}
.profile-img {
    height: 32px;
    width: 32px;
    object-fit: cover;
    border-radius: 50%;
    margin-right: 8px;
    cursor: pointer;
    background: #fff;
    box-shadow: 0 1px 4px #0002;
}
.profile-dropdown-menu {
    display: none;
    position: absolute;
    top: 120%;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px #0002;
    min-width: 120px;
    z-index: 1000;
    padding: 8px 0;
    flex-direction: column;
}
.profile-dropdown.open .profile-dropdown-menu {
    display: flex;
}
.profile-dropdown-menu a {
    color: #232a3b;
    text-decoration: none;
    padding: 8px 16px;
    font-size: 15px;
    transition: background 0.2s;
    white-space: nowrap;
}
.profile-dropdown-menu a:hover {
    background: #f0f0f0;
}

/* Partner profile icon styles */
.profile-dropdown .bi-building {
    height: 32px;
    width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px #0002;
    margin-right: 8px;
}

/* User location text styles */
#user-location {
    font-weight: 400;
    transition: opacity 0.3s ease;
}

#user-location:empty::before {
    content: "Loading...";
    opacity: 0.7;
}

/* Ensure modals/popups are above header */
.modal {
    z-index: 2002 !important;
}
.modal-backdrop {
    z-index: 2001 !important;
}
.sidebar-topbar {
    z-index: 1060 !important;
}

/* --- Sidebar width fix for all resolutions --- */
@media (min-width: 1400px) {
    .sidebar {
        width: 150px !important;
    }
}
@media (max-width: 1399px) and (min-width: 1200px) {
    .sidebar {
        width: 150px !important;
    }
}
@media (max-width: 1199px) and (min-width: 992px) {
    .sidebar {
        width: 150px !important;
    }
}
@media (max-width: 991px) and (min-width: 768px) {
    .sidebar {
        width: 150px !important;
    }
}
@media (max-width: 767px) and (min-width: 576px) {
    .sidebar {
        width: 150px !important;
    }
}
@media (max-width: 575px) {
    .sidebar {
        width: 150px !important;
    }
}
@media (max-width: 375px) {
    .sidebar {
        width: 150px !important;
    }
}
/* End sidebar width fix */

/* WhatsApp floating button position fix for sidebar */
.whatsapp-float {
    position: fixed;
    bottom: 40px;
    right: 0px;
    background-color: #25d366;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 1000;
    transition: all 0.3s ease;
}
body.sidebar-open .whatsapp-float {
    right: 170px; /* 150px sidebar + 20px gap */
} 

/* Custom hamburger menu icon styles */
.nav-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  background: #232a3b;
  border-radius: 4px;
  padding: 4px 10px;
}
.nav-toggle .bar {
  display: block;
  width: 24px;
  height: 3px;
  background: #fff;
  margin: 3px 0;
  border-radius: 2px;
  transition: all 0.3s;
}
/* End custom hamburger menu icon styles */

/* Centered date/location below association line */
.header-title #header-date-location {
  display: block;
  font-size: 1rem;
  color: #fff;
  margin-top: 2px;
  font-weight: 400;
  text-align: center;
}
/* End centered date/location styles */ 