/**
 * Frontend Styles for Projects Manager
 *
 * @package Projects_Manager
 * @since 1.0.0
 */

/* Container */
.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

/* Archive Page */
.projects-archive {
	padding: 40px 0;
}

.archive-header {
	margin-bottom: 40px;
	text-align: center;
}

.archive-title {
	font-size: 2.5em;
	margin-bottom: 12px;
	font-weight: 700;
	color: #111;
	font-family: Georgia, 'Times New Roman', serif;
	text-align: center;
}

.archive-description {
	font-size: 1.1em;
	color: #666;
	line-height: 1.6;
	max-width: 800px;
	margin: 0 auto;
}

/* Filters */
.projects-filters {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 24px;
	margin-bottom: 40px;
	padding: 0;
	background: transparent;
}

.filter-search-wrapper {
	flex: 1;
	max-width: 400px;
}

.search-input-wrapper {
	position: relative;
	display: flex;
	align-items: center;
}

.search-icon {
	position: absolute;
	left: 15px;
	width: 18px;
	height: 18px;
	color: #6b7280;
	pointer-events: none;
	z-index: 1;
}

.filter-search-input {
	width: 100% !important;
	padding: 12px 15px 12px 45px !important;
	font-size: 16px !important;
	border: 1px solid #ddd !important;
	border-radius: 4px !important;
	background: #fff !important;
	color: #111827 !important;
	transition: border-color 0.3s !important;
}

.filter-search-input::placeholder {
	color: #9ca3af !important;
}

.filter-search-input:focus {
	outline: none !important;
	border-color: #999 !important;
}

.filter-controls-wrapper {
	display: flex;
	align-items: flex-end;
	gap: 16px;
}

.filter-select-wrapper {
	display: flex;
	flex-direction: column;
	min-width: 160px;
}

.filter-select {
	width: 100%;
	padding: 11px 36px 11px 14px;
	border: 1.5px solid #d1d5db;
	border-radius: 6px;
	font-size: 14px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	background: #ffffff;
	background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23374151' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 12px 8px;
	color: #111827;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
}

.filter-select:hover {
	border-color: #9ca3af;
}

.filter-select:focus {
	outline: none;
	border-color: #dc2626;
	box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1), 0 1px 2px rgba(0, 0, 0, 0.05);
}

.filter-select option {
	padding: 8px;
	background: #ffffff;
	color: #111827;
}

.filter-select:disabled {
	background-color: #f9fafb;
	color: #6b7280;
	cursor: not-allowed;
}

/* Projects Grid */
.projects-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 30px;
	margin-bottom: 40px;
}

/* Project Card */
.project-card {
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	display: flex;
	flex-direction: column;
	height: 100%;
}

.project-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Image Wrapper with Category Tag */
.project-image-wrapper {
	position: relative;
	overflow: hidden;
	aspect-ratio: 16/9;
}

.project-image {
	position: relative;
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.project-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
	transform: scale(1.05);
}

/* Category Tag on Top Right of Image */
.project-category-tag {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
}

.project-category-tag .category-badge {
	display: inline-block;
	padding: 3.5px 7px;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(10px);
	color: #374151;
	border-radius: 9999px;
	font-size: 10.5px;
	font-weight: 700;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	line-height: 1;
}

.project-content {
	padding: 20px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

/* Project Header - Title and Status on Same Line */
.project-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 12px;
}

.project-title {
	margin: 0;
	font-size: 1.1em;
	font-weight: 600;
	line-height: 1.4;
	flex: 1;
	min-width: 0; /* Allows text truncation */
}

.project-title a {
	color: #111;
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.4;
	max-height: 2.8em; /* 2 lines * 1.4 line-height */
}

.project-title a:hover {
	color: #0369a1;
}

/* Status Badges */
.status-badge {
	display: inline-block;
	padding: 3.5px 7px;
	border-radius: 9999px;
	font-size: 10.5px;
	font-weight: 700;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	white-space: nowrap;
	flex-shrink: 0;
	line-height: 1;
}

.status-planned {
	background: #fef3c7;
	color: #92400e;
}

.status-ongoing {
	background: #10b981;
	color: #ffffff;
}

.status-completed {
	background: #065f46;
	color: #ffffff;
}

.status-on-hold {
	background: #f3f4f6;
	color: #374151;
}

.project-excerpt {
	margin-bottom: 16px;
	color: #666;
	line-height: 1.6;
	font-size: 14px;
	flex-grow: 1;
}

/* Funding Section - Enhanced UI/UX */
.project-funding {
	margin-bottom: 16px;
	padding: 16px;
	background: #f9fafb;
	border-radius: 8px;
}

.funding-header {
	margin-bottom: 8px;
}

.funding-label {
	font-size: 14px;
	font-weight: 600;
	color: #111;
}

.funding-progress-container {
	margin-bottom: 10px;
}

.funding-progress-bar {
	width: 100%;
	height: 6px;
	background-color: #e5e7eb;
	border-radius: 10px;
	overflow: hidden;
	position: relative;
}

.progress-bar.funding-progress {
	height: 100%;
	background: linear-gradient(90deg, #dc2626 0%, #b91c1c 100%);
	border-radius: 10px;
	transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
}

.progress-bar.funding-progress::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
	animation: shimmer 2s infinite;
}

@keyframes shimmer {
	0% {
		transform: translateX(-100%);
	}
	100% {
		transform: translateX(100%);
	}
}

.funding-amounts {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: #555;
}

.funding-current {
	font-weight: 600;
	color: #111;
}

.funding-separator {
	color: #9ca3af;
}

.funding-goal {
	color: #6b7280;
}

/* Action Button */
.project-action {
	margin-top: auto;
	padding-top: 8px;
}

.button {
	display: inline-block;
	padding: 12px 24px;
	background: transparent;
	color: #111;
	text-decoration: none;
	border: 2px solid #111;
	border-radius: 6px;
	font-weight: 600;
	font-size: 14px;
	transition: all 0.3s ease;
	width: 100%;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.button:hover {
	background: #111;
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.more-details-button {
	border-color: #111;
}

.more-details-button:hover {
	background: #111;
	color: #fff;
}

/* Hero Section */
.project-hero {
	position: relative;
	width: 100%;
	min-height: 500px;
	background-size: cover;
	background-position: center;
	background-color: #333;
	display: flex;
	align-items: center;
	justify-content: center;
}

.hero-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.6);
}

.hero-content {
	position: relative;
	z-index: 1;
	width: 100%;
	color: #fff;
	text-align: center;
	padding: 60px 20px;
}

.hero-content .container {
	position: relative;
}

.project-hero .project-category {
	margin-bottom: 20px;
}

.project-hero .category-badge {
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
	backdrop-filter: blur(10px);
}

.project-hero .project-title {
	font-size: 3.5em;
	margin-bottom: 20px;
	color: #fff;
}

.project-hero .project-meta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	flex-wrap: wrap;
}

.project-hero .status-badge {
	font-size: 14px;
}

.project-dates,
.project-location {
	font-size: 16px;
	opacity: 0.9;
}

.date-separator {
	margin: 0 5px;
}

.project-location .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	vertical-align: middle;
}

/* About Section */
.project-about {
	padding: 60px 0;
	background: #fff;
}

.about-card {
	background: #fff;
	padding: 40px;
	border-radius: 8px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
	margin-top: -80px;
	position: relative;
	z-index: 2;
}

.section-title {
	font-size: 2em;
	margin-bottom: 20px;
}

.project-description {
	font-size: 1.1em;
	line-height: 1.8;
	color: #333;
}

.project-description p {
	margin-bottom: 15px;
}

/* Progress Section */
.project-progress {
	padding: 60px 0;
	background: #f9f9f9;
}

.progress-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 40px;
}

.progress-column {
	background: #fff;
	padding: 30px;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.progress-title {
	font-size: 1.5em;
	margin-bottom: 20px;
}

.progress-stats {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 20px;
}

.progress-percentage {
	font-size: 1.2em;
	font-weight: 600;
}

.progress-amount {
	font-size: 1em;
	color: #666;
}

.progress-action {
	margin-top: 20px;
}

.donate-button {
	width: 100%;
	text-align: center;
}

/* Steps Section */
.project-steps {
	padding: 60px 0;
	background: #fff;
}

.steps-timeline {
	position: relative;
	padding-left: 30px;
}

.steps-timeline::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 2px;
	background: #e5e7eb;
}

.step-item {
	position: relative;
	margin-bottom: 40px;
	padding-left: 40px;
}

.step-item::before {
	content: '';
	position: absolute;
	left: -9px;
	top: 0;
	width: 16px;
	height: 16px;
	background: #0369a1;
	border-radius: 50%;
	border: 3px solid #fff;
	box-shadow: 0 0 0 2px #0369a1;
}

.step-date {
	font-size: 1.1em;
	font-weight: 600;
	color: #0369a1;
	margin-bottom: 10px;
}

.step-title {
	font-size: 1.5em;
	margin-bottom: 15px;
}

.step-description {
	margin-bottom: 20px;
	line-height: 1.8;
	color: #555;
}

.step-media-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 15px;
	margin-bottom: 20px;
}

.media-item {
	position: relative;
	border-radius: 8px;
	overflow: hidden;
}

.media-item img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform 0.3s ease;
}

.media-item:hover img {
	transform: scale(1.05);
}

.youtube-embed {
	position: relative;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
}

.youtube-embed iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.media-item video {
	width: 100%;
	height: auto;
	border-radius: 8px;
}

.step-caption {
	margin-top: 15px;
	padding-top: 15px;
	border-top: 1px solid #e5e7eb;
	font-style: italic;
	color: #666;
}

/* Lightbox */
.lightbox-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.9);
	z-index: 9999;
	align-items: center;
	justify-content: center;
}

.lightbox-overlay.active {
	display: flex;
}

.lightbox-content {
	max-width: 90%;
	max-height: 90%;
	position: relative;
}

.lightbox-content img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.lightbox-close {
	position: absolute;
	top: -40px;
	right: 0;
	color: #fff;
	font-size: 30px;
	cursor: pointer;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.lightbox-close:hover {
	color: #ccc;
}

/* Pagination */
.projects-pagination {
	margin-top: 40px;
	text-align: center;
}

/* Responsive */
@media screen and (max-width: 1199px) {
	.projects-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.progress-grid {
		grid-template-columns: 1fr;
	}
}

@media screen and (max-width: 767px) {
	.projects-grid {
		grid-template-columns: 1fr;
	}

	.projects-filters {
		flex-direction: column;
		align-items: stretch;
		gap: 20px;
	}

	.filter-search-wrapper {
		max-width: 100%;
		width: 100%;
	}

	.filter-controls-wrapper {
		width: 100%;
		flex-direction: column;
		gap: 16px;
	}

	.filter-select-wrapper {
		width: 100%;
		min-width: auto;
	}

	.project-hero .project-title {
		font-size: 2em;
	}

	.about-card {
		margin-top: -40px;
		padding: 30px 20px;
	}

	.steps-timeline {
		padding-left: 20px;
	}

	.step-item {
		padding-left: 30px;
	}
}


