/* Framex theme additions. The original template CSS (custom.css) stays untouched. */

.page-category-list ul li.active a{
    color: var(--primary-color);
    font-weight: 600;
}

/* Accessibility: skip link (visible on keyboard focus only) */
.fx-skip-link:focus{
	position: fixed;
	top: 10px;
	left: 10px;
	z-index: 100000;
	padding: 10px 16px;
	background: var(--accent-color);
	color: var(--primary-color);
	border-radius: 6px;
}

/* Comment form note (Fob Comment plugin): readable on the cream background */
.fob-comment-form-note{
	color: var(--text-color);
}

/* Accessibility: no preloader, scroll reveal or smooth scroll for people who ask for reduced motion */
@media (prefers-reduced-motion: reduce){
	.preloader{
		display: none !important;
	}

	html{
		scroll-behavior: auto !important;
	}

	.wow{
		visibility: visible !important;
		animation: none !important;
	}
}

/* Accessibility: visible keyboard focus (the original CSS removes the outline on links and buttons) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible{
	outline: 2px solid var(--primary-color) !important;
	outline-offset: 3px;
}

.dark-section a:focus-visible,
.dark-section button:focus-visible,
.dark-section input:focus-visible,
.dark-section textarea:focus-visible,
.main-footer a:focus-visible,
.main-footer-metal a:focus-visible,
.main-footer-stone a:focus-visible,
.preloader a:focus-visible{
	outline-color: var(--white-color) !important;
}

/************************************/
/***  Comments (Fob Comment plugin) ***/
/************************************/

/* Same look as the contact form box: white card, cream fields, placeholders instead of labels */
.fob-comment-form-section{
	background-color: var(--secondary-color);
	border-radius: 20px;
	padding: 50px;
	margin-top: 60px;
}

.fob-comment-list-section{
	margin-top: 60px;
}

.fob-comment-title{
	font-size: 46px;
	font-weight: 500;
	line-height: 1.1em;
	letter-spacing: -0.02em;
	color: var(--primary-color);
	margin: 0 0 20px;
}

.fob-comment-form-note{
	font-size: 16px;
	line-height: 1.6em;
	margin-bottom: 30px;
}

.fob-comment-form .row{
	--bs-gutter-x: 30px;
}

.fob-comment-form .mb-3{
	margin-bottom: 24px !important;
}

/* labels stay for screen readers only */
.fob-comment-form .form-label{
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.fob-comment-form .form-check .form-check-label{
	position: static;
	width: auto;
	height: auto;
	margin: 0;
	overflow: visible;
	clip: auto;
	white-space: normal;
}

.fob-comment-form .form-control{
	font-family: var(--default-font);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5em;
	color: var(--primary-color);
	background-color: var(--bg-color);
	border: none;
	border-radius: 10px;
	padding: 18px 20px;
	outline: none;
	box-shadow: none;
}

.fob-comment-form .form-control::placeholder{
	color: var(--text-color);
}

.fob-comment-form textarea.form-control{
	min-height: 130px;
	resize: none;
}

.fob-comment-form .form-check{
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding-left: 0;
	margin: 0;
	cursor: pointer;
}

.fob-comment-form .form-check-input{
	flex: 0 0 22px;
	width: 22px;
	height: 22px;
	margin: 0;
	background-color: var(--bg-color);
	border: none;
	border-radius: 6px;
	box-shadow: none;
	cursor: pointer;
}

.fob-comment-form .form-check-input:checked{
	background-color: var(--accent-color);
	--bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23181818' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

.fob-comment-form .form-check-label{
	font-size: 16px;
	line-height: 1.5em;
	color: var(--text-color);
}

/* Submit button = .btn-default */
.fob-comment-form .btn.btn-primary{
	margin-bottom: 0 !important;
	position: relative;
	display: inline-block;
	font-family: var(--default-font);
	font-size: 16px;
	font-weight: 500;
	line-height: 1em;
	text-transform: capitalize;
	color: var(--primary-color);
	background: var(--accent-color);
	border: none;
	border-radius: 100px;
	padding: 17px 54px 17px 24px;
	overflow: hidden;
	box-shadow: none;
	transition: all 0.4s ease-in-out;
	z-index: 1;
}

.fob-comment-form .btn.btn-primary:hover,
.fob-comment-form .btn.btn-primary:focus{
	color: var(--white-color);
	background: var(--accent-color);
}

.fob-comment-form .btn.btn-primary::before{
	content: '';
	position: absolute;
	top: 50%;
	right: 24px;
	transform: translateY(-50%);
	width: 20px;
	height: 20px;
	background: url('../images/arrow-primary.svg') center center / cover no-repeat;
	transition: all 0.4s ease-in-out;
}

.fob-comment-form .btn.btn-primary:hover::before{
	transform: translateY(-50%) rotate(45deg);
	filter: brightness(0) invert(1);
}

.fob-comment-form .btn.btn-primary::after{
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 0;
	height: 100%;
	background: var(--primary-color);
	transition: all 0.4s ease-in-out;
	z-index: -1;
}

.fob-comment-form .btn.btn-primary:hover::after{
	right: auto;
	left: 0;
	width: 100%;
}

/* Comment list */
.fob-comment-item-inner{
	display: flex;
	gap: 20px;
	background: var(--white-color);
	border-radius: 20px;
	padding: 30px;
	margin-bottom: 20px;
}

.fob-comment-item-avatar{
	flex-shrink: 0;
}

.fob-comment-item-avatar img{
	display: block;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	object-fit: cover;
}

.fob-comment-item-author{
	font-weight: 500;
	color: var(--primary-color);
}

.fob-comment-item-date{
	font-size: 14px;
}

.fob-comment-item-content{
	margin-top: 10px;
}

.fob-comment-item-reply{
	font-size: 15px;
	font-weight: 500;
	color: var(--primary-color);
	text-decoration: underline;
	text-decoration-color: var(--accent-color);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
	transition: all 0.3s ease-in-out;
}

.fob-comment-item-reply:hover{
	color: var(--text-color);
}

@media only screen and (max-width: 991px){
	.fob-comment-form-section{
		padding: 30px 20px;
		margin-top: 40px;
	}

	.fob-comment-list-section{
		margin-top: 40px;
	}

	.fob-comment-title{
		font-size: 34px;
	}

	.fob-comment-item-inner{
		padding: 20px;
	}
}

/************************************/
/***        Sub menu (desktop)     ***/
/************************************/

.main-menu ul ul{
	width: 250px;
	top: calc(100% + 10px);
	padding: 10px;
	background: var(--white-color);
	border: 1px solid var(--divider-color);
	border-radius: 16px;
	box-shadow: 0 20px 40px rgba(24, 24, 24, 0.16);
	transform: translateY(8px);
	transform-origin: top;
}

/* invisible bridge so the pointer can cross the gap without closing the menu */
.main-menu ul ul::before{
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 100%;
	height: 12px;
}

.main-menu ul li:hover > ul,
.main-menu ul li:focus-within > ul{
	visibility: visible;
	opacity: 1;
	transform: translateY(0);
	padding: 10px;
}

.main-menu ul ul ul{
	top: -11px;
	left: calc(100% + 10px);
}

.main-menu ul ul ul::before{
	top: 0;
	bottom: 0;
	left: -12px;
	right: auto;
	width: 12px;
	height: auto;
}

.main-menu ul ul li + li{
	margin-top: 2px;
}

.main-menu ul ul li a,
header.main-header-metal .main-menu ul ul li a{
	display: block;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.3em;
	color: var(--primary-color);
	padding: 11px 14px !important;
	border-radius: 10px;
	transition: background-color 0.25s ease-in-out, color 0.25s ease-in-out, transform 0.25s ease-in-out;
}

.main-menu ul ul li a:hover,
.main-menu ul ul li a:focus,
.main-menu ul ul li.active > a,
header.main-header-metal .main-menu ul ul li a:hover,
header.main-header-metal .main-menu ul ul li a:focus{
	color: var(--primary-color);
	background-color: var(--bg-color);
	padding: 11px 14px !important;
	transform: translateX(3px);
}

.main-menu ul ul li.active > a{
	background-color: var(--accent-color);
	transform: none;
}

.main-menu ul li.submenu ul li.submenu > a:after{
	margin-top: 1px;
}

/* language switcher: compact */
.main-menu ul li.language-switcher > ul{
	width: 170px;
	left: auto;
	right: 0;
}

/************************************/
/***   Form messages & field errors ***/
/************************************/

.fx-form-message{
	display: flex;
	align-items: flex-start;
	gap: 12px;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.5em;
	text-align: left;
	margin-top: 24px;
	padding: 16px 20px;
	border-radius: 12px;
	animation: fxMessageIn 0.35s ease-out;
}

.fx-form-message[hidden]{
	display: none;
}

.fx-form-message i{
	flex: 0 0 auto;
	font-size: 20px;
	line-height: 1.5em;
}

.fx-form-message--success{
	color: var(--primary-color);
	background: rgba(237, 199, 1, 0.18);
	border: 1px solid rgba(237, 199, 1, 0.55);
}

.fx-form-message--success i{
	color: #b39500;
}

.fx-form-message--error{
	color: #b42318;
	background: rgba(230, 87, 87, 0.1);
	border: 1px solid rgba(230, 87, 87, 0.4);
}

.fx-form-message--error i{
	color: var(--error-color);
}

@keyframes fxMessageIn{
	from{
		opacity: 0;
		transform: translateY(-6px);
	}
	to{
		opacity: 1;
		transform: translateY(0);
	}
}

/* inline field errors */
.contact-form .help-block.with-errors,
.fx-form .help-block.with-errors{
	margin-top: 8px;
	padding-left: 4px;
}

.help-block.with-errors ul li::before{
	content: none;
}

.contact-form .form-control.is-invalid,
.fob-comment-form .form-control.is-invalid{
	box-shadow: inset 0 0 0 1px var(--error-color);
	background-image: none;
}

.contact-form .form-control.is-invalid:focus{
	box-shadow: inset 0 0 0 1px var(--error-color);
}

/* newsletter (dark footer): message sits under the field */
.footer-newsletter-form .newsletter-message,
.footer-newsletter-form-stone .newsletter-message{
	margin-top: 16px;
	padding: 12px 16px;
	font-size: 14px;
}

.footer-newsletter-form .fx-form-message--success,
.footer-newsletter-form-stone .fx-form-message--success{
	color: var(--white-color);
	background: rgba(237, 199, 1, 0.16);
	border-color: rgba(237, 199, 1, 0.5);
}

.footer-newsletter-form .fx-form-message--success i,
.footer-newsletter-form-stone .fx-form-message--success i{
	color: var(--accent-color);
}

.footer-newsletter-form .fx-form-message--error,
.footer-newsletter-form-stone .fx-form-message--error{
	color: #ffb4ab;
	background: rgba(230, 87, 87, 0.16);
	border-color: rgba(230, 87, 87, 0.5);
}

.footer-newsletter-form .form-control.is-invalid{
	box-shadow: inset 0 0 0 1px var(--error-color);
}

.footer-newsletter-form-stone .form-group:has(.is-invalid){
	box-shadow: inset 0 0 0 1px var(--error-color);
}

/* contact form terms checkbox */
.contact-form label[for$="-terms"]{
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 15px;
	line-height: 1.5em;
}

.contact-form label[for$="-terms"] input{
	margin-top: 4px;
}

@media (prefers-reduced-motion: reduce){
	.fx-form-message{
		animation: none;
	}
}

/* Comment form: Bootstrap validation states match the contact form (no green tick, inline red text) */
.fob-comment-form .form-control.is-valid,
.fob-comment-form .form-control.is-invalid{
	background-image: none;
	padding-right: 20px;
}

.fob-comment-form .form-control.is-valid{
	box-shadow: none;
}

.fob-comment-form .invalid-feedback{
	display: block;
	width: 100%;
	margin-top: 8px;
	padding-left: 4px;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4em;
	color: var(--error-color);
}

.fob-comment-item-author{
	font-size: 16px;
	line-height: 1.3em;
	margin: 0;
}

.fob-comment-item-reply{
	font-style: normal;
}

/* Toast (Botble Toastify): dark card with a yellow icon, like the rest of the theme */
.toastify{
	display: flex !important;
	align-items: center;
	gap: 12px;
	max-width: min(420px, calc(100vw - 32px));
	padding: 16px 48px 16px 18px !important;
	font-family: var(--default-font);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.4em;
	color: var(--white-color) !important;
	background: var(--primary-color) !important;
	border-radius: 14px !important;
	border-left: 4px solid var(--accent-color);
	box-shadow: 0 16px 40px rgba(24, 24, 24, 0.28) !important;
}

.toastify .toastify-icon{
	flex: 0 0 auto;
	display: flex;
	color: var(--accent-color);
}

.toastify.toastify-error{
	border-left-color: var(--error-color);
}

.toastify.toastify-error .toastify-icon{
	color: var(--error-color);
}

.toastify .toast-close{
	color: rgba(255, 255, 255, 0.7);
	background: transparent;
	border: none;
}

.toastify .toast-close:hover{
	color: var(--white-color);
}

.footer-newsletter-form .form-group .newsletter-message{
	margin-top: 12px;
}

.footer-newsletter-form .form-group .newsletter-message + .btn-default{
	margin-top: 16px;
}

/* FAQ block placed inside a detail page's content (project / service / post / team): the original has it as a
   sibling of the entry, here it is rendered inside it, so restore its spacing and neutralise the entry's heading rules */
[class*="-entry"] .page-single-faqs{
	margin-top: 60px;
}

.page-single-faqs .accordion-header{
	margin: 0;
	font-size: inherit;
	line-height: inherit;
}

.page-single-faqs .accordion-body p,
.page-single-faqs .accordion-body ul{
	margin-bottom: 0;
}

@media only screen and (max-width: 991px){
	[class*="-entry"] .page-single-faqs{
		margin-top: 40px;
	}
}

/* "Cancel reply" link next to the form title */
.fob-comment-form-title{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 20px;
}

.cancel-comment-reply-link{
	display: inline-flex;
	align-items: center;
	font-size: 14px;
	font-weight: 500;
	line-height: 1em;
	letter-spacing: 0;
	text-transform: capitalize;
	color: var(--primary-color);
	background: var(--bg-color);
	border-radius: 100px;
	padding: 10px 18px;
	text-decoration: none;
	transition: all 0.3s ease-in-out;
}

.cancel-comment-reply-link::before{
	content: '\f00d';
	font-family: 'Font Awesome 7 Free';
	font-weight: 900;
	font-size: 12px;
	margin-right: 8px;
}

.cancel-comment-reply-link:hover,
.cancel-comment-reply-link:focus{
	text-decoration: none;
	color: var(--primary-color);
	background: var(--accent-color);
}

/* Team detail > Contact info: links use the theme colour (they were Bootstrap blue) */
.team-contact-content p a{
	color: var(--primary-color);
	transition: all 0.3s ease-in-out;
}

.team-contact-content p a:hover,
.team-contact-content p a:focus{
	color: var(--accent-color);
}
