/*
Theme Name: Silber Psychological Services
Author: Connect Web Design Studio
Author URI: https://connectwebdesignstudio.com
Description: Custom theme for silberpsych.com. Keeps the look of the former Thrive site. Pages are Custom HTML sections using the classes below.
Version: 1.0.0
Requires PHP: 8.1
Text Domain: silber
*/

:root {
	--teal: #437b89;
	--teal-dark: #36646f;
	--sky: #8cc1cf;
	--sky-soft: #d8ebf0;
	--ink: #111;
	--text: #1e1e1f;
	--white: #fff;
	--panel: rgba(255, 255, 255, 0.82);
	--font: "Montserrat", Arial, sans-serif;
	--script: "Satisfy", "Brush Script MT", cursive;
	--wrap: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.85;
	color: var(--text);
	background: var(--white);
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); }
a:hover, a:focus { color: var(--teal-dark); }
h1, h2, h3, h4 { font-family: var(--font); font-weight: 500; color: var(--teal); line-height: 1.3; margin: 0 0 0.5em; }
h1 { font-size: clamp(28px, 3.4vw, 44px); }
h2 { font-size: clamp(24px, 2.4vw, 30px); }
h3 { font-size: 22px; }
p { margin: 0 0 1.1em; }
.center { text-align: center; }
.small { font-size: 14px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 860px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed !important; top: 8px; left: 8px; width: auto; height: auto; clip: auto; padding: 10px 16px; background: var(--white); z-index: 100; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* Buttons: teal block with the script font, as on the Thrive site */
.btn {
	display: inline-block;
	background: var(--teal);
	color: var(--white);
	font-family: var(--script);
	font-size: 26px;
	line-height: 1.2;
	padding: 16px 28px;
	text-decoration: none;
	border: 0;
	cursor: pointer;
	transition: background 0.2s;
}
.btn:hover, .btn:focus { background: var(--teal-dark); color: var(--white); }
.btn-row { margin: 1.4em 0 0; }
.text-link { font-weight: 600; text-decoration: underline; }

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 20; background: var(--sky); }
.topbar {
	margin: 0;
	background: var(--teal);
	color: var(--white);
	font-size: 14px;
	line-height: 1.5;
	text-align: center;
	padding: 7px 16px;
}
.header-main { padding: 14px 20px 6px; }
.brand-row { display: flex; align-items: flex-start; justify-content: center; gap: 0; position: relative; }
.brand-rule { flex: 1; border-top: 1px solid rgba(54, 100, 111, 0.35); margin-top: 46px; }
.site-logo { display: block; flex: 0 0 auto; padding: 0 0; }
.site-logo img { width: 320px; }
.nav-toggle { display: none; }
.main-nav .menu { list-style: none; margin: 8px 0 0; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; }
.main-nav .menu > li { position: relative; }
.main-nav a {
	display: block;
	padding: 10px 10px;
	color: var(--ink);
	text-decoration: none;
	text-transform: uppercase;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.02em;
	line-height: 1.4;
}
.main-nav .menu > li > a:hover, .main-nav .current-menu-item > a, .main-nav .current-menu-ancestor > a { color: var(--teal-dark); text-decoration: underline; text-underline-offset: 5px; }
.main-nav .menu-item-has-children > a { padding-right: 26px; }
.main-nav .menu-item-has-children > a::after {
	content: "";
	position: absolute;
	right: 10px;
	top: 16px;
	width: 6px;
	height: 6px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg);
}
.sub-toggle { display: none; }
.main-nav .sub-menu {
	list-style: none;
	margin: 0;
	padding: 8px 0;
	position: absolute;
	left: 0;
	top: 100%;
	min-width: 270px;
	background: var(--white);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
	border-top: 3px solid var(--teal);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.main-nav .sub-menu a { text-transform: none; font-size: 14px; padding: 8px 18px; }
.main-nav .sub-menu a:hover, .main-nav .sub-menu .current-menu-item > a { background: var(--sky-soft); color: var(--teal-dark); }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu, .main-nav .sub-open > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.main-nav .menu > li:last-child .sub-menu, .main-nav .menu > li:nth-last-child(2) .sub-menu { left: auto; right: 0; }
.header-curve { position: absolute; left: 0; right: 0; top: 100%; width: 100%; height: 22px; fill: var(--sky); pointer-events: none; }

/* ---------- Sections ---------- */
.sec { padding: 70px 0; }
.sec--sky { background: var(--sky); }
.sec--tight { padding: 40px 0; }
.page-top { padding-top: 70px; }
.h-white, .sec--sky h2 { color: var(--white); font-weight: 600; }
.lead { font-size: 18px; max-width: 760px; margin: 0 auto 1.4em; }

/* Boxed text over a photo (hero, welcome, team, closing call to action) */
.photo-panel {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	background-size: cover;
	background-position: center;
	padding: 60px 20px;
	overflow: hidden;
}
.photo-panel > img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.panel {
	position: relative;
	background: var(--panel);
	border: 1px solid var(--teal);
	max-width: 720px;
	padding: 34px 40px;
	text-align: center;
}
.panel h2 { font-size: clamp(22px, 2.2vw, 28px); }
.panel p { font-size: 15px; }

.hero { min-height: clamp(520px, 56vw, 790px); align-items: flex-end; padding: 0 20px 28px; }
.hero .panel { max-width: 910px; padding: 22px 28px 26px; background: rgba(255, 255, 255, 0.72); }
.hero h1 { font-size: clamp(28px, 3.3vw, 46px); line-height: 1.32; margin-bottom: 0.35em; }
.hero .sub { font-weight: 600; font-size: clamp(16px, 1.45vw, 20px); color: var(--ink); line-height: 1.85; margin: 0 0 0.6em; }
.hero .btn { margin-top: 0; }

/* Quick links band under the hero */
.quick-links { background: var(--sky); }
.quick-links ul { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); max-width: 1440px; }
.quick-links li + li { border-left: 1px solid rgba(255, 255, 255, 0.7); }
.quick-links a { display: block; text-align: center; color: var(--white); text-transform: uppercase; letter-spacing: 0.22em; font-size: 13px; padding: 14px 8px; text-decoration: none; }
.quick-links a:hover, .quick-links a:focus { background: var(--teal); color: var(--white); }

.boxed { max-width: var(--wrap); margin: 0 auto; }
.boxed .photo-panel { min-height: 620px; }

/* Text + photo rows on the sky band */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.split + .split { margin-top: 60px; }
.split .text { text-align: center; }
.split .text p { color: var(--ink); }
.split img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.split--photo-first .photo { order: -1; }

/* Three columns */
.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; text-align: center; }
.cols3 h2 { font-size: 22px; margin-bottom: 0.3em; }
.cols3 p { margin-bottom: 0.6em; color: var(--ink); }
.cols3 .btn { font-size: 24px; padding: 12px 24px; }

/* ---------- Inner pages (converted from the Thrive pages) ---------- */
.page-top { padding-top: 56px; }
.page-top h1 { font-size: clamp(24px, 2.2vw, 28px); font-weight: 500; margin-bottom: 0.4em; }
.page-top h2 { font-size: clamp(20px, 1.8vw, 24px); font-weight: 500; margin: 1.2em 0 0.45em; }
.page-top h3 { font-size: 19px; }
.page-top p, .page-top li { font-size: 16px; line-height: 1.85; }
.page-top .wrap > p.center, .page-top .wrap > h1 + p { max-width: 1000px; margin-left: auto; margin-right: auto; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; margin: 40px 0; }
.row--2:has(> .photo:first-child) { grid-template-columns: 2fr 3fr; }
.row--2:has(> .photo:last-child) { grid-template-columns: 3fr 2fr; }
.row--3 { grid-template-columns: repeat(3, 1fr); gap: 36px; align-items: start; }
.row--4 { grid-template-columns: repeat(4, 1fr); gap: 28px; align-items: start; }
.row .col > :first-child { margin-top: 0; }
.photo img { width: 100%; height: auto; object-fit: cover; }
.page-top .btn-row { text-align: center; }
.checks { list-style: none; margin: 0 auto 1.2em; padding: 0; display: table; text-align: left; }
.checks li { position: relative; padding-left: 26px; margin-bottom: 0.45em; }
.checks li::before {
	content: "";
	position: absolute;
	left: 3px;
	top: 0.5em;
	width: 7px;
	height: 12px;
	border-right: 2.5px solid var(--teal);
	border-bottom: 2.5px solid var(--teal);
	transform: rotate(40deg);
}
.checks li a { font-weight: 500; }
.rule { border: 0; border-top: 1.5px solid #555; max-width: 1080px; margin: 34px auto; }
.band { padding: 40px 30px; margin: 40px 0; }
.band--sky { background: var(--sky); }
.band--sky h2 { color: var(--white); }
.map { position: relative; width: 100%; max-width: 760px; margin: 20px auto 10px; aspect-ratio: 16 / 9; }
.map iframe, .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video { position: relative; aspect-ratio: 16 / 9; margin: 20px auto; max-width: 860px; }
.page-top img:not(.bg) { margin: 0 auto; }
.form-wrap { max-width: 640px; margin: 10px auto 26px; text-align: left; background: #f5f2f0; border: 1px solid #9fbcc4; padding: 12px 10px 18px; }
.form-wrap .nf-form-fields-required { font-size: 14px; color: #555; }
.form-wrap .nf-form-content { padding: 0; max-width: none; }
.form-wrap input[type="text"], .form-wrap input[type="email"], .form-wrap input[type="tel"], .form-wrap textarea, .form-wrap select {
	width: 100%;
	border: 1px solid #9ab;
	padding: 10px 12px;
	font: inherit;
	background: var(--white);
}
.form-wrap input[type="submit"], .form-wrap input[type="button"] {
	background: var(--teal);
	color: var(--white);
	border: 0;
	font-family: var(--script);
	font-size: 24px;
	padding: 12px 30px;
	cursor: pointer;
}
.page-top .photo-panel { margin: 40px 0; min-height: 460px; }

/* Plain page content (pages not rebuilt as sections, policies) */
.page-title { font-size: clamp(28px, 3vw, 38px); }
.page-content h2 { margin-top: 1.4em; }

/* ---------- Blog (same layout as the Thrive blog) ---------- */
.with-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 50px; align-items: start; margin-top: 34px; text-align: left; }
.blog-page h1 { font-size: clamp(24px, 2.3vw, 30px); }
.post-date { text-transform: uppercase; letter-spacing: 0.35em; font-size: 11px; color: #777; margin: 0 0 8px; }
.post-item { margin-bottom: 56px; }
.post-item__photo { position: relative; display: block; }
.post-item__photo img { width: 100%; aspect-ratio: 1.75; object-fit: cover; }
.post-item__cats { position: absolute; left: 0; bottom: 0; background: #111; color: var(--white); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 9px; }
.post-item__title { font-size: clamp(24px, 2.3vw, 32px); font-weight: 600; margin: 22px 0 8px; line-height: 1.3; }
.post-item__title a, .card-title a { color: var(--ink); text-decoration: none; }
.post-item__title a:hover, .card-title a:hover { color: var(--teal); }
.page-top .post-item__excerpt { font-size: 17px; line-height: 1.75; }
.read-more { display: inline-block; text-transform: uppercase; letter-spacing: 0.18em; font-size: 13px; color: #333; text-decoration: none; padding: 9px 6px; border-top: 1px solid var(--teal); border-bottom: 1px solid var(--teal); }
.read-more:hover { color: var(--teal); }
.nav-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; }
.page-numbers { padding: 4px 11px; text-decoration: none; border: 1px solid var(--sky); }
.page-numbers.current { background: var(--teal); color: var(--white); border-color: var(--teal); }

.sidebar { background: var(--sky); padding: 14px 12px; }
.side-search { display: flex; margin-bottom: 14px; }
.side-search input { flex: 1; min-width: 0; border: 0; padding: 10px 12px; font: inherit; font-size: 13px; letter-spacing: 0.06em; }
.side-search button { background: var(--teal); color: var(--white); border: 0; width: 46px; cursor: pointer; }
.side-search svg { width: 18px; height: 18px; margin: auto; }
.side-card { background: var(--white); text-align: center; padding: 16px 14px 18px; margin-bottom: 12px; }
.side-card .side-title { font-family: var(--script); font-size: 28px; line-height: 1.2; margin: 0 0 12px; }
.side-card .side-title a { color: var(--teal); text-decoration: none; }
.side-card .side-title::after { content: ""; display: block; width: 26px; border-top: 2px solid #222; margin: 10px auto 0; }
.side-card img { width: 100%; aspect-ratio: 1; object-fit: cover; margin-bottom: 14px; }
.side-card p { font-size: 14px; line-height: 1.6; color: var(--ink); margin-bottom: 12px; }
.side-card .btn { font-size: 22px; padding: 8px 14px; }
.side-list { background: var(--white); padding: 16px 18px 6px; font-size: 14px; }
.side-heading { font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; font-size: 13px; margin: 6px 0 8px; }
.side-list ul { list-style: none; margin: 0 0 16px; padding: 0; }
.side-list li { padding: 5px 0; border-bottom: 1px solid var(--sky-soft); line-height: 1.4; }
.side-list a { text-decoration: none; color: var(--ink); }
.side-list a:hover { color: var(--teal); }

.post-hero { margin: 0 0 6px; }
.post-hero img { width: 100%; aspect-ratio: 1.88; object-fit: cover; }
.post-title { color: var(--ink); font-weight: 400; font-size: clamp(30px, 3vw, 42px); line-height: 1.3; margin: 0 0 6px; }
.post-page .post-date { padding-bottom: 10px; border-bottom: 1px dotted #bbb; margin-bottom: 18px; }
.share { display: flex; gap: 8px; margin: 0 0 22px; }
.share a { color: var(--white); text-decoration: none; font-size: 12px; padding: 4px 16px; border-radius: 3px; }
.share--fb { background: #3b5998; }
.share--x { background: #1da1f2; }
.share--in { background: #0077b5; }
.post-body p, .post-body li { font-size: 17px; line-height: 1.75; color: var(--ink); }
.post-body h2 { text-transform: uppercase; font-size: 26px; margin: 1.4em 0 0.4em; }
.post-body img { margin: 10px 0 4px; height: auto; }
.post-body ul { padding-left: 1.3em; }
.post-nav { display: flex; justify-content: space-between; gap: 20px; margin: 10px 0 26px; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; }
.post-nav a { text-decoration: none; }
.recent-grid { background: #f4f4f4; padding: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.post-card { background: var(--white); padding: 18px 18px 22px; text-align: center; }
.post-card .card-photo img { width: 100%; aspect-ratio: 1.66; object-fit: cover; }
.card-cats { font-size: 11px; color: var(--teal); margin: 12px 0 6px; line-height: 1.3; }
.card-title { font-size: 19px; font-weight: 400; margin: 0 0 6px; }
.page-top .card-excerpt { font-size: 14px; line-height: 1.7; color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { position: relative; margin-top: 40px; }
.footer-curve { display: block; width: 100%; height: 22px; fill: var(--sky); }
.footer-main { background: var(--sky); padding: 26px 0 30px; text-align: center; }
.site-footer .site-logo { display: inline-block; }
.site-footer .site-logo img { width: 260px; }
.footer-nav .menu { list-style: none; margin: 14px 0 22px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; }
.footer-nav a { display: block; padding: 4px 9px; color: var(--ink); text-decoration: none; text-transform: uppercase; font-size: 13px; font-weight: 500; }
.footer-nav a:hover { text-decoration: underline; }
.offices { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.office p { margin: 0; font-size: 15px; letter-spacing: 0.05em; font-weight: 600; color: var(--ink); line-height: 1.6; }
.office .office-name { text-transform: uppercase; letter-spacing: 0.14em; font-size: 16px; }
.office a { color: var(--teal-dark); }
.office .small { font-weight: 500; }
.social-icons { display: flex; justify-content: center; gap: 22px; margin: 18px 0 14px; }
.social-icons a { color: var(--teal); }
.social-icons svg { width: 30px; height: 30px; fill: currentColor; }
.badge { display: inline-block; }
.badge img { width: 210px; }
.copyright, .legal-links, .credit { font-size: 13px; letter-spacing: 0.06em; margin: 10px 0 0; color: var(--ink); }
.legal-links a, .credit a { color: var(--ink); }
.sep { padding: 0 8px; }
.link-row a { font-weight: 600; }

/* ---------- Tablet and phone ---------- */
@media (max-width: 1100px) {
	.main-nav a { font-size: 12px; padding: 10px 7px; }
	.main-nav .menu-item-has-children > a { padding-right: 20px; }
	.main-nav .menu-item-has-children > a::after { right: 6px; }
}

@media (max-width: 900px) {
	.header-main { padding: 10px 16px 12px; }
	.brand-row { align-items: center; }
	.brand-rule { display: none; }
	.site-logo img { width: 220px; }
	.nav-toggle {
		display: block;
		position: absolute;
		right: 0;
		top: 50%;
		transform: translateY(-50%);
		background: var(--teal);
		border: 0;
		padding: 10px 11px;
		cursor: pointer;
	}
	.nav-toggle svg { width: 22px; height: 22px; fill: var(--white); }
	.main-nav { display: none; }
	.nav-open .main-nav { display: block; }
	.main-nav .menu { display: block; margin-top: 12px; background: var(--white); }
	.main-nav .menu > li { border-top: 1px solid var(--sky-soft); }
	.main-nav a { font-size: 14px; padding: 12px 16px; }
	.main-nav .menu-item-has-children > a::after { display: none; }
	.main-nav .menu-item-has-children > a { padding-right: 56px; }
	.sub-toggle {
		display: block;
		position: absolute;
		right: 0;
		top: 0;
		width: 52px;
		height: 46px;
		background: none;
		border: 0;
		border-left: 1px solid var(--sky-soft);
		cursor: pointer;
	}
	.sub-toggle::before {
		content: "";
		position: absolute;
		left: 21px;
		top: 16px;
		width: 8px;
		height: 8px;
		border-right: 2px solid var(--teal);
		border-bottom: 2px solid var(--teal);
		transform: rotate(45deg);
	}
	.sub-open > .sub-toggle::before { transform: rotate(-135deg); top: 21px; }
	.main-nav .sub-menu { position: static; display: none; opacity: 1; visibility: visible; transform: none; box-shadow: none; border-top: 0; padding: 0 0 8px; min-width: 0; background: var(--sky-soft); }
	.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: none; }
	.main-nav .sub-open > .sub-menu { display: block; }
	.main-nav .sub-menu a { padding: 9px 26px; }

	.sec { padding: 50px 0; }
	.split { grid-template-columns: 1fr; gap: 26px; }
	.row, .row--3, .row--4 { grid-template-columns: 1fr; gap: 26px; margin: 30px 0; }
	.with-sidebar { grid-template-columns: minmax(0, 1fr); gap: 40px; }
	.sidebar { max-width: 420px; margin: 0 auto; width: 100%; }
	.recent-grid { grid-template-columns: 1fr; padding: 12px; }
	.row--2:has(> .photo:first-child), .row--2:has(> .photo:last-child) { grid-template-columns: minmax(0, 1fr); }
	.row--2 .photo img { max-height: 520px; width: auto; max-width: 100%; }
	.row--2 .photo { order: -1; }
	.split--photo-first .photo { order: 0; }
	.split img { aspect-ratio: 4 / 3; }
	.cols3 { grid-template-columns: 1fr; gap: 40px; }
	.post-grid { grid-template-columns: 1fr 1fr; }
	.quick-links ul { grid-template-columns: 1fr 1fr; }
	.quick-links li:nth-child(3) { border-left: 0; }
	.quick-links li:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, 0.7); }
	.boxed .photo-panel { min-height: 0; }
}

@media (max-width: 600px) {
	body { font-size: 15px; }
	.topbar { font-size: 12px; padding: 6px 12px; }
	.site-logo img { width: 180px; }
	.photo-panel.hero { display: block; min-height: 0; padding: 0 0 26px; background: var(--sky-soft); }
	.hero h1 { font-size: 26px; }
	.hero > img.bg { position: static; height: auto; aspect-ratio: 4 / 3; }
	.hero .panel { margin: -34px 14px 0; padding: 18px 16px 20px; background: var(--white); }
	.panel { padding: 24px 18px; }
	.photo-panel { padding: 40px 16px; }
	.btn { font-size: 22px; padding: 13px 20px; }
	.post-grid { grid-template-columns: 1fr; }
	.quick-links a { letter-spacing: 0.12em; font-size: 12px; }
	.post-nav { flex-direction: column; }
}

/* Blog headings beat the generic inner-page heading sizes */
.page-top .post-title { color: var(--ink); font-weight: 400; font-size: clamp(30px, 3vw, 42px); line-height: 1.3; margin: 0 0 6px; }
.page-top .post-item__title { font-size: clamp(24px, 2.3vw, 32px); font-weight: 600; margin: 22px 0 8px; line-height: 1.3; }
.page-top .card-title { font-size: 19px; font-weight: 400; margin: 0 0 6px; }
/* Post lists show check marks, as the Thrive posts did */
.post-body ul { list-style: none; padding-left: 0; }
.post-body ul li { position: relative; padding-left: 30px; margin-bottom: 0.5em; }
.post-body ul li::before { content: ""; position: absolute; left: 6px; top: 0.45em; width: 7px; height: 12px; border-right: 2.5px solid var(--teal); border-bottom: 2.5px solid var(--teal); transform: rotate(40deg); }

.post-body, .page-content, .page-top p { overflow-wrap: anywhere; }
