/**
 * Enfold 8.x compatibility layer for literacy-ny.
 * Restores Enfold 4.5.6 layout behaviour that later Enfold versions changed in the parent CSS.
 * Child-theme CSS only; no classes or inline styles in page content.
 */

/* Enfold 4.8.9.1 added ".responsive #top .no_margin.av_one_fourth { width: 50% }" for
   768px-989px. On 4.5.6 "#top .no_margin.av_one_fourth { width: 25% }" applied there, so
   no-margin 1/4 columns stayed 1/4 wide (staff photos and the 1/4 + 1/4 + 1/2 lists on
   About > Our People). This file loads before main.css, so main.css section rules of equal
   specificity (home tiles 2x2, Lit Night Out / Scrabble stacking) still win, as on 4.5.6. */
@media only screen and (min-width: 768px) and (max-width: 989px) {
	.responsive #top .no_margin.av_one_fourth {
		margin-left: 0;
		width: 25%;
	}
}

/* Enfold 4.7.4.1 floats equal-height column rows and 4.7.5.1 adds 50px above every one
   that is not the first element (extra vertical gaps on About, Lit Night Out, Our People).
   Neither is present on 4.5.6. */
#top .flex_column_table {
	float: none;
}
#top .flex_column_table.av-equal-height-column-flextable:not(:first-child) {
	margin-top: 0;
}

/* Enfold 5.0.2 removed the 20px gap between stacked no-margin grid row cells at 768px-989px.
   On 4.5.6 tablets kept it (white gaps between the statistic tiles on About); phones had none. */
@media only screen and (min-width: 768px) and (max-width: 989px) {
	.responsive #top #wrap_all .av-break-at-tablet .flex_cell.no_margin {
		margin-bottom: 20px;
	}
}

/* Enfold 8 writes grid row cell padding into per-element CSS with !important, which now beats
   the phone rule that gives stacked no-margin cells 8% side padding. On 4.5.6 the cell padding
   was an inline style and the 8% phone padding won (statistic tiles on About). */
@media only screen and (max-width: 767px) {
	.responsive #top #wrap_all .av-flex-cells .no_margin.av-gridrow-cell:not(.av-zero-padding) {
		padding-left: 8% !important;
		padding-right: 8% !important;
	}
}

/* Enfold 8 prints an empty social sharing box under single posts when no share links are
   enabled; its margin added 30px above the footer on blog posts. 4.5.6 printed nothing. */
.av-social-sharing-box:empty {
	display: none;
}

/* Enfold (WP 6.1 fix) adds "#top a:where(:not(.wp-element-button)) { text-decoration: none }",
   which out-ranks main.css ".avia_textblock p > a { text-decoration: underline }", so links in
   text blocks lost their underline (footer phone, email and Form 990 links, body copy). */
#top .avia_textblock p > a {
	text-decoration: underline;
}
