/*
 * Header (01.01 / 02.01): GeneratePress' native header restyled as the approved .site-header.
 *
 * What stays native and editable: logo and its width (Personalizar → Identidad del sitio),
 * menu «Principal» with «Consultar» as last item with the CSS class nav-cta (Apariencia → Menús),
 * text colours of header, menu and sub-menu (Personalizar → Colores), menu typography
 * (Personalizar → Tipografía: 13px, 15px on mobile), header and menu spacing (Personalizar →
 * Espaciado: 0/40 header padding, 20 on mobile, 44px menu items, 48px on mobile), mobile
 * breakpoint 767px (Menu Plus) and the overlay on the front page and trips (Header Element
 * «Superponer cabecera», Merge with content → .header-wrap).
 * This file adds what the Customizer cannot do: the gradient over the hero, the ochre underline,
 * the CTA pill, the pill burger and the full-height mobile panel (approved .mobile-nav).
 */

/* ----- Bar ----- */
.site-header{position:relative;z-index:20}
/* Merged with the hero (Header Element): transparent menu over the approved gradient. */
.header-wrap{z-index:20}
.header-wrap .site-header{background:linear-gradient(180deg,rgba(12,21,38,.92) 0%,rgba(12,21,38,.55) 70%,rgba(12,21,38,0) 100%)}
.header-wrap .site-header .main-navigation:not(.toggled){background-color:transparent}

/* GP stacks the header in a column at max-width:768px (main.css); the approved bar is a row at every width. */
.site-header .inside-header{flex-direction:row;flex-wrap:nowrap;align-items:center;column-gap:var(--space-xl);min-height:var(--header-h);text-align:left}

.site-header .site-logo{display:flex;align-items:center;flex:none;margin:0}
.site-header .site-logo a{display:flex;align-items:center}
/* Width: Personalizar → Identidad del sitio (66px → 64px high, as approved); the height follows the image. */
.site-header .header-image{height:auto}

/* ----- Desktop and tablet menu ----- */
@media (min-width:768px){
  .site-header .main-navigation .main-nav > ul{flex-wrap:nowrap;gap:var(--space-xl)}
  .site-header .main-navigation .main-nav > ul > li > a{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0;line-height:1.6;border-bottom:2px solid transparent;transition:color .2s,border-color .2s}
  .site-header .main-navigation .main-nav > ul > li:is(:hover,.sfHover) > a,
  .site-header .main-navigation .main-nav > ul > li > a:focus-visible,
  .site-header .main-navigation .main-nav > ul > li[class*="current-menu-"] > a{border-bottom-color:var(--color-ochre)}

  /* Chevron of «Viajes» (approved 12px, opacity .8) */
  .site-header .main-navigation .menu-item-has-children > a .dropdown-menu-toggle{display:inline-flex;align-items:center;height:auto;padding:0}
  .site-header .main-navigation .dropdown-menu-toggle .gp-icon{font-size:12px;opacity:.8}
  .site-header .main-navigation .dropdown-menu-toggle .gp-icon svg{top:0}

  /* Sub-menu «Viajes» by country: no approved design, styled as a discreet night card. */
  .site-header .main-navigation:not(.toggled) ul ul{width:220px;padding:var(--space-xs) 0;border-radius:var(--radius-sm);box-shadow:0 18px 36px rgba(12,21,38,.35)}
  .site-header .main-navigation .main-nav ul ul li a{padding:10px var(--space-lg);font-size:var(--fs-xs);line-height:1.6;border:0}
}

/* Tablet (approved base.css) */
@media (min-width:768px) and (max-width:1100px){
  .site-header .main-navigation .main-nav > ul{gap:var(--space-lg)}
}
/*
 * Below ~960px the 5 links + «Consultar» do not fit next to the logo (also in the approved HTML).
 * The CTA is hidden there: «Contacto» goes to the same page. It is back at full size in the mobile panel.
 */
@media (min-width:768px) and (max-width:959px){
  .site-header .main-navigation .main-nav > ul > li.nav-cta{display:none}
}

/* ----- Mobile: 60px bar, pill burger and full-height panel (approved .mobile-nav) ----- */
@media (max-width:767px){
  .site-header .inside-header{column-gap:var(--space-md)}
  .site-header .header-image{width:auto;max-height:46px}

  /* The closed menu takes no room in the bar; GP only hides its list. */
  .site-header.has-inline-mobile-toggle #site-navigation:not(.toggled){display:none}

  .site-header .mobile-menu-control-wrapper{background-color:transparent}
  .site-header .mobile-menu-control-wrapper .menu-toggle,
  .site-header .mobile-menu-control-wrapper .menu-toggle:is(:hover,:focus,:active){display:inline-flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;padding:0;line-height:1;font-size:24px;border:1px solid var(--color-line-light);border-radius:var(--radius-pill);background-color:rgba(12,21,38,.4);color:var(--color-sand)}
  .site-header .menu-toggle .gp-icon svg{top:0}

  /* Panel (GP adds .toggled to #site-navigation; ID needed to beat GP's own #site-navigation.toggled rules) */
  .site-header.has-inline-mobile-toggle #site-navigation.toggled{position:absolute;top:var(--header-h);left:0;right:0;z-index:20;margin:0;height:calc(100svh - var(--header-h));overflow-y:auto;overscroll-behavior:contain;padding:var(--space-lg) var(--gutter) var(--space-2xl);background-color:var(--color-night-deep)}
  .site-header .main-navigation.toggled .inside-navigation{display:block;padding:0;max-width:none}
  .site-header .main-navigation.toggled .main-nav > ul{display:flex;flex-direction:column}

  .site-header .main-navigation.toggled .main-nav > ul > li > a{display:flex;align-items:center;min-height:48px;padding:0;line-height:1.6;border-bottom:1px solid var(--color-line-light);color:var(--color-sand)}
  .site-header .main-navigation.toggled .main-nav > ul > li:not([class*="current-menu-"]) > a:is(:hover,:focus){color:var(--color-white)}
  .site-header .main-navigation.toggled .main-nav ul li[class*="current-menu-"] > a{color:var(--color-ochre)}

  /* Sub-menu toggle of «Viajes» (native button, aria-expanded) as a 48px target at the end of the row */
  .site-header .main-navigation.toggled .menu-item-has-children > a .dropdown-menu-toggle{display:inline-flex;align-items:center;justify-content:flex-end;float:none;margin-left:auto;min-width:48px;min-height:47px;height:auto;padding:0}
  .site-header .main-navigation.toggled .dropdown-menu-toggle .gp-icon{font-size:14px}
  .site-header .main-navigation.toggled .dropdown-menu-toggle .gp-icon svg{top:0;transition:transform .2s}
  .site-header .main-navigation.toggled .main-nav ul ul{background-color:transparent;border:0}
  .site-header .main-navigation.toggled .main-nav ul ul li a{display:flex;align-items:center;min-height:44px;padding:0 0 0 var(--space-md);font-size:var(--fs-xs);line-height:1.6;border-bottom:1px solid var(--color-line-light);color:rgba(244,236,221,.8)}

  /* Scroll lock while the panel is open (GP adds .mobile-menu-open to <html>) */
  html.mobile-menu-open{overflow:hidden}
}

/* ----- «Consultar»: last menu item with the class nav-cta, drawn as the approved button ----- */
.site-header .main-navigation .main-nav ul li.nav-cta.menu-item > a{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-xs);box-sizing:border-box;border:2px solid transparent;border-radius:var(--radius-pill);background-color:var(--color-terracotta);color:var(--color-white);font-family:var(--font-accent);font-weight:400;letter-spacing:.08em;text-transform:uppercase;line-height:1.6;text-decoration:none;transition:background-color .2s,color .2s,border-color .2s}
.site-header .main-navigation .main-nav ul li.nav-cta.menu-item > a:is(:hover,:focus,:active){background-color:var(--color-terracotta-dark);color:var(--color-white);border-color:transparent}

@media (min-width:768px){
  .site-header .main-navigation .main-nav ul li.nav-cta.menu-item > a{min-height:44px;padding:0 var(--space-lg);font-size:var(--fs-xs)}
}
@media (max-width:767px){
  .site-header .main-navigation.toggled .main-nav ul li.nav-cta.menu-item{margin-top:var(--space-xl)}
  .site-header .main-navigation.toggled .main-nav ul li.nav-cta.menu-item > a{display:flex;width:100%;min-height:52px;padding:0 var(--space-xl);font-size:var(--fs-btn)}
}
