/* Sliding Menu CSS for Safe Covenant Website
 * This implements a sliding menu similar to ChartDev's website
 * where the main content slides to the left when the menu opens
 */

/* Base styles for the sliding menu functionality */
body {
    overflow-x: hidden;
    position: relative;
}

/* Menu Toggle Button (Hamburger Icon) */
.menu-toggle {
    display: none; /* Hidden on desktop */
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    outline: none;
}

.hamburger-icon {
    display: block;
    width: 30px;
    height: 3px;
    background-color: #333;
    position: relative;
    transition: background-color 0.3s;
}

.hamburger-icon:before,
.hamburger-icon:after {
    content: '';
    display: block;
    width: 100%;
    height: 3px;
    background-color: #333;
    position: absolute;
    transition: transform 0.3s;
}

.hamburger-icon:before {
    top: -8px;
}

.hamburger-icon:after {
    bottom: -8px;
}

/* Hamburger icon animation when menu is active */
.menu-active .hamburger-icon {
    background-color: transparent;
}

.menu-active .hamburger-icon:before {
    transform: rotate(45deg);
    top: 0;
}

.menu-active .hamburger-icon:after {
    transform: rotate(-45deg);
    bottom: 0;
}

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 998;
}

.menu-active .menu-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Sliding Menu Panel */
.sliding-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background-color: #fff;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 999;
    overflow-y: auto;
    padding: 60px 20px 20px;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.menu-active .sliding-menu {
    transform: translateX(0);
}

/* Close Button */
.menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
}

.menu-close:hover {
    color: #0d6efd; /* Bootstrap primary color */
}

/* Main Content Wrapper */
.main-content-wrapper {
    transition: transform 0.3s ease;
    position: relative;
    width: 100%;
}

.menu-active .main-content-wrapper {
    transform: translateX(-300px);
}

/* Sliding Menu Navigation */
.sliding-menu-nav {
    margin-top: 20px;
}

.sliding-menu-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sliding-menu-nav-list li {
    margin-bottom: 15px;
}

.sliding-menu-nav-list a {
    display: block;
    color: #333;
    font-size: 18px;
    text-decoration: none;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    transition: color 0.2s;
}

.sliding-menu-nav-list a:hover,
.sliding-menu-nav-list a:focus {
    color: #0d6efd; /* Bootstrap primary color */
}

/* Responsive styles */
@media (max-width: 991px) {
    .menu-toggle {
        display: block;
    }
    
    /* Hide the default Bootstrap navbar toggler */
    .navbar-toggler {
        display: none !important;
    }
    
    /* Hide the regular navbar on mobile */
    .navbar-collapse {
        display: none !important;
    }
}

/* Prevent scrolling when menu is active */
body.menu-active {
    overflow: hidden;
}

/* Accessibility focus styles */
.menu-toggle:focus,
.menu-close:focus,
.sliding-menu-nav-list a:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* Additional styling for the sliding menu to match Safe Covenant branding */
.sliding-menu {
    background-color: #f8f9fa; /* Light gray background to match the site */
}

.sliding-menu-nav-list a {
    font-weight: 500;
}

/* Add ACT Menu title styling */
.menu-title {
    font-size: 24px;
    font-weight: bold;
    color: #0d6efd;
    margin-bottom: 20px;
    border-bottom: 2px solid #0d6efd;
    padding-bottom: 10px;
    text-align: center;
}
