/***************************************************************
 * MEGA MENU CSS - FINAL MERGED VERSION
 ***************************************************************/
.elementor-element-03e1055 .elementor-shortcode {
    height: 100%;
}

/* 1) Top Level Navigation (Original Styles) */
.mega-menu-wrapper {
  position: relative;
  background: #fff;
  box-sizing: border-box;
  z-index: 9999;
	height: 100%;
	display: flex;
  justify-content: flex-end;
}

.mega-menu-wrapper > ul {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
	align-self: stretch;
}

.mega-menu-wrapper > ul > li {
	height: 100%;
    display: flex;
    align-content: center;
    align-items: center;
}
.mega-menu-wrapper > ul > li > a {
  position: relative;
  text-decoration: none;
  color: var(--e-global-color-text);
	text-transform: lowercase;
  font-weight: 600;
  font-size: 16px;
  padding: 0.5rem 0;
  display: inline-block;
  transition: color 0.3s ease-in;
}

.mega-menu-wrapper > ul > li:hover > a {
	color: var(--e-global-color-accent);
}

.mega-menu-wrapper > ul > li.current-menu-parent > a {
	color: var(--e-global-color-accent)!important;
}

.mega-menu-wrapper > ul > li.current-menu-item > a::before {
	  width: 100%;
}

/* Underline using ::before */
.mega-menu-wrapper > ul > li > a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--e-global-color-accent);
  transition: width 0.3s ease;
}

.mega-menu-wrapper > ul > li:hover > a::before {
  width: 100%;
}

/* Your existing Font Awesome icon using ::after remains unchanged */
.mega-menu-wrapper > ul > li:has(> ul.sub-menu) > a::after,.mega-menu-wrapper > ul > li:has(> .mega-panel) > a::after {
    font-family: "Font Awesome 6 Pro";
    content: "\f078"; /* FontAwesome chevron-down */
    font-weight: 900;
    margin-left: 8px;
	font-size: 14px;
    transition: transform 0.3s ease, color 0.3s ease;
    display: inline-block;
}

.mega-menu-wrapper > ul > li:has(> ul.sub-menu):hover > a::after, .mega-menu-wrapper > ul > li:has(> .mega-panel):hover > a::after {
  transform: rotate(-90deg);
  color: var(--e-global-color-accent);
}


.normal-sub-menu {
  display: none;
  position: absolute;
  top: 100%; left: auto;
  list-style: none;
  margin: 0;
  z-index: 999;
  transform: translateX(-20px);
  box-shadow: 0px 0px 24px -2px rgba(0,0,0,0.15);
  background-image: url('/wp-content/uploads/2025/05/gradient-mesh-db.svg');
  background-size: cover;
  background-position: center right;
  border-radius: 0px 0px 8px 8px;
  overflow: hidden;
}

.mega-menu-wrapper > ul > li:hover > .normal-sub-menu {
  display: block!important;
}



.normal-sub-menu a {
	position: relative;
  display: block;
  color: var(--e-global-color-text)!important;
text-transform: lowercase;
	font-weight: 600;
  font-size: 16px;
  text-decoration: none;
	border-bottom: 1px solid #efefef;
  padding: 8px 20px;
  white-space: nowrap;
	transition: all 0.3s ease-in;
z-index: 1!important;
}

.normal-sub-menu a::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: calc(100% + 1px);
	background-color: var(--e-global-color-primary);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.3s ease-in;
	z-index: -1!important;;
}

.normal-sub-menu a:hover::before {
	transform: scaleX(1);
}
.normal-sub-menu a:hover {
	color: white!important;

}

.mega-menu-wrapper > ul > li:hover > .normal-sub-menu li.current-menu-item a {
	color: white!important;
	 background: var(--e-global-color-accent);
}

/* 3) Mega Panel Structure (Original + New Styles) */
.mega-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  width: 1024px;
  transform: translateX(-50%);
  z-index: 10000;
  background: #0d2236 url('/wp-content/uploads/2025/05/gradient-mesh-rb.svg') no-repeat top right/cover;
  color: #fff;
  box-sizing: border-box;
  gap: 0;
  min-height: 400px;
  box-shadow: 0px 12px 30px -7px rgba(0,0,0,0.4);
  border-radius: 0px 0px 20px 20px;
  overflow: hidden;
}

/* Columns Layout */
.mega-panel__left {
 width: fit-content;
  min-width: 200px;
	padding: 40px;
}
.mega-panel__middle {
min-width: 0;
	padding: 0;
	background: #0d2236 url('/wp-content/uploads/2025/05/gradient-mesh-db.svg') no-repeat top right/cover;
}
.mega-panel__right {
  flex: 1;
	position: relative;
	overflow: hidden;
}
.mega-panel__right .mega-panel-post-full {
height: 100%;
    display: flex;
    flex-direction: column;
    padding: 40px;
    justify-content: flex-end;
	background-size: cover;
	background-position: center center;
}
.mega-post-content-wrapper {
    z-index: 1;
}

.mega-panel__right .mega-panel-post-full h3 {
	color: white!important;
}

}


.mega-panel__right .mega-panel-post-full p{
	font-size: 16px;
	line-height: 1.4;
}

.mega-panel-post-full .btn a {
    padding: 14px 18px;
    font-size: 16px;
    border-radius: 5px;
}
.mega-panel__right .mega-panel-post-full .custom-divider {
color: var(--e-global-color-accent);
	max-width: 175px!important;
}

.mega-panel__right .mega-panel-post-full .custom-divider i {
	font-size: 20px!important;
}

.mega-panel-post-full::before{
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    transparent -10%,
    var(--e-global-color-secondary) 100%
  );
	mix-blend-mode: multiply;
	z-index: 0;
}
/* 4) Left Column Items (Bathroom, Doors - H4 Styles) */
.mega-sub-menu {
  list-style: none;
  margin: 0;
  padding: 0;
	display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.mega-sub-menu li {
  margin-bottom: 0.75rem;
}



.mega-sub-menu a {
  color: #fff !important;
  text-decoration: none;
  font-family: var(--e-global-typography-0d84493-font-family), Sans-serif;
  font-size: var(--e-global-typography-0d84493-font-size);
  font-weight: var(--e-global-typography-0d84493-font-weight);
  text-transform: lowercase;
  line-height: var(--e-global-typography-0d84493-line-height);
  letter-spacing: var(--e-global-typography-0d84493-letter-spacing);
  display: block;
  transition: color 0.3s ease;
  text-align: center;
}

.mega-sub-menu a:hover {
  color: var(--e-global-color-397ad69) !important;
}

.mega-sub-menu li.active a {
	color: var(--e-global-color-397ad69)!important;
}

.mega-sub-menu li.current-menu-item a {
	color: var(--e-global-color-397ad69)!important;
}

.mega-sub-menu a::after {
    font-family: "Font Awesome 6 Pro";
    content: "\f054"; /* FontAwesome chevron-right */
    font-weight: 900;
    margin-left: 12px;
    transition: transform 0.3s ease, color 0.3s ease;
    display: inline-block;
    opacity: 0!important; /* Hidden by default */
    transform: translateX(-5px)!important; /* Slight left shift */
	font-size: 24px;
}

/* Show the Chevron Right when hovered */
.mega-sub-menu li:hover > a::after,
.mega-sub-menu li.active > a::after, .mega-sub-menu li:hover > a::after,
.mega-sub-menu li.current-menu-item > a::after {
    opacity: 1!important;
    transform: translateX(0)!important; /* Moves into place */
    color: var(--e-global-color-397ad69); /* Match hover color */
}



/* 1) Top Level Active State */
.mega-menu-wrapper > ul > li.active > a {
    color: var(--e-global-color-accent) !important;
}

.mega-menu-wrapper > ul > li.active > a::after {
    content: "\f078"; /* FontAwesome chevron-up */
	font-family: "Font Awesome 6 Pro";
    color: var(--e-global-color-accent);
    transform: rorate(-90deg)!important;
}



/* 3) JavaScript-Enhanced CSS */
.mega-menu-item:hover .mega-panel,
.mega-menu-item.active .mega-panel {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.mega-panel:hover {
    display: flex !important; /* Keep panel open when hovering its content */
}

/* 5) Middle Column Posts (Updated Styles) */
.mega-panel-post-list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}
.mega-panel-post-title {
  position: relative;
 margin-bottom: 0.5em;
  cursor: pointer;
}

.mega-panel-post-title .post-title-text {
  color: white;
  font-family: var(--e-global-typography-0a30645-font-family), Sans-serif;
  font-size: unset;
  font-weight: var(--e-global-typography-0a30645-font-weight);
  text-transform: var(--e-global-typography-0a30645-text-transform);
  line-height: var(--e-global-typography-0a30645-line-height);
  letter-spacing: var(--e-global-typography-0a30645-letter-spacing);
  position: relative;
  display: inline-block;
	transition: all 0.3s ease;
}



.mega-panel-post-list .mega-panel-post-title:hover .post-title-text, .mega-panel-post-list .mega-panel-post-title.current-post .post-title-text {
	color: var(--e-global-color-accent);
}

.mega-panel-post-list .mega-panel-post-title.current-post .post-title-text {
	color: var(--e-global-color-accent);
}


.mega-panel-post-list .mega-panel-post-title.current-post .post-title-text::after {
	  width: 100%;
}

/* hide the page‐link at the top of the middle CPT list */
.mega-panel__middle-content .mega-panel-post-list > .mega-panel-post-title:first-child {
  display: none;
}

/* also underline if it’s the “current” post on load */
.mega-panel-post-title.current-post .post-title-text::after {
  width: 100%;
}

/* Border Animation */
.post-title-text::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--e-global-color-accent);
  transition: width 0.3s ease;
}

.mega-panel-post-title:hover .post-title-text::after{
  width: 100%;
}

.post-title-text.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--e-global-color-accent);
  transition: width 0.3s ease;
}

.mega-panel-post-title.active .post-title-text::after{
  width: 100%;
}

/* 6) Right Column (Updated Styles) */
.mega-panel-post-image {
  position: relative;
  height: 400px;
  background-size: cover;
  background-position: center;
  margin-bottom: 1.5rem;
}

.mega-panel-post-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    transparent -20%,
    var(--e-global-color-secondary) 100%
  );
	mix-blend-mode: multiply;
}

/* 1) Hide "No CPT Selected" messages by default */
.mega-panel-no-content {
    display: none !important;
}

/* 2) Post Visibility Control */
.mega-panel__middle-content {
    display: none;
	min-width: 0px;
    opacity: 0;
    transition: width 0.3s ease;
}


.mega-panel__middle-content.active {
    display: block;
    opacity: 1;
    animation: fadeIn 0.3s ease;
	padding: 40px;
	min-width: 250px;
}

.mega-panel__right-content {
    display: none !important;
    animation: fadeIn 0.3s ease;
}

.mega-panel__right-content.active {
    display: block !important;
}


/* Middle column layout */
* Middle column layout */
.middle-columns-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    align-content: start;
}

.middle-column {
    display: grid;
    grid-template-rows: repeat(6, auto);
    gap: 0.5rem 1rem;
}

.mega-panel-post-title {
    break-inside: avoid;
	    display: flex;
    align-self: flex-start;
    position: relative;
}

/* 2-column layout if the list has at least 10 items */
.mega-panel-post-list:has(.mega-panel-post-title:nth-child(10)) {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem 1rem;
}

/* single-column otherwise */
.mega-panel-post-list {
  display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

/* 8) States & Overrides */
.mega-menu-wrapper > ul > li:hover .mega-panel {
  display: flex !important;
}

.mega-panel__right-content {
  display: none;
}

.mega-menu-wrapper .sub-menu {
  display: none !important;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .mega-panel {
    width: 95%;
    left: 2.5%;
    transform: none;
  }
}

/* Add to existing CSS */
.mega-panel__right-content[data-child-id] {
    display: none !important;
}

.mega-panel__right-content[data-child-id].active {
    display: block !important;
}

/* Modify existing rule */
.mega-panel__middle-content.active {
    display: block;
    opacity: 1;
    animation: fadeIn 0.3s ease;
	padding: 40px;
	min-width: 250px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
