/*
 * Submenu Templates
 *
 * Keeps the secondary submenu row visually consistent regardless of
 * whether the host Page/Post is displaying its title block.
 *
 * Scope: any [vc_row] tagged with the `blade-child-submenu-row`
 * class, which is added automatically by the template loader.
 */

/* Always butt the submenu row against whatever sits above it
 * (title block or global header) so spacing stays predictable. */
.blade-child-submenu-row {
	margin-top: 0 !important;
}

/* When no title block precedes the content, the row would otherwise
 * sit flush against the global header. Restore a small breathing
 * gap so the visual rhythm matches the title-visible case. */
#grve-content > .grve-content-wrapper > #grve-main-content
	> .grve-main-content-wrapper > .hentry:first-child .blade-child-submenu-row:first-child,
#grve-content .grve-main-content-wrapper > [class*="page-"]:first-child .blade-child-submenu-row:first-child,
#grve-content .grve-main-content-wrapper > [class*="post-"]:first-child .blade-child-submenu-row:first-child {
	margin-top: 0;
}

/* Tighten the column wrapper so the submenu hugs the row edges
 * the same way the global header does, and never collapses on
 * narrow viewports. */
.blade-child-submenu-row > .vc_column_container > .vc_column-inner {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

.blade-child-submenu-row .wpb_text_column,
.blade-child-submenu-row .wpb_text_column .wpb_wrapper {
	margin-bottom: 0;
}

/* Make the embedded wppro_header behave responsively inside the
 * VC column. The plugin's own CSS handles its internal layout;
 * we only ensure it never bursts out of the row. */
.blade-child-submenu-row .wppro-header,
.blade-child-submenu-row [class*="wppro-header"],
.blade-child-submenu-row [id*="wppro-header"] {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

/* Breathing room around the featured-image block on posts that use
 * a submenu template, so the image is not crammed against the
 * submenu row above or the post content below. Scoped via the
 * body class so non-submenu posts are unaffected. */
.blade-child-has-submenu #grve-single-media {
	padding-top: 5em;
}

/* Tablet */
@media (max-width: 1024px) {
	.blade-child-submenu-row {
		padding-top: 8px !important;
		padding-bottom: 18px !important;
	}
}

/* Mobile */
@media (max-width: 767px) {
	.blade-child-submenu-row {
		padding-top: 6px !important;
		padding-bottom: 14px !important;
	}

	.blade-child-submenu-row .wppro-header,
	.blade-child-submenu-row [class*="wppro-header"] {
		font-size: 0.95em;
	}
}
