/*
Theme Name: Progrenera
Theme URI: https://progrenera.com/
Description: Progrenera Partners child theme for Twenty Twenty-Five. Core blocks only: brand palette, self-hosted Inter, block style variations and section patterns.
Author: Progrenera Partners
Template: twentytwentyfive
Version: 1.0.4
Requires at least: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: progrenera
*/

:root {
	--pg-rainbow: linear-gradient(135deg,#FF6B6B 0%,#4ECDC4 17%,#45B7D1 33%,#96CEB4 50%,#FECA57 67%,#FF9FF3 83%,#54A0FF 100%);
	--pg-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234ade80' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

/* Never let a stray wide element create sideways scrolling on phones. */
html, body { overflow-x: clip; }
h1, h2, h3, h4 { overflow-wrap: break-word; hyphens: manual; }

/* ---------- Gradient (rainbow) border: Group / Column / Button variation ---------- */
.is-style-gradient-border {
	border: 2px solid transparent !important;
	border-image: var(--pg-rainbow) 1 !important;
}

/* All buttons get the brand rainbow outline by default (as on the original site). */
.wp-block-button .wp-block-button__link {
	border: 2px solid transparent;
	border-image: var(--pg-rainbow) 1;
	transition: background-color .2s ease;
}
.wp-block-button.is-style-plain .wp-block-button__link {
	border: 0; border-image: none; background: transparent; padding-left: 0; padding-right: 0; text-decoration: underline;
}

/* ---------- Rounded solid card ---------- */
.is-style-card {
	background-color: var(--wp--preset--color--base);
	border-radius: 12px;
}

/* ---------- Checkmark list ---------- */
ul.is-style-checks { list-style: none; padding-left: 0 !important; }
ul.is-style-checks > li { position: relative; padding-left: 1.85em; margin-bottom: .45em; }
ul.is-style-checks > li::before {
	content: ""; position: absolute; left: 0; top: .32em;
	width: 1.05em; height: 1.05em;
	background: var(--pg-check) center / contain no-repeat;
}

/* ---------- Magenta accent bar under a heading ---------- */
.is-style-accent-bar::after {
	content: ""; display: block; width: 56px; height: 4px;
	margin-top: .6em; background: var(--wp--preset--color--magenta); border-radius: 2px;
}
.is-style-accent-bar.has-text-align-center::after { margin-left: auto; margin-right: auto; }

/* ---------- Eyebrow paragraph ---------- */
.is-style-eyebrow { font-size: var(--wp--preset--font-size--small); letter-spacing: .08em; text-transform: uppercase; color: var(--wp--preset--color--muted); }

/* ---------- Big step number ---------- */
.pg-number { font-size: clamp(2.25rem, 4vw, 3rem); font-weight: 700; line-height: 1; margin: 0; }

/* ---------- Header ---------- */
.pg-header { position: relative; z-index: 50; }
.pg-header .wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--wp--preset--color--base); color: var(--wp--preset--color--contrast);
	padding: var(--wp--preset--spacing--50);
}
.pg-header .wp-block-site-logo img { height: auto; }

/* TranslatePress switcher in header: match the dark design */
.pg-header .trp-language-switcher, .pg-footer .trp-language-switcher { --bg: #0b1020; --bg-hover: #1e293b; --text: #fff; --text-hover: #fff; --border: 1px solid #334155; }
.pg-header .trp-block-container, .pg-header .trp-language-switcher { margin: 0; }

/* Header search */
.pg-header .pg-header-search .wp-block-search__inside-wrapper {
	border: 1px solid #334155;
	border-radius: 6px;
	background: #1e293b;
	overflow: hidden;
}
.pg-header .pg-header-search .wp-block-search__input {
	background: transparent;
	border: 0;
	color: #fff;
	padding: .4em .75em;
	min-width: 0;
}
.pg-header .pg-header-search .wp-block-search__input::placeholder { color: #94a3b8; }
.pg-header .pg-header-search .wp-block-search__button {
	background: transparent;
	border: 0;
	border-image: none;
	color: #fff;
	padding: .4em .6em;
	margin: 0;
}
@media (max-width: 1000px) {
	.pg-header .pg-header-search { display: none; }
}


/* ---------- Footer ---------- */
.pg-footer a { text-decoration: none; }
.pg-footer a:hover { text-decoration: underline; }

/* ---------- Forms (Fluent Forms) on dark ---------- */
.fluentform .ff-el-form-control {
	background: var(--wp--preset--color--base) !important; color: #fff !important;
	border: 1px solid var(--wp--preset--color--surface-2) !important; border-radius: 6px !important; padding: .75rem 1rem !important;
}
.fluentform .ff-el-form-control::placeholder { color: #94a3b8; }
.fluentform .ff-el-input--label label, .fluentform .ff-el-form-check-label { color: #fff !important; }
.fluentform .ff-btn-submit {
	background: var(--wp--preset--color--base) !important; color: #fff !important; font-weight: 700 !important;
	border: 2px solid transparent !important; border-image: var(--pg-rainbow) 1 !important; border-radius: 0 !important; padding: .75rem 1.5rem !important;
}
.fluentform .ff-btn-submit:hover { background: var(--wp--preset--color--surface) !important; }
.fluentform .ff-el-is-error .text-danger, .fluentform .error { color: #fca5a5 !important; }
.ff-message-success { background: var(--wp--preset--color--surface) !important; color: #fff !important; border: 1px solid #4ade80 !important; }

/* ---------- Post content readability ---------- */
.single .wp-block-post-content p, .single .wp-block-post-content li { color: #e2e8f0; }
.single .wp-block-post-content h2 { margin-top: 2.5rem; }
.single .wp-block-post-content h3 { margin-top: 2rem; }
.pg-post-card .wp-block-post-featured-image img { aspect-ratio: 16/9; object-fit: cover; }

/* ---------- Section rhythm: full-width sections butt against each other ---------- */
.wp-block-post-content > .alignfull,
main > .alignfull,
main > .wp-block-post-content { margin-top: 0 !important; margin-bottom: 0 !important; }
main.wp-block-group { margin-top: 0; }
.wp-site-blocks > footer, .wp-site-blocks > main { margin-top: 0; }

/* Linked headings (category cards, post titles) stay white */
.wp-block-heading a, .wp-block-post-title a { color: inherit; text-decoration: none; }
.wp-block-heading a:hover, .wp-block-post-title a:hover { text-decoration: underline; text-decoration-color: var(--wp--preset--color--accent-light); }

/* Short centred accent rule (Contact hero) */
.wp-block-separator.is-style-default { width: 72px; border-width: 2px 0 0; margin-left: auto; margin-right: auto; opacity: 1; }

/* Long URLs in article sources must wrap on phones */
.wp-block-post-content a { overflow-wrap: anywhere; }

/* ---------- Header ---------- */
@media (min-width: 782px) { .pg-header .pg-header-cta { margin-left: var(--wp--preset--spacing--40); } .pg-header .alignwide > .wp-block-group { margin-left: auto; } }
/* ---------- Header on small screens ---------- */
.pg-header .wp-block-site-logo { flex-shrink: 0; }
@media (max-width: 781px) {
	.pg-header .wp-block-site-logo img { width: 150px !important; }
	.pg-header .alignwide { flex-wrap: wrap !important; row-gap: .75rem; }
	.pg-header-cta { flex-basis: 100%; justify-content: stretch; }
	.pg-header-cta .wp-block-button { width: 100%; text-align: center; }
	.pg-header-cta .wp-block-button__link { font-size: .875rem; padding: .5rem 1rem; }
	.pg-header .trp-language-switcher .trp-language-item-name { display: none; }
}

.wp-block-post-terms a { text-decoration: none; color: var(--wp--preset--color--accent-light); }

/* Tablet / small laptop: keep the header on one line */
.pg-header-cta .wp-block-button__link, .pg-header .wp-block-navigation-item__label { white-space: nowrap; }
@media (min-width: 782px) and (max-width: 1199px) {
	.pg-header .trp-language-switcher .trp-language-item-name { display: none; }
	.pg-header .wp-block-navigation { --wp--style--block-gap: 1rem; gap: 1rem; }
	.pg-header .wp-block-site-logo img { width: 160px !important; }
	.pg-header-cta .wp-block-button__link { font-size: .875rem; padding: .55rem .9rem; }
}

/* Use the hamburger menu up to 999px (core switches at 600px) */
@media (min-width: 600px) and (max-width: 999px) {
	.pg-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.pg-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}

/* Navigation: no focus outline box on click; underline shows focus instead */
.wp-block-navigation a.wp-block-navigation-item__content:focus,
.wp-block-navigation a.wp-block-navigation-item__content:focus-visible,
.wp-block-navigation .wp-block-navigation-item__content:focus {
	outline: none !important;
	box-shadow: none !important;
	border-radius: 0;
	text-decoration: underline;
	text-underline-offset: .25em;
}

/* Header v2: English only for now (hide language switchers), lighter and more spacious */
.pg-header .trp-block-container,
.pg-header .trp-language-switcher,
.pg-header [class*="trp-language-switcher"],
#trp-floater-ls,
.trp-floating-switcher { display: none !important; }
.pg-header .wp-block-navigation { font-size: 15px; }
.pg-header .wp-block-navigation .wp-block-navigation-item__content { padding: .25em 0; }
.pg-header .alignwide > .wp-block-group { gap: 2.25rem !important; }
.pg-header .alignwide { gap: 2rem; }
.pg-header .pg-header-search { width: 170px !important; max-width: 170px; }
.pg-header .pg-header-search .wp-block-search__inside-wrapper { padding: 0 !important; border-radius: 6px; }
.pg-header .pg-header-search .wp-block-search__input { font-size: 14px; padding: .4em .7em; height: auto; }
.pg-header .pg-header-search .wp-block-search__button { padding: .3em .6em; }
.pg-header .pg-header-search .wp-block-search__button svg { width: 18px; height: 18px; }
.pg-header-cta { margin-left: .5rem; }
.pg-header-cta .wp-block-button__link { font-size: 14px !important; padding: .55rem 1rem !important; }
