/* Skip Link (accessibility — visually hidden) */
.skip-link.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  word-wrap: normal !important;
}

.skip-link.screen-reader-text:focus {
  background-color: #1C3D3C;
  color: #fff;
  clip: auto !important;
  display: block;
  font-size: 1em;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* Header Styles */

.main-header {
  background-color: var(--theme-bg);
  transition: box-shadow 0.3s ease;
  font-family: "Poppins", Sans-serif;
  font-size: 16px;
  font-weight: 600;
}

/* ─── Site Header Wrapper (sticky container) ─── */
.site-header-wrapper {
  position: relative;
  z-index: 1000;
  width: 100%;
}

.site-header-wrapper.is-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}

.site-header-wrapper.is-sticky .top-bar {
  display: none;
}

.site-header-wrapper.is-sticky .main-header {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.header-spacer {
  display: none;
}

.header-spacer.active {
  display: block;
}

/* ─── Top Bar ─── */
.top-bar {
  background-color: var(--theme-bg);
  color: var(--theme-text);
  font-size: 0.875rem;
}

.top-bar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0.4rem var(--container-padding);
}

.top-bar a {
  color: var(--theme-text);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.top-bar a:hover {
  color: var(--theme-accent);
  opacity: 1;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.top-bar-email {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.top-bar-right a {
  display: flex;
  align-items: center;
}

.menu li.search-icon a {
  padding: 0;
  width: 32px;
  height: 48px;
}

.menu li.search-icon a span {
  display: block;
  text-indent: -9999px;
}

.call {
  white-space: nowrap;
}

.header-container {
  padding: 0.25rem var(--container-padding);
  display: flex;
  align-items: center;
  margin: 0 auto;
  max-width: 1600px;
  gap: 1rem;
}

.menus-container {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
}

.top-menu-items {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  justify-content: end;
}

.top-menu-items a {
  color: var(--theme-primary);
  padding: 0.75rem;
}

/* Logo Styles */
.header-logo {
  z-index: 99;
  height: 72px;
  color: var(--theme-primary);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.header-logo a {
  display: inline-block;
  height: 100%;
}

.header-logo img {
  height: 100%;
  width: auto;
  max-width: unset;
  vertical-align: middle;
}

.header-logo .site-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--theme-primary);
  letter-spacing: 0.02em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-logo .site-title:hover {
  opacity: 0.85;
}

/* ─── Header Actions (phone button) ─── */
.header-container .header-actions {
  display: flex !important;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.header-container .header-actions a.header-phone,
a.header-phone {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  background: var(--theme-accent-dark) !important;
  color: #ffffff !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  padding: 0.6rem 1.5rem !important;
  border-radius: 2rem !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
  transition: all 0.25s ease !important;
  cursor: pointer !important;
  line-height: 1.2 !important;
}

.header-container .header-actions a.header-phone:hover,
a.header-phone:hover {
  background: #000000 !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
}

.header-container .header-actions a.header-phone:active,
a.header-phone:active {
  transform: translateY(0) !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2) !important;
}

a.header-phone .icon {
  flex-shrink: 0;
  stroke: #ffffff !important;
}

/* ─── Mobile Search Button (hidden on desktop) ─── */
.search-toggle-mobile {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--theme-primary);
  cursor: pointer;
  padding: 0.5rem;
}

/* ─── Search Toggle Button ─── */
.menu-item-search {
  display: flex;
  align-items: center;
  margin-left: 0.5rem;
}

.search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  background: var(--theme-accent-dark);
  border: none;
  border-radius: 2rem;
  cursor: pointer;
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.search-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  background: #000000;
}

.search-toggle:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.search-toggle.active {
  background: #746a54;
}

.search-toggle svg {
  stroke: #ffffff;
}

/* ─── Search Inline (replaces nav when active) ─── */
.header-search-overlay {
  display: none;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.header-container.search-active .header-search-overlay {
  display: flex;
}

.header-container.search-active .menu,
.header-container.search-active .search-toggle,
.header-container.search-active .burger-menu {
  display: none !important;
}

.header-search-form {
  display: flex;
  flex: 1;
  max-width: 600px;
  border-radius: 2rem;
  overflow: hidden;
}

/* Fix: Hide screen-reader-text label in flex container */
.header-search-form .screen-reader-text {
  display: none;
}

.header-search-input {
  flex: 1;
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  border: none;
  background: #ffffff;
  color: #333;
  min-width: 0;
}
.header-search-input:focus-visible {
  outline: 3px solid var(--theme-primary);
  outline-offset: -3px;
}

.header-search-input::placeholder {
  color: #999;
}

.header-search-submit {
  padding: 0.6rem 2rem;
  background: var(--theme-accent-dark);
  color: #ffffff;
  border: none;
  border-left: none;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
  white-space: nowrap;
  line-height: 1.2;
}

.header-search-submit:hover {
  background: #000000;
}

.search-close {
  background: none;
  border: none;
  color: var(--theme-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
  transition: opacity 0.2s ease;
}

.search-close:hover {
  opacity: 0.7;
}

/* Menu Styles */
.menu {
  position: relative;
  display: flex;
  align-items: center;
  z-index: 101;
  justify-content: center;
  flex: 1;
}

.menu span.arrow-down {
  margin-left: 0.25em;
}

.menu ul {
  display: flex;
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.menu li {
  position: relative;
}

.menu li a {
  display: block;
  color: var(--theme-primary);
  text-decoration: none;
  padding: 0.75rem;
  transition: color 0.2s ease-in-out;
}

.menu .submenu li a {
  padding: 0;
}

.menu li a:hover,
.menu .submenu li a:hover {
  color: var(--theme-primary);
}

/* Submenu Styles */
.menu .submenu {
  display: none;
  position: absolute;
  background-color: white;
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.1);
  z-index: 100;
  width: 400px;
  padding: 1rem;
  border-radius: 1rem;
  top: 48px;
  left: 0;
}

.menu li.menu-item-has-children:last-of-type .submenu {
  right: 0;
}

.level-1 {
  display: none;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
}

.menu li:hover>.level-1,
.menu li:focus-within>.level-1 {
  display: flex;
}

.menu li:hover>.level-1>li {
  flex: 1 0 45%;
}

.menu ul .level-2 {
  display: none;
  flex-direction: column;
  padding-left: 0.75rem;
  gap: 0.25rem;
}

.menu li:hover .level-2,
.menu li:focus-within .level-2 {
  display: flex;
}

.menu .submenu li {
  display: block;
  margin: 0;
  padding: 0;
  break-inside: avoid;
}

.menu .submenu li a {
  display: block;
  color: var(--theme-text-body);
}

.mobile-menu-phone,
.mobile-menu-search {
  display: none;
}

.burger-menu {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: var(--theme-accent-dark);
  border-radius: 50%;
  cursor: pointer;
  z-index: 1003;
  position: relative;
  margin-left: auto;
  margin-right: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.25s ease;
}

.burger-menu:hover {
  background: var(--theme-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.burger-menu:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.burger-menu span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #ffffff;
  transition: 0.3s ease-in-out;
  border-radius: 1px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.burger-menu span:first-child {
  top: 13px;
}

.burger-menu span:nth-child(2) {
  top: 21px;
}

.burger-menu span:last-child {
  top: 29px;
}

/* ─── Tablet ─── */
@media (min-width: 769px) and (max-width: 1024px) {
  .header-container {
    padding: 0.25rem 2rem;
  }

  .header-logo {
    height: 56px;
  }

  .header-logo .site-title {
    font-size: 1.5rem;
  }

  .top-bar-container {
    padding: 0.4rem 2rem;
  }
}

/* ─── Mobile ─── */
@media (max-width: 768px) {

  .top-bar {
    display: none;
  }

  .header-logo {
    height: 48px;
  }

  .header-logo .site-title {
    font-size: 1.125rem;
  }

  .header-container .header-actions {
    display: none !important;
  }

  .menu-opened .header-logo {
    z-index: 1003;
  }

  .menu {
    display: none;
  }

  body.menu-opened {
    overflow-y: hidden;
  }

  .top-menu-items {
    display: none;
  }

  .menu-opened .top-menu-items {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: fit-content;
  }

  .header-container {
    padding: 0.25rem var(--container-padding-sm);
  }

  .burger-menu {
    display: flex;
  }

  .menu-opened .main-header {
    background-color: var(--theme-bg);
  }

  .menu-opened .burger-menu {
    background: var(--theme-primary);
  }

  .menu-opened .burger-menu:hover {
    background: var(--theme-accent-dark);
  }

  .menu-opened .burger-menu span:first-child {
    top: 21px;
    transform: translateX(-50%) rotate(45deg);
  }

  .menu-opened .burger-menu span:nth-child(2) {
    opacity: 0;
  }

  .menu-opened .burger-menu span:last-child {
    top: 21px;
    transform: translateX(-50%) rotate(-45deg);
  }

  .menu-opened .menu {
    display: block;
    width: 100%;
    position: fixed;
    z-index: 1002;
    top: var(--mobile-menu-top, 58px);
    bottom: 0;
    left: 0;
    background-color: #ffffff;
    transition: 0.5s;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .menu-opened .menu .menu-item-search {
    display: none;
  }

  .menu-opened .menu ul {
    margin: 0;
    padding: 0;
    flex-direction: column;
  }

  .menu-opened .menu li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }

  .menu-opened .menu li a {
    text-align: center;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--theme-primary);
  }

  .menu-opened .menu li.current-menu-item > a,
  .menu-opened .menu li.current_page_item > a {
    background-color: transparent;
    color: var(--theme-primary);
    font-weight: 700;
  }

  .menu-opened #menu-top-menu {
    margin: 0;
    padding: 0;
    padding-bottom: 0;
  }

  .menu-opened .menu .submenu {
    display: none;
    flex-direction: column;
    position: relative;
    background-color: transparent;
    box-shadow: none;
    z-index: 101;
    padding: 0;
    border-radius: unset;
    top: unset;
    width: 100%;
  }

  .menu-opened .menu li.submenu-open > .submenu,
  .menu-opened .menu li.submenu-open > .level-1 {
    display: flex;
  }

  .menu-opened .menu .submenu li a {
    color: var(--theme-primary);
    font-size: 0.9rem;
    padding: 0.75rem 1.5rem;
  }

  .menu-opened .menu ul .level-2 {
    display: none;
    flex-direction: column;
    padding: 0;
  }

  .menu-opened .menu li.submenu-open > .level-2 {
    display: flex;
  }

  .menu-opened .menu span.arrow-down {
    font-size: 0.6em;
    vertical-align: middle;
    margin-left: 0.3em;
  }

  .menu-opened .mobile-menu-phone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--theme-primary);
    background-color: transparent;
    text-decoration: none;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
  }

  .menu-opened .mobile-menu-phone svg {
    stroke: var(--theme-accent);
    flex-shrink: 0;
  }

  .menu-opened .mobile-menu-search {
    display: block;
  }

  .mobile-search-form {
    display: none;
  }

  .mobile-search-form.search-visible {
    display: block;
    padding: 0.75rem 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background-color: var(--theme-bg);
  }

  .mobile-search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--theme-accent);
    border-radius: 2rem;
    background: #ffffff;
    color: #333;
    box-sizing: border-box;
  }

  .mobile-search-input:focus {
    border-color: var(--theme-accent);
    box-shadow: 0 0 0 2px rgba(136, 123, 99, 0.2);
  }

  .mobile-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    text-align: center;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--theme-primary);
    background: transparent;
    text-decoration: none;
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
  }

  .mobile-search-btn svg {
    stroke: var(--theme-primary);
    flex-shrink: 0;
  }

  .header-container.search-active .burger-menu {
    display: none !important;
  }

  .header-container.search-active .header-search-overlay {
    display: flex;
    flex: 1;
  }

  .header-container.search-active .header-actions {
    display: none !important;
  }

}
