/* ============================================================
   Cases archive (Case Library) — Figma-aligned, design tokens
   ============================================================ */

.ph-main.ph-cases-archive {
	padding-bottom: var(--ph-space-xl);
	background-color: var(--ph-gray-bg);
}

/* ── Hero ─────────────────────────────────────────────────── */
.ph-cases-hero {
	padding: clamp(34px, 6vw, 120px) 0 clamp(28px, 5vw, 80px);
	text-align: center;
}


.ph-cases-hero__title {
	font-size: clamp(36px, 5vw, 64px);
	font-weight: var(--ph-fw-extra);
	color: var(--ph-black);
	line-height: 1.2;
	letter-spacing: 0.02em;
	margin: 0 0 12px;
}

.ph-cases-hero__subtitle {
	font-size: clamp(18px, 2vw, 21px);
	color: var(--ph-gray);
	line-height: 1.55;
	letter-spacing: 0.02em;
	margin: 0 auto 28px;
	font-weight: var(--ph-fw-medium);
	max-width: 720px;
}

.ph-cases-hero__search-wrap {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	max-width: 760px;
	margin: 0 auto 18px;
	background: var(--ph-white);
	border: 1.25px solid var(--ph-green);
	border-radius: var(--ph-border-radius-pill);
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	padding: 10px 10px 10px 18px;
}

.ph-cases-hero__search {
	flex: 1;
	min-width: 0;
	border: 0;
	padding: 15px 12px 15px 0;
	font-size: var(--ph-text-md);
	color: var(--ph-black);
	background: transparent;
	outline: none;
}

.ph-cases-hero__search::placeholder {
	color: var(--ph-gray-mid);
}

.ph-cases-hero__search-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 50px;
	height: 50px;
	border-radius: 999px;
	background: var(--ph-green);
	color: var(--ph-white);
}

.ph-cases-hero__search-icon svg {
	display: block;
}

.ph-cases-hero__filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
}

.ph-cases-hero__select {
	appearance: none;
	-webkit-appearance: none;
	min-width: 200px;
	padding: 12px 44px 12px 18px;
	border-radius: 999px;
	border: 1px solid #e9ecef;
	background: var(--ph-white);
	font-size: 15px;
	font-weight: var(--ph-fw-medium);
	color: #4b5563;
	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 1.5L6 6.5L11 1.5' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	cursor: pointer;
}

.ph-cases-hero__select:focus {
	outline: none;
	border-color: var(--ph-green);
	box-shadow: 0 0 0 2px var(--ph-green-bg);
}

/* ── Main surface ─────────────────────────────────────────── */
.ph-cases-main {
	padding-bottom: clamp(40px, 8vw, 70px);
}

/* Featured */
.ph-case-featured[hidden] {
	display: none !important;
}

.ph-case-featured {
	display: grid;
    grid-template-columns: 45% 30%;
    gap: 28px;
    align-items: stretch;
    padding: clamp(22px, 3vw, 34px);
    margin: 0 0 40px;
    background: var(--ph-white);
    border-radius: 28px;
    border: 1px solid #eef2f6;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    justify-content: space-between;
}

.ph-case-featured__eyebrow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
	margin: 0 0 14px;
	font-size: 15px;
	font-weight: var(--ph-fw-medium);
	color: var(--ph-gray);
}

.ph-case-featured__badge {
	display: inline-flex;
	align-items: center;
	height: 28px;
	padding: 0 12px;
	border-radius: 999px;
	background: var(--ph-green-bg);
	color: var(--ph-green);
	font-size: 12px;
	font-weight: var(--ph-fw-extra);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.ph-case-featured__date {
	color: var(--ph-gray-mid);
}

.ph-case-featured__title {
	margin: 0 0 12px;
	font-size: clamp(34px, 3vw, 40px);
	line-height: 1.15;
	letter-spacing: -0.01em;
}

.ph-case-featured__title a {
	color: var(--ph-black);
	text-decoration: none;
}

.ph-case-featured__title a:hover {
	color: var(--ph-green);
}

.ph-case-featured__desc {
	margin: 0 0 18px;
	font-size: 18px;
	line-height: 1.55;
	color: var(--ph-gray);
}

.ph-case-featured__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ph-case-tag {
	display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--ph-green);
    line-height: 1;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--ph-green-bg);
    border: 1px solid var(--ph-green);
}

.ph-case-tag--muted {
	background: #eef2f6;
	color: #6b7280;
}

.ph-case-featured__right {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: clamp(12px, 2vw, 18px);
	border-radius: 20px;
	background: #f9fafb;
	border: 1px solid #eef2f6;
}

.ph-case-featured__progress {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 15px;
	font-weight: var(--ph-fw-medium);
	color: var(--ph-gray-dark);
}

.ph-case-featured__progress strong {
	font-size: 18px;
	color: var(--ph-black);
}

.ph-case-featured__bar {
	height: 10px;
	border-radius: 999px;
	background: #e5e7eb;
	overflow: hidden;
}

.ph-case-featured__bar span {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: var(--ph-green);
}

.ph-case-featured__author {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 4px;
}

.ph-case-featured__author-img {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
	border: 1px solid #e5e7eb;
}

.ph-case-featured__author-text {
	display: grid;
	gap: 2px;
}

.ph-case-featured__author-text strong {
	font-size: 16px;
	color: var(--ph-black);
}

.ph-case-featured__author-text span {
	font-size: 14px;
	color: var(--ph-gray);
}

.ph-case-featured__actions {
	display: grid;
	gap: 10px;
	margin-top: auto;
}

.ph-case-featured__actions .ph-btn {
	width: 100%;
	justify-content: center;
}

/* Recent list */
.ph-cases-list__title {
	margin: 0 0 18px;
	font-size: clamp(22px, 2.4vw, 30px);
	color: var(--ph-black);
}

/* Enforce hidden state (some resets strip the attribute’s default display) */
.ph-case-row[hidden],
.ph-cases-pager[hidden],
.ph-cases-list__empty[hidden] {
	display: none !important;
}

/* Recent case cards — Figma single-card layout */
.ph-case-row {
	display: block;
	padding: clamp(26px, 3vw, 36px) clamp(24px, 3vw, 38px);
	margin-bottom: 16px;
	background: var(--ph-white);
	border-radius: 20px;
	border: 1px solid #e8ecf0;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.ph-case-row__top {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px 16px;
	margin-bottom: 10px;
}

.ph-case-row__title {
	flex: 1 1 auto;
	min-width: min(100%, 280px);
	margin: 0;
	font-size: 1.75rem;
	font-weight: var(--ph-fw-extra);
	line-height: 1.35;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #1a1f26;
}

.ph-case-row__title a {
	color: inherit;
	text-decoration: none;
}

.ph-case-row__title a:hover {
	color: var(--ph-green);
}

.ph-case-row__date {
	flex: 0 0 auto;
	font-size: 15px;
	font-weight: var(--ph-fw-medium);
	line-height: 1.3;
	color: #6b7280;
	white-space: nowrap;
}

.ph-case-row__desc {
	margin: 0 0 20px;
	font-size: 15px;
	font-weight: var(--ph-fw-medium);
	line-height: 1.55;
	color: #6b7280;
	max-width: 720px;
}

.ph-case-row__mid {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px 28px;
	margin-bottom: 18px;
}

.ph-case-row__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 14px;
}

.ph-case-row__ph {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-right: 4px;
}
@media (max-width: 900px) {
	.ph-case-row__ph {
		flex-basis: 100%;
	}
}

.ph-case-row__ph img {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	object-fit: cover;
	border: 1px solid #e5e7eb;
	flex-shrink: 0;
}

.ph-case-row__ph-name {
	font-size: 15px;
	font-weight: var(--ph-fw-medium);
	line-height: 1.2;
	color: #1f2937;
}

/* Card-only buttons (Figma pill sizes; independent of global .ph-btn scale) */
.ph-case-row__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: var(--ph-fw-extra);
	line-height: 1;
	padding: 11px 22px;
	border-radius: 999px;
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
	white-space: nowrap;
	border: 1px solid transparent;
}

.ph-case-row__btn--primary {
	background-color: var(--ph-green);
	color: var(--ph-white);
	border-color: var(--ph-green);
}

.ph-case-row__btn--primary:hover {
	background-color: var(--ph-green-dark);
	border-color: var(--ph-green-dark);
	color: var(--ph-white);
}

.ph-case-row__btn--outline {
	background-color: var(--ph-white);
	color: #374151;
	border-color: #e5e7eb;
}

.ph-case-row__btn--outline:hover {
	border-color: var(--ph-green);
	color: var(--ph-green);
}

.ph-case-row__progress-block {
	flex: 0 0 auto;
	width: min(200px, 100%);
	min-width: 160px;
}

.ph-case-row__progress-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}

.ph-case-row__progress-label {
	font-size: 11px;
	font-weight: var(--ph-fw-extra);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #4b5563;
}

.ph-case-row__progress-pct {
	font-size: 15px;
	font-weight: var(--ph-fw-extra);
	color: var(--ph-green);
}

.ph-case-row .ph-case-row__bar {
	height: 8px;
	border-radius: 999px;
	background: #e8ecf0;
	overflow: hidden;
}

.ph-case-row .ph-case-row__bar span {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: var(--ph-green);
}

.ph-case-row__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ph-case-row__cat {
	display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--ph-green);
    line-height: 1;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--ph-green-bg);
    border: 1px solid var(--ph-green);
}

/* Pagination */
.ph-cases-pager {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-top: 22px;
}

.ph-cases-pager__btn {
	width: 40px;
	height: 40px;
	border-radius: 999px;
	border: 1px solid #e5e7eb;
	background: var(--ph-white);
	font-size: 15px;
	font-weight: var(--ph-fw-medium);
	color: #374151;
	cursor: pointer;
}

.ph-cases-pager__btn--nav {
	font-size: 18px;
	line-height: 1;
}

.ph-cases-pager__dots {
	min-width: 28px;
	text-align: center;
	font-size: 16px;
	color: #9ca3af;
	user-select: none;
}

.ph-cases-pager__btn.is-active {
	background: #111827;
	border-color: #111827;
	color: var(--ph-white);
}

.ph-cases-pager__btn:disabled {
	opacity: 0.35;
	cursor: default;
}

.ph-cases-list__empty {
	text-align: center;
	margin: 18px 0 0;
	color: var(--ph-gray);
}

@media (max-width: 900px) {
	.ph-case-featured {
		grid-template-columns: 1fr;
	}

	.ph-case-row__mid {
		flex-direction: column;
		align-items: stretch;
	}

	.ph-case-row__progress-block {
		width: 100%;
		max-width: 100%;
	}
}

@media (max-width: 640px) {
	.ph-cases-hero__filters {
		flex-direction: column;
		align-items: stretch;
	}

	.ph-cases-hero__select {
		width: 100%;
	}

	.ph-case-row__top {
		flex-direction: column;
		align-items: flex-start;
	}

	.ph-case-row__date {
		white-space: normal;
	}
}
