/* Beach Events — front-end styles.
 * Colors come from includes/config.php as CSS variables (--be-ocean, --be-sand, ...).
 * Everything is scoped under .be / .be-* so it won't fight your theme.
 */

.be, .be-bottomnav {
	--be-radius: 16px;
	--be-radius-sm: 10px;
	--be-shadow: 0 1px 2px rgba(7, 59, 76, .06), 0 6px 20px rgba(7, 59, 76, .08);
	--be-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--be-gap: clamp(12px, 3vw, 20px);
	font-family: var(--be-font);
	color: var(--be-ink, #1E2A32);
	box-sizing: border-box;
}
.be *, .be *::before, .be *::after { box-sizing: inherit; }

.be-main { width: 100%; }
.be [hidden] { display: none !important; }
.be { max-width: 1200px; margin: 0 auto; padding: 12px 16px 40px; line-height: 1.5; font-size: 16px; }
.be a { color: var(--be-ocean); }
.be h1, .be h2, .be h3 { color: var(--be-ocean-deep); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .4em; }
.be h1 { font-size: clamp(28px, 6vw, 44px); font-weight: 800; }
.be h2 { font-size: clamp(20px, 4vw, 26px); font-weight: 750; }
.be-h3, .be h3 { font-size: 18px; font-weight: 700; }
.be-muted { color: var(--be-muted); }
.be-small { font-size: 14px; }

.be-icon { width: 1.1em; height: 1.1em; vertical-align: -0.18em; flex: none; }

/* ---------- Buttons ---------- */
.be-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 2px solid var(--be-ocean);
	background: var(--be-ocean); color: #fff !important; font: 600 15px/1.2 var(--be-font);
	text-decoration: none !important; cursor: pointer; transition: transform .12s ease, background .15s ease;
	-webkit-tap-highlight-color: transparent;
}
.be-btn:hover { background: var(--be-ocean-deep); border-color: var(--be-ocean-deep); }
.be-btn:active { transform: scale(.97); }
.be-btn:focus-visible, .be-chip:focus-visible, .be-card__link:focus-visible { outline: 3px solid var(--be-sunset); outline-offset: 2px; }
.be-btn--lg { min-height: 52px; padding: 12px 24px; font-size: 16px; }
.be-btn--sunset { background: var(--be-sunset); border-color: var(--be-sunset); }
.be-btn--sunset:hover { background: var(--be-coral); border-color: var(--be-coral); }
.be-btn--light { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.6); }
.be-btn--light:hover { background: rgba(255,255,255,.26); border-color: #fff; }
.be-btn--ghost { background: transparent; color: var(--be-ocean) !important; }
.be-btn--ghost:hover { background: var(--be-sky); }
.be-btn--block { width: 100%; margin-top: 10px; }

/* ---------- Hero ---------- */
.be-hero {
	position: relative; overflow: hidden; border-radius: calc(var(--be-radius) + 6px);
	background:
		radial-gradient(120% 80% at 100% 0%, rgba(242,120,75,.55) 0%, rgba(242,120,75,0) 55%),
		linear-gradient(160deg, var(--be-ocean) 0%, var(--be-ocean-deep) 100%);
	color: #fff; padding: clamp(28px, 7vw, 64px) clamp(20px, 5vw, 56px) clamp(56px, 9vw, 88px);
	margin: 8px 0 20px;
}
.be-hero::after { /* sand + wave edge */
	content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 44px;
	background: var(--be-sand);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 44' preserveAspectRatio='none'%3E%3Cpath d='M0 22 C150 0 300 44 450 22 S750 0 900 22 1050 44 1200 22 V44 H0Z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 44' preserveAspectRatio='none'%3E%3Cpath d='M0 22 C150 0 300 44 450 22 S750 0 900 22 1050 44 1200 22 V44 H0Z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
}
.be-hero__inner { position: relative; z-index: 1; max-width: 720px; }
.be-hero .be-hero__title { color: #fff; font-size: clamp(32px, 8vw, 58px); font-weight: 850; margin-bottom: 10px; }
.be-hero__sub { font-size: clamp(16px, 2.6vw, 19px); opacity: .92; margin: 0 0 20px; max-width: 46ch; }
.be-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; margin: 0 0 12px; color: #FFD9C7; }
.be-hero__stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.be-stat { display: flex; flex-direction: column; min-width: 120px; padding: 12px 16px; border-radius: var(--be-radius-sm); background: rgba(255,255,255,.12); color: #fff !important; text-decoration: none !important; backdrop-filter: blur(4px); }
.be-stat strong { font-size: 30px; line-height: 1; font-weight: 850; }
.be-stat span { font-size: 14px; opacity: .9; margin-top: 4px; }
.be-hero__cta { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Chips ---------- */
.be-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; margin: 0 -16px 8px; padding-left: 16px; padding-right: 16px; scroll-snap-type: x proximity; scrollbar-width: none; }
.be-chips::-webkit-scrollbar { display: none; }
.be-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--be-sand); color: var(--be-ocean-deep) !important; font-size: 13px; font-weight: 650; text-decoration: none !important; white-space: nowrap; border: 1px solid var(--be-sand-dark); }
.be-chip--sm { font-size: 12px; padding: 2px 9px; }
.be-chip--lg { min-height: 44px; padding: 8px 16px; font-size: 15px; scroll-snap-align: start; background: #fff; box-shadow: var(--be-shadow); border-color: transparent; }
.be-chip--lg:hover { background: var(--be-sky); }
.be-chip.is-active { background: var(--be-ocean); color: #fff !important; }
.be-chip--sunset { background: var(--be-sunset); color: #fff !important; border-color: var(--be-sunset); }
.be-chip--warn { background: #FFF3CD; border-color: #F0D98A; }
.be-chip--concerts { --c: #7B5CD6; } .be-chip--festivals { --c: #E4572E; } .be-chip--farmers-markets { --c: #3F8F4F; }
.be-chip--charity { --c: #D64C7F; } .be-chip--sports { --c: #1F7FB5; } .be-chip--nightlife { --c: #3D3A8C; }
.be-chip--family { --c: #E59A1A; } .be-chip--other { --c: #5B6B75; }
.be-chip--sm[class*="be-chip--"]:not(.be-chip--warn) { color: var(--c, var(--be-ocean-deep)) !important; background: color-mix(in srgb, var(--c, #0B5E7E) 12%, white); border-color: transparent; }
.be-chip--lg[class*="be-chip--"] .be-icon { color: var(--c, var(--be-ocean)); }
.be-chip--lg.is-active .be-icon { color: #fff; }

/* ---------- Sections ---------- */
.be-section { margin: 28px 0; }
.be-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.be-section__head h2 { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.be-section__head small { font-size: 14px; font-weight: 600; color: var(--be-muted); }
.be-more { font-weight: 700; text-decoration: none; white-space: nowrap; padding: 10px 0; }
.be-section--featured .be-section__head h2 .be-icon { color: var(--be-sunset); }
.be-pagehead { margin: 8px 0 12px; }
.be-pagehead h1 { margin-bottom: 4px; }

/* ---------- Cards ---------- */
.be-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: var(--be-gap); }
.be-card { background: #fff; border-radius: var(--be-radius); box-shadow: var(--be-shadow); overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.be-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(7,59,76,.06), 0 12px 28px rgba(7,59,76,.12); }
.be-card__link { display: flex; flex-direction: column; height: 100%; color: inherit !important; text-decoration: none !important; }
.be-card__media { position: relative; aspect-ratio: 16 / 9; background: var(--be-sky); }
.be-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.be-card__body { padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.be .be-card__title { font-size: 17px; font-weight: 750; margin: 2px 0 0; color: var(--be-ink); }
.be-card__meta { display: flex; flex-direction: column; gap: 2px; margin: 0; font-size: 14px; color: var(--be-muted); }
.be-card__meta span { display: inline-flex; gap: 6px; align-items: flex-start; }
.be-card__meta .be-icon { margin-top: 2px; color: var(--be-ocean); }
.be-card__desc { margin: 2px 0 0; font-size: 14px; color: var(--be-ink); opacity: .85; }
.be-datebadge { position: absolute; left: 10px; top: 10px; display: flex; flex-direction: column; align-items: center; min-width: 48px; padding: 4px 8px 6px; border-radius: 12px; background: #fff; box-shadow: var(--be-shadow); line-height: 1; }
.be-datebadge__m { font-size: 11px; font-weight: 800; color: var(--be-sunset); text-transform: uppercase; letter-spacing: .06em; }
.be-datebadge__d { font-size: 22px; font-weight: 850; color: var(--be-ocean-deep); margin-top: 2px; }
.be-flag { position: absolute; right: 10px; top: 10px; background: var(--be-sunset); color: #fff; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; }

/* Placeholder art: gradient + category icon (used when there's no photo) */
.be-ph { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.92);
	background:
		radial-gradient(90% 70% at 85% 10%, rgba(255,214,170,.65), transparent 60%),
		linear-gradient(170deg, var(--ph1, #2A8FB0), var(--ph2, #0B5E7E));
}
.be-ph::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: linear-gradient(180deg, transparent, rgba(246,239,227,.55)); }
.be-ph__icon { width: 34%; max-width: 72px; height: auto; position: relative; z-index: 1; stroke-width: 1.6; }
.be-cat-concerts .be-ph { --ph1: #8F74E0; --ph2: #3D3A8C; }
.be-cat-festivals .be-ph { --ph1: #F59A6A; --ph2: #E4572E; }
.be-cat-farmers-markets .be-ph { --ph1: #7CC08A; --ph2: #2E7A42; }
.be-cat-charity .be-ph { --ph1: #F08AB0; --ph2: #B83A6A; }
.be-cat-sports .be-ph { --ph1: #4FB2E3; --ph2: #1F6F9E; }
.be-cat-nightlife .be-ph { --ph1: #5A55B8; --ph2: #1E1C52; }
.be-cat-family .be-ph { --ph1: #F7C14A; --ph2: #E07B1A; }
.be-ph--venue { --ph1: #5FB8C9; --ph2: #0B5E7E; }
.be-ph--lg { position: relative; aspect-ratio: 21 / 9; max-height: 300px; width: 100%; border-radius: var(--be-radius); }

/* Compact cards in swipe rows */
.be-row { display: grid; grid-auto-flow: column; grid-auto-columns: min(78%, 280px); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 14px; margin: 0 -16px; scrollbar-width: thin; }
.be-row__item { scroll-snap-align: start; display: flex; }
.be-row__item .be-card { width: 100%; }
.be-card--compact .be-card__title { font-size: 16px; }

/* ---------- Filters + view toggle ---------- */
.be-filters { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; margin: 4px 0 18px; }
.be-filters__panel { flex: 1 1 auto; }
.be-filters__panel > summary { list-style: none; }
.be-filters__panel > summary::-webkit-details-marker { display: none; }
.be-filters__fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 12px; padding: 16px; background: #fff; border-radius: var(--be-radius); box-shadow: var(--be-shadow); }
.be-filters label, .be-form label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 650; color: var(--be-ocean-deep); }
.be input[type=text], .be input[type=email], .be input[type=url], .be input[type=date], .be input[type=time], .be select, .be textarea {
	min-height: 46px; padding: 10px 12px; border: 1.5px solid var(--be-sand-dark); border-radius: var(--be-radius-sm); background: #fff; font: 16px/1.3 var(--be-font); color: var(--be-ink); width: 100%;
}
.be textarea { min-height: auto; }
.be input:focus, .be select:focus, .be textarea:focus { outline: none; border-color: var(--be-ocean); box-shadow: 0 0 0 3px rgba(11,94,126,.15); }
.be-filters__actions { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.be-viewtoggle { display: inline-flex; background: #fff; border-radius: 999px; box-shadow: var(--be-shadow); padding: 4px; }
.be-viewtoggle__btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 16px; border: 0; border-radius: 999px; background: transparent; color: var(--be-ocean-deep); font: 650 15px var(--be-font); cursor: pointer; }
.be-viewtoggle__btn.is-active { background: var(--be-ocean); color: #fff; }

/* ---------- Map ---------- */
.be-mapwrap { margin-bottom: 20px; }
.be-map { height: 60vh; min-height: 280px; border-radius: var(--be-radius); overflow: hidden; box-shadow: var(--be-shadow); background: var(--be-sky); z-index: 0; }
.be-map__empty { margin-top: 8px; }
.be-pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--be-sunset); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.be-pin--concerts { background: #7B5CD6; } .be-pin--farmers-markets { background: #3F8F4F; } .be-pin--charity { background: #D64C7F; }
.be-pin--sports { background: #1F7FB5; } .be-pin--nightlife { background: #3D3A8C; } .be-pin--family { background: #E59A1A; }
.be-popup strong { display: block; font-size: 15px; color: var(--be-ocean-deep); }
.be-popup span { display: block; color: var(--be-muted); font-size: 13px; }

/* ---------- Single ---------- */
.be-crumbs { font-size: 14px; color: var(--be-muted); margin: 4px 0 12px; overflow-wrap: anywhere; }
.be-crumbs a { text-decoration: none; }
.be-single__media img { width: 100%; max-height: 460px; object-fit: cover; border-radius: var(--be-radius); display: block; }
.be-single__layout { display: grid; gap: 24px; margin-top: 20px; }
@media (min-width: 880px) { .be-single__layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } .be-single__side { position: sticky; top: 24px; } }
.be .be-single__title { margin-top: 10px; }
.be-lede { font-size: 19px; color: var(--be-ink); }
.be-prose { font-size: 17px; }
.be-panel { background: #fff; border-radius: var(--be-radius); box-shadow: var(--be-shadow); padding: 18px; margin-bottom: 16px; }
.be-facts { margin: 0; display: grid; gap: 14px; }
.be-facts > div { display: grid; gap: 2px; }
.be-facts dt { display: flex; align-items: center; gap: 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: var(--be-sunset); }
.be-facts dd { margin: 0; font-weight: 600; }

/* ---------- Misc ---------- */
.be-alert { padding: 12px 16px; border-radius: var(--be-radius-sm); margin: 0 0 16px; font-weight: 600; }
.be-alert--ok { background: #E3F4E8; color: #1E5E33; }
.be-alert--err { background: #FDE4E1; color: #8A2414; }
.be-alert--warn { background: #FFF3CD; color: #6B4E00; }
.be-empty { text-align: center; padding: 28px 16px; background: var(--be-sand); border-radius: var(--be-radius); }
.be-banner { text-align: center; margin: 36px 0 8px; padding: clamp(24px, 6vw, 44px) 20px; border-radius: calc(var(--be-radius) + 6px); background: linear-gradient(135deg, var(--be-sand) 0%, #FBE3D5 100%); }
.be-banner h2 { margin-bottom: 6px; }
.be-banner p { margin: 0 0 16px; }
.be-cities { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.be-city { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 16px; border-radius: var(--be-radius); background: #fff; box-shadow: var(--be-shadow); text-decoration: none !important; color: var(--be-ink) !important; }
.be-city .be-icon { color: var(--be-ocean); width: 24px; height: 24px; }
.be-city.is-soon { opacity: .6; box-shadow: none; background: var(--be-sand); }
.be-city em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--be-sunset); margin-left: 4px; }
.be-linklist { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 15px; }
.be-pagination ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 24px 0; justify-content: center; }
.be-pagination a, .be-pagination span { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 12px; border-radius: 999px; background: #fff; box-shadow: var(--be-shadow); text-decoration: none; font-weight: 700; }
.be-pagination .current { background: var(--be-ocean); color: #fff; }

/* Forms */
.be-formwrap { max-width: 760px; padding: 0; }
.be-form fieldset { border: 0; padding: 18px; margin: 0 0 16px; background: #fff; border-radius: var(--be-radius); box-shadow: var(--be-shadow); display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.be-form legend { font-weight: 800; color: var(--be-ocean-deep); padding: 0; margin-bottom: 4px; float: left; width: 100%; grid-column: 1 / -1; font-size: 18px; }
.be-form legend small, .be-form label small { font-weight: 500; color: var(--be-muted); }
.be-span2 { grid-column: 1 / -1; }
.be-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Mobile bottom nav ---------- */
.be-bottomnav { display: none; }
@media (max-width: 782px) {
	body.be-has-bottom-nav { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
	.be-bottomnav {
		display: grid; grid-template-columns: repeat(5, 1fr);
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999;
		background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(10px);
		border-top: 1px solid var(--be-sand-dark);
		padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
		box-shadow: 0 -4px 18px rgba(7,59,76,.08);
	}
	.be-bottomnav__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; border-radius: 12px; color: var(--be-muted) !important; text-decoration: none !important; font: 650 11px/1 var(--be-font); -webkit-tap-highlight-color: transparent; }
	.be-bottomnav__item .be-icon { width: 24px; height: 24px; }
	.be-bottomnav__item.is-active { color: var(--be-ocean) !important; }
	.be-bottomnav__item.is-active .be-icon { stroke-width: 2.4; }
	.be-bottomnav__item.is-cta .be-icon { color: var(--be-sunset); }
}

/* Small phones (320px) */
@media (max-width: 360px) {
	.be { padding-left: 12px; padding-right: 12px; }
	.be-chips, .be-row { margin-left: -12px; margin-right: -12px; padding-left: 12px; padding-right: 12px; }
	.be-stat { min-width: 0; flex: 1; }
	.be-hero__cta .be-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.be-card, .be-btn { transition: none; }
	.be-card:hover { transform: none; }
}
