/*
Theme Name: B.O.MAX
Description: Téma webu bomax.sk – prenesená 1:1 zo Squarespace (mriežka sekcií, farby, písma).
Version: 1.0.0
Requires at least: 6.6
Text Domain: bomax
*/

/* ---------- Písma ---------- */
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 300 800; font-stretch: 100%; font-display: swap; src: url(assets/fonts/open-sans-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 300 800; font-stretch: 100%; font-display: swap; src: url(assets/fonts/open-sans-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap; src: url(assets/fonts/space-grotesk-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap; src: url(assets/fonts/space-grotesk-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Premenné: farby, mierka písma, mriežka ---------- */
:root {
	--bx-blue: #2547A0; --bx-accent: #FF6E00; --bx-black: #212020; --bx-light: #DEDEDE; --bx-white: #fff;
	--bx-max: 1500px;
	/* Mobil (na výšku): veľkosť = (s − 1) × 1,2 % výšky okna (max 900 px) + 1rem */
	--bx-u: calc(.012 * min(100vh, 900px));
	--bx-h1: calc(3 * var(--bx-u) + 1rem);
	--bx-h2: calc(1.8 * var(--bx-u) + 1rem);
	--bx-h3: calc(1.2 * var(--bx-u) + 1rem);
	--bx-h4: calc(.6 * var(--bx-u) + 1rem);
	--bx-large: calc(.3 * var(--bx-u) + 1rem);
	--bx-small: calc(-.1 * var(--bx-u) + 1rem);
	--bx-gutter: 6vw;
	--bx-header-h: 78.5px;
}
@media screen and (min-width: 768px), screen and (orientation: landscape) {
	:root {
		--bx-h1: min(calc(3 * 1.2vw + 1rem), max(calc(3 * 18px + 1rem), 4rem));
		--bx-h2: min(calc(1.8 * 1.2vw + 1rem), max(calc(1.8 * 18px + 1rem), 2.8rem));
		--bx-h3: min(calc(1.2 * 1.2vw + 1rem), max(calc(1.2 * 18px + 1rem), 2.2rem));
		--bx-h4: min(calc(.6 * 1.2vw + 1rem), max(calc(.6 * 18px + 1rem), 1.6rem));
		--bx-large: min(calc(.3 * 1.2vw + 1rem), max(calc(.3 * 18px + 1rem), 1.3rem));
		--bx-small: min(calc(-.1 * 1.2vw + 1rem), max(calc(-.1 * 18px + 1rem), .9rem));
	}
}
@media (min-width: 768px) { :root { --bx-gutter: 2vw; --bx-header-h: 84px; } }

/* ---------- Základ ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip; }
.wp-site-blocks { padding: 0; }
.wp-site-blocks > * { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
h1 { font-size: var(--bx-h1); line-height: 1.056; }
h2 { font-size: var(--bx-h2); line-height: 1.1136; }
h3 { font-size: var(--bx-h3); line-height: 1.1424; }
h4 { font-size: var(--bx-h4); line-height: 1.1712; }
p { margin: 0; }
strong, b { font-weight: 700; }
a { color: var(--bx-accent); text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: .05em; }
img { max-width: 100%; height: auto; }
.has-large-font-size { font-size: var(--bx-large) !important; }
.has-small-font-size { font-size: var(--bx-small) !important; }
mark.has-inline-color { background: none; }
.screen-reader-text, .bx-skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.bx-skip:focus { position: fixed; top: 8px; left: 8px; z-index: 200; }

/* Ručne kreslené podčiarknutie */
.bx-hl { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpath d='M1 6.2C18 3.6 34 6.9 52 5.2S84 3.4 99 5.6' fill='none' stroke='%23FF6E00' stroke-width='2' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") no-repeat 0 100% / 100% .42em; padding-bottom: .12em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
h1 .bx-hl, h2 .bx-hl { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpath d='M1 6.2C18 3.6 34 6.9 52 5.2S84 3.4 99 5.6' fill='none' stroke='%23FF6E00' stroke-width='5' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E"); background-size: 100% .3em; padding: 0 .12em .1em; margin: 0 -.12em; }

/* ---------- Tlačidlá ---------- */
.wp-block-button__link, .bx-btn {
	display: inline-flex; align-items: center; justify-content: center; text-align: center;
	background: var(--bx-accent); color: #fff; border: 0; border-radius: 300px;
	font-family: "Space Grotesk", Arial, sans-serif; font-weight: 600; font-size: 1rem; line-height: 1.3; letter-spacing: 0;
	text-transform: uppercase; text-decoration: none; padding: 1rem 1.67rem; cursor: pointer;
	transition: opacity .1s linear;
}
.wp-block-button__link:hover, .bx-btn:hover { opacity: .8; }
.wp-block-buttons { display: flex; gap: 0; margin: 0; }
.wp-block-button { margin: 0; }
.bx-btn-small .wp-block-button__link { font-size: var(--bx-small); padding: 1em 1.67em; }

/* ---------- Sekcie a mriežka (prenesená zo Squarespace Fluid Engine) ---------- */
.bx-section { position: relative; margin: 0 !important; color: var(--bx-black); background: #fff; }
.bx-section.bx-bg-blue { background: var(--bx-blue); color: #fff; }
.bx-section.bx-bg-black { background: var(--bx-black); color: #fff; }
.bx-section.bx-bg-light { background: var(--bx-light); }
main > .bx-section:first-child { padding-top: var(--bx-header-h); }
.bx-grid {
	display: grid; --bx-gap: 0px; --bx-cell: calc((var(--bx-max) - var(--bx-gap) * 7) / 8); gap: var(--bx-gap);
	grid-template-rows: repeat(var(--bx-rm, 1), minmax(24px, auto));
	grid-template-columns: minmax(calc(var(--bx-gutter) - var(--bx-gap)), 1fr) repeat(8, minmax(0, var(--bx-cell))) minmax(calc(var(--bx-gutter) - var(--bx-gap)), 1fr);
	overflow-x: clip;
}
.bx-grid.bx-gap { --bx-gap: 11px; }
.bx-section.bx-pad { padding-block: .1vmax; }
@media (min-width: 768px) {
	.bx-grid {
		--bx-cell: calc((var(--bx-max) - var(--bx-gap) * 23) / 24); --bx-cw: min(var(--bx-max), calc(100vw - var(--bx-gutter) * 2));
		grid-template-rows: repeat(var(--bx-rd, 1), minmax(calc(var(--bx-cw) * .0215), auto));
		grid-template-columns: minmax(calc(var(--bx-gutter) - var(--bx-gap)), 1fr) repeat(24, minmax(0, var(--bx-cell))) minmax(calc(var(--bx-gutter) - var(--bx-gap)), 1fr);
	}
}
.bx-grid > * { margin: 0 !important; }
.bx-bg { position: absolute; inset: 0; margin: 0 !important; z-index: 0; }
.bx-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bx-bg::after { content: ""; position: absolute; inset: 0; background: var(--bx-blue); opacity: 0; }
.bx-bg-black > .bx-bg::after { background: var(--bx-black); }
.bx-cell { position: relative; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.bx-cell.bx-va-top { justify-content: flex-start; }
.bx-cell.bx-va-bottom { justify-content: flex-end; }
.bx-cell > * { margin: 0; }
.bx-cell > * + * { margin-top: 1rem; }
.bx-cell > :is(h1, h2, h3, h4) + *, .bx-cell > * + :is(h1, h2, h3, h4) { margin-top: 2rem; }
.bx-cell p:empty::after { content: "\200b"; }
.bx-cell p, .bx-cell li, .bx-cell :is(h1, h2, h3, h4) { overflow-wrap: break-word; white-space: pre-wrap; }
/* obrázok vypĺňa bunku */
.bx-cell-img > .wp-block-image { position: absolute; inset: 0; margin: 0; }
.bx-cell-img > .wp-block-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* tlačidlo v bunke */
.bx-cell-btn > .wp-block-buttons { justify-content: flex-start; }
.bx-cell-btn.bx-al-center > .wp-block-buttons { justify-content: center; }
.bx-cell-btn.bx-al-right > .wp-block-buttons { justify-content: flex-end; }
.bx-cell-btn.bx-fill > .wp-block-buttons, .bx-cell-btn.bx-fill .wp-block-button { flex: 1; align-self: stretch; display: flex; }
.bx-cell-btn.bx-fill .wp-block-button__link { flex: 1; padding-top: 0; padding-bottom: 0; }
@media (max-width: 767px) {
	.bx-cell-btn.bx-m-al-left > .wp-block-buttons { justify-content: flex-start; }
	.bx-cell-btn.bx-m-al-center > .wp-block-buttons { justify-content: center; }
	.bx-cell-btn.bx-m-fill > .wp-block-buttons, .bx-cell-btn.bx-m-fill .wp-block-button { flex: 1; align-self: stretch; display: flex; }
	.bx-cell-btn.bx-m-fill .wp-block-button__link { flex: 1; padding-top: 0; padding-bottom: 0; }
	.bx-cell-btn.bx-m-nofill > .wp-block-buttons, .bx-cell-btn.bx-m-nofill .wp-block-button { flex: 0 1 auto; align-self: auto; }
	.bx-cell-btn.bx-m-nofill .wp-block-button__link { flex: 0 1 auto; padding-top: 1rem; padding-bottom: 1rem; }
}

/* ---------- Akordeón ---------- */
.bx-accordion { justify-content: flex-start; }
.bx-accordion > * + * { margin-top: 0; }
.bx-accordion .wp-block-details { border-top: 1px solid currentColor; margin: 0; }
.bx-accordion .wp-block-details:last-child { border-bottom: 1px solid currentColor; }
.bx-accordion summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 30px; padding: 30px 0; font-family: "Helvetica Neue", Arial, sans-serif; font-size: var(--bx-h4); line-height: 1.1712; font-weight: 400; }
.bx-accordion summary::-webkit-details-marker { display: none; }
.bx-accordion summary::before { content: ""; flex: none; width: 30px; height: 30px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath d='M1.5 9l13.5 12L28.5 9' fill='none' stroke='%23000' stroke-width='2.2'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath d='M1.5 9l13.5 12L28.5 9' fill='none' stroke='%23000' stroke-width='2.2'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform .2s ease; }
.bx-accordion details[open] > summary::before { transform: rotate(180deg); }
.bx-accordion details > :not(summary) { margin: 0; }
.bx-accordion details > :last-child:not(summary) { padding-bottom: 30px; }
.bx-accordion :is(ol, ul) { margin: 0; padding-left: 40px; }
.bx-accordion li { margin: 0; padding: .5rem 0; white-space: pre-wrap; }
.bx-accordion li:first-child { padding-top: 0; }
.bx-accordion li:last-child { padding-bottom: 0; }
.bx-accordion a { text-decoration: none; }
.bx-accordion a:hover { text-decoration: underline; }

/* ---------- Karty systémov ---------- */
.bx-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding: 15px var(--bx-gutter) 57px; max-width: calc(var(--bx-max) + 2 * var(--bx-gutter)); margin-inline: auto !important; }
.bx-cards > * { margin: 0 !important; }
.bx-card { background: #fff; color: var(--bx-black); padding: 26px 27px 27px; display: flex; flex-direction: column; }
.bx-card > * { margin: 0; }
.bx-card .wp-block-image { margin: 0; aspect-ratio: 394 / 395; }
.bx-card .wp-block-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bx-card h2 { font-size: 1.6rem; line-height: 1.1136; margin-top: 40px; }
.bx-card p { margin-top: 39px; white-space: pre-wrap; }
.bx-card .wp-block-buttons { margin-top: 39px; }
@media (max-width: 767px) {
	.bx-cards { grid-template-columns: 1fr; padding: 9px 8px 36px; }
	.bx-card { padding: 23px 22px 22px; }
	.bx-card h2 { margin-top: 32px; }
	.bx-card p, .bx-card .wp-block-buttons { margin-top: 33px; }
}

/* ---------- Galéria ---------- */
.bx-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 29px 28px; padding: 29px var(--bx-gutter); max-width: calc(var(--bx-max) + 2 * var(--bx-gutter)); margin-inline: auto !important; }
.bx-gallery > * { margin: 0 !important; }
.bx-gallery .wp-block-image { margin: 0; display: block; }
.bx-gallery .wp-block-image a { display: block; }
.bx-gallery .wp-block-image img { width: 100%; aspect-ratio: 677 / 452; object-fit: cover; display: block; cursor: zoom-in; }
.bx-gallery figcaption { margin: 0; padding: 14px 0 15px; font-size: 14px; line-height: 22px; text-align: left; color: inherit; }
@media (max-width: 767px) {
	.bx-gallery { gap: 8px; padding: 7px 8px 9px; }
	.bx-gallery figcaption { padding: 14px 0; }
	.bx-gallery .wp-block-image img { aspect-ratio: 183 / 123; }
}

/* Lightbox */
.bx-lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(0, 0, 0, .92); display: flex; align-items: center; justify-content: center; }
.bx-lightbox[hidden] { display: none; }
.bx-lightbox img { max-width: 92vw; max-height: 84vh; object-fit: contain; }
.bx-lightbox figcaption { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; color: #fff; font-size: 14px; }
.bx-lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 40px; line-height: 1; padding: 16px; cursor: pointer; font-family: Arial, sans-serif; }
.bx-lightbox .bx-lb-close { top: 8px; right: 12px; }
.bx-lightbox .bx-lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.bx-lightbox .bx-lb-next { right: 8px; top: 50%; transform: translateY(-50%); }

/* ---------- Hlavička ---------- */
header.wp-block-template-part { position: fixed; top: 0; left: 0; right: 0; z-index: 100; transition: transform .3s ease, background-color .2s ease; color: #fff; }
header.wp-block-template-part.is-solid { background: var(--bx-blue); }
header.wp-block-template-part.is-hidden { transform: translateY(-100%); }
.bx-header__inner { display: flex; align-items: center; min-height: var(--bx-header-h); padding: 0 var(--bx-gutter); max-width: calc(var(--bx-max) + 2 * var(--bx-gutter)); margin: 0 auto; }
.bx-header__title { font-family: "Helvetica Neue", Arial, sans-serif; font-weight: 700; font-size: var(--bx-h3); line-height: 1.2; color: inherit; text-decoration: none; text-transform: uppercase; margin-right: auto; }
.bx-header__nav { display: flex; align-items: center; }
.bx-header__nav ul { display: flex; gap: 36px; list-style: none; margin: 0; padding: 0; }
.bx-header__nav a { color: inherit; text-decoration: none; font-size: 1rem; line-height: 1.5; padding: .1em 0; background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px; }
.bx-header__nav .current-menu-item > a, .bx-header__nav a:hover { background-size: 100% 1px; }
.bx-header__cta { margin-left: 36px; }
.bx-header__cta ul { list-style: none; margin: 0; padding: 0; display: flex; }
.bx-header__cta a { display: inline-flex; align-items: center; justify-content: center; background: var(--bx-accent); color: #fff; border-radius: 300px; font-family: "Space Grotesk", Arial, sans-serif; font-weight: 600; font-size: 1rem; line-height: 1.3; text-transform: uppercase; text-decoration: none; padding: 1rem 1.67rem; }
.bx-header__cta a:hover { opacity: .8; }
.bx-burger { display: none; width: 35px; height: 22px; margin-right: 6px; padding: 0; background: none; border: 0; color: inherit; cursor: pointer; position: relative; }
.bx-burger span { position: absolute; left: 0; right: 0; height: 3px; background: currentColor; transition: transform .25s ease, opacity .2s ease; }
.bx-burger span:nth-child(1) { top: 0; } .bx-burger span:nth-child(2) { top: 9.5px; } .bx-burger span:nth-child(3) { top: 19px; }
.bx-menu { display: none; }
@media (max-width: 767px) {
	.bx-header__nav, .bx-header__cta { display: none; }
	.bx-header__title { font-size: var(--bx-h2); letter-spacing: -.02em; }
	.bx-burger { display: block; }
	.bx-menu { display: flex; position: fixed; inset: 0; z-index: -1; background: #fff; color: var(--bx-black); flex-direction: column; align-items: center; justify-content: center; padding: var(--bx-header-h) 6vw 6vw; opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s; }
	.bx-menu ul { list-style: none; margin: 0; padding: 0; text-align: center; }
	.bx-menu__nav { margin: auto 0; }
	.bx-menu__nav li { padding: 12.48px 0; line-height: 1; }
	.bx-menu__nav a { color: inherit; text-decoration: none; font-size: 8.5vw; line-height: 1; font-weight: 600; display: inline-block; }
	.bx-menu__cta a { display: inline-flex; align-items: center; justify-content: center; background: var(--bx-accent); color: #fff; border-radius: 300px; font-family: "Space Grotesk", Arial, sans-serif; font-weight: 600; font-size: 1.2rem; line-height: 1.3; text-transform: uppercase; text-decoration: none; padding: 1.2rem 2.004rem; min-width: 210px; }
	header.wp-block-template-part.is-open { transform: none; background: #fff; color: var(--bx-black); }
	.is-open .bx-menu { opacity: 1; visibility: visible; }
	.is-open .bx-burger span { height: 2px; }
	.is-open .bx-burger span:nth-child(1) { transform: translateY(10px) rotate(45deg) scaleX(.85); }
	.is-open .bx-burger span:nth-child(2) { opacity: 0; }
	.is-open .bx-burger span:nth-child(3) { transform: translateY(-9px) rotate(-45deg) scaleX(.85); }
	body.bx-menu-open { overflow: hidden; }
}

/* ---------- Pätička, 404 ---------- */
footer.wp-block-template-part { margin: 0; }
.bx-404 { background: var(--bx-blue); color: #fff; padding: calc(var(--bx-header-h) + 12vh) var(--bx-gutter) 14vh; }
.bx-404 p { margin-top: 2rem; }
