/*
Theme Name: Finpact
Theme URI: https://partikule.net
Description: A custom FSE theme for Finpact. Optimized, lightweight, and tailored to specific design requirements.
Author: :Partikule
Author URI: https://partikule.net
Template: ollie
Version: 1.0.6
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: finpact
Tags: block-patterns, block-styles, custom-logo, custom-menu, editor-style, featured-images, full-site-editing, one-column, two-columns, wide-blocks
*/

/* Force correct color variable (workaround for theme.json merge bug)
:root {
	--wp--preset--color--main: #122820 !important;
}
*/

/* Global
---------------------------------------------------------------------------- */
.wp-block-image.is-style-rounded img {
	border-radius: 100%;
}

.entry-content {
	margin-block-start: 0;
}

@media (max-width: 781px) {
	main > section.wp-block-group.alignfull,
	main .is-layout-constrained > section.wp-block-group.alignfull,
	footer .wp-block-group.alignwide {
		padding-left: 0;
		padding-right: 0;
	}
	.hide-mobile {
		display: none !important;
	}
}

@media (min-width: 781px) {
	.display-mobile {
		display: none !important;
	}
}



/* Logo
---------------------------------------------------------------------------- */
.finpact-logo-wrapper {
	line-height: 1;
}

.finpact-logo-link {
	display: inline-block;
	line-height: 0;
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.finpact-logo-link:hover {
	/*opacity: 0.8;*/
}

.finpact-logo-link:hover svg {
	fill: var(--wp--preset--color--primary-alt);
}

.finpact-logo-link svg {
	display: block;
	height: auto;
	width: 140px;
	color: var(--wp--preset--color--main);
	transition: color 0.2s ease;
}

@media (min-width: 781px) {
	.finpact-logo-wrapper {
		padding-left: var(--wp--preset--spacing--x-large);
	}
	.finpact-logo-link svg {
		width: 180px;
	}
}

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

@media (max-width: 781px) {
	.finpact-navigation {
		gap: var(--wp--preset--spacing--small);
	}
	.wp-block-group.is-layout-flex > .wp-block-navigation {
		order: 2;
	}
	.wp-block-group.is-layout-flex > .ptk-lang-switcher {
		order: 1;
	}
}


/* Ptk Lang Switcher
---------------------------------------------------------------------------- */
.ptk-lang-switcher {
	display: inline-flex;
	gap: 0.5rem;
	align-items: center;
}

/* Language link base styles */
.ptk-lang-link {
	display: inline-block;
	padding: 0.25rem .5rem;
	color: var(--wp--preset--color--main);
	text-decoration: none;
	border: none;
	border-radius: 0;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 400;
	transition: all 0.2s ease;
	text-transform: uppercase;
}

/* Hover state */
.ptk-lang-link:hover {
	background-color: var(--wp--preset--color--primary-accent);
	color: var(--wp--preset--color--main);
}

/* Active/current language */
.ptk-lang-link[aria-current="true"] {
	background-color: var(--wp--preset--color--main-accent);
	color: var(--wp--preset--color--base);
	cursor: default;
}

/* List layout */
.ptk-layout-list ul {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 0;
	margin: 0;
	list-style: none;
}

.ptk-layout-list li {
	margin: 0;
}

/* Inline layout (default) */
.ptk-layout-inline {
	display: inline-flex;
	gap: 0.5rem;
}

/* Language-specific styling (optional) */
.ptk-lang-fr {
	/* French-specific styles if needed */
}

.ptk-lang-en {
	/* English-specific styles if needed */
}


/* Navigation - Current menu item
---------------------------------------------------------------------------- */
.wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container a {
	padding: 0.25rem .5rem;
	transition: background-color 0.2s ease;
}
.wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container a:hover {
	background-color: var(--wp--preset--color--primary-accent);
	text-decoration: none;
}
.wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container .current-menu-item > a {
	padding: 0.25rem .5rem;
	text-decoration: none;
	background-color: var(--wp--preset--color--main-accent);
	color: var(--wp--preset--color--base);
}


/* Hero Home - Background logo
---------------------------------------------------------------------------- */
.finpact-hero-home {
	position: relative;
	overflow: hidden;
}

.finpact-hero-home::after {
	content: "";
	position: absolute;
	bottom: -60px;
	right: 0;
	width: 980px;
	height: auto;
	aspect-ratio: 598.01 / 218.78;
	background-color: var(--wp--preset--color--primary-alt);
	-webkit-mask-image: url("assets/images/logo_finpact.svg");
	mask-image: url("assets/images/logo_finpact.svg");
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: bottom right;
	mask-position: bottom right;
	pointer-events: none;
	z-index: 0;
	will-change: transform;
}

.finpact-hero-home > * {
	position: relative;
	z-index: 1;
}

.finpact-hero-home h2 strong {
	font-weight: 800;
}

/* Hero Home with animated SVG
---------------------------------------------------------------------------- */
.finpact-hero-logo-wrapper {
	overflow: hidden;
	position: absolute;
	bottom: -15%;
	right: 0;
}

.finpact-hero-logo-svg {
	width: 100%;
	max-width: 1300px;
	height: auto;
	color: var(--wp--preset--color--primary-alt);
	z-index: 0;
}

.finpact-hero-logo-svg .letter {
	opacity: 0;
}
@media (min-width: 781px) {
	.finpact-hero-logo-wrapper {
		bottom: -55px;
	}
}


/* Hero Page - Background word
---------------------------------------------------------------------------- */
.finpact-hero-page {
	position: relative;
	overflow: hidden;
}

.finpact-hero-page > * {
	position: relative;
	z-index: 1;
}

.finpact-hero-page h2 strong {
	font-weight: 800;
}

.finpact-hero-bg-word {
	position: absolute;
	width: 100%;
	bottom: 0;
	right: var(--wp--preset--spacing--x-large);
	z-index: 0 !important;
	margin: 0;
	padding-right: 0;
	pointer-events: none;
	white-space: nowrap;
	text-align: right;
}

/* Hero Deal / Post
---------------------------------------------------------------------------- */

/* ========================================
   DEAL HERO (Single Deal Page)
   ======================================== */

.finpact-hero-post {
	position: relative;
	overflow: hidden;
}

/* Background image layer (absolute) */
.finpact-hero-post__background {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 60%;
	background-size: cover;
	background-position: center;
	z-index: 1;
}

/* Gradient overlay */
.finpact-hero-post__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
			to right,
			rgba(18, 40, 32, 1) 0%,
			rgba(18, 40, 32, 0.6) 40%,
			rgba(0, 0, 0, 0) 100%
	);
}

/* Logo positioned top-right */
.finpact-hero-post__logo {
	position: absolute;
	top: 10%;
	right: 10%;
	z-index: 10;
	max-width: 150px;
	max-height: 80px;
	width: auto;
	height: auto;
	object-fit: contain;
	filter: brightness(0) invert(1);
	pointer-events: none;
}

/* Content layer (relative, high z-index) */
.finpact-hero-post__content {
	position: relative;
	z-index: 10;
	padding: var(--wp--preset--spacing--xx-large) var(--wp--preset--spacing--x-large);
}

/* Meta text styling */
.finpact-hero-post__meta {
	margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
	.finpact-hero-post__background {
		display: none;
	}

	.finpact-hero-post__content {
		width: 100%;
	}
}



/* Team Section - Background logo with 90° rotation
---------------------------------------------------------------------------- */
.finpact-team-section {
	position: relative;
	overflow: hidden;
}

.finpact-team-section > * {
	position: relative;
	z-index: 1;
}

@media (min-width: 781px) {
	.finpact-team-section::after {
		content: "";
		position: absolute;
		bottom: 0;
		right: 0;
		width: auto;
		height: 90%;
		aspect-ratio: 598.01 / 218.78;
		background-color: var(--wp--preset--color--primary-alt);
		mask-image: url("assets/images/logo_finpact.svg");
		mask-size: contain;
		mask-repeat: no-repeat;
		mask-position: right;
		-webkit-mask-image: url("assets/images/logo_tranche.svg");
		-webkit-mask-size: contain;
		-webkit-mask-repeat: no-repeat;
		-webkit-mask-position: right;
		pointer-events: none;
		z-index: 0;
	}
}


/* Team Gallery - Hover zoom effect on images
---------------------------------------------------------------------------- */
.finpact-team-section .wp-block-gallery figure.is-style-rounded {
	position: relative;
	overflow: hidden;
	border-radius: 50%;
	aspect-ratio: 1 / 1;
}

.finpact-team-section .wp-block-gallery figure.is-style-rounded img {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	display: block !important;
	border-radius: 0 !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	object-fit: cover !important;
	object-position: center center !important;
	transition: transform 0.4s ease;
}

.finpact-team-section .wp-block-gallery figure.is-style-rounded:hover img {
	transform: scale(1.15);
}
.finpact-team-section .wp-block-gallery figure figcaption {
	display: none;
}


/* Founder Quote - Decorative opening quote
---------------------------------------------------------------------------- */
.finpact-quote {
	position: relative;
}

.finpact-quote::before {
	content: "\201C";
	display: block;
	font-size: 8rem;
	line-height: 0.2;
	font-family: var(--wp--preset--font-family--citation);
	color: var(--wp--preset--color--primary-accent);
}

.finpact-big-number {
	font-family: var(--wp--preset--font-family--heading);
	color: var(--wp--preset--color--primary-accent);
	font-weight: 800;
	line-height: 1;
}


/* Grid Table - Internal grid lines (no external borders)
---------------------------------------------------------------------------- */
.finpact-grid-table {
	--grid-border-color: var(--wp--preset--color--contrast-3, #ddd);
	--grid-columns: 4;
	gap: 0 !important;
}

.finpact-grid-table > * {
	padding: var(--wp--preset--spacing--medium);
	position: relative;
}

/* Responsive font size for header cells */
@media (max-width: 1024px) {
	.finpact-grid-table > .has-heading-font-family {
		word-break: break-word;
		font-size: var(--wp--preset--font-size--small) !important;
	}
	.finpact-grid-table > .has-heading-font-family .finpact-big-number {
		font-size: var(--wp--preset--font-size--large) !important;
	}
}

@media (max-width: 781px) {
	.finpact-grid-table {
		display:none !important;
		padding-left: 0;
		padding-right: 0;
	}
	.finpact-grid-table > .has-heading-font-family {
		font-size: var(--wp--preset--font-size--x-small) !important;
	}
	.finpact-grid-table > .has-heading-font-family .finpact-big-number {
		font-size: var(--wp--preset--font-size--medium) !important;
	}
	.finpact-grid-table > * {
		padding: var(--wp--preset--spacing--small);
	}
}

/* Right border on all cells except last column */
.finpact-grid-table > *:not(:nth-child(4n)) {
	border-right: 1px solid var(--grid-border-color);
}

/* Bottom border on all cells except last row (6 rows = 24 items, last row starts at 21) */
.finpact-grid-table > *:nth-child(-n+20) {
	border-bottom: 1px solid var(--grid-border-color);
}

@media (min-width: 781px) {
	.finpact-grid-table-mobile {
		display: none !important;
	}
}


/* Office Icons - Background circle with centered SVG icons
---------------------------------------------------------------------------- */
.office-icon-wrapper {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto;
}

.office-icon-wrapper::before {
	content: '';
	position: absolute;
	width: 200px;
	height: 200px;
	background-color: #ffffff;
	border-radius: 50%;
	z-index: 0;
	bottom:20px;
}

.office-icon-wrapper svg {
	position: relative;
	z-index: 1;
	width: 280px;
	height: 280px;
	display: block;
}

.office-icon-wrapper svg .cls-1 {
	stroke: #053f27;
}

/* Sections adjustments
---------------------------------------------------------------------------- */
@media (max-width: 781px) {
	.finpact-section-title-plus-one-column .wp-block-heading {
		text-align: left !important;
	}
	.finpact-section-title-text-logos > .wp-block-group{
		padding-left: var(--wp--preset--spacing--medium) !important;
		padding-right: var(--wp--preset--spacing--medium) !important;
	}
	.finpact-section-title-text-logos .is-layout-flex{
		gap: var(--wp--preset--spacing--small) !important;
	}
	.finpact-section-title-text-logos figure {
		display:flex;
		justify-content: center;
	}
	.finpact-section-offices > .wp-block-group {
		padding-left: var(--wp--preset--spacing--medium) !important;
		padding-right: var(--wp--preset--spacing--medium) !important;
	}
	.finpact-section-offices .wp-block-columns {

	}
	.finpact-section-title-alternate .wp-block-heading,
	.finpact-section-title-alternate .finpact-big-number
	{
		text-align: left !important;
	}
}

@media (min-width: 781px) {
	.finpact-section-picture-left-text-right__text {
		padding-right: var(--wp--preset--spacing--x-large);
	}
}

/* Footer
---------------------------------------------------------------------------- */
.finpact-footer {
	position: relative;
}
.finpact-footer p > a {
	text-decoration: none;
	padding: .25rem .5rem .25rem 0;
	transition: padding 0.2s ease, background-color 0.2s ease;
}
.finpact-footer p > a:hover {
	padding-left: .5rem;
	background-color: var(--wp--preset--color--primary-alt-accent);
}
.finpact-footer .icon-container svg{
	width: 160px;
}
.finpact-footer .wp-block-button__link {
	align-items: center;
}
.finpact-footer .wp-block-button__link svg{
	width: 24px;
	height: 24px;
	fill: var(--wp--preset--color--white);
}
@media (min-width: 781px) {
	.finpact-footer::after {
		content: "";
		position: absolute;
		height: 270px;
		right: 25px;
		bottom: 0;
		aspect-ratio: 598.01 / 218.78;
		background-color: var(--wp--preset--color--main);
		-webkit-mask-image: url("assets/images/logo_ligature.svg");
		mask-image: url("assets/images/logo_ligature.svg");
		-webkit-mask-size: contain;
		mask-size: contain;
		-webkit-mask-repeat: no-repeat;
		mask-repeat: no-repeat;
		-webkit-mask-position: bottom right;
		mask-position: bottom right;
		pointer-events: none;
		z-index: 0;
	}
}

