/* ==========================================================================
   STERAD — mostík medzi WordPress blokmi a pôvodným dizajnom.

   site.css je skompilovaný Tailwind z pôvodného návrhu a nemení sa.
   Tento súbor len:
     1. dopĺňa stavy hlavičky (posun pri scrollovaní),
     2. neutralizuje predvolené odsadenia WordPress blokov,
     3. dopĺňa dekorácie, ktoré v origináli robili vnorené <div>-y.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Hlavička — svetlý (nad hero) a plný (po odscrollovaní) stav
   -------------------------------------------------------------------------- */

/* Admin lišta WordPressu nesmie prekrývať fixnú hlavičku. */
body.admin-bar .sterad-header {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar .sterad-header {
		top: 46px;
	}
}

.sterad-logo--dark {
	display: none;
}

.sterad-header.is-solid .sterad-logo--light {
	display: none;
}

.sterad-header.is-solid .sterad-logo--dark {
	display: block;
}

/* Odkazy v hlavnej navigácii — presne rovnaké farby ako v origináli. */
.sterad-header .sterad-nav__link {
	color: rgba(255, 255, 255, 0.75);
}

.sterad-header .sterad-nav__link:hover,
.sterad-header .sterad-nav__link.is-active {
	color: rgb(255 255 255);
}

.sterad-header .sterad-nav__underline {
	background-color: rgb(255 255 255);
}

.sterad-header.is-solid .sterad-nav__link {
	color: rgba(26, 27, 30, 0.7);
}

.sterad-header.is-solid .sterad-nav__link:hover {
	color: rgb(26 27 30);
}

.sterad-header.is-solid .sterad-nav__link.is-active {
	color: rgb(245 75 50);
}

.sterad-header.is-solid .sterad-nav__underline {
	background-color: rgb(245 75 50);
}

/* Telefón v hlavičke. */
.sterad-header .sterad-header__phone {
	color: rgb(255 255 255);
}

.sterad-header .sterad-header__phone:hover {
	color: rgb(253 227 222);
}

.sterad-header.is-solid .sterad-header__phone {
	color: rgb(26 27 30);
}

.sterad-header.is-solid .sterad-header__phone:hover {
	color: rgb(245 75 50);
}

/* Hamburger. */
.sterad-header .sterad-header__burger {
	color: rgb(255 255 255);
}

.sterad-header .sterad-header__burger:hover {
	background-color: rgba(255, 255, 255, 0.1);
}

.sterad-header.is-solid .sterad-header__burger {
	color: rgb(26 27 30);
}

.sterad-header.is-solid .sterad-header__burger:hover {
	background-color: rgba(26, 27, 30, 0.05);
}

.sterad-header__burger .sterad-burger__close,
.sterad-header__burger[aria-expanded="true"] .sterad-burger__open {
	display: none;
}

.sterad-header__burger[aria-expanded="true"] .sterad-burger__close {
	display: block;
}

/* --------------------------------------------------------------------------
   2. WordPress bloky — bez vlastných odsadení, dizajn riadi Tailwind
   -------------------------------------------------------------------------- */

/* Pozor na špecificitu: všetko, čo môže mať v návrhu vlastnú triedu
   (mt-*, gap-*, ...), zapisujeme cez :where(), aby návrh vždy vyhral. */
:where(.sterad-main) :where(.is-layout-flow, .is-layout-constrained, .is-layout-flex) > * {
	margin-block-start: 0;
	margin-block-end: 0;
}

:where(.sterad-main) :where(.wp-block-group, .wp-block-heading, .wp-block-buttons, .wp-block-list) {
	margin: 0;
}

:where(.sterad-main) :where(.wp-block-buttons) {
	gap: 0;
}

:where(.sterad-main) :where(.wp-block-list) {
	padding: 0;
	list-style: none;
}

:where(.sterad-main) :where(.wp-block-image img) {
	display: block;
	max-width: 100%;
	height: auto;
}

/* Obrázky v návrhu nikdy nepoužívajú vlastné okraje. */
.sterad-main figure.wp-block-image {
	margin: 0;
}

/* Obrázok, ktorý má vyplniť svoj rámček (pôvodné `w-full object-cover`). */
.sterad-cover-img {
	display: block;
	overflow: hidden;
}

.sterad-cover-img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* --------------------------------------------------------------------------
   3. Dekorácie, ktoré v origináli robili vnorené <div>-y
   -------------------------------------------------------------------------- */

/* Čiarka pred nadpisom sekcie (pôvodne <span class="h-px w-6 bg-current opacity-60">). */
.sterad-eyebrow::before {
	content: "";
	display: inline-block;
	width: 1.5rem;
	height: 1px;
	margin-right: 0.5rem;
	vertical-align: middle;
	background-color: currentColor;
	opacity: 0.6;
}

/* Odrážky so zelenou fajkou (pôvodne inline <svg>). */
.sterad-check-list li {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
}

.sterad-check-list li::before {
	content: "";
	flex: 0 0 auto;
	width: 1rem;
	height: 1rem;
	margin-top: 0.25rem;
	background-color: rgb(245 75 50);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4.5 4.5L19 7'/%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 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4.5 4.5L19 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Šípka za odkazom / tlačidlom. */
.sterad-arrow::after {
	content: "";
	display: inline-block;
	width: 1rem;
	height: 1rem;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%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 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.group:hover .sterad-arrow::after,
.sterad-arrow:hover::after {
	transform: translateX(0.25rem);
}

/* Hero sekcie — prekryvy, ktoré v origináli robili absolútne <div>-y. */
.sterad-hero__bg,
.sterad-band__bg {
	position: absolute;
	inset: 0;
	margin: 0;
	z-index: 0;
}

.sterad-hero__bg img,
.sterad-band__bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.sterad-band__bg {
	opacity: 0.25;
}

.sterad-hero--home::before,
.sterad-hero--home::after,
.sterad-hero--sub::before,
.sterad-hero--sub::after,
.sterad-band::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
}

/* bg-gradient-to-r from-ink via-ink/80 to-ink/30 */
.sterad-hero--home::before {
	background-image: linear-gradient(to right, rgb(26 27 30), rgba(26, 27, 30, 0.8), rgba(26, 27, 30, 0.3));
}

/* bg-gradient-to-t from-ink/90 via-transparent to-ink/30 */
.sterad-hero--home::after {
	background-image: linear-gradient(to top, rgba(26, 27, 30, 0.9), transparent, rgba(26, 27, 30, 0.3));
}

/* bg-gradient-to-t from-ink via-ink/70 to-ink/40 */
.sterad-hero--sub::before {
	background-image: linear-gradient(to top, rgb(26 27 30), rgba(26, 27, 30, 0.7), rgba(26, 27, 30, 0.4));
}

/* bg-ink/20 */
.sterad-hero--sub::after {
	background-color: rgba(26, 27, 30, 0.2);
}

/* bg-gradient-to-r from-ink via-ink/90 to-ink/60 */
.sterad-band::after {
	background-image: linear-gradient(to right, rgb(26 27 30), rgba(26, 27, 30, 0.9), rgba(26, 27, 30, 0.6));
}

/* Celá karta je klikateľná (v origináli bola karta jeden veľký <a>). */
.sterad-card-link {
	cursor: pointer;
}

/* Oneskorenie postupného nábehu — v origináli inline style="transition-delay". */
.rd-80 { transition-delay: 80ms; }
.rd-90 { transition-delay: 90ms; }
.rd-120 { transition-delay: 120ms; }
.rd-160 { transition-delay: 160ms; }
.rd-180 { transition-delay: 180ms; }
.rd-240 { transition-delay: 240ms; }

.ad-80 { animation-delay: 80ms; }
.ad-160 { animation-delay: 160ms; }
.ad-240 { animation-delay: 240ms; }
.ad-320 { animation-delay: 320ms; }

/* --------------------------------------------------------------------------
   4. Tlačidlá WordPressu prevzaté do dizajnu (inline štýly rieši inc/blocks.php)
   -------------------------------------------------------------------------- */

/* Obal tlačidla necháme "zmiznúť", aby sa odkaz správal ako v origináli. */
.sterad-main .wp-block-buttons > .wp-block-button {
	display: contents;
}

.sterad-main .wp-block-button__link {
	text-decoration: none;
}

.sterad-phone-icon::before {
	content: "";
	display: inline-block;
	width: 1rem;
	height: 1rem;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h4l2 5-2.5 1.5a11 11 0 0 0 6 6L15 14l5 2v4a2 2 0 0 1-2.2 2A16 16 0 0 1 4 6.2 2 2 0 0 1 4 4Z'/%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 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h4l2 5-2.5 1.5a11 11 0 0 0 6 6L15 14l5 2v4a2 2 0 0 1-2.2 2A16 16 0 0 1 4 6.2 2 2 0 0 1 4 4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* --------------------------------------------------------------------------
   5. Drobnosti
   -------------------------------------------------------------------------- */

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

.prose-sterad h2 {
	margin-top: 2.5rem;
	font-family: var(--font-manrope), var(--font-inter), sans-serif;
	font-size: 1.875rem;
	font-weight: 700;
	color: rgb(26 27 30);
}

.prose-sterad h3 {
	margin-top: 2rem;
	font-family: var(--font-manrope), var(--font-inter), sans-serif;
	font-size: 1.25rem;
	font-weight: 700;
	color: rgb(26 27 30);
}

.prose-sterad p {
	margin-top: 1rem;
	font-size: 1rem;
	line-height: 1.75rem;
	color: rgba(26, 27, 30, 0.7);
}

.prose-sterad > *:first-child {
	margin-top: 0;
}

.prose-sterad a {
	color: rgb(245 75 50);
	text-decoration: underline;
}

.prose-sterad ul,
.prose-sterad ol {
	margin-top: 1rem;
	padding-left: 1.25rem;
	list-style: disc;
	color: rgba(26, 27, 30, 0.7);
}

.prose-sterad ol {
	list-style: decimal;
}

/* --------------------------------------------------------------------------
   6. Doplnky pre podstránky a katalóg
   -------------------------------------------------------------------------- */

/* Pasca na roboty v kontaktnom formulári — pre človeka neviditeľná. */
.sterad-trap {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Menšia varianta tlačidla (v návrhu zapísaná ako !px-5 !py-2.5). */
.sterad-main .wp-block-button.btn-sm .wp-block-button__link {
	padding: 0.625rem 1.25rem;
}

/* Odkaz „Zobraziť“ na karte, ktorá je celá klikateľná. */
.sterad-card-cta {
	margin-top: 1rem;
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: rgb(245 75 50);
}

/* Logo výrobcu pri cenníku — v pôvodnom obsahu to bol malý obrázok. */
.sterad-cennik-logo {
	margin: 1.25rem 0 0.5rem;
}

.sterad-cennik-logo img {
	width: auto;
	max-width: 190px;
	height: auto;
}

/* Tabuľky prevzaté zo starého webu. */
.prose-sterad .wp-block-table {
	margin: 1.5rem 0;
	overflow-x: auto;
}

.prose-sterad .wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.875rem;
}

.prose-sterad .wp-block-table td,
.prose-sterad .wp-block-table th {
	padding: 0.5rem 0.75rem;
	border: 1px solid rgba(26, 27, 30, 0.1);
	color: rgba(26, 27, 30, 0.7);
}

/* --------------------------------------------------------------------------
   7. Oznam (popup pri načítaní)

   Vlastný komponent — v pôvodnom návrhu nebol, preto je napísaný ručne
   v rovnakých farbách a typografii ako zvyšok webu.
   -------------------------------------------------------------------------- */

.sterad-popup {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
}

.sterad-popup[hidden] {
	display: none;
}

.sterad-popup__backdrop {
	position: absolute;
	inset: 0;
	background-color: rgba(26, 27, 30, 0.6);
	backdrop-filter: blur(4px);
	animation: sterad-popup-fade 0.25s ease-out both;
}

.sterad-popup__panel {
	position: relative;
	width: 100%;
	max-width: 34rem;
	/* Pri dlhom ozname scrolluje len text — nadpis a krížik ostávajú na mieste. */
	display: flex;
	flex-direction: column;
	max-height: calc(100vh - 2.5rem);
	overflow: hidden;
	padding: 2.25rem;
	background-color: #fff;
	border-radius: 1.5rem;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
	animation: sterad-popup-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes sterad-popup-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes sterad-popup-in {
	from { opacity: 0; transform: translateY(16px) scale(0.98); }
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.sterad-popup__backdrop,
	.sterad-popup__panel {
		animation: none;
	}
}

.sterad-popup__close {
	position: absolute;
	top: 0.875rem;
	right: 0.875rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border: 0;
	border-radius: 9999px;
	background: transparent;
	color: rgba(26, 27, 30, 0.45);
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}

.sterad-popup__close:hover {
	background-color: rgba(26, 27, 30, 0.06);
	color: rgb(26 27 30);
}

.sterad-popup__eyebrow {
	display: inline-flex;
	align-items: center;
	margin: 0 0 0.75rem;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: rgb(245 75 50);
}

.sterad-popup__eyebrow::before {
	content: "";
	display: inline-block;
	width: 1.5rem;
	height: 1px;
	margin-right: 0.5rem;
	background-color: currentColor;
	opacity: 0.6;
}

.sterad-popup__title {
	margin: 0;
	font-family: var(--font-manrope), var(--font-inter), sans-serif;
	font-size: 1.625rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: rgb(26 27 30);
}

/* Obsah oznamu prichádza z blokového editora — musí zvládnuť nadpisy,
   odrážky, tabuľku aj farebné zvýraznenie. */
.sterad-popup__text {
	margin-top: 0.875rem;
	overflow-y: auto;
	min-height: 0;
	font-size: 0.9375rem;
	line-height: 1.7;
	color: rgba(26, 27, 30, 0.7);
}

.sterad-popup__text > *:first-child {
	margin-top: 0;
}

.sterad-popup__text > *:last-child {
	margin-bottom: 0;
}

.sterad-popup__text p {
	margin: 0 0 0.75rem;
}

.sterad-popup__text h2,
.sterad-popup__text h3,
.sterad-popup__text h4 {
	margin: 1.25rem 0 0.5rem;
	font-family: var(--font-manrope), var(--font-inter), sans-serif;
	font-weight: 700;
	line-height: 1.25;
	color: rgb(26 27 30);
}

.sterad-popup__text h2 { font-size: 1.25rem; }
.sterad-popup__text h3 { font-size: 1.0625rem; }
.sterad-popup__text h4 { font-size: 0.9375rem; }

.sterad-popup__text ul,
.sterad-popup__text ol {
	margin: 0 0 0.75rem;
	padding-left: 1.25rem;
	list-style: disc;
}

.sterad-popup__text ol {
	list-style: decimal;
}

.sterad-popup__text li {
	margin: 0.25rem 0;
}

.sterad-popup__text strong {
	color: rgb(26 27 30);
	font-weight: 600;
}

.sterad-popup__text a {
	color: rgb(245 75 50);
	text-decoration: underline;
}

.sterad-popup__text hr {
	margin: 1.25rem 0;
	border: 0;
	border-top: 1px solid rgba(26, 27, 30, 0.1);
}

.sterad-popup__text figure {
	margin: 0 0 0.75rem;
}

.sterad-popup__text img {
	max-width: 100%;
	height: auto;
	border-radius: 0.75rem;
}

/* Rozpis (napr. otváracie soboty) — tabuľka nech je čitateľná aj v úzkom okne. */
.sterad-popup__text .wp-block-table {
	overflow-x: auto;
}

.sterad-popup__text table {
	width: 100%;
	border-collapse: collapse;
}

.sterad-popup__text td,
.sterad-popup__text th {
	padding: 0.375rem 0.5rem;
	border-bottom: 1px solid rgba(26, 27, 30, 0.08);
	text-align: left;
	vertical-align: top;
}

.sterad-popup__text tr:last-child td {
	border-bottom: 0;
}

/* Tlačidlo vložené blokom vyzerá rovnako ako inde na webe. */
.sterad-popup__text .wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1.25rem;
}

.sterad-popup__text .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1.5rem;
	border-radius: 9999px;
	background-color: rgb(245 75 50);
	box-shadow: 0 10px 15px -3px rgba(245, 75, 50, 0.25);
	font-size: 0.875rem;
	font-weight: 600;
	color: #fff;
	text-decoration: none;
	transition: background-color 0.3s;
}

.sterad-popup__text .wp-block-button__link:hover {
	background-color: rgb(226 58 34);
}

.sterad-popup__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin-top: 1.5rem;
	padding: 0.75rem 1.5rem;
	border-radius: 9999px;
	background-color: rgb(245 75 50);
	box-shadow: 0 10px 15px -3px rgba(245, 75, 50, 0.25);
	font-size: 0.875rem;
	font-weight: 600;
	color: #fff;
	text-decoration: none;
	transition: background-color 0.3s;
}

.sterad-popup__button:hover {
	background-color: rgb(226 58 34);
}

@media (max-width: 480px) {
	.sterad-popup__panel {
		padding: 1.75rem 1.5rem;
	}

	.sterad-popup__title {
		font-size: 1.375rem;
	}
}
