/* Note: cards are links, and Elementor resets link shadows with `.elementor a`, so card rules use `.elementor a.safe-…` to win. */
/* SAFE Talks: card behaviour for the Elementor loop-item templates.
   Sizes, colours and fonts are set in Elementor; this adds hover effects and keeps cards equal height. */

/* Make each loop item fill its grid cell so cards in a row are the same height */
.e-loop-item:has(.safe-tt-card) > .elementor,
.e-loop-item:has(.safe-ut-card) > .elementor { height: 100%; }
.safe-tt-card, .safe-ut-card { height: 100%; text-decoration: none !important; }

/* ---------- Upcoming talk card ---------- */
.safe-ut-card { transition: background-color .15s cubic-bezier(.4,0,.2,1); }
.elementor a.safe-ut-card:hover, .elementor a.safe-ut-card:focus-visible, .safe-ut-card:hover { background-color: #D9EAFC !important; }
.safe-ut-card .safe-ut-date { flex: 0 0 auto; }
.safe-ut-card .safe-ut-info { flex: 1 1 0; min-width: 0; }
.safe-ut-card .safe-ut-register { margin-top: auto; }
.safe-ut-card .safe-ut-register .elementor-heading-title { display: inline-flex; align-items: center; gap: 4px; }
.safe-ut-card .safe-ut-register .elementor-heading-title::after {
	content: ""; width: 16px; height: 16px; flex: 0 0 16px; background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h10v10'/%3E%3Cpath d='M7 17 17 7'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h10v10'/%3E%3Cpath d='M7 17 17 7'/%3E%3C/svg%3E") center / contain no-repeat;
}
.safe-ut-card:hover .safe-ut-register .elementor-heading-title { text-decoration: underline; }

/* ---------- Topic card ---------- */
.elementor a.safe-tt-card, a.safe-tt-card {
	box-shadow: 0 1px 2px rgba(27, 44, 77, .06), 0 12px 28px -18px rgba(27, 44, 77, .35);
	transition: all .15s cubic-bezier(.4,0,.2,1);
}
@media (hover: hover) {
	.elementor a.safe-tt-card:hover, a.safe-tt-card:hover {
		transform: translateY(-4px);
		box-shadow: 0 2px 4px rgba(27, 44, 77, .08), 0 24px 44px -24px rgba(27, 44, 77, .45);
	}
	.safe-tt-card:hover .safe-tt-view .elementor-heading-title::after { transform: translateX(4px); }
}
.safe-tt-card .safe-tt-img img { aspect-ratio: 1 / 1; object-fit: contain; }
.safe-tt-card .safe-tt-text { flex: 1 1 auto; min-width: 0; }
.safe-tt-card .safe-tt-excerpt { flex: 1 1 auto; }
.safe-tt-card .safe-tt-view .elementor-heading-title { display: inline-flex; align-items: center; gap: 8px; }
.safe-tt-card .safe-tt-view .elementor-heading-title::after {
	content: ""; width: 16px; height: 16px; flex: 0 0 16px; background: currentColor; transition: transform .15s cubic-bezier(.4,0,.2,1);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Topic page ---------- */
.safe-topic-back a:hover .elementor-icon-list-text { text-decoration: underline; }
.safe-topic-content p { margin: 0 0 20px; }
.safe-topic-content p:last-child { margin-bottom: 0; }
.safe-topic-content img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 20px; margin-top: 40px; }
.safe-topic-imagebox img { width: 100%; height: 100%; object-fit: contain; }
@media (min-width: 1025px) {
	.safe-topic-grid > .e-con-inner { display: grid !important; grid-template-columns: 1.4fr .6fr; gap: 48px; align-items: start; }
}
.safe-topic-aside { align-self: flex-start; height: fit-content; }
.safe-topic-request .elementor-button { box-shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px -1px rgba(0,0,0,.1); }

@media (prefers-reduced-motion: reduce) {
	.safe-tt-card, .safe-ut-card, .safe-tt-view .elementor-heading-title::after { transition: none !important; }
	.safe-tt-card:hover { transform: none; }
}

/* ---------- Partner logos [safe_partners] ---------- */
.safe-partners { list-style: none; margin: 0; padding: 0; }
.safe-partners ul, ul.safe-partners { list-style: none; margin: 0; padding: 0; }
.safe-partner { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 176px; height: 112px;
	padding: 20px; box-sizing: border-box; background: #fff; border-radius: 16px; margin: 0; }
.safe-partner img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.safe-partners--marquee { position: relative; overflow: hidden;
	-webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
	        mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); }
.safe-partners__track { display: flex; gap: 16px; width: max-content; list-style: none; margin: 0; padding: 0;
	animation: safe-partner-marquee var(--safe-marquee-speed, 105s) linear infinite; }
.safe-partners--marquee:hover .safe-partners__track { animation-play-state: paused; }
@keyframes safe-partner-marquee { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 8px)); } }
.safe-partners--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 16px; }
.safe-partners--grid .safe-partner { width: auto; }
@media (prefers-reduced-motion: reduce) { .safe-partners__track { animation: none; } }

/* ---------- Instant topic filter (assets/safe-filter.js) ---------- */
.e-loop-item.safe-filter-hidden { display: none !important; }
.elementor-widget-taxonomy-filter .e-filter .e-filter-item[data-filter="__all"] { order: -1; }
