/*
Theme Name: MELT
Theme URI: https://melt.staging.empathy.works
Description: Block theme for MELT Collective. Replaces the Elementor build; Toolset (Types, Blocks, Maps) still powers tools, workshops, members and project listings.
Author: Empathy Works
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: melt
*/

/* ---------- Header ---------- */
.melt-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, .94);
	backdrop-filter: saturate(1.4) blur(8px);
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.admin-bar .melt-header { top: 32px; }
.melt-header .wp-block-site-logo img { max-height: 34px; width: auto; }
.melt-header .wp-block-navigation-item__content { padding: .45em .9em; border-radius: 999px; }
.melt-header .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content,
.melt-header .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--cream); }

/* ---------- Eyebrows & helpers ---------- */
.is-style-eyebrow {
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--teal);
}
.has-teal-dark-background-color .is-style-eyebrow,
.wp-block-cover .is-style-eyebrow { color: var(--wp--preset--color--yellow); }
.melt-lede { font-size: var(--wp--preset--font-size--large); line-height: 1.5; color: var(--wp--preset--color--muted); }

/* ---------- Buttons ---------- */
.wp-block-button.is-style-melt-yellow .wp-block-button__link { background: var(--wp--preset--color--yellow); color: var(--wp--preset--color--ink); }
.wp-block-button.is-style-melt-yellow .wp-block-button__link:hover { background: #ffe24d; }
.wp-block-button.is-style-outline .wp-block-button__link { border: 1.5px solid currentColor; background: transparent; color: var(--wp--preset--color--teal); }
.wp-block-cover .wp-block-button.is-style-outline .wp-block-button__link { color: var(--wp--preset--color--white); }
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--wp--preset--color--teal-soft); }
.wp-block-cover .wp-block-button.is-style-outline .wp-block-button__link:hover { background: rgba(255,255,255,.12); }
.melt-banner img { width: 100%; max-height: 260px; object-fit: cover; border-radius: 14px; }
.wp-block-media-text__media img { height: 100%; object-fit: cover; }

/* ---------- Cards ---------- */
.is-style-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 14px;
	overflow: hidden;
	box-shadow: var(--wp--preset--shadow--card);
	transition: transform .2s ease, box-shadow .2s ease;
	height: 100%;
}
.is-style-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(22,34,43,.08), 0 14px 32px rgba(22,34,43,.10); }
.is-style-card > .wp-block-image,
.is-style-card > .wp-block-post-featured-image { margin: 0; }
.is-style-card > .wp-block-image img,
.is-style-card > .wp-block-post-featured-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.is-style-card .melt-card__body { padding: 1.25rem 1.4rem 1.5rem; }
.is-style-card h3 a, .is-style-card h2 a { text-decoration: none; color: inherit; }
.is-style-card h3 a::after, .is-style-card h2 a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.is-style-card { position: relative; }
.wp-block-post-template.is-layout-grid > li { height: 100%; }

/* ---------- Project section navigation ---------- */
.melt-section-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem 1.25rem;
	padding: .9rem 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
	margin-bottom: var(--wp--preset--spacing--50);
}
.melt-section-nav__title {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--medium);
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	margin-right: auto;
}
.melt-section-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; }
.melt-section-nav li a {
	display: block;
	padding: .35em .9em;
	border-radius: 999px;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	text-decoration: none;
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--sand);
}
.melt-section-nav li a:hover { background: var(--wp--preset--color--cream); }
.melt-section-nav li.is-current a { background: var(--wp--preset--color--teal); color: var(--wp--preset--color--white); }

/* ---------- Content polish ---------- */
.wp-block-post-content img { border-radius: 10px; height: auto; }
.wp-block-post-content figure.wp-block-image { margin-block: 1.5rem; }
.wp-block-cover img { border-radius: 0; }
.melt-step .wp-block-image img { background: var(--wp--preset--color--sand); padding: 1rem; }
hr.wp-block-separator { border-top-width: 1px; opacity: 1; }

/* ---------- Toolset output ---------- */
/* Views render their own grids; give them the same rhythm and card look as the theme. */
.wpv-gutenberg-view-wrapper, .js-wpv-view-layout { margin-block: 1.5rem; }
.wpv-grid-row, .wpv-block-loop-item { margin-bottom: 0; }
.tb-container, .tb-grid { border-radius: 14px; }
.wp-block-toolset-blocks-heading a, .tb-heading a { text-decoration: none; }
.wp-block-toolset-views-view-editor .wpv-block-loop-item img { border-radius: 10px; }
.wpv-pagination-nav-links-container { list-style: none; display: flex; gap: .5rem; padding: 0; }
.toolset-google-map-container, .js-wpv-addon-maps-render, .wpv-addon-maps-render { border-radius: 14px; overflow: hidden; }

/* ---------- Footer ---------- */
.melt-footer a { color: inherit; text-decoration: none; }
.melt-footer a:hover { text-decoration: underline; }

@media (max-width: 781px) {
	.melt-section-nav__title { width: 100%; }
}
@media (max-width: 600px) {
	.admin-bar .melt-header { top: 0; }
}

/* ---------- Sections & callouts (classes keep block markup free of inline styles) ---------- */
.melt-section { padding-block: var(--wp--preset--spacing--60); margin-block: 0 !important; }
.melt-section--tight { padding-block: var(--wp--preset--spacing--50); }
.wp-block-post-content > .melt-section + .melt-section { margin-top: 0; }
.melt-hero { margin-top: 0 !important; padding-block: var(--wp--preset--spacing--60); }
.melt-hero .wp-block-cover__inner-container { width: 100%; }
.melt-hero__title { font-size: clamp(2.5rem, 6vw, 4.5rem) !important; max-width: 14ch; }
.melt-hero__lede { max-width: 38rem; }
.melt-callout { border-radius: 14px; padding: 1.5rem 1.75rem; }
.melt-callout--cream { background: var(--wp--preset--color--cream); }
.melt-callout--teal { background: var(--wp--preset--color--teal-soft); }
.melt-icon-card { padding: 1.5rem; }
.melt-icon-card h3 { font-size: var(--wp--preset--font-size--medium); }
.melt-feature { background: var(--wp--preset--color--teal-soft); border-radius: 14px; overflow: hidden; }
.melt-feature .wp-block-media-text__media img { max-height: 440px; width: 100%; object-fit: cover; }
.melt-chart { background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 14px; padding: 1.5rem; }
#content-container h3, #content-container h4 { font-family: var(--wp--preset--font-family--display); }
