/**
 * Revivo Estate — Agent CPT
 *
 * Styles for agent-specific UI:
 *   - Agent card (default + compact variants)
 *   - Agent grid
 *   - Agent hero on the single-agent page
 *   - Specialty chips and headings
 *   - Testimonials
 *   - Social links
 *   - Sidebar agent card on property/project singles
 *
 * All colors, spacing, and radii use the plugin's design tokens defined
 * in frontend.css, so the styling matches the rest of the plugin out of
 * the box and can be rebranded via the same CSS custom properties.
 */

/* =============================================================================
   Agent Card
   ============================================================================= */

.revivo-estate .revivo-agent-card {
	display: flex;
	flex-direction: column;
	background: var(--revivo-color-surface);
	border: 1px solid var(--revivo-color-border);
	border-radius: var(--revivo-radius-lg);
	box-shadow: var(--revivo-shadow-md);
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	height: 100%;
	transition: transform var(--revivo-transition-base), box-shadow var(--revivo-transition-base);
}

.revivo-estate .revivo-agent-card:hover {
	box-shadow: var(--revivo-shadow-lg);
	transform: translateY(-2px);
}

.revivo-estate .revivo-agent-card__photo {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	background: linear-gradient(135deg, var(--revivo-color-primary) 0%, var(--revivo-color-accent) 100%);
	position: relative;
	overflow: hidden;
	text-decoration: none;
}

.revivo-estate .revivo-agent-card__photo-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	display: block;
}

.revivo-estate .revivo-agent-card__photo-initials {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: var(--revivo-text-4xl);
	font-weight: var(--revivo-weight-bold);
	letter-spacing: 0.05em;
}

.revivo-estate .revivo-agent-card__body {
	display: flex;
	flex-direction: column;
	gap: var(--revivo-space-2);
	padding: var(--revivo-space-5);
	flex: 1 1 auto;
}

.revivo-estate .revivo-agent-card__name {
	font-size: var(--revivo-text-lg);
	font-weight: var(--revivo-weight-semibold);
	color: var(--revivo-color-heading);
	margin: 0;
	line-height: 1.3;
}

.revivo-estate .revivo-agent-card__name a {
	color: inherit;
	text-decoration: none;
}

.revivo-estate .revivo-agent-card__name a:hover {
	color: var(--revivo-color-primary);
}

.revivo-estate .revivo-agent-card__role {
	font-size: var(--revivo-text-sm);
	color: var(--revivo-color-muted);
	margin: 0;
	line-height: 1.5;
}

.revivo-estate .revivo-agent-card__job-title {
	font-weight: var(--revivo-weight-medium);
	color: var(--revivo-color-text);
}

.revivo-estate .revivo-agent-card__tagline {
	color: var(--revivo-color-muted);
}

.revivo-estate .revivo-agent-card__intro {
	font-size: var(--revivo-text-sm);
	color: var(--revivo-color-text);
	margin: var(--revivo-space-2) 0 0;
	line-height: 1.6;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.revivo-estate .revivo-agent-card__meta {
	list-style: none;
	padding: 0;
	margin: var(--revivo-space-2) 0 0;
	display: flex;
	flex-direction: column;
	gap: var(--revivo-space-1);
}

.revivo-estate .revivo-agent-card__meta-item {
	font-size: var(--revivo-text-sm);
	color: var(--revivo-color-muted);
	line-height: 1.5;
}

.revivo-estate .revivo-agent-card__chips {
	display: flex;
	flex-wrap: wrap;
	gap: var(--revivo-space-2);
	margin-top: var(--revivo-space-3);
}

.revivo-estate .revivo-agent-card__chip {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	background: var(--revivo-color-primary-50);
	color: var(--revivo-color-primary);
	border-radius: var(--revivo-radius-pill, 999px);
	font-size: var(--revivo-text-xs);
	font-weight: var(--revivo-weight-medium);
	line-height: 1.4;
	white-space: nowrap;
}

/* Inside an agent card body, push contact buttons to the bottom so cards
   with different amounts of content still align their action rows. */
.revivo-estate .revivo-agent-card__body .revivo-card-contact {
	margin-top: auto;
}

/* Compact variant — used in sidebar on property/project singles */
.revivo-estate .revivo-agent-card--compact {
	flex-direction: row;
	align-items: stretch;
}

.revivo-estate .revivo-agent-card--compact .revivo-agent-card__photo {
	width: 100px;
	flex-shrink: 0;
	aspect-ratio: auto;
	align-self: stretch;
}

.revivo-estate .revivo-agent-card--compact .revivo-agent-card__photo-initials {
	font-size: var(--revivo-text-xl);
}

.revivo-estate .revivo-agent-card--compact .revivo-agent-card__body {
	padding: var(--revivo-space-3) var(--revivo-space-4);
	gap: var(--revivo-space-1);
}

.revivo-estate .revivo-agent-card--compact .revivo-agent-card__name {
	font-size: var(--revivo-text-base);
}

/* In the compact layout the contact bar sits tighter. */
.revivo-estate .revivo-agent-card--compact .revivo-card-contact {
	padding-top: 8px;
	margin-top: 8px;
}

.revivo-estate .revivo-agent-card--compact .revivo-card-contact__btn span {
	display: none;
}

.revivo-estate .revivo-agent-card--compact .revivo-card-contact__btn {
	padding: 6px;
}

/* =============================================================================
   Agent Grid
   ============================================================================= */

.revivo-estate .revivo-agent-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--revivo-space-5);
}

@media (min-width: 640px) {
	.revivo-estate .revivo-agent-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
	.revivo-estate .revivo-agent-grid--cols-3 { grid-template-columns: repeat(2, 1fr); }
	.revivo-estate .revivo-agent-grid--cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
	.revivo-estate .revivo-agent-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
	.revivo-estate .revivo-agent-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* =============================================================================
   Agent Single Page
   ============================================================================= */

.revivo-estate .revivo-agent-single {
	padding-block: var(--revivo-space-6);
}

.revivo-estate .revivo-agent-hero {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--revivo-space-6);
	padding: var(--revivo-space-6);
	background: var(--revivo-color-surface);
	border: 1px solid var(--revivo-color-border);
	border-radius: var(--revivo-radius-lg);
	box-shadow: var(--revivo-shadow-md);
	margin-bottom: var(--revivo-space-6);
}

@media (min-width: 768px) {
	.revivo-estate .revivo-agent-hero {
		grid-template-columns: 280px 1fr;
		align-items: start;
	}
}

.revivo-estate .revivo-agent-hero__photo {
	width: 100%;
	max-width: 280px;
	aspect-ratio: 1 / 1;
	border-radius: var(--revivo-radius-lg);
	overflow: hidden;
	background: linear-gradient(135deg, var(--revivo-color-primary) 0%, var(--revivo-color-accent) 100%);
	position: relative;
	margin: 0 auto;
}

.revivo-estate .revivo-agent-hero__photo-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	display: block;
}

.revivo-estate .revivo-agent-hero__photo-initials {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 4rem;
	font-weight: var(--revivo-weight-bold);
	letter-spacing: 0.05em;
}

.revivo-estate .revivo-agent-hero__body {
	display: flex;
	flex-direction: column;
	gap: var(--revivo-space-4);
}

/* Name → role should sit tight together like a header block. */
.revivo-estate .revivo-agent-hero__body > .revivo-agent-hero__role {
	margin-top: calc(var(--revivo-space-4) * -1 + var(--revivo-space-1));
}

.revivo-estate .revivo-agent-hero__name {
	font-size: var(--revivo-text-3xl);
	font-weight: var(--revivo-weight-bold);
	color: var(--revivo-color-heading);
	margin: 0;
	line-height: 1.2;
}

.revivo-estate .revivo-agent-hero__role {
	font-size: var(--revivo-text-lg);
	color: var(--revivo-color-muted);
	margin: 0;
	line-height: 1.4;
}

.revivo-estate .revivo-agent-hero__job-title {
	color: var(--revivo-color-text);
	font-weight: var(--revivo-weight-medium);
}

.revivo-estate .revivo-agent-hero__tagline {
	color: var(--revivo-color-muted);
}

.revivo-estate .revivo-agent-hero__intro {
	font-size: var(--revivo-text-base);
	color: var(--revivo-color-text);
	margin: 0;
	line-height: 1.6;
}

.revivo-estate .revivo-agent-hero__stats {
	display: flex;
	flex-wrap: wrap;
	gap: var(--revivo-space-5);
	margin-top: var(--revivo-space-3);
	padding: var(--revivo-space-4);
	background: var(--revivo-color-bg);
	border-radius: var(--revivo-radius-md);
}

.revivo-estate .revivo-agent-hero__stat {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.revivo-estate .revivo-agent-hero__stat-value {
	font-size: var(--revivo-text-xl);
	font-weight: var(--revivo-weight-bold);
	color: var(--revivo-color-primary);
	line-height: 1.2;
}

.revivo-estate .revivo-agent-hero__stat-label {
	font-size: var(--revivo-text-xs);
	color: var(--revivo-color-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.revivo-estate .revivo-agent-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--revivo-space-2);
	margin-top: var(--revivo-space-4);
}

.revivo-estate .revivo-agent-hero__actions .revivo-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 18px;
	font-size: var(--revivo-text-sm);
	font-weight: var(--revivo-weight-medium);
	border-radius: var(--revivo-radius-md);
	text-decoration: none;
	border: 1px solid transparent;
	transition: background var(--revivo-transition-base), color var(--revivo-transition-base), border-color var(--revivo-transition-base);
	min-height: 40px;
}

.revivo-estate .revivo-agent-hero__actions .revivo-btn svg {
	width: 16px;
	height: 16px;
}

.revivo-estate .revivo-agent-hero__actions .revivo-btn--primary {
	background: var(--revivo-color-primary);
	color: #fff;
}
.revivo-estate .revivo-agent-hero__actions .revivo-btn--primary:hover {
	background: var(--revivo-color-primary-dark);
}

.revivo-estate .revivo-agent-hero__actions .revivo-btn--secondary {
	background: var(--revivo-color-accent);
	color: #fff;
}
.revivo-estate .revivo-agent-hero__actions .revivo-btn--secondary:hover {
	background: var(--revivo-color-accent-dark);
}

.revivo-estate .revivo-agent-hero__actions .revivo-btn--ghost {
	background: transparent;
	color: var(--revivo-color-primary);
	border-color: var(--revivo-color-border);
}
.revivo-estate .revivo-agent-hero__actions .revivo-btn--ghost:hover {
	background: var(--revivo-color-primary-50);
	border-color: var(--revivo-color-primary);
}

/* =============================================================================
   Single Sections (specialties, testimonials, social, etc.)
   ============================================================================= */

.revivo-estate .revivo-single-section {
	background: var(--revivo-color-surface);
	border: 1px solid var(--revivo-color-border);
	border-radius: var(--revivo-radius-lg);
	padding: 16px var(--revivo-space-4);
	margin-bottom: var(--revivo-space-3);
}

.revivo-estate .revivo-single-section__title {
	font-size: var(--revivo-text-xl);
	font-weight: var(--revivo-weight-semibold);
	color: var(--revivo-color-heading);
	margin: 0 0 var(--revivo-space-2);
	padding-bottom: var(--revivo-space-2);
	border-bottom: 1px solid var(--revivo-color-divider);
}

.revivo-estate .revivo-single-section__body {
	color: var(--revivo-color-text);
	line-height: 1.7;
}

.revivo-estate .revivo-single-section__body p {
	margin: 0 0 var(--revivo-space-3);
}

/* =============================================================================
   Specialties / Languages / Service Areas
   ============================================================================= */

.revivo-estate .revivo-agent-specialties {
	display: flex;
	flex-direction: column;
	gap: var(--revivo-space-4);
}

.revivo-estate .revivo-agent-specialties__group {
	display: flex;
	flex-direction: column;
	gap: var(--revivo-space-2);
}

.revivo-estate .revivo-agent-specialties__heading {
	font-size: var(--revivo-text-sm);
	font-weight: var(--revivo-weight-semibold);
	color: var(--revivo-color-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin: 0;
}

.revivo-estate .revivo-agent-chips {
	display: flex;
	flex-wrap: wrap;
	gap: var(--revivo-space-2);
}

.revivo-estate .revivo-agent-chip {
	display: inline-flex;
	align-items: center;
	padding: 6px 14px;
	background: var(--revivo-color-primary-50);
	color: var(--revivo-color-primary);
	border-radius: var(--revivo-radius-pill, 999px);
	font-size: var(--revivo-text-sm);
	font-weight: var(--revivo-weight-medium);
	line-height: 1.4;
}

/* =============================================================================
   Testimonials
   ============================================================================= */

.revivo-estate .revivo-agent-testimonials {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--revivo-space-4);
}

@media (min-width: 768px) {
	.revivo-estate .revivo-agent-testimonials {
		grid-template-columns: repeat(2, 1fr);
	}
}

.revivo-estate .revivo-agent-testimonial {
	background: var(--revivo-color-bg);
	border-left: 4px solid var(--revivo-color-primary);
	border-radius: var(--revivo-radius-md);
	padding: var(--revivo-space-4) var(--revivo-space-5);
	margin: 0;
}

.revivo-estate .revivo-agent-testimonial__quote {
	font-size: var(--revivo-text-base);
	color: var(--revivo-color-text);
	margin: 0 0 var(--revivo-space-3);
	line-height: 1.6;
	font-style: italic;
}

.revivo-estate .revivo-agent-testimonial__author {
	font-size: var(--revivo-text-sm);
	color: var(--revivo-color-muted);
	font-weight: var(--revivo-weight-medium);
}

/* =============================================================================
   Social links
   ============================================================================= */

.revivo-estate .revivo-agent-social {
	display: flex;
	flex-wrap: wrap;
	gap: var(--revivo-space-3);
}

.revivo-estate .revivo-agent-social__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	background: var(--revivo-color-bg);
	color: var(--revivo-color-primary);
	border: 1px solid var(--revivo-color-border);
	border-radius: var(--revivo-radius-md);
	font-size: var(--revivo-text-sm);
	font-weight: var(--revivo-weight-medium);
	text-decoration: none;
	transition: background var(--revivo-transition-base), color var(--revivo-transition-base);
}

.revivo-estate .revivo-agent-social__link:hover {
	background: var(--revivo-color-primary);
	color: #fff;
	border-color: var(--revivo-color-primary);
}

.revivo-estate .revivo-agent-social__link svg {
	width: 14px;
	height: 14px;
}

/* =============================================================================
   Sidebar Agent Card (on property / project singles)
   ============================================================================= */

.revivo-estate .revivo-single-sidebar__agent {
	background: var(--revivo-color-surface);
	border: 1px solid var(--revivo-color-border);
	border-radius: var(--revivo-radius-lg);
	box-shadow: var(--revivo-shadow-md);
	overflow: hidden;
	margin-bottom: var(--revivo-space-4);
}

.revivo-estate .revivo-single-sidebar__heading {
	font-size: var(--revivo-text-sm);
	font-weight: var(--revivo-weight-semibold);
	color: var(--revivo-color-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: var(--revivo-space-3) var(--revivo-space-4);
	margin: 0;
	background: var(--revivo-color-bg);
	border-bottom: 1px solid var(--revivo-color-border);
}

/* When sidebar contains an agent card, drop its own outer border to avoid doubling. */
.revivo-estate .revivo-single-sidebar__agent .revivo-agent-card {
	border: none;
	box-shadow: none;
	border-radius: 0;
}
