/**
 * OPRA Staff Members - Frontend Styles
 */

/* Search Widget */
.opra-staff-search-widget {
	margin-bottom: 30px;
}

.opra-staff-search-wrapper {
	position: relative;
	display: inline-block;
	width: 100%;
}

.opra-staff-search-input {
	width: 100%;
	padding: 12px 40px 12px 15px;
	border: 2px solid #ddd;
	border-radius: 4px;
	font-size: 16px;
	transition: border-color 0.3s ease;
}

.opra-staff-search-input:focus {
	outline: none;
	border-color: #0066cc;
}

.opra-staff-search-clear {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	padding: 5px 8px;
	font-size: 24px;
	line-height: 1;
	color: #999;
	transition: color 0.3s ease;
	z-index: 10;
}

.opra-staff-search-clear:hover {
	color: #333;
}

.opra-staff-search-clear:focus {
	outline: 2px solid #0066cc;
	outline-offset: 2px;
	border-radius: 2px;
}

/* List Widget */
.opra-staff-list {
	display: grid;
	gap: 30px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.opra-staff-list.elementor-grid {
	display: grid;
}

.elementor-grid-1 .opra-staff-list {
	grid-template-columns: 1fr;
}

.elementor-grid-2 .opra-staff-list,
.elementor-grid-2-tablet .opra-staff-list {
	grid-template-columns: repeat(2, 1fr);
}

.elementor-grid-3 .opra-staff-list,
.elementor-grid-3-tablet .opra-staff-list {
	grid-template-columns: repeat(3, 1fr);
}

.elementor-grid-4 .opra-staff-list,
.elementor-grid-4-tablet .opra-staff-list {
	grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
	.elementor-grid-mobile-1 .opra-staff-list {
		grid-template-columns: 1fr;
	}
	
	.elementor-grid-mobile-2 .opra-staff-list {
		grid-template-columns: repeat(2, 1fr);
	}
	
	.elementor-grid-2 .opra-staff-list,
	.elementor-grid-3 .opra-staff-list,
	.elementor-grid-4 .opra-staff-list {
		grid-template-columns: 1fr;
	}
}

/* Staff Card */
.opra-staff-card {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 20px;
	transition: box-shadow 0.3s ease, transform 0.3s ease;
	height: 100%;
	display: flex;
	flex-direction: column;
}

.opra-staff-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

.opra-staff-card__image {
	margin-bottom: 15px;
	text-align: center;
}

.opra-staff-card__image img {
	width: 120px;
	height: 120px;
	object-fit: cover;
	border-radius: 50%;
	border: 3px solid #f0f0f0;
}

.opra-staff-card__content {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.opra-staff-card__name {
	margin: 0 0 15px 0;
	font-size: 20px;
	font-weight: 600;
	color: #333;
	text-align: center;
}

.opra-staff-card__area,
.opra-staff-card__phone,
.opra-staff-card__email,
.opra-staff-card__pec,
.opra-staff-card__cap {
	margin-bottom: 10px;
	font-size: 14px;
	line-height: 1.6;
}

.opra-staff-card__area strong,
.opra-staff-card__phone strong,
.opra-staff-card__email strong,
.opra-staff-card__pec strong,
.opra-staff-card__cap strong {
	color: #666;
	margin-right: 5px;
}

.opra-staff-card__phone a,
.opra-staff-card__email a,
.opra-staff-card__pec a {
	color: #0066cc;
	text-decoration: none;
	transition: color 0.3s ease;
}

.opra-staff-card__phone a:hover,
.opra-staff-card__email a:hover,
.opra-staff-card__pec a:hover {
	color: #004499;
	text-decoration: underline;
}

.opra-staff-card__cap-list {
	margin-top: 5px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.opra-staff-card__cap-item {
	display: inline-block;
	padding: 4px 8px;
	background: #f5f5f5;
	border-radius: 4px;
	font-size: 12px;
	color: #555;
}

.opra-staff-card__actions {
	margin-top: auto;
	padding-top: 15px;
	text-align: center;
}

.opra-staff-card__button {
	display: inline-block;
	padding: 10px 20px;
	background: #1D1D1B;
	color: #fff !important;
	text-decoration: none;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 500;
	transition: background-color 0.3s ease, transform 0.2s ease;
}

.opra-staff-card__button:hover {
	background: #E2007A;
	color: #fff;
	text-decoration: none;
	transform: translateY(-1px);
}

/* No Results */
.opra-staff-no-results {
	text-align: center;
	padding: 40px 20px;
	color: #666;
	font-size: 16px;
	grid-column: 1 / -1;
}

/* Loading State */
.opra-staff-list.loading {
	opacity: 0.6;
	pointer-events: none;
}

.opra-staff-search-input.loading {
	background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z' opacity='.5'/%3E%3Cpath d='M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z'%3E%3CanimateTransform attributeName='transform' type='rotate' dur='1s' from='0 12 12' to='360 12 12' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 15px center;
	background-size: 20px 20px;
}

/* Detail Page Styles */
.opra-staff-detail {
	padding: 40px 0;
}

.opra-staff-detail__container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

.opra-staff-detail__header {
	display: flex;
	gap: 30px;
	margin-bottom: 40px;
	padding-bottom: 30px;
	border-bottom: 2px solid #e0e0e0;
	align-items: flex-start;
}

.opra-staff-detail__image {
	flex-shrink: 0;
}

.opra-staff-detail__image img {
	width: 200px;
	height: 200px;
	object-fit: cover;
	border-radius: 50%;
	border: 4px solid #f0f0f0;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.opra-staff-detail__header-content {
	flex: 1;
}

.opra-staff-detail__name {
	margin: 0 0 15px 0;
	font-size: 32px;
	font-weight: 600;
	color: #333;
	line-height: 1.2;
}

.opra-staff-detail__area {
	font-size: 18px;
	color: #666;
	line-height: 1.6;
}

.opra-staff-detail__area strong {
	color: #333;
	margin-right: 8px;
}

.opra-staff-detail__content {
	display: grid;
	gap: 25px;
}

.opra-staff-detail__field {
	padding: 20px;
	background: #f9f9f9;
	border-radius: 8px;
	border-left: 4px solid #E2007A;
	font-size: 16px;
	line-height: 1.8;
}

.opra-staff-detail__field strong {
	display: block;
	margin-bottom: 8px;
	color: #333;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.opra-staff-detail__field a {
	color: #0066cc;
	text-decoration: none;
	transition: color 0.3s ease;
}

.opra-staff-detail__field a:hover {
	color: #004499;
	text-decoration: underline;
}

.opra-staff-detail__field--full {
	grid-column: 1 / -1;
}

.opra-staff-detail__comuni-search-wrapper {
	margin-top: 15px;
	margin-bottom: 15px;
}

.opra-staff-detail__comuni-search {
	width: 100%;
	max-width: 400px;
	padding: 10px 15px;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	font-size: 16px;
	line-height: 1.5;
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.opra-staff-detail__comuni-search:focus {
	outline: none;
	border-color: #E2007A;
	box-shadow: 0 0 0 2px rgba(226, 0, 122, 0.1);
}

.opra-staff-detail__comuni-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 12px;
	margin-top: 15px;
}

.opra-staff-detail__comune-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 15px;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.opra-staff-detail__comune-item:hover {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	border-color: #E2007A;
}

.opra-staff-detail__comune-item--matched {
	border-color: #E2007A;
	background: #fff5fa;
	box-shadow: 0 2px 8px rgba(226, 0, 122, 0.15);
}

.opra-staff-detail__comune-nome {
	flex: 1;
	color: #333;
	font-weight: 500;
}

.opra-staff-detail__comune-cap {
	font-weight: 600;
	color: #E2007A;
	margin-left: 15px;
	padding-left: 15px;
	border-left: 1px solid #e0e0e0;
}

@media (max-width: 768px) {
	.opra-staff-detail__header {
		flex-direction: column;
		text-align: center;
		align-items: center;
	}

	.opra-staff-detail__image img {
		width: 150px;
		height: 150px;
	}

	.opra-staff-detail__name {
		font-size: 24px;
	}

	.opra-staff-detail__comuni-list {
		grid-template-columns: 1fr;
	}
	
	.opra-staff-detail__comuni-search {
		max-width: 100%;
	}
}

