/* MEGH Mega Menu Frontend Styles (V2 Inline) */

.megh-inline-nav {
    font-family: 'Inter', 'Roboto', sans-serif;
    position: relative;
    z-index: 9999;
}

/* Root Menu Level (Horizontal) */
.megh-inline-root-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 30px; /* Spacing between root items like the reference image */
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative; /* All dropdowns will align to this container */
}

.megh-inline-root-item {
    position: static; /* Let dropdown position relate to the root list */
}

.megh-inline-root-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-weight: 500;
    color: #1A1835;
    padding: 10px 15px;
    height: 100%; /* For full height alignment */
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
}

/* --- Root Level Hover Effects (Level 1) --- */
.megh-root-hover-underline .megh-inline-root-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15px;
    right: 15px;
    height: 2px;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}
.megh-root-hover-underline .megh-inline-root-item:hover .megh-inline-root-link::after,
.megh-root-hover-underline .megh-inline-root-item.active .megh-inline-root-link::after {
    transform: scaleX(1);
}

.megh-root-hover-scale .megh-inline-root-item:hover .megh-inline-root-link,
.megh-root-hover-scale .megh-inline-root-item.active .megh-inline-root-link {
    transform: scale(1.05);
}

.megh-root-hover-lift .megh-inline-root-item:hover .megh-inline-root-link,
.megh-root-hover-lift .megh-inline-root-item.active .megh-inline-root-link {
    transform: translateY(-4px);
}
/* ------------------------------------------ */

.megh-inline-root-link:hover,
.megh-inline-root-item.active > .megh-inline-root-link {
    color: #0d47a1; /* Active color reference */
}

/* Page Overlay Backdrop */
.megh-mm-overlay {
    position: fixed;
    top: calc(var(--megh-header-bottom, 0px) - 1px);
    left: 0;
    width: 100vw;
    height: calc(100vh - var(--megh-header-bottom, 0px) + 1px);
    background: rgba(0, 0, 0, 0.6);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: visibility 0s 0.4s, opacity 0.4s ease;
}

.megh-mm-overlay.active {
    opacity: 1;
    visibility: visible;
    transition: visibility 0s 0s, opacity 0.4s ease;
}

/* Mega Menu Dropdown Wrapper (Base) */
.megh-mega-menu-wrapper {
    position: absolute;
    top: 100%;
    left: 0; /* Align perfectly to the left of the .megh-inline-root-list */
    width: max-content;
    max-width: 90vw;
    background: #ffffff;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    z-index: 99999;
    
    /* Animation base using visibility/opacity to avoid block/none blinking */
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(15px); /* Start slightly below for slide-up-to-place effect */
    transition: visibility 0s 0.3s, opacity 0.3s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.megh-mega-menu-wrapper.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    transition: visibility 0s 0s, opacity 0.3s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* --- Sidebar Layout Mode Overrides --- */
.layout-sidebar .megh-mega-menu-wrapper {
    position: fixed;
    top: calc(var(--megh-header-bottom, 0px) - 1px); /* Slight 1px overlap upwards to hide gaps, but low enough to clear the logo */
    left: 0;
    right: auto;
    height: calc(100vh - var(--megh-header-bottom, 0px) + 1px);
    max-height: calc(100vh - var(--megh-header-bottom, 0px) + 1px);
    border-radius: 0;
    border-top: 1px solid #EAEAEA;
    box-shadow: 10px 0 50px rgba(0, 0, 0, 0.2);
    /* Start off-canvas to the left */
    transform: translateX(-100%);
    transition: visibility 0s 0.4s, opacity 0.4s ease, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.layout-sidebar .megh-mega-menu-wrapper.active {
    transform: translateX(0);
    transition: visibility 0s 0s, opacity 0.4s ease, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.layout-sidebar .megh-mm-flex-container {
    height: 100%;
}

.layout-sidebar .megh-mm-column {
    height: 100%;
    overflow-y: auto; /* Allowing scrolling inside the panel if content is very long */
}

.layout-sidebar .megh-mm-close-wrapper {
    top: 25px; /* Adjusting close button position for full-height sidebar */
}
/* ------------------------------------- */

/* Flex Container inside Wrapper */
.megh-mm-flex-container {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    position: relative; /* For the close btn */
}

/* Base Column Style */
.megh-mm-column {
    background: #ffffff;
    border-right: 1px solid #EAEAEA;
    flex-shrink: 0;
    width: 320px; /* Fixed width for each column */
    /* Animation for dynamic columns */
    animation: meghSlideInLeft 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes meghSlideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.megh-mm-column:last-child {
    border-right: none;
}

/* Column 1: Info */
.megh-mm-col-info {
    padding: 40px 30px;
    display: block !important;
    animation: none; /* Already visible */
}

.megh-mm-title {
    font-size: 24px;
    font-weight: 700;
    color: #000000;
    margin: 0 0 20px 0;
    padding: 0;
}

.megh-mm-description {
    font-size: 14px;
    line-height: 1.6;
    color: #555555;
    margin: 0;
}

/* Column 2+: List Styles */
.megh-mm-col-first-level {
    animation: none; /* First level is visible with wrapper */
}

.megh-mm-list {
    list-style: none;
    margin: 0;
    padding: 40px 30px 30px 30px; /* padding top for header spacing */
}

.megh-mm-item {
    border-bottom: 1px solid #EEEEEE;
}

.megh-mm-item:last-child {
    border-bottom: none;
}

.megh-mm-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    text-decoration: none !important;
    color: #777777;
    font-size: 15px;
    transition: all 0.2s ease;
}

.megh-mm-link:hover,
.megh-mm-link:focus,
.megh-mm-item.active > .megh-mm-link {
    color: #1A1835;
    font-weight: 500;
}

/* Icons */
.megh-mm-icon {
    display: flex;
    align-items: center;
    color: #CCCCCC;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.megh-mm-item:hover > .megh-mm-link .megh-mm-icon,
.megh-mm-item.active > .megh-mm-link .megh-mm-icon {
    color: #1A1835;
}

/* --- Sub-items Hover Effects (Level 2+) --- */
.megh-sub-hover-shift-right .megh-mm-item:hover > .megh-mm-link,
.megh-sub-hover-shift-right .megh-mm-item.active > .megh-mm-link {
    transform: translateX(10px);
}
.megh-sub-hover-shift-right .megh-mm-item:hover > .megh-mm-link .megh-mm-icon,
.megh-sub-hover-shift-right .megh-mm-item.active > .megh-mm-link .megh-mm-icon {
    transform: translateX(3px); /* extra push to arrow */
}

.megh-sub-hover-scale .megh-mm-item:hover > .megh-mm-link,
.megh-sub-hover-scale .megh-mm-item.active > .megh-mm-link {
    transform: scale(1.03);
    transform-origin: left center;
}

.megh-sub-hover-bg-fade .megh-mm-link {
    border-radius: 4px;
    padding-left: 10px;
    padding-right: 10px;
}
.megh-sub-hover-bg-fade .megh-mm-item:hover > .megh-mm-link,
.megh-sub-hover-bg-fade .megh-mm-item.active > .megh-mm-link {
    background-color: rgba(0, 0, 0, 0.04);
}
/* ------------------------------------------ */

/* Close Button */
.megh-mm-close-wrapper {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 100;
}

.megh-mm-close-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #1A1835;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.megh-mm-close-btn:hover {
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 992px) {
    .megh-inline-root-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .megh-mega-menu-wrapper,
    .layout-sidebar .megh-mega-menu-wrapper {
        position: static;
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: none;
        box-shadow: none;
        border-left: 2px solid #EAEAEA;
        margin-top: 10px;
        transform: translateY(-10px);
        transition: visibility 0s 0.3s, opacity 0.3s ease, transform 0.3s ease;
    }

    .megh-mega-menu-wrapper.active,
    .layout-sidebar .megh-mega-menu-wrapper.active {
        transform: translateY(0);
        transition: visibility 0s 0s, opacity 0.3s ease, transform 0.3s ease;
    }

    .megh-mm-overlay {
        display: none !important;
    }

    .megh-mm-flex-container {
        flex-direction: column;
    }

    .megh-mm-column {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #EAEAEA;
    }

    @keyframes meghSlideInLeft {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

/* ========================================================================= */
/* MEGH Cascade Grid Implementation */
/* ========================================================================= */

.megh-cascade-grid-wrapper { width: 100%; font-family: 'Inter', 'Roboto', sans-serif; }
.megh-cascade-grid {
	display: flex; flex-wrap: nowrap; width: 100%;
	gap: 20px; /* Overridden by settings */
}
@media (max-width: 1024px) {
	.megh-cascade-grid { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: thin; padding-bottom: 15px; }
	.megh-cascade-item { scroll-snap-align: start; }
}
@media (max-width: 767px) {
	.megh-cascade-overlay { opacity: 1; }
	.megh-cascade-content { opacity: 1; transform: translateY(-50%); }
	.megh-cascade-grid-wrapper {
		display: block !important;
		width: 100% !important;
		height: auto !important;
		margin: 0 !important;
		padding: 0 !important;
	}
	.megh-cascade-grid { 
		display: grid !important;
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 15px !important;
		overflow-x: visible !important;
		padding: 0 10px 20px 10px !important;
		width: 100% !important;
		height: auto !important; 
		margin: 0 !important;
	}
	.megh-cascade-item {
		width: 100% !important;
		flex: none !important;
		height: auto !important;
		aspect-ratio: 4 / 3 !important; /* Uniform aspect ratio */
		margin: 0 !important;
	}
	.megh-cascade-image-wrap,
	.megh-cascade-image {
		width: 100% !important;
		height: 100% !important;
		object-fit: cover !important;
	}
}
.megh-cascade-grid::-webkit-scrollbar { height: 6px; }
.megh-cascade-grid::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
.megh-cascade-grid::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
.megh-cascade-grid::-webkit-scrollbar-thumb:hover { background: #aaa; }

.megh-cascade-item {
	position: relative; flex: 0 0 300px; width: 300px; height: 400px; border-radius: 10px; overflow: hidden;
	opacity: 0; transform: translateY(30px) scale(0.95); will-change: transform, opacity;
}
.megh-cascade-item .megh-cascade-link { display: block; width: 100%; height: 100%; position: relative; text-decoration: none; }
.megh-cascade-image-wrap { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; }
.megh-cascade-image {
	width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); will-change: transform; display: block;
}
.megh-cascade-image-placeholder { width: 100%; height: 100%; background-color: #e0e0e0; }
.megh-cascade-overlay {
	position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6); opacity: 0; transition: opacity 0.4s ease; z-index: 1;
}
.megh-cascade-content {
	position: absolute; top: 50%; left: 0; width: 100%; transform: translateY(-40%); padding: 20px; text-align: center; z-index: 2; opacity: 0; transition: opacity 0.4s ease, transform 0.4s ease; box-sizing: border-box;
}
.megh-cascade-content h3 { margin: 0; color: #fff; line-height: 1.2; }

/* Hover & Active Effects */
.megh-cascade-item:hover .megh-cascade-image, .megh-cascade-item.is-active .megh-cascade-image { transform: scale(var(--mcg-zoom, 1.1)); }
.megh-cascade-item:hover .megh-cascade-overlay, .megh-cascade-item.is-active .megh-cascade-overlay { opacity: 1; }
.megh-cascade-item:hover .megh-cascade-content, .megh-cascade-item.is-active .megh-cascade-content { opacity: 1; transform: translateY(-50%); }

/* Entrance Animation Triggered via JS (.is-visible) */
.megh-cascade-grid.is-visible .megh-cascade-item {
	animation: var(--mcg-anim-name, mcgCascadeFadeInUp) var(--mcg-duration, 600ms) cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
	animation-delay: calc(var(--mcg-index, 0) * var(--mcg-delay-step, 150ms));
}
@keyframes mcgCascadeFadeInUp { 0% { opacity: 0; transform: translateY(30px) scale(0.95); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes mcgCascadeFadeInDown { 0% { opacity: 0; transform: translateY(-30px) scale(0.95); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes mcgCascadeFadeInLeft { 0% { opacity: 0; transform: translateX(-30px) scale(0.95); } 100% { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes mcgCascadeFadeInRight { 0% { opacity: 0; transform: translateX(30px) scale(0.95); } 100% { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes mcgCascadeZoomIn { 0% { opacity: 0; transform: scale(0.85); } 100% { opacity: 1; transform: scale(1); } }
@keyframes mcgCascadeFadeIn { 0% { opacity: 0; } 100% { opacity: 1; } }

.elementor-editor-active .megh-cascade-item { opacity: 1; transform: none; animation: none; }

/* ========================================================================= */
/* Cascade Grid – Submenu Panel (below the grid)                              */
/* ========================================================================= */

/* Cards that have sub-items: pointer cursor */
.megh-cascade-item[data-cg-has-sub] {
	cursor: pointer;
}

/* Highlight ring on the selected card */
.megh-cascade-item.megh-cg-selected::after {
	content: '';
	position: absolute;
	inset: 0;
	border: 3px solid #1A3C8E;
	border-radius: inherit;
	z-index: 3;
	pointer-events: none;
}

/* Panel wrapper — collapses to 0 height by default, expands when .is-open */
.megh-cg-submenu-wrapper {
	width: 100%;
	max-height: 0;
	overflow: hidden;
	opacity: 0;
	transition: max-height 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
	            opacity 0.3s ease;
}

.megh-cg-submenu-wrapper.is-open {
	max-height: 250px;
	opacity: 1;
}

/* Inner layout: count left / info right, separated from grid by a subtle line */
.megh-cg-submenu-inner {
	display: flex;
	align-items: stretch;
	gap: 0;
	margin-top: 16px;
	border-top: 1px solid #e0e4ee;
	background: transparent;
	font-family: 'Inter', 'Roboto', sans-serif;
	overflow: hidden;
}

/* Left column – count + label */
.megh-cg-sub-count-col {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	padding: 24px 30px 24px 24px;
	border-right: 1px solid #e8ecf6;
	min-width: 130px;
}

.megh-cg-sub-count {
	font-size: 52px;
	font-weight: 700;
	line-height: 1;
	color: #1A3C8E;
	letter-spacing: -2px;
	display: block;
}

.megh-cg-sub-count-label {
	font-size: 11px;
	color: #888888;
	margin-top: 5px;
	letter-spacing: 0.02em;
	text-transform: lowercase;
}

/* Right column – title + sub-links */
.megh-cg-sub-info-col {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 10px;
	padding: 24px 24px;
}

.megh-cg-sub-title {
	margin: 0;
	font-size: 28px;
	font-weight: 700;
	color: #1A3C8E;
	line-height: 1.1;
}

.megh-cg-sub-links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 4px 20px;
}

.megh-cg-sub-links li a {
	font-size: 14px;
	color: #555555;
	text-decoration: none;
	transition: color 0.2s ease;
}

.megh-cg-sub-links li a:hover {
	color: #1A3C8E;
	text-decoration: underline;
}

.megh-cg-sub-links li a.is-active {
	color: #1A3C8E;
	font-weight: 600;
	text-decoration: underline;
	pointer-events: none;
}

/* Responsive */
@media (max-width: 767px) {
	.megh-cg-submenu-wrapper.is-open { 
		max-height: 1500px; 
		display: block !important;
		position: relative !important;
		width: 100% !important;
	}
	.megh-cg-submenu-inner {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 0;
		border-top: none;
		margin-top: 20px !important;
		align-items: flex-start;
	}
	.megh-cg-sub-count-col {
		display: flex;
		flex: 0 0 80px;
		padding: 10px 15px 10px 0;
		border-right: none;
		border-bottom: none;
		flex-direction: column;
		align-items: flex-start;
		justify-content: flex-start;
		min-width: auto;
	}
	.megh-cg-sub-count { 
		font-size: 48px; 
		line-height: 1;
	}
	.megh-cg-sub-count-label {
		display: block;
		font-size: 10px;
		color: #999;
		margin-top: 2px;
		text-transform: lowercase;
	}
	.megh-cg-sub-info-col {
		flex: 1;
		padding: 10px 0;
		align-items: flex-start;
		gap: 15px;
	}
	.megh-cg-sub-title { 
		display: block;
		font-size: 26px;
		margin-bottom: 5px;
	}
	.megh-cg-sub-links {
		display: flex;
		flex-direction: row;
		flex-wrap: wrap;
		width: 100%;
		gap: 8px 15px;
		align-items: center;
		justify-content: flex-start;
	}
	.megh-cg-sub-links li {
		width: auto;
		display: inline-block;
	}
	.megh-cg-sub-links li a {
		display: inline;
		width: auto;
		max-width: none;
		padding: 0;
		border: none;
		border-radius: 0;
		text-align: left;
		font-size: 15px;
		color: #888;
		background: transparent;
	}
	.megh-cg-sub-links li a:hover,
	.megh-cg-sub-links li a.is-active {
		background: transparent;
		color: #1A3C8E;
		font-weight: 500;
		text-decoration: none;
	}
}

/* =========================================================================
   Elementor Editor Preview Mode
   Applied when wrapper has .megh-editor-preview (editor + first card shown)
   ========================================================================= */

/* Dashed border hints that this is edit-mode preview */
.megh-editor-preview .megh-cg-submenu-inner {
	border-top: 2px dashed #8c9fc5;
	position: relative;
}

/* "Pré-visualização do Editor" badge */
.megh-editor-preview .megh-cg-submenu-inner::before {
	content: '⬙ Pré-visualização do Editor';
	position: absolute;
	top: -1px;
	right: 16px;
	transform: translateY(-100%);
	background: #1A3C8E;
	color: #fff;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.04em;
	padding: 3px 10px 3px 8px;
	border-radius: 4px 4px 0 0;
	pointer-events: none;
	line-height: 1.6;
}

/* Highlight the auto-selected card in editor so it's obvious which one is showing */
.megh-editor-preview .megh-cascade-item.megh-cg-selected::after {
	border-color: #4e7de9;
	border-style: dashed;
}


/* =========================================================================
   MEGH Menu Mobile — Hamburguer + Drawer
   ========================================================================= */

/* ── Botão Hamburguer ────────────────────────────────────────────────────── */
.megh-mobile-hamburger {
    display: none; /* oculto por padrão; JS controla por breakpoint */
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    color: inherit;
    line-height: 0;
    transition: background-color 0.2s ease, transform 0.2s ease;
    z-index: 10000;
    position: relative;
}
.megh-mobile-hamburger:hover {
    transform: scale(1.05);
}
.megh-mobile-hamburger svg {
    display: block;
    pointer-events: none;
    transition: stroke 0.2s ease;
}

/* ── Overlay de fundo ────────────────────────────────────────────────────── */
.megh-mobile-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 19998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0s 0.35s;
}
.megh-mobile-overlay.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.35s ease, visibility 0s 0s;
}

/* ── Drawer / Painel ─────────────────────────────────────────────────────── */
.megh-mobile-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 300px;
    max-width: 90vw;
    background-color: #fff;
    z-index: 19999;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 30px rgba(0,0,0,0.18);
    transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Posição Esquerda */
.megh-mobile-drawer.position-left {
    left: 0;
    right: auto;
    transform: translateX(-110%);
}
.megh-mobile-drawer.position-left.is-open {
    transform: translateX(0);
}

/* Posição Direita */
.megh-mobile-drawer.position-right {
    right: 0;
    left: auto;
    transform: translateX(110%);
}
.megh-mobile-drawer.position-right.is-open {
    transform: translateX(0);
}

/* Posição Topo (full-width) */
.megh-mobile-drawer.position-top {
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 90vh;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 6px 30px rgba(0,0,0,0.18);
    transform: translateY(-110%);
}
.megh-mobile-drawer.position-top.is-open {
    transform: translateY(0);
}

/* ── Botão de fechar (dentro do drawer) ──────────────────────────────────── */
.megh-mobile-drawer-close {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background: transparent;
    border: none;
    cursor: pointer;
    color: inherit;
    padding: 4px;
    margin-bottom: 16px;
    align-self: flex-end;
    border-radius: 4px;
    transition: transform 0.2s ease;
    line-height: 0;
}
.megh-mobile-drawer-close:hover {
    transform: scale(1.15) rotate(90deg);
}

/* ── Navegação mobile (árvore de links) ──────────────────────────────────── */
.megh-mobile-nav {
    flex: 1;
}
.megh-mobile-menu-list,
.megh-mobile-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Item de menu */
.megh-mobile-item {
    border-bottom: 1px solid #eeeeee;
}
.megh-mobile-item:last-child {
    border-bottom: none;
}

/* Linha que contém o link + botão de expansão */
.megh-mobile-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Link */
.megh-mobile-link {
    flex: 1;
    display: block;
    padding: 12px 0;
    text-decoration: none;
    color: inherit;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s ease;
}
.megh-mobile-link:hover {
    color: #0057b8;
}

/* Botão de expandir/colapsar */
.megh-mobile-expand {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #aaa;
    padding: 8px;
    line-height: 0;
    border-radius: 4px;
    transition: transform 0.3s ease, color 0.2s ease;
    flex-shrink: 0;
}
.megh-mobile-expand:hover {
    color: #333;
}
.megh-mobile-item.is-expanded > .megh-mobile-item-row .megh-mobile-expand {
    transform: rotate(180deg);
    color: #0057b8;
}

/* Submenus ocultos por padrão */
.megh-mobile-submenu {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.megh-mobile-item.is-expanded > .megh-mobile-submenu {
    max-height: 2000px; /* valor alto para crescer naturalmente */
}

/* Recuo visual progressivo para subníveis */
.megh-mobile-submenu {
    border-left: 1px solid #f0f0f0;
    margin-left: 15px;
}
.megh-mobile-submenu .megh-mobile-link {
    padding-left: 10px;
    font-weight: 400;
    font-size: 14px;
    color: #666;
}
/* Níveis subsequentes mantêm a linha guia mas não precisam de margem extra se já estão dentro de um .megh-mobile-submenu */
.megh-mobile-submenu .megh-mobile-submenu {
    margin-left: 10px;
}
.megh-mobile-submenu .megh-mobile-submenu .megh-mobile-link {
    font-size: 13px;
    color: #777;
}
.megh-mobile-submenu .megh-mobile-submenu .megh-mobile-submenu .megh-mobile-link {
    font-size: 13px;
    color: #888;
}

/* ── Visibilidade responsiva controlada por JS (data-megh-breakpoint) ─────── */
/*
   Por padrão o hamburguer e o drawer ficam ocultos.
   O JS aplica as classes is-mobile-active / is-desktop-hidden
   baseado no breakpoint definido no widget.
*/
.megh-mobile-hamburger.is-mobile-active {
    display: inline-flex;
}
[data-megh-desktop-nav].is-desktop-hidden {
    display: none !important;
}
