/* SRGFX "Who it's for" highlights row on the homepage (2026-11-10, Ray). PHP: functions/template/home-audiences.php */
.srgfx-aud { background: #e9edf2; padding: 16px 16px 0; color: #002d4a; font-family: "Source Sans Pro", sans-serif; }
.srgfx-aud-inner { position: relative; max-width: 1400px; margin: 0 auto; }
.srgfx-aud-bar { display: flex; align-items: center; gap: 12px; }
.srgfx-aud-lead { flex: none; font: 600 26px/1 'Teko', Arial, sans-serif; text-transform: uppercase; color: #002d4a; white-space: nowrap; padding-top: 4px; }
.site ul.srgfx-aud-tabs { flex: 1 1 auto; display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; min-width: 0; }
.srgfx-aud-tabs::-webkit-scrollbar { display: none; }
.srgfx-aud-tabs li { flex: 1 0 auto; margin: 0; }
.site button.srgfx-aud-tab { display: flex; width: 100%; justify-content: center; align-items: center; gap: 7px; margin: 0; padding: 9px 12px; border: 0; border-radius: 999px; background: #fff; color: #002d4a; font: 600 14px/1.2 "Source Sans Pro", sans-serif; white-space: nowrap; cursor: pointer; box-shadow: none; transition: background-color .18s ease-out, color .18s ease-out; }
.srgfx-aud-tab .fas { font-size: 13px; color: #fe4830; transition: color .18s ease-out, transform .18s ease-out; }
.srgfx-aud-tab .srgfx-aud-chev { display: none; }
/* Ray's SVG icons (assets/srgfx-icons/) and the drawn steering wheel */
.srgfx-aud-ico { flex: none; display: block; height: 14px; width: auto; fill: currentColor; color: #fe4830; transition: color .18s ease-out; }
.srgfx-aud-tab[aria-expanded="true"] .srgfx-aud-ico { color: #fff; }
.site button.srgfx-aud-tab:hover { background: #dfe5ec; color: #002d4a; }
.site button.srgfx-aud-tab[aria-expanded="true"] { background: #002d4a; color: #fff; }
.srgfx-aud-tab[aria-expanded="true"] .fas { color: #fff; }
.srgfx-aud-tab[aria-expanded="true"] .srgfx-aud-chev { transform: rotate(180deg); }
.site button.srgfx-aud-tab:focus-visible, .srgfx-aud a:focus-visible, .site button.srgfx-aud-x:focus-visible { outline: 3px solid #ffd166; outline-offset: 2px; }

/* The panel */
.srgfx-aud-drop { opacity: 0; visibility: hidden; transition: opacity .18s ease-out, transform .18s ease-out, visibility 0s linear .18s; }
.srgfx-aud.is-open .srgfx-aud-drop { opacity: 1; visibility: visible; transition: opacity .18s ease-out, transform .18s ease-out, visibility 0s; }
.srgfx-aud-panel { position: relative; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; align-items: center; padding: 18px 22px 18px 18px; border-radius: 12px; background: #f4f6f8; animation: srgfx-aud-in .18s ease-out; }
.srgfx-aud-panel[hidden] { display: none; }
@keyframes srgfx-aud-in { from { opacity: 0; } to { opacity: 1; } }
.srgfx-aud-pic { display: flex; align-items: center; justify-content: center; height: 200px; }
.srgfx-aud-pic img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 6px; }
/* Racing wraps: the cars drift up in one slow strip that never stops (the PHP prints the cars twice; moving up 50% = one set) */
.srgfx-aud-pic.srgfx-aud-roll { display: block; overflow: hidden; }
.srgfx-aud-roll-track { animation: srgfx-aud-up var(--roll-time, 32s) linear infinite; }
.srgfx-aud-roll-slide { padding-bottom: 6px; }
.srgfx-aud-roll-slide img { display: block; width: 100%; max-height: none; height: auto; margin: 0 auto; border-radius: 0; }
@keyframes srgfx-aud-up { from { transform: translateY(0); } to { transform: translateY(-50%); } }
/* iRacing and Sim: logo with title, then a game controller and steering wheel */
.srgfx-aud-pic.srgfx-aud-sim { flex-direction: column; gap: 14px; }
.srgfx-aud-sim > .srgfx-aud-ico { height: 120px; width: auto; }
.srgfx-aud-sim-row { display: flex; align-items: center; gap: 22px; color: #002d4a; }
.srgfx-aud-sim-row .fas { font-size: 30px; color: #002d4a; }
.srgfx-aud-sim-row .srgfx-aud-ico { height: 28px; color: #002d4a; }
.srgfx-aud-tab .srgfx-aud-ico-iracing-logo { height: 15px; }
.srgfx-aud-copy h3 { margin: 0 0 8px; font: 600 30px/1 'Teko', Arial, sans-serif; text-transform: uppercase; color: #002d4a; padding-top: 4px; }
.site .srgfx-aud-copy p { margin: 0 0 14px; font-size: 16px; line-height: 1.45; color: #34414f; }
.srgfx-aud-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.srgfx-aud-links a, .srgfx-aud-links a:visited { font-weight: 700; font-size: 15px; color: #fe4830; text-decoration: none; white-space: nowrap; transition: opacity .15s ease-out; }
.srgfx-aud-links a:hover { opacity: .75; text-decoration: none; }
.site button.srgfx-aud-x { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #7b8794; font-size: 15px; cursor: pointer; transition: background-color .15s ease-out; }
.site button.srgfx-aud-x:hover { background: #e4e8ed; color: #002d4a; }

/* Desktop: the panel floats over the cards under the row, lined up with the label that opened it (left set by the script) */
@media (min-width: 768px) {
	.srgfx-aud-drop { position: absolute; z-index: 60; top: 100%; left: 0; width: min(760px, 100%); padding-top: 8px; transform: translateY(-4px); }
	.srgfx-aud.is-open .srgfx-aud-drop { transform: none; }
	/* Heading + all 5 labels on one line in the ~1184px column */
	.srgfx-aud-bar { gap: 10px; }
	.srgfx-aud-lead { font-size: 22px; }
	.site ul.srgfx-aud-tabs { gap: 5px; }
	.site button.srgfx-aud-tab { gap: 5px; padding: 7px 8px; font-size: 13px; }
	.srgfx-aud-tab .fas { font-size: 11px; }
	.srgfx-aud-ico { height: 12px; }
	.srgfx-aud-lead { font-size: 21px; }
	.site ul.srgfx-aud-tabs { gap: 4px; }
	.site button.srgfx-aud-tab { padding: 7px 7px; }
}
.srgfx-aud-ico.srgfx-aud-ico-pencil { height: auto; width: 28px; }

/* Phone: labels swipe sideways; the panel opens in place under them and pushes the page down */
@media (max-width: 767px) {
	.srgfx-aud { padding: 10px 0 0; }
	.srgfx-aud-bar { flex-direction: column; align-items: stretch; gap: 6px; }
	.srgfx-aud-lead { padding: 4px 16px 0; font-size: 22px; }
	.site ul.srgfx-aud-tabs { padding: 0 16px; }
	.srgfx-aud-tabs li { flex: none; }
	.site button.srgfx-aud-tab { padding: 8px 12px; font-size: 14px; }
	.srgfx-aud-drop { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .2s ease-out, opacity .18s ease-out, visibility 0s linear .2s; }
	.srgfx-aud.is-open .srgfx-aud-drop { grid-template-rows: 1fr; transition: grid-template-rows .2s ease-out, opacity .18s ease-out, visibility 0s; }
	.srgfx-aud-drop-in { min-height: 0; overflow: hidden; padding: 0 16px; }
	.srgfx-aud.is-open .srgfx-aud-drop-in { padding-top: 10px; }
	.srgfx-aud-panel { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
	.srgfx-aud-pic { height: 170px; }
	.srgfx-aud-copy h3 { font-size: 26px; padding-right: 30px; }
	.site .srgfx-aud-copy p { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
	.srgfx-aud-drop, .srgfx-aud-panel, .srgfx-aud-tab .fas, .srgfx-aud-roll-track { transition: none !important; animation: none !important; }
}
