/* =========================================================================
   Akademia BHP UG – część otwarta: [bhp_wydarzenie], [bhp_wydarzenia], [bhp_formularz]
   Bazuje na zmiennych i resetach .bhpo z oferta.css.
   ========================================================================= */

.bhpw-wyd {
	--bhpw-card: linear-gradient(120deg, #f3f7fd 0%, #e7effb 100%);
	--bhpw-decor: #f4a340;
	--bhpw-tag-bg: #fff1dc;
	--bhpw-tag-fg: #9a5606;
	--bhpw-line: #dfe6f1;
	font-size: 16px;
}
.bhpw-wyd [hidden] { display: none !important; }

/* --- Przycisk obrysowany ------------------------------------------------- */
.bhpo .bhpo-btn--outline { background: #fff; color: var(--bhpo-primary); border: 1.5px solid var(--bhpo-primary); }
.bhpo .bhpo-btn--outline:hover { background: var(--bhpo-soft); color: var(--bhpo-primary); box-shadow: none; }
.bhpw-wyd .bhpo-btn { min-height: 50px; padding-left: 24px; padding-right: 24px; }
.bhpw-down { font-weight: 700; transition: transform .15s; }
.bhpo-btn--outline:hover .bhpw-down { transform: translateY(2px); }

/* --- Karta wydarzenia ---------------------------------------------------- */
.bhpw-event {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	background: var(--bhpw-card);
	border: 1px solid var(--bhpw-line);
	border-radius: 24px;
	overflow: hidden;
}
.bhpw-event-media { position: relative; min-height: 340px; background: #dfe7f2; overflow: hidden; }
.bhpw-event-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; max-width: none; }
.bhpw-event-media::after {
	content: ""; position: absolute; left: 0; bottom: 0; z-index: 1; pointer-events: none;
	width: 120px; height: 120px; background: var(--bhpw-decor); border-radius: 0 120px 0 0;
}
.bhpw-ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--bhpo-primary); opacity: .35; }
.bhpw-ph .bhpo-ico { width: 72px; height: 72px; stroke-width: 1.4; }

.bhpw-event-body { padding: 44px 48px; display: flex; flex-direction: column; align-items: flex-start; }
.bhpw-tag {
	display: inline-flex; align-items: center; gap: 7px;
	background: var(--bhpw-tag-bg); color: var(--bhpw-tag-fg);
	font-size: 13px; font-weight: 700; line-height: 1; padding: 8px 14px; border-radius: 999px; margin-bottom: 18px;
}
.bhpw-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--bhpw-decor); }
.bhpo .bhpw-event-title { font-size: 30px; line-height: 1.25; font-weight: 800; margin: 0 0 22px; letter-spacing: -.01em; }

.bhpo .bhpw-meta { display: flex !important; flex-wrap: wrap; gap: 12px 40px; margin: 0 0 20px !important; }
.bhpw-meta li { display: flex; align-items: flex-start; gap: 12px; font-size: 17px; line-height: 1.45; color: var(--bhpo-text); }
.bhpw-meta li.bhpw-meta--full { flex-basis: 100%; }
.bhpw-meta .bhpo-ico { width: 24px; height: 24px; color: var(--bhpo-primary); margin-top: 0; }

.bhpw-desc { color: var(--bhpo-muted); font-size: 16px; line-height: 1.65; max-width: 68ch; }
.bhpo .bhpw-desc p + p { margin-top: .6em; }

.bhpw-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-top: 28px; }
.bhpw-seats { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--bhpo-muted); }
.bhpw-seats .bhpo-ico { color: var(--bhpo-accent); }

/* --- Formularz na stronie ------------------------------------------------ */
.bhpw-form {
	margin-top: 24px;
	background: #fff;
	border: 1px solid var(--bhpw-line);
	border-radius: 24px;
	box-shadow: 0 12px 34px rgba(11, 45, 107, .08);
	padding: 36px 48px 40px;
	scroll-margin-top: var(--bhpo-scroll-offset);
}
.bhpw-form.is-entering { animation: bhpw-in .25s ease-out; }
@keyframes bhpw-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.bhpw-form-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 26px; }
.bhpo .bhpw-form-title { font-size: 26px; font-weight: 800; margin: 0; }
.bhpw-form-sub { font-size: 14px; color: var(--bhpo-muted); margin-top: 6px !important; }
.bhpo .bhpw-close {
	all: unset; flex: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
	font-size: 14px; font-weight: 600; color: var(--bhpo-primary);
	border: 1px solid var(--bhpw-line); border-radius: 999px; padding: 8px 16px;
}
.bhpo .bhpw-close:hover { background: var(--bhpo-soft); }
.bhpo .bhpw-close:focus-visible { outline: 3px solid rgba(31, 95, 209, .35); outline-offset: 2px; }
.bhpw-form .bhpo-form-actions { justify-content: flex-start; }
.bhpw-form .bhpo-success { justify-items: start; text-align: left; padding: 6px 0 0; grid-template-columns: auto 1fr; align-items: center; }
.bhpw-form .bhpo-success p { max-width: 60ch; }

/* --- Archiwum ------------------------------------------------------------ */
.bhpo .bhpw-arch { display: grid !important; gap: 24px; }
.bhpw-arch--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bhpw-arch--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bhpw-arch--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bhpw-card {
	display: flex; flex-direction: column;
	background: #fff; border: 1px solid var(--bhpw-line); border-radius: 18px; overflow: hidden;
	transition: box-shadow .2s, transform .2s;
}
.bhpw-card:hover { box-shadow: 0 10px 28px rgba(11, 45, 107, .10); transform: translateY(-2px); }
.bhpw-card-img { position: relative; aspect-ratio: 16 / 10; background: #dfe7f2; overflow: hidden; }
.bhpw-card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; }
.bhpw-card-img .bhpw-ph .bhpo-ico { width: 48px; height: 48px; }
.bhpw-card-body { flex: 1; display: flex; flex-direction: column; padding: 20px 22px 22px; }
.bhpo .bhpw-card-title { font-size: 18px; line-height: 1.3; font-weight: 700; margin: 0 0 10px; }
.bhpw-date { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--bhpo-muted); margin-bottom: 18px !important; }
.bhpw-date .bhpo-ico { color: var(--bhpo-primary); width: 17px; height: 17px; }
.bhpo .bhpw-card-link {
	margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 10px;
	border: 1px solid var(--bhpw-line); border-radius: 10px; padding: 11px 16px;
	font-size: 14px; font-weight: 700; color: var(--bhpo-primary); text-decoration: none;
	transition: background .15s, border-color .15s;
}
.bhpo .bhpw-card-link:hover { background: var(--bhpo-soft); border-color: #c9d5e8; }
.bhpw-card-link .bhpo-ico { width: 16px; height: 16px; transition: transform .15s; }
.bhpw-card-link:hover .bhpo-ico { transform: translateX(3px); }
.bhpw-more { text-align: center; margin-top: 28px !important; }

/* --- Brak wydarzeń ------------------------------------------------------- */
.bhpw-empty {
	display: flex; align-items: center; gap: 14px;
	background: var(--bhpo-soft); border: 1px dashed #c9d5e8; border-radius: 18px;
	padding: 26px 28px; color: var(--bhpo-muted); font-size: 16px;
}
.bhpw-empty .bhpo-ico { width: 28px; height: 28px; color: var(--bhpo-primary); }

/* --- Responsywność ------------------------------------------------------- */
@media (max-width: 980px) {
	.bhpw-event { grid-template-columns: 1fr; }
	.bhpw-event-media { min-height: 0; aspect-ratio: 16 / 9; }
	.bhpw-event-body { padding: 28px 24px 30px; }
	.bhpo .bhpw-event-title { font-size: 24px; }
	.bhpw-form { padding: 26px 22px 28px; }
	.bhpw-arch--3, .bhpw-arch--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	.bhpw-meta li { font-size: 16px; }
	.bhpw-actions .bhpo-btn { width: 100%; justify-content: center; }
	.bhpw-form-head { flex-direction: column-reverse; gap: 12px; }
	.bhpw-form-head .bhpw-close { align-self: flex-end; }
	.bhpo .bhpw-arch { grid-template-columns: 1fr; }
}
