/* ==========================================================================
   Enfold 4.0.5 -> 7.1.6 compatibility overrides
   The site's legacy layout.css was hand-tuned against Enfold 4.0.5 markup.
   A few rules there behave differently under Enfold 7.1.6's column grid.
   Fixes live here (loaded after layout.css) so layout.css stays as-was.
   ========================================================================== */

/* Homepage (page-id-3329) forced its two-column rows to float:right
   (layout.css). Under Enfold 4 that rendered a clean side-by-side row AND
   visually swapped the pair (the first-authored half sat on the right).
   Under Enfold 7's markup that same float:right staggers the second column
   diagonally down. Reproduce the old behaviour explicitly: default the
   halves to float:left (kills the stagger), then for the two-column row put
   the first half on the right and the following half on the left, so the
   on-screen order (Blog left, E-Books right) matches production.
   body. adds specificity to beat the layout.css rule. */
body.page-id-3329 .entry-content-wrapper .av_one_half {
	float: left;
}
body.page-id-3329 .entry-content-wrapper .av_one_half.first {
	float: right;
}
body.page-id-3329 .entry-content-wrapper .av_one_half.first + .av_one_half {
	float: left;
	clear: none;
}

/* --------------------------------------------------------------------------
   Responsive header / mobile menu
   The legacy layout.css and the old custom rules implemented Enfold 4's
   mobile menu: they hid the whole .avia-menu UL at small widths and showed
   #advanced_menu_toggle / #mobile-advanced — elements that no longer exist
   in Enfold 7 (it uses the .av-burger-menu-main li INSIDE .avia-menu).
   Net effect: no navigation at all below 1280px. Fixes below.
   -------------------------------------------------------------------------- */

/* <=989px: re-show the .avia-menu UL that legacy CSS hides, so Enfold 7's
   native burger li can render. Enfold's own rules at these widths hide the
   regular menu items and show only the burger. The #top id outweighs the
   legacy class-only selectors. */
@media only screen and (max-width: 989px) {
	.responsive.html_mobile_menu_tablet #top .main_menu .avia-menu,
	.responsive #top .av_mobile_menu_tablet .main_menu .avia-menu,
	#top .main_menu .avia-menu {
		display: block;
	}
}

/* Header bottom: Enfold 7 adds a default 1px light border under
   #header_main (the stray white hairline above the gold band), and the
   legacy layout.css forces #header to a fixed height:120px while its
   content is only ~106px tall — leaving an empty maroon strip before the
   4px gold border-bottom. Remove the hairline and let the header size to
   its content so the gold line sits directly under the menu, as on
   production. */
#top #header_main {
	border-bottom: none;
}
#top #header {
	height: auto;
}

/* Logo: legacy layout.css shifts the logo up (.logo, .logo a { top:-12px })
   — hand-tuned against Enfold 4, where the same file had .logo's
   overflow:hidden commented out so the logo image could extend beyond the
   69px header band. Enfold 7 reintroduced overflow:hidden on .logo/.logo a,
   which now clips the top of the emblem. Restore the old overflow so the
   logo displays fully, exactly like production. */
#top .logo,
#top .logo a {
	overflow: visible;
}

/* 990-1280px: the old site switched to its mobile menu at <=1280 because the
   full menu does not fit beside the logo below that width (it overlaps the
   logo). Reproduce that behaviour with Enfold 7's burger menu. */
@media only screen and (min-width: 990px) and (max-width: 1280px) {
	.responsive.html_mobile_menu_tablet #top .av-main-nav > li.menu-item {
		display: none;
	}
	.responsive.html_mobile_menu_tablet #top .av-main-nav li.menu-item-avia-special,
	.responsive.html_mobile_menu_tablet #top .av-burger-menu-main {
		display: block;
	}
}

/* Footer socket: Enfold auto-renders the "avia3" Footer Menu location as a
   text row (nav.sub_menu_socket) next to the copyright line. This site's
   Footer Menu (Live Darshan / Sai Baba Arathi Audio / Tamil Satcharitra) is
   also placed intentionally as the "Quick Links" widget further up the
   footer, so the socket row is a duplicate — hide just the socket copy,
   the widget itself is untouched. */
#top #socket .sub_menu_socket {
	display: none;
}
