/* Partner Tiles for Elementor — structural styles.
   Per-instance sizes/colors are supplied as CSS custom properties on
   .pp-tiles-widget by the widget's Style controls, so this file stays
   the same across every instance on the page. */

.pp-tiles-widget {
	--pp-collapsed: 210px;
	--pp-expanded: 420px;
	--pp-duration: 500ms;
	--pp-accent: #EFA96B;
	--pp-accent-deep: #E38E45;
}

.pp-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 34px;
	align-items: start;
}

/* =====================================================================
   Click-to-expand tile.

   .pp-tile animates its own height (collapsed -> expanded) when the
   .is-open class is toggled by JS on click. There is no hover dependency
   anywhere, so nothing about the animation can interrupt or re-trigger
   itself.

   Inside it:
     .pp-toggle       - a real <button> covering the tile, the click
                         target for expand/collapse. z-index: 1.
     .pp-cta-overlay  - a SIBLING of .pp-toggle (not nested inside it,
                         so it's valid HTML with no button-in-button),
                         pinned to the bottom, z-index: 5 so it takes
                         the click in that strip.

   Both live inside .pp-tile, which has overflow:hidden — so neither can
   ever render outside the box's current bounds, collapsed or expanded.
   ===================================================================== */
.pp-tile {
	position: relative;
	height: var(--pp-collapsed);
	border-radius: 18px;
	overflow: hidden;
	background: #0E1B2E;
	box-shadow: 0 16px 34px -16px rgba(14, 27, 46, 0.32);
	transition: height var(--pp-duration) cubic-bezier(.65, 0, .35, 1);
}
.pp-tile.is-open {
	height: var(--pp-expanded);
}

.pp-toggle {
	position: absolute;
	inset: 0;
	z-index: 1;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	font: inherit;
	color: inherit;
	text-align: left;
}
.pp-toggle:focus-visible {
	outline: 3px solid var(--pp-accent);
	outline-offset: -3px;
}

.pp-full {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: var(--pp-expanded);
	display: block;
}
.pp-full img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* shadow marking the cut-off edge while collapsed */
.pp-tile::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 26px;
	background: linear-gradient(180deg, rgba(14, 27, 46, 0) 0%, rgba(14, 27, 46, 0.30) 100%);
	z-index: 2;
	transition: opacity .4s ease;
}
.pp-tile.is-open::after {
	opacity: 0;
}

/* accent line marking the cut-off edge while collapsed */
.pp-tile::before {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 4px;
	background: linear-gradient(90deg, var(--pp-accent-deep), var(--pp-accent));
	box-shadow: 0 -2px 10px rgba(227, 142, 69, 0.5);
	z-index: 3;
	transition: opacity .3s ease, transform .4s ease;
}
.pp-tile.is-open::before {
	opacity: 0;
	transform: translateY(6px);
}

.pp-hint {
	position: absolute;
	right: 16px;
	bottom: 16px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(14, 27, 46, 0.72);
	color: #FFFFFF;
	font-weight: 600;
	font-size: 11.5px;
	letter-spacing: .05em;
	text-transform: uppercase;
	padding: 8px 14px;
	border-radius: 100px;
	backdrop-filter: blur(2px);
	transition: opacity .25s ease;
	pointer-events: none;
}
.pp-hint svg {
	width: 12px;
	height: 12px;
}
.pp-tile.is-open .pp-hint {
	opacity: 0;
}

/* ===== CTA overlay: sibling of .pp-toggle, not nested inside it.
   Clipped by .pp-tile's overflow:hidden at all times, and only becomes
   visible/clickable once the expand transition has fully finished. ===== */
.pp-cta-overlay {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	z-index: 5;
	display: flex;
	justify-content: center;
	padding: 20px 16px 22px;
	background: linear-gradient(180deg, rgba(14, 27, 46, 0) 0%, rgba(14, 27, 46, 0.55) 100%);
	opacity: 0;
	transform: translateY(10px);
	pointer-events: none;
	transition: opacity .25s ease, transform .25s ease;
}
.pp-tile.is-open .pp-cta-overlay {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
	transition-delay: var(--pp-duration), var(--pp-duration); /* wait for the box to fully open first */
}

.pp-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
	font-size: 13.5px;
	letter-spacing: .02em;
	color: #0E1B2E;
	background: var(--pp-accent);
	border: none;
	cursor: pointer;
	padding: 11px 24px;
	border-radius: 100px;
	transition: background .2s ease, transform .2s ease;
	box-shadow: 0 8px 18px -8px rgba(227, 142, 69, 0.55);
	text-decoration: none;
}
.pp-btn:hover {
	background: var(--pp-accent-deep);
	color: #FFFFFF;
}
.pp-btn:hover,
.pp-btn:focus-visible {
	transform: translateY(-2px);
}
.pp-btn svg {
	width: 15px;
	height: 15px;
}

@media (max-width: 767px) {
	.pp-grid {
		grid-template-columns: 1fr;
	}
}

/* ===== Popup / lightbox ===== */
.pp-overlay {
	position: fixed;
	inset: 0;
	background: rgba(14, 27, 46, 0.82);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 32px;
	z-index: 999999;
	opacity: 0;
	visibility: hidden;
	transition: opacity .3s ease;
}
.pp-overlay.is-open {
	opacity: 1;
	visibility: visible;
}
.pp-modal {
	position: relative;
	max-width: min(720px, 92vw);
	max-height: 88vh;
	background: #FFFFFF;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.5);
	transform: scale(.94) translateY(10px);
	transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
}
.pp-overlay.is-open .pp-modal {
	transform: scale(1) translateY(0);
}
.pp-modal img {
	display: block;
	width: 100%;
	height: 100%;
	max-height: 88vh;
	object-fit: contain;
}
.pp-close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: none;
	background: rgba(14, 27, 46, 0.75);
	color: #FFFFFF;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .2s ease;
}
.pp-close:hover {
	background: var(--pp-accent-deep);
}
