/* Artikli Widgetid – Esiletõstetud artikkel */

.aw-featured-article {
	display: flex;
	gap: 40px;
	align-items: flex-start;
}

.aw-left {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-width: 0;
}

.aw-right {
	flex: 1 1 0;
	min-width: 0;
}

/* Valge raam pildi ümber (pildi all pealkiri) */
.aw-right.aw-has-frame {
	background-color: #ffffff;
	padding: 24px;
}

.aw-right.aw-has-frame.aw-frame-shadow {
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.aw-image,
.aw-image-link img {
	display: block;
	width: 100%;
	height: auto;
}

.aw-image-link {
	display: block;
}

/* Lühikirjeldus (default) */
.aw-description {
	text-align: start;
	font-family: "Open Sans", Sans-serif;
	font-size: 20px;
	font-weight: 600;
	line-height: 31px;
	color: #515151;
	margin-bottom: 24px;
}

/* Nupp noolega (default) */
.aw-button {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	font-family: "Open Sans", Sans-serif;
	font-size: 18px;
	font-weight: 600;
	line-height: 24.5px;
	color: #515151;
	transition: color 0.2s ease;
}

.aw-button svg {
	width: 20px;
	height: auto;
	fill: none;
	stroke: #515151;
	flex-shrink: 0;
	transition: stroke 0.2s ease;
}

/* Pildi all artikli pealkiri (default) */
.aw-title-link {
	text-decoration: none;
}

.aw-title {
	display: block;
	font-family: "Open Sans", Sans-serif;
	font-size: 16px;
	font-weight: 700;
	line-height: 24px;
	color: #1C5864;
	margin-top: 12px;
}

.aw-placeholder {
	padding: 24px;
	border: 1px dashed #c5c5c5;
	color: #777;
	text-align: center;
	font-family: "Open Sans", Sans-serif;
}

/* Mobiil */
@media (max-width: 767px) {
	.aw-featured-article {
		flex-direction: column;
		gap: 24px;
	}

	.aw-left,
	.aw-right {
		width: 100% !important;
		flex: 0 0 auto !important;
	}

	/* Tekst ja nupp esimesena */
	.aw-left {
		padding: 0 !important;
		order: 0;
	}

	/* Pildikast pärast nuppu */
	.aw-right {
		order: 1;
	}

	/* Nool jääb nupu kõrvale, aga suunaga alla */
	.aw-button svg {
		transform: rotate(90deg);
	}
}

/* =====================================================
 * MEESKOND
 * ===================================================== */
.aw-team-list {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 40px;
}

.aw-team-member {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	text-align: left;
}

/* Ringfoto + LinkedIn rosett */
.aw-team-photo {
	position: relative;
	width: 180px;
	max-width: 100%;
	aspect-ratio: 1 / 1;
}

.aw-team-photo-inner {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	overflow: hidden;
	border: 3px solid #1C5864;
}

.aw-team-img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none;
	object-fit: cover;
	transform-origin: center center;
}

.aw-team-img--empty {
	background: #e6edef;
}

.aw-team-linkedin {
	position: absolute;
	right: 8%;
	bottom: 4%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 5px;
	background-color: #1C5864;
	border: 1px solid transparent;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.aw-team-photo a.aw-team-linkedin:hover {
	background-color: #ffffff !important;
	border-color: #1C5864;
}

.aw-team-linkedin svg {
	width: 24px;
	height: 24px;
	fill: #ffffff;
	transition: fill 0.2s ease;
}

.aw-team-photo .aw-team-linkedin:hover svg {
	fill: #1C5864;
}

.aw-team-name {
	font-family: "Open Sans", sans-serif;
	font-weight: 700;
	font-size: 20px;
	line-height: 1.3;
	color: #1A1A1A;
	margin: 18px 0 4px;
}

.aw-team-role {
	font-family: "Open Sans", sans-serif;
	font-size: 16px;
	line-height: 1.4;
	color: #515151;
	margin-bottom: 12px;
}

.aw-team-readmore {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	text-decoration: none;
	font-family: "Open Sans", sans-serif;
	font-weight: 600;
	font-size: 16px;
	color: #1C5864;
}

.aw-team-readmore svg {
	width: 16px;
	height: auto;
	fill: none;
	stroke: #1C5864;
	flex-shrink: 0;
}

/* ===== Popup ===== */
.aw-team-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
}

.aw-team-modal.is-open {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

html.aw-modal-open,
body.aw-modal-open {
	overflow: hidden;
}

/* Redaktori eelvaade (staatiline, ainult Elementoris) */
.aw-team-modal.aw-editor-preview {
	position: static;
	display: block;
	padding: 0;
	margin-top: 32px;
}

.aw-team-modal.aw-editor-preview .aw-team-modal-dialog {
	margin: 0;
	max-height: none;
	overflow: visible;
	animation: none;
	box-shadow: 0 0 0 1px #e3eaec, 0 10px 30px rgba(0, 0, 0, 0.06);
}

.aw-team-editor-note {
	font-family: "Open Sans", sans-serif;
	font-size: 12px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #9aa6a9;
	margin-bottom: 16px;
}

.aw-team-modal-overlay {
	position: absolute;
	inset: 0;
	background-color: rgba(15, 40, 46, 0.55);
}

.aw-team-modal-dialog {
	position: relative;
	background-color: #ffffff;
	max-width: 640px;
	width: 100%;
	max-height: 86vh;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	margin: 0;
	border-radius: 10px;
	padding: 44px;
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
	animation: aw-modal-in 0.22s ease;
}

@keyframes aw-modal-in {
	from { opacity: 0; transform: translateY(14px); }
	to   { opacity: 1; transform: translateY(0); }
}

.aw-team-modal-close {
	position: absolute;
	top: 14px;
	right: 18px;
	background: none;
	border: none;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
	color: #1C5864;
	padding: 0;
}

.aw-team-popup-head {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	margin-bottom: 22px;
}

.aw-team-popup-photo {
	flex-shrink: 0;
	align-self: flex-start;
	width: 90px;
	height: 90px;
	border-radius: 50%;
	overflow: hidden;
	border: 3px solid #1C5864;
}

.aw-team-popup-photo img {
	width: 100% !important;
	height: 100% !important;
	max-width: none;
	object-fit: cover;
	transform-origin: center center;
	display: block;
}

.aw-team-popup-name {
	font-family: "Open Sans", sans-serif;
	font-weight: 700;
	font-size: 22px;
	line-height: 1.3;
	color: #1C5864;
	margin: 0;
}

.aw-team-popup-role {
	font-family: "Open Sans", sans-serif;
	font-size: 16px;
	color: #515151;
	margin-top: 4px;
}

.aw-team-popup-linkedin {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-top: 4px;
	text-decoration: none;
	font-family: "Open Sans", sans-serif;
	font-size: 14px;
	font-weight: 600;
	color: #1C5864;
}

.aw-team-popup-linkedin svg {
	width: 1.2em;
	height: 1.2em;
	fill: #1C5864;
}

.aw-team-popup-bio {
	font-family: "Open Sans", sans-serif;
	font-size: 16px;
	line-height: 1.65;
	color: #333333;
}

.aw-team-popup-bio p {
	margin: 0 0 1em;
}

.aw-team-popup-bio p:last-child {
	margin-bottom: 0;
}

@media (max-width: 767px) {
	.aw-team-modal-dialog {
		padding: 32px 22px;
		margin: 0;
		max-height: 92vh;
	}

	.aw-team-popup-head {
		gap: 16px;
	}

	.aw-team-popup-photo {
		align-self: flex-start;
		width: 80px;
		height: 80px;
	}

	.aw-team-popup-role {
		margin-top: 2px;
	}

	.aw-team-popup-linkedin {
		margin-top: 4px;
	}
}

/* Meeskond – kompaktne rea-paigutus telefonis */
@media (max-width: 767px) {
	.aw-team-member {
		flex-direction: row;
		align-items: center !important;
		gap: 16px;
	}

	.aw-team-photo {
		width: 96px !important;
		flex-shrink: 0;
	}

	.aw-team-info {
		flex: 1;
		min-width: 0;
		text-align: left;
	}

	.aw-team-name {
		margin-top: 0;
		font-size: 18px;
	}

	.aw-team-role {
		margin-bottom: 8px;
	}

	.aw-team-linkedin {
		width: 26px;
		height: 26px;
	}

	.aw-team-linkedin svg {
		width: 15px;
		height: 15px;
	}
}

/* =====================================================
 * KOOSTÖÖPARTNERID
 * ===================================================== */
.aw-partners-list {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	column-gap: 40px;
	row-gap: 40px;
	align-items: center;
	justify-items: center;
}

.aw-partner-item {
	display: flex;
	align-items: center;
	justify-content: center;
}

.aw-partner-logo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	max-width: 100%;
}

.aw-partner-logo-img {
	display: block;
	width: auto;
	height: 60px;
	max-width: 100%;
	object-fit: contain;
}

/* Valge SVG / värviline -> must. Juba must PNG jääb mustaks. */
.aw-partner-logo-img.aw-black {
	filter: brightness(0);
}
