/**
 * Frontend styles for Fellows plugin.
 *
 * @package Fellows
 * @since 0.1.0
 */

/* Container - Matches The7 theme layout (content-width 1200px, page margins 50px) */
.fellows-archive .fellows-container,
.fellow-single .fellows-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 2rem 2rem;
	width: 100%;
	box-sizing: border-box;
}

/* Archive Page Title - Striped Background (matches Better Change style) */
.fellows-archive .page-header .page-title {
	display: inline-block;
}

/* Archive Grid - 4 columns per row */
.fellows-archive .fellows-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 2rem;
	margin: 2rem 0;
}

/* Grid for shortcodes (outside archive context) - 4 columns to match archive */
.fellows-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 2rem;
	margin: 2rem 0;
}

/* Fellow Card */
.fellow-card {
	margin: 0;
	background: transparent;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

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

.fellow-card-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.fellow-card-link:focus {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.fellow-card-photo {
	width: 250px;
	height: 250px;
	border-radius: 50%;
	display: block;
	object-fit: cover;
	margin: 0 auto;
}

.fellow-card-content {
	padding: 1.5rem;
	text-align: center;
}

.fellow-card-name {
	margin: 0 0 0.5rem 0;
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.3;
}

.fellow-card-title {
	margin: 0 0 0.5rem 0;
	font-size: 0.9rem;
	color: #666;
	font-style: italic;
}

.fellow-card-country {
	margin: 0 0 0.75rem 0;
	font-size: 0.9rem;
	color: #333;
}

.fellow-card-excerpt {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.6;
	color: #555;
}

.fellow-card-excerpt p {
	margin: 0;
}

/* Two-column layout for single fellow - matches The7 theme (70/30 split, 50px gap) */
.fellows-content-wrapper {
	display: grid;
	grid-template-columns: 1fr minmax(0, 30%);
	gap: 50px;
	align-items: start;
}

.fellows-main-content {
	min-width: 0; /* Prevents grid overflow */
}

.fellows-sidebar {
	min-width: 0; /* Prevents grid overflow */
}

/* Book a meeting button - Elementor-style button (elementor-button elementor-button-link elementor-size-sm) */
.fellow-booking-button-wrapper {
	margin-bottom: 2rem;
}

.fellow-booking-button-wrapper .fellow-booking-button,
.fellow-booking-button-wrapper .elementor-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.5rem 1.25rem;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.4;
	text-decoration: none;
	color: #000;
	background-color: transparent;
	border: 1px solid currentColor;
	border-radius: 4px;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.fellow-booking-button-wrapper .fellow-booking-button:hover,
.fellow-booking-button-wrapper .fellow-booking-button:focus,
.fellow-booking-button-wrapper .elementor-button:hover,
.fellow-booking-button-wrapper .elementor-button:focus {
	background-color: #000;
	color: #fff;
	border-color: #000;
}

.fellow-booking-button-wrapper .elementor-button-content-wrapper {
	display: inline-flex;
	align-items: center;
}

.fellow-booking-button-wrapper .elementor-button-text {
	display: inline-block;
}

.fellows-sidebar .widget {
	margin-bottom: 2rem;
}

.fellows-sidebar .fellow-upcoming-trainings {
	margin-bottom: 2rem;
}

.fellows-sidebar .fellow-latest-posts {
	margin-top: 0;
	margin-bottom: 0;
}

/* Single Fellow Profile */
.fellow-single .fellow-profile {
	margin: 2rem 0;
}

.fellow-single .entry-header {
	margin-bottom: 2rem;
	text-align: center;
}

.fellow-photo {
	width: 100%;
	max-width: 300px;
	height: auto;
	border-radius: 50%;
	margin: 0 auto 1.5rem;
	display: block;
	object-fit: cover;
	aspect-ratio: 1 / 1;
}

.fellow-single .entry-title {
	margin: 0 0 0.5rem 0;
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.2;
}

.fellow-role {
	margin: 0;
	font-size: 1.1rem;
	color: #666;
	font-style: italic;
}

.fellow-contact-info {
	margin: 0.75rem 0 0 0;
	font-size: 0.95rem;
	color: #555;
	line-height: 1.6;
}

.fellow-contact-info .fellow-country,
.fellow-contact-info .fellow-phone,
.fellow-contact-info .fellow-email {
	color: #555;
}

.fellow-contact-info .fellow-contact-separator {
	color: #999;
	margin: 0 0.5rem;
}

.fellow-contact-info .fellow-phone a,
.fellow-contact-info .fellow-email a {
	color: #0073aa;
	text-decoration: none;
	transition: color 0.2s ease;
}

.fellow-contact-info .fellow-phone a:hover,
.fellow-contact-info .fellow-phone a:focus,
.fellow-contact-info .fellow-email a:hover,
.fellow-contact-info .fellow-email a:focus {
	color: #005177;
	text-decoration: underline;
}

.fellow-single .entry-content {
	margin: 2rem 0;
	line-height: 1.8;
}

.fellow-single .entry-content p {
	margin: 0 0 1.5rem 0;
}

.fellow-single .entry-content p:last-child {
	margin-bottom: 0;
}

/* Fellow Links */
.fellow-links {
	margin: 2rem 0;
	padding: 1.5rem;
	background: #f9f9f9;
	border-radius: 4px;
}

.fellow-links-title {
	margin: 0 0 1rem 0;
	font-size: 1.25rem;
	font-weight: 600;
}

.fellow-links-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

.fellow-link-item {
	margin: 0;
}

.fellow-link-item a {
	display: inline-block;
	padding: 0.5rem 1rem;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	text-decoration: none;
	color: #333;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.fellow-link-item a:hover,
.fellow-link-item a:focus {
	background: #f0f0f0;
	border-color: #999;
	outline: none;
}

.fellow-link-item a:focus {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
	.fellows-archive .fellows-container,
	.fellow-single .fellows-container {
		padding: 2rem 2rem;
	}

	.fellows-content-wrapper {
		gap: 2rem;
	}
}

@media (max-width: 992px) {
	.fellows-archive .fellows-grid,
	.fellows-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.fellows-shortcode-list {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

@media (max-width: 768px) {
	.fellows-archive .fellows-container,
	.fellow-single .fellows-container {
		padding: 1.5rem 1.5rem;
	}

	.fellows-content-wrapper {
		grid-template-columns: 1fr;
		gap: 2rem;
	}

	.fellows-archive .fellows-grid,
	.fellows-grid {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	.fellows-shortcode-list {
		grid-template-columns: 1fr !important;
	}

	.fellow-card-photo {
		width: 200px;
		height: 200px;
	}

	.fellow-photo {
		max-width: 200px;
	}

	.fellow-single .entry-title {
		font-size: 1.5rem;
	}

	.fellow-links-list {
		flex-direction: column;
	}

	.fellows-two-columns {
		grid-template-columns: 1fr;
		gap: 2rem;
	}

	.fellows-top-two-columns {
		grid-template-columns: 1fr;
		gap: 2rem;
	}
}

/* Accessibility: Ensure proper focus states */
.fellow-card-link:focus-visible,
.fellow-link-item a:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Shortcode Styles - [fellows_list] default is 4 columns (overridden by shortcode attribute) */
.fellows-shortcode-list {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 2rem;
	margin: 2rem 0;
}

.fellows-shortcode-profile {
	margin: 2rem 0;
}

.fellows-shortcode-profile .fellow-profile {
	margin: 0;
}

/* Services (Fellow sidebar) */
.fellow-services .filter-header {
	margin: 0 0 1.5rem 0;
}

.fellow-services .filter-title {
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.3;
	margin: 0;
}

.fellows-sidebar .fellow-services .filter-header {
	margin-bottom: 1rem;
}

.fellows-sidebar .fellow-services .filter-title {
	font-size: 1.25rem;
}

/* Latest Posts by Fellow */
.fellow-latest-posts {
	margin: 0;
	padding: 0;
	border-top: none;
}

/* Latest Posts in Sidebar */
.fellows-sidebar .fellow-latest-posts {
	margin: 0;
	padding: 0;
}

.fellow-latest-posts .filter-header {
	margin: 0 0 1.5rem 0;
}

.fellow-latest-posts .filter-title {
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.3;
	margin: 0;
}

.fellows-sidebar .fellow-latest-posts .filter-header {
	margin-bottom: 1rem;
}

.fellows-sidebar .fellow-latest-posts .filter-title {
	font-size: 1.25rem;
}

.fellow-latest-posts-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.fellow-latest-post-item {
	margin: 0 0 2rem 0;
	padding: 0 0 2rem 0;
	border-bottom: 1px solid #f0f0f0;
}

.fellow-latest-post-item:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: none;
}

.fellows-sidebar .fellow-latest-post-item {
	margin: 0 0 1.5rem 0;
	padding: 0 0 1.5rem 0;
}

.fellows-sidebar .fellow-latest-post-item:last-child {
	padding-bottom: 0;
}

.fellow-latest-post {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
}

.fellow-latest-post-thumbnail-link {
	flex-shrink: 0;
	display: block;
	text-decoration: none;
}

.fellow-latest-post-thumbnail {
	width: 50px;
	height: 50px;
	flex-shrink: 0;
	border-radius: 4px;
	overflow: hidden;
}

.fellow-latest-post-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.fellow-latest-post-content {
	flex: 1;
	min-width: 0;
}

.fellow-latest-post-title {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.25em;
	color: #000;
}

.fellows-sidebar .fellow-latest-post-title {
	font-size: 0.95rem;
}

.fellow-latest-post-title a {
	color: #000;
	text-decoration: none;
	transition: color 0.2s ease;
}

.fellow-latest-post-title a:hover,
.fellow-latest-post-title a:focus {
	color: #0073aa;
	text-decoration: underline;
}

/* Upcoming Trainings (The Events Calendar) */
.fellow-upcoming-trainings {
	margin: 3rem 0;
	padding: 2rem 0;
	border-top: 1px solid #e0e0e0;
}

.fellow-upcoming-trainings .filter-header {
	margin: 0 0 1.5rem 0;
}

.fellow-upcoming-trainings .filter-title {
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.3;
	margin: 0;
}

/* Green separator spacer (matches Elementor spacer widget style from blog sidebar) */
.fellow-latest-posts .fellow-spacer,
.fellow-services .fellow-spacer,
.fellow-upcoming-trainings .fellow-spacer {
	width: 100%;
	margin-top: 0.5rem;
}

.fellow-latest-posts .fellow-spacer-inner,
.fellow-services .fellow-spacer-inner,
.fellow-upcoming-trainings .fellow-spacer-inner {
	height: 5px;
	background-color: #9aff5b;
	width: 100%;
	display: block;
}

.fellows-sidebar .fellow-upcoming-trainings {
	margin: 0 0 2rem 0;
	padding: 0;
	border-top: none;
}

.fellows-sidebar .fellow-upcoming-trainings .filter-header {
	margin-bottom: 1rem;
}

.fellows-sidebar .fellow-upcoming-trainings .filter-title {
	font-size: 1.25rem;
}

.fellow-upcoming-trainings-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.fellow-upcoming-training-item {
	margin: 0 0 2rem 0;
	padding: 0;
}

.fellows-sidebar .fellow-upcoming-training-item {
	margin: 0 0 1.5rem 0;
}

.fellow-upcoming-training-item:last-child {
	margin-bottom: 0;
}

.fellow-upcoming-training {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
}

.fellow-upcoming-training-thumbnail-link {
	flex-shrink: 0;
	display: block;
	text-decoration: none;
}

.fellow-upcoming-training-thumbnail {
	width: 50px;
	height: 50px;
	flex-shrink: 0;
	border-radius: 4px;
	overflow: hidden;
}

.fellow-upcoming-training-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.fellow-upcoming-training-content {
	flex: 1;
	min-width: 0;
}

.fellow-upcoming-training-title {
	margin: 0 0 0.5rem 0;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.25em;
	color: #000;
}

.fellows-sidebar .fellow-upcoming-training-title {
	font-size: 0.95rem;
}

.fellow-upcoming-training-title a {
	color: #000;
	text-decoration: none;
	transition: color 0.2s ease;
}

.fellow-upcoming-training-title a:hover,
.fellow-upcoming-training-title a:focus {
	color: #0073aa;
	text-decoration: underline;
}

.fellow-upcoming-training-meta {
	margin: 0.25rem 0;
	font-size: 0.875rem;
	line-height: 1.4;
	color: #000;
}

.fellows-sidebar .fellow-upcoming-training-meta {
	font-size: 0.85rem;
}

.fellow-upcoming-training-flag {
	margin-right: 0.25rem;
}

.fellow-upcoming-training-location {
	color: #000;
}

.fellow-upcoming-training-date {
	display: block;
	font-size: 0.875rem;
	color: #000;
	margin-top: 0.25rem;
	line-height: 1.4;
}

.fellows-sidebar .fellow-upcoming-training-date {
	font-size: 0.85rem;
}

.fellows-upcoming-trainings-message {
	margin: 1rem 0;
	color: #666;
	font-size: 0.95rem;
}

/* Page Content Sections */
.fellows-page-content-top {
	margin: 2rem 0;
	color: #000;
}

.fellows-page-content-top h2 {
	margin: 0 0 1rem 0;
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.2;
	color: #000;
}

.fellows-page-content-top h3 {
	margin: 0 0 1rem 0;
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.3;
	color: #000;
}

.fellows-page-content-top p {
	margin: 0 0 1rem 0;
	line-height: 1.8;
	color: #000;
}

.fellows-page-content-top p:last-child {
	margin-bottom: 0;
}

.fellows-top-two-columns {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3rem;
	align-items: start;
}

.fellows-top-two-columns p {
	margin: 0;
	line-height: 1.8;
}

.fellows-intro-lead {
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.6;
}

.fellows-page-content-bottom {
	margin: 3rem 0 0 0;
}

.fellows-two-columns {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3rem;
	align-items: start;
}

.fellows-bottom-image {
	margin: 0;
}

.fellows-bottom-image img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 4px;
}

.fellows-bottom-content {
	display: flex;
	flex-direction: column;
	gap: 3rem;
}

.fellows-two-columns .become-partner,
.fellows-two-columns .become-fellow {
	margin: 0;
}

.fellows-two-columns h2 {
	margin: 0 0 1rem 0;
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.3;
}

.fellows-two-columns p {
	margin: 0 0 1rem 0;
	line-height: 1.8;
}

.fellows-two-columns p:last-child {
	margin-bottom: 0;
}

.fellows-contact-button-wrapper {
	text-align: center;
	margin: 3rem 0 2rem 0;
}

.fellows-contact-button {
	display: inline-block;
	padding: 1rem 2.5rem;
	background-color: #9aff5b;
	color: #000;
	text-decoration: none;
	font-weight: 700;
	font-size: 1rem;
	border-radius: 8px;
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.fellows-contact-button:hover,
.fellows-contact-button:focus {
	background-color: #000;
	color: #9aff5b;
	transform: translateY(-2px);
	text-decoration: none;
	outline: 2px solid #9aff5b;
	outline-offset: 2px;
}

.fellows-contact-button:active {
	transform: translateY(0);
}

/* Print styles */
@media print {
	.fellow-card {
		break-inside: avoid;
		page-break-inside: avoid;
	}

	.fellow-card-link {
		text-decoration: underline;
	}
}
