/* ==========================================================================
   Header CSS - Transparent Overlay Header & Responsive Mobile Navigation
   ========================================================================== */

/* Main Header */
.main-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: transparent;
}

.sticky-wrapper {
  width: 100%;
}

.header-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 40px;
  background: transparent;
  transition: all var(--transition-normal);
}

@media (max-width: 991px) {
  .header-wrapper {
    padding: 15px 20px;
  }
}

.main-header.is-sticky .header-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(20, 20, 20, 0.96);
  padding: 10px 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  border-bottom: 2px solid var(--cresta-red);
  animation: slideDown 0.4s ease forwards;
}

@media (max-width: 991px) {
  .main-header.is-sticky .header-wrapper {
    padding: 10px 20px;
  }
}

/* Logo PNG & Brand Title Text Next to Logo */
.logo-header {
  display: flex;
  align-items: center;
}

.logo-header a {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-header img {
  height: 85px;
  width: auto;
  object-fit: contain;
  background: transparent;
  transition: transform var(--transition-fast);
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

.logo-header a:hover img {
  transform: scale(1.08);
}

.brand-title {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  font-family: var(--font-heading);
  text-transform: uppercase;
}

.brand-title .title-yellow {
  color: var(--pollastre-yellow);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.brand-title .title-white {
  color: #ffffff;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

/* Primary Menu */
.primary-menu {
  display: flex;
  align-items: center;
}

.main-menu {
  display: flex;
  align-items: center;
  gap: 24px;
}

.main-menu li {
  position: relative;
}

.main-menu a.x-menu-a-text {
  color: var(--white);
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

@media (max-width: 1200px) {
  .main-menu {
    gap: 16px;
  }
  .main-menu a.x-menu-a-text {
    font-size: 0.82rem;
    letter-spacing: 0.05em;
  }
  .header-wrapper {
    padding: 15px 30px;
  }
  .main-header.is-sticky .header-wrapper {
    padding: 10px 30px;
  }
}

@media (max-width: 1024px) {
  .main-menu {
    gap: 12px;
  }
  .main-menu a.x-menu-a-text {
    font-size: 0.78rem;
    padding: 6px 0;
  }
  .header-wrapper {
    padding: 12px 20px;
  }
  .main-header.is-sticky .header-wrapper {
    padding: 8px 20px;
  }
  .logo-header img {
    height: 70px;
  }
  .brand-title .title-yellow {
    font-size: 1.1rem;
  }
  .brand-title .title-white {
    font-size: 0.95rem;
  }
}

.main-menu a.x-menu-a-text::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--cresta-red);
  transition: width var(--transition-fast);
}

.main-menu li:hover > a.x-menu-a-text::after,
.main-menu li.current-menu-item > a.x-menu-a-text::after {
  width: 100%;
}

.main-menu li.current-menu-item > a.x-menu-a-text {
  color: var(--cresta-red);
}

/* Dropdown Sub-menu */
.x-sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 210px;
  background-color: #1a1a1a;
  border-top: 3px solid var(--cresta-red);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-fast);
  padding: 10px 0;
  z-index: 100;
}

.main-menu li:hover > .x-sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.x-sub-menu li a {
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #dddddd;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.x-sub-menu li a:hover {
  background-color: rgba(211, 47, 47, 0.25);
  color: var(--pollastre-yellow);
  padding-left: 25px;
}

/* Top-Right Phone Reservation Boxes */
.header-customize-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.lang-selector-wrapper {
  margin-bottom: 0;
}

.lang-selector {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 235, 59, 0.4);
  color: var(--pollastre-yellow);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 6px 28px 6px 12px;
  border-radius: 0;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23FFEB3B' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
  transition: all var(--transition-fast);
  min-width: 70px;
  text-align: center;
}

.lang-selector:hover,
.lang-selector:focus {
  background: rgba(211, 47, 47, 0.8);
  border-color: var(--cresta-red);
  color: var(--white);
  outline: none;
}

.lang-selector option {
  background: var(--dark-bg);
  color: var(--white);
  padding: 8px;
}

.reservation-phone {
  font-size: 0.78rem;
  color: var(--white);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.55);
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

@media (max-width: 1024px) {
  .header-customize-wrapper {
    gap: 8px;
  }
  .lang-selector {
    font-size: 0.65rem;
    padding: 5px 24px 5px 10px;
    min-width: 60px;
  }
  .reservation-phone {
    font-size: 0.7rem;
    padding: 5px 12px;
  }
}

.reservation-phone:hover {
  background: var(--cresta-red);
  border-color: var(--cresta-red);
}

.reservation-phone i {
  color: var(--pollastre-yellow);
  font-size: 0.85rem;
}

/* Mobile Header */
.header-mobile {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(20, 20, 20, 0.98);
  backdrop-filter: blur(8px);
  z-index: 1500;
  border-bottom: 2px solid var(--cresta-red);
  padding: 8px 12px;
  box-sizing: border-box;
}

.header-mobile-container-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 100%;
  gap: 8px;
}

.logo-mobile-wrapper {
  flex-shrink: 0;
}

.logo-mobile-wrapper img {
  height: 44px;
  background: transparent;
}

/* Mobile Header Actions (Lang Selector + Toggle) */
.mobile-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mobile-header-actions .lang-selector-wrapper {
  display: block;
}

.mobile-header-actions .lang-selector {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 235, 59, 0.4);
  color: var(--pollastre-yellow);
  font-size: 0.6rem;
  font-weight: 700;
  padding: 4px 22px 4px 8px;
  border-radius: 0;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23FFEB3B' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 5px center;
  background-size: 10px;
  transition: all var(--transition-fast);
  min-width: 52px;
  text-align: center;
  height: 32px;
  box-sizing: border-box;
}

.mobile-header-actions .lang-selector:hover,
.mobile-header-actions .lang-selector:focus {
  background: rgba(211, 47, 47, 0.8);
  border-color: var(--cresta-red);
  color: var(--white);
  outline: none;
}

/* Hamburger Toggle Icon for Mobile */
.toggle-icon {
  width: 40px;
  height: 40px;
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--pollastre-yellow);
  padding: 6px;
  z-index: 1600;
  border-radius: 0;
  flex-shrink: 0;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .header-mobile {
    padding: 6px 10px;
  }
  .logo-mobile-wrapper img {
    height: 38px;
  }
  .mobile-header-actions {
    gap: 6px;
  }
  .mobile-header-actions .lang-selector {
    font-size: 0.55rem;
    padding: 3px 20px 3px 6px;
    min-width: 48px;
    height: 28px;
  }
  .toggle-icon {
    width: 36px;
    height: 36px;
    padding: 5px;
  }
  .toggle-icon span {
    width: 20px;
    height: 2px;
  }
  .toggle-icon::before,
  .toggle-icon::after {
    width: 20px;
    height: 2px;
  }
}

@media (max-width: 360px) {
  .header-mobile {
    padding: 5px 8px;
  }
  .logo-mobile-wrapper img {
    height: 34px;
  }
  .mobile-header-actions .lang-selector {
    min-width: 44px;
    font-size: 0.5rem;
    padding: 3px 18px 3px 5px;
  }
  .toggle-icon {
    width: 32px;
    height: 32px;
  }
}

.toggle-icon span {
  display: block;
  width: 24px;
  height: 3px;
  background-color: var(--pollastre-yellow);
  transition: all 0.3s ease;
}

.toggle-icon::before,
.toggle-icon::after {
  content: '';
  display: block;
  width: 24px;
  height: 3px;
  background-color: var(--pollastre-yellow);
  transition: all 0.3s ease;
}

.toggle-icon.active span {
  opacity: 0;
}

.toggle-icon.active::before {
  transform: translateY(9px) rotate(45deg);
  background-color: var(--cresta-red);
}

.toggle-icon.active::after {
  transform: translateY(-9px) rotate(-45deg);
  background-color: var(--cresta-red);
}

/* Mobile Menu Drawer Overlay */
.header-mobile-nav {
  position: fixed;
  top: 60px;
  left: -100%;
  width: 280px;
  max-width: 85vw;
  height: calc(100vh - 60px);
  background: #181818;
  padding: 20px 15px;
  box-shadow: 10px 0 30px rgba(0,0,0,0.8);
  transition: left 0.35s cubic-bezier(0.77, 0, 0.175, 1);
  overflow-y: auto;
  border-right: 3px solid var(--cresta-red);
  z-index: 1550;
}

@media (max-width: 480px) {
  .header-mobile-nav {
    top: 52px;
    height: calc(100vh - 52px);
  }
}

@media (max-width: 360px) {
  .header-mobile-nav {
    top: 48px;
    height: calc(100vh - 48px);
  }
}

.header-mobile-nav.open {
  left: 0;
}

.nav-menu-mobile li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  color: var(--white);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-weight: 700;
  font-size: 1rem;
}

.nav-menu-mobile li a:hover,
.nav-menu-mobile li a:active {
  color: var(--pollastre-yellow);
}

@media (max-width: 991px) {
  .main-header { display: none; }
  .header-mobile { display: block; }
}

@media (max-width: 480px) {
  .header-mobile-nav {
    width: 100%;
    max-width: 100%;
    left: -100%;
  }
  .header-mobile-nav.open {
    left: 0;
  }
  .logo-mobile-wrapper img {
    height: 42px;
  }
}
