/*
Theme Name: likhitgroup.com
Theme URI: https://www.likhitgroup.com
Author: PhranakornSoft
Author URI: https://www.phranakornsoft.com
Description: Block themes for likhitgroup.com
Version: 1.4.6
Requires at least: 6.5
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License
License URI: license.txt
Text Domain: likhitgroup
Tags: block-patterns, block-styles, full-site-editing, one-column, custom-colors, custom-logo, editor-style, featured-images, translation-ready
*/

/* --------------------------------------------------------------
 * Base
 * -------------------------------------------------------------- */

body {
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img {
	max-width: 100%;
	height: auto;
}

/* Accessibility: visible focus outline on interactive elements. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

/* Skip link (WordPress prints it automatically in block themes). */
.skip-link.screen-reader-text {
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--contrast);
}

.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	height: 1px;
	overflow: hidden;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

/* --------------------------------------------------------------
 * Header / Navigation
 * -------------------------------------------------------------- */

/* The header shows the bundled LIKHIT logo until a Site Logo is set
   in WordPress; once set, the fallback image hides automatically. */
.wp-block-site-logo + .likhit-fallback-logo {
	display: none;
}

.likhit-fallback-logo {
	margin: 0;
}

.wp-block-navigation .wp-block-navigation-item__content {
	padding: 12px 18px;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.wp-block-navigation .wp-block-navigation-item__content:hover,
.wp-block-navigation .wp-block-navigation-item__content:focus,
.wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content {
	background-color: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--contrast);
}

.wp-block-navigation a:hover,
.wp-block-navigation a:focus {
	color: var(--wp--preset--color--accent);
}

/* Root-level gap: WordPress adds margin-block-start (the global
   block-gap) to every direct child of .wp-site-blocks. Remove it so
   header/main/footer sit flush against each other. */
.wp-site-blocks > * {
	margin-block-start: 0;
}

/* Mobile overlay menu inherits the dark palette. */
.wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	padding: 2rem;
}

/* --------------------------------------------------------------
 * Buttons
 * -------------------------------------------------------------- */

.wp-block-button__link {
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.wp-block-button__link:hover {
	background-color: #d9731f;
	color: var(--wp--preset--color--contrast);
}

.is-style-outline > .wp-block-button__link,
.wp-block-button.is-style-outline .wp-block-button__link {
	border: 1px solid var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--contrast);
	background-color: transparent;
}

.is-style-outline > .wp-block-button__link:hover,
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

/* Dark navy button style (hero "Contact us"). */
.wp-block-button.is-style-likhit-dark .wp-block-button__link {
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}

.wp-block-button.is-style-likhit-dark .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--accent);
}

/* --------------------------------------------------------------
 * Section label — "Who we are ———" style eyebrow with rule line
 * -------------------------------------------------------------- */

.likhit-eyebrow {
	display: flex;
	align-items: center;
	gap: 20px;
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 300;
	letter-spacing: 0.02em;
}

.likhit-eyebrow::after {
	content: "";
	display: inline-block;
	width: 150px;
	max-width: 30vw;
	height: 1px;
	background-color: currentColor;
	opacity: 0.9;
}

.likhit-eyebrow.is-centered {
	justify-content: center;
}

.likhit-eyebrow.is-centered::before {
	content: "";
	display: inline-block;
	width: 150px;
	max-width: 30vw;
	height: 1px;
	background-color: currentColor;
	opacity: 0.9;
}

/* Constrain hero copy to the Figma column width. */
.likhit-max-620 {
	max-width: 620px;
}

/* --------------------------------------------------------------
 * Breadcrumb — "Home / Section / Current" trail under the header
 * -------------------------------------------------------------- */

.likhit-breadcrumb {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	color: var(--wp--preset--color--subtle);
	font-size: var(--wp--preset--font-size--small);
	margin: 0 0 14px;
}

.likhit-breadcrumb a {
	color: var(--wp--preset--color--subtle);
}

.likhit-breadcrumb a:hover,
.likhit-breadcrumb a:focus {
	color: var(--wp--preset--color--accent);
}

.likhit-breadcrumb .likhit-breadcrumb-current {
	color: var(--wp--preset--color--contrast);
	font-weight: 600;
}

/* Thin rules flanking the trail, per the design. */
.likhit-breadcrumb::before,
.likhit-breadcrumb::after {
	content: "";
	flex: none;
	width: clamp(48px, 9vw, 130px);
	height: 1px;
	background-color: rgba(255, 255, 255, 0.35);
	margin: 0 8px;
}

/* --------------------------------------------------------------
 * Cards (portfolio / services / blog)
 * -------------------------------------------------------------- */

.likhit-card-cover {
	overflow: hidden;
}

.likhit-card-cover img {
	transition: transform 0.4s ease;
}

.likhit-card-cover:hover img,
.likhit-card-cover:focus-within img {
	transform: scale(1.04);
}

/* Team member photo */
.likhit-team-photo img {
	filter: saturate(0.95);
}

/* About "Our Story" photos — keep a consistent landscape ratio at
   every viewport instead of the source photo's native (sometimes
   portrait) proportions. */
.likhit-story-photo img {
	aspect-ratio: 4 / 3;
	object-fit: cover;
	width: 100%;
}

/* Portfolio card — cover image with a frosted caption bar overlaid on
   its bottom edge. Title/status sit on the left; the "View Project"
   button is pinned to the right and never wraps below the title. */
.likhit-project-card {
	position: relative;
	overflow: hidden;
	container-type: inline-size;
}

.likhit-project-card-image {
	margin: 0;
}

.likhit-project-card-image a {
	display: block;
}

/* The card and its cover both clip overflow, so the global outward
   focus outline would get cut off on this edge-to-edge image link. */
.likhit-project-card-image a:focus-visible {
	outline-offset: -2px;
}

.likhit-project-card-image img {
	aspect-ratio: 3 / 2;
	object-fit: cover;
	width: 100%;
	height: 100%;
	display: block;
}

.likhit-project-card-caption {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	padding: clamp(10px, 2.5vw, 15px) clamp(10px, 3vw, 15px);
	background-color: rgba(128, 128, 128, 0.4);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

/* Let long titles wrap inside the left column instead of pushing the
   button out of the row. */
.likhit-project-card-caption > .wp-block-group {
	min-width: 0;
}

.likhit-project-card-caption .wp-block-buttons {
	flex-shrink: 0;
}

.likhit-project-card-caption .wp-block-button__link {
	padding: 8px 16px;
	font-size: var(--wp--preset--font-size--small);
}

.likhit-project-card h3 {
	margin: 0;
}

/* Wide caption cards: scale the caption title and button up to the
   proportions of the design. */
@container (min-width: 720px) {
	.likhit-project-card-caption h3 {
		font-size: 2.25rem;
	}

	.likhit-project-card-caption .wp-block-button__link {
		padding: 13px 26px;
		font-size: var(--wp--preset--font-size--medium);
	}
}

/* Stat numbers */
.likhit-stat-number {
	color: var(--wp--preset--color--accent);
	font-weight: 300;
	line-height: 1;
}

/* --------------------------------------------------------------
 * FAQ (details/summary)
 * -------------------------------------------------------------- */

.likhit-faq details {
	border-bottom: 1px solid rgba(255, 255, 255, 0.25);
	padding: 1.25rem 0;
}

.likhit-faq summary {
	cursor: pointer;
	list-style: none;
	position: relative;
	padding-right: 3rem;
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 300;
}

.likhit-faq summary::-webkit-details-marker {
	display: none;
}

.likhit-faq summary::after {
	content: "+";
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--contrast);
	font-size: 1.5rem;
	line-height: 1;
}

.likhit-faq details[open] summary::after {
	content: "−";
}

.likhit-faq details > :not(summary) {
	margin-top: 1rem;
	color: var(--wp--preset--color--muted);
}

/* --------------------------------------------------------------
 * Fluent Forms — match the LIKHIT dark design
 * -------------------------------------------------------------- */

.fluentform .ff-el-form-control,
.fluentform textarea.ff-el-form-control,
.fluentform select.ff-el-form-control {
	background-color: transparent;
	border: 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 0;
	color: var(--wp--preset--color--contrast);
	padding: 0.75rem 0;
	box-shadow: none;
}

.fluentform .ff-el-form-control::placeholder {
	color: var(--wp--preset--color--subtle);
	opacity: 1;
}

.fluentform .ff-el-form-control:focus {
	background-color: transparent;
	border-bottom-color: var(--wp--preset--color--accent);
	box-shadow: none;
	color: var(--wp--preset--color--contrast);
}

.fluentform .ff-el-input--label label {
	color: var(--wp--preset--color--contrast);
	font-weight: 600;
	font-size: var(--wp--preset--font-size--large);
}

.fluentform .ff-el-group {
	margin-bottom: 1.25rem;
}

.fluentform .ff-btn-submit,
.fluentform .ff_btn_style,
.fluentform button[type="submit"] {
	background-color: var(--wp--preset--color--accent) !important;
	border: 0 !important;
	border-radius: 0 !important;
	color: var(--wp--preset--color--contrast) !important;
	font-family: inherit;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 300;
	padding: 14px 30px;
	transition: background-color 0.2s ease;
}

.fluentform .ff-btn-submit:hover,
.fluentform .ff_btn_style:hover,
.fluentform button[type="submit"]:hover {
	background-color: #d9731f !important;
	color: var(--wp--preset--color--contrast) !important;
}

.fluentform .ff-el-is-error .ff-el-form-control {
	border-bottom-color: #e25c5c;
}

.fluentform .error,
.fluentform .ff-el-is-error .error {
	color: #ff9d9d;
}

.fluentform .ff-message-success {
	background-color: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--accent);
	color: var(--wp--preset--color--contrast);
	box-shadow: none;
}

/* Checkbox / GDPR agreement */
.fluentform .ff-el-form-check-label,
.fluentform .ff_t_c {
	color: var(--wp--preset--color--contrast);
}

.fluentform .ff-el-form-check-input {
	accent-color: var(--wp--preset--color--accent);
}

/* Newsletter (footer) — inline e-mail field with arrow-like button.
   Fluent Forms' "Subscription Form" template renders the e-mail field
   and the submit button as two plain sibling .ff-el-group rows inside
   the form's <fieldset> (no column/container wrapper) — put them in a
   flex row so the button sits beside the input, sharing one border.
   The row's bottom spacing lives on the fieldset itself (not on the
   .ff-el-group items) — a margin-bottom on a stretched flex item eats
   into its own stretched height, throwing off the merged-border height
   match between the input and the button. */
.likhit-subscribe .fluentform fieldset {
	align-items: stretch;
	display: flex;
	margin-bottom: 0.75rem;
}

.likhit-subscribe .fluentform .ff-el-group {
	margin-bottom: 0;
}

.likhit-subscribe .fluentform .ff-el-form-control {
	border: 1px solid var(--wp--preset--color--contrast);
	padding: 0.85rem 1rem;
}

.likhit-subscribe .fluentform .ff-el-form-control:focus {
	border-color: var(--wp--preset--color--accent);
}

.likhit-subscribe .fluentform .ff-el-group:not(.ff_submit_btn_wrapper) {
	flex: 1 1 auto;
}

.likhit-subscribe .fluentform .ff-el-group:not(.ff_submit_btn_wrapper) .ff-el-form-control {
	border-right: 0;
	height: 100%;
}

.likhit-subscribe .fluentform .ff_submit_btn_wrapper {
	flex: 0 0 auto;
}

.likhit-subscribe .fluentform .ff-btn-submit {
	background-color: transparent !important;
	border: 1px solid var(--wp--preset--color--contrast) !important;
	border-left: 0 !important;
	color: transparent !important;
	font-size: 0 !important;
	height: 100%;
	min-width: 0 !important;
	padding: 0 !important;
	position: relative;
	width: 48px;
}

.likhit-subscribe .fluentform .ff-btn-submit::after {
	align-items: center;
	color: var(--wp--preset--color--accent);
	content: "\2192";
	display: flex;
	font-size: 1.1rem;
	inset: 0;
	justify-content: center;
	position: absolute;
}

.likhit-subscribe .fluentform .ff-btn-submit:hover {
	background-color: transparent !important;
	border-color: var(--wp--preset--color--accent) !important;
}

.likhit-subscribe .fluentform .ff-btn-submit:hover::after {
	color: var(--wp--preset--color--accent-dark);
}

.likhit-subscribe-agree {
	align-items: center;
	display: flex;
	gap: 8px;
	margin-top: 0.75rem;
}

.likhit-subscribe-agree input[type="checkbox"] {
	accent-color: var(--wp--preset--color--accent);
	height: 16px;
	width: 16px;
}

/* Footer menu — plain link list, no bullets. */
ul.likhit-footer-menu {
	list-style: none;
	margin: 0;
	padding-left: 0;
}

/* Until a subscribe form is assigned in the footer pattern, hide
   Fluent Forms' "Please select a form" placeholder there. */
.likhit-subscribe .fluentform-no-form-selected {
	display: none;
}

/* --------------------------------------------------------------
 * Project listing — search box + grid/list toggle
 * -------------------------------------------------------------- */

.likhit-project-toolbar {
	align-items: center;
	gap: 16px;
}

.likhit-project-search input[type="search"] {
	background-color: transparent;
	border: 1px solid rgba(255, 255, 255, 0.3);
	color: var(--wp--preset--color--contrast);
	font-family: inherit;
	font-size: var(--wp--preset--font-size--small);
	min-width: 220px;
	padding: 10px 16px;
}

.likhit-project-search input[type="search"]::placeholder {
	color: var(--wp--preset--color--subtle);
}

.likhit-project-search input[type="search"]:focus {
	border-color: var(--wp--preset--color--accent);
	outline: none;
}

.likhit-project-view-toggle {
	display: flex;
	gap: 6px;
}

.likhit-view-btn {
	align-items: center;
	background-color: transparent;
	border: 1px solid rgba(255, 255, 255, 0.3);
	color: var(--wp--preset--color--subtle);
	cursor: pointer;
	display: flex;
	height: 38px;
	justify-content: center;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
	width: 38px;
}

.likhit-view-btn:hover,
.likhit-view-btn.is-active {
	background-color: var(--wp--preset--color--accent);
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--contrast);
}

/* Grid view: exactly 3 columns on desktop, 2 on tablets, 1 on phones
   (the :not() outranks the core-generated auto-fill container rule).
   Shared by the Project page grid and the home portfolio grid. */
.likhit-project-grid:not(.is-list-view) {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1199px) {
	.likhit-project-grid:not(.is-list-view) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 781px) {
	.likhit-project-grid:not(.is-list-view) {
		grid-template-columns: 1fr;
	}
}

/* Card details column — markup is always rendered, but only the
   Project page list view reveals it. */
.likhit-project-card-details {
	display: none;
}

/* List view: one project per row — text column left, large cover
   right, vertically centered, generous spacing between rows. The
   frosted overlay caption and the surface panel are grid-view only. */
.likhit-project-grid.is-list-view {
	grid-template-columns: 1fr;
	row-gap: clamp(64px, 7vw, 120px);
}

.likhit-project-grid.is-list-view .likhit-project-card {
	display: grid;
	grid-template-columns: minmax(0, 9fr) minmax(0, 11fr);
	column-gap: clamp(32px, 5vw, 96px);
	align-items: center;
	width: 100%; /* auto margins disable grid-item stretch, so size explicitly */
	max-width: 1500px;
	margin-inline: auto;
	background-color: transparent !important; /* preset .has-surface-background-color carries !important */
}

.likhit-project-grid.is-list-view .likhit-project-card-caption {
	display: none;
}

.likhit-project-grid.is-list-view .likhit-project-card-image {
	grid-column: 2;
	grid-row: 1;
}

.likhit-project-grid.is-list-view .likhit-project-card-image img {
	aspect-ratio: 7 / 5;
}

.likhit-project-grid.is-list-view .likhit-project-card-details {
	display: block;
	grid-column: 1;
	grid-row: 1;
}

.likhit-project-grid.is-list-view .likhit-project-card-details h3 {
	font-size: clamp(2rem, 2.9vw, 3.5rem);
	line-height: 1.15;
	margin: 0 0 10px;
}

.likhit-project-card-status {
	font-size: clamp(1.125rem, 1.25vw, 1.5rem);
	margin: 0 0 28px;
}

.likhit-project-scope-label {
	color: var(--wp--preset--color--contrast);
	font-weight: 600;
	margin: 0 0 10px;
}

.likhit-project-scope-list {
	color: var(--wp--preset--color--subtle);
	list-style: disc;
	margin: 0 0 36px;
	padding-left: 1.4em;
}

.likhit-project-scope-list li {
	margin: 6px 0;
}

.likhit-project-card-more {
	margin: 0;
}

.likhit-project-card-more a {
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--large);
	text-decoration: none;
}

.likhit-project-card-more a:hover,
.likhit-project-card-more a:focus {
	color: var(--wp--preset--color--accent);
}

.likhit-project-card-more .likhit-arrow {
	display: inline-block;
	margin-left: 12px;
	transition: transform 0.2s ease;
}

.likhit-project-card-more a:hover .likhit-arrow,
.likhit-project-card-more a:focus .likhit-arrow {
	transform: translateX(6px);
}

/* Small screens: the list row stacks with the image on top. */
@media (max-width: 781px) {
	.likhit-project-grid.is-list-view {
		row-gap: 56px;
	}

	.likhit-project-grid.is-list-view .likhit-project-card {
		grid-template-columns: 1fr;
		row-gap: 20px;
	}

	.likhit-project-grid.is-list-view .likhit-project-card-image {
		grid-column: 1;
		grid-row: 1;
	}

	.likhit-project-grid.is-list-view .likhit-project-card-details {
		grid-column: 1;
		grid-row: 2;
	}
}

/* --------------------------------------------------------------
 * Category filter (Article listing)
 * -------------------------------------------------------------- */

.likhit-cat-filter {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.likhit-cat-filter ul.wp-block-categories {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.likhit-cat-filter ul.wp-block-categories li {
	margin: 0;
}

.likhit-cat-filter ul.wp-block-categories a {
	display: inline-block;
	border: 1px solid rgba(255, 255, 255, 0.6);
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--small);
	padding: 6px 18px;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.likhit-cat-filter ul.wp-block-categories a:hover,
.likhit-cat-filter ul.wp-block-categories a:focus,
.likhit-cat-filter ul.wp-block-categories a.is-active {
	background-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

/* --------------------------------------------------------------
 * Project details table (authored as a core Table block inside
 * post content, e.g. Appointment / Status / Client / Area rows)
 * -------------------------------------------------------------- */

.wp-block-post-content .wp-block-table table {
	border-collapse: collapse;
	width: 100%;
}

.wp-block-post-content .wp-block-table td {
	border: none;
	border-bottom: 1px solid #3a465e;
	font-size: var(--wp--preset--font-size--large);
	padding: 20px 16px;
	vertical-align: top;
}

.wp-block-post-content .wp-block-table tr:last-child td {
	border-bottom: none;
}

.wp-block-post-content .wp-block-table tr:first-child td {
	padding-top: 0;
}

.wp-block-post-content .wp-block-table td:nth-child(odd) {
	color: var(--wp--preset--color--subtle);
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
	width: 22%;
}

.wp-block-post-content .wp-block-table td:nth-child(even) {
	color: var(--wp--preset--color--contrast);
}

/* --------------------------------------------------------------
 * Misc
 * -------------------------------------------------------------- */

/* Post navigation / meta accents */
.likhit-meta-accent {
	color: var(--wp--preset--color--accent);
}

/* Horizontal rule used as divider */
.wp-block-separator {
	border-color: rgba(255, 255, 255, 0.25);
}

/* Reduce motion for users who prefer it. */
@media (prefers-reduced-motion: reduce) {
	.likhit-card-cover img,
	.wp-block-button__link {
		transition: none;
	}
}
