/* ========== HEADER BASE ========== */
/* Using !important to override conflicting legacy styles from style.css */
header.header-full {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 9999 !important;
  padding: 0 30px;
  background: transparent;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.header-full.transparent:not(.header-scrolled) {
  background: transparent;
}

.header-full.header-scrolled {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-full:not(.transparent) {
  background: #fff;
}

header.header-full .header-inner {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  max-width: 1400px;
  margin: 0 auto;
  padding: 15px 0;
}

#logo img {
  display: block;
}

/* ========== DESKTOP MENU ========== */
.desktop-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.desktop-menu > li {
  position: relative;
  padding: 10px 18px;
}

.desktop-menu > li > a {
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  font-family: 'Roboto', sans-serif;
  transition: color 0.2s ease;
}

/* Transparent header - white text */
.header-full.transparent:not(.header-scrolled) .desktop-menu > li > a {
  color: #fff;
}

.header-full.transparent:not(.header-scrolled) .desktop-menu > li > a:hover {
  color: #CC181F;
}

/* Scrolled or non-transparent - dark text */
.header-full.header-scrolled .desktop-menu > li > a,
.header-full:not(.transparent) .desktop-menu > li > a {
  color: #404135;
}

.header-full.header-scrolled .desktop-menu > li > a:hover,
.header-full:not(.transparent) .desktop-menu > li > a:hover {
  color: #CC181F;
}

/* ========== DESKTOP SUBMENU ========== */
.desktop-menu > li.has-submenu > .submenu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  padding: 10px 0;
  margin-top: 15px;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9999;
}

.desktop-menu > li.has-submenu > .submenu::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid #fff;
}

.desktop-menu > li.has-submenu > .submenu::after {
  content: "";
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 20px;
}

.desktop-menu > li.has-submenu:hover > .submenu {
  opacity: 1;
  visibility: visible;
  margin-top: 5px;
}

.desktop-menu > li.has-submenu > .submenu li {
  padding: 0;
}

.desktop-menu > li.has-submenu > .submenu li a {
  display: block;
  padding: 12px 20px;
  color: #404135;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}

.desktop-menu > li.has-submenu > .submenu li a:hover {
  color: #CC181F;
  background: #fff5f5;
  border-left-color: #CC181F;
}

/* ========== HEADER RIGHT ========== */
.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.h-phone {
  font-size: 15px;
  font-weight: 600;
  font-family: 'Roboto', sans-serif;
}

.h-phone span {
  display: block;
  font-size: 12px;
  font-weight: 400;
  opacity: 0.8;
}

/* Phone text color based on header state */
.header-full.transparent:not(.header-scrolled) .h-phone,
.header-full.transparent:not(.header-scrolled) .h-phone span {
  color: #fff;
}

.header-full.header-scrolled .h-phone,
.header-full:not(.transparent) .h-phone {
  color: #404135;
}

.header-full.header-scrolled .h-phone span,
.header-full:not(.transparent) .h-phone span {
  color: #666;
}

/* Contact button */
.btn-contact {
  display: inline-block;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Roboto', sans-serif;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.header-full.transparent:not(.header-scrolled) .btn-contact {
  color: #fff;
  border: 1px solid #fff;
  background: transparent;
}

.header-full.transparent:not(.header-scrolled) .btn-contact:hover {
  background: #CC181F;
  border-color: #CC181F;
  color: #fff;
}

.header-full.header-scrolled .btn-contact,
.header-full:not(.transparent) .btn-contact {
  color: #404135;
  border: 1px solid #404135;
  background: transparent;
}

.header-full.header-scrolled .btn-contact:hover,
.header-full:not(.transparent) .btn-contact:hover {
  background: #CC181F;
  border-color: #CC181F;
  color: #fff;
}

/* ========== MOBILE MENU BUTTON ========== */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #404135;
  margin: 3px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.header-full.transparent:not(.header-scrolled) .mobile-menu-btn span {
  background-color: #fff;
}

.mobile-menu-btn.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.open span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.open span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ========== MOBILE DRAWER OVERLAY ========== */
.mobile-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 9998;
}

.mobile-drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* ========== MOBILE DRAWER ========== */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: -100%;
  width: 85%;
  max-width: 320px;
  height: 100%;
  background: #fff;
  z-index: 9999;
  transition: left 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.mobile-drawer.open {
  left: 0;
}

.mobile-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  background: #fff;
}

.mobile-drawer-header img {
  max-height: 40px;
  width: auto;
}

.mobile-drawer-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  color: #404135;
  cursor: pointer;
  transition: background 0.2s ease;
}

.mobile-drawer-close:hover {
  background: #eee;
}

/* ========== MOBILE MENU ========== */
.mobile-menu {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
  margin: 0;
  list-style: none;
}

.mobile-menu > li {
  border-bottom: 1px solid #f0f0f0;
}

.mobile-menu > li:last-child {
  border-bottom: none;
}

.mobile-menu-item-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-menu-item-wrapper a {
  flex: 1;
  padding: 15px 20px;
  color: #404135;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.mobile-menu-item-wrapper a:hover {
  color: #CC181F;
  background: #fafafa;
}

.submenu-toggle {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-left: 1px solid #f0f0f0;
  cursor: pointer;
}

.toggle-icon {
  font-size: 20px;
  color: #666;
  transition: transform 0.3s ease;
}

.toggle-icon.open {
  transform: rotate(45deg);
}

/* ========== MOBILE SUBMENU ========== */
.mobile-submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: #f9f9f9;
}

.mobile-submenu.open {
  max-height: 500px;
}

.mobile-submenu li {
  border-bottom: 1px solid #eee;
}

.mobile-submenu li:last-child {
  border-bottom: none;
}

.mobile-submenu li a {
  display: block;
  padding: 12px 20px 12px 35px;
  color: #666;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.mobile-submenu li a:hover {
  color: #CC181F;
  background: #f0f0f0;
}

/* ========== MOBILE DRAWER FOOTER ========== */
.mobile-drawer-footer {
  padding: 20px;
  border-top: 1px solid #eee;
  background: #fafafa;
}

.mobile-phone {
  margin-bottom: 15px;
  text-align: center;
}

.mobile-phone span {
  display: block;
  font-size: 12px;
  color: #999;
  margin-bottom: 5px;
}

.mobile-phone a {
  font-size: 18px;
  font-weight: 600;
  color: #404135;
  text-decoration: none;
}

.mobile-drawer-footer .btn-main {
  display: block;
  width: 100%;
  padding: 12px 20px;
  background: #CC181F;
  color: #fff;
  text-align: center;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  transition: background 0.2s ease;
}

.mobile-drawer-footer .btn-main:hover {
  background: #a81419;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 991px) {
  .desktop-menu {
    display: none !important;
  }

  .h-phone {
    display: none !important;
  }

  .btn-contact {
    display: none !important;
  }

  .mobile-menu-btn {
    display: flex !important;
  }

  .header-full {
    padding: 0 15px;
  }
}

@media (min-width: 992px) {
  .mobile-menu-btn {
    display: none !important;
  }

  .mobile-drawer,
  .mobile-drawer-overlay {
    display: none !important;
  }
}
