/* ==========================================================================
   Mithyll Dave - Header & Footer
   Scoped under .mda-header and .mda-footer to prevent GeneratePress bleed
   ========================================================================== */

:root {
	--mda-navy: #0D1B2A;
	--mda-gold: #B8972E;
	--mda-gold-hover: #D4AF5A;
	--mda-cream: #F7F4EE;
	--mda-warm-paper: #F6F5F4;
	--mda-teal: #1B3A4B;
	--mda-ink: #141413;
}

.mda-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100000;
	background: var(--mda-gold);
	color: var(--mda-navy);
	padding: 12px 20px;
	font-family: 'DM Sans', sans-serif;
}
.mda-skip-link:focus {
	left: 10px;
	top: 10px;
}

/* ---------- Header shell ---------- */
.mda-header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 9999;
	background: transparent;
	transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.mda-header.is-solid {
	background-color: var(--mda-navy);
	box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.mda-header__inner {
	max-width: 1360px;
	margin: 0 auto;
	padding: 18px 32px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.mda-header__logo {
	flex: 0 0 auto;
}

.mda-logo-link {
	display: inline-flex;
	align-items: center;
}

.mda-logo-link img {
	max-height: 48px;
	width: auto;
	display: block;
}

.mda-logo-fallback {
	font-family: 'Cormorant Garamond', serif;
	font-size: 28px;
	font-weight: 600;
	color: var(--mda-cream);
	letter-spacing: 0.02em;
}

/* ---------- Primary nav (desktop) ---------- */
.mda-header__nav {
	flex: 1 1 auto;
	display: flex;
	justify-content: center;
}

.mda-menu {
	list-style: none;
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0;
}

.mda-menu > li {
	position: relative;
}

.mda-menu > li > a {
	display: inline-block;
	padding: 10px 16px;
	font-family: 'DM Sans', sans-serif;
	font-size: 16px;
	font-weight: 500;
	color: var(--mda-cream);
	text-decoration: none;
	letter-spacing: 0.01em;
	transition: color 0.25s ease;
	position: relative;
}

.mda-menu > li > a::after {
	content: '';
	position: absolute;
	left: 16px;
	right: 16px;
	bottom: 4px;
	height: 2px;
	background: var(--mda-gold);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.25s ease;
}

.mda-menu > li > a:hover,
.mda-menu > li > a:focus {
	color: var(--mda-gold-hover);
}

.mda-menu > li > a:hover::after,
.mda-menu > li > a:focus::after {
	transform: scaleX(1);
}

.mda-menu > li.current-menu-item > a,
.mda-menu > li.current_page_item > a {
	color: var(--mda-gold);
}

/* dropdowns */
.mda-menu li.menu-item-has-children > a {
	position: relative;
	padding-right: 26px;
}

.mda-menu li.menu-item-has-children > a::before {
	content: '';
	position: absolute;
	right: 6px;
	top: 50%;
	width: 7px;
	height: 7px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY(-65%) rotate(45deg);
	transition: transform 0.2s ease;
}

.mda-menu li.menu-item-has-children:hover > a::before,
.mda-menu li.menu-item-has-children:focus-within > a::before {
	transform: translateY(-35%) rotate(225deg);
}

.mda-menu .sub-menu {
	list-style: none;
	position: absolute;
	top: calc(100% + 12px);
	left: 0;
	min-width: 240px;
	margin: 0;
	padding: 10px 0;
	background: var(--mda-navy);
	border: 1px solid rgba(184, 151, 46, 0.25);
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.mda-menu li.menu-item-has-children:hover > .sub-menu,
.mda-menu li.menu-item-has-children:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.mda-menu .sub-menu li a {
	display: block;
	padding: 10px 22px;
	font-family: 'DM Sans', sans-serif;
	font-size: 15px;
	color: var(--mda-cream);
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.mda-menu .sub-menu li a:hover,
.mda-menu .sub-menu li a:focus {
	background-color: rgba(184, 151, 46, 0.12);
	color: var(--mda-gold-hover);
}

/* ---------- CTA button ---------- */
.mda-header__cta {
	flex: 0 0 auto;
}

.mda-btn {
	display: inline-block;
	font-family: 'DM Sans', sans-serif;
	font-weight: 600;
	font-size: 15px;
	letter-spacing: 0.02em;
	padding: 12px 26px;
	text-decoration: none;
	border-radius: 2px;
	transition: background-color 0.25s ease, transform 0.2s ease;
}

.mda-btn--gold {
	background-color: var(--mda-gold);
	color: var(--mda-navy);
}

.mda-btn--gold:hover,
.mda-btn--gold:focus {
	background-color: var(--mda-gold-hover);
	transform: translateY(-1px);
}

.mda-btn--block {
	display: block;
	width: 100%;
	text-align: center;
}

/* ---------- Hamburger (mobile) ---------- */
.mda-hamburger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 0;
}

.mda-hamburger__bar {
	display: block;
	width: 26px;
	height: 2px;
	background-color: var(--mda-cream);
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.mda-hamburger[aria-expanded="true"] .mda-hamburger__bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}
.mda-hamburger[aria-expanded="true"] .mda-hamburger__bar:nth-child(2) {
	opacity: 0;
}
.mda-hamburger[aria-expanded="true"] .mda-hamburger__bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Mobile slide-in panel ---------- */
.mda-mobile-overlay {
	position: fixed;
	inset: 0;
	background: rgba(13, 27, 42, 0.6);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	z-index: 9998;
}

.mda-mobile-overlay.is-active {
	opacity: 1;
	visibility: visible;
}

.mda-mobile-panel {
	position: fixed;
	top: 0;
	right: 0;
	height: 100%;
	width: min(340px, 84vw);
	background-color: var(--mda-navy);
	box-shadow: -20px 0 50px rgba(0, 0, 0, 0.4);
	transform: translateX(100%);
	transition: transform 0.4s ease;
	z-index: 9999;
	overflow-y: auto;
}

.mda-mobile-panel.is-active {
	transform: translateX(0);
}

.mda-mobile-panel__inner {
	padding: 32px 28px 40px;
	display: flex;
	flex-direction: column;
	min-height: 100%;
}

.mda-mobile-panel__close {
	align-self: flex-end;
	background: transparent;
	border: none;
	color: var(--mda-cream);
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
	margin-bottom: 20px;
}

.mda-mobile-nav {
	flex: 1 1 auto;
}

.mda-mobile-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mda-mobile-menu li {
	border-bottom: 1px solid rgba(247, 244, 238, 0.08);
}

.mda-mobile-menu > li > a {
	display: block;
	padding: 16px 4px;
	font-family: 'Cormorant Garamond', serif;
	font-size: 22px;
	font-weight: 600;
	color: var(--mda-cream);
	text-decoration: none;
}

.mda-mobile-menu .sub-menu {
	list-style: none;
	margin: 0 0 12px;
	padding: 0 0 0 16px;
}

.mda-mobile-menu .sub-menu li {
	border-bottom: none;
}

.mda-mobile-menu .sub-menu li a {
	display: block;
	padding: 8px 4px;
	font-family: 'DM Sans', sans-serif;
	font-size: 16px;
	color: rgba(247, 244, 238, 0.8);
	text-decoration: none;
}

.mda-mobile-panel__cta {
	margin-top: 24px;
}

/* ---------- Responsive breakpoints ---------- */
@media (max-width: 960px) {
	.mda-header__nav,
	.mda-header__cta {
		display: none;
	}
	.mda-hamburger {
		display: flex;
	}
}

/* ==========================================================================
   Footer
   ========================================================================== */

.mda-footer {
	background-color: var(--mda-navy);
	color: rgba(247, 244, 238, 0.85);
	font-family: 'DM Sans', sans-serif;
}

.mda-footer h3,
.mda-footer h4 {
	font-family: 'Cormorant Garamond', serif;
	color: var(--mda-cream);
}

.mda-footer a {
	color: inherit;
}

.mda-footer__newsletter {
	background-color: var(--mda-teal);
	padding: 48px 32px;
}

.mda-footer__newsletter-inner {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.mda-footer__newsletter-copy h3 {
	font-size: 28px;
	margin: 0 0 6px;
	color: var(--mda-cream);
}

.mda-footer__newsletter-copy p {
	margin: 0;
	font-size: 16px;
	color: rgba(247, 244, 238, 0.75);
}

.mda-newsletter-form {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.mda-newsletter-input {
	padding: 12px 16px;
	min-width: 260px;
	border: 1px solid rgba(247, 244, 238, 0.25);
	background-color: rgba(247, 244, 238, 0.05);
	color: var(--mda-cream);
	font-family: 'DM Sans', sans-serif;
	font-size: 15px;
}

.mda-newsletter-input::placeholder {
	color: rgba(247, 244, 238, 0.5);
}

.mda-footer__main {
	max-width: 1200px;
	margin: 0 auto;
	padding: 56px 32px 32px;
}

.mda-footer__columns {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 32px;
	margin-bottom: 40px;
}

.mda-footer__col-title {
	font-size: 20px;
	margin: 0 0 16px;
	color: var(--mda-gold);
}

.mda-footer__col ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mda-footer__col li {
	margin-bottom: 10px;
}

.mda-footer__col a {
	text-decoration: none;
	font-size: 15px;
	color: rgba(247, 244, 238, 0.8);
	transition: color 0.2s ease;
}

.mda-footer__col a:hover {
	color: var(--mda-gold-hover);
}

.mda-footer__social {
	display: flex;
	gap: 16px;
	padding-bottom: 32px;
	border-bottom: 1px solid rgba(247, 244, 238, 0.1);
	margin-bottom: 24px;
}

.mda-social-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 1px solid rgba(184, 151, 46, 0.4);
	color: var(--mda-cream);
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.mda-social-icon:hover {
	background-color: var(--mda-gold);
	border-color: var(--mda-gold);
	color: var(--mda-navy);
}

.mda-footer__bottom {
	text-align: center;
}

.mda-footer__copyright {
	font-size: 13px;
	color: rgba(247, 244, 238, 0.55);
	margin: 0;
}

@media (max-width: 900px) {
	.mda-footer__columns {
		grid-template-columns: repeat(2, 1fr);
	}
	.mda-footer__newsletter-inner {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media (max-width: 560px) {
	.mda-footer__columns {
		grid-template-columns: 1fr;
	}
	.mda-newsletter-form {
		width: 100%;
	}
	.mda-newsletter-input {
		flex: 1 1 auto;
		min-width: 0;
	}
}
