/* --- Header base --- */

.eg-header {
  font-family: "Open Sans", Arial, sans-serif;
  color: #123022;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* --- Top bar --- */

.eg-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 5%;
  font-size: 0.9rem;
  background: #2b561d; /* updated deep green */
  color: #ffffff;
}

/* Keep email icon + address together, even on tiny screens */
.eg-topbar-email {
  white-space: nowrap;
}


.eg-topbar a {
  color: #ffffff;              /* links white */
  text-decoration: none;
}

.eg-topbar a:hover {
  color: #51614a;              /* optional lighter hover */
  text-decoration: underline;  /* remove if you don’t want underline */
}

.eg-topbar-left,
.eg-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.eg-topbar-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Language switch */
.eg-lang {
  font-weight: 600;
  opacity: 0.85;
  color: #ffffff;
}

.eg-lang-active {
  opacity: 1;
}

.eg-lang-divider {
  opacity: 0.8;
  color: #ffffff;
}


/* --- Main header --- */

.eg-main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 5%;
  background: #ffffff;
}

/* Logo */

.eg-logo-area {
  display: flex;
  align-items: center;
}

.eg-logo-link {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  flex-direction: column;
}

.eg-logo-text {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.eg-logo-sub {
  font-weight: 400;
  font-size: 0.8rem;
  text-transform: none;
  color: #4d6b5a;
  margin-top: 0.1rem;
}

.eg-logo-sub {
  white-space: nowrap;
}

/* On small screens, let the logo sit on its own line and scale nicely */
@media (max-width: 700px) {
  .eg-main-header {
    flex-wrap: wrap;
  }

  .eg-logo-area {
    flex: 1 1 100%;
    margin-bottom: 0.5rem;
  }

  .eg-logo-area img {
    max-width: 80%;      /* dial this up/down as you like */
  }

  .eg-nav-toggle {
    align-self: flex-end;
  }
}

/* Mobile: centre the logo */
@media (max-width: 600px) {
  .eg-main-header {
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
  }

  .eg-logo-area {
    flex: 1 1 100%;
    display: flex;
    justify-content: center;
    text-align: center;
    margin-bottom: 0.5rem;
  }

  .eg-logo-link {
    align-items: center;
  }

  /* keep the burger under / to the right nicely */
  .eg-nav-toggle {
    align-self: center;
  }
}


/* --- Navigation --- */

.eg-nav {
  /* for desktop, shown by default */
}

.eg-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  align-items: center;
}

.eg-nav-list > li > a {
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.35rem 0;
  color: #123022;
  position: relative;
}

.eg-nav-list > li > a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 0;
  height: 2px;
  background: #2f7e4e; /* accent green */
  transition: width 0.2s ease-out;
}

.eg-nav-list > li > a:hover::after,
.eg-nav-list > li > a:focus-visible::after {
  width: 100%;
}

/* Call-to-action link */

.eg-cta-link {
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: #2f7e4e;
  color: #ffffff !important;
  font-weight: 600;
  border: 1px solid #2f7e4e;
  margin-left: 0.5rem;
}

.eg-cta-link:hover,
.eg-cta-link:focus-visible {
  background: #51614a;
  border-color: #51614a;
}

/* --- Mobile nav toggle --- */

.eg-nav-toggle {
  display: none; /* hidden on desktop */
  background: none;
  border: none;
  padding: 0.4rem;
  cursor: pointer;
}

.eg-burger-line {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4px 0;
  background: #ffffff;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* When nav is open, you can add a class to animate burger → X */
.eg-nav-open .eg-burger-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.eg-nav-open .eg-burger-line:nth-child(2) {
  opacity: 0;
}
.eg-nav-open .eg-burger-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* --- Responsive behaviour --- */

@media (max-width: 900px) {
  .eg-main-header {
    flex-wrap: wrap;
  }

  .eg-nav-toggle {
    display: block;
  }

  .eg-nav {
    width: 100%;
    margin-top: 0.5rem;
    display: none; /* hidden by default on mobile */
  }

  .eg-nav.eg-nav-visible {
    display: block;
  }

  /* TILE LAYOUT ON MOBILE */
  .eg-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;              /* allow wrapping */
    justify-content: space-between;
    gap: 0.5rem;
  }

  .eg-nav-list > li {
    flex: 1 1 39%;                /* two tiles per row */
    box-sizing: border-box;
  }

  .eg-nav-list > li > a {
    display: block;
    width: 100%;
    padding: 0.6rem 0.4rem;
    text-align: center;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);   /* subtle pill look */
  }

  .eg-cta-link {
    margin-left: 0;
  }

  .eg-topbar {
    padding-left: 4%;
    padding-right: 4%;
    font-size: 0.85rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .eg-topbar-right {
    margin-top: 0.2rem;
  }
}

/* --- FINAL FORCE for top bar --- */

header.eg-header .eg-topbar {
  background-color: #2b561d !important;
  color: #ffffff !important;
  padding: 0.5rem 5%;
}

/* Make absolutely everything in the bar white */
header.eg-header .eg-topbar,
header.eg-header .eg-topbar * {
  color: #ffffff !important;
  background-color: transparent !important;
}

/* All link states */
header.eg-header .eg-topbar a,
header.eg-header .eg-topbar a:link,
header.eg-header .eg-topbar a:visited,
header.eg-header .eg-topbar a:hover,
header.eg-header .eg-topbar a:active {
  color: #ffffff !important;
  text-decoration: none;
}

/* Optional softer hover colour */
header.eg-header .eg-topbar a:hover {
  color: #e3f2dd !important;
  text-decoration: underline;
}

/* --- Make the entire header green with white text --- */

/* Main header bar (logo + nav) */
.eg-main-header {
  background-color: #2b561d !important;
  color: #ffffff !important;
}

/* Logo text colours */
.eg-main-header .eg-logo-text,
.eg-main-header .eg-logo-sub {
  color: #ffffff !important;
}

/* Navigation links: all states white */
.eg-main-header .eg-nav-list > li > a,
.eg-main-header .eg-nav-list > li > a:link,
.eg-main-header .eg-nav-list > li > a:visited,
.eg-main-header .eg-nav-list > li > a:hover,
.eg-main-header .eg-nav-list > li > a:active {
  color: #ffffff !important;
}

/* Underline / highlight on hover with a lighter strip */
.eg-main-header .eg-nav-list > li > a::after {
  background: #e3f2dd !important;
}
/* Reset page margin so no white band around the top bar */
html, body {
  margin: 0;
  padding: 0;
}

/* Make sure the header + topbar actually paint full width in green */
header.eg-header {
  display: block;
  margin: 0;
  padding: 0;
}

header.eg-header .eg-topbar {
  display: flex;
  width: 100%;
  background-color: #2b561d !important;
  color: #ffffff !important;
}

/* Just in case anything gave the left side a background */
header.eg-header .eg-topbar-left {
  background-color: transparent !important;
}

.eg-topbar-icon {
  vertical-align: middle;
  margin-right: 4px;
}

/* Fix top bar layout so EN/HU stays on screen */
.eg-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 5%;
  background-color: #2b561d;
  color: #ffffff;
  box-sizing: border-box;
  flex-wrap: wrap; /* allow wrapping if tight */
}

/* Let the left section shrink/wrap instead of pushing right off-screen */
.eg-topbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;        /* key: allow it to shrink */
}

/* Keep EN / HU aligned to the right but within the bar */
.eg-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;   /* push to the right edge, but not off-screen */
}