/*
 * VineIsrael site chrome refresh
 * Keeps the existing Listify menu/footer markup and class hooks intact.
 */

:root {
  --vi-forest-950: #102a1a;
  --vi-forest-900: #163722;
  --vi-forest-800: #214b31;
  --vi-forest-700: #2f5b3b;
  --vi-sage-100: #eef5ee;
  --vi-sage-200: #dceadd;
  --vi-gold: #d3a15a;
  --vi-gold-deep: #aa732e;
  --vi-ink: #24352b;
  --vi-cream: #fbfaf7;
}

/* Header: one calm, branded bar on every template. */
.site-header:not(.site-header--transparent) {
  background: var(--vi-forest-900);
}

#masthead .primary-header {
  position: relative;
  min-height: 76px;
  color: #fff;
  background: linear-gradient(135deg, var(--vi-forest-800) 0%, var(--vi-forest-900) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 8px 24px rgba(16, 42, 26, .18);
}

#masthead .primary-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--vi-gold-deep), var(--vi-gold), #e9c98a, var(--vi-gold-deep));
  opacity: .95;
}

#masthead .primary-header > .container {
  max-width: 1200px;
}

#masthead .primary-header .primary-header-inner {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 76px;
  height: 76px;
}

#masthead .site-branding {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
  position: relative;
}

#masthead .site-branding .custom-header {
  display: block;
  margin: 0;
  line-height: 0;
}

#masthead .site-branding .custom-header-image {
  display: block;
  width: auto;
  max-width: 210px;
  max-height: 56px;
  height: auto;
  object-fit: contain;
}

#masthead .site-description {
  display: none;
}

#masthead .primary-header .nav-menu.primary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 auto;
  min-width: 0;
  padding-left: 20px;
}

#masthead .primary-header .nav-menu-container {
  display: block;
  width: 100%;
}

#masthead .primary-header .menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  gap: 4px;
}

#masthead .primary-header .menu > li {
  display: block;
  position: relative;
  margin: 0;
}

#masthead .primary-header .menu > li > a {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 44px;
  margin: 0 !important;
  padding: 11px 12px 11px 35px !important;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #f8fcf8;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: .01em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

#masthead .primary-header .menu > li[class^="ion-"]::before {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 12px;
  display: inline-block;
  margin: 0;
  color: #e2bc78;
  font-size: 18px;
  line-height: 1;
  transform: translateY(-50%);
  pointer-events: none;
}

#masthead .primary-header .menu > li.nmr-logged-out {
  margin-left: 8px;
}

#masthead .primary-header .menu > li.nmr-logged-out::before {
  display: none;
}

#masthead .primary-header .menu > li.nmr-logged-out > a {
  min-height: 42px;
  padding: 10px 16px !important;
  color: var(--vi-forest-950);
  background: #f4dfbd;
  border-color: rgba(244, 223, 189, .75);
  font-weight: 700;
}

#masthead .primary-header .menu > li.nmr-logged-out > a:hover,
#masthead .primary-header .menu > li.nmr-logged-out > a:focus-visible {
  color: var(--vi-forest-950);
  background: #ffe9c8;
  border-color: #ffe9c8;
  transform: translateY(-1px);
}

#masthead .primary-header .menu > li > a:hover,
#masthead .primary-header .menu > li > a:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .18);
  outline: none;
}

#masthead .primary-header .menu > li.current-menu-item > a,
#masthead .primary-header .menu > li.current_page_item > a,
#masthead .primary-header .menu > li.current-menu-ancestor > a {
  color: #fff;
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .22);
}

#masthead .primary-header .menu > li.menu-item-has-children > a {
  padding-right: 30px !important;
}

#masthead .primary-header .menu > li.menu-item-has-children::after {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 10px;
  display: inline-block;
  margin: 0;
  color: #e2bc78;
  font-size: 14px;
  line-height: 1;
  transform: translateY(-45%);
  pointer-events: none;
}

/* Desktop dropdown: readable, compact and aligned to the parent item. */
@media (min-width: 992px) {
  #masthead .primary-header .menu > li > .sub-menu {
    top: calc(100% + 7px);
    right: auto;
    left: -8px;
    width: auto !important;
    min-width: 248px !important;
    padding: 9px;
    overflow: hidden;
    border: 1px solid rgba(33, 75, 49, .12);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(16, 42, 26, .18);
  }

  #masthead .primary-header .menu > li:hover > .sub-menu,
  #masthead .primary-header .menu > li:focus-within > .sub-menu {
    display: block;
  }

  #masthead .primary-header .menu > li > .sub-menu::before,
  #masthead .primary-header .menu > li > .sub-menu::after {
    display: none;
  }

  #masthead .primary-header .menu > li > .sub-menu > li {
    display: block;
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0 !important;
  }

  #masthead .primary-header .menu > li > .sub-menu > li > a {
    display: flex;
    align-items: center;
    min-height: 42px;
    margin: 0 !important;
    padding: 10px 12px 10px 37px !important;
    border-radius: 10px;
    color: var(--vi-forest-800);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    transition: background-color .18s ease, color .18s ease, transform .18s ease;
  }

  #masthead .primary-header .menu > li > .sub-menu > li[class^="ion-"]::before {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 12px;
    display: inline-block;
    margin: 0;
    color: var(--vi-gold-deep);
    font-size: 17px;
    line-height: 1;
    transform: translateY(-50%);
    pointer-events: none;
  }

  #masthead .primary-header .menu > li > .sub-menu > li > a:hover,
  #masthead .primary-header .menu > li > .sub-menu > li > a:focus-visible {
    color: var(--vi-forest-950);
    background: var(--vi-sage-100);
    outline: none;
    transform: translateX(2px);
  }
}

/* Search overlay follows the same palette when it is opened. */
#masthead .search-overlay {
  background: var(--vi-forest-900);
}

#masthead .search-overlay .search-field {
  min-height: 44px;
  color: #fff;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
}

#masthead .search-overlay .search-field::placeholder {
  color: rgba(255, 255, 255, .75);
}

#masthead .search-overlay .search-overlay-toggle {
  color: #fff;
}

/* The Listify mobile menu keeps its original toggle and wrapper classes. */
@media (max-width: 991px) {
  #masthead .primary-header {
    min-height: 68px;
  }

  #masthead .primary-header > .container {
    padding-right: 18px;
    padding-left: 18px;
  }

  #masthead .primary-header .primary-header-inner {
    min-height: 68px;
    height: 68px;
  }

  #masthead .site-branding .custom-header-image {
    max-width: 186px;
    max-height: 56px;
  }

  #masthead .primary-header .nav-menu.primary {
    display: none;
  }

  #site-navigation {
    z-index: 50;
    min-height: 47px;
    background: var(--vi-forest-950);
    border-top: 1px solid rgba(255, 255, 255, .08);
  }

  #site-navigation > .container {
    padding-right: 18px;
    padding-left: 18px;
  }

  #site-navigation .navigation-bar-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 47px;
    padding: 10px 0;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .1em;
    line-height: 1;
    text-transform: uppercase;
  }

  #site-navigation .navigation-bar-toggle i {
    margin-right: 8px;
    color: #e2bc78;
    font-size: 24px;
  }

  #site-navigation .navigation-bar-toggle.active {
    color: #f4dfbd;
  }

  #site-navigation .navigation-bar-wrapper {
    top: 100%;
    right: 12px;
    left: 12px;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(33, 75, 49, .12);
    border-top: 0;
    border-radius: 0 0 18px 18px;
    background: #fff;
    box-shadow: 0 18px 38px rgba(16, 42, 26, .2);
  }

  #site-navigation .navigation-bar-wrapper .nav-menu {
    padding: 8px 16px 14px;
    border: 0;
  }

  #site-navigation .navigation-bar-wrapper .menu {
    display: block;
    width: 100%;
  }

  #site-navigation .navigation-bar-wrapper .menu > li {
    display: block;
    position: relative;
    margin: 0;
    border-bottom: 1px solid #e4eee4;
  }

  #site-navigation .navigation-bar-wrapper .menu > li:last-child {
    border-bottom: 0;
  }

  #site-navigation .navigation-bar-wrapper .menu > li > a {
    display: block;
    min-height: 46px;
    margin: 0 !important;
    padding: 14px 42px 14px 37px !important;
    border-radius: 10px;
    color: var(--vi-forest-800);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
  }

  #site-navigation .navigation-bar-wrapper .menu > li[class^="ion-"]::before {
    position: absolute;
    z-index: 2;
    top: 23px;
    left: 7px;
    display: inline-block;
    margin: 0;
    color: var(--vi-gold-deep);
    font-size: 18px;
    line-height: 1;
    transform: translateY(-50%);
    pointer-events: none;
  }

  #site-navigation .navigation-bar-wrapper .menu > li.menu-item-has-children > a {
    padding-right: 46px !important;
  }

  #site-navigation .navigation-bar-wrapper .menu > li.menu-item-has-children::after {
    position: absolute;
    z-index: 2;
    top: 23px;
    right: 12px;
    display: inline-block;
    margin: 0;
    color: var(--vi-gold-deep);
    font-size: 14px;
    line-height: 1;
    transform: translateY(-50%);
    transition: transform .18s ease;
    pointer-events: none;
  }

  #site-navigation .navigation-bar-wrapper .menu > li.is-open.menu-item-has-children::after {
    transform: translateY(-50%) rotate(180deg);
  }

  #site-navigation .navigation-bar-wrapper .menu > li > a:hover,
  #site-navigation .navigation-bar-wrapper .menu > li > a:focus-visible {
    color: var(--vi-forest-950);
    background: var(--vi-sage-100);
    outline: none;
  }

  #site-navigation .navigation-bar-wrapper .menu > li.nmr-logged-out {
    margin-top: 10px;
    border-bottom: 0;
  }

  #site-navigation .navigation-bar-wrapper .menu > li.nmr-logged-out > a {
    min-height: 44px;
    padding: 13px 16px !important;
    color: var(--vi-forest-950);
    background: #f4dfbd;
    text-align: center;
  }

  #site-navigation .navigation-bar-wrapper .menu > li > .sub-menu {
    display: none;
    position: static !important;
    width: auto !important;
    min-width: 0 !important;
    max-height: none;
    margin: 0 0 9px 20px;
    padding: 4px 0 8px 16px !important;
    overflow: visible;
    border: 0;
    border-left: 1px solid #c9ddcb;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  #site-navigation .navigation-bar-wrapper .menu > li.is-open > .sub-menu {
    display: block;
  }

  #site-navigation .navigation-bar-wrapper .menu > li > .sub-menu::before,
  #site-navigation .navigation-bar-wrapper .menu > li > .sub-menu::after {
    display: none;
  }

  #site-navigation .navigation-bar-wrapper .menu > li > .sub-menu > li {
    display: block;
    position: relative;
    margin: 0;
    padding: 0 !important;
    border: 0;
  }

  #site-navigation .navigation-bar-wrapper .menu > li > .sub-menu > li > a {
    display: block;
    min-height: 38px;
    margin: 0 !important;
    padding: 9px 10px 9px 33px !important;
    border-radius: 8px;
    color: var(--vi-forest-800);
    font-size: 14px;
    line-height: 1.3;
  }

  #site-navigation .navigation-bar-wrapper .menu > li > .sub-menu > li[class^="ion-"]::before {
    position: absolute;
    z-index: 2;
    top: 19px;
    left: 8px;
    display: inline-block;
    margin: 0;
    color: var(--vi-gold-deep);
    font-size: 16px;
    line-height: 1;
    transform: translateY(-50%);
    pointer-events: none;
  }

  #site-navigation .navigation-bar-wrapper .menu > li > .sub-menu > li > a:hover,
  #site-navigation .navigation-bar-wrapper .menu > li > .sub-menu > li > a:focus-visible {
    color: var(--vi-forest-950);
    background: var(--vi-sage-100);
    outline: none;
  }
}

/* Footer: tighter columns, stronger hierarchy, and a cleaner legal bar. */
.site-footer-widgets {
  background: linear-gradient(135deg, var(--vi-forest-800) 0%, var(--vi-forest-900) 100%);
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding: 72px 0 64px;
}

.site-footer-widgets .container {
  max-width: 1200px;
}

.site-footer-widgets .row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .9fr) minmax(0, .9fr);
  gap: 52px;
  margin-right: 0;
  margin-left: 0;
}

.site-footer-widgets .footer-widget-column {
  width: auto;
  max-width: none;
  flex: none;
  margin: 0 !important;
  padding: 0;
}

.site-footer-widgets .footer-widget {
  margin: 0;
}

.site-footer-widgets .textwidget {
  max-width: 420px;
}

.site-footer-widgets .textwidget p {
  margin: 0 0 17px;
  color: rgba(246, 252, 246, .82);
  font-size: 15px;
  line-height: 1.7;
}

.site-footer-widgets .textwidget p:first-child {
  margin-bottom: 21px;
}

.site-footer-widgets .textwidget p:last-child {
  display: inline-flex;
  align-items: center;
  margin-top: 5px;
  margin-bottom: 0;
  padding-top: 12px;
  color: #f4dfbd;
  border-top: 1px solid rgba(226, 188, 120, .55);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.3;
  text-transform: uppercase;
}

.site-footer-widgets .textwidget img {
  display: block;
  width: 200px;
  max-width: 100%;
  height: auto;
}

.site-footer-widgets .footer-widget-title {
  margin: 3px 0 18px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.site-footer-widgets .footer-widget ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.site-footer-widgets .footer-widget li {
  display: flex;
  align-items: flex-start;
  min-height: 25px;
  margin: 0;
  padding: 0;
  line-height: 1.45;
}

.site-footer-widgets .footer-widget li::before {
  display: inline-block;
  flex: 0 0 20px;
  width: 20px;
  margin: 1px 7px 0 0;
  color: #e2bc78;
  font-size: 16px;
  line-height: 1.2;
}

.site-footer-widgets .footer-widget li:not([class^="ion-"]) {
  padding-left: 27px;
}

.site-footer-widgets .footer-widget a {
  color: rgba(246, 252, 246, .86);
  font-size: 14px;
  line-height: 1.45;
  text-decoration: none;
  transition: color .18s ease, transform .18s ease;
}

.site-footer-widgets .footer-widget a:hover,
.site-footer-widgets .footer-widget a:focus-visible {
  color: #fff;
  outline: none;
  transform: translateX(2px);
}

.site-footer {
  color: #b8cbbb;
  background: var(--vi-forest-950);
  border-top: 1px solid rgba(255, 255, 255, .09);
  padding: 22px 0;
}

.fixed-map .site-footer {
  opacity: 1;
  background: var(--vi-forest-950);
}

.site-footer > .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-footer .site-info {
  float: none;
  color: #b8cbbb;
  font-size: 13px;
  line-height: 1.6;
}

.site-footer .site-social {
  float: none;
  margin: 0;
}

.site-footer .site-info .nav-menu-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 17px;
  margin: 8px 0 0;
  padding: 0;
}

.site-footer .site-info .nav-menu-legal li {
  display: block;
  margin: 0;
  padding: 0;
}

.site-footer .site-info .nav-menu-legal li::before {
  display: none;
}

.site-footer .site-info .nav-menu-legal a {
  color: #c9dacb;
  font-size: 12px;
  line-height: 1.4;
  text-decoration: none;
}

.site-footer .site-info .nav-menu-legal a:hover,
.site-footer .site-info .nav-menu-legal a:focus-visible {
  color: #fff;
  outline: none;
}

/* The newsletter and accessibility controls remain available without blocking content. */
#open-newsletter-popup {
  right: 22px;
  bottom: 20px;
  min-height: 43px;
  padding: 11px 18px;
  color: #fff;
  background: var(--vi-gold-deep);
  border: 1px solid rgba(255, 232, 194, .45);
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(16, 42, 26, .25);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  transition: background-color .18s ease, transform .18s ease;
}

#open-newsletter-popup:hover,
#open-newsletter-popup:focus-visible {
  background: #bd8134;
  outline: none;
  transform: translateY(-2px);
}

@media (max-width: 767px) {
  .site-footer-widgets {
    padding: 52px 0 42px;
  }

  .site-footer-widgets .row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 34px 24px;
  }

  .site-footer-widgets .footer-widget-column:first-child {
    grid-column: 1 / -1;
  }

  .site-footer-widgets .footer-widget-title {
    margin-bottom: 14px;
    font-size: 11px;
    letter-spacing: .13em;
  }

  .site-footer-widgets .footer-widget a {
    font-size: 13px;
  }

  .site-footer > .container {
    display: block;
    padding-right: 20px;
    padding-left: 20px;
  }

  .site-footer .site-info {
    font-size: 12px;
  }

  .site-footer .site-social {
    margin-top: 12px;
  }

  #open-newsletter-popup {
    right: 14px;
    bottom: 14px;
    min-height: 40px;
    padding: 10px 14px;
    font-size: 12px;
  }
}

@media (max-width: 600px) {
  .site-footer-widgets .row {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .site-footer-widgets .footer-widget-column:first-child {
    grid-column: auto;
  }

  .site-footer-widgets .textwidget {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  #masthead .primary-header .menu > li > a,
  #masthead .primary-header .menu > li > .sub-menu > li > a,
  #site-navigation .navigation-bar-wrapper .menu > li.menu-item-has-children::after,
  .site-footer-widgets .footer-widget a,
  #open-newsletter-popup {
    transition: none;
  }
}
