/* =========================================================================
   Portfolio Page — Podwires Brand Theme
   Modelled after unicornfactory.nz/case-studies
   ========================================================================= */

:root {
	/* Podwires brand: navy blue + red from logo */
	--pf-bg:          #0a0a1a;
	--pf-card-bg:     #111132;
	--pf-card-border: rgba(27, 20, 100, 0.35);
	--pf-card-radius: 14px;
	--pf-navy:        #1B1464;
	--pf-navy-light:  #2D2A6E;
	--pf-red:         #CC2229;
	--pf-red-dark:    #A81D23;
	--pf-red-glow:    rgba(204, 34, 41, 0.35);
	--pf-purple:      #1B1464;
	--pf-purple-dark: #140F50;
	--pf-purple-glow: rgba(27, 20, 100, 0.35);
	--pf-white:       #ffffff;
	--pf-gray-100:    #f5f5f5;
	--pf-gray-300:    #d1d5db;
	--pf-gray-400:    #9ca3af;
	--pf-gray-500:    #6b7280;
	--pf-gray-600:    #4b5563;
	--pf-gray-700:    #374151;
	--pf-gray-800:    #1f2937;
	--pf-gray-900:    #111827;
	--pf-sidebar-w:   300px;
	--pf-gap:         24px;
	--pf-font:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Page base ──────────────────────────────────────────────────────────── */
.pf-page {
	background: var(--pf-bg);
	color: var(--pf-white);
	font-family: var(--pf-font);
	min-height: 100vh;
}

/* =========================================================================
   HERO
   ========================================================================= */
.pf-hero {
	background: var(--pf-bg);
	padding: 80px 24px 64px;
	text-align: center;
	position: relative;
	overflow: hidden;
}

/* Decorative brand swirl (like UF's purple strokes) */
.pf-hero::before,
.pf-hero::after {
	content: '';
	position: absolute;
	width: 300px;
	height: 300px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(27, 20, 100, 0.12) 0%, transparent 70%);
	pointer-events: none;
}
.pf-hero::before { top: -80px; left: -100px; }
.pf-hero::after  { bottom: -80px; right: -100px; }

.pf-hero__inner {
	max-width: 800px;
	margin: 0 auto;
	position: relative;
	z-index: 1;
}

.pf-hero__mascot {
	width: 120px;
	height: 120px;
	object-fit: contain;
	margin: 0 auto 24px;
	display: block;
	filter: drop-shadow(0 4px 20px rgba(204, 34, 41, 0.25));
	animation: pf-float 3s ease-in-out infinite;
}

@keyframes pf-float {
	0%, 100% { transform: translateY(0); }
	50%      { transform: translateY(-8px); }
}

.pf-hero__title {
	font-size: clamp(2rem, 5vw, 3.25rem);
	font-weight: 800;
	line-height: 1.15;
	color: var(--pf-white);
	margin: 0 0 20px;
	letter-spacing: -0.02em;
}

.pf-hero__subtitle {
	font-size: clamp(1rem, 2vw, 1.125rem);
	color: var(--pf-gray-400);
	line-height: 1.65;
	margin: 0 0 36px;
	max-width: 640px;
	margin-left: auto;
	margin-right: auto;
}

.pf-hero__ctas {
	display: flex;
	gap: 16px;
	justify-content: center;
	flex-wrap: wrap;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.pf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 28px;
	border-radius: 10px;
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.2s ease;
	cursor: pointer;
	border: 2px solid transparent;
	line-height: 1;
}

.pf-btn--primary {
	background: var(--pf-red);
	color: var(--pf-white);
	border-color: var(--pf-red);
}
.pf-btn--primary:hover {
	background: var(--pf-red-dark);
	border-color: var(--pf-red-dark);
	color: var(--pf-white);
	transform: translateY(-1px);
	box-shadow: 0 4px 20px var(--pf-red-glow);
	text-decoration: none;
}

.pf-btn--outline {
	background: transparent;
	color: var(--pf-white);
	border-color: var(--pf-white);
}
.pf-btn--outline:hover {
	background: var(--pf-white);
	color: var(--pf-bg);
	transform: translateY(-1px);
	text-decoration: none;
}

/* =========================================================================
   FILTER + GRID SECTION
   ========================================================================= */
.pf-content {
	background: var(--pf-bg);
	padding: 0 24px 80px;
}

.pf-content__inner {
	max-width: 1240px;
	margin: 0 auto;
	display: flex;
	gap: 40px;
	align-items: flex-start;
}

/* ── Mobile filter toggle (hidden on desktop) ──────────────────────────── */
.pf-mobile-toggle {
	display: none;
}

/* ── Sidebar ────────────────────────────────────────────────────────────── */
.pf-sidebar {
	width: var(--pf-sidebar-w);
	min-width: var(--pf-sidebar-w);
	position: sticky;
	top: 100px;
	flex-shrink: 0;
}

.pf-sidebar__heading {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--pf-white);
	margin: 0 0 0;
}

/* Section header with title + clear */
.pf-sidebar__section { margin: 0; }

.pf-sidebar__section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
}

.pf-sidebar__section-title {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--pf-gray-300);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin: 0;
}

.pf-sidebar__clear {
	background: none;
	border: none;
	color: var(--pf-red);
	font-size: 0.82rem;
	font-weight: 600;
	cursor: pointer;
	padding: 0;
	font-family: var(--pf-font);
	transition: opacity 0.15s;
}
.pf-sidebar__clear:hover {
	text-decoration: underline;
	opacity: 0.85;
}

/* Search field */
.pf-search-field {
	position: relative;
}

.pf-search-field__icon {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--pf-gray-500);
	font-size: 0.85rem;
	pointer-events: none;
}

.pf-search-field__input {
	width: 100%;
	padding: 12px 14px 12px 40px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid var(--pf-gray-700);
	border-radius: 10px;
	color: var(--pf-white);
	font-size: 0.9rem;
	font-family: var(--pf-font);
	outline: none;
	transition: border-color 0.2s ease, background 0.2s ease;
	box-sizing: border-box;
}
.pf-search-field__input::placeholder {
	color: var(--pf-gray-600);
}
.pf-search-field__input:focus {
	border-color: var(--pf-navy-light);
	background: rgba(27, 20, 100, 0.08);
}

/* Divider */
.pf-sidebar__divider {
	border: none;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	margin: 24px 0;
}

/* ── Filter list (categories & services) ───────────────────────────────── */
.pf-filter-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.pf-filter-list__item {
	margin: 0;
}

/* Custom checkbox */
.pf-checkbox {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	font-size: 0.9rem;
	color: var(--pf-gray-300);
	user-select: none;
	line-height: 1.3;
	transition: color 0.15s;
}
.pf-checkbox:hover {
	color: var(--pf-white);
}

.pf-checkbox__input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.pf-checkbox__custom {
	width: 20px;
	height: 20px;
	min-width: 20px;
	border: 2px solid var(--pf-gray-600);
	border-radius: 5px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.15s ease;
	background: transparent;
}

.pf-checkbox__input:checked + .pf-checkbox__custom {
	background: var(--pf-red);
	border-color: var(--pf-red);
}

.pf-checkbox__input:checked + .pf-checkbox__custom::after {
	content: '';
	width: 6px;
	height: 10px;
	border: 2px solid var(--pf-white);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
	margin-top: -2px;
}

.pf-checkbox__input:focus-visible + .pf-checkbox__custom {
	outline: 2px solid var(--pf-red);
	outline-offset: 2px;
}

.pf-checkbox__label {
	flex: 1;
}

.pf-checkbox__count {
	color: var(--pf-red);
	font-weight: 600;
	font-size: 0.8rem;
	min-width: 20px;
	text-align: right;
}

/* ── Grid area ──────────────────────────────────────────────────────────── */
.pf-grid-area {
	flex: 1;
	min-width: 0;
}

.pf-grid-area__header {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 24px;
}

.pf-grid-area__count {
	font-size: 0.9rem;
	color: var(--pf-gray-400);
	margin: 0;
}
.pf-grid-area__count span {
	color: var(--pf-red);
	font-weight: 600;
}

/* ── Card Grid ──────────────────────────────────────────────────────────── */
.pf-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--pf-gap);
}

/* ── Card ────────────────────────────────────────────────────────────────── */
.pf-card {
	background: var(--pf-card-bg);
	border-radius: var(--pf-card-radius);
	overflow: hidden;
	border: 1px solid var(--pf-card-border);
	display: flex;
	flex-direction: column;
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.pf-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
	border-color: rgba(27, 20, 100, 0.5);
}

.pf-card__thumb-link {
	display: block;
	text-decoration: none;
}

.pf-card__thumb {
	width: 100%;
	height: 220px;
	background-size: cover;
	background-position: center;
	background-color: #12122a;
}

.pf-card__thumb--empty {
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(27, 20, 100, 0.35);
	font-size: 2.5rem;
}

.pf-card__body {
	padding: 20px;
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 16px;
}

.pf-card__title {
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.35;
	margin: 0;
}
.pf-card__title a {
	color: var(--pf-white);
	text-decoration: none;
	transition: color 0.2s;
}
.pf-card__title a:hover {
	color: var(--pf-red);
}

/* Author row */
.pf-card__author {
	margin-top: auto;
}

.pf-card__author-link {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	transition: opacity 0.2s;
}
a.pf-card__author-link:hover {
	opacity: 0.85;
	text-decoration: none;
}

.pf-card__avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	object-fit: cover;
	background: var(--pf-gray-700);
	border: 2px solid rgba(27, 20, 100, 0.3);
}

.pf-card__author-info {
	display: flex;
	flex-direction: column;
	gap: 1px;
}

.pf-card__author-name {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--pf-white);
}

.pf-card__author-role {
	font-size: 0.75rem;
	color: var(--pf-gray-400);
}

/* ── Hidden card (infinite scroll) ──────────────────────────────────────── */
.pf-card--hidden {
	display: none;
}

/* ── Loading spinner ───────────────────────────────────────────────────── */
.pf-loader {
	display: flex;
	justify-content: center;
	padding: 40px 0;
}

.pf-loader__spinner {
	width: 36px;
	height: 36px;
	border: 3px solid rgba(255, 255, 255, 0.1);
	border-top-color: var(--pf-red);
	border-radius: 50%;
	animation: pf-spin 0.7s linear infinite;
}

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

/* ── Empty states ───────────────────────────────────────────────────────── */
.pf-empty {
	text-align: center;
	padding: 60px 20px;
	color: var(--pf-gray-400);
}
.pf-empty i {
	font-size: 2.5rem;
	margin-bottom: 16px;
	display: block;
	color: var(--pf-gray-600);
}
.pf-empty p {
	font-size: 1rem;
	margin: 0;
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */

/* Tablet */
@media (max-width: 1024px) {
	.pf-content__inner {
		gap: 24px;
	}
	.pf-sidebar {
		--pf-sidebar-w: 240px;
		min-width: 240px;
		width: 240px;
	}
}

/* Mobile */
@media (max-width: 768px) {
	.pf-hero {
		padding: 56px 20px 48px;
	}

	.pf-content {
		padding: 0 16px 48px;
	}

	.pf-content__inner {
		flex-direction: column;
		gap: 0;
	}

	/* Mobile toggle visible */
	.pf-mobile-toggle {
		display: flex;
		align-items: center;
		gap: 8px;
		background: var(--pf-card-bg);
		color: var(--pf-white);
		border: 1px solid var(--pf-gray-700);
		border-radius: 10px;
		padding: 12px 20px;
		font-size: 0.9rem;
		font-weight: 600;
		cursor: pointer;
		width: 100%;
		justify-content: center;
		margin-bottom: 20px;
		font-family: var(--pf-font);
	}

	/* Sidebar collapsible */
	.pf-sidebar {
		position: relative;
		top: 0;
		width: 100%;
		min-width: 100%;
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.3s ease, padding 0.3s ease;
		padding: 0;
	}

	.pf-sidebar--open {
		max-height: 800px;
		padding-bottom: 24px;
		overflow: visible;
	}

	.pf-sidebar__heading {
		margin-top: 16px;
	}

	/* Single column grid */
	.pf-grid {
		grid-template-columns: 1fr;
	}

	/* Buttons full-width */
	.pf-hero__ctas {
		flex-direction: column;
		align-items: center;
	}
	.pf-btn {
		width: 100%;
		max-width: 320px;
	}
}

/* Small phones */
@media (max-width: 400px) {
	.pf-card__body {
		padding: 16px;
	}
	.pf-card__thumb {
		height: 160px;
	}
}
