/*
Theme Name: BTS
Theme URI: https://bt-service.lt
Author: Lina Falkauske
Description: Block theme for UAB "Baltic Trans Service" (bt-service.lt). Built 1:1 from the Claude Design prototype: every section is made of core blocks, design values live in assets/css/proto.css.
Version: 0.6.9
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bts
*/

/* ==================================================================
   1. Base – make blocks behave like the prototype's plain HTML.
   Design values for each element are in assets/css/proto.css
   (generated from the prototype, loaded after this file).
================================================================== */
html,
body {
	overflow-x: clip;
}

body {
	margin: 0;
	background: #fff;
	-webkit-font-smoothing: antialiased;
}

.wp-site-blocks {
	padding: 0 !important;
}

/* Template part wrappers must not create boxes (sticky header needs it). */
header.wp-block-template-part,
footer.wp-block-template-part,
.wp-site-blocks > .wp-block-template-part {
	display: contents;
}

.wp-site-blocks > * + * {
	margin-block-start: 0;
}

.bts-c {
	font-family: Inter, system-ui, sans-serif;
	color: #1C2430;
	font-size: 16px;
	line-height: normal;
}

/* Prototype: a, button, input, fieldset, span, div are border-box. */
.bts-c :is(a, button, input, fieldset, span, div) {
	box-sizing: border-box;
}

/* Text blocks start from browser defaults, like in the prototype. */
.bts-c :is(h1, h2, h3, h4, h5, h6, p, ul, ol, blockquote, summary) {
	margin-block: revert;
	margin-inline: revert;
	font-size: revert;
	font-weight: revert;
	line-height: revert;
	letter-spacing: revert;
	font-family: inherit;
	color: inherit;
}

body .bts-c :where(.is-layout-flow, .is-layout-constrained, .is-layout-flex) > :where(:not(p, h1, h2, h3, h4, h5, h6, ul, ol, blockquote)) {
	margin-block: 0;
}

.bts-c .wp-block-group,
.bts-c .wp-block-details,
.bts-c .wp-block-buttons,
.bts-c .wp-block-list {
	margin-block: 0;
}

.bts-c .wp-block-buttons {
	gap: normal;
	flex-wrap: nowrap;
}

/* Image blocks: the <img> is the box, the <figure> disappears. */
.bts-c figure.bts-img {
	display: contents;
	margin: 0;
}

.bts-c .bts-img img {
	vertical-align: baseline;
	max-width: 100%;
	height: auto;
}

/* Button blocks: the link is the box, wrappers disappear. */
.bts-c .wp-block-buttons.bts-dc,
.bts-c .wp-block-button {
	display: contents;
}

.bts-c .wp-block-button__link {
	display: inline;
	width: auto;
	height: auto;
	align-content: normal;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: #3B5AA8;
	font: inherit;
	line-height: inherit;
	text-align: inherit;
	text-decoration: underline;
	word-break: normal;
	cursor: pointer;
}

/* Paragraph that only wraps a styled link: the link is the box. */
.bts-c p.bts-dc {
	display: contents;
}

/* Cards that are links: the link stretches over the whole card. */
.bts-c .bts-linkcard {
	position: relative;
}

.bts-c a.bts-stretch {
	color: inherit;
	text-decoration: inherit;
	font: inherit;
}

.bts-c a.bts-stretch::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
}

.bts-c a.bts-stretch:focus-visible::after {
	outline: 2px solid #34AADC;
	outline-offset: 2px;
}

/* Accordions (D.U.K., Karjera, phone menu) */
.bts-c .bts-acc > summary {
	list-style: none;
	cursor: pointer;
}

.bts-c .bts-acc > summary::-webkit-details-marker {
	display: none;
}

.bts-c .bts-acc > summary:focus-visible {
	outline: 2px solid #34AADC;
	outline-offset: -2px;
}

.bts-c .bts-acc:not([open]) > summary svg {
	transform: none !important;
}

.bts-c .bts-acc.card:not([open]),
.bts-c .bts-acc[class*="bts-f-"]:not([open]) {
	border-color: #E1E7F0 !important;
}

/* ==================================================================
   2. Prototype interaction styles (hover, focus, marquee, scrollers)
================================================================== */
.bts-c a,
.bts-c button {
	-webkit-tap-highlight-color: transparent;
}

.bts-c .vscroll {
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.bts-c .vscroll::-webkit-scrollbar {
	display: none;
}

.bts-c .vcard,
.bts-c .logoitem {
	scroll-snap-align: start;
}

.bts-c .arrowbtn:hover {
	border-color: #34AADC !important;
	color: #1C2430 !important;
}

/* Logo strip: moved by script.js (Web Animations API, see initMarquee);
   .is-css-run is the fallback for browsers without element.animate(). */
.bts-c .marquee-track {
	will-change: transform;
}

@keyframes bts-marquee {
	from { transform: translateX(0); }
	to { transform: translateX(-33.3333%); }
}

.bts-c .marquee-track.is-css-run {
	animation: bts-marquee 26s linear infinite;
}

.bts-c .marquee {
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 48px, #000 calc(100% - 48px), transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 48px, #000 calc(100% - 48px), transparent 100%);
}

/* .cta / .btn-ghost sit on <a>/<button> in raw HTML and on the
   button block wrapper (then the inner link is the button). */
.bts-c :is(.cta:not(.wp-block-button), .btn-ghost:not(.wp-block-button), .wp-block-button.cta > .wp-block-button__link, .wp-block-button.btn-ghost > .wp-block-button__link) {
	background-clip: padding-box;
	border-image: none;
	transition: box-shadow .18s ease, transform .18s ease, filter .18s ease, background .18s ease, border-color .18s ease;
}

.bts-c :is(.cta:not(.wp-block-button), .wp-block-button.cta > .wp-block-button__link):hover {
	color: #FFFFFF !important;
	box-shadow: 0 16px 32px rgba(59, 90, 168, .42) !important;
	transform: translateY(-2px);
	filter: brightness(1.06);
}

.bts-c :is(.cta:not(.wp-block-button), .wp-block-button.cta > .wp-block-button__link):active {
	transform: translateY(0);
	box-shadow: 0 6px 14px rgba(59, 90, 168, .32) !important;
	filter: none;
}

.bts-c :is(.btn-ghost:not(.wp-block-button), .wp-block-button.btn-ghost > .wp-block-button__link):hover {
	background-image: linear-gradient(135deg, #34AADC 0%, #3B5AA8 130%) !important;
	background-color: transparent !important;
	background-clip: border-box !important;
	border-color: transparent !important;
	color: #FFFFFF !important;
	box-shadow: 0 14px 28px rgba(59, 90, 168, .32);
	transform: translateY(-2px);
}

.bts-c .card {
	transition: border-color .15s, box-shadow .15s, transform .15s;
}

.bts-c .card:hover {
	border-color: #34AADC !important;
	box-shadow: 0 12px 32px rgba(28, 36, 48, .08);
	transform: translateY(-2px);
}

.bts-c details.card:hover {
	transform: none;
}

.bts-c .mega:hover {
	background: #F4F7FB;
}

.bts-c .nl:hover span {
	opacity: 1 !important;
}

.bts-c .dd:hover {
	border-color: #34AADC !important;
	background: #F4F7FB;
}

.bts-c .eu-pill:hover {
	background: rgba(255, 255, 255, .22) !important;
	color: #FFFFFF !important;
}

.bts-c .util a:hover,
.bts-c .foot a:hover {
	color: #FFFFFF !important;
}

.bts-c input:focus,
.bts-c select:focus,
.bts-c textarea:focus {
	outline: 2px solid #34AADC;
	outline-offset: 1px;
}

.bts-c .seg button {
	transition: background .15s, color .15s;
}

.bts-c :is(a, button):focus-visible {
	outline: 2px solid #34AADC;
	outline-offset: 2px;
}

/* ==================================================================
   3. Header, menus, phone drawer
================================================================== */
.bts-c.bts-hdr-desk,
.bts-c .bts-hdr-desk {
	position: sticky !important;
	top: 0 !important;
}

body.admin-bar .bts-hdr-desk,
body.admin-bar .bts-hdr-mob {
	top: 32px !important;
}

.bts-c .bts-dd {
	display: none !important;
}

.bts-c .bts-dd.is-open {
	display: block !important;
	/* The header's own blur stops the panel from blurring the page under it,
	   so the panel is solid white to keep the menu readable. */
	background: #FFFFFF !important;
}

.bts-c .nl[aria-expanded="true"] span,
.bts-c .nl.is-current span {
	opacity: 1 !important;
}

.bts-c .nl.is-current,
.bts-c a.nl[aria-current="page"] {
	color: #3B5AA8 !important;
	font-weight: 700 !important;
}

.bts-c a.nl[aria-current="page"] {
	position: relative;
}

.bts-c a.nl[aria-current="page"]::after {
	content: "";
	position: absolute;
	left: 14px;
	right: 14px;
	bottom: 0;
	height: 3px;
	border-radius: 3px 3px 0 0;
	background: #34AADC;
}

.bts-c .bts-hdr-mob {
	position: sticky !important;
	top: 0 !important;
}

.bts-c .bts-drawer {
	position: fixed !important;
	inset: 0 !important;
	width: auto !important;
	height: auto !important;
	z-index: 1000 !important;
	display: none !important;
}

.bts-c .bts-drawer.is-open {
	display: flex !important;
}

body.admin-bar .bts-drawer {
	top: 46px !important;
}

/* Current page in the phone menu: blue text only (no side bar). */
.bts-c .bts-drawer a[aria-current="page"] {
	color: #3B5AA8 !important;
}

body.bts-noscroll {
	overflow: hidden;
}

/* Phone layout up to 1023 px (phones and portrait tablets): the desktop
   prototype is 1440 px wide and gets cramped below 1024 px. */
@media (max-width: 1023px) {
	.bts-c .bts-foot-desk,
	.bts-c .bts-util,
	.bts-c .bts-hdr-desk,
	.bts-c .bts-desk-only {
		display: none !important;
	}
}

@media (min-width: 1024px) {
	.bts-c .bts-foot-mob,
	.bts-c .bts-hdr-mob,
	.bts-c .bts-drawer,
	.bts-c .bts-mob-only {
		display: none !important;
	}
}

/* Small laptops and landscape tablets: keep the menu on one line. */
@media (min-width: 1024px) and (max-width: 1239px) {
	.bts-c .bts-hdr-desk .nl {
		padding: 0 9px !important;
		white-space: nowrap;
	}

	.bts-c .bts-hdr-desk :is(.cta, .wp-block-button__link) {
		white-space: nowrap;
	}

	.bts-c .bts-hdr-desk img {
		flex-shrink: 0;
	}
}

/* WordPress admin bar is 46 px tall up to 782 px and scrolls away below 601 px. */
@media (max-width: 782px) {
	body.admin-bar .bts-hdr-mob {
		top: 46px !important;
	}
}

@media (max-width: 600px) {
	body.admin-bar .bts-hdr-mob {
		top: 0 !important;
	}
}

/* Hidden by the filter buttons (D.U.K., Įgyvendinti projektai) */
.bts-c .bts-hidden {
	display: none !important;
}

/* ==================================================================
   4. Blog (Naujienos) – plain readable layout until a design exists
================================================================== */
.bts-post {
	max-width: 760px;
	margin: 0 auto;
	padding: 64px 20px 96px;
	line-height: 1.7;
}

.bts-post :where(h1, h2, h3) {
	line-height: 1.2;
	letter-spacing: -0.01em;
}
