/*
Theme Name: SpringRock Water
Theme URI: https://springrockwater.com
Author: yIT Company LLC
Author URI: https://yitcompany.com
Description: Theme for SpringRock Water, rebuilt in WordPress from the original site. Top bar, sticky header, hero, and footer match the previous design; page content is edited in the block editor.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: springrock
*/

:root {
	--sr-navy: #2b3e90;
	--sr-sky: #2ca6df;
	--sr-pale: #e9f6fc;
	--sr-text: #252525;
	--sr-heading: #555555;
	--sr-muted: #787878;
	--sr-line: #e6e6e6;
	--sr-width: 1170px;
	--sr-font: "Nunito", "Segoe UI", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	margin: 0;
	font-family: var(--sr-font);
	font-size: 17px;
	line-height: 1.75;
	color: var(--sr-text);
	background: #fff;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--sr-sky); text-decoration: none; }
a:hover, a:focus { color: var(--sr-navy); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
	outline: 3px solid var(--sr-sky);
	outline-offset: 2px;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--sr-font);
	color: var(--sr-heading);
	font-weight: 700;
	line-height: 1.25;
	margin: 0 0 .6em;
}
h1 { font-size: 2.1rem; }
h2 { font-size: 1.85rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto;
	top: 8px; left: 8px; z-index: 1000;
	background: #fff; color: var(--sr-navy);
	padding: 10px 16px;
}

.sr-container {
	width: 100%;
	max-width: var(--sr-width);
	margin: 0 auto;
	padding: 0 20px;
}

/* ---------- Top bar ---------- */
.sr-topbar {
	background: var(--sr-navy);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
}
.sr-topbar .sr-container {
	display: flex;
	justify-content: flex-end;
	gap: 26px;
	min-height: 42px;
	align-items: center;
}
.sr-topbar a { color: #fff; display: inline-flex; align-items: center; gap: 7px; }
.sr-topbar a:hover, .sr-topbar a:focus { color: #cdeefc; }
.sr-topbar svg { width: 14px; height: 14px; fill: currentColor; flex: none; }

/* ---------- Header ---------- */
.sr-header {
	background: #fff;
	position: sticky;
	top: 0;
	z-index: 50;
	border-bottom: 1px solid var(--sr-line);
}
.admin-bar .sr-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .sr-header { top: 46px; } }

.sr-header .sr-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 120px;
	gap: 24px;
}
.sr-brand img, .sr-brand .custom-logo { width: 196px; height: auto; }

.sr-nav ul { list-style: none; margin: 0; padding: 0; }
.sr-nav > ul { display: flex; gap: 30px; align-items: center; }
.sr-nav li { position: relative; }
.sr-nav a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--sr-navy);
	font-weight: 700;
	font-size: 16px;
	text-transform: uppercase;
	letter-spacing: .02em;
	padding: 10px 0;
}
.sr-nav a:hover, .sr-nav a:focus { color: var(--sr-sky); }
.sr-nav .current-menu-item > a,
.sr-nav .current-menu-ancestor > a,
.sr-nav .current_page_item > a { color: var(--sr-navy); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }

.sr-nav .menu-item-has-children > a::after {
	content: "";
	width: 7px; height: 7px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translateY(-3px);
	margin-left: 4px;
}
.sr-nav .sub-menu {
	position: absolute;
	top: 100%;
	left: -16px;
	min-width: 210px;
	background: #fff;
	box-shadow: 0 8px 24px rgba(43, 62, 144, .14);
	padding: 10px 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .15s, transform .15s, visibility .15s;
}
.sr-nav li:hover > .sub-menu,
.sr-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.sr-nav .sub-menu a { display: block; padding: 8px 18px; text-transform: none; font-size: 15px; }

.sr-menu-toggle {
	display: none;
	background: none;
	border: 0;
	padding: 8px;
	cursor: pointer;
	color: var(--sr-navy);
}
.sr-menu-toggle span,
.sr-menu-toggle span::before,
.sr-menu-toggle span::after {
	display: block;
	width: 26px; height: 3px;
	background: currentColor;
	border-radius: 2px;
	position: relative;
	transition: transform .2s;
}
.sr-menu-toggle span::before, .sr-menu-toggle span::after { content: ""; position: absolute; left: 0; }
.sr-menu-toggle span::before { top: -8px; }
.sr-menu-toggle span::after { top: 8px; }
.sr-menu-toggle[aria-expanded="true"] span { background: transparent; }
.sr-menu-toggle[aria-expanded="true"] span::before { transform: translateY(8px) rotate(45deg); }
.sr-menu-toggle[aria-expanded="true"] span::after { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 860px) {
	.sr-header .sr-container { min-height: 88px; }
	.sr-brand img, .sr-brand .custom-logo { width: 150px; }
	.sr-menu-toggle { display: block; }
	.sr-nav {
		display: none;
		position: absolute;
		top: 100%; left: 0; right: 0;
		background: #fff;
		border-top: 1px solid var(--sr-line);
		box-shadow: 0 12px 24px rgba(43, 62, 144, .12);
	}
	.sr-nav.is-open { display: block; }
	.sr-nav > ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 16px; }
	.sr-nav a { padding: 12px 0; width: 100%; }
	.sr-nav .sub-menu {
		position: static; opacity: 1; visibility: visible; transform: none;
		box-shadow: none; padding: 0 0 0 16px; min-width: 0;
	}
	.sr-topbar .sr-container { justify-content: center; gap: 18px; }
}

/* ---------- Buttons ---------- */
.sr-button,
.wp-block-button__link,
.wpcf7 input[type="submit"] {
	display: inline-block;
	background: var(--sr-sky);
	color: #fff;
	font-family: var(--sr-font);
	font-weight: 700;
	font-size: 17px;
	text-transform: uppercase;
	letter-spacing: .03em;
	padding: 12px 28px;
	border: 0;
	border-radius: 0;
	cursor: pointer;
	transition: background-color .15s;
}
.sr-button:hover, .sr-button:focus,
.wp-block-button__link:hover, .wp-block-button__link:focus,
.wpcf7 input[type="submit"]:hover, .wpcf7 input[type="submit"]:focus {
	background: var(--sr-navy);
	color: #fff;
}

/* ---------- Hero (front page) ---------- */
.sr-hero {
	position: relative;
	min-height: clamp(380px, 62vw, 720px);
	background-color: #6f8f5f;
	background-size: cover;
	background-position: center;
	display: flex;
	align-items: center;
}
.sr-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.28) 100%);
}
.sr-hero .sr-container { position: relative; }
.sr-hero__text {
	margin-left: auto;
	max-width: 680px;
	color: #fff;
	text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
	padding: 40px 0;
}
.sr-hero__title {
	color: #fff;
	font-size: clamp(2rem, 3.4vw, 2.6rem);
	font-weight: 700;
	margin: 0 0 .25em;
}
.sr-hero__sub {
	font-size: clamp(1.3rem, 2.3vw, 1.9rem);
	line-height: 1.35;
	font-weight: 600;
	margin: 0 0 1.2em;
}
.sr-hero .sr-button { text-shadow: none; }
@media (max-width: 700px) {
	.sr-hero::before { background: rgba(0,0,0,.3); }
	.sr-hero__text { margin: 0 auto; text-align: center; }
}

/* ---------- Page content & blocks ---------- */
.sr-main { padding: 0 0 70px; }
.sr-main--page { padding-top: 50px; }

.entry-content > * {
	max-width: var(--sr-width);
	margin-left: auto;
	margin-right: auto;
	padding-left: 20px;
	padding-right: 20px;
}
.entry-content > .alignwide { max-width: 1400px; }
.entry-content > .alignfull { max-width: none; padding-left: 0; padding-right: 0; }
.entry-content > .wp-block-columns,
.entry-content > .wp-block-group { margin-bottom: 2.5em; }
.entry-content > .wp-block-media-text + .wp-block-heading,
.entry-content > .wp-block-columns + .wp-block-heading { margin-top: 70px; }

.wp-block-group.has-background { padding-top: 50px; padding-bottom: 50px; }
.has-sr-pale-background-color { background-color: var(--sr-pale); }
.has-sr-navy-background-color { background-color: var(--sr-navy); }
.has-sr-sky-color { color: var(--sr-sky); }
.has-sr-navy-color { color: var(--sr-navy); }

.wp-block-media-text { margin-bottom: 0; }
.wp-block-media-text .wp-block-media-text__content { padding: 50px 6%; }
.wp-block-media-text h2 { font-size: 2rem; }
.wp-block-media-text__media img { width: 100%; height: 100%; object-fit: cover; }

/* Product cards */
.sr-products { gap: 40px !important; }
.sr-product { text-align: center; }
.sr-product img { margin: 0 auto 10px; max-width: 320px; width: 100%; }
.sr-product h3 { font-size: 1.25rem; font-weight: 600; margin: 0 0 .2em; }
.sr-product h3 a { color: var(--sr-sky); }
.sr-product h3 a:hover { color: var(--sr-navy); }
.sr-price { font-size: 1.35rem; color: var(--sr-text); margin: 0; }

/* Retail logos */
.sr-retailers { gap: 30px !important; align-items: center; }
.sr-retailers .wp-block-image img { max-height: 120px; width: auto; margin: 0 auto; object-fit: contain; }

/* Announcement band */
.sr-announce {
	background: var(--sr-pale);
	border-left: 5px solid var(--sr-sky);
	padding: 22px 28px !important;
}
.sr-announce p { margin: 0; }

/* Order page form panel */
.sr-form-panel {
	border: 1px solid var(--sr-line);
	padding: 30px 32px !important;
	background: #fff;
	position: sticky;
	top: 150px;
}
.sr-form-panel h2 { font-size: 1.45rem; color: var(--sr-heading); }

/* ---------- Contact Form 7 ---------- */
.wpcf7 { font-size: 15px; }
.wpcf7 p { margin-bottom: 14px; }
.wpcf7 label { display: block; font-weight: 600; color: var(--sr-text); line-height: 1.4; }
.wpcf7 .sr-req { color: #d0342c; }
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="number"],
.wpcf7 input[type="date"],
.wpcf7 select,
.wpcf7 textarea {
	width: 100%;
	margin-top: 6px;
	padding: 10px 12px;
	font: inherit;
	font-weight: 400;
	color: var(--sr-text);
	background: #fff;
	border: 1px solid #cfd6dd;
	border-radius: 3px;
}
.wpcf7 textarea { height: 90px; resize: vertical; }
.wpcf7 .wpcf7-list-item { margin: 4px 18px 0 0; font-weight: 400; }
.wpcf7 .sr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wpcf7 .sr-note { color: var(--sr-muted); font-size: 14px; }
.wpcf7 .sr-address input { margin-top: 8px; }
.wpcf7-not-valid-tip { font-size: 13px; }

/* ---------- Footer ---------- */
.sr-footer {
	background: var(--sr-navy);
	color: #fff;
	font-size: 15px;
	line-height: 1.65;
	padding: 80px 0 30px;
}
.sr-footer__cols {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 60px;
}
.sr-footer__col { border-top: 1px solid rgba(255, 255, 255, .3); padding-top: 18px; }
.sr-footer h2 {
	color: var(--sr-sky);
	font-size: 1.3rem;
	font-weight: 600;
	margin: 0 0 22px;
}
.sr-footer a { color: var(--sr-sky); font-weight: 600; }
.sr-footer a:hover, .sr-footer a:focus { color: #fff; }
.sr-contact { list-style: none; margin: 0 0 26px; padding: 0; }
.sr-contact li {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 20px;
	font-weight: 700;
	font-size: 1.05rem;
}
.sr-contact svg { width: 24px; height: 24px; fill: #fff; flex: none; }
.sr-contact a { color: var(--sr-sky); }
.sr-contact .sr-plain, .sr-contact .sr-plain:hover { color: #fff; }
.sr-follow { border-top: 1px solid rgba(255, 255, 255, .3); padding-top: 18px; }
.sr-follow a { color: #fff; display: inline-block; }
.sr-follow svg { width: 34px; height: 34px; fill: currentColor; }
.sr-follow a:hover svg, .sr-follow a:focus svg { fill: var(--sr-sky); }
.sr-footer__map img { width: 100%; }
.sr-footer__bottom { margin-top: 50px; font-size: 14px; font-weight: 600; }

@media (max-width: 900px) {
	.sr-footer__cols { grid-template-columns: 1fr; gap: 36px; }
	.sr-form-panel { position: static; }
}
