/* 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: 100px;
}

/* 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: 100px;
    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: 90px;
    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: #1C1510;
    /* Default dark line */
    transition: all 0.3s ease;
    pointer-events: none;
}

.clp-menu-text {
    font-size: 10px;
    letter-spacing: 2px;
    margin-top: 6px;
    color: #1C1510;
    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: #1C1510 !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: #1C1510 !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: 20px;
    right: -450px;
    /* Hidden off canvas */
    width: 400px;
    max-width: calc(100vw - 40px);
    height: calc(100vh - 40px);
    background-color: rgba(253, 252, 251, 0.75) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    color: #5b4837 !important;
    z-index: 10002;
    /* Above everything */
    box-shadow: 0 25px 60px rgba(91, 72, 55, 0.18) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 24px;
    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: 20px;
}

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

.clp-close-btn:hover {
    color: #1C1510;
    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: #1C1510 !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: #1C1510 !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: #1C1510;
    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: #1C1510;
    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: 75px;
    }

    .clp-side-menu {
        width: calc(100% - 20px);
        right: -100%;
        top: 10px;
        height: calc(100vh - 20px);
        border-radius: 16px;
        border: 1px solid rgba(255, 255, 255, 0.35) !important;
        box-shadow: 0 15px 40px rgba(91, 72, 55, 0.12) !important;
    }

    .clp-side-menu.active {
        right: 10px;
    }

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

/* --- User Custom Navigation Link Styles --- */
.clp-desktop-menu > li > a.nav__link {
  font-family: 'Inter', sans-serif !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  letter-spacing: -0.01em !important;
  color: #2C3539 !important;
  text-decoration: none !important;
  padding: 12px 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important; /* Зазор для иконки-стрелочки вниз */
  transition: color 0.2s ease !important;
}

/* Эффект наведения для доверительного тона (чуть мягче исходного цвета) */
.clp-desktop-menu > li > a.nav__link:hover {
  color: #4A555A !important; 
}

.clp-desktop-menu > li:hover > a.nav__link i {
  color: #4A555A !important;
}

/* Пункты внутри выпадающего списка */
.clp-mega-col ul li a.dropdown__link {
  font-family: 'Inter', sans-serif !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  color: #2C3539 !important;
  text-decoration: none !important;
  padding: 10px 16px !important;
  display: block !important;
  transition: background-color 0.2s ease !important;
}

/* Подсветка строки при наведении в выпадающем меню */
.clp-mega-col ul li a.dropdown__link:hover {
  background-color: #F5F7F8 !important; /* Мягкий светлый фон */
  color: #2C3539 !important;
  transform: none !important;
}