/*
Theme Name: Clara Biofuels
Description: Custom block theme recreating clarabiofuels.com.
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.2
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: clara-biofuels
Tags: full-site-editing, block-patterns, block-styles, wide-blocks, accessibility-ready, style-variations
*/

/* WordPress inserts margin-block-start: var(--wp--style--block-gap) between the
   template's top-level sections (header part, main, footer part) — a gap that
   exists even when no markup asks for it. Zero it so sections butt edge-to-edge
   and own their vertical rhythm via padding; this does not affect block gaps
   inside nested layouts. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* ---------- Header ---------- */
.cb-header {
	box-shadow: 0 2px 12px rgba(20, 20, 43, 0.06);
	position: relative;
	z-index: 50;
}

.cb-nav a {
	color: #14142b;
	font-weight: 500;
}

.cb-nav a:hover,
.cb-nav .current-menu-item > a {
	color: #27aae1;
}

.cb-nav .wp-block-navigation__submenu-container {
	border: 1px solid #eff0f6;
	border-radius: 12px;
	box-shadow: 0 8px 28px rgba(20, 20, 43, 0.08);
	padding: 8px 0;
	min-width: 220px !important;
}

.cb-nav .wp-block-navigation__submenu-container a {
	padding: 10px 20px;
}

/* Buttons: pill shape with soft shadow + lift on hover, like the live site */
.wp-block-button__link,
.wp-element-button {
	transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
	box-shadow: 0 8px 20px rgba(87, 164, 219, 0.28);
}

.wp-block-button__link:hover,
.wp-element-button:hover {
	background-color: #27aae1;
	transform: translateY(-2px);
	color: #fff;
}

/* ---------- Shared section helpers ---------- */
.cb-card {
	background: #ffffff;
	border: 1px solid #eff0f6;
	border-radius: 24px;
	box-shadow: 0 8px 28px rgba(20, 20, 43, 0.05);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cb-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 14px 42px rgba(20, 20, 43, 0.10);
}

.cb-rounded-img img {
	border-radius: 24px;
}

.cb-eyebrow {
	color: #27aae1;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	font-size: 14px;
}

/* Arch-shaped images (rounded top like the live Solutions section) */
.cb-arch img {
	border-radius: 300px 300px 24px 24px;
	width: 100%;
	object-fit: cover;
}

/* Eyebrow chip pills */
.cb-chip {
	background: #eaf6fc;
	border-radius: 30px;
	padding: 4px 18px;
	width: -moz-fit-content;
	width: fit-content;
	margin: 0 auto 18px;
}

.cb-chip-green {
	background: #e7f6ec;
}

/* FAQ accordion (core details block) */
.cb-faq details {
	background: #ffffff;
	border: 1px solid #eff0f6;
	border-radius: 16px;
	box-shadow: 0 6px 20px rgba(20, 20, 43, 0.05);
	padding: 22px 28px;
	margin-bottom: 16px;
}

.cb-faq summary {
	font-weight: 700;
	color: #101828;
	font-size: 20px;
	cursor: pointer;
}

/* Product pages: green-bullet feature lists */
.cb-feature-list {
	list-style: none;
	padding-left: 0;
}

.cb-feature-list li {
	position: relative;
	padding-left: 28px;
	margin-bottom: 16px;
	color: #5a5658;
}

.cb-feature-list li::before {
	content: "•";
	color: #109637;
	font-size: 26px;
	line-height: 1;
	position: absolute;
	left: 4px;
	top: 0;
}

.cb-feature-list li strong {
	color: #211f54;
}

/* Product pages: striped spec table */
.cb-spec-table table {
	border-collapse: collapse;
	width: 100%;
	background: #fff;
	border: 1px solid #e6e6e6;
}

.cb-spec-table th,
.cb-spec-table td {
	border: none;
	border-bottom: 1px solid #e6e6e6;
	padding: 16px 20px;
	font-size: 15px;
	text-align: left;
}

.cb-spec-table th {
	background: #f3f3f3;
	color: #211f54;
	font-weight: 700;
}

.cb-spec-table tbody tr:nth-child(even) {
	background: #f8f8f8;
}

/* Contact form styling (matches rounded inputs on live site) */
.cb-form input[type="text"],
.cb-form input[type="email"],
.cb-form input[type="tel"],
.cb-form textarea {
	border: 1px solid #eff0f6;
	border-radius: 10px;
	padding: 14px 18px;
	width: 100%;
	font-family: inherit;
	font-size: 16px;
	color: #14142b;
	background: #fff;
}

.cb-form input:focus,
.cb-form textarea:focus {
	outline: none;
	border-color: #27aae1;
}

.cb-form input[type="submit"] {
	background: #57a4db;
	color: #fff;
	font-weight: 700;
	font-size: 17px;
	border: none;
	border-radius: 40px;
	padding: 16px 40px;
	margin-top: 20px;
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(87, 164, 219, 0.28);
	transition: background-color 0.3s ease, transform 0.3s ease;
}

.cb-form input[type="submit"]:hover {
	background: #27aae1;
	transform: translateY(-2px);
}

.cb-form .wpcf7-form p {
	margin-bottom: 14px;
}

.cb-form .cb-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

/* CF7 wpautop wraps paired labels in a single <p>; dissolve it so the
   labels themselves become the grid items, and hide the <br> separators
   between labels (they would otherwise become empty grid cells). */
.cb-form .cb-form-grid p {
	display: contents;
}

.cb-form .cb-form-grid p > br {
	display: none;
}

.cb-form label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #14142b;
	margin-bottom: 12px;
}

.cb-form label input,
.cb-form label textarea {
	margin-top: 6px;
	font-weight: 400;
}

.cb-form textarea {
	min-height: 160px;
}

/* Biodiesel FAQ: tabbed question groups (live uses a Webflow tabs widget) */
.cb-tabs-menu {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin: 48px 0 32px;
}

.cb-tab-link {
	background: #ffffff;
	border: 1px solid #eff0f6;
	border-radius: 30px;
	padding: 8px 22px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	color: #14142b;
	cursor: pointer;
}

.cb-tab-link:hover {
	border-color: #27aae1;
	color: #27aae1;
}

.cb-tab-link.is-current {
	background: #27aae1;
	border-color: #27aae1;
	color: #ffffff;
}

.cb-tab-pane {
	display: none;
}

.cb-tab-pane.is-current {
	display: block;
}

/* Nav dropdown chevron (live's BRIX asset, swapped in for the block's inline SVG) */
.cb-dropdown-chevron {
	width: 12px;
	height: 12px;
}

/* Nav: "Get started" is a mobile-only CTA on the live site */
.cb-nav-getstarted a {
	background: #27aae1;
	color: #ffffff;
	border-radius: 30px;
	padding: 10px 26px;
	font-weight: 600;
}

/* Block-library styles load after the theme, so match their specificity. */
@media (min-width: 600px) {
	.wp-block-navigation-item.cb-nav-getstarted {
		display: none;
	}
}

/* Home hero: decorative blob + circular scroll-down button */
.cb-hero {
	position: relative;
	overflow: hidden;
}

.cb-hero-blob {
	position: absolute;
	right: -60px;
	bottom: -80px;
	width: 320px;
	opacity: 0.2;
	pointer-events: none;
	z-index: 0;
}

.cb-hero > .wp-block-columns {
	position: relative;
	z-index: 1;
}

.cb-scroll-circle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	margin-top: 56px;
	background: #ffffff;
	border-radius: 50%;
	box-shadow: 0 4px 18px rgba(20, 20, 43, 0.08);
}

.cb-scroll-circle img {
	width: 18px;
	height: 18px;
}

/* Library: category badge + date meta row */
.cb-meta {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 24px;
}

.cb-badge {
	background: #eaf6fc;
	color: #27aae1;
	border-radius: 30px;
	padding: 4px 14px;
	font-size: 13px;
	font-weight: 700;
}

.cb-meta .cb-date {
	color: #6e7191;
	font-size: 13px;
}

/* Library: "Read more" link with arrow icon */
.cb-readmore {
	display: flex;
	align-items: center;
	gap: 8px;
}

.cb-readmore a {
	color: #27aae1;
	font-weight: 700;
	text-decoration: none;
}

.cb-readmore img {
	width: 20px;
	height: 20px;
}

/* Library: category filter badges beside "Latest articles" */
.cb-cats {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 18px;
}

.cb-cats a {
	background: #ffffff;
	border: 1px solid #eff0f6;
	border-radius: 30px;
	padding: 6px 18px;
	font-size: 14px;
	font-weight: 600;
	color: #14142b;
	text-decoration: none;
}

.cb-cats a:hover {
	border-color: #27aae1;
	color: #27aae1;
}

/* Legal pages: live renders body text and section headings at the same
   17px / 28px / #323133, headings differing only by weight, with a blank
   line between blocks. Match those metrics without giving up real headings. */
/* !important is needed because WP's fluid typography emits per-block inline
   font-size/line-height, which would otherwise win. */
.cb-legal p,
.cb-legal li {
	font-size: 17px !important;
	line-height: 28px !important;
	color: #323133 !important;
}

.cb-legal p {
	margin: 0 0 28px;
}

.cb-legal h3,
.cb-legal h4 {
	font-size: 17px !important;
	line-height: 28px !important;
	font-weight: 700;
	color: #323133 !important;
	margin: 28px 0;
}

.cb-legal h2 {
	font-size: 24px !important;
	line-height: 32px !important;
	font-weight: 700;
	color: #323133 !important;
}

.cb-legal ul,
.cb-legal ol {
	margin: 0 0 28px;
}

.cb-legal li {
	margin-bottom: 28px;
}

/* /biosolv background video + play/pause control (mirrors Webflow's player) */
.cb-bgvideo {
	position: relative;
	overflow: hidden;
	border-radius: 16px;
}

.cb-bgvideo__video {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
}

.cb-bgvideo__control {
	position: absolute;
	right: 16px;
	bottom: 16px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	background: rgba(0, 0, 0, 0.45);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}

.cb-bgvideo__control img {
	width: 18px;
	height: 18px;
}

/* Static form panels, hidden until submit — mirrors Webflow's
   .w-form-done / .w-form-fail, which live also ships hidden. */
.cb-form-done,
.cb-form-fail {
	display: none;
}

/* CF7 success panel (matches the live site's success state) */
.cb-form-success {
	background: #109637;
	border: 0;
	border-radius: 16px;
	padding: 28px;
	color: #ffffff;
	text-align: center;
}

.cb-form-success img {
	width: 48px;
	height: 48px;
	margin-bottom: 12px;
}

.cb-form-success h2 {
	margin: 0 0 8px;
	font-size: 24px;
	color: #ffffff;
}

/* Contact: centered "Want to reach out directly?" block below the form */
.cb-contact-intro {
	max-width: 460px;
	margin: 80px auto 0;
	text-align: center;
}

.cb-contact-cards {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 24px;
	max-width: 620px;
	margin: 32px auto 0;
}

.cb-contact-cards a {
	display: flex;
	align-items: center;
	gap: 16px;
	text-decoration: none;
}

.cb-contact-cards img {
	width: 44px;
	height: 44px;
}

.cb-contact-cards .cb-cc-label {
	display: block;
	font-size: 16px;
	color: #6e7191;
	margin-bottom: 8px;
}

.cb-contact-cards .cb-cc-value {
	display: block;
	font-size: 16px;
	font-weight: 700;
	color: #27aae1;
}

@media (max-width: 600px) {
	.cb-contact-cards {
		grid-template-columns: 1fr;
	}
}

/* Contact: social media icon row */
.cb-social {
	display: flex;
	align-items: center;
	gap: 14px;
}

.cb-social img {
	width: 32px;
	height: 32px;
}

/* Language switcher (EN | ES) in the header. Sits between the navigation and
   the Get Quote button, and collapses to the row above the CTA on mobile. */
.cb-lang-switcher {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 16px;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
}

.cb-lang-switcher .cb-lang {
	color: #14142b;
	text-decoration: none;
	padding: 6px 4px;
	border-radius: 4px;
	transition: color .15s ease, opacity .15s ease;
}

.cb-lang-switcher a.cb-lang:hover,
.cb-lang-switcher a.cb-lang:focus-visible {
	color: var(--wp--preset--color--brand-blue, #4a9fd8);
	text-decoration: underline;
}

.cb-lang-switcher .cb-lang.is-current {
	color: var(--wp--preset--color--brand-blue, #4a9fd8);
	font-weight: 700;
}

.cb-lang-switcher .cb-lang-sep {
	color: #c7c9d9;
}

/* The shortcode block wrapper would otherwise inherit paragraph margins. */
.cb-header .wp-block-shortcode {
	margin: 0;
}

@media (max-width: 781px) {
	.cb-lang-switcher {
		font-size: 15px;
	}
}

/* Spanish labels run noticeably longer than the English originals. Keep the
   header CTA and the switcher on one line rather than breaking mid-word. */
.cb-header .cb-btn-header .wp-block-button__link,
.cb-lang-switcher .cb-lang {
	white-space: nowrap;
	overflow-wrap: normal;
	word-break: keep-all;
	hyphens: none;
}
