/* FORCE HEADER CONSISTENCY */
.main-nav,
.main-nav * {
  font-weight: 400;
}

.nav-menu > a,
.nav-item > a {
  font-weight: 600; /* your intended menu weight */
}

.brand-text strong {
  font-weight: 900;
}

.header-tools{
  display:flex;
  align-items:center;
  gap:10px;
  flex:0 0 auto;
}

.header-tools .lang-switcher{
  margin-top:0;
}

.header-contact-link{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  border:1px solid rgba(0,0,0,.1);
  border-radius:14px;
  color:#2c2823;
  background:linear-gradient(180deg, #fff, #fff8ef);
  box-shadow:0 6px 14px rgba(0,0,0,.05);
  transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease, color .22s ease;
  animation:headerMailPulse 3.2s ease-in-out infinite;
}

.header-contact-link svg{
  width:21px;
  height:21px;
  transform-origin:center;
  animation:headerMailWiggle 3.2s ease-in-out infinite;
}

.header-contact-link:hover,
.header-contact-link:focus-visible{
  color:#e64b14;
  border-color:rgba(255,90,31,.28);
  box-shadow:0 10px 22px rgba(255,90,31,.13);
  transform:translateY(-1px);
  outline:none;
}

.header-contact-link:hover svg,
.header-contact-link:focus-visible svg{
  animation-duration:1.05s;
}

@keyframes headerMailWiggle{
  0%, 80%, 100%{ transform:rotate(0deg) scale(1); }
  84%{ transform:rotate(-8deg) scale(1.04); }
  88%{ transform:rotate(8deg) scale(1.04); }
  92%{ transform:rotate(-5deg) scale(1.02); }
  96%{ transform:rotate(3deg) scale(1.01); }
}

@keyframes headerMailPulse{
  0%, 78%, 100%{ box-shadow:0 6px 14px rgba(0,0,0,.05); }
  86%{ box-shadow:0 8px 20px rgba(255,90,31,.16); }
}

.simple-dropdown{
  width:220px;
  display:block;
  grid-template-columns:none;
  gap:0;
  padding:10px;
}

.simple-dropdown > a{
  display:block;
  padding:11px 12px;
  border-radius:10px;
  color:#3b3328;
  font-size:14px;
  font-weight:700;
  transition:all .2s ease;
}

.simple-dropdown > a:hover{
  color:#1f1f1f;
  background:linear-gradient(135deg, rgba(198,165,92,.22), rgba(198,165,92,.10));
  box-shadow:inset 0 0 0 1px rgba(198,165,92,.18);
  transform:translateX(4px);
}

.has-dropdown.open > .dropdown{
  opacity:1;
  visibility:visible;
  transform:translateY(0) scale(1);
}

.nav-menu > a.is-active,
.nav-item.is-active > a{
  color:#e64b14;
  background:transparent;
  box-shadow:none;
}

.nav-menu > a.is-active:hover,
.nav-item.is-active:hover > a{
  color:#e64b14;
  background:transparent;
  box-shadow:none;
}

.nav-menu > a.is-active::before,
.nav-item.is-active > a::before{
  transform:scaleX(1);
}

.simple-dropdown > a.is-active,
.mega-col a.is-active{
  color:#e64b14;
  background:transparent;
  box-shadow:none;
  text-decoration:underline;
  text-decoration-color:rgba(230,75,20,.45);
  text-underline-offset:4px;
  text-decoration-thickness:2px;
}

.simple-dropdown > a.is-active:hover,
.mega-col a.is-active:hover{
  color:#e64b14;
  background:transparent;
  box-shadow:none;
}

.mega-col.is-active h4{
  color:#e64b14;
  border-bottom-color:rgba(255,90,31,.22);
}

@media (min-width: 1101px){
  .nav-menu > a,
  .nav-menu > .nav-item{
    position:relative;
  }

  .nav-menu > a:not(:last-child)::after,
  .nav-menu > .nav-item:not(:last-child)::after{
    content:"";
    position:absolute;
    top:50%;
    right:-1px;
    width:1px;
    height:22px;
    background:rgba(40,40,40,.22);
    transform:translateY(-50%);
    pointer-events:none;
    z-index:2;
  }
}

.dropdown.mega-menu{
  width:min(980px, calc(100vw - 32px));
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:0;
  padding:18px;
  border-radius:22px;
  background:
    linear-gradient(180deg, rgba(255,253,248,.98), rgba(255,255,255,.98)),
    radial-gradient(circle at 15% 0%, rgba(224,177,74,.14), transparent 34%);
  border:1px solid rgba(127,103,52,.16);
  box-shadow:0 28px 72px rgba(38,31,21,.14), 0 8px 24px rgba(38,31,21,.08);
}

.nav-item.dropdown-align-right > .dropdown.mega-menu{
  right:0;
  left:auto;
}

.mega-col{
  min-width:0;
  padding:12px 16px 14px;
  border-right:1px solid rgba(127,103,52,.12);
}

.mega-col:last-child{
  border-right:0;
}

.mega-col h4{
  margin:0 0 10px;
  padding:0 0 10px;
  border-bottom:1px solid rgba(127,103,52,.16);
  color:#7a6030;
  font-size:.76rem;
  font-weight:900;
  line-height:1.25;
  letter-spacing:0;
  text-transform:uppercase;
}

.mega-col a{
  position:relative;
  display:flex;
  align-items:center;
  min-height:36px;
  margin:2px 0;
  padding:9px 28px 9px 12px;
  border-radius:12px;
  color:#312b24;
  font-size:.88rem;
  font-weight:700;
  line-height:1.25;
  transition:background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.mega-col a::after{
  content:">";
  position:absolute;
  right:12px;
  color:#c69a3d;
  opacity:0;
  transform:translateX(-3px);
  transition:opacity .2s ease, transform .2s ease;
}

.mega-col a:hover,
.mega-col a:focus-visible{
  color:#17130f;
  background:linear-gradient(135deg, rgba(198,165,92,.18), rgba(255,90,31,.07));
  box-shadow:inset 0 0 0 1px rgba(198,165,92,.18);
  transform:translateX(3px);
  outline:none;
}

.mega-col a:hover::after,
.mega-col a:focus-visible::after{
  opacity:1;
  transform:translateX(0);
}

.mega-col .mega-menu-section-title {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  min-height: 0 !important;
  padding: 9px 12px !important;
  margin: 0 0 10px !important;
  border-radius: 14px !important;
  background:
    linear-gradient(135deg, rgba(247,210,122,.28), rgba(255,248,232,.88)) !important;
  border: 1px solid rgba(142,108,45,.16) !important;
  box-shadow: none !important;
  color: #8e5f17 !important;
  font-size: .78rem !important;
  font-weight: 900 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  line-height: 1.2 !important;
  transform: none !important;
}

.mega-col .mega-menu-section-title::after {
  content: none !important;
  display: none !important;
}

.mega-col .mega-menu-section-title:hover,
.mega-col .mega-menu-section-title:focus-visible {
  background:
    linear-gradient(135deg, rgba(247,210,122,.42), rgba(255,248,232,.96)) !important;
  color: #5c3a12 !important;
  border-color: rgba(157,84,21,.24) !important;
  transform: none !important;
}

.site-lang-form {
  margin: 0;
  display: inline-flex;
  align-items: center;
}

@media (max-width: 1440px){
  .nav-inner{
    min-height:78px;
    gap:14px;
  }

  .brand{
    gap:10px;
  }

  .brand-icon{
    width:38px;
    height:38px;
  }

  .brand-text strong{
    font-size:1.22rem;
  }

  .brand-sub{
    font-size:.78rem;
  }

  .nav-right{
    gap:10px;
  }

  .nav-menu{
    gap:0;
  }

  .nav-menu > a,
  .nav-item > a{
    min-height:40px;
    padding:0 8px;
    font-size:.88rem;
  }

  .lang-switcher{
    min-height:40px;
    padding:0 10px;
    border-radius:12px;
    font-size:.88rem;
  }

  .header-contact-link{
    width:40px;
    height:40px;
    border-radius:12px;
  }

  .dropdown.mega-menu{
    width:min(920px, calc(100vw - 28px));
    padding:15px;
  }
}

@media (max-width: 1280px){
  .nav-inner{
    min-height:72px;
    gap:10px;
  }

  .brand-text strong{
    font-size:1.08rem;
  }

  .brand-sub{
    display:none;
  }

  .nav-right{
    gap:8px;
  }

  .nav-menu > a,
  .nav-item > a{
    min-height:38px;
    padding:0 6px;
    font-size:.82rem;
  }

  .dropdown.mega-menu{
    width:min(880px, calc(100vw - 24px));
    grid-template-columns:repeat(4, minmax(0, 1fr));
  }

  .mega-col{
    padding:10px 12px 12px;
  }

  .mega-col a{
    font-size:.82rem;
    padding:8px 24px 8px 10px;
  }
}

@media (max-width: 1120px){
  .brand-text{
    max-width:190px;
  }

  .brand-text strong{
    font-size:1rem;
    line-height:1.08;
  }

  .nav-menu > a,
  .nav-item > a{
    padding:0 5px;
    font-size:.78rem;
  }

  .header-tools{
    gap:7px;
  }
}

@media (max-width: 1100px){
  .header-tools{
    margin-top:12px;
    justify-content:flex-start;
  }

  .simple-dropdown{
    width:100%;
  }

  .nav-menu > a.is-active,
  .nav-item.is-active > a{
    color:#e64b14;
    background:transparent;
    box-shadow:none;
  }

  .dropdown.mega-menu{
    width:100%;
    grid-template-columns:1fr;
    padding:12px;
    border-radius:16px;
    box-shadow:none;
  }

  .mega-col{
    padding:10px 8px;
    border-right:0;
    border-bottom:1px solid rgba(127,103,52,.12);
  }

  .mega-col:last-child{
    border-bottom:0;
  }

  .mega-col h4{
    margin-bottom:8px;
    padding-bottom:8px;
  }
}

@media (max-width: 640px){
  .header-contact-link{
    width:38px;
    height:38px;
  }
}

@media (prefers-reduced-motion: reduce){
  .header-contact-link,
  .header-contact-link svg{
    animation:none;
  }
}

/* Public header brand logo fit */
.brand,
.site-brand,
.header-brand,
.public-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-icon {
  width: 44px !important;
  height: 44px !important;
  flex: 0 0 44px !important;
}

.brand-icon img,
.brand img,
.site-brand img,
.header-brand img,
.public-brand img,
.site-logo img,
.brand-logo img {
  width: 44px !important;
  height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
  object-fit: contain !important;
  flex: 0 0 44px !important;
}

.brand-text strong,
.site-brand-title,
.brand-title,
.public-brand-title {
  line-height: 1.02 !important;
  margin: 0 !important;
}

.brand-sub,
.site-brand-subtitle,
.brand-subtitle,
.public-brand-subtitle {
  display: none !important;
}

/* Public header larger logo fit */
.brand-icon img,
.brand img,
.site-brand img,
.header-brand img,
.public-brand img,
.site-logo img,
.brand-logo img,
.site-header__logo img,
.site-header-logo img {
  width: 58px !important;
  height: 58px !important;
  max-width: 58px !important;
  max-height: 58px !important;
  object-fit: contain !important;
  flex: 0 0 58px !important;
}

.brand-icon,
.site-logo,
.brand-logo,
.site-header__logo,
.site-header-logo {
  width: 58px !important;
  height: 58px !important;
  flex: 0 0 58px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.brand,
.site-brand,
.header-brand,
.public-brand,
.site-header__brand {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}
/* Refined public header brand typography */
.brand {
  flex: 0 1 300px !important;
  max-width: 300px !important;
  color: #2b2520 !important;
  text-decoration: none !important;
}

.brand-text {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  line-height: 1.05 !important;
}

.brand-text strong {
  display: block !important;
  color: #2b2520 !important;
  font-size: clamp(1.12rem, 1.32vw, 1.42rem) !important;
  font-weight: 800 !important;
  line-height: 1.04 !important;
  letter-spacing: -0.025em !important;
  margin: 0 !important;
}

.brand-text strong span {
  display: block !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.brand-sub {
  display: block !important;
  max-width: 100% !important;
  margin-top: 2px !important;
  overflow: hidden !important;
  color: rgba(43, 37, 32, .58) !important;
  font-size: .68rem !important;
  font-weight: 500 !important;
  letter-spacing: .015em !important;
  line-height: 1.2 !important;
  text-overflow: ellipsis !important;
  text-transform: none !important;
  white-space: nowrap !important;
}

@media (max-width: 1440px) {
  .brand {
    flex-basis: 260px !important;
    max-width: 260px !important;
  }

  .brand-text strong {
    font-size: clamp(1rem, 1.05vw, 1.18rem) !important;
  }
}

@media (max-width: 1280px) {
  .brand {
    flex-basis: 220px !important;
    max-width: 220px !important;
  }

  .brand-sub {
    display: none !important;
  }
}

@media (max-width: 1100px) {
  .brand {
    flex: 1 1 auto !important;
    max-width: calc(100% - 64px) !important;
  }
}

@media (max-width: 767px) {
  .brand-icon,
  .site-logo,
  .brand-logo,
  .site-header__logo,
  .site-header-logo {
    width: 46px !important;
    height: 46px !important;
    flex: 0 0 46px !important;
  }

  .brand-icon img,
  .brand img,
  .site-brand img,
  .header-brand img,
  .public-brand img,
  .site-logo img,
  .brand-logo img,
  .site-header__logo img,
  .site-header-logo img {
    width: 46px !important;
    height: 46px !important;
    max-width: 46px !important;
    max-height: 46px !important;
  }

  .brand-text strong {
    font-size: 1.05rem !important;
    line-height: 1.06 !important;
  }

  .brand-sub {
    display: none !important;
  }
}
