/* wp-mobile-menu-style.css */

/* Import Google Fonts */
@import url("https://fonts.googleapis.com/css?family=Montserrat:300,400");

/* CSS Variables for theming and consistency */
:root {
    --ep-mob-primary-color: #df0050; /* Your specified primary color */
    --ep-mob-header-height: 60px;    /* Height of the fixed header bar */
    --ep-mob-hamburger-line-color: var(--ep-mob-primary-color); /* Color of hamburger lines when menu is closed */
    --ep-mob-hamburger-open-line-color: #ffffff; /* Color of hamburger lines (X) when menu is open */
    --ep-mob-menu-text-color: #ffffff; /* Text color for items in the open menu */
    --ep-mob-menu-close-btn-color: #ffffff; /* Color for the close button */
    --ep-mob-header-bg-color: #ffffff; /* Background color for the header bar */
    --ep-mob-animation-duration: 1s; /* Base duration for GSAP animations */
    --ep-mob-item-animation-duration: 1.2s; /* Duration for menu item animations */
    --ep-mob-breakpoint: 768px; /* Breakpoint for mobile view */
}

/* Global Styles */
* {
    font-family: 'Montserrat', sans-serif; /* Default font for all elements */
    font-weight: 300; /* Default font weight */
    box-sizing: border-box; /* Modern box model for easier layout */
    margin: 0; /* Reset default margins */
    padding: 0; /* Reset default paddings */
}

/* Header Bar Styling */
.ep-mob-header-bar {
    display: none; /* Hidden by default, shown via media query */
    justify-content: space-between; /* Logo on left, hamburger on right */
    align-items: center; /* Vertically center items */
    padding: 0 15px; /* Horizontal padding */
    background-color: var(--ep-mob-header-bg-color);
    position: absolute; /* Stick to the top of the viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: var(--ep-mob-header-height);
    z-index: 1000; /* Ensure header is above page content but below open menu panel */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Subtle shadow for depth */
}

.ep-mob-logo img {
    max-height: calc(var(--ep-mob-header-height) - 20px); /* Logo height relative to header, with some padding */
    width: auto; /* Maintain aspect ratio */
	height: 24px;
    display: block; /* Remove extra space below image */
}

/* Hamburger Icon Styling */
#ep-mob-hamburger {
    width: 25px; /* Width of the hamburger icon */
    height: 18px; /* Height of the hamburger icon */
    position: relative; /* For absolute positioning of spans */
    cursor: pointer;
    z-index: 1002; /* Above menu background, ensures it's clickable when menu is open */
}

#ep-mob-hamburger span {
    display: block;
    position: absolute;
    height: 3px; /* Thickness of hamburger lines */
    width: 100%;
    background: var(--ep-mob-hamburger-line-color);
    border-radius: 5px; /* Rounded ends for lines */
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: all 0.25s ease-in-out; /* Smooth transition for hover and open states */
}

/* Positioning of hamburger lines */
#ep-mob-hamburger span:nth-child(1) {
    top: 0px;
}

#ep-mob-hamburger span:nth-child(2) {
    top: 9px; /* Middle line */
}

#ep-mob-hamburger span:nth-child(3) {
    top: 18px; /* Bottom line */
}

/* Optional: Hover effect for hamburger icon */
#ep-mob-hamburger:hover span:nth-child(1) {
    top: -2px; /* Slight upward movement on hover */
}

#ep-mob-hamburger:hover span:nth-child(3) {
    top: 20px; /* Slight downward movement on hover */
}

/* Hamburger 'open' state (transforms into an X) */
#ep-mob-hamburger.open span {
    background: var(--ep-mob-hamburger-open-line-color); /* Change line color for visibility against menu background */
}

#ep-mob-hamburger.open span:nth-child(1) {
    top: 9px; /* Move to center */
    transform: rotate(135deg); /* Rotate to form one part of X */
}

#ep-mob-hamburger.open span:nth-child(2) {
    opacity: 0; /* Middle line fades out */
    left: -30px; /* Animate out of view */
}

#ep-mob-hamburger.open span:nth-child(3) {
    top: 9px; /* Move to center */
    transform: rotate(-135deg); /* Rotate to form other part of X */
}

/* Mobile Menu Panel Styling */
#ep-mob-menu-panel {
    display: none; /* Hidden by default, shown via media query if hamburger is clicked */
    position: fixed; /* Cover the full screen */
    top: 0;
    right: 0; /* Aligned to the right edge of the screen */
    width: 100%;
    height: 100%;
    overflow: hidden; /* Crucial for containing elements animated from outside */
    z-index: 1001; /* Above header bar when open */
    pointer-events: none; /* Initially not interactive; enabled by JS when open */
}

/* This class is added to #ep-mob-menu-panel by JS when menu is open to allow interaction */
#ep-mob-menu-panel.active {
    pointer-events: auto;
}

#ep-mob-bg-menu-panel {
    width: 100%;
    height: 100%;
    position: absolute; /* Relative to #ep-mob-menu-panel */
    top: 0;
    right: -100%; /* Start completely off-screen to the right */
    background-color: var(--ep-mob-primary-color);
    will-change: transform; /* Performance hint for animations */
    z-index: 1; /* Behind the menu items and close button */
}

/* Close Button Styling */
#ep-mob-menu-close-btn {
    position: absolute;
    top: 15px; /* Position from the top of the menu panel */
    right: 20px; /* Position from the right of the menu panel */
    font-size: 30px; /* Size of the 'X' character */
    font-weight: 400; /* Slightly bolder than normal text */
    color: var(--ep-mob-menu-close-btn-color);
    cursor: pointer;
    z-index: 3; /* Ensure it's above the background panel and menu items */
    padding: 5px; /* Add some clickable area */
    line-height: 1; /* Prevent extra vertical space */
    transition: transform 0.2s ease-in-out, color 0.2s ease-in-out, opacity 0.3s ease-in-out; /* Smooth transitions */
    opacity: 0; /* Initially hidden */
    pointer-events: none; /* Initially not clickable */
}

/* Make close button visible and interactive when menu is active */
#ep-mob-menu-panel.active #ep-mob-menu-close-btn {
    opacity: 1;
    pointer-events: auto;
    /* Delay appearance slightly until panel animation is underway */
    transition-delay: calc( (var(--ep-mob-animation-duration) / 2) + 0.1s); /* Adjust timing as needed */
}

#ep-mob-menu-close-btn:hover {
    transform: scale(1.2); /* Enlarge on hover for feedback */
    color: #cccccc; /* Slightly lighter color on hover */
}

#ep-mob-menu-panel ul {
    width: 100%; /* Occupy full width of the panel */
    position: absolute; /* Positioned within #ep-mob-menu-panel */
    top: var(--ep-mob-header-height); /* Start below the header area */
    padding-top: 40px; /* Additional spacing from the top */
    left: 0; /* Align to the left edge of the panel */
    list-style: none; /* Remove default bullet points */
    color: var(--ep-mob-menu-text-color);
    z-index: 2; /* Above the background panel, below the close button */
}

#ep-mob-menu-panel ul li {
    font-weight: 300;
    font-size: 28px; /* Size of menu item text */
    position: relative; /* For positioning context if needed */
    margin-bottom: 25px; /* Spacing between menu items */
    padding-left: 30px; /* Indentation for menu items */
    left: 100%; /* Start off-screen to the right (initial state for JS animation) */
    cursor: pointer;
    will-change: transform; /* Performance hint */
    transform: scaleX(1); /* Default scale */
}

#ep-mob-menu-panel ul li a {
    color: inherit; /* Links inherit text color from li */
    text-decoration: none; /* Remove underline from links */
    display: block; /* Make the entire list item area clickable */
    padding: 5px 0; /* Add some vertical padding to link tap area */
}

#ep-mob-menu-panel ul li:hover a { /* Hover effect on the link */
    color: #111; /* Darker color on hover, as in example (consider a lighter shade for better contrast on dark bg) */
    transition: color 0.1s ease-in-out;
}

/* Media query to control visibility: Show on mobile, hide on desktop */
@media (max-width: /* --ep-mob-breakpoint defined above */ 768px) {
    .ep-mob-header-bar {
        display: flex; /* Show the header bar on mobile */
    }
    /* The #ep-mob-menu-panel is controlled by JS (adding .active class)
       but we ensure it can be displayed on mobile when active.
       Its initial display:none; is important for desktop. */
    #ep-mob-menu-panel.active { /* If JS makes it active, it should be display:block or similar */
        display: block; /* Or 'flex', 'grid' if its internal layout requires it */
    }
}

@media (min-width: /* --ep-mob-breakpoint + 1px */ 769px) {
    .ep-mob-header-bar {
        display: none; /* Hide header bar on desktop */
    }
    #ep-mob-menu-panel {
        display: none !important; /* Hide menu panel on desktop, !important to override JS if it adds .active */
    }
}
