/*
 * Fishy components (.fy-*). Generalised from the Sportfiskarna page (fishy-tech/issues#833).
 * Each component only styles elements carrying its class, so this file is safe to load site-wide.
 * The matching block patterns are in /patterns.
 */

/* Lead paragraph under a page title */
.fy-lead { font-size: 1.15em; line-height: 1.55; color: var(--fy-strong); max-width: var(--fy-measure); }

/* Partner / brand row: logos separated by "+" and a muted note */
.fy-brands { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: 22px 0 26px; }
.fy-brands img { height: 42px; width: auto; display: block; }
.fy-brands .fy-brands-x { color: var(--fy-muted); font-size: 1.1em; }
.fy-brands .fy-brands-note { color: var(--fy-muted); font-size: .92em; border-left: 1px solid #444; padding-left: 18px; }

/* Wide opening photo, cropped to a calm landscape ratio */
.fy-hero img { width: 100%; height: auto; aspect-ratio: 16 / 8.5; object-fit: cover; object-position: center 12%; border-radius: 0; }

/* Numbered points with thin rules – replaces icon cards */
.fy-points { list-style: none !important; margin: 0 !important; padding: 0; counter-reset: fy-point; }
.fy-points > li { counter-increment: fy-point; position: relative; padding: 14px 0 14px 46px; border-top: 1px solid var(--fy-rule); margin: 0 !important; }
.fy-points > li:last-child { border-bottom: 1px solid var(--fy-rule); }
.fy-points > li::before { content: counter(fy-point); position: absolute; left: 0; top: 12px; font-family: var(--fy-font-heading); font-weight: 600; font-size: 1.6em; line-height: 1; color: var(--fy-accent); }
.fy-points > li::marker { content: none; }
.fy-points strong { display: block; color: var(--fy-strong); margin-bottom: 2px; }

/* Step list: label column + text column, ruled */
.fy-steps { list-style: none !important; margin: 0 !important; padding: 0; counter-reset: fy-step; }
.fy-steps > li { counter-increment: fy-step; display: grid; grid-template-columns: 7.5em 1fr; gap: 14px; padding: 10px 0; border-top: 1px solid var(--fy-rule); margin: 0 !important; }
.fy-steps > li::marker { content: none; }
.fy-steps > li > strong { color: var(--fy-heading); font-weight: 600; }
.fy-steps > li > strong::before { content: counter(fy-step) ". "; color: var(--fy-accent); }

/* Row of app screenshots: identical size, subtle radius, no frames */
.fy-screens { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin: 8px 0 22px; }
.fy-screens figure { margin: 0; display: flex; flex-direction: column; align-items: center; }
.fy-screens img { width: 100%; max-width: 250px; height: auto; aspect-ratio: 784 / 1598; object-fit: cover; margin: 0 auto; border-radius: var(--fy-radius-img); }
.fy-screens figcaption { text-align: center; }

/* Strip of event images with captions */
.fy-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 10px 0 20px; }
.fy-strip figure { margin: 0; }
.fy-strip img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; display: block; }

/* Captions and small print */
.fy-strip figcaption, .fy-screens figcaption, .fy-caption { color: var(--fy-muted); font-size: .85em; margin: 6px 0 0; }
.fy-small { font-size: .92em; color: var(--fy-muted); }
.fy-closing { border-top: 1px solid var(--fy-rule); margin-top: var(--fy-section-gap); padding-top: 18px; }

/* Button in the Fishy style, for use before the global base switch: add class "fy-button" to a Buttons block */
.fy-button .wp-block-button__link { background: var(--fy-btn) !important; color: var(--fy-accent) !important; border-radius: var(--fy-radius-ui) !important; padding: 9px 20px !important; font-weight: 600; }
.fy-button .wp-block-button__link:hover { background: var(--fy-btn-hover) !important; color: #fff !important; }

@media (max-width: 781px) {
	.fy-steps > li { grid-template-columns: 1fr; gap: 2px; }
	.fy-screens { gap: 10px; }
	.fy-strip { grid-template-columns: repeat(2, 1fr); }
	.fy-brands img { height: 34px; }
	.fy-brands .fy-brands-note { border-left: 0; padding-left: 0; flex-basis: 100%; }
	.fy-hero img { aspect-ratio: 4 / 3; }
}
