/* ==========================================================================
   Eagle Rock Golf - home page redesign (2026-11)
   Loaded only by site/templates/home.php. Everything is scoped to .erg-home
   so the header/footer and other pages are untouched.
   ========================================================================== */

.erg-home {
	--erg-red: #a3082f;
	--erg-red-dark: #7f0624;
	--erg-red-soft: #fbeef1;
	--erg-gold: #f5c443;
	--erg-ink: #1f1f22;
	--erg-text: #45454b;
	--erg-muted: #6b6b72;
	--erg-line: #e6e3df;
	--erg-bg-soft: #f7f5f2;
	--erg-radius: 14px;
	--erg-shadow: 0 1px 2px rgba(20, 10, 12, .06), 0 6px 20px rgba(20, 10, 12, .06);
	--erg-shadow-hover: 0 2px 4px rgba(20, 10, 12, .08), 0 14px 32px rgba(20, 10, 12, .12);
	--erg-font-head: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
	--erg-font-body: "Barlow", "Helvetica Neue", Arial, sans-serif;
	--erg-gutter: clamp(16px, 4vw, 32px);

	font-family: var(--erg-font-body);
	color: var(--erg-text);
	overflow-x: clip;            /* belt-and-braces: never a horizontal scroll */
}

.erg-home *,
.erg-home *::before,
.erg-home *::after { box-sizing: border-box; }

.erg-home .erg-container {
	width: 100%;
	max-width: 1200px;
	margin-inline: auto;
	padding-inline: var(--erg-gutter);
}

.erg-home .erg-visually-hidden {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0);
	white-space: nowrap; border: 0;
}

.erg-home a:focus-visible,
.erg-home button:focus-visible {
	outline: 3px solid var(--erg-gold);
	outline-offset: 2px;
}

.erg-home button {
	font: inherit;
	cursor: pointer;
}

/* --------------------------------------------------------------------------
   Alerts: breaking news bar + emergency notice (+ legacy frost warning)
   -------------------------------------------------------------------------- */

.erg-home .erg-alerts .header-stick { margin: 0; }   /* frostwarning.inc */

.erg-news {
	background: #fff;
	border-bottom: 1px solid var(--erg-line);
}

.erg-news__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	padding-block: 10px;
}

.erg-news__label {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--erg-red);
	color: #fff;
	font-family: var(--erg-font-head);
	font-weight: 700;
	font-size: 14px;
	line-height: 1.2;
	letter-spacing: .06em;
	text-transform: uppercase;
	white-space: nowrap;
}

.erg-news__label::before {        /* small "live" dot */
	content: "";
	width: 7px; height: 7px;
	border-radius: 50%;
	background: var(--erg-gold);
}

.erg-home .erg-news__items {
	order: 3;
	flex: 1 1 100%;
	display: grid;               /* items stack in one cell; tallest sets the height */
	margin: 0;
	padding: 0;
	list-style: none;
	min-width: 0;
}

.erg-news__item {
	grid-area: 1 / 1;
	margin: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity .4s ease, visibility .4s;
}

.erg-news__item.is-active {
	opacity: 1;
	visibility: visible;
}

.erg-home .erg-news__item a {
	color: var(--erg-ink);
	font-weight: 600;
	font-size: 16px;
	line-height: 1.35;
	text-decoration: none;
}

.erg-home .erg-news__item a:hover { color: var(--erg-red); text-decoration: underline; }

.erg-news__nav {
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	gap: 2px;
	color: var(--erg-muted);
	font-size: 13px;
	font-variant-numeric: tabular-nums;
}

.erg-home .erg-news__nav button {
	display: inline-grid;
	place-items: center;
	width: 32px; height: 32px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--erg-ink);
}

.erg-home .erg-news__nav button:hover { background: var(--erg-bg-soft); color: var(--erg-red); }

@media (min-width: 768px) {
	.erg-news__inner { flex-wrap: nowrap; }
	.erg-home .erg-news__items { order: 0; flex: 1 1 auto; }
	.erg-news__nav { margin-left: 0; }
}

.erg-notice { background: var(--erg-bg-soft); padding-block: 14px; }

.erg-notice__card {
	border-left: 4px solid var(--erg-red);
	border-radius: 8px;
	background: #fff;
	box-shadow: var(--erg-shadow);
	padding: 14px 18px;
	color: var(--erg-ink);
	font-size: 15px;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

.erg-home .erg-notice__card p { margin: 0 0 .5em; }
.erg-home .erg-notice__card p:last-child { margin-bottom: 0; }
.erg-home .erg-notice__card p:empty { display: none; }
.erg-home .erg-notice__card a { color: var(--erg-red); text-decoration: underline; }

/* --------------------------------------------------------------------------
   Hero slider
   -------------------------------------------------------------------------- */

.erg-hero {
	position: relative;
	max-width: 2000px;
	margin-inline: auto;
	background: var(--erg-red-dark);
}

.erg-hero__viewport { overflow: hidden; }

.erg-hero__track {
	display: flex;
	transition: transform .6s cubic-bezier(.4, 0, .2, 1);
}

.erg-hero__slide {
	flex: 0 0 100%;
	min-width: 0;
}

.erg-home .erg-hero__link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.erg-hero__media {
	display: block;
	aspect-ratio: 2000 / 940;
	overflow: hidden;
	background: var(--erg-red-dark);
}

.erg-hero__media picture { display: block; width: 100%; height: 100%; }

.erg-hero__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;          /* geese image is a slightly wider ratio */
	object-position: center;
	transition: transform .6s ease;
}

.erg-hero__link:hover .erg-hero__media img { transform: scale(1.015); }

/* Phone caption under the image: banner text is baked in and tiny on phones */
.erg-hero__caption {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px 12px;
	min-height: 56px;
	padding: 10px var(--erg-gutter) 12px;
	background: var(--erg-red);
	color: #fff;
}

.erg-hero__caption-title {
	font-family: var(--erg-font-head);
	font-weight: 700;
	font-size: 20px;
	line-height: 1.15;
}

.erg-hero__caption-cta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 999px;
	background: #fff;
	color: var(--erg-red);
	font-family: var(--erg-font-head);
	font-weight: 700;
	font-size: 15px;
	letter-spacing: .04em;
	text-transform: uppercase;
	white-space: nowrap;
}

@media (min-width: 768px) {
	.erg-hero__caption { display: none; }
}

/* Controls sit over the image area (same aspect box as .erg-hero__media) */
.erg-hero__controls {
	position: absolute;
	inset: 0 0 auto 0;
	aspect-ratio: 2000 / 940;
	pointer-events: none;
}

.erg-home .erg-hero__arrow {
	pointer-events: auto;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	display: grid;
	place-items: center;
	width: 36px; height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .88);
	color: var(--erg-ink);
	box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
	transition: background .2s, color .2s, opacity .2s;
}

.erg-home .erg-hero__arrow:hover { background: #fff; color: var(--erg-red); }
.erg-hero__arrow--prev { left: 8px; }
.erg-hero__arrow--next { right: 8px; }

.erg-hero__dots {
	pointer-events: auto;
	position: absolute;
	left: 50%;
	bottom: 8px;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 3px 6px;
	border-radius: 999px;
	background: rgba(0, 0, 0, .35);
}

.erg-home .erg-hero__dot,
.erg-home .erg-hero__pause {
	display: grid;
	place-items: center;
	width: 24px; height: 24px;    /* comfortable tap target, small visual dot */
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
}

.erg-hero__dot::before {
	content: "";
	width: 8px; height: 8px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .6);
	transition: width .25s, background .25s;
}

.erg-hero__dot.is-active::before { width: 18px; background: #fff; }
.erg-home .erg-hero__dot.is-active { width: 30px; }

.erg-hero__pause .erg-icon-play { display: none; }
.erg-hero.is-paused-user .erg-hero__pause .erg-icon-play { display: block; }
.erg-hero.is-paused-user .erg-hero__pause .erg-icon-pause { display: none; }

@media (min-width: 768px) {
	.erg-home .erg-hero__arrow { width: 48px; height: 48px; }
	.erg-hero__arrow--prev { left: 20px; }
	.erg-hero__arrow--next { right: 20px; }
	.erg-hero__dots { bottom: 16px; }
	.erg-hero:not(:hover):not(:focus-within) .erg-hero__arrow { opacity: .7; }
}

/* No-JS: show the first slide only, hide controls */
.erg-hero:not(.is-ready) .erg-hero__controls { display: none; }

/* --------------------------------------------------------------------------
   Sections, cards, buttons
   -------------------------------------------------------------------------- */

.erg-section { padding-block: clamp(32px, 6vw, 72px); }

.erg-card {
	display: flex;
	background: #fff;
	border: 1px solid var(--erg-line);
	border-radius: var(--erg-radius);
	box-shadow: var(--erg-shadow);
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.erg-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 48px;
	padding: 12px 24px;
	border-radius: 999px;
	font-family: var(--erg-font-head);
	font-weight: 700;
	font-size: 18px;
	letter-spacing: .05em;
	text-transform: uppercase;
	text-decoration: none !important;
	transition: background .2s, transform .2s;
}

.erg-home .erg-btn--primary { background: var(--erg-red); color: #fff; }
.erg-home .erg-btn--primary:hover { background: var(--erg-red-dark); color: #fff; transform: translateY(-1px); }

/* Quick links */
.erg-quick { background: var(--erg-bg-soft); padding-block: clamp(24px, 4vw, 40px); }

.erg-home .erg-quick__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 560px)  { .erg-home .erg-quick__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1000px) { .erg-home .erg-quick__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }

.erg-home .erg-quick__grid > li { margin: 0; display: flex; }

.erg-home .erg-quick__card {
	flex: 1;
	align-items: center;
	gap: 14px;
	padding: 16px 18px;
	color: var(--erg-ink);
	text-decoration: none;
}

.erg-home .erg-quick__card:hover {
	transform: translateY(-2px);
	box-shadow: var(--erg-shadow-hover);
	border-color: rgba(163, 8, 47, .35);
	color: var(--erg-ink);
}

.erg-quick__icon {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 48px; height: 48px;
	border-radius: 12px;
	background: var(--erg-red-soft);
	color: var(--erg-red);
}

.erg-quick__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }

.erg-quick__title {
	font-family: var(--erg-font-head);
	font-weight: 700;
	font-size: 21px;
	line-height: 1.1;
	color: var(--erg-ink);
}

.erg-quick__text { font-size: 15px; line-height: 1.35; color: var(--erg-muted); }

.erg-quick__arrow {
	flex: 0 0 auto;
	color: var(--erg-red);
	font-size: 20px;
	transition: transform .2s;
}

.erg-quick__card:hover .erg-quick__arrow { transform: translateX(3px); }

/* About / intro */
.erg-about__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 28px;
	align-items: center;
}

@media (min-width: 900px) {
	.erg-about__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 56px; }
}

.erg-home .erg-about__title {
	margin: 0 0 16px;
	font-family: var(--erg-font-head);
	font-weight: 700;
	font-size: clamp(32px, 5vw, 48px);
	line-height: 1.05;
	letter-spacing: 0;
	text-transform: none;
	color: var(--erg-ink);
}

.erg-home .erg-about__title::after {     /* red accent rule */
	content: "";
	display: block;
	width: 64px;
	height: 4px;
	margin-top: 14px;
	border-radius: 2px;
	background: var(--erg-red);
}

.erg-home .erg-about__body {
	margin-bottom: 24px;
	font-size: 17px;
	line-height: 1.65;
	color: var(--erg-text);
	overflow-wrap: break-word;
}

.erg-home .erg-about__body p { margin: 0 0 1em; color: inherit; }

.erg-home .erg-about__body h2,
.erg-home .erg-about__body h3,
.erg-home .erg-about__body h4 {
	margin: 1.4em 0 .4em;
	font-family: var(--erg-font-head);
	font-weight: 700;
	line-height: 1.15;
	color: var(--erg-red);
}

.erg-home .erg-about__body h3 { font-size: 26px; }
.erg-home .erg-about__body a { color: var(--erg-red); text-decoration: underline; }
.erg-home .erg-about__body img { max-width: 100%; height: auto; }

.erg-about__media {
	display: flex;
	justify-content: center;
	padding: 24px;
	border-radius: var(--erg-radius);
	background: radial-gradient(circle at 50% 40%, #fff 0%, var(--erg-bg-soft) 70%);
}

.erg-about__media img {
	display: block;
	width: auto;
	max-width: 100%;
	max-height: 260px;
	height: auto;
}

@media (min-width: 900px) { .erg-about__media img { max-height: 420px; } }

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.erg-hero__track,
	.erg-hero__media img,
	.erg-news__item,
	.erg-card,
	.erg-btn,
	.erg-quick__arrow { transition: none !important; }
	.erg-hero__link:hover .erg-hero__media img,
	.erg-home .erg-quick__card:hover,
	.erg-home .erg-btn--primary:hover { transform: none; }
}
