/*
Theme Name: BEO – Bulgarian Essential Oils
Theme URI: https://www.bulgarianessentialoils.com/
Author: Bulgarian Essential Oils
Description: Custom block theme for Bulgarian Essential Oils — organic lavender and melissa oil producer from Dobrudja, Bulgaria. Lightweight, self-hosted fonts, no page builder.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: beo
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--wp--preset--color--primary-light); color: var(--wp--preset--color--contrast); }
img { height: auto; }
a { text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
.wp-element-button, .wp-block-button__link { transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
}
.skip-link.screen-reader-text:focus { background: var(--wp--preset--color--white); z-index: 100000; }

/* ---------- Eyebrow / small labels ---------- */
.beo-eyebrow {
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
	margin-bottom: 0.25rem;
}
.beo-lead { font-size: var(--wp--preset--font-size--large); line-height: 1.6; color: var(--wp--preset--color--muted); }

/* ---------- Top bar ---------- */
.beo-topbar { font-size: var(--wp--preset--font-size--x-small); letter-spacing: 0.02em; }
.beo-topbar a { color: inherit; text-decoration: none; }
.beo-topbar a:hover { text-decoration: underline; }
@media (max-width: 781px) { .beo-topbar .beo-hide-mobile { display: none !important; } }

/* ---------- Header ---------- */
.beo-site-header { position: sticky; top: 0; z-index: 50; }
.admin-bar .beo-site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .beo-site-header { top: 0; position: relative; } }
.beo-header {
	background: rgba(250, 247, 242, 0.92);
	backdrop-filter: saturate(1.4) blur(10px);
	-webkit-backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid var(--wp--preset--color--border);
}
.beo-logo { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--wp--preset--color--contrast); line-height: 1; }
.beo-logo svg { width: 38px; height: 38px; flex: none; }
.beo-logo__text { display: flex; flex-direction: column; gap: 0.2rem; }
.beo-logo__name { font-family: var(--wp--preset--font-family--heading); font-size: 1.25rem; font-weight: 500; letter-spacing: -0.01em; }
.beo-logo__tag { font-size: 0.66rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--wp--preset--color--secondary); }
.beo-logo:hover .beo-logo__name { color: var(--wp--preset--color--primary); }
@media (max-width: 420px) { .beo-logo__name { font-size: 1.05rem; } .beo-logo svg { width: 32px; height: 32px; } }

.beo-header .wp-block-navigation__container { gap: 1.75rem; }
.beo-header .wp-block-navigation-item__content { padding: 0.35rem 0; position: relative; }
.beo-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content { color: var(--wp--preset--color--primary); }
@media (min-width: 600px) {
	.beo-header .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content::after {
		content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px;
		background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
	}
	.beo-header .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content:hover::after,
	.beo-header .wp-block-navigation__container > .current-menu-item > .wp-block-navigation-item__content::after { transform: scaleX(1); }
}
/* Mobile overlay menu */
.wp-block-navigation__responsive-container.is-menu-open { padding: 1.5rem; background: var(--wp--preset--color--base) !important; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 1.1rem; font-size: 1.375rem; font-family: var(--wp--preset--font-family--heading); }
.beo-header-cta .wp-block-button__link { padding: 0.6rem 1.1rem; }
@media (max-width: 1080px) { .beo-header-cta .beo-cta-sample { display: none; } }
@media (max-width: 599px) { .beo-header-cta { display: none !important; } }

/* ---------- Hero ---------- */
.beo-hero { min-height: min(88vh, 760px); }
.beo-hero .wp-block-cover__inner-container { max-width: 1240px; }
.beo-hero > .wp-block-cover__background {
	background: linear-gradient(180deg, rgba(31,42,36,0.10) 0%, rgba(31,42,36,0.35) 40%, rgba(31,42,36,0.82) 100%) !important;
	opacity: 1 !important;
}
.beo-hero .beo-lead { max-width: 38rem; }
.beo-hero h1 { color: #fff; text-wrap: balance; max-width: 20ch; }
.beo-hero .beo-eyebrow { color: #F3E7CF; }
.beo-hero p { color: rgba(255,255,255,0.92); }
.beo-hero .wp-block-button__link { background: #fff; color: var(--wp--preset--color--primary-dark); border-color: #fff; }
.beo-hero .wp-block-button__link:hover { background: var(--wp--preset--color--primary-light); border-color: var(--wp--preset--color--primary-light); color: var(--wp--preset--color--primary-dark); }
.beo-hero .is-style-outline .wp-block-button__link { background: transparent; color: #fff; border-color: rgba(255,255,255,0.8); }
.beo-hero .is-style-outline .wp-block-button__link:hover { background: #fff; color: var(--wp--preset--color--primary-dark); }
.beo-hero-facts { border-top: 1px solid rgba(255,255,255,0.3); padding-top: 1.25rem; }
.beo-hero-facts p { margin: 0; font-size: var(--wp--preset--font-size--small); }
.beo-hero-facts strong { display: block; font-family: var(--wp--preset--font-family--heading); font-size: 1.75rem; font-weight: 400; color: #fff; line-height: 1.1; }

/* ---------- Page header (inner pages) ---------- */
.beo-page-header h1 { text-wrap: balance; max-width: 22ch; }

/* ---------- Trust strip ---------- */
.beo-trust__list { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }
.beo-trust__list li { display: flex; align-items: flex-start; gap: 0.85rem; line-height: 1.45; }
.beo-trust__list strong { color: var(--wp--preset--color--contrast); }
.beo-trust__list p { color: var(--wp--preset--color--muted); }
@media (max-width: 1000px) { .beo-trust__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .beo-trust__list { grid-template-columns: 1fr; } }
.beo-trust p { margin: 0; font-size: var(--wp--preset--font-size--small); }
.beo-trust .beo-trust__icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--wp--preset--color--secondary-light); color: var(--wp--preset--color--secondary); flex: none; }
.beo-trust .beo-trust__icon svg { width: 20px; height: 20px; }

/* ---------- Cards ---------- */
.beo-card { border-radius: var(--wp--custom--radius--large); overflow: hidden; height: 100%; transition: transform .3s ease, box-shadow .3s ease; }
.beo-card:hover { transform: translateY(-3px); box-shadow: var(--wp--preset--shadow--soft); }
.beo-card .wp-block-image { margin: 0; }
.beo-card .wp-block-image img { border-radius: 0; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.beo-card h3 a { text-decoration: none; color: inherit; }
.beo-card h3 a:hover { color: var(--wp--preset--color--primary); }
.wp-block-columns.beo-equal > .wp-block-column { display: flex; flex-direction: column; }
.wp-block-columns.beo-equal > .wp-block-column > * { flex: 1; }

.beo-spec-list { list-style: none; padding: 0; margin: 0; }
.beo-spec-list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--wp--preset--color--border); font-size: var(--wp--preset--font-size--small); }
.beo-spec-list li span:first-child { color: var(--wp--preset--color--muted); }
.beo-spec-list li span:last-child { font-weight: 600; text-align: right; }

/* ---------- Check list ---------- */
ul.beo-checks { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
ul.beo-checks li { position: relative; padding-left: 2rem; margin: 0; }
ul.beo-checks li::before {
	content: ""; position: absolute; left: 0; top: 0.2em; width: 1.3rem; height: 1.3rem; border-radius: 50%;
	background: var(--wp--preset--color--secondary) 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 12l4 4 8-8'/%3E%3C/svg%3E") center / 0.8rem no-repeat;
}

/* ---------- Steps ---------- */
.beo-step__num { font-family: var(--wp--preset--font-family--heading); font-size: 2.75rem; line-height: 1; color: var(--wp--preset--color--primary); font-weight: 300; font-style: italic; }

/* ---------- Image treatments ---------- */
.beo-img-tall img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.beo-img-wide img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.beo-badge-cert img { border-radius: 0; max-width: 150px; }

/* ---------- CTA band ---------- */
.beo-cta { border-radius: var(--wp--custom--radius--large); }
.beo-cta h2 { color: #fff; text-wrap: balance; }
.beo-cta p { color: rgba(255,255,255,0.88); }
.beo-cta .wp-block-button__link { background: #fff; color: var(--wp--preset--color--secondary); border-color: #fff; }
.beo-cta .wp-block-button__link:hover { background: var(--wp--preset--color--secondary-light); border-color: var(--wp--preset--color--secondary-light); color: var(--wp--preset--color--secondary); }
.beo-cta .is-style-outline .wp-block-button__link { background: transparent; color: #fff; border-color: rgba(255,255,255,0.75); }
.beo-cta .is-style-outline .wp-block-button__link:hover { background: #fff; color: var(--wp--preset--color--secondary); }

/* ---------- Content (pages migrated from old theme) ---------- */
.entry-content > * + h2, .wp-block-post-content > * + h2 { margin-top: var(--wp--preset--spacing--50); }
.wp-block-post-content h2 + p, .wp-block-post-content h3 + p { margin-top: 0.75rem; }
.wp-block-post-content img { border-radius: var(--wp--custom--radius--medium); }
.wp-block-post-content ul li, .wp-block-post-content ol li { margin-bottom: 0.4rem; }
.wp-block-post-content .wp-block-gallery img { aspect-ratio: 4 / 3; object-fit: cover; }

/* Tables (price lists) */
.wp-block-table, .wp-block-post-content table { overflow-x: auto; }
.wp-block-post-content table, .wp-block-table table {
	width: 100%; border-collapse: separate; border-spacing: 0;
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--medium);
	overflow: hidden;
	font-size: var(--wp--preset--font-size--small);
}
.wp-block-post-content th, .wp-block-post-content td, .wp-block-table th, .wp-block-table td { padding: 0.85rem 1rem; border: 0; border-bottom: 1px solid var(--wp--preset--color--border); text-align: left; vertical-align: top; }
.wp-block-post-content thead th, .wp-block-table thead th, .wp-block-post-content tr:first-child th {
	background: var(--wp--preset--color--primary-light); color: var(--wp--preset--color--primary-dark);
	font-weight: 600; font-size: var(--wp--preset--font-size--x-small); text-transform: uppercase; letter-spacing: 0.08em;
}
.wp-block-post-content tr:last-child td, .wp-block-table tr:last-child td { border-bottom: 0; }
.wp-block-post-content tbody tr:hover td { background: var(--wp--preset--color--base); }
@media (max-width: 600px) { .wp-block-post-content th, .wp-block-post-content td { padding: 0.65rem 0.7rem; } }

/* FAQ */
.wp-block-details summary { cursor: pointer; font-family: var(--wp--preset--font-family--heading); font-size: var(--wp--preset--font-size--large); list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; font-family: var(--wp--preset--font-family--body); font-size: 1.5rem; font-weight: 300; color: var(--wp--preset--color--primary); transition: transform .2s ease; }
.wp-block-details[open] summary::after { transform: rotate(45deg); }
.wp-block-details > :not(summary) { color: var(--wp--preset--color--muted); }

/* ---------- Contact Form 7 ---------- */
.wpcf7 form { display: grid; gap: 1rem; }
.wpcf7 form > p { margin: 0; }
.wpcf7 label { display: block; font-size: var(--wp--preset--font-size--small); font-weight: 600; color: var(--wp--preset--color--contrast); }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 input[type="number"], .wpcf7 select, .wpcf7 textarea {
	width: 100%; margin-top: 0.35rem; padding: 0.8rem 1rem;
	font: inherit; font-size: var(--wp--preset--font-size--medium); color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--border); border-radius: var(--wp--custom--radius--small);
	transition: border-color .2s ease, box-shadow .2s ease;
}
.wpcf7 textarea { min-height: 140px; resize: vertical; }
.wpcf7 input:focus, .wpcf7 select:focus, .wpcf7 textarea:focus { outline: none; border-color: var(--wp--preset--color--primary); box-shadow: 0 0 0 3px var(--wp--preset--color--primary-light); }
.wpcf7 input[type="submit"] {
	justify-self: start; cursor: pointer; border: 1.5px solid var(--wp--preset--color--primary); border-radius: 999px;
	background: var(--wp--preset--color--primary); color: #fff; font: inherit; font-weight: 600; font-size: var(--wp--preset--font-size--small);
	padding: 0.85rem 1.8rem; transition: background-color .2s ease;
}
.wpcf7 input[type="submit"]:hover { background: var(--wp--preset--color--primary-dark); }
.wpcf7 .wpcf7-spinner { margin: 0.5rem 0 0; }
.wpcf7 .wpcf7-not-valid-tip { font-size: var(--wp--preset--font-size--x-small); margin-top: 0.25rem; }
.wpcf7 form .wpcf7-response-output { margin: 0; border-radius: var(--wp--custom--radius--small); padding: 0.75rem 1rem; font-size: var(--wp--preset--font-size--small); }
.beo-form-card .wpcf7 { margin-top: 0.5rem; }

/* ---------- Footer ---------- */
.beo-footer a { color: inherit; text-decoration: none; }
.beo-footer a:hover { color: #fff; text-decoration: underline; }
.beo-footer .beo-logo { color: #fff; }
.beo-footer .beo-logo__tag { color: #C9D6CB; }
.beo-footer .beo-footer__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.beo-footer h2 { color: #fff; }

/* ---------- Misc ---------- */
.beo-rounded img, .beo-rounded { border-radius: var(--wp--custom--radius--large); }
.wp-block-post-featured-image img { border-radius: var(--wp--custom--radius--large); }
.has-base-2-background-color.beo-band, .has-primary-light-background-color.beo-band { border-radius: 0; }

/* ---------- Fixes after staging review ---------- */
*, *::before, *::after { box-sizing: border-box; }
iframe, embed, object, video { max-width: 100%; }
.wp-block-post-content iframe[src*="youtube"], .wp-block-post-content iframe[src*="vimeo"] { width: 100%; height: auto; aspect-ratio: 16 / 9; }

/* Certificate logo must never be cropped (cards crop photos to 4:3) */
.beo-card .beo-badge-cert img, .beo-badge-cert img { aspect-ratio: auto; object-fit: contain; width: auto; max-width: 160px; border-radius: 0; }
.beo-footer .beo-badge-cert img { border-radius: var(--wp--custom--radius--small); }

/* Images inserted with the classic editor (alignleft / alignright) */
.wp-block-post-content img.alignleft, .wp-block-post-content .wp-caption.alignleft { float: left; margin: 0.35rem 1.75rem 1rem 0; max-width: 45%; }
.wp-block-post-content img.alignright, .wp-block-post-content .wp-caption.alignright { float: right; margin: 0.35rem 0 1rem 1.75rem; max-width: 45%; }
.wp-block-post-content img.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-block-post-content h2, .wp-block-post-content h3, .wp-block-post-content table, .wp-block-post-content .wpcf7 { clear: both; }
.wp-block-post-content::after { content: ""; display: table; clear: both; }
@media (max-width: 600px) {
	.wp-block-post-content img.alignleft, .wp-block-post-content img.alignright { float: none; display: block; max-width: 100%; margin: 0 0 1rem; }
}

/* Classic tables: scroll sideways inside their own box on small screens instead of widening the page */
@media (max-width: 700px) {
	.wp-block-post-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
	.wp-block-post-content th, .wp-block-post-content td { min-width: 7rem; }
}

/* Contact Form 7 fields ignore their size="40" attribute */
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 textarea { max-width: 100%; }
