/*
 * Coastwide – styles that recreate the original site's look.
 * Colours and fonts are set in theme.json (Appearance → Editor → Styles).
 */

/* ---------- Page frame ---------- */
.wp-site-blocks > * + * { margin-block-start: 0; }
.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: -34px; /* the dark top bar scrolls away, the white header stays */
	z-index: 50;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}
.admin-bar .wp-site-blocks > header.wp-block-template-part { top: calc(32px - 34px); }
@media (max-width: 782px) {
	.admin-bar .wp-site-blocks > header.wp-block-template-part { top: calc(46px - 34px); }
}
@media (max-width: 600px) {
	.admin-bar .wp-site-blocks > header.wp-block-template-part { top: -34px; }
}
:where(a, button, summary, input, textarea):focus-visible { outline: 3px solid var(--wp--preset--color--blue); outline-offset: 2px; }
.wp-block-post-content > .alignfull:first-child { margin-top: 0; }

/* ---------- Header ---------- */
.cw-topbar p { margin: 0; line-height: 1.5; }
.cw-header .wp-block-site-logo img { width: 180px; height: auto; }
.cw-header .wp-block-navigation a { color: var(--wp--preset--color--ink); }
.cw-header .wp-block-navigation a:hover,
.cw-header .wp-block-navigation .current-menu-item > a { color: var(--wp--preset--color--blue); text-decoration: none; }
.cw-header .wp-block-navigation .current-menu-item > a { border-bottom: 1px solid currentColor; }
.cw-header-call .wp-block-button__link { white-space: nowrap; font-family: var(--wp--preset--font-family--button); }
@media (max-width: 900px) {
	.cw-header .wp-block-site-logo img { width: 140px; }
	.cw-header-call .wp-block-button__link { padding: 0.7rem 1rem !important; font-size: 0.875rem; }
}

/* ---------- Buttons ---------- */
.wp-block-button__link { min-width: 200px; text-align: center; }
.cw-header-call .wp-block-button__link { min-width: 0; }

/* ---------- Photos ---------- */
.cw-photo img { width: 100%; border-radius: 20px; display: block; }
.cw-photo-tall img { aspect-ratio: 4 / 5; object-fit: cover; }
.cw-photo-wide img { aspect-ratio: 16 / 7; object-fit: cover; }
.cw-card-photo img { aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; }
.wp-block-image.cw-photo { margin: 0; }

/* ---------- Cards ---------- */
.cw-card {
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 3px 11px rgba(0, 0, 0, 0.25);
	padding: 1.75rem;
	color: var(--wp--preset--color--ink);
}
.cw-card > :first-child { margin-top: 0; }

/* ---------- Home hero ---------- */
.cw-home-hero .wp-block-cover__image-background { object-position: center bottom; }
.cw-wordmark,
.cw-tagline {
	font-family: var(--wp--preset--font-family--body);
	font-weight: 700;
	font-size: clamp(2rem, 3.6vw, 3rem);
	line-height: 1.15;
	color: var(--wp--preset--color--blue);
	margin: 0 !important;
}
.cw-wordmark { text-transform: uppercase; letter-spacing: 0.01em; }
.cw-wordmark mark { font-size: 1.354em; line-height: 1; }
.cw-home-h1 {
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(1.6rem, 2.4vw, 2rem) !important;
	font-weight: 600;
	margin-top: 1rem !important;
}
.cw-checks { list-style: none; padding: 0; margin-top: 1.5rem; }
.cw-checks li {
	position: relative;
	padding-left: 2.1rem;
	margin-bottom: 0.9rem;
	line-height: 1.55;
}
.cw-checks li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.1rem;
	width: 1.3rem;
	height: 1.3rem;
	background: url("../images/icons/check.svg") no-repeat center / contain;
}
.cw-checks-light li { color: #fbfbfb; font-weight: 400; max-width: 34rem; }
.cw-home-hero .wp-block-buttons { margin-top: 2.5rem; }

/* TV with the channel-logo video playing on its screen */
.cw-tv { position: relative; max-width: 500px; margin-left: auto; margin-right: auto; }
.cw-tv .cw-tv-set { margin: 0; }
.cw-tv .cw-tv-set img { width: 100%; height: auto; display: block; }
.cw-tv .cw-tv-screen {
	position: absolute;
	left: 21.6%;
	top: 13.1%;
	width: 48.2%;
	height: 42.2%;
	margin: 0;
	overflow: hidden;
}
.cw-tv .cw-tv-screen video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cw-tv-video { margin: 0 auto; max-width: 544px; }
.cw-tv-video video { width: 100%; display: block; }

/* ---------- Dark photo section with cards ---------- */
.cw-dark-section h3.has-text-align-center:first-child { margin-bottom: var(--wp--preset--spacing--40); }
.cw-dark-card {
	background: rgba(0, 0, 0, 0.7);
	border-radius: 20px;
	padding: 2rem 1.75rem;
	color: #fbfbfb;
	font-weight: 400;
}
.cw-dark-card h3 a { color: #fff; font-weight: 700; }
.cw-dark-card p { font-size: 0.95rem; line-height: 1.65; }
.cw-card-icon { margin: 0 auto 0.5rem !important; text-align: center; }
.cw-card-icon img { width: 72px; height: 72px; }
.cw-count-2 { max-width: 780px; margin-left: auto !important; margin-right: auto !important; }

/* ---------- Service intro feature cards ---------- */
.cw-feature { padding: 1.25rem 1.5rem; margin-bottom: 1.4rem; }
.cw-feature:last-child { margin-bottom: 0; }
.cw-feature-cols { flex-wrap: nowrap !important; margin: 0 !important; }
.cw-feature-cols > .wp-block-column:first-child { flex: 0 0 56px !important; }
.cw-feature h4 { margin: 0 0 0.4rem; line-height: 1.25; }
.cw-feature p { margin: 0; color: var(--wp--preset--color--ink); }
.cw-feature-icon { margin: 0.2rem 0 0 !important; }
.cw-feature-icon img { width: 52px; height: 52px; }

/* ---------- FAQ (accordion) ---------- */
.cw-faq-item {
	background: #f6f6f6;
	border-radius: 12px;
	margin: 0 0 0.9rem !important;
}
.cw-faq-item summary {
	position: relative;
	list-style: none;
	cursor: pointer;
	padding-right: 3rem;
	font-family: var(--wp--preset--font-family--button);
	font-weight: 700;
	font-size: clamp(1.05rem, 1.6vw, 1.375rem);
	line-height: 1.35;
	color: var(--wp--preset--color--ink);
}
.cw-faq-item summary::-webkit-details-marker { display: none; }
.cw-faq-item summary::after {
	content: "";
	position: absolute;
	right: 0;
	top: 50%;
	width: 30px;
	height: 30px;
	margin-top: -15px;
	border-radius: 50%;
	background: var(--wp--preset--color--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat center / 16px;
	transition: transform 0.2s ease;
}
.cw-faq-item[open] summary::after { transform: rotate(180deg); }
.cw-faq-item > :not(summary) { margin-top: 0.8rem; margin-bottom: 0; }

/* ---------- Location buttons ---------- */
.cw-narrow-heading { max-width: 560px; margin-left: auto !important; margin-right: auto !important; }
.cw-location-buttons { max-width: 760px; margin: 2rem auto 0 !important; gap: 0.75rem 2.5rem !important; }
.cw-location-buttons .wp-block-button__link { min-width: 200px; padding-top: 0.95rem; padding-bottom: 0.95rem; }
.cw-locations h4 { margin-top: 0.4rem; }

/* ---------- Locations page cards ---------- */
.cw-location-card h4 { margin: 0 0 0.4rem; font-family: var(--wp--preset--font-family--heading); font-weight: 700; }
.cw-location-card h4 a { color: var(--wp--preset--color--black); }
.cw-location-card p { margin: 0; }

/* ---------- Testimonials ---------- */
.cw-review-grid { gap: 1rem !important; margin-top: 1.5rem !important; }
.cw-review { background: #fff; padding: 1.25rem; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12); border-radius: 14px; }
.cw-review p { margin: 0 0 0.35rem; }
.cw-review-name { font-family: var(--wp--preset--font-family--body); color: var(--wp--preset--color--black); }
.cw-stars { color: #f6bb06; letter-spacing: 0.1em; }
.cw-review-text { font-size: 0.9rem; line-height: 1.6; }
.cw-review-source { color: var(--wp--preset--color--grey); }
.cw-testimonials .wp-block-buttons { margin-top: 1.5rem; }

/* ---------- Map ---------- */
.cw-map iframe { display: block; width: 100%; }
.cw-card .cw-map { margin-top: 1rem; }
.cw-card .cw-map iframe { border-radius: 14px; }

/* ---------- Enquiry / contact ---------- */
.cw-enquire .cw-card { padding: 1.75rem 1.75rem 2rem; }
.cw-detail { margin: 0.35rem 0 !important; }
.cw-detail a { font-weight: 400; color: var(--wp--preset--color--ink); }

/* ---------- Form ---------- */
.cw-form { display: grid; gap: 1.1rem; margin-top: 1rem; }
.cw-form p { margin: 0; }
.cw-field-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 600px) { .cw-field-row { grid-template-columns: 1fr; } }
.cw-field label { display: block; font-size: 0.875rem; font-weight: 400; color: var(--wp--preset--color--ink); }
.cw-field input,
.cw-field textarea {
	width: 100%;
	box-sizing: border-box;
	font: inherit;
	font-weight: 400;
	padding: 0.45rem 0;
	border: 0;
	border-bottom: 1px solid #9fcfe8;
	border-radius: 0;
	background: transparent;
	color: var(--wp--preset--color--ink);
}
.cw-field input:focus, .cw-field textarea:focus { outline: none; border-bottom-color: var(--wp--preset--color--blue); }
.cw-form-actions { text-align: center; }
.cw-form button {
	cursor: pointer;
	border: 0;
	min-width: 200px;
	padding: 0.85rem 2rem;
	border-radius: 50px;
	background: var(--wp--preset--color--blue);
	color: #fff;
	font-family: var(--wp--preset--font-family--button);
	font-weight: 700;
	font-size: 1rem;
}
.cw-form button:hover { background: var(--wp--preset--color--blue-dark); }
.cw-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cw-form-notice { padding: 1rem 1.25rem; border-radius: 12px; margin-top: 1rem; }
.cw-form-notice p { margin: 0; }
.cw-form-notice.is-success { background: #eaf6fc; }
.cw-form-notice.is-error { background: #fdecea; }

/* ---------- Page heroes ---------- */
.cw-page-hero h1 { text-wrap: balance; }
.cw-suburb-hero h1 { font-size: clamp(2.1rem, 4vw, 3rem); }
.cw-suburb-hero .cw-card h3 { margin-bottom: 0.25rem; }

/* ---------- Footer ---------- */
.cw-footer {
	background: #111 var(--cw-footer-bg) center / cover no-repeat;
	position: relative;
	isolation: isolate;
	color: #fbfbfb;
	font-weight: 400;
	font-size: 0.95rem;
}
.cw-footer::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.72); z-index: -1; }
.cw-footer-title { margin: 0 !important; font-size: clamp(1.5rem, 2.6vw, 2.25rem) !important; }
.cw-footer h6 { font-family: var(--wp--preset--font-family--body); font-weight: 700; font-size: 1rem; margin-bottom: 1rem; }
.cw-footer a { color: #fbfbfb; font-weight: 400; }
.cw-footer a:hover { color: var(--wp--preset--color--blue); text-decoration: none; }
.cw-footer-links { list-style: none; padding: 0; margin: 0; }
.cw-footer-links li { margin: 0 0 0.55rem; }
.cw-footer-line { margin: 0 0 0.55rem !important; }
.cw-hours { display: grid; grid-template-columns: auto auto; gap: 0.4rem 1.5rem; justify-content: start; margin: 0; }
.cw-hours br { display: none; }
.cw-hours span { white-space: nowrap; }
.cw-footer .wp-block-separator { border-color: rgba(255, 255, 255, 0.25); opacity: 1; margin-block: var(--wp--preset--spacing--30); }
.cw-copyright { margin: 0; opacity: 0.85; }
.cw-footer .wp-block-social-links { margin-top: 0.75rem; }

/* ---------- Mobile ---------- */
@media (max-width: 781px) {
	.cw-home-hero { min-height: 0 !important; }
	.cw-tv { max-width: 360px; margin-top: 1rem; }
	.cw-location-buttons { gap: 0.6rem !important; }
	.cw-location-buttons .wp-block-button { width: calc(50% - 0.3rem); }
	.cw-location-buttons .wp-block-button__link { min-width: 0; width: 100%; }
	.cw-photo-tall img { aspect-ratio: 4 / 3; }
	.cw-hours { grid-template-columns: auto auto; }
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
}
