/*
 * Site header + navigation (includes/caguide-site-nav.php) - Tour Page v6 / Tour Finder v1
 * design. Desktop (over Astra's 1100px mobile breakpoint): our header, Astra's hidden.
 * Mobile: Astra's full-screen menu, restyled. Every selector starts with "body" so the
 * theme's button/link rules (Astra, ".elementor-kit-7 a") cannot override it.
 */

/* ---------- Desktop header ---------- */
body .caguide_nav { display: none; }

@media (min-width: 1101px) {
	body #masthead { display: none !important; }
	body .caguide_nav { display: block; position: relative; z-index: 55; background: #f3efe8; font-family: 'Noto Sans', system-ui, sans-serif; color: #2b2420; }
	body .caguide_nav * { box-sizing: border-box; }
	body .caguide_nav .caguide_nav_inner { max-width: 1280px; margin: 0 auto; padding: 14px 32px; display: flex; align-items: center; gap: 28px; }
	body .caguide_nav .caguide_nav_logo { flex-shrink: 0; display: flex; }
	body .caguide_nav .caguide_nav_logo img { height: 52px; width: auto; display: block; }
	body .caguide_nav .caguide_nav_main { display: flex; gap: 4px; margin-left: auto; align-items: center; }
	body .caguide_nav .caguide_nav_item { position: relative; }

	/* Top level: buttons (dropdowns) and plain links */
	body .caguide_nav .caguide_nav_top { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 12px; margin: 0; background: none; border: none; border-bottom: 2px solid transparent; border-radius: 0; box-shadow: none; font-family: 'Noto Sans', system-ui, sans-serif; font-size: 14px; font-weight: 400; line-height: 1.3; letter-spacing: normal; text-transform: none; text-decoration: none; color: #2b2420; cursor: pointer; }
	body .caguide_nav .caguide_nav_top:hover,
	body .caguide_nav .caguide_nav_top:focus { background: none; color: #2b2420; text-decoration: none; }
	body .caguide_nav .caguide_nav_top--link:hover,
	body .caguide_nav .caguide_nav_top[aria-current="page"] { border-bottom-color: #e8334f; }
	body .caguide_nav .caguide_nav_top--lang { font-size: 13px; color: #6f6458; padding-left: 16px; }
	body .caguide_nav .caguide_nav_top--lang:hover,
	body .caguide_nav .caguide_nav_top--lang:focus { color: #2b2420; }
	body .caguide_nav .caguide_nav_chev { transition: transform 0.15s; }
	body .caguide_nav .caguide_nav_top:focus-visible,
	body .caguide_nav .caguide_nav_link:focus-visible,
	body .caguide_nav .caguide_nav_all:focus-visible { outline: 2px solid #e8334f; outline-offset: -2px; }

	/* Dropdown panel - opened by CSS (hover / keyboard focus) or by site-nav.js (.is-open) */
	body .caguide_nav .caguide_nav_panel { display: none; position: absolute; top: 100%; left: 0; z-index: 60; padding-top: 8px; }
	body .caguide_nav .caguide_nav_item--menu.is-right .caguide_nav_panel { left: auto; right: 0; }
	body .caguide_nav:not(.js) .caguide_nav_item--menu:hover > .caguide_nav_panel,
	body .caguide_nav:not(.js) .caguide_nav_item--menu:focus-within > .caguide_nav_panel,
	body .caguide_nav .caguide_nav_item--menu.is-open > .caguide_nav_panel { display: block; }
	body .caguide_nav:not(.js) .caguide_nav_item--menu:hover > .caguide_nav_top,
	body .caguide_nav .caguide_nav_item--menu.is-open > .caguide_nav_top { border-bottom-color: #e8334f; }
	body .caguide_nav .caguide_nav_item--menu.is-open > .caguide_nav_top .caguide_nav_chev { transform: rotate(180deg); }

	body .caguide_nav .caguide_nav_menu { width: 300px; background: #fff; border: 1px solid #e3d9ca; box-shadow: 0 18px 40px -16px rgba(43, 36, 32, 0.28); padding: 8px 0; }
	body .caguide_nav .caguide_nav_menu--side { width: 260px; }
	body .caguide_nav .caguide_nav_menu--lang { width: 220px; }
	body .caguide_nav .caguide_nav_all,
	body .caguide_nav .caguide_nav_link { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 20px; font-family: 'Noto Sans', system-ui, sans-serif; font-size: 14px; line-height: 1.3; letter-spacing: normal; text-transform: none; text-decoration: none; color: #2b2420; background: transparent; }
	body .caguide_nav .caguide_nav_all { min-height: 44px; font-weight: 600; }
	body .caguide_nav .caguide_nav_link { min-height: 40px; font-weight: 400; }
	body .caguide_nav .caguide_nav_all:hover,
	body .caguide_nav .caguide_nav_link:hover,
	body .caguide_nav .caguide_nav_all:focus,
	body .caguide_nav .caguide_nav_link:focus,
	body .caguide_nav .caguide_nav_subitem.is-open > .caguide_nav_link { background: #f3efe8; color: #e8334f; text-decoration: none; }
	body .caguide_nav .caguide_nav_link[aria-current="true"] { font-weight: 600; }
	body .caguide_nav .caguide_nav_divider { height: 1px; background: #e3d9ca; margin: 6px 20px; }

	/* Second level (Travel Guides > country) */
	body .caguide_nav .caguide_nav_subitem { position: relative; }
	body .caguide_nav .caguide_nav_side { display: none; position: absolute; left: 100%; top: -9px; padding-left: 4px; }
	body .caguide_nav .caguide_nav_item--menu.is-flip .caguide_nav_side { left: auto; right: 100%; padding-left: 0; padding-right: 4px; }
	body .caguide_nav:not(.js) .caguide_nav_subitem:hover > .caguide_nav_side,
	body .caguide_nav:not(.js) .caguide_nav_subitem:focus-within > .caguide_nav_side,
	body .caguide_nav .caguide_nav_subitem.is-open > .caguide_nav_side { display: block; }
}

/* ---------- Mobile: Astra's header and full-screen menu, restyled ---------- */
@media (max-width: 1100px) {
	body #masthead .main-header-bar { background: #f3efe8; padding: 10px 20px; border: none; }
	body #masthead .main-header-bar .ast-container { padding: 0; }
	body #masthead .site-logo-img img,
	body #masthead .custom-logo { height: 40px !important; width: auto !important; max-height: 40px !important; }
	body #masthead .site-branding { padding: 0; }
	body #masthead .menu-toggle { width: 44px; height: 44px; padding: 0; margin: 0; display: flex; align-items: center; justify-content: center; background: none !important; border: none; box-shadow: none; color: #2b2420 !important; }
	body #masthead .search-custom-menu-item,
	body #masthead .ast-search-menu-icon,
	body #masthead .ast-masthead-custom-menu-items.search-custom-menu-item { display: none !important; }

	/* The opened full-screen menu */
	body.ast-fullscreen-menu-enable .main-header-bar-navigation { background: #f3efe8; }
	body.ast-fullscreen-menu-enable #masthead .main-header-bar-navigation .main-navigation { width: 100%; max-width: 560px; margin: 0 auto; padding: 72px 20px 32px; text-align: left; }
	body.ast-fullscreen-menu-enable #masthead .main-header-bar-navigation .main-navigation { display: block; }
	body #masthead .main-header-bar-navigation .main-header-menu { display: flex; flex-direction: column; width: 100%; text-align: left; border: none; background: transparent; }
	body #masthead .main-header-bar-navigation .main-header-menu li { width: 100%; display: block; text-align: left; }
	body #masthead .main-header-bar-navigation .main-header-menu .sub-menu { position: static; width: 100%; }
	body #masthead .main-header-bar-navigation .main-header-menu > li { border-bottom: 1px solid #e3d9ca; text-align: left; }
	body #masthead .main-header-bar-navigation .main-header-menu > li.wpml-ls-item { order: 99; }
	body #masthead .main-header-bar-navigation .main-header-menu > li.search-custom-menu-item { display: none !important; }
	body #masthead .main-header-bar-navigation .main-header-menu a,
	body #masthead .main-header-bar-navigation .main-header-menu .menu-link { display: flex; align-items: center; justify-content: flex-start; width: 100%; text-align: left; min-height: 52px; padding: 0 44px 0 0 !important; font-family: 'Noto Sans', system-ui, sans-serif; font-size: 17px; font-weight: 600; line-height: 1.3; text-transform: none; letter-spacing: normal; text-decoration: none; color: #2b2420; background: transparent; }
	body #masthead .main-header-bar-navigation .main-header-menu a:hover,
	body #masthead .main-header-bar-navigation .main-header-menu .current-menu-item > a { color: #e8334f; }
	body #masthead .main-header-bar-navigation .main-header-menu .sub-menu { background: transparent; border: none; padding: 0 0 10px 0; margin: 0; box-shadow: none; }
	body #masthead .main-header-bar-navigation .main-header-menu .sub-menu li { border: none; }
	body #masthead .main-header-bar-navigation .main-header-menu .sub-menu a,
	body #masthead .main-header-bar-navigation .main-header-menu .sub-menu .menu-link { min-height: 44px; padding-left: 16px !important; font-size: 15px; font-weight: 400; }
	body #masthead .main-header-bar-navigation .main-header-menu .sub-menu .sub-menu a,
	body #masthead .main-header-bar-navigation .main-header-menu .sub-menu .sub-menu .menu-link { padding-left: 32px !important; font-size: 14px; color: #6f6458; }
	body #masthead .main-header-bar-navigation .ast-menu-toggle { position: absolute; right: 0; top: 4px; width: 44px; height: 44px; padding: 0; background: none !important; border: none; box-shadow: none; color: #2b2420 !important; }
	body #masthead .main-header-bar-navigation .menu-item-has-children { position: relative; }
}
