/* ==========================================================================
   aban.it – styly šablony
   Barvy a písmo jsou v theme.json; tady jsou komponenty, které bloky samy neumí.
   ========================================================================== */

:root {
	--aban-cable: var(--wp--preset--color--ink-soft);
	--aban-condensed: 78%;
}

body {
	font-stretch: 100%;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

h1, h2, .wp-block-post-title, .aban-condensed {
	font-stretch: var(--aban-condensed);
}

:where(.wp-site-blocks) :focus-visible {
	outline: 2px solid var(--wp--preset--color--cable-blue);
	outline-offset: 3px;
}

.skip-link.screen-reader-text:focus {
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--ink);
}

/* ---- Horní lišta s kontakty --------------------------------------------- */

.aban-topbar {
	font-size: var(--wp--preset--font-size--small);
}
.aban-topbar a {
	text-decoration: none;
	color: inherit;
}
.aban-topbar a:hover {
	text-decoration: underline;
	color: inherit;
}

/* ---- Logo ------------------------------------------------------------- */

.aban-logo {
	display: inline-block;
	line-height: 0;
}
.aban-logo img {
	display: block;
	width: clamp(130px, 14vw, 168px);
	height: auto;
}
.aban-footer .aban-logo img { width: 150px; }

/* ---- Hlavička ------------------------------------------------------------ */

.aban-header {
	position: sticky;
	top: 0;
	z-index: 50;
	border-bottom: 1px solid var(--wp--preset--color--line);
}
body.admin-bar .aban-header { top: 32px; }
@media (max-width: 782px) {
	body.admin-bar .aban-header { top: 46px; }
}
@media (max-width: 600px) {
	.aban-header { position: static; }
}

.aban-header .wp-block-navigation a {
	text-decoration: none;
}
.aban-header .wp-block-navigation a:hover {
	text-decoration: underline;
	text-underline-offset: 0.3em;
	text-decoration-thickness: 2px;
	text-decoration-color: var(--wp--preset--color--brand);
}
.aban-header .wp-block-navigation .current-menu-item > a {
	text-decoration: underline;
	text-underline-offset: 0.3em;
	text-decoration-thickness: 2px;
}

/* ---- Tlačítka ------------------------------------------------------------ */

.wp-block-button.is-style-ghost .wp-block-button__link {
	background: transparent;
	color: currentColor;
	box-shadow: inset 0 0 0 2px currentColor;
}
.wp-block-button.is-style-ghost .wp-block-button__link:hover {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--surface);
	box-shadow: inset 0 0 0 2px var(--wp--preset--color--ink);
}

/* ---- Úvod (hero) --------------------------------------------------------- */

.aban-hero h1 {
	font-size: var(--wp--preset--font-size--display);
	font-weight: 800;
	line-height: 0.98;
	letter-spacing: -0.02em;
	max-width: 19ch;
	text-wrap: balance;
}
.aban-hero .aban-hero__lead {
	max-width: 46ch;
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--ink-soft);
}

/* ---- Patch panel --------------------------------------------------------- */

.aban-panel {
	--ear: clamp(1.5rem, 4vw, 3rem);
	position: relative;
	margin-top: var(--wp--preset--spacing--60);
	padding-bottom: 9rem;
}
.aban-panel__rack {
	position: relative;
	display: grid;
	grid-template-columns: var(--ear) 1fr var(--ear);
	align-items: center;
	background: var(--wp--preset--color--rack);
	border-radius: 3px;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 -2px 0 rgba(0, 0, 0, 0.4);
	color: #C9CED4;
}
/* uši racku se šrouby */
.aban-panel__ear {
	position: relative;
	align-self: stretch;
	background: #2A2E33;
}
.aban-panel__ear:first-child { border-right: 1px solid #111316; border-radius: 3px 0 0 3px; }
.aban-panel__ear:last-child { border-left: 1px solid #111316; border-radius: 0 3px 3px 0; }
.aban-panel__ear::before,
.aban-panel__ear::after {
	content: "";
	position: absolute;
	left: 50%;
	width: 0.75rem;
	height: 0.45rem;
	transform: translateX(-50%);
	border-radius: 0.3rem;
	background: #0F1113;
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}
.aban-panel__ear::before { top: 0.8rem; }
.aban-panel__ear::after { bottom: 0.8rem; }

.aban-panel__ports {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	margin: 0;
	padding: 1.25rem clamp(0.5rem, 2.5vw, 2rem) 1.1rem;
	list-style: none;
	gap: clamp(0.4rem, 2vw, 1.5rem);
}
.aban-panel__ports li { margin: 0; }

.aban-port {
	--aban-cable: var(--c);
	position: relative;
	display: grid;
	justify-items: center;
	gap: 0.55rem;
	text-decoration: none;
	color: #C9CED4;
}
.aban-port:hover,
.aban-port:focus-visible { color: #FFFFFF; }

.aban-port__num {
	font-size: 0.72rem;
	font-weight: 600;
	color: #7D848C;
	font-variant-numeric: tabular-nums;
}
/* zdířka RJ45 s kovovým rámečkem */
.aban-port__jackwrap {
	position: relative;
	display: block;
	width: clamp(2.2rem, 5vw, 3.2rem);
}
.aban-port__jack {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 1.2;
	background: #08090A;
	border-radius: 2px;
	box-shadow: inset 0 0 0 2px #4A5058, inset 0 3px 0 2px #000;
}
/* průhledná koncovka konektoru se zlatými kontakty */
.aban-port__jack::after {
	content: "";
	position: absolute;
	inset: 22% 16% 14%;
	border-radius: 1px;
	background:
		repeating-linear-gradient(90deg, #C9A646 0 2px, transparent 2px 4px) top / 100% 30% no-repeat,
		rgba(205, 214, 222, 0.28);
}
/* kontrolka linky */
.aban-port__led {
	position: absolute;
	top: 0;
	right: -0.75rem;
	width: 0.35rem;
	height: 0.35rem;
	border-radius: 50%;
	background: #3BD67A;
	box-shadow: 0 0 6px #3BD67A;
}
.aban-port__label {
	font-size: clamp(0.72rem, 1.6vw, 0.95rem);
	font-weight: 600;
	text-align: center;
	line-height: 1.15;
}
/* visící kabel s barevnou krytkou */
.aban-port__cable {
	position: absolute;
	top: calc(100% - 0.35rem);
	left: 50%;
	z-index: 2;
	width: clamp(0.45rem, 1vw, 0.7rem);
	height: var(--len, 6rem);
	transform: translateX(-50%);
	background: var(--c);
	border-radius: 0 0 0.4rem 0.4rem;
	transition: height 0.35s ease;
	pointer-events: none;
}
.aban-port__cable::before {
	content: "";
	position: absolute;
	top: 0;
	left: 50%;
	width: clamp(1.4rem, 3.2vw, 2rem);
	height: clamp(1.6rem, 3.5vw, 2.4rem);
	transform: translateX(-50%);
	background: var(--c);
	border-radius: 2px 2px 0.5rem 0.5rem;
	clip-path: polygon(0 0, 100% 0, 100% 55%, 70% 100%, 30% 100%, 0 55%);
	box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.15);
}
.aban-port:hover .aban-port__cable,
.aban-port:focus-visible .aban-port__cable {
	height: calc(var(--len, 6rem) + 1.25rem);
}

/* jediný „živý“ moment: linky se rozsvítí jedna po druhé při načtení */
@media (prefers-reduced-motion: no-preference) {
	.aban-port__led {
		animation: aban-link-up 0.25s ease-out both;
	}
	.aban-panel__ports li:nth-child(1) .aban-port__led { animation-delay: 0.3s; }
	.aban-panel__ports li:nth-child(2) .aban-port__led { animation-delay: 0.5s; }
	.aban-panel__ports li:nth-child(3) .aban-port__led { animation-delay: 0.7s; }
	.aban-panel__ports li:nth-child(4) .aban-port__led { animation-delay: 0.9s; }
	.aban-panel__ports li:nth-child(5) .aban-port__led { animation-delay: 1.1s; }
}
@keyframes aban-link-up {
	from { background: #3A3F45; box-shadow: none; }
	to { background: #3BD67A; box-shadow: 0 0 6px #3BD67A; }
}
@media (prefers-reduced-motion: reduce) {
	.aban-port__cable { transition: none; }
}

@media (max-width: 600px) {
	.aban-panel { padding-bottom: 6rem; }
	.aban-port__led { display: none; }
	.aban-port__num { display: none; }
}

/* ---- Služby: barevný kabel na okraji ------------------------------------ */

.is-style-cable-blue   { --aban-cable: var(--wp--preset--color--cable-blue); }
.is-style-cable-yellow { --aban-cable: var(--wp--preset--color--cable-yellow); }
.is-style-cable-green  { --aban-cable: var(--wp--preset--color--cable-green); }
.is-style-cable-orange { --aban-cable: var(--wp--preset--color--cable-orange); }
.is-style-cable-violet { --aban-cable: var(--wp--preset--color--cable-violet); }

:where(.is-style-cable-blue, .is-style-cable-yellow, .is-style-cable-green, .is-style-cable-orange, .is-style-cable-violet) {
	position: relative;
	padding-left: clamp(1.5rem, 4vw, 3rem) !important;
	scroll-margin-top: 7rem;
}
:where(.is-style-cable-blue, .is-style-cable-yellow, .is-style-cable-green, .is-style-cable-orange, .is-style-cable-violet)::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 0.6rem;
	background: var(--aban-cable);
	border-radius: 0 0 0.35rem 0.35rem;
}

.aban-service + .aban-service {
	border-top: 1px solid var(--wp--preset--color--line);
}
.aban-service {
	padding-top: var(--wp--preset--spacing--50);
	padding-bottom: var(--wp--preset--spacing--50);
}
.aban-service h3 {
	font-size: var(--wp--preset--font-size--x-large);
	font-stretch: var(--aban-condensed);
	font-weight: 750;
}
.aban-service .aban-tagline {
	margin-top: 0.35rem;
	color: var(--wp--preset--color--ink-soft);
	font-size: var(--wp--preset--font-size--large);
}

/* ---- Seznamy s čárkou místo puntíku ------------------------------------- */

.wp-block-list.is-style-ticks {
	list-style: none;
	padding-left: 0;
}
.wp-block-list.is-style-ticks li {
	position: relative;
	padding-left: 1.4em;
	margin-bottom: 0.45em;
}
.wp-block-list.is-style-ticks li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.78em;
	width: 0.8em;
	height: 3px;
	border-radius: 2px;
	background: var(--aban-cable, var(--wp--preset--color--brand));
}

/* ---- Postup (Jak začít) ------------------------------------------------- */

.aban-steps .aban-step__n {
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 800;
	font-stretch: var(--aban-condensed);
	line-height: 1;
	color: var(--wp--preset--color--brand);
	font-variant-numeric: tabular-nums;
}
.aban-steps .wp-block-column {
	border-top: 2px solid #3A3F45;
	padding-top: 1.25rem;
}
.is-dark p { color: #C9CED4; }
.is-dark h2, .is-dark h3, .is-dark h4 { color: #FFFFFF; }
.is-dark a { color: #FFFFFF; }

/* ---- Podpora: nástroje ke stažení --------------------------------------- */

.aban-tools {
	border-top: 1px solid var(--wp--preset--color--line);
}
.aban-tools .aban-tool {
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding-top: 1rem;
	padding-bottom: 1rem;
}
.aban-tool p { margin: 0; }
.aban-tool .aban-tool__name {
	font-weight: 700;
}

/* ---- Kontakt ------------------------------------------------------------ */

.aban-contact-big a {
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 800;
	font-stretch: var(--aban-condensed);
	line-height: 1.05;
	text-decoration: none;
	color: var(--wp--preset--color--ink);
	overflow-wrap: anywhere;
}
.aban-contact-big a:hover {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--brand);
	text-decoration-thickness: 3px;
	text-underline-offset: 0.12em;
}

/* ---- Stránka služby: hlavička s kabelem --------------------------------- */

.aban-page-head {
	position: relative;
}
.aban-page-head.is-style-cable-blue::before,
.aban-page-head.is-style-cable-yellow::before,
.aban-page-head.is-style-cable-green::before,
.aban-page-head.is-style-cable-orange::before,
.aban-page-head.is-style-cable-violet::before {
	border-radius: 0;
}

/* ---- Patička ------------------------------------------------------------ */

.aban-footer a { text-decoration: none; }
.aban-footer a:hover { text-decoration: underline; }
.aban-footer .aban-footer__fine p { color: #868D95; }
.aban-footer-stripe {
	height: 6px;
	background: linear-gradient(90deg,
		var(--wp--preset--color--cable-blue) 0 20%,
		var(--wp--preset--color--cable-yellow) 20% 40%,
		var(--wp--preset--color--cable-green) 40% 60%,
		var(--wp--preset--color--cable-orange) 60% 80%,
		var(--wp--preset--color--cable-violet) 80% 100%);
}

/* ---- Obsah stránek ------------------------------------------------------ */

.wp-block-post-content > p,
.wp-block-post-content > ul,
.wp-block-post-content > ol {
	max-width: 68ch;
}
.wp-block-post-content h2 { margin-top: var(--wp--preset--spacing--50); }


/* patička vždy dole i na krátkých stránkách */
.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}
.wp-site-blocks > main,
.wp-site-blocks > .wp-block-group:not(header):not(footer) {
	flex: 1 0 auto;
}

a[href^="tel:"] { white-space: nowrap; }
