/*
Theme Name: Care Clan
Theme URI: https://careclan.com.au/
Author: Care Clan Pty Ltd
Description: Lightweight block theme for Care Clan — matches the original careclan.com.au design (Lora + Yellowtail, warm brown palette). No page builder, self-hosted fonts, minimal CSS.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.9
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: careclan
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { height: auto; max-width: 100%; }
:where(a):focus-visible,
:where(button, input, select, textarea, summary):focus-visible {
	outline: 2px solid var(--wp--preset--color--bgdark);
	outline-offset: 3px;
}
.skip-link.screen-reader-text:focus { z-index: 100000; }

/* ---------- Header ---------- */
.cc-topbar p {
	margin: 0;
	letter-spacing: .125em;
	text-transform: uppercase;
	line-height: 1.5;
}
.cc-header-row {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 1rem;
}
.cc-header-row > :first-child { justify-self: start; }
.cc-header-row > :last-child { justify-self: end; }
.cc-header-row .wp-block-site-logo img { width: 100px; }
.cc-phone { margin: 0; white-space: nowrap; }
.cc-phone a { text-decoration: none; }

.cc-nav .wp-block-navigation-item__content {
	letter-spacing: .214em;
	text-transform: uppercase;
	padding: 6px 0;
	text-decoration: none;
	border-bottom: 1px solid transparent;
}
.cc-nav .wp-block-navigation-item__content:hover,
.cc-nav .current-menu-item > .wp-block-navigation-item__content,
.cc-nav .wp-block-navigation-item__content[aria-current="page"] {
	border-bottom-color: currentColor;
}
.cc-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: 18px;
	padding: 10px 0;
}

@media (max-width: 781px) {
	.cc-header-row { grid-template-columns: auto 1fr auto; }
	.cc-header-row .wp-block-site-logo { justify-self: center; }
	.cc-header-row .wp-block-site-logo img { width: 72px; }
	.cc-phone { font-size: 15px !important; }
	.cc-header-row .wp-block-social-links { gap: .5rem; }
}

/* ---------- Content helpers carried over from the original build ---------- */
.wp-block-columns.nogap { gap: 0 !important; }
.wp-block-columns.nogap > .wp-block-column { margin: 0; }
.careclan-h1-separator {
	border: none;
	height: 3px;
	background-color: var(--wp--preset--color--tan);
	width: 80px;
	margin: 20px auto 32px;
}
.wp-block-image img, .wp-block-gallery img { display: block; }
.wp-block-button__link { transition: background-color .2s ease, color .2s ease; }

/* ---------- Footer ---------- */
.cc-footer .cc-upper { letter-spacing: .125em; text-transform: uppercase; }
.cc-footer p { margin-block: .75rem; }
.cc-footer a { text-decoration: none; }
.cc-footer a:hover { text-decoration: underline; }

/* ---------- Forms (Contact Form 7) ---------- */
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"],
.wpcf7 input[type="date"], .wpcf7 select, .wpcf7 textarea,
.cc-input {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid #c9c2bc;
	border-radius: 0;
	background: #fff;
	font: inherit;
	color: var(--wp--preset--color--secondary);
	box-sizing: border-box;
}
.wpcf7 textarea { min-height: 140px; }
.wpcf7 label { display: block; margin-bottom: 1rem; color: var(--wp--preset--color--secondary); }
.wpcf7 input[type="submit"] {
	background: var(--wp--preset--color--bgdark);
	color: var(--wp--preset--color--light);
	border: 0;
	border-radius: 0;
	padding: 16px 40px;
	font: 700 14px/1 var(--wp--preset--font-family--lora);
	letter-spacing: .214em;
	text-transform: uppercase;
	cursor: pointer;
}
.wpcf7 input[type="submit"]:hover { background: var(--wp--preset--color--secondary); }

/* ---------- Blog cards ---------- */
.cc-cards .wp-block-post { background: var(--wp--preset--color--bgcolor); }
.cc-cards .wp-block-post-featured-image { margin: 0; }
.cc-cards .wp-block-post-title a { text-decoration: none; }

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

/* ---------- Form layout ---------- */
.cc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.wpcf7 fieldset { border: 0; padding: 0; margin: 0 0 2rem; }
.wpcf7 legend { font: 400 22px/1.3 var(--wp--preset--font-family--lora); color: var(--wp--preset--color--secondary); letter-spacing: .045em; margin-bottom: 1rem; padding: 0; }
.cc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.cc-grid .cc-full { grid-column: 1 / -1; }
@media (max-width: 600px) { .cc-grid { grid-template-columns: 1fr; } }
.wpcf7 .wpcf7-list-item { margin: 0 1.25rem .5rem 0; display: inline-block; }
.wpcf7 .cc-q { display: block; margin-bottom: .5rem; color: var(--wp--preset--color--secondary); }
.wpcf7 .cc-group { margin-bottom: 1.25rem; }
.wpcf7 input[type="file"] { font: inherit; }
.wpcf7 .cc-note { font-size: 14px; }
.wpcf7-not-valid-tip { color: #b3261e; font-size: 14px; margin-top: 4px; }
.wpcf7 form .wpcf7-response-output { margin: 1.5rem 0 0; padding: 12px 16px; border-width: 2px; }
.wpcf7-spinner { margin-left: 12px; }
.wpcf7 label > .wpcf7-form-control-wrap { display: block; margin-top: 6px; }
.wpcf7 .wpcf7-radio label { display: inline; margin: 0; }
.wpcf7 input[type="submit"] { margin-top: .5rem; }

/* ---------- Galleries: uniform tiles, no stretched orphan row ---------- */
.wp-block-gallery.has-nested-images.columns-3 { justify-content: center; }
.wp-block-gallery.has-nested-images.columns-3 figure.wp-block-image:not(#individual-image) { flex-grow: 0; }
.wp-block-gallery.has-nested-images.columns-3.is-cropped figure.wp-block-image img { aspect-ratio: 4 / 3; height: auto; object-fit: cover; }

/* ---------- CTA band buttons (on dark background) ---------- */
.wp-block-button.is-style-cc-light .wp-block-button__link { background: var(--wp--preset--color--white); color: var(--wp--preset--color--bgdark); }
.wp-block-button.is-style-cc-light .wp-block-button__link:hover { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--bgdark); }
.wp-block-button.is-style-cc-outline .wp-block-button__link { background: transparent; color: var(--wp--preset--color--white); box-shadow: inset 0 0 0 2px currentColor; }
.wp-block-button.is-style-cc-outline .wp-block-button__link:hover { background: var(--wp--preset--color--white); color: var(--wp--preset--color--bgdark); }
.cc-cta-band p { color: var(--wp--preset--color--light); }
main > .wp-block-post-content > .cc-cta-band:last-child { margin-bottom: calc(-1 * var(--wp--preset--spacing--50)); }

/* ---------- FAQ (core/details) ---------- */
.wp-block-details { border-bottom: 1px solid #e6d9cf; padding: 4px 0; margin-block: 0 !important; }
.wp-block-details summary { cursor: pointer; padding: 12px 4px; min-height: 44px; font-weight: 700; color: var(--wp--preset--color--secondary); }
.wp-block-details summary:hover { color: var(--wp--preset--color--bgdark); }
.wp-block-details[open] summary { color: var(--wp--preset--color--bgdark); }
.wp-block-details > p { padding: 0 4px 12px; margin-top: 0; }
/* Lists inside centred cream boxes read better left-aligned */
.has-bgcolor-background-color .wp-block-list { text-align: left; max-width: 560px; margin-inline: auto; }
