/* ═══════════════════════════════════════════════════
   DAMIRICA HEADER — Frosted Pill Sticky Nav
   ═══════════════════════════════════════════════════ */

/* ── RESET & BASE ── */
.damirica-header__wrap {
	position: relative;
	width: 100%;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	align-items: center;
	top: 16px;
	left: 0;
	right: 0;
}

[dir='rtl'] .damirica-header__pill,
body.rtl .damirica-header__pill,
body.translated-rtl .damirica-header__pill {
	flex-direction: row-reverse;
}

.damirica-header__wrap.damirica-header--sticky {
	position: fixed;
}

/* ── PILL CONTAINER ── */
.damirica-header__pill {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 10px 24px;
	border-radius: 60px;

	/* frosted glass — parchment tint */
	background: rgba(245, 240, 230, 0.55);
	-webkit-backdrop-filter: blur(18px);
	backdrop-filter: blur(18px);

	transition: box-shadow 0.35s ease, background 0.35s ease;
	/* Removed overflow: hidden to allow GTranslate dropdown to expand outside the pill */
}

/* subtle lift on scroll (toggled via JS class) */
.damirica-header--pill-scrolled.is-scrolled {
	box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* ── MENUS ── */
.damirica-header__menu {
	display: flex;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 28px;
}

.damirica-header__menu--left {
	flex: 1;
	display: flex;
	justify-content: flex-start;
}

[dir='rtl'] .damirica-header__menu--left,
body.rtl .damirica-header__menu--left,
body.translated-rtl .damirica-header__menu--left {
	justify-content: flex-end;
}

.damirica-header__right-side {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: flex-end;
}

[dir='rtl'] .damirica-header__right-side,
body.rtl .damirica-header__right-side,
body.translated-rtl .damirica-header__right-side {
	justify-content: flex-start;
}

.damirica-header__menu--right {
	display: flex;
	justify-content: flex-end;
}

.damirica-header__menu a {
	font-family: 'DM Sans', 'Segoe UI', sans-serif;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.02em;
	color: #3a3530;
	text-decoration: none !important;
	padding: 6px 12px;
	border-radius: 20px;
	transition: color 0.25s ease, background 0.25s ease;
	white-space: nowrap;
	-webkit-tap-highlight-color: transparent;
}

.damirica-header__menu a:focus {
	outline: none;
	box-shadow: 0 0 0 2px rgba(139, 115, 85, 0.3);
}

.damirica-header__menu a:hover {
	color: #8b7355;
	background: rgba(139, 115, 85, 0.08);
	text-decoration: none !important;
}

/* ── DROPDOWN MENU ── */
.damirica-header__menu li.has-dropdown {
	position: relative;
}

.damirica-header__dropdown-trigger {
	font-family: 'DM Sans', 'Segoe UI', sans-serif;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.02em;
	color: #3a3530;
	background: none;
	border: none;
	cursor: pointer;
	padding: 6px 12px;
	border-radius: 20px;
	transition: color 0.25s ease, background 0.25s ease;
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	-webkit-tap-highlight-color: transparent;
}

.damirica-header__dropdown-trigger::after {
	content: '';
	display: inline-block;
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 4px solid currentColor;
	vertical-align: middle;
	transition: transform 0.25s ease;
}

.damirica-header__dropdown-trigger:hover {
	color: #8b7355;
	background: rgba(139, 115, 85, 0.08);
}

.damirica-header__dropdown-trigger:focus {
	outline: none;
	box-shadow: 0 0 0 2px rgba(139, 115, 85, 0.3);
}

.damirica-header__dropdown-trigger[aria-expanded="true"]::after {
	transform: rotate(180deg);
}

.damirica-header__dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-radius: 16px;
	padding: 12px 0;
	margin-top: 8px;
	list-style: none;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
	border: 1px solid rgba(210, 200, 185, 0.3);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
	z-index: 1000;
}

[dir='rtl'] .damirica-header__dropdown,
body.rtl .damirica-header__dropdown,
body.translated-rtl .damirica-header__dropdown {
	left: auto;
	right: 0;
}

.damirica-header__dropdown.is-open {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.damirica-header__dropdown li {
	margin: 0;
	padding: 0;
}

.damirica-header__dropdown a {
	display: block;
	padding: 10px 20px;
	font-size: 13px;
	color: #3a3530;
	text-decoration: none !important;
	transition: background 0.2s ease, color 0.2s ease;
	white-space: nowrap;
}

.damirica-header__dropdown a:hover {
	background: rgba(139, 115, 85, 0.08);
	color: #8b7355;
}

/* ── LOGO ── */
.damirica-header__logo {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 24px;
}

.damirica-header__logo-link {
	display: inline-flex;
	align-items: center;
	text-decoration: none !important;
}

.damirica-header__logo img,
.damirica-header__logo svg {
	height: 36px;
	width: auto;
	display: block;
}

.damirica-header__logo-text {
	font-family: 'Cormorant Garamond', 'Georgia', serif;
	font-size: 22px;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: #3a3530;
}

/* ── GTRANSLATE ── */
.damirica-header__gtranslate {
	display: inline-flex;
	align-items: center;
	margin-left: 24px;
	position: relative;
	height: 40px; /* Force a consistent height to prevent container swelling */
}

.damirica-header__gtranslate--mobile {
	display: none;
	margin: 16px 0;
	width: 100%;
	justify-content: center;
	z-index: 10;
	position: relative;
	min-height: 40px;
}

.damirica-header__gtranslate--mobile .gtranslate_wrapper {
	display: inline-flex !important;
	vertical-align: middle;
	position: relative !important;
	top: auto !important;
	left: auto !important;
	right: auto !important;
	bottom: auto !important;
}

[dir='rtl'] .damirica-header__gtranslate,
body.rtl .damirica-header__gtranslate,
body.translated-rtl .damirica-header__gtranslate {
	margin-left: 0;
	margin-right: 24px;
}

/* Ensure GTranslate dropdown is absolute positioned to not push parent height */
.damirica-header__gtranslate .gtranslate_wrapper {
	display: inline-flex !important;
	vertical-align: middle;
	position: relative;
}

/* Specific fix for "Nice dropdown with flags" look */
.damirica-header__gtranslate .gt_container {
	position: absolute !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	z-index: 1001 !important;
}

/* Prevent the dropdown list from expanding the header */
.damirica-header__gtranslate .gt_selector,
.damirica-header__gtranslate .gt_dropdown {
	position: absolute !important;
	top: calc(100% + 10px) !important; /* Offset from the pill */
	left: 50% !important;
	transform: translateX(-50%) !important;
	background: white !important;
	box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
	border-radius: 12px !important;
	min-width: 160px !important;
	max-height: 300px !important;
	overflow-y: auto !important;
	z-index: 99999 !important;
}

/* Ensure individual items don't push height */
.damirica-header__gtranslate .gt_dropdown a {
	display: block !important;
	padding: 8px 15px !important;
}

/* ── CTA BUTTON ── */
.damirica-header__cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-left: 24px;
	font-family: 'DM Sans', 'Segoe UI', sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	text-decoration: none !important;
	color: #f5f0e6;
	background: #3a3530;
	padding: 8px 22px;
	border-radius: 40px;
	white-space: nowrap;
	transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
	flex-shrink: 0;
}

[dir='rtl'] .damirica-header__cta,
body.rtl .damirica-header__cta,
body.translated-rtl .damirica-header__cta {
	margin-left: 0;
	margin-right: 24px;
}

.damirica-header__cta:hover {
	background: #8b7355;
	box-shadow: 0 4px 14px rgba(139, 115, 85, 0.25);
	color: #f5f0e6;
	text-decoration: none !important;
}

.damirica-header__cta i {
	font-size: 12px;
	transition: transform 0.25s ease;
}

.damirica-header__cta:hover i {
	transform: translateX(3px);
}

[dir='rtl'] .damirica-header__cta:hover i,
body.rtl .damirica-header__cta:hover i,
body.translated-rtl .damirica-header__cta:hover i {
	transform: translateX(-3px);
}

/* ── HAMBURGER (hidden on desktop) ── */
.damirica-header__burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	border-radius: 50%;
	transition: background 0.2s ease;
	flex-shrink: 0;
}

.damirica-header__burger:hover {
	background: rgba(58, 53, 48, 0.06);
}

.damirica-header__burger span {
	display: block;
	width: 20px;
	height: 2px;
	background: #3a3530;
	border-radius: 2px;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

/* burger → X animation */
.damirica-header__burger.is-active span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.damirica-header__burger.is-active span:nth-child(2) {
	opacity: 0;
}

.damirica-header__burger.is-active span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ── MOBILE DROPDOWN ── */
.damirica-header__mobile-dropdown {
	display: none;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	width: calc(100% - 32px);
	max-width: 480px;
	margin: 8px auto 0;
	padding: 24px 20px;
	border-radius: 24px;
	background: rgba(245, 240, 230, 0.92);
	-webkit-backdrop-filter: blur(24px);
	backdrop-filter: blur(24px);
	border: 1px solid rgba(210, 200, 185, 0.3);
	box-shadow: 0 8px 32px rgba(60, 50, 40, 0.1);
	opacity: 0;
	transform: translateY(-8px);
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.damirica-header__mobile-dropdown.is-open {
	display: flex;
	opacity: 1;
	transform: translateY(0);
}

.damirica-header__mobile-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.damirica-header__mobile-menu li a {
	display: block;
	padding: 12px 16px;
	font-family: 'DM Sans', 'Segoe UI', sans-serif;
	font-size: 15px;
	font-weight: 500;
	color: #3a3530;
	text-decoration: none !important;
	border-radius: 14px;
	transition: background 0.2s ease, color 0.2s ease;
	text-align: center;
	-webkit-tap-highlight-color: transparent;
}

.damirica-header__mobile-menu li a:focus {
	outline: none;
	background: rgba(139, 115, 85, 0.08);
}

.damirica-header__mobile-menu li a:hover {
	background: rgba(139, 115, 85, 0.08);
	color: #8b7355;
}

.damirica-header__cta--mobile {
	width: 100%;
	justify-content: center;
	margin-top: 8px;
	padding: 14px 24px;
	font-size: 14px;
}

/* ── MOBILE DROPDOWN MENU ── */
.damirica-header__mobile-menu li.has-dropdown-mobile {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 4px;
}

.damirica-header__mobile-dropdown-trigger {
	flex: 1;
	font-family: 'DM Sans', 'Segoe UI', sans-serif;
	font-size: 15px;
	font-weight: 500;
	color: #3a3530;
	background: none;
	border: none;
	cursor: pointer;
	padding: 12px 16px;
	border-radius: 14px;
	transition: background 0.2s ease, color 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	-webkit-tap-highlight-color: transparent;
}

.damirica-header__mobile-dropdown-trigger::after {
	content: '';
	display: inline-block;
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 5px solid #3a3530;
	transition: transform 0.25s ease;
}

.damirica-header__mobile-dropdown-trigger:hover {
	background: rgba(139, 115, 85, 0.08);
	color: #8b7355;
}

.damirica-header__mobile-dropdown-trigger:focus {
	outline: none;
	box-shadow: 0 0 0 2px rgba(139, 115, 85, 0.3);
}

.damirica-header__mobile-dropdown-trigger[aria-expanded="true"]::after {
	transform: rotate(180deg);
}

.damirica-header__mobile-submenu {
	list-style: none;
	margin: 0;
	padding: 0;
	width: 100%;
	display: none;
	flex-direction: column;
	gap: 2px;
	padding-left: 16px;
	padding-top: 4px;
}

.damirica-header__mobile-submenu.is-open {
	display: flex;
}

.damirica-header__mobile-submenu li a {
	padding: 10px 16px;
	font-size: 14px;
	color: #5a5348;
	background: rgba(139, 115, 85, 0.04);
	border-radius: 10px;
}

.damirica-header__mobile-submenu li a:hover {
	background: rgba(139, 115, 85, 0.12);
	color: #8b7355;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 1024px) {
	.damirica-header__pill {
		max-width: calc(100% - 32px);
		padding: 10px 20px;
	}

	.damirica-header__menu {
		gap: 16px;
	}

	.damirica-header__menu a {
		font-size: 13px;
		padding: 5px 8px;
	}

	.damirica-header__logo {
		padding: 0 14px;
	}
}

/* Mobile */
@media (max-width: 768px) {
	.damirica-header__pill {
		max-width: calc(100% - 24px);
		padding: 8px 16px;
		border-radius: 50px;
	}

	/* hide desktop menus & CTA, show burger */
	.damirica-header__menu,
	.damirica-header__right-side {
		display: none;
	}

	.damirica-header__gtranslate:not(.damirica-header__gtranslate--mobile) {
		display: none;
	}

	.damirica-header__gtranslate--mobile {
		display: inline-flex;
	}

	.damirica-header__burger {
		display: flex;
	}

	/* reorder pill: logo left, burger right */
	.damirica-header__pill {
		justify-content: space-between;
	}

	.damirica-header__logo {
		padding: 0;
		order: -1;
	}

	.damirica-header__logo img,
	.damirica-header__logo svg {
		height: 28px;
	}

	.damirica-header__logo-text {
		font-size: 18px;
	}
}

/* Small mobile */
@media (max-width: 480px) {
	.damirica-header__wrap {
		top: 8px;
	}

	.damirica-header__pill {
		max-width: calc(100% - 16px);
		padding: 8px 14px;
	}

	.damirica-header__mobile-dropdown {
		width: calc(100% - 16px);
		padding: 20px 16px;
	}
}
