/*
 * Content pages (RFL-5): Home sections (patterns/home-*.php), About, legal pages, Contact (templates/template-contact.html).
 * Sizes are measured on the Elementor pages under Blocksy (.private/rfl5/phase2/content/measure/blocksy/).
 * Home and About sections stack where WordPress columns stack (below 782px); other rules use the theme breakpoints.
 */

/* ---------- Home: full-width sections without gaps (templates/front-page.html) ---------- */
.reflect-front .wp-block-post-content > * { margin-block: 0; }

/* ---------- Home: category tiles ---------- */
.reflect-home-categories { padding: calc(1.5vh + 10px) 10px; }
.wp-block-columns.reflect-home-categories__row { gap: 15px; margin: 0; }
.wp-block-cover.reflect-home-tile { min-height: calc(80vh - 20px); padding: 0; }
.reflect-home-tile .wp-block-cover__inner-container { padding-top: 150px; }
.reflect-home-pill .wp-block-button__link {
	min-height: 0;
	padding: 12px 24px;
	border-radius: 15px;
	background: var(--wp--preset--color--palette-color-8);
	color: var(--wp--preset--color--black);
	box-shadow: 0 0 40px rgba(0, 0, 0, .79);
	font-size: 15px;
	font-weight: 400;
	line-height: 1;
	transition: transform .3s;
}
.reflect-home-pill .wp-block-button__link:is(:hover, :focus) { background: var(--wp--preset--color--palette-color-8); color: var(--wp--preset--color--black); transform: scale(1.1); }

/* ---------- Home: all products link ---------- */
.reflect-home-all { padding: 102px 10px; }
.wp-block-button.reflect-home-all__button { width: 12%; min-width: 150px; }
.reflect-home-all__button .wp-block-button__link {
	width: 100%;
	min-height: 0;
	padding: 10px 0;
	border: 1px solid #54595f; /* Elementor secondary colour */
	border-radius: 20px;
	background: transparent;
	color: #54595f;
	font-size: 18px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: -.5px;
	word-spacing: .1rem;
	transition: background-color .3s, color .3s, border-color .3s;
}
.reflect-home-all__button .wp-block-button__link:is(:hover, :focus) { border-color: var(--wp--preset--color--palette-color-8); background: var(--wp--preset--color--palette-color-3); color: var(--wp--preset--color--palette-color-8); }

/* ---------- Home: video tiles (assets/js/video.js plays them) ---------- */
.wp-block-columns.reflect-home-videos__row { gap: 0; margin: 0; }
.wp-block-cover.reflect-video-tile { min-height: 100vh; padding: 10px; }
.reflect-video-tile .wp-block-cover__inner-container { width: 100%; }
.wp-block-group.reflect-video-tile__bar { gap: 10px; padding: 0 9px 0 10px; }
.reflect-video-tile__title {
	flex: 1 1 auto;
	margin: 0;
	word-break: normal; /* a word never breaks; the button gives way instead */
	color: var(--wp--preset--color--palette-color-8);
	font-size: 29px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 1.5px;
	text-shadow: -1px 0 5px #000;
}
.reflect-video-tile__title a, .reflect-video-tile__title a:hover { color: inherit; }
.reflect-video-tile__bar > .wp-block-buttons, .wp-block-button.reflect-video-tile__button { min-width: 0; }
.reflect-video-tile__button .wp-block-button__link {
	width: 180px;
	max-width: 100%;
	min-height: 0;
	padding: 10px 0;
	border: 1px solid var(--wp--preset--color--palette-color-8);
	border-radius: 20px;
	background: transparent;
	color: var(--wp--preset--color--palette-color-8);
	box-shadow: 0 2px 7px rgba(0, 0, 0, .6);
	font-size: 16px;
	font-weight: 400;
	line-height: 1;
	text-align: center;
	transition: background-color .3s;
}
.reflect-video-tile__button .wp-block-button__link:is(:hover, :focus) { background: var(--wp--preset--color--palette-color-1); color: var(--wp--preset--color--palette-color-8); }
.reflect-video-tile :focus-visible { outline-color: var(--wp--preset--color--palette-color-8); box-shadow: 0 0 0 4px rgba(0, 0, 0, .6); } /* readable on light and dark video */

/* ---------- Home: editorial picks (hand-picked Product Collection; renders nothing while empty) ---------- */
.reflect-home-editorial { width: 90%; margin-inline: auto; padding-block: clamp(60px, 8vw, 120px); }
.reflect-home-editorial > h2 { margin: 0 0 clamp(48px, 6vw, 72px); font-size: 2rem; font-weight: 500; }

/* ---------- Home: brand logo marquee (inc/home.php adds a hidden copy of each logo and the pause button with the hidden attribute; assets/js/marquee.js shows and runs the button) ---------- */
.reflect-home-brands { position: relative; container-type: inline-size; overflow: hidden; padding: 70px 0; }
.reflect-front .reflect-home-brands { margin-top: 20px; }
.wp-block-group.reflect-marquee { --reflect-marquee-gap: 20px; width: max-content; gap: var(--reflect-marquee-gap); animation: reflect-marquee 15s linear infinite; }
.reflect-home-brands.is-paused .reflect-marquee { animation-play-state: paused; }
/* Hover pauses on the logos only: a mouse on the button (or a tap, which leaves a hover on a phone) would hold the pause. */
@media (hover: hover) { .reflect-home-brands .reflect-marquee:hover { animation-play-state: paused; } }
/* In the bottom padding, below the logos. */
.reflect-marquee__toggle { position: absolute; right: 20px; bottom: 20px; margin: 0; padding: 4px 14px; border: 1px solid var(--wp--preset--color--palette-color-1); border-radius: 20px; background: var(--wp--preset--color--palette-color-8); color: var(--wp--preset--color--palette-color-1); font-family: inherit; font-size: 12px; letter-spacing: .04em; line-height: 1.5; cursor: pointer; }
@media (hover: hover) { .reflect-marquee__toggle:hover { background: var(--wp--preset--color--palette-color-1); color: var(--wp--preset--color--palette-color-8); } }
.reflect-marquee__toggle:focus-visible { outline: 2px solid var(--wp--preset--color--palette-color-1); outline-offset: 2px; }
.reflect-marquee .wp-block-image { display: flex; justify-content: center; flex: 0 0 calc((100cqw - 4 * var(--reflect-marquee-gap)) / 5); margin: 0; }
@keyframes reflect-marquee { to { transform: translateX(calc(-50% - var(--reflect-marquee-gap) / 2)); } }
.reflect-marquee.block-editor-block-list__block { animation: none; } /* still in the editor */

/* ---------- About ---------- */
.wp-block-image.reflect-about-hero { padding: 20px 20px 0; }
.wp-block-group.reflect-about-lead { max-width: calc(.57 * (100vw - 20px) - 20px); margin-top: 80px; }
.wp-block-columns.reflect-about-row { gap: 60px; max-width: 1275px; margin-top: 71px; margin-bottom: 0; } /* Elementor's rows: x 82.5 to 1357.5 at 1440 */
/* The 70% column stops at Elementor's 828px image and the 30% column takes the rest (body: beats core's flex-grow 0). */
body .wp-block-columns.reflect-about-row > .wp-block-column[style*="flex-basis"] { flex-grow: 1; max-width: 828px; }
.wp-block-columns.reflect-about-row + .wp-block-columns.reflect-about-row { margin-top: 89px; }
.wp-block-group.reflect-about-closing { max-width: 74%; min-height: 469px; margin-top: 46px; }

/* ---------- Legal and info pages: Blocksy's text rhythm (title 20px, heading 24px above and 16px below) ---------- */
.wp-block-post-content > :is(h5, h6).wp-block-heading { margin-top: 24px; }
.wp-block-post-content > :is(h5, h6).wp-block-heading + * { margin-top: 16px; }
.wp-block-post-content > :is(h5, h6).wp-block-heading:first-child { margin-top: 0; }
.wp-block-post-content > h1.wp-block-heading + * { margin-top: 20px; }
.reflect-list-after { padding-left: 40px; } /* Terms: text that belongs to the list item above it */

/* ---------- Contact (template-contact.html: 85% wide, 92% up to 768px, as the old template) ---------- */
.reflect-contact { --wp--style--root--padding-left: 7.5%; --wp--style--root--padding-right: 7.5%; }
.reflect-contact .wp-block-post-content > * { margin-block: 0; }
.reflect-contact-hero { margin-bottom: 52px !important; padding: 64px 32px; background: var(--wp--preset--color--palette-color-1); }
.reflect-contact-hero h1 { margin: 0 0 10px; color: var(--wp--preset--color--palette-color-9); font-size: 34px; font-weight: 300; letter-spacing: .16em; text-transform: uppercase; overflow-wrap: normal; word-break: normal; }
.reflect-contact-hero p { margin: 0; color: var(--wp--preset--color--palette-color-2); font-size: 15px; font-weight: 300; letter-spacing: .04em; }
.wp-block-columns.reflect-contact-grid { gap: 36px; margin-bottom: 44px !important; }
.reflect-contact-card { padding: 36px 30px; border: 1px solid #e8e2d8; border-radius: 14px; background: var(--wp--preset--color--palette-color-8); }
.reflect-contact-card > *, .reflect-contact-info > * { margin-block: 0; }
.reflect-contact-title { display: inline-block; margin: 0 0 28px !important; padding-bottom: 14px; border-bottom: 2px solid var(--wp--preset--color--palette-color-2); color: var(--wp--preset--color--palette-color-1); font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.reflect-contact-info { position: relative; min-height: 42px; margin-bottom: 22px !important; padding: 4px 0 0 56px; color: var(--wp--preset--color--palette-color-1); font-size: 14px; line-height: 1.6; }
.reflect-contact-info:last-child { margin-bottom: 0 !important; }
.reflect-contact-info::before { content: ""; position: absolute; top: 0; left: 0; width: 42px; height: 42px; border-radius: 50%; background: var(--wp--preset--color--palette-color-1) no-repeat center / 17px; }
.reflect-contact-info--address::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d9b8ab' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E"); }
.reflect-contact-info--phone::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d9b8ab' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E"); }
.reflect-contact-info--email::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d9b8ab' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/%3E%3Cpolyline points='22,6 12,13 2,6'/%3E%3C/svg%3E"); }
.reflect-contact-info--web::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d9b8ab' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10z'/%3E%3Cpath d='M2 12h20'/%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E"); }
.reflect-contact-label { margin-bottom: 3px !important; color: #767676; font-size: 11px; letter-spacing: .02em; line-height: 1.65; } /* #999 failed contrast */
.reflect-contact-info a, .reflect-contact-cta a { color: var(--wp--preset--color--palette-color-1); text-decoration: none; transition: color .2s; }
.reflect-contact-info a:hover, .reflect-contact-cta a:hover { color: #b78c7b; }
.wp-block-table.reflect-contact-hours { margin: 0; font-size: 14px; }
.reflect-contact-hours table { width: 100%; border-collapse: collapse; }
.reflect-contact-hours td { padding: 10px 0; border: 0; border-bottom: 1px solid var(--wp--preset--color--palette-color-9); overflow-wrap: normal; }
.reflect-contact-hours tr:last-child td { border-bottom: 0; }
.reflect-contact-hours td:first-child { width: 1%; padding-right: 32px; white-space: nowrap; color: var(--wp--preset--color--palette-color-1); font-weight: 500; }
.reflect-contact-hours td:last-child { color: var(--wp--preset--color--palette-color-3); text-align: right; }
.reflect-contact-hours em { color: #8f6a5c; font-weight: 500; } /* #b78c7b failed contrast */
.reflect-contact-map { margin-top: 28px !important; overflow: hidden; border: 1px solid #e8e2d8; border-radius: 10px; line-height: 0; }
.reflect-contact-map iframe { width: 100%; height: 260px; border: 0; }
.reflect-contact-form { margin-bottom: 44px !important; padding: 40px 36px; border-radius: 14px; background: var(--wp--preset--color--palette-color-1); }
.reflect-contact-form .reflect-contact-title { color: var(--wp--preset--color--palette-color-9); }
.reflect-contact-form > .reflect-contact-title + * { margin-top: 0; }
.reflect-contact-cta { padding: 44px 20px; border-radius: 14px; background: var(--wp--preset--color--palette-color-9); text-align: center; }
.reflect-contact-cta p { margin: 0 0 6px; font-size: 15px; }
.reflect-contact-cta > * { margin-block-start: 0; }
.reflect-contact-cta__phone a { font-size: 20px; font-weight: 500; letter-spacing: .04em; }

/* Fluent Forms, dark (port of the old template; !important against the plugin and the theme form controls) */
.reflect-contact-form .ff-el-input--label label { color: #999 !important; font-size: 12px !important; font-weight: 400 !important; letter-spacing: .02em !important; }
.reflect-contact-form .ff-el-form-control { padding: 12px 16px !important; border: 1px solid var(--wp--preset--color--palette-color-5) !important; border-radius: 8px !important; background: #2a2a2a !important; color: var(--wp--preset--color--palette-color-9) !important; font-size: 14px !important; transition: border-color .2s !important; }
.reflect-contact-form input.ff-el-form-control { height: 40px !important; }
.reflect-contact-form textarea.ff-el-form-control { height: 170px !important; }
.reflect-contact-form .ff-el-form-control:focus { border-color: var(--wp--preset--color--palette-color-2) !important; box-shadow: 0 0 0 2px rgba(217, 184, 171, .2) !important; outline: none !important; }
.reflect-contact-form .ff-el-form-control::placeholder { color: #666 !important; font-weight: 300 !important; }
.reflect-contact-form .ff-btn-submit { padding: 14px 48px !important; border: 0 !important; border-radius: 8px !important; background: var(--wp--preset--color--palette-color-2) !important; color: var(--wp--preset--color--palette-color-1) !important; font-size: 12px !important; font-weight: 600 !important; letter-spacing: .12em !important; text-transform: uppercase !important; cursor: pointer !important; transition: background .2s, transform .1s !important; }
.reflect-contact-form .ff-btn-submit:hover { background: #c9a89b !important; }
.reflect-contact-form .ff-btn-submit:active { transform: scale(.98) !important; }
.reflect-contact-form .ff-btn-submit:focus-visible { outline: 2px solid var(--wp--preset--color--palette-color-9) !important; outline-offset: 2px !important; }
.reflect-contact-form .ff-el-group { color: #ccc !important; }

/* ---------- Below 1000px ---------- */
@media (width <= 999.98px) {
	.reflect-marquee .wp-block-image { flex-basis: calc((100cqw - var(--reflect-marquee-gap)) / 2); }
	.wp-block-columns.reflect-about-row { margin-top: 40px; }
}

/* ---------- Stacked columns (WordPress stacks below 782px) ---------- */
@media (width < 782px) {
	.reflect-home-categories { padding: 10px; }
	.wp-block-columns.reflect-home-categories__row { gap: 7px; }
	.wp-block-cover.reflect-home-tile { min-height: calc((80vh - 34px) / 3); }
	.wp-block-cover.reflect-video-tile { min-height: 70vh; }
	.wp-block-group.reflect-video-tile__bar { flex-wrap: wrap; justify-content: center; row-gap: 19px; padding: 0; }
	.reflect-video-tile__title { flex-basis: 100%; text-align: center; }
	.wp-block-columns.reflect-about-row { gap: 40px; }
	.wp-block-columns.reflect-about-row + .wp-block-columns.reflect-about-row { gap: 80px; margin-top: 176px; } /* Elementor's stacked gaps */
	.wp-block-group.reflect-about-closing { max-width: none; }
}
@media (width <= 768px) {
	.reflect-contact { --wp--style--root--padding-left: 4%; --wp--style--root--padding-right: 4%; }
}

/* ---------- Below 690px ---------- */
@media (width <= 689.98px) {
	.reflect-home-all { padding: 110px 10px; }
	.wp-block-button.reflect-home-all__button { width: 67%; }
	.reflect-home-brands { padding-inline: 10px; }
	.reflect-marquee__toggle { right: 10px; }
	.wp-block-group.reflect-marquee { --reflect-marquee-gap: 40px; }
	.reflect-marquee .wp-block-image { flex-basis: calc((100cqw - 2 * var(--reflect-marquee-gap)) / 3); }
	.reflect-marquee img { width: 97px !important; height: 53px !important; } /* the image blocks set 200 x 110 inline */
	.reflect-about-hero.wp-block-image { padding-top: 20px; }
	.wp-block-group.reflect-about-lead { max-width: none; margin-top: 50px; }
	.reflect-contact-hero h1 { font-size: clamp(22px, 7vw, 34px); }
}
@media (width <= 520px) {
	.reflect-home-editorial .wc-block-product-template { display: flex; flex-wrap: nowrap; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.reflect-home-editorial .wc-block-product-template > li { flex: 0 0 75vw; scroll-snap-align: start; }
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-group.reflect-marquee { flex-wrap: wrap; justify-content: center; width: auto; animation: none; }
	.reflect-marquee .reflect-marquee__dup, .reflect-marquee__toggle { display: none; } /* static logos: nothing to pause */
}
