/*
Theme Name: Adnert
Theme URI: https://yntech.me/adnert
Author: Yehuda Nehari
Author URI: https://yntech.me
Description: A modern, clean, and responsive WordPress theme built with Tailwind CSS.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: adnert
Tags: custom-logo, custom-menu, featured-images, full-width-template, threaded-comments, translation-ready
*/

:root {
  --adnert-primary-color: #ff7b00;
  --adnert-header-bg: #f4f4f4;
  --adnert-header-text: #2f3540;
  --adnert-header-border: #e6e6e6;
}

.adnert-header {
  background-color: var(--adnert-header-bg);
  border-bottom: 1px solid var(--adnert-header-border);
}

.adnert-header .container-main {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.adnert-header__desktop {
  min-height: 116px;
  display: none;
  align-items: center;
  align-content: center;
  flex-wrap: wrap;
  gap: 18px;
}

.adnert-header__brand {
  flex: 0 0 auto;
}

.adnert-header__brand .custom-logo {
  width: auto;
  max-height: 88px;
}

.adnert-header__menu {
  flex: 1 1 auto;
  min-width: 0;
}

.adnert-main-menu {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(8px, 0.8vw, 16px);
  flex-wrap: wrap;
  row-gap: 10px;
  min-width: 0;
}

.adnert-main-menu > li {
  position: relative;
}

.adnert-main-menu > li > a {
  display: inline-block;
  font-size: clamp(12px, 0.74vw, 14px);
  line-height: 1;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--adnert-header-text);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.adnert-main-menu .menu-item-has-children > a {
  padding-right: 14px;
}

.adnert-main-menu .menu-item-has-children > a::after {
  content: "";
  position: absolute;
  right: 0;
  top: 45%;
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.adnert-main-menu .sub-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  z-index: 60;
  min-width: 210px;
  max-width: min(320px, 92vw);
  max-height: min(420px, 70vh);
  overflow-y: auto;
  margin: 0;
  padding: 10px 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--adnert-header-border);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.adnert-main-menu .sub-menu li a {
  display: block;
  padding: 10px 14px;
  color: var(--adnert-header-text);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  white-space: normal;
  overflow-wrap: anywhere;
}

.adnert-main-menu > li:last-child > .sub-menu,
.adnert-main-menu > li:nth-last-child(2) > .sub-menu {
  left: auto;
  right: 0;
}

.adnert-main-menu .sub-menu li a:hover,
.adnert-main-menu .sub-menu li a:focus-visible {
  color: var(--adnert-primary-color);
  background: #fff6ed;
}

.adnert-main-menu > li:hover > .sub-menu,
.adnert-main-menu > li:focus-within > .sub-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.adnert-main-menu > .current-menu-item > a,
.adnert-main-menu > .current-menu-ancestor > a,
.adnert-main-menu > li > a:hover,
.adnert-main-menu > li > a:focus-visible {
  color: var(--adnert-primary-color);
}

.adnert-header__extras {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.adnert-header__select-wrap {
  position: relative;
}

.adnert-header__select {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--adnert-header-text);
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  text-transform: uppercase;
  padding: 8px 18px 8px 0;
  cursor: pointer;
}

.adnert-header__select-wrap::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #6a6f76;
  border-bottom: 2px solid #6a6f76;
  transform: translateY(-64%) rotate(45deg);
  pointer-events: none;
}

.adnert-header__search {
  display: flex;
  align-items: stretch;
  background: #fff;
  border: 1px solid var(--adnert-header-border);
  min-height: 48px;
}

.adnert-header__search-input {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0 14px;
  font-size: 14px;
  color: var(--adnert-header-text);
}

.adnert-header__search-input:focus {
  outline: none;
}

.adnert-header__search-input::placeholder {
  color: #7b8087;
}

.adnert-header__search-button {
  border: 0;
  min-width: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--adnert-primary-color);
  color: #fff;
  cursor: pointer;
}

.adnert-header__mobile {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.adnert-mobile-menu {
  padding-bottom: 16px;
}

.adnert-mobile-menu__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.adnert-mobile-menu__list a {
  color: var(--adnert-header-text);
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
}

.adnert-mobile-menu__meta {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: #70747a;
  text-transform: uppercase;
}

@media (min-width: 1024px) {
  .adnert-header .container-main {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .adnert-header__desktop {
    display: flex;
    margin-left: 0;
    margin-right: 0;
  }

  .adnert-header__extras {
    margin-left: auto;
  }

  .adnert-header__mobile,
  .adnert-mobile-menu {
    display: none !important;
  }
}
