/* ==========================================================================
   Header & Navigation — Story 1.3
   Royal Emerald design system
   ========================================================================== */

/* --------------------------------------------------------------------------
   Skip to content link (AC-11)
   -------------------------------------------------------------------------- */
.skip-link {
	position: absolute;
	top: -100%;
	left: 50%;
	transform: translateX(-50%);
	z-index: 100000;
	padding: 0.75rem 1.5rem;
	background-color: var(--wp--preset--color--gold, #8a7040);
	color: var(--wp--preset--color--emerald, #1a3a2a);
	font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
	border-radius: 0 0 4px 4px;
	transition: top 0.2s ease;
}

.skip-link:focus {
	top: 0;
	outline: 2px solid var(--wp--preset--color--gold, #8a7040);
	outline-offset: 2px;
}

.admin-bar .skip-link:focus {
	top: 32px;
}

@media screen and (max-width: 782px) {
	.admin-bar .skip-link:focus {
		top: 46px;
	}
}

/* --------------------------------------------------------------------------
   Header container — sticky positioning (AC-1, AC-6, AC-7)
   -------------------------------------------------------------------------- */
.wp-site-blocks > .wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 1000;
}

.admin-bar .wp-site-blocks > .wp-block-template-part {
	top: 32px;
}

@media screen and (max-width: 782px) {
	.admin-bar .wp-site-blocks > .wp-block-template-part {
		top: 46px;
	}
}

.wp-site-blocks > .wp-block-template-part > .vt-header-bar {
	position: relative;
	z-index: 1000;
}

/* --------------------------------------------------------------------------
   Header group — premium spacing (AC-1, AC-6)
   -------------------------------------------------------------------------- */
.vt-header-bar.wp-block-group.alignfull {
	background-color: var(--wp--preset--color--emerald, #1a3a2a);
	padding-top: var(--wp--preset--spacing--large, 2rem);
	padding-bottom: var(--wp--preset--spacing--large, 2rem);
	padding-left: var(--wp--preset--spacing--xl, 3rem);
	padding-right: var(--wp--preset--spacing--xl, 3rem);
	align-items: center;
}

/* --------------------------------------------------------------------------
   Site title — ivory text (AC-2, AC-5)
   -------------------------------------------------------------------------- */
.vt-header-bar .wp-block-site-title {
	margin: 0;
}

.vt-header-bar .wp-block-site-title a {
	color: #ffffff;
	text-decoration: none;
	font-family: var(--wp--preset--font-family--playfair-display, 'Playfair Display', serif);
	transition: color 0.2s ease;
}

.vt-header-bar .wp-block-site-title a:hover,
.vt-header-bar .wp-block-site-title a:focus-visible {
	color: var(--wp--preset--color--gold, #8a7040);
}

/* --------------------------------------------------------------------------
   Navigation links — ivory text, gold hover (AC-2, AC-8)
   -------------------------------------------------------------------------- */
.vt-header-bar .wp-block-navigation .wp-block-navigation-item__content,
.vt-header-bar .wp-block-navigation .wp-block-navigation-link__content {
	color: #ffffff;
	font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
	font-size: 0.9375rem;
	font-weight: 500;
	letter-spacing: 0.025em;
	text-transform: uppercase;
	transition: color 0.2s ease;
	padding: 0.5rem 0.75rem;
}

.vt-header-bar .wp-block-navigation .wp-block-navigation-item__content:hover,
.vt-header-bar .wp-block-navigation .wp-block-navigation-link__content:hover,
.vt-header-bar .wp-block-navigation .wp-block-navigation-item__content:focus-visible,
.vt-header-bar .wp-block-navigation .wp-block-navigation-link__content:focus-visible {
	color: var(--wp--preset--color--gold, #8a7040);
}

.vt-header-bar .wp-block-navigation {
	margin: 0;
}

.vt-header-bar .wp-block-navigation__container {
	gap: 0.25rem;
}

/* --------------------------------------------------------------------------
   Focus-visible indicators (AC-9)
   -------------------------------------------------------------------------- */
.vt-header-bar a:focus-visible,
.vt-header-bar button:focus-visible,
.vt-header-bar .wp-block-navigation-item__content:focus-visible,
.vt-header-bar .wp-block-navigation-link__content:focus-visible,
.vt-header-bar .wp-block-button__link:focus-visible {
	outline: 2px solid var(--wp--preset--color--gold, #8a7040);
	outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   CTA button — gold background, dark text (AC-3)
   -------------------------------------------------------------------------- */
.vt-header-bar .wp-block-buttons {
	margin: 0;
}

.vt-header-bar .vt-cta-gold .wp-block-button__link {
	background-color: var(--wp--preset--color--gold, #8a7040);
	color: var(--wp--preset--color--emerald, #1a3a2a);
	font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	text-decoration: none;
	padding: 0.625rem 1.5rem;
	border-radius: 4px;
	transition: background-color 0.2s ease, transform 0.15s ease;
}

.vt-header-bar .vt-cta-gold .wp-block-button__link:hover,
.vt-header-bar .vt-cta-gold .wp-block-button__link:focus {
	background-color: #8a7040;
	color: var(--wp--preset--color--emerald, #1a3a2a);
}

.vt-header-bar .vt-cta-gold .wp-block-button__link:active {
	transform: scale(0.97);
}

/* --------------------------------------------------------------------------
   Mobile hamburger trigger — below 1024px (AC-10)
   -------------------------------------------------------------------------- */
/* --------------------------------------------------------------------------
   Mobile Header — Royal Emerald Slim Bar (Reference Match)
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
  /* Mobile Header Container */
  .vt-header-bar.wp-block-group {
    padding: 0 !important;
    background-color: #1a3a2a;
    border-bottom: 1px solid rgba(201, 169, 110, 0.15);
  }

  /* Inner Flex Wrapper */
  .vt-header-inner {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0.4rem 0.75rem;
    min-height: 52px;
    gap: 0.5rem;
  }

  /* Logo - Left */
  .vt-site-logo-link,
  .vt-site-logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    margin: 0 !important;
  }
  .vt-site-logo-link img,
  .vt-site-logo img {
    max-height: 28px;
    width: auto;
  }

  /* CTA Container - Center */
  .vt-header-cta {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    min-width: 0;
  }

  /* Decorative Gold Lines */
  .vt-header-cta::before,
  .vt-header-cta::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 16px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #c9a96e 40%, #c9a96e 60%, transparent);
    transform: translateY(-50%);
    pointer-events: none;
  }
  .vt-header-cta::before { left: -20px; }
  .vt-header-cta::after { right: -20px; }

  /* CTA Button */
  .vt-cta-gold-link {
    background: linear-gradient(180deg, #d4b87a 0%, #c9a96e 50%, #b8945a 100%);
    color: #1a3a2a;
    font-family: 'Playfair Display', serif;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: 3px;
    border: 1px solid #a08050;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.3);
    text-transform: none;
    letter-spacing: 0.02em;
    white-space: nowrap;
    line-height: 1.2;
    text-decoration: none;
    transition: all 0.2s ease;
  }
  .vt-cta-gold-link:hover {
    background: linear-gradient(180deg, #e0c88a 0%, #d4b87a 50%, #c9a96e 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  }

  /* Menu Trigger - Right */
  .vt-mobile-toggle-btn {
    flex: 0 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
  }

  .vt-menu-label {
    font-family: 'Playfair Display', serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #c9a96e;
    background: rgba(26, 58, 42, 0.6);
    border: 1px solid #c9a96e;
    border-radius: 20px;
    padding: 0.25rem 0.9rem;
    pointer-events: none;
    transition: all 0.2s ease;
    white-space: nowrap;
  }

  .vt-mobile-toggle-btn:hover .vt-menu-label,
  .vt-mobile-toggle-btn:active .vt-menu-label {
    background: #c9a96e;
    color: #1a3a2a;
  }

  /* Hide desktop nav */
  .vt-header-bar .wp-block-navigation__container,
  .vt-header-bar .wp-block-navigation {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   Desktop — hide hamburger, show full nav (AC-10)
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) {
	.vt-header-bar .wp-block-navigation__responsive-container-open {
		display: none;
	}

	.vt-header-bar .wp-block-navigation__responsive-container-close {
		display: none;
	}

	.vt-header-bar .wp-block-navigation__responsive-container {
		display: flex;
	}

	.vt-header-bar .wp-block-navigation__container {
		display: flex;
	}
}

/* --------------------------------------------------------------------------
   Wide viewport — larger padding (≥1440px)
   -------------------------------------------------------------------------- */
@media (min-width: 1440px) {
	.vt-header-bar.wp-block-group.alignfull {
		padding-left: var(--wp--preset--spacing--xxl, 4rem);
		padding-right: var(--wp--preset--spacing--xxl, 4rem);
	}
}

/* --------------------------------------------------------------------------
   Small screens — overflow prevention (<400px)
   -------------------------------------------------------------------------- */
@media (max-width: 399px) {
	.vt-header-bar.wp-block-group.alignfull {
		padding-left: var(--wp--preset--spacing--small, 0.5rem);
		padding-right: var(--wp--preset--spacing--small, 0.5rem);
	}

	.vt-header-bar .wp-block-site-title a {
		font-size: 1.1rem;
	}

	.vt-header-bar .vt-cta-gold .wp-block-button__link {
		font-size: 0.75rem;
		padding: 0.4rem 0.75rem;
		letter-spacing: 0.025em;
	}
}

/* --------------------------------------------------------------------------
   Print styles — hide header chrome
   -------------------------------------------------------------------------- */
@media print {
	.vt-header-bar,
	.skip-link {
		display: none !important;
	}
}

/* ==========================================================================
   FIX: Force navigation link visibility on Emerald background
   ========================================================================== */
.vt-primary-nav a,
.vt-primary-nav .wp-block-navigation-item__content,
.vt-primary-nav .wp-block-navigation-link__content {
	color: #f5f0e8;
	font-weight: 500;
}

.vt-primary-nav a:hover,
.vt-primary-nav .wp-block-navigation-item__content:hover,
.vt-primary-nav .wp-block-navigation-link__content:hover {
	color: #c9a96e;
}

/* --------------------------------------------------------------------------
   Logo background override
   -------------------------------------------------------------------------- */
.vt-header-bar .wp-block-site-logo,
.vt-header-bar .wp-block-site-logo img {
	background: transparent;
	box-shadow: none;
	border: none;
}

/* FIX: Force desktop navigation visibility (AC-1.3) */
@media (min-width: 1024px) {
  .vt-primary-nav {
    display: flex;
    align-items: center;
  }
  .vt-primary-nav .wp-block-navigation__container {
    display: flex;
    gap: 0.25rem;
  }
  .vt-primary-nav .wp-block-navigation-item {
    display: block;
  }
}

/* OVERRIDE: Force nav text visibility (block theme specificity fix) */
.vt-primary-nav .wp-block-navigation-item__content,
.vt-primary-nav .wp-block-navigation-link__content {
    color: #f5f0e8 !important;
}
.vt-primary-nav .wp-block-navigation-item__content:hover,
.vt-primary-nav .wp-block-navigation-item__content:visited,
.vt-primary-nav .wp-block-navigation-item__content:active,
.vt-primary-nav .wp-block-navigation-link__content:hover,
.vt-primary-nav .wp-block-navigation-link__content:visited,
.vt-primary-nav .wp-block-navigation-link__content:active {
    color: #c9a96e !important;
}

/* ==========================================================================
   Mobile Menu Trigger — Premium Label (Story 1.6 Refinement)
   ========================================================================== */
