/* Photophil Pillars — frontend
 * Minimal: no backgrounds, thin gray dividers, brand-color accents on the
 * active tab. Tabs stack vertically when there isn't horizontal room.
 *
 * Selectors are intentionally over-specific (`.pp-pillars .pp-pillars__…`) on
 * elements where themes/Elementor commonly impose conflicting styles — this is
 * a deliberate choice over !important, so theme overrides remain possible.
 */

.pp-pillars {
	--pp-pillars-line-color: #d4d4d4;
	--pp-pillars-brand-color: #6dc206;
	--pp-pillars-line-width: 1px;
	--pp-pillars-active-underline: 2px;
	--pp-pillars-gap: 1.5rem;
	--pp-pillars-column-gap: 0;
	--pp-pillars-column-pad: 6%;
	--pp-pillars-tab-pad-y: 0.75rem;
	--pp-pillars-tab-pad-x: 1rem;
	--pp-pillars-tab-inset: 0.5rem;
	--pp-pillars-stack-breakpoint: 768px;

	/* Explicit body-text styling — theme/Elementor inheritance can't be relied on. */
	font-size: 19px;
	font-weight: 200;

	box-sizing: border-box;
	width: 100%;
}

.pp-pillars *,
.pp-pillars *::before,
.pp-pillars *::after {
	box-sizing: border-box;
}

/* ── Tab row ────────────────────────────────────────────────────────────── */

.pp-pillars__tabs {
	display: flex;
	align-items: stretch;
	border-bottom: var(--pp-pillars-line-width) solid var(--pp-pillars-line-color);
	margin-bottom: var(--pp-pillars-gap);
}

/* Defensive button reset — themes love to style <button>. We zero out
 * background, radius, shadow, transitions, and native appearance at every
 * interactive state so the cascade can't sneak anything back in. */
.pp-pillars .pp-pillars__tab,
.pp-pillars .pp-pillars__tab:hover,
.pp-pillars .pp-pillars__tab:focus,
.pp-pillars .pp-pillars__tab:active,
.pp-pillars .pp-pillars__tab:focus-visible {
	background: transparent;
	background-color: transparent;
	background-image: none;
	box-shadow: none;
	text-decoration: none;
	transform: none;
	transition: none;
	border-radius: 0;
	-webkit-appearance: none;
	appearance: none;
}

.pp-pillars__tab {
	flex: 1 1 0;
	min-width: 0;
	border: 0;
	border-right: var(--pp-pillars-line-width) solid var(--pp-pillars-line-color);
	padding: var(--pp-pillars-tab-pad-y) var(--pp-pillars-tab-pad-x);
	margin: var(--pp-pillars-tab-inset) 0;
	cursor: pointer;
	color: inherit;
	font: inherit;
	text-align: center;
	position: relative;
}

.pp-pillars__tab:last-child {
	border-right: 0;
}

.pp-pillars__tab:focus {
	outline: none;
}

.pp-pillars__tab:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Active-tab underline — brand color, thicker than the row border. */
.pp-pillars__tab--active::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: calc(-1 * var(--pp-pillars-tab-inset) - var(--pp-pillars-line-width));
	height: var(--pp-pillars-active-underline);
	background: var(--pp-pillars-brand-color);
}

/* Tab title (h3) — explicit Fraunces / 500. Two-class specificity beats most
 * theme h3 rules without resorting to !important. */
.pp-pillars .pp-pillars__tab-title {
	margin: 0;
	color: inherit;
	font-family: "Fraunces", serif;
	font-size: inherit;
	font-weight: 500;
	line-height: inherit;
	letter-spacing: inherit;
	opacity: 0.55;
	transition: opacity 0.15s ease, color 0.15s ease;
}

.pp-pillars .pp-pillars__tab:hover .pp-pillars__tab-title,
.pp-pillars .pp-pillars__tab:focus-visible .pp-pillars__tab-title,
.pp-pillars .pp-pillars__tab--active .pp-pillars__tab-title {
	opacity: 1;
	color: var(--pp-pillars-brand-color);
}

/* ── Panels ─────────────────────────────────────────────────────────────── */

/* Wrapper: a single-cell grid where every panel sits at the same grid-area.
 * The cell auto-sizes to the tallest panel, so the component height is locked
 * to the largest pillar and won't jump when the user switches tabs. */
.pp-pillars__panels {
	display: grid;
}

.pp-pillars__panel {
	grid-area: 1 / 1;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--pp-pillars-column-gap);
	visibility: hidden;
}

/* Active panel becomes visible. Inactive panels stay in flow (so they continue
 * to contribute to grid sizing) but are hidden visually and from screen
 * readers via aria-hidden + visibility:hidden. */
.pp-pillars__panel--active {
	visibility: visible;
}

.pp-pillars__panel:focus {
	outline: none;
}

.pp-pillars__panel:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Body text in the panel — explicit 19px / 200, two-class specificity to
 * beat theme paragraph styles. */
.pp-pillars .pp-pillars__text-column p {
	font-size: 19px;
	font-weight: 200;
}

.pp-pillars__text-column,
.pp-pillars__illustration-column {
	padding: var(--pp-pillars-column-pad);
}

/* Vertically center the text content within its column. The single inner
 * wrapper exists so paragraphs inside flow as block (with normal margin
 * collapsing) — flex items don't collapse margins, which would otherwise
 * double the spacing between paragraphs. */
.pp-pillars__text-column {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.pp-pillars__text-content > p:first-child {
	margin-top: 0;
}

.pp-pillars__text-content > p:last-child {
	margin-bottom: 0;
}

.pp-pillars__illustration-column {
	display: flex;
	align-items: center;
	justify-content: center;
}

.pp-pillars__illustration-image {
	display: block;
	max-width: 100%;
	height: auto;
}

/* ── Responsive: stack tabs vertically when horizontal room is tight ────── */

@media (max-width: 768px) {
	.pp-pillars__tabs {
		flex-direction: column;
		align-items: stretch;
	}

	.pp-pillars__tab {
		flex: 0 0 auto;
		border-right: 0;
		border-bottom: var(--pp-pillars-line-width) solid var(--pp-pillars-line-color);
		margin: 0;
	}

	.pp-pillars__tab:last-child {
		border-bottom: 0;
	}

	.pp-pillars__tab--active::after {
		bottom: 0;
	}

	.pp-pillars__panel {
		grid-template-columns: 1fr;
	}
}
