/*
 * Fishy base look v2 – the global switch (fishy-tech/issues#833, G6).
 * Loaded only when the option fishy_theme_base_v2 is set (see functions.php). Overrides the old look from
 * legacy.css: textured background, dark heading boxes, rounded columns.
 *
 * Status: ON site-wide since 2026-12-05.
 * Check contest pages (wp-fishy-plugin) at desktop and mobile width after changes here.
 */

/* Background: the original grey halftone pattern from legacy.css stays (Thomas, 2026-12-05: "some part of me
   miss the grayish halftone pattern"). It was briefly replaced by flat #111; dimming it makes it vanish. */

/* Headings: no boxes. Sections are separated by a thin rule above the h2 instead. */
.fy-v2 .wp-block-heading {
	background: none !important;
	border-radius: 0 !important;
	padding-left: 0 !important;
	color: var(--fy-heading) !important;
}
.fy-v2 .entry-content > h2.wp-block-heading,
.fy-v2 .entry-content > .wp-block-group > h2.wp-block-heading {
	border-top: 1px solid var(--fy-rule);
	padding-top: 12px !important;
	margin-top: var(--fy-section-gap) !important;
}

/* No second line when the page already has a divider (Separator block) right above the heading */
.fy-v2 .entry-content > .wp-block-separator + h2.wp-block-heading,
.fy-v2 .entry-content > .wp-block-separator + .wp-block-spacer + h2.wp-block-heading {
	border-top: 0;
	padding-top: 0 !important;
}

/* Spacer blocks: see "Vertical rhythm" below. */

/* Headings inside a block that sets its own text colour on a light background (e.g. the plan boxes on
   /pris/): use that colour. The old dark heading box used to provide the contrast. */
/* Not on black/dark blocks: e.g. /fishy-live-system/ has black panels with text colour #000, where
   inheriting made the headings invisible. */
.fy-v2 .has-background.has-text-color:not(.has-black-background-color):not([class*="-dark"]):not(.has-ast-global-color-1-background-color):not(.has-ast-global-color-4-background-color):not(.has-ast-global-color-5-background-color):not(.has-ast-global-color-8-background-color) :is(.wp-block-heading, h2, h3) {
	color: inherit !important;
	border-top: 0 !important;
}

/* Columns: square, no panel look */
.fy-v2 .wp-block-columns { border-radius: 0 !important; }

/* Buttons: the Fishy style everywhere */
.fy-v2 .wp-block-button__link {
	background: var(--fy-btn) !important;
	color: var(--fy-accent) !important;
	border-radius: var(--fy-radius-ui) !important;
	font-weight: 600;
}
.fy-v2 .wp-block-button__link:hover {
	background: var(--fy-btn-hover) !important;
	color: #fff !important;
}

/* Sidebar widgets and post cards: no tinted panels on the flat background */
.fy-v2 .post,
.fy-v2 .widget_block {
	background-color: transparent !important;
}

/* Vertical rhythm (review 2026-12-05: "excessive vertical spacing"). The legacy CSS gives every heading
   line-height 1.75 and every list item 8px + 4px of extra space, and WordPress puts 1.75em under each
   Columns block; together with the section rule they stretched pages. */
.fy-v2 .entry-content .wp-block-heading {
	line-height: 1.3 !important;
	margin-bottom: 10px !important;
}
.fy-v2 .entry-content .wp-block-columns {
	margin-bottom: 0.75em;
}
.fy-v2 .entry-content ul.wp-block-list {
	margin-top: 6px !important;
	margin-bottom: 0.75em;
}
.fy-v2 .entry-content ul.wp-block-list li {
	margin-bottom: 4px !important;
	padding-bottom: 0 !important;
}
.fy-v2 .entry-content .wp-block-spacer {
	height: 8px !important;
}
/* Astra gives every top-level Columns block 18px top / 2.4em (~50px) bottom padding: the main source of
   the big gap under lists. Plain columns get none; coloured panels keep a moderate inner padding. */
.fy-v2 .entry-content > .wp-block-columns:not(.has-background) {
	padding-top: 4px !important;
	padding-bottom: 0 !important;
}
.fy-v2 .entry-content > .wp-block-columns.has-background {
	padding-top: 14px !important;
	padding-bottom: 14px !important;
}

/* ---------- Header: two call-to-action buttons in the main menu (menu items with classes fy-cta …) ---------- */
.fy-v2 .main-header-menu > li.fy-cta { display: flex; align-items: center; margin-left: 6px; }
.fy-v2 .main-header-menu > li.fy-cta > a.menu-link {
	padding: 7px 14px !important;
	margin: 0 !important;
	border-radius: var(--fy-radius-ui);
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
}
.fy-v2 .main-header-menu > li.fy-cta-primary > a.menu-link { background: var(--fy-accent); color: #111 !important; }
.fy-v2 .main-header-menu > li.fy-cta-primary > a.menu-link:hover { background: var(--fy-accent-hover); }
.fy-v2 .main-header-menu > li.fy-cta-secondary > a.menu-link { background: var(--fy-btn); color: var(--fy-accent) !important; }
.fy-v2 .main-header-menu > li.fy-cta-secondary > a.menu-link:hover { background: var(--fy-btn-hover); color: #fff !important; }
/* Mobile popup menu: the two actions as full-width buttons */
.fy-v2 #ast-hf-mobile-menu > li.fy-cta { margin: 8px 16px 0; border: 0 !important; }
.fy-v2 #ast-hf-mobile-menu > li.fy-cta > a.menu-link { justify-content: center; text-align: center; border-radius: var(--fy-radius-ui); padding: 10px 14px !important; font-weight: 600; }
.fy-v2 #ast-hf-mobile-menu > li.fy-cta-primary > a.menu-link { background: var(--fy-accent); color: #111 !important; }
.fy-v2 #ast-hf-mobile-menu > li.fy-cta-secondary > a.menu-link { background: var(--fy-btn); color: var(--fy-accent) !important; }

/* ---------- Footer link section (functions.php, astra_footer_before) ---------- */
.fy-footer { background: #20242d; border-top: 1px solid #3a4050; color: var(--fy-text); padding: 36px 0 26px; margin-top: 40px; }
.fy-footer-inner { display: grid; grid-template-columns: minmax(220px, 1.3fr) 3fr; gap: 40px; }
.fy-footer-about img { height: 38px; width: auto; margin-bottom: 12px; }
.fy-footer-about p { font-size: .92em; line-height: 1.5; margin: 0 0 .7em; color: var(--fy-text); }
.fy-footer-about .fy-footer-company { color: var(--fy-muted); font-size: .85em; }
.fy-footer-menu { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; list-style: none !important; margin: 0 !important; padding: 0; }
.fy-footer-menu > li { margin: 0 !important; padding: 0 !important; }
.fy-footer-menu > li > a { display: block; color: var(--fy-heading) !important; font-family: var(--fy-font-heading); font-weight: 600; margin-bottom: 8px; text-decoration: none; }
.fy-footer-menu .sub-menu { list-style: none !important; margin: 0 !important; padding: 0; }
.fy-footer-menu .sub-menu li { margin: 0 0 4px !important; padding: 0 !important; }
.fy-footer-menu .sub-menu a { color: var(--fy-text) !important; font-size: .92em; text-decoration: none; }
.fy-footer-menu .sub-menu a:hover { color: var(--fy-accent) !important; }
@media (max-width: 781px) {
	.fy-footer-inner { grid-template-columns: 1fr; gap: 24px; }
	.fy-footer-menu { grid-template-columns: repeat(2, 1fr); }
}
/* The footer bar below: same family, quieter */
.fy-v2 .site-above-footer-wrap { border-top: 0 !important; }
/* Astra decorates any nav menu with dropdown arrows/toggles; not wanted in the footer columns */
.fy-footer-menu .ast-icon,
.fy-footer-menu .dropdown-menu-toggle,
.fy-footer-menu .ast-menu-toggle,
.fy-footer-menu .menu-link .ast-icon { display: none !important; }
.fy-footer-menu .sub-menu { display: block !important; position: static !important; opacity: 1 !important; visibility: visible !important; box-shadow: none !important; background: none !important; border: 0 !important; width: auto !important; }
.fy-footer-menu a, .fy-footer-menu .menu-link { padding: 0 !important; display: inline-block !important; line-height: 1.4; }
/* Narrow desktops: the mobile header starts below 1100px (astra_header_break_point filter in functions.php).
   Between 1101 and 1199px show only the flag in the language switcher so the header stays on one line. */
@media (min-width: 1101px) and (max-width: 1199px) {
	.fy-v2 #ast-hf-menu-1 > li > .menu-link .trp-ls-language-name { display: none; }
}
