/**
 * Rotary Engine Public CSS
 * Styled with Modern Rotary Palette & Non-Conflicting Selectors
 */

:root {
	--rotary-blue: #00246B;
	--rotary-azure: #005DAA;
	--rotary-gold: #F7A81B;
	--rotary-gold-hover: #e09612;
	--rotary-dark: #0f172a;
	--rotary-text: #334155;
	--rotary-light-bg: #f8fafc;
	--rotary-border: #e2e8f0;
	--rotary-radius: 12px;
	--rotary-shadow: 0 4px 20px -2px rgba(0, 36, 107, 0.08);
	--rotary-shadow-hover: 0 12px 28px -4px rgba(0, 36, 107, 0.16);
	--rotary-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Component Isolation & Reset */
.rotary-engine-wrapper,
.rotary-archive-wrap,
.rotary-single-wrap,
.rotary-modal-overlay {
	box-sizing: border-box;
	-webkit-font-smoothing: antialiased;
}

.rotary-engine-wrapper *,
.rotary-engine-wrapper *::before,
.rotary-engine-wrapper *::after,
.rotary-archive-wrap *,
.rotary-archive-wrap *::before,
.rotary-archive-wrap *::after,
.rotary-single-wrap *,
.rotary-single-wrap *::before,
.rotary-single-wrap *::after,
.rotary-modal-overlay *,
.rotary-modal-overlay *::before,
.rotary-modal-overlay *::after {
	box-sizing: border-box;
}

/* Container */
.rotary-container {
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 20px;
}

.rotary-engine-wrapper {
	margin: 30px 0;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Category Filter Pills */
.rotary-category-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 28px;
	align-items: center;
}

.rotary-cat-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	background: #ffffff;
	border: 1.5px solid var(--rotary-border);
	border-radius: 30px;
	font-size: 13px;
	font-weight: 600;
	color: var(--rotary-text);
	cursor: pointer;
	transition: var(--rotary-transition);
	box-shadow: 0 2px 6px rgba(0, 36, 107, 0.04);
	outline: none;
	text-decoration: none;
	line-height: 1.4;
}

.rotary-cat-pill:hover {
	border-color: var(--rotary-azure);
	color: var(--rotary-azure);
	transform: translateY(-1px);
}

.rotary-cat-pill.active {
	background: var(--rotary-blue);
	border-color: var(--rotary-blue);
	color: #ffffff;
	box-shadow: 0 4px 14px rgba(0, 36, 107, 0.2);
}

.rotary-cat-pill .rotary-pill-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 2px 8px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 700;
	background: #f1f5f9;
	color: #475569;
	transition: var(--rotary-transition);
}

.rotary-cat-pill.active .rotary-pill-count {
	background: rgba(255, 255, 255, 0.2);
	color: #ffffff;
}

/* Filter Bar */
.rotary-filter-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	background: #ffffff;
	padding: 20px 24px;
	border-radius: var(--rotary-radius);
	box-shadow: var(--rotary-shadow);
	border: 1px solid var(--rotary-border);
	margin-bottom: 20px;
	align-items: flex-end;
}

.rotary-filter-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1 1 200px;
}

.rotary-filter-group.search-group {
	flex: 2 1 280px;
}

.rotary-filter-group label {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--rotary-blue);
	margin: 0;
}

.rotary-filter-select,
.rotary-filter-input {
	width: 100%;
	height: 44px;
	padding: 8px 14px;
	border: 1.5px solid var(--rotary-border);
	border-radius: 8px;
	font-size: 14px;
	color: var(--rotary-dark);
	background-color: #fff;
	transition: var(--rotary-transition);
}

.rotary-filter-select:focus,
.rotary-filter-input:focus {
	outline: none;
	border-color: var(--rotary-azure);
	box-shadow: 0 0 0 3px rgba(0, 93, 170, 0.15);
}

/* Grid Layouts */
.rotary-grid-layout {
	display: grid;
	gap: 28px;
}

.rotary-cols-2 { grid-template-columns: repeat(2, 1fr); }
.rotary-cols-3 { grid-template-columns: repeat(3, 1fr); }
.rotary-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 992px) {
	.rotary-cols-4, .rotary-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
	.rotary-cols-4, .rotary-cols-3, .rotary-cols-2 { grid-template-columns: 1fr; }
}

/* Board Members Tree Layout */
.rotary-board-tree-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	margin: 10px 0 30px 0;
}

.rotary-tree-leader-wrapper {
	width: 100%;
	max-width: 380px;
	margin: 0 auto 28px auto;
	position: relative;
	z-index: 2;
}

.rotary-tree-leader-wrapper .rotary-member-card {
	transition: var(--rotary-transition);
}

.rotary-tree-leader-wrapper .rotary-member-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 16px 40px rgba(0, 36, 107, 0.22);
}

.rotary-tree-leader-wrapper .rotary-member-position {
	display: inline-block;
	color: var(--rotary-gold);
	font-weight: 800;
	margin-bottom: 8px;
	letter-spacing: 0.6px;
}

.rotary-tree-grid {
	width: 100%;
	position: relative;
	z-index: 2;
}

@media (max-width: 768px) {
	.rotary-tree-leader-wrapper {
		max-width: 100%;
	}
}

/* Member Card */
.rotary-member-card {
	background: #ffffff;
	border-radius: var(--rotary-radius);
	border: 1px solid var(--rotary-border);
	box-shadow: var(--rotary-shadow);
	overflow: hidden;
	transition: var(--rotary-transition);
	display: flex;
	flex-direction: column;
	height: 100%;
}

.rotary-member-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--rotary-shadow-hover);
}

.rotary-member-photo-wrapper {
	position: relative;
	width: 100%;
	height: 280px;
	background: #f1f5f9;
	overflow: hidden;
}

.rotary-tree-leader-wrapper .rotary-member-photo-wrapper {
	height: 320px;
}

.rotary-member-photo {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
	image-rendering: -webkit-optimize-contrast;
}

.rotary-member-card:hover .rotary-member-photo {
	transform: scale(1.05);
}

.rotary-member-avatar-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, var(--rotary-blue), var(--rotary-azure));
	color: #ffffff;
	font-size: 64px;
	font-weight: 800;
}

.rotary-fy-badge {
	position: absolute;
	top: 12px;
	right: 12px;
	background: rgba(0, 36, 107, 0.9);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 20px;
	backdrop-filter: blur(4px);
}

.rotary-member-content {
	padding: 20px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.rotary-member-position {
	font-size: 12px;
	font-weight: 700;
	color: var(--rotary-gold);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 4px;
}

.rotary-member-name {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 6px 0;
	line-height: 1.3;
}

.rotary-member-name a {
	color: var(--rotary-dark);
	text-decoration: none;
	transition: var(--rotary-transition);
}

.rotary-member-name a:hover {
	color: var(--rotary-azure);
}

.rotary-member-headline {
	font-size: 13px;
	color: #64748b;
	margin: 0 0 12px 0;
}

.rotary-member-bio-snippet {
	font-size: 13px;
	color: var(--rotary-text);
	line-height: 1.5;
	margin-bottom: 16px;
}

.rotary-member-footer {
	margin-top: auto;
	padding-top: 14px;
	border-top: 1px solid var(--rotary-border);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.rotary-member-socials {
	display: flex;
	gap: 10px;
}

.rotary-member-socials a {
	color: #64748b;
	transition: var(--rotary-transition);
	display: inline-flex;
	align-items: center;
	text-decoration: none;
}

.rotary-member-socials a:hover {
	color: var(--rotary-blue);
}

.rotary-btn-profile {
	font-size: 12px;
	font-weight: 700;
	color: var(--rotary-blue);
	text-decoration: none;
	transition: var(--rotary-transition);
}

.rotary-btn-profile:hover {
	color: var(--rotary-azure);
}

/* Project Card */
.rotary-project-card {
	background: #ffffff;
	border-radius: var(--rotary-radius);
	border: 1px solid var(--rotary-border);
	box-shadow: var(--rotary-shadow);
	overflow: hidden;
	transition: var(--rotary-transition);
	display: flex;
	flex-direction: column;
}

.rotary-project-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--rotary-shadow-hover);
}

.rotary-project-photo-wrapper {
	position: relative;
	width: 100%;
	height: 220px;
	background: #f1f5f9;
	overflow: hidden;
}

.rotary-project-photo {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
	image-rendering: -webkit-optimize-contrast;
}

.rotary-project-card:hover .rotary-project-photo {
	transform: scale(1.05);
}

.rotary-featured-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	background: var(--rotary-gold);
	color: #000;
	font-size: 11px;
	font-weight: 800;
	padding: 4px 10px;
	border-radius: 20px;
}

.rotary-status-badge {
	position: absolute;
	top: 12px;
	right: 12px;
	padding: 4px 10px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 700;
	text-transform: capitalize;
}

.rotary-status-completed { background: #dcfce7; color: #15803d; }
.rotary-status-ongoing { background: #dbeafe; color: #1e40af; }
.rotary-status-upcoming { background: #fef3c7; color: #b45309; }

.rotary-project-content {
	padding: 20px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.rotary-project-category {
	font-size: 12px;
	font-weight: 700;
	color: var(--rotary-azure);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 6px;
}

.rotary-project-title {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 10px 0;
	line-height: 1.3;
}

.rotary-project-title a {
	color: var(--rotary-dark);
	text-decoration: none;
}

.rotary-project-meta-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 12px 0;
}

.rotary-meta-pill {
	background: #f1f5f9;
	color: #475569;
	font-size: 12px;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 6px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.rotary-meta-pill.rotary-budget-pill {
	background: #eff6ff;
	color: var(--rotary-azure);
	font-weight: 700;
}

.rotary-project-footer {
	margin-top: auto;
	padding-top: 14px;
	border-top: 1px solid var(--rotary-border);
}

.rotary-btn-project {
	display: inline-block;
	width: 100%;
	text-align: center;
	background: var(--rotary-blue);
	color: #ffffff;
	padding: 10px 16px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 13px;
	text-decoration: none;
	transition: var(--rotary-transition);
}

.rotary-btn-project:hover {
	background: var(--rotary-azure);
	color: #ffffff;
}

/* Pagination */
.rotary-pagination {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 36px;
}

.rotary-page-num {
	width: 40px;
	height: 40px;
	border-radius: 8px;
	border: 1px solid var(--rotary-border);
	background: #fff;
	color: var(--rotary-dark);
	font-weight: 600;
	cursor: pointer;
	transition: var(--rotary-transition);
}

.rotary-page-num.active,
.rotary-page-num:hover {
	background: var(--rotary-blue);
	color: #fff;
	border-color: var(--rotary-blue);
}

/* Single Page & Archive Wrappers */
.rotary-archive-wrap,
.rotary-single-wrap {
	padding: 40px 0;
}

.rotary-archive-header {
	margin-bottom: 32px;
	text-align: center;
}

.rotary-archive-title {
	font-size: 32px;
	font-weight: 800;
	margin: 0 0 10px 0;
	color: var(--rotary-dark);
}

.rotary-archive-subtitle {
	font-size: 16px;
	color: #64748b;
	margin: 0;
}

.rotary-single-member-header {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 36px;
	align-items: center;
	background: #fff;
	padding: 30px;
	border-radius: var(--rotary-radius);
	box-shadow: var(--rotary-shadow);
	margin-bottom: 30px;
}

.rotary-single-member-photo img {
	width: 100%;
	border-radius: 12px;
	object-fit: cover;
}

.rotary-single-title {
	font-size: 32px;
	font-weight: 800;
	margin: 8px 0;
	color: var(--rotary-dark);
}

.rotary-single-position {
	color: var(--rotary-gold);
	font-size: 16px;
	text-transform: uppercase;
	font-weight: 700;
	margin: 0;
}

.rotary-project-layout-grid {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 36px;
}

@media (max-width: 860px) {
	.rotary-single-member-header,
	.rotary-project-layout-grid {
		grid-template-columns: 1fr;
	}
}

.rotary-spec-box {
	background: #fff;
	padding: 24px;
	border-radius: var(--rotary-radius);
	box-shadow: var(--rotary-shadow);
	border: 1px solid var(--rotary-border);
}

.rotary-spec-box h3 {
	margin-top: 0;
	font-size: 18px;
	font-weight: 700;
	color: var(--rotary-blue);
	border-bottom: 2px solid var(--rotary-border);
	padding-bottom: 10px;
}

.rotary-spec-item {
	display: flex;
	justify-content: space-between;
	padding: 10px 0;
	border-bottom: 1px dashed var(--rotary-border);
	font-size: 14px;
}

.rotary-spec-item .rotary-spec-label {
	color: #64748b;
	font-weight: 500;
}

.rotary-spec-item .rotary-spec-value {
	font-weight: 700;
	color: var(--rotary-dark);
}

.rotary-spec-item .rotary-budget-val {
	color: var(--rotary-azure);
	font-size: 16px;
}

/* Project Video Section */
.rotary-project-video-section {
	margin-top: 32px;
	margin-bottom: 32px;
}

.rotary-project-video-section h2 {
	font-size: 22px;
	font-weight: 700;
	color: var(--rotary-blue);
	margin-bottom: 16px;
}

.rotary-video-wrapper {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000000;
	border-radius: var(--rotary-radius);
	overflow: hidden;
	box-shadow: var(--rotary-shadow);
}

.rotary-video-wrapper iframe,
.rotary-video-wrapper embed,
.rotary-video-wrapper object,
.rotary-video-wrapper video {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Modal Popup Styles */
.rotary-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(15, 23, 42, 0.75);
	backdrop-filter: blur(6px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 999999;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	padding: 20px;
}

.rotary-modal-overlay.is-active {
	opacity: 1;
	pointer-events: auto;
}

.rotary-modal-dialog {
	background: #ffffff;
	border-radius: 16px;
	width: 100%;
	max-width: 760px;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
	position: relative;
	transform: scale(0.94);
	transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.rotary-modal-overlay.is-active .rotary-modal-dialog {
	transform: scale(1);
}

.rotary-member-modal-content {
	position: relative;
	padding: 32px;
}

.rotary-modal-close {
	position: absolute;
	top: 16px;
	right: 16px;
	background: #f1f5f9;
	border: none;
	font-size: 24px;
	line-height: 1;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	cursor: pointer;
	color: #64748b;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: var(--rotary-transition);
	z-index: 10;
}

.rotary-modal-close:hover {
	background: #e2e8f0;
	color: var(--rotary-dark);
}

.rotary-modal-header {
	display: grid;
	grid-template-columns: 220px 1fr;
	gap: 28px;
	align-items: start;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--rotary-border);
	margin-bottom: 24px;
}

.rotary-modal-photo {
	position: relative;
	width: 100%;
	height: 280px;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	border-radius: 12px;
	background: #f1f5f9;
	box-shadow: var(--rotary-shadow);
	flex-shrink: 0;
}

.rotary-modal-photo img,
.rotary-modal-photo .rotary-modal-member-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	border-radius: 12px;
	display: block;
}

.rotary-modal-photo .rotary-member-avatar-placeholder {
	width: 100%;
	height: 100%;
	border-radius: 12px;
}

.rotary-modal-info .rotary-fy-pill {
	display: inline-block;
	background: rgba(0, 36, 107, 0.08);
	color: var(--rotary-blue);
	font-size: 11px;
	font-weight: 700;
	padding: 3px 10px;
	border-radius: 20px;
	margin-bottom: 8px;
}

.rotary-modal-info .rotary-single-title {
	font-size: 26px;
	margin: 6px 0 8px 0;
	line-height: 1.25;
}

.rotary-modal-info .rotary-single-company {
	font-size: 14px;
	color: #64748b;
	margin-bottom: 14px;
}

.rotary-modal-info .rotary-single-contacts {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 16px;
}

.rotary-modal-info .rotary-contact-item {
	font-size: 13px;
	color: var(--rotary-text);
	text-decoration: none;
	display: flex;
	align-items: center;
	gap: 6px;
}

.rotary-modal-info .rotary-contact-item:hover {
	color: var(--rotary-azure);
}

.rotary-modal-info .rotary-single-socials {
	display: flex;
	gap: 10px;
}

.rotary-modal-info .rotary-social-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
	transition: var(--rotary-transition);
}

.rotary-modal-info .rotary-social-btn.linkedin {
	background: #eff6ff;
	color: #0077b5;
}

.rotary-modal-info .rotary-social-btn.facebook {
	background: #eff6ff;
	color: #1877f2;
}

.rotary-modal-info .rotary-social-btn:hover {
	opacity: 0.85;
}

.rotary-modal-body h3 {
	font-size: 16px;
	font-weight: 700;
	color: var(--rotary-blue);
	margin-top: 0;
	margin-bottom: 12px;
}

.rotary-modal-body .rotary-entry-content {
	font-size: 14px;
	line-height: 1.6;
	color: var(--rotary-text);
}

.rotary-modal-footer {
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px dashed var(--rotary-border);
	text-align: right;
}

.rotary-btn-full-page {
	font-size: 13px;
	font-weight: 700;
	color: var(--rotary-azure);
	text-decoration: none;
}

.rotary-btn-full-page:hover {
	text-decoration: underline;
}

/* Modal Loader & Error */
.rotary-modal-loader {
	padding: 48px;
	text-align: center;
	color: #64748b;
}

.rotary-spinner {
	width: 36px;
	height: 36px;
	border: 3px solid var(--rotary-border);
	border-top-color: var(--rotary-blue);
	border-radius: 50%;
	animation: rotary-spin 0.8s linear infinite;
	margin: 0 auto 12px auto;
}

@keyframes rotary-spin {
	to { transform: rotate(360deg); }
}

.rotary-modal-error {
	padding: 32px;
	text-align: center;
	color: #ef4444;
	position: relative;
}

@media (max-width: 640px) {
	.rotary-modal-dialog {
		width: 92%;
		margin: 20px auto;
	}
	.rotary-modal-header {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	.rotary-modal-photo {
		width: 180px;
		height: 240px;
		margin: 0 auto;
	}
	.rotary-modal-info {
		text-align: center;
	}
	.rotary-modal-info .rotary-single-contacts,
	.rotary-modal-info .rotary-single-socials {
		justify-content: center;
	}
	.rotary-member-modal-content {
		padding: 20px;
	}
}
