/* ============================================================
   FINKI – HEADER: топбар, главно мени, mega menu, burger
   (извадено од main.css без промени во правилата или редоследот)
   ============================================================ */

/* ============================================================
   HEADER & MAIN MENU
   ============================================================ */

.site-header {
  background: transparent;
  position: sticky;
  /* top: 0;  ако треба header да "лепи" горе, раскоментирај */
  z-index: 100;
}

/* важно: да не се сече mega dropdown */
.site-header,
.site-header .container,
.header-inner {
  overflow: visible;
}

/* тргни било какви псевдо-ленти под логото */
.site-header::before,
.site-header::after {
  content: none;
}

/* белата .container во header-от транспарентна */
.site-header .container {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* внатрешен layout */

.header-inner {
  padding: 0.75rem 0; /* 12px */
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-branding {
  display: flex;
  align-items: center;
}

.site-logo-img {
  max-height: 4.0625rem; /* 65px */
  width: auto;
  display: block;
  padding-left: 0.3125rem; /* 5px */
}

.site-title-text {
  font-size: 1.25rem; /* 20px */
  font-weight: 600;
  color: #ffffff;
}

.main-nav {
  display: flex;
  background: transparent !important;
}

/* MAIN MENU – според style guide: Fira Sans Medium, letter-spacing */
.main-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem; /* 24px approx */
  background: transparent !important;
}

.main-menu > li > a {
  font-family: "Fira Sans", sans-serif;
  font-weight: 500;              /* Fira Sans Medium приближно */
  font-size: 1rem;               /* 16px */
  letter-spacing: 0.2em;         /* character spacing ~200 */
  text-transform: uppercase;
  color: #ffffff;                /* бело (по дизајнот на header-от) */
  text-decoration: none;
  background: transparent !important;
}

.main-menu > li > a:hover {
  text-decoration: underline;
}

/* ============================================================
   MEGA MENU (DESKTOP) – centered + wider
   Работи со WordPress .sub-menu структура
   ============================================================ */
@media (min-width: 901px) {

  /* nav wrapper да биде позиционирачки контекст */
  .main-nav {
    position: relative;
    overflow: visible; /* важно за dropdown да не се сече */
  }

  /* parent li да не го лимитира submenu-то */
  .main-menu > li.menu-item-has-children {
    position: static;
  }

  /* подмени скриено по default (за да немаш „лист“ под менито) */
  .main-menu .sub-menu {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  /* MEGA PANEL */
  .main-menu > li.menu-item-has-children > .sub-menu {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%);

    width: min(90vw, 1200px);   /* <-- ширина (смени на 1400/1688 ако сакаш) */
    max-width: 1688px;

    background: #ffffff;
    color: #111;
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0,0,0,.12);

    padding: 18px 20px;
    z-index: 9999;

    /* mega layout */
    display: none;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 14px 22px;
    align-items: start;
  }

  /* show on hover + keyboard */
  .main-menu > li.menu-item-has-children:hover > .sub-menu,
  .main-menu > li.menu-item-has-children:focus-within > .sub-menu {
    display: grid;
  }

  /* линкови во dropdown */
  .main-menu > li > .sub-menu a {
    display: block;
    padding: 8px 10px;
    border-radius: 10px;
    color: #111;
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 0;
    text-transform: none;
    font-weight: 500;
  }

  .main-menu > li > .sub-menu a:hover {
    background: rgba(43,146,208,.10);
    text-decoration: none;
  }

  /* ако има „наслови“ во mega (прво ниво во sub-menu) */
  .main-menu > li > .sub-menu > li > a {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 6px;
  }

  /* ако sub-sub-menu е листа под секој наслов */
  .main-menu > li > .sub-menu > li > .sub-menu {
    display: block; /* мора да е visible внатре во mega */
    margin-top: 6px;
  }

  .main-menu > li > .sub-menu > li > .sub-menu > li + li {
    margin-top: 2px;
  }
}

/* ============================================================
   TOP BAR
   ============================================================ */

.topbar {
  height: 2.8125rem;            /* 45px */
  font-family: "Fira Sans", sans-serif;
  font-weight: 300;             /* Light */
  font-size: 0.8125rem;         /* 13px */
  letter-spacing: 0.05em;       /* character spacing ~50 */
  color: #ffffff;
  background: transparent;      /* градиентот е на ::before во .topbar-inner */
}

.topbar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;    /* турка кон десно */
  gap: 1.5rem;
  position: relative;
  padding-right: 1.25rem;
}

/* Градиент правоаголник залепен десно */
.topbar-inner::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 40rem;                 /* 640px approx, флуидно не е критично тука */
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(43, 146, 208, 1) 0%,
    rgba(44, 49, 121, 1) 100%
  );
  z-index: -1;
}

.topbar-nav {
  display: flex;
}

.topbar-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
}

.topbar-menu > li > a {
  color: #ffffff;
  text-decoration: none;
  opacity: 0.9;
  font-weight: 300;
  font-size: 1em;
}

.topbar-menu > li > a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Right side: language + search */

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 300;
  font-size: 1em;
}

.lang {
  color: #ffffff;
  text-decoration: none;
  opacity: 0.7;
}

.lang--active {
  opacity: 1;
}

.lang:hover {
  opacity: 1;
  text-decoration: underline;
}

.lang-separator {
  opacity: 0.6;
}

.topbar-search {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.25em;
  cursor: pointer;
  padding: 0;
}

.lang-icon {
  width: 1.5625rem;  /* 25px */
  height: 1.5625rem;
}

.login-icon {
  width: 1.4375rem;  /* 23px */
  height: 1.4375rem;
}

/* TOPBAR – MOBILE */

@media (max-width: 900px) {
  .topbar-inner {
    justify-content: space-between;
    padding-right: 0.625rem;
    padding-left: 0.625rem;
    gap: 0.5rem;
	width: 100%;
  }

/*	TOP BAROT AKO SAKAME DA BIDE VO CENTAR KAKO DRUGITE ELEMENTI
  .topbar-inner::before {
    width: 100%;
  }
*/

  .topbar-menu {
    gap: 0.625rem;
    font-size: 0.9em;
    flex-wrap: wrap;
  }

  .topbar-actions {
    gap: 0.625rem;
  }
}

/* ============================================================
   BURGER / MOBILE MENU
   ============================================================ */

.nav-toggle {
  display: none; /* ќе биде visible само на мобилен */
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 1.375rem; /* 22px */
  height: 0.125rem;
  background: #2c3179;
  margin: 0.25rem 0;
}

@media (max-width: 900px) {

  .main-nav {
    position: absolute;
    right: 0;
    top: 100%;
    background: #2c3179;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease-out;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }

  .main-nav.is-open {
    max-height: 25rem; /* доволно за неколку линкови */
  }

  .main-menu {
    flex-direction: column;
    padding: 0.75rem 1rem 1rem;
    gap: 0.75rem;
  }

  .main-menu > li > a {
    font-size: 0.9rem;
    letter-spacing: 0.16em;
  }

  /* на мобилен: подмени да се листа, не mega */
  .main-menu .sub-menu {
    display: block;
    padding-left: 14px;
    margin-top: 8px;
  }

  .main-menu .sub-menu a {
    color: #fff;
    opacity: .95;
    font-size: .9rem;
    letter-spacing: 0;
    text-transform: none;
    padding: 6px 0;
    display: block;
  }

  .nav-toggle {
    display: block;
  }

  .site-logo-img {
    max-height: 3.125rem; /* 50px */
  }
}

