/* ===========================
   EHF Header & Footer Menu
   =========================== */

:root {
  /*--ehf-accent: #D85C13; /* Main orange color */
  --ehf-accent: #F39659; 
  --ehf-dropdown-bg: #fbf7f4e6;
  --ehf-transition: 0.3s ease;
}

/* Base menu */
.ehf-menu {
  display: flex;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ehf-menu li {
  position: relative;
}

.ehf-menu li a {
  text-decoration: none;
  transition: color var(--ehf-transition);
  display: block;
  padding: 8px 12px;
}

/* Dropdown container */
.ehf-menu li ul {
  position: absolute;
  top: 100%;
  left: 0;
  padding-left: 20px;
  min-width: 200px;
  background: var(--ehf-dropdown-bg);
  list-style: none;  
  margin: 0;
  display: none;
  border-radius: 25px;
  overflow: hidden; /* keeps animated line inside */
}

/* Show dropdown with slide + line animation */
.ehf-menu li:hover > ul {
  display: block;
  animation: slideDown 0.25s ease forwards;
}


/* Dropdown items */

.ehf-menu li ul li a {
  padding: 10px 12px;
  display: block; 
  margin: 4px 8px;
  position: relative;
  transition: color var(--ehf-transition);
}

/*
.ehf-menu li ul li a::after {
  content: "";
  position: absolute;
  left: 12px;
  bottom: 6px;
  height: 2px;
  width: 0;
  background: var(--ehf-accent);
  transition: width 0.3s ease;
  border-radius: 2px;
}*/

.ehf-menu li ul li a:hover {
  color: var(--ehf-accent);
}

.ehf-menu li ul li a:hover::after {
  width: calc(100% - 36px);
}





/* ===========================
   Animations
   =========================== */

/* Slide down dropdown */
@keyframes slideDown {
  0% { opacity: 0; transform: translateY(-10px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Line grows left → right */
@keyframes lineIn {
  from { width: 0; }
  to { width: 100%; }
}

/* Line shrinks right → left */
@keyframes lineOut {
  from { width: 100%; }
  to { width: 0; }
}


/* ===========================
   Sticky Header
   =========================== */

.ehf-header {
  position: sticky;      /* sticks within its parent */
  top: 0;                /* sticks to top of viewport */
  z-index: 999;          /* keeps it above content */
  background: #fff;      /* or use transparent if overlay */
  transition: all 0.3s ease;   
}

.admin-bar .ehf-header{
  top: 32px;
}

/* Add shadow when scrolling */
.ehf-header.is-scrolled {  
  background: #fff; 
}

.ehf-header .elementor-section.elementor-top-section{
  transition: padding 0.3s ease !important;
}

.ehf-header.is-scrolled .elementor-section {
  padding-top: 0px !important;
  padding-bottom: 0px !important;
  transition: padding 0.3s ease;
}

/* Scroll Progress Bar */
.ehf-scroll-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: var(--ehf-accent, #D85C13);
  transition: width 0.1s linear;
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
  z-index: 9999;
}


/* =======================================
   Creavi EH&F Burger Menu — Always-visible submenus
   ======================================= */

.ehf-menu-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

[type=button].ehf-burger:focus,
[type=button].ehf-burger:hover,
.ehf-header [type=submit]:focus, 
.ehf-header [type=submit]:hover, 
.ehf-header button:focus, 
.ehf-header button:hover {
    background-color: transparent !important;
    color: #fff;
    text-decoration: none;
}

/* --- Burger Icon --- */
.ehf-burger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  padding: 0;
}

.ehf-burger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--brand-dark-brown, #3b2b2b);
  transition: all 0.3s ease;
}

/* Burger active (X animation) */
.ehf-burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 5px);
}
.ehf-burger.active span:nth-child(2) {
  opacity: 0;
}
.ehf-burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -5px);
}

/* --- Base Menu Layout --- */
.ehf-menu {
  display: flex;
  align-items: center;  
  list-style: none;
  margin: 0;
  padding: 0;
  gap:0;
}

/* --- Mobile version --- */
@media (max-width: 1024px) {
  .ehf-burger {
    display: flex;
  }

  .ehf-menu {
    display: none !important;
    flex-direction: column;
    align-items: flex-start;
    background: #fbf7f4;
    position: absolute;
    top: 38px !important;
    left: -10px;
    padding: 25px 20px;    
    z-index: 1000;
    animation: fadeIn 0.3s ease;
    border-radius: 15px;
    width: fit-content;
    top:32px;
  }

  .ehf-menu.active {
    display: flex !important;
  }

  .ehf-menu li {
    width: 100%;
  }

  .ehf-menu a {
    display: block;
    width: 100%;
    padding: 8px 0;
    color: var(--brand-dark-brown, #3b2b2b);
    text-decoration: none;
    font-family: var(--font-flama, 'Flama', sans-serif);
  }

  .ehf-menu a:hover {
    color: var(--brand-orange, #d4793a);
  }

  /* Hide profile button on desktop */
li.menu-item.ehf-mobile-profile {
    display: none;
}

@media (max-width: 767px) {
    li.menu-item.ehf-mobile-profile {
        display: block;
    }

    /* Style the profile icon (your image or circle) */
    .ehf-mobile-profile-icon {
        width: 32px;
        height: 32px;
        display: inline-block;        
        background-image: url('http://test.iloveecoessentials.com.linux166.unoeuro-server.com/wp-content/uploads/2025/12/mobile_profile_icon.png');
        background-size: contain;
        background-repeat: no-repeat;
        margin-right: 8px;
        vertical-align: middle;
    }

    .admin-bar .ehf-header {
        top: 0px;
    }
}


  /* --- Submenus always visible on mobile --- */
  .ehf-menu .sub-menu {
    display: flex !important;
    flex-direction: column;    
    padding-left: 15px;    
    position: relative;
  }

  .ehf-menu li.menu-item-has-children > a::after {
    content: none !important; /* remove dropdown arrow */
  }

  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

/* Hide by default (desktop) */
.ehf-mobile-only {
    display: none;
}

/* Show only on mobile */
@media (max-width: 767px) {
    .ehf-mobile-only {
        display: block;
    }
}