/* css/clp-menu.css - Longevity Hub Style Header & Side Menu */

/* General Header Reset */
#clp-main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background-color: transparent;
    transition: all 0.3s ease;
    height: 80px;
}

/* By default, header is solid white for subpages to ensure logo visibility */
.bg--ivory #clp-main-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Header Container */
.clp-header-container {
    display: flex;
    justify-content: space-between;
    /* Logo left, Hamburger right */
    align-items: center;
    width: 100%;
    height: 80px;
    padding: 0 40px;
    box-sizing: border-box;
}

/* 1. Left: Logo */
.clp-logo-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-decoration: none;
}

.clp-logo-container img {
    max-height: 40px;
    width: auto;
    /* Default dark logo for white headers */
    transition: filter 0.3s ease;
}

/* 2. Right: Hamburger Menu (Two minimalist lines) */
.clp-menu-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 10px;
    z-index: 10001;
    position: relative;
}

.clp-hamburger-lines {
    display: flex;
    flex-direction: column;
    gap: 6px;
    /* Two lines slightly spaced apart */
    width: 100%;
    align-items: center;
    /* Align center */
    pointer-events: none;
}

.clp-line {
    width: 25px;
    height: 1.5px;
    background-color: #002052;
    /* Default dark line */
    transition: all 0.3s ease;
    pointer-events: none;
}

.clp-menu-text {
    font-size: 10px;
    letter-spacing: 2px;
    margin-top: 6px;
    color: #002052;
    font-weight: 500;
    pointer-events: none;
    transition: color 0.3s ease;
}

/* --- OVERRIDES FOR TRANSPARENT HEADER PAGE (e.g. index.html with video) --- */
body.transparent-header-page .bg--ivory #clp-main-header,
body.transparent-header-page #clp-main-header {
    background-color: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(10px) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.transparent-header-page .clp-logo-container img {
    /* filter: brightness(0) !important; (removed for new logo) */
}

body.transparent-header-page .clp-line {
    background-color: #002052 !important;
}

/* Ensure the video reaches the top on mobile where responsive.css adds margin-top: 80px */
body.transparent-header-page .hero-section,
body.transparent-header-page #hero-1 .slideshow {
    margin-top: 0 !important;
}

body.transparent-header-page .clp-menu-text {
    color: #002052 !important;
}

.clp-menu-btn:hover .clp-line {
    width: 28px;
    /* Expand on hover */
    background-color: #547C8C;
    /* Highlight color */
}

/* Menu Button Animation when Active is NOT strictly needed since we use a close 'X' in the panel, but nice if it overlaps */
/* However, Longevity Hub places the 'X' inside the dark panel! */

/* --- Slide-Out Side Menu (Frosted Glass) --- */
.clp-side-menu {
    position: fixed;
    top: 0;
    right: -450px;
    /* Hidden off canvas */
    width: 400px;
    max-width: 100vw;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(15px) !important;
    color: #002052 !important;
    z-index: 10002;
    /* Above everything */
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    /* Hide scrollbar for clean look */
    scrollbar-width: none;
}

.clp-side-menu::-webkit-scrollbar {
    display: none;
}

.clp-side-menu.active {
    right: 0;
}

/* Close Icon inside Sidebar */
.clp-close-btn {
    position: absolute;
    top: 30px;
    right: 40px;
    background: transparent;
    border: none;
    color: #002052;
    /* Black */
    font-size: 24px;
    font-weight: 100;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 10px;
}

.clp-close-btn:hover {
    color: #002052;
    transform: rotate(90deg);
}

/* Navigation Links */
.clp-sidebar-content {
    padding: 100px 50px 40px 50px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.clp-overlay-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 25px;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.clp-overlay-nav li {
    width: 100%;
}

.clp-overlay-nav li a {
    font-size: 15px;
    font-weight: 300;
    color: #002052 !important;
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
    display: block;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 15px;
}

.clp-overlay-nav li:last-child a {
    border-bottom: none;
}

.clp-overlay-nav li a:hover {
    color: #002052 !important;
    padding-left: 5px;
    /* Slight indicator arrow-like movement */
}

/* Contact Button in Sidebar */
.clp-sidebar-contact-btn {
    margin-top: 40px;
    display: inline-block;
    background-color: #547C8C;
    /* Muted blue from screenshot */
    color: #ffffff !important;
    text-decoration: none;
    padding: 12px 30px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: fit-content;
    gap: 30px;
}

.clp-sidebar-contact-btn:hover {
    background-color: #436371;
}

/* Footnote area */
.clp-sidebar-footnote {
    margin-top: auto;
    padding-top: 40px;
    color: #002052;
    font-size: 13px;
    font-weight: 300;
}

.clp-sidebar-footnote p {
    margin: 5px 0;
}

.clp-socials {
    margin-top: 20px;
    display: flex;
    gap: 20px;
}

.clp-socials a {
    color: #002052;
    font-size: 15px;
    transition: color 0.3s ease;
}

.clp-socials a:hover {
    color: #547C8C;
}

/* Background Overlay when Menu is Open (dimming the rest of the site) */
.clp-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    /* Just below the sidebar */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.clp-menu-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Prevent scrolling when menu is open is handled by JS class adding to body */
body.clp-noscroll {
    overflow: hidden;
}

/* Hide original navigation elements to prevent conflicts */
.wsmainfull,
.wsmobileheader {
    display: none !important;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .clp-header-container {
        padding: 0 20px;
    }

    .clp-logo-container img {
        max-height: 35px;
    }

    .clp-side-menu {
        width: 100%;
        /* Full screen on mobile */
        right: -100%;
    }

    .clp-sidebar-content {
        padding: 80px 30px 40px 30px;
    }
}