/* ==========================================================================
   HEADER & NAVIGATION - VERO STUDIO NAILS
   ========================================================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: var(--z-header);
  transition: all var(--transition-base);
  background: rgba(10, 11, 16, 0.75);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-bottom: 1px solid rgba(212, 175, 55, 0.12);
  padding: 16px 0;
}

.header.scrolled {
  background: rgba(8, 9, 13, 0.94);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-bottom: 1px solid rgba(212, 175, 55, 0.22);
  padding: 12px 0;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.65), 0 0 20px rgba(212, 175, 55, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
}

/* Brand Logo Container */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
  user-select: none;
}

.brand-coin {
  width: 46px;
  height: 46px;
  min-width: 46px;
  max-width: 46px;
  min-height: 46px;
  max-height: 46px;
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 10px rgba(212, 175, 55, 0.4));
  transition: transform var(--transition-base), filter var(--transition-base);
}

.brand-coin img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: contain;
  border-radius: 50%;
}

.brand:hover .brand-coin {
  transform: scale(1.06);
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 18px rgba(212, 175, 55, 0.75));
}

.brand-text {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.brand-title {
  font-family: var(--font-brand, var(--font-serif));
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-white);
  line-height: 1.1;
  text-transform: uppercase;
}

.brand-subtitle {
  font-family: var(--font-script);
  font-size: 1.25rem;
  color: var(--gold-champagne);
  line-height: 0.85;
  margin-top: 1px;
  letter-spacing: 0.04em;
}

/* Desktop Nav Menu - Curated, Spacious & Refined Haute Joaillerie */
.nav-menu {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.3vw, 24px);
  flex-wrap: nowrap !important;
  flex-shrink: 1;
}

.nav-link {
  font-family: var(--font-sans);
  font-size: clamp(0.74rem, 0.80vw, 0.86rem);
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  position: relative;
  padding: 6px 2px;
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  flex-shrink: 0 !important;
  transition: color var(--transition-fast), transform var(--transition-fast), text-shadow var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--gradient-gold);
  border-radius: var(--radius-pill);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.6);
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover {
  color: var(--gold-light);
  transform: translateY(-1px);
}

.nav-link.active {
  color: var(--gold-light);
  font-weight: 600;
  text-shadow: 0 0 14px rgba(212, 175, 55, 0.45);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 85%;
}

/* Delicate Jewel Sparkle on Nav Link */
.nav-badge-sparkle {
  font-size: 0.70rem;
  color: var(--gold-champagne);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  margin-left: 2px;
  animation: jewelBreath 3s ease-in-out infinite;
}

@keyframes jewelBreath {
  0%, 100% {
    transform: scale(0.92);
    opacity: 0.75;
    filter: drop-shadow(0 0 2px rgba(212, 175, 55, 0.3));
  }
  50% {
    transform: scale(1.18);
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.85));
  }
}

/* Actions Right (Language Switcher + Booking CTA) */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-shrink: 0;
}

/* Header Social Buttons (Instagram & Facebook) */
.header-social-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-social-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-gold-subtle);
  color: var(--gold-champagne);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.header-social-btn:hover {
  background: var(--gradient-gold);
  color: #0c0d12;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.35);
}

@media (max-width: 1240px) {
  .header-actions .header-social-row {
    display: none;
  }
}

/* Luxury Language Switcher with Enamel Flags */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  background: rgba(12, 13, 18, 0.85);
  border: 1px solid var(--border-gold-medium);
  border-radius: var(--radius-pill);
  padding: 3px 5px;
  gap: 4px;
  position: relative;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
}

.lang-flag-coin {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  display: inline-block;
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.6), 0 2px 6px rgba(0, 0, 0, 0.5);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.lang-flag-coin svg {
  width: 100%;
  height: 100%;
  display: block;
}

.lang-btn.active {
  color: var(--gold-light);
  background: rgba(212, 175, 55, 0.15);
  border-color: rgba(212, 175, 55, 0.6);
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.25);
}

.lang-btn.active .lang-flag-coin {
  box-shadow: 0 0 0 1.5px var(--gold-champagne), 0 0 10px rgba(212, 175, 55, 0.6);
  transform: scale(1.08);
}

.lang-btn:not(.active):hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.lang-btn:not(.active):hover .lang-flag-coin {
  box-shadow: 0 0 0 1px var(--gold-champagne);
}

/* Featured 3D Creator Nav Link */
.nav-link-creator {
  color: var(--gold-champagne) !important;
  font-weight: 700;
}

.nav-link-creator:hover {
  color: var(--gold-light) !important;
  text-shadow: 0 0 12px rgba(212, 175, 55, 0.45);
}

/* Mobile Toggle Hamburger */
.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(22, 23, 31, 0.6);
  border: 1px solid var(--border-gold-subtle);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gold-champagne);
  transition: all var(--transition-base);
  border-radius: 2px;
}

.mobile-toggle.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-toggle.is-active span:nth-child(2) {
  opacity: 0;
}
.mobile-toggle.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Drawer Overlay - Firmly on the Right Side */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0 !important;
  left: auto !important;
  width: 84%;
  max-width: 360px;
  height: 100vh;
  background: rgba(10, 11, 15, 0.98);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-left: 1px solid var(--border-gold-medium);
  border-right: none;
  z-index: calc(var(--z-header) + 10);
  padding: var(--space-2xl) var(--space-xl);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.9);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.mobile-drawer.is-open {
  transform: translateX(0) !important;
}

.mobile-drawer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-dark);
}

.mobile-drawer-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-dark);
  color: var(--text-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mobile-drawer-close:hover {
  background: var(--gold-primary);
  color: #0c0d12;
  transform: rotate(90deg);
}

.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: calc(var(--z-header) + 5);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

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

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.mobile-nav-link {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--text-white);
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-nav-link:hover {
  color: var(--gold-champagne);
}

.mobile-nav-link.active {
  color: var(--gold-light);
  padding-left: 10px;
  border-left: 2px solid var(--gold-primary);
}

.mobile-nav-link.active::after {
  content: '✦';
  font-size: 0.85rem;
  color: var(--gold-light);
}

/* ==========================================================================
   MOBILE HEADER OPTIMIZATIONS (<= 640px)
   Prevents horizontal overflow and fits brand + lang-switcher + hamburger
   ========================================================================== */
@media (max-width: 640px) {
  .header {
    padding: 8px 0;
  }
  .header-inner {
    gap: 8px;
    justify-content: space-between;
  }
  .brand {
    gap: 8px;
    min-width: 0;
    flex-shrink: 1;
  }
  .brand-coin {
    width: 36px;
    height: 36px;
    min-width: 36px;
    max-width: 36px;
    min-height: 36px;
    max-height: 36px;
  }
  .brand-title {
    font-size: 1.05rem;
    letter-spacing: 0.08em;
  }
  .brand-subtitle {
    font-size: 1.1rem;
  }
  .header-actions {
    gap: 8px;
    flex-shrink: 0;
  }
  .lang-switcher {
    padding: 2px 4px;
    gap: 2px;
  }
  .lang-btn {
    padding: 4px 7px;
    gap: 4px;
    font-size: 0.72rem;
  }
  .lang-flag-coin {
    width: 18px;
    height: 18px;
  }
  .lang-flag-coin svg {
    width: 18px;
    height: 18px;
  }
  .mobile-toggle {
    width: 38px;
    height: 38px;
    gap: 4px;
  }
  .mobile-toggle span {
    width: 18px;
  }
}

/* Smartphone & Compact Screen Polish (<= 480px) */
@media (max-width: 480px) {
  .header {
    padding: 6px 0;
  }
  .header-inner {
    gap: 6px;
  }
  .brand {
    gap: 7px;
  }
  .brand-title {
    font-size: 0.98rem;
    letter-spacing: 0.06em;
  }
  .brand-subtitle {
    font-size: 1rem;
  }
  /* On compact mobile, show only the enamel flag coins to save 40px and prevent any header squeeze */
  .header .lang-btn .lang-text {
    display: none;
  }
  .header .lang-switcher {
    padding: 2px 3px;
    gap: 2px;
  }
  .header .lang-btn {
    padding: 3px 4px;
  }
  .mobile-toggle {
    width: 36px;
    height: 36px;
  }
}

/* Extra-Compact Screen Polish (<= 375px) */
@media (max-width: 375px) {
  .header .container {
    padding: 0 10px;
  }
  .brand-coin {
    width: 32px;
    height: 32px;
    min-width: 32px;
    max-width: 32px;
    min-height: 32px;
    max-height: 32px;
  }
  .brand-title {
    font-size: 0.92rem;
    letter-spacing: 0.04em;
  }
  .brand-subtitle {
    font-size: 0.92rem;
  }
}

