/* =======================
   BASE STYLES
======================= */
.header-link {
	color: white !important;
	font-size: 16px;
}

.header-droplink {
	color: white !important;
}

.menu {
	display: block;
	line-height: 44px;
	list-style: none;
	margin-left: 0px;
}

.dropdown {
	float: none;
	overflow: hidden;
	margin-left: 0px;
	margin-right: 0px;
	background-color: none;
	list-style: none;
}

.dropdown .dropbtn {
	background: none;
	font-size: 16px;
	border: none;
	text-align: center;
	margin: 0;
	padding: 10px 50px;
	width: 250px;
}

.dropdown-content {
	display: none;
	position: absolute;
	background: none;
	min-width: 250px;
	box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
	z-index: 9999;
}

.dropdown-content a {
	padding: 5px 10px;
	text-decoration: none;
	display: block;
	text-align: center;
}

.dropdown:hover .dropbtn,
.dropbtn:focus {
	text-decoration: underline;
}

.dropdown-content a:hover {
	background-color: #ffffff;
}

.show {
	display: block;
}

.bl {
	display: block;
	margin-left: auto;
	margin-right: auto;
	width: 30%;
	height: auto;
}

/* =======================
   DESKTOP (≥769px)
======================= */
@media (min-width: 769px) {
	.header-link {
		font-size: 18px;
	}

	.header-droplink {
		margin: 0 100px !important;
	}

	.menu {
		display: flex;
		line-height: 54px;
		margin: 0;
		list-style: none;
	}

	.dropdown .dropbtn {
		background-color: #4e2774;
		color: #000;
		margin: 0 20px;
		font-size: 18px;
		padding: 0;
		width: unset;
	}

	.dropdown-content {
		display: none;
		background-color: #4e2774;
		min-width: 250px;
		box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
	}

    /* FIX: This rule makes the dropdown appear on hover */
    .dropdown:hover > .dropdown-content {
        display: block;
    }

	.dropdown-content a {
		color: black;
		padding: 12px 16px;
		text-align: center;
	}

	.dropdown-content a:hover {
		background-color: #af88d7;
	}

	/* Always show nav, hide hamburger */
	.menu-icon {
		display: none !important;
	}
	.trigger {
		display: block !important;
		position: static;
		background: none;
	}
}

/* =======================
   TABLET (769px – 1024px)
======================= */
@media (min-width: 769px) and (max-width: 1024px) {
	.header-link {
		font-size: 16px;
	}
	.menu {
		flex-wrap: wrap;
		justify-content: center;
		line-height: 48px;
	}
	.dropdown .dropbtn {
		font-size: 16px;
		padding: 8px 20px;
	}
}

/* =======================
   MOBILE (≤768px) - FIXED
======================= */
.nav-trigger {
	display: none;
}

.menu-icon {
	display: none;
	cursor: pointer;
}

.menu-icon svg {
	fill: #4e2774;
	width: 26px;
	height: 22px;
}

@media (max-width: 768px) {
	/* Header layout */
	.site-header .wrapper {
		display: flex;
		justify-content: space-between;
		align-items: center;
		height: 60px;
		padding: 0 15px;
	}
	.site-title {
		font-size: 1.2rem;
	}
	
	label[for="nav-trigger"] {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		cursor: pointer;
	}

	.menu-icon {
		display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
	}

	.svg {
		margin-bottom: 30px;
	}

	/* FIX: Repositioned and resized the menu container */
	.trigger {
		display: none;
		position: absolute;
		top: 55px;
		right: 15px; /* Position from the right */
		left: auto; /* Unset left positioning */
		width: 200px; /* Set a fixed width */
		background-color: #2a2a2a;
		border-radius: 8px;
		box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
		overflow: hidden; /* Important for border-radius */
	}

	.nav-trigger:checked ~ .trigger {
		display: block;
	}
	
	.menu {
		margin: 0;
	}

	/* FIX: Left-aligned text for all menu items */
	.dropdown .dropbtn {
		display: block;
		width: 100%;
		padding: 12px 20px;
		font-size: 16px;
		color: white !important;
		text-align: left; /* Changed from center */
		border: none;
		background: none;
		border-bottom: 1px solid #444;
		white-space: nowrap;
	}

	.dropdown-content {
		display: block;
		position: static;
		width: 100%;
		background-color: transparent; /* Match parent background */
		box-shadow: none;
	}
	
	/* FIX: Left-aligned text for sub-menu items */
	.dropdown-content a {
		display: block;
		padding: 12px 20px 12px 35px; /* Indent sub-items */
		font-size: 15px;
		color: #ddd !important;
		text-align: left; /* Changed from center */
		background-color: transparent;
		border-top: 1px solid #444;
	}
    
    /* Remove bottom border from the very last item for a cleaner look */
	.menu > li:last-child > .dropdown > .dropbtn {
		border-bottom: none;
	}
    .menu > li:last-child > .dropdown > .dropdown-content > li:last-child a {
        border-top: 1px solid #444; /* Ensure sub-items still have a top border */
    }
}