/* Blocksy header and footer, styled like the reference design. Content, menus and layout are edited in
 * Customizer > Header / Footer; this file only carries the look the builders cannot express. */

/* ---- Header: floating, translucent, blurred bar ---- */
body #header.ct-header { position: fixed; top: 12px; left: 0; right: 0; z-index: 150; background: none; pointer-events: none; }
body.admin-bar #header.ct-header { margin-block-start: var(--wp-admin--admin-bar--height, 32px); }
body .ct-header [data-device] > [data-row="middle"] { pointer-events: auto; width: calc(100% - 32px); margin-inline: auto; border: 0; border-radius: 6px; background: rgba(255, 255, 255, .75); --theme-backdrop-blur: 30px; --theme-box-shadow: 0 10px 30px rgba(0, 0, 0, .1); -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); box-shadow: 0 10px 30px rgba(0, 0, 0, .1); transition: min-height .3s, height .3s; }
body .ct-header [data-row="middle"] > .ct-container { width: 100%; max-width: none; padding-inline: 16px; }
/* The logo's size is Customizer > Header > Logo > Height; the header keeps one height at every scroll position (row height in Header > Middle row). */
body .ct-header .site-logo-container img { display: block; width: auto; max-width: none; }
body.single-vietbar_solution #main-container > main,
body.single-project #main-container:has(> .ct-header) > main { padding-block-start: clamp(92px, 7vw, 128px); }
/* Menu and dropdown fonts and colours: Customizer > Header > Menu (Font, Font Color) and Dropdown. */
body .ct-header .menu > li > a, body .ct-header .ct-menu-link { transition: color .2s; }
body .ct-header .sub-menu { border-radius: 8px; background: #fff; box-shadow: 0 12px 32px rgba(0, 0, 0, .12); }
/* Dark text on the white dropdown (Blocksy's default dropdown link colour is white). */
body .ct-header .sub-menu .ct-menu-link { color: #000; }
body .ct-header .sub-menu .ct-menu-link:hover, body .ct-header .sub-menu .current-menu-item > .ct-menu-link { color: var(--hm-c-primary, #ff5b00); }
/* The off-canvas (phone, tablet) menu is white: dark text, brand colour on hover and for the current page. */
body #offcanvas.ct-panel .ct-panel-inner { background: #fff; }
body #offcanvas.ct-panel .ct-toggle-close, body #offcanvas.ct-panel .ct-toggle-close svg { color: #000; fill: currentColor; }
body #offcanvas.ct-panel a.ct-menu-link { color: #000; }
body #offcanvas.ct-panel a.ct-menu-link:hover, body #offcanvas.ct-panel .current-menu-item > a.ct-menu-link, body #offcanvas.ct-panel .current-menu-ancestor > a.ct-menu-link, body #offcanvas.ct-panel .current-menu-ancestor > .ct-sub-menu-parent > a.ct-menu-link { color: var(--hm-c-primary, #ff5b00); }
body #offcanvas.ct-panel .sub-menu { background: transparent; box-shadow: none; }
body #offcanvas.ct-panel .menu > li > .ct-sub-menu-parent .ct-toggle-dropdown-mobile, body #offcanvas.ct-panel .ct-toggle-dropdown-mobile { color: #000; }
body .ct-header .ct-header-trigger { min-width: 44px; min-height: 44px; }
@media (min-width: 1000px) {
	/* The bar is wider than the content container by its own padding on each side, so the logo and the last menu item line up with the container edges. */
	body .ct-header { --hm-hdr-pad: 32px; }
	body .ct-header [data-device] > [data-row="middle"] { width: calc(var(--theme-container-width, 90%) + 2 * var(--hm-hdr-pad)); max-width: calc(var(--theme-normal-container-max-width, 1290px) + 2 * var(--hm-hdr-pad)); }
	body .ct-header [data-row="middle"] > .ct-container { padding-inline: var(--hm-hdr-pad); }
}

/* ---- Footer: brand gradient, three columns, thin bottom bar ---- */
body .ct-footer { background: linear-gradient(180deg, color-mix(in srgb, var(--theme-palette-color-1) 35%, #f6b023), color-mix(in srgb, var(--theme-palette-color-1) 85%, #6a3a3a)); }
/* Text sizes and colours: Customizer > Footer (Widgets font/colour, Menu, Copyright). Only the layout and the brand title face are set here. */
body .ct-footer a { text-decoration: none; }
body .ct-footer a:hover { text-decoration: underline; }
body .ct-footer [data-row] { border: 0; background: none; }
body .ct-footer [data-row] > .ct-container { display: grid; gap: 24px; }
body .ct-footer [data-row="top"] > .ct-container { grid-template-columns: 1fr auto; align-items: center; padding-block: 40px 16px; }
body .ct-footer [data-row="middle"] > .ct-container { grid-template-columns: 1fr; padding-block: 24px 48px; }
body .ct-footer [data-row="bottom"] > .ct-container { grid-template-columns: 1fr; padding-block: 16px 24px; }
body .ct-footer .widget-title { margin: 0 0 18px; font-family: var(--hm-font-display); line-height: 1.3; }
body .ct-footer .widget-menu { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; line-height: 1.7; }
body .ct-footer .hm-contact-list { display: grid; grid-template-columns: auto 1fr; gap: 3px 18px; margin: 0; line-height: 1.7; }
body .ct-footer .hm-contact-list dt { color: rgba(255, 255, 255, .65); font-weight: 400; }
body .ct-footer .hm-contact-list dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
body .ct-footer [data-row="middle"] [data-column] { min-width: 0; }
body .ct-footer .hm-address span { color: rgba(255, 255, 255, .65); }
body .ct-footer .footer-menu-inline .menu { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; list-style: none; }

/* Footer top: logo and back-to-top ring on the first line; a rule and the social icons on the second.
 * Socials: Customizer > Footer > Socials (rounded, outline). The ring is the "Back to top" text widget. */
body .ct-footer [data-row="top"] > .ct-container { padding-block: 40px 8px; }
body .ct-footer [data-row="top"] [data-column="widget-area-1"] { align-self: stretch; background: linear-gradient(rgba(255, 255, 255, .55), rgba(255, 255, 255, .55)) no-repeat left bottom 20px / 100% 1px; }
body .ct-footer [data-row="top"] [data-column]:last-child { display: flex; flex-direction: column; align-items: flex-end; gap: 24px; }
body .ct-footer .hm-to-top { display: inline-flex; align-items: center; justify-content: center; width: 50px; height: 50px; border: 1px solid #fff; border-radius: 50%; color: #fff; transition: background-color .25s, color .25s; }
body .ct-footer .hm-to-top:hover { background: #fff; color: var(--theme-palette-color-1); text-decoration: none; }
body .ct-footer .hm-to-top .ct-icon { width: 18px; height: 18px; fill: currentColor; }
body .ct-footer .ct-footer-socials { --theme-icon-color: #fff; --theme-icon-hover-color: var(--theme-palette-color-1); }
body .ct-footer .ct-footer-socials .ct-social-box { --theme-icon-size: 16px; }
body .ct-footer .ct-footer-socials .ct-social-box { gap: 15px; }
body .ct-footer .ct-footer-socials .ct-social-box a { width: 40px; height: 40px; border: 1px solid #fff; border-radius: 50%; color: #fff; transition: background-color .25s, color .25s; }
body .ct-footer .ct-footer-socials .ct-social-box a:hover { background: #fff; color: var(--theme-palette-color-1); text-decoration: none; }

/* The footer logo is the header's coloured logo turned white. */
body .ct-footer .hm-footer-logo { display: block; width: auto; height: 44px; filter: brightness(0) invert(1); }

/* Faint brand name under the columns, as in the reference footer (same face as the services section's big title). */
body .ct-footer [data-row="middle"] { position: relative; }
body .ct-footer [data-row="middle"]::after {
	content: var(--hm-footer-wordmark, "Vietbar Solution"); /* text: Customizer > Site Identity */
	display: block;
	margin: 0 auto 8px;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	font: 800 calc(min(90vw, var(--theme-normal-container-max-width, 1290px)) * .157) / .98 var(--hm-font-brand);
	color: transparent;
	background: linear-gradient(180deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, .04));
	-webkit-background-clip: text;
	background-clip: text;
	pointer-events: none;
}

/* Bottom bar: links separated by a thin rule. */
body .ct-footer .footer-menu-inline .menu > li + li { padding-inline-start: 14px; border-inline-start: 1px solid rgba(255, 255, 255, .6); }
@media (min-width: 768px) {
	body .ct-footer [data-row="middle"] > .ct-container { grid-template-columns: repeat(3, 1fr); gap: calc(40 * var(--hm-u)); }
	body .ct-footer [data-row="bottom"] > .ct-container { grid-template-columns: 1fr auto; align-items: center; }
}
@media (min-width: 1200px) {
	body .ct-footer { padding-top: calc(20 * var(--hm-u)); }
}


/* Front-page intro: assemble the brand mark, reveal the wordmark, open the five rows. */
.hm-intro-screen {
	--hm-intro-exit: 1.57s;
	--hm-intro-exit-duration: .43s;
	position: fixed;
	inset: 0;
	z-index: 300;
	display: grid;
	place-items: center;
	overflow: hidden;
	pointer-events: none;
	animation: hm-intro-fade var(--hm-intro-exit-duration) linear var(--hm-intro-exit) forwards;
}

.hm-intro-panels {
	position: absolute;
	inset: 0;
	display: grid;
	grid-template-rows: repeat(5, 1fr);
}

.hm-intro-panels > span {
	--hm-intro-direction: -100%;
	background: #fff;
	animation: hm-intro-slide var(--hm-intro-exit-duration) cubic-bezier(.65, 0, .35, 1) var(--hm-intro-exit) forwards;
}

.hm-intro-panels > span:nth-child(even) { --hm-intro-direction: 100%; }

.hm-intro-lockup {
	position: relative;
	display: flex;
	align-items: center;
	gap: clamp(8px, 1.4vw, 23px);
}

.hm-intro-mark {
	position: relative;
	width: clamp(34px, 9vw, 88px);
	aspect-ratio: 1;
	flex: none;
}

/* Each part uses the same supplied PNG, clipped through the spaces between its shapes. */
.hm-intro-mark > span {
	position: absolute;
	inset: 0;
	background: url("../../vietbar/mark.webp") center / contain no-repeat;
	animation: hm-intro-assemble .41s cubic-bezier(.22, 1, .36, 1) both;
}

.hm-intro-mark__left {
	--hm-intro-mark-offset: -36%;
	clip-path: polygon(0 0, 29% 0, 31% 16%, 34% 24%, 41% 33%, 59% 33%, 32% 100%, 0 100%);
}

.hm-intro-mark__right {
	--hm-intro-mark-offset: 36%;
	clip-path: polygon(72% 0, 100% 0, 100% 100%, 32% 100%);
}

.hm-intro-mark__dot {
	--hm-intro-mark-offset: -36%;
	clip-path: polygon(30% 0, 68% 0, 68% 14%, 62% 33%, 41% 33%, 34% 24%, 31% 16%);
}

.hm-intro-wordmark {
	display: block;
	width: min(clamp(168px, 61vw, 510px), calc(100vw - 74px));
	height: auto;
	color: #343837;
}

.hm-intro-wordmark__brand { color: #f76e26; fill: #f76e26; }
.hm-intro-wordmark__descriptor { fill: #343837; }
.hm-intro-wordmark path {
	stroke: currentColor;
	stroke-width: 1;
	stroke-linejoin: round;
	stroke-dasharray: 1 1;
	animation: hm-intro-outline 1.03s cubic-bezier(.2, .67, .33, 1) .41s both, hm-intro-fill .21s ease-out 1.25s both;
}
@media (max-width: 575px) {
	.hm-intro-wordmark path { stroke-width: 1.7; }
}

@keyframes hm-intro-assemble {
	from { opacity: 0; transform: translateY(var(--hm-intro-mark-offset)); }
	to { opacity: 1; transform: translateY(0); }
}
@keyframes hm-intro-outline { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes hm-intro-fill { from { fill: transparent; } to { fill: currentColor; stroke-opacity: 0; } }
@keyframes hm-intro-slide { to { transform: translateX(var(--hm-intro-direction)); } }
@keyframes hm-intro-fade { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .hm-intro-screen { display: none; } }
/* Tap targets of at least 24px for the footer links and the breadcrumb's home icon (WCAG 2.2 target size). */
body .ct-footer .widget a, body .ct-footer .footer-menu-inline a { display: inline-block; min-height: 24px; padding-block: 2px; }
body .ct-breadcrumbs .first-item > a { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; min-height: 24px; margin-inline-start: -4px; }
