/*!
 * Single project page (modules/functions/projects-full.tpl; behaviour js/project-page.js).
 * Shared pieces come from css/service-page.css (.rp-sv-card, .rp-sv-btn, dark band .rp-sv-more) and their
 * light/dark versions from css/service-theme.css. Grey at rest, colour on hover. IranSans.
 */
.rp-pj {
	--pj-red: #fb4848; --pj-red-soft: #fff3f3; --pj-ink: #29292B; --pj-text: #4a4a51; --pj-muted: #6b6b72;
	--pj-line: #e8e8ec; --pj-soft: #f6f6f8; --pj-card: #fff; --pj-ease: cubic-bezier(.22, 1, .36, 1);
	direction: rtl; font-family: 'IranSans', sans-serif; color: var(--pj-ink); padding-bottom: 70px;
}
.rp-pj *, .rp-pj *::before, .rp-pj *::after { box-sizing: border-box; }
.project-single-area:has(.rp-pj) { padding: 30px 0 0; }

/* ------------------------------------------------------------------ hero */
.rp-pj-hero { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end; min-height: clamp(360px, 52vw, 560px); border-radius: 30px; background: #151517; }
.rp-pj-cover { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); transform: scale(1.02); transition: filter .8s var(--pj-ease), transform 1.4s var(--pj-ease); }
.rp-pj-hero:hover .rp-pj-cover { filter: none; transform: scale(1.04); }
.rp-pj-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(12, 12, 14, .92) 0%, rgba(12, 12, 14, .55) 34%, rgba(12, 12, 14, 0) 70%); }
.rp-pj-hero-in { width: 100%; padding: 40px 44px 70px; color: #fff; }
.rp-pj-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.rp-pj-tags span { display: inline-flex; align-items: center; gap: 7px; padding: 5px 13px; border-radius: 999px; background: rgba(255, 255, 255, .12); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font-family: 'IranSansMedium', 'IranSans', sans-serif; font-size: 12.5px; color: #fff; }
.rp-pj-tags span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--pj-red); }
.rp-pj-title { margin: 0; max-width: 820px; font-family: 'IranSansBlack', 'IranSans', sans-serif; font-weight: normal; font-size: clamp(26px, 3.2vw, 44px); line-height: 1.45; color: #fff; text-wrap: balance; }
.rp-pj-lead { max-width: 760px; margin: 12px 0 0; font-size: 15.5px; line-height: 2; color: rgba(255, 255, 255, .78); text-wrap: pretty; }

/* ------------------------------------------------------------------ facts */
.rp-pj-facts { display: flex; flex-wrap: wrap; gap: 0; margin: -36px 30px 0; padding: 22px 26px; position: relative; z-index: 2; border: 1px solid var(--pj-line); border-radius: 22px; background: var(--pj-card); box-shadow: 0 30px 60px -40px rgba(20, 20, 24, .5); }
.rp-pj-facts > div { flex: 1 1 auto; min-width: 140px; padding: 4px 22px; border-left: 1px solid var(--pj-line); }
.rp-pj-facts > div:last-child { border-left: 0; }
.rp-pj-facts > div:first-child { padding-right: 0; }
.rp-pj-facts dt { margin: 0 0 4px; font-family: 'IranSans', sans-serif; font-weight: normal; font-size: 12.5px; color: var(--pj-muted); }
.rp-pj-facts dd { margin: 0; font-family: 'IranSansBold', 'IranSans', sans-serif; font-size: 15px; line-height: 1.7; color: var(--pj-ink); }
.rp-pj-facts .rp-pj-facts-svc { flex-grow: 2; }
.rp-pj-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-pj-chips a, .rp-pj-chips span { display: inline-flex; align-items: center; padding: 3px 12px; border: 1px solid var(--pj-line); border-radius: 999px; font-family: 'IranSansMedium', 'IranSans', sans-serif; font-size: 12.5px; color: var(--pj-ink) !important; text-decoration: none !important; transition: border-color .25s, color .25s, background-color .25s; }
.rp-pj-chips a:hover { border-color: var(--pj-red); color: var(--pj-red) !important; background: var(--pj-red-soft); }
.rp-pj-facts dd a { color: var(--pj-red); }

/* ------------------------------------------------------------------ story + aside */
.rp-pj-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; margin-top: 54px; align-items: start; }
.rp-pj-aside { position: sticky; top: 96px; }
.rp-pj-body { min-width: 0; font-size: 15.5px; line-height: 2.1; color: var(--pj-text); }
.rp-pj-body p { margin: 0 0 16px; }
.rp-pj-body h2, .rp-pj-body h3 { margin: 30px 0 12px; font-family: 'IranSansBold', 'IranSans', sans-serif; font-weight: normal; font-size: 20px; line-height: 1.7; color: var(--pj-ink); }
.rp-pj-body h2::before, .rp-pj-body h3::before { content: ""; display: inline-block; width: 18px; height: 2px; margin-left: 10px; vertical-align: middle; border-radius: 2px; background: var(--pj-red); }
.rp-pj-body ul { margin: 0 0 18px; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.rp-pj-body ul li { position: relative; padding: 12px 16px 12px 14px; padding-right: 44px; border: 1px solid var(--pj-line); border-radius: 14px; background: var(--pj-card); font-size: 14.5px; line-height: 1.8; color: var(--pj-ink); }
.rp-pj-body ul li::before { content: "\f00c"; position: absolute; right: 14px; top: 14px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--pj-red-soft); color: var(--pj-red); font: normal 9px/1 FontAwesome; }
.rp-pj-body strong, .rp-pj-body b { color: var(--pj-ink); font-family: 'IranSansBold', 'IranSans', sans-serif; font-weight: normal; }
.rp-pj-body a { color: var(--pj-red); }
.rp-pj-body img { max-width: 100%; height: auto; border-radius: 18px; filter: grayscale(1); transition: filter .6s var(--pj-ease); }
.rp-pj-body img:hover { filter: none; }
.rp-pj-body iframe, .rp-pj-body video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; margin: 6px 0 20px; border: 0; border-radius: 20px; background: #151517; }
.rp-pj-body [style*="color"] { color: inherit !important; }
/* the last paragraph is the standard "done by Rang-e Panjom" line: quieter */
.rp-pj-body > p:last-child { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--pj-line); font-size: 13.5px; color: var(--pj-muted); }

/* ------------------------------------------------------------------ gallery */
.rp-pj-gallery { margin-top: 56px; }
.rp-pj-shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.rp-pj-shot { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 3; border-radius: 18px; background: var(--pj-soft); cursor: zoom-in; }
.rp-pj-shot:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.rp-pj-shot:only-child { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 16 / 9; }
.rp-pj-shot:first-child:nth-last-child(2) { grid-row: auto; aspect-ratio: 4 / 3; }
.rp-pj-shot img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transition: filter .6s var(--pj-ease), transform .9s var(--pj-ease); }
.rp-pj-shot:hover img { filter: none; transform: scale(1.04); }
.rp-pj-shot:focus-visible { outline: 2px solid var(--pj-red); outline-offset: 3px; }

/* lightbox */
.rp-pj-zoom { width: min(1200px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 20px; background: #0d0d0f; overflow: hidden; }
.rp-pj-zoom::backdrop { background: rgba(0, 0, 0, .78); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.rp-pj-zoom img { display: block; width: 100%; max-height: calc(100vh - 32px); object-fit: contain; }
.rp-pj-zoom-close { position: absolute; top: 12px; left: 12px; width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 50%; background: rgba(0, 0, 0, .5); color: #fff; font: 22px/38px Arial, sans-serif; cursor: pointer; transition: background-color .25s; }
.rp-pj-zoom-close:hover { background: var(--pj-red); border-color: var(--pj-red); }

/* ------------------------------------------------------------------ previous / next */
.rp-pj-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 56px; }
.rp-pj-step {
	display: flex; align-items: center; gap: 14px; padding: 20px 22px; border: 1px solid var(--pj-line); border-radius: 20px; background: var(--pj-card);
	color: var(--pj-ink) !important; text-decoration: none !important; transition: border-color .3s, box-shadow .4s var(--pj-ease), transform .4s var(--pj-ease);
}
.rp-pj-step--next { grid-column: 2; justify-content: flex-end; text-align: left; }
.rp-pj-step span { min-width: 0; }
.rp-pj-step small { display: block; font-size: 12.5px; color: var(--pj-muted); }
.rp-pj-step b { display: block; font-family: 'IranSansBold', 'IranSans', sans-serif; font-weight: normal; font-size: 15px; line-height: 1.7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-pj-step i { flex: 0 0 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--pj-soft); color: #8b8b93; transition: background-color .3s, color .3s; }
.rp-pj-step:hover { border-color: rgba(251, 72, 72, .4); transform: translateY(-3px); box-shadow: 0 22px 40px -28px rgba(251, 72, 72, .5); }
.rp-pj-step:hover i { background: var(--pj-red); color: #fff; }

/* soft reveal */
.rp-pj-reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--pj-ease), transform .7s var(--pj-ease); }
.rp-pj-reveal.is-in { opacity: 1; transform: none; }

/* ------------------------------------------------------------------ dark mode */
html[data-theme="dark"] .rp-pj { --pj-ink: #f2f2f5; --pj-text: #c6c6cd; --pj-muted: #9b9ba4; --pj-line: rgba(255, 255, 255, .09); --pj-soft: #232327; --pj-card: #18181b; --pj-red-soft: rgba(251, 72, 72, .13); }
html[data-theme="dark"] .project-single-area { background: #0f0f11; }
html[data-theme="dark"] .rp-pj-facts { box-shadow: 0 30px 60px -40px rgba(0, 0, 0, .9); }
html[data-theme="dark"] .rp-pj-step i { color: #a3a3ac; }

/* ------------------------------------------------------------------ tablet / phone */
@media (max-width: 991px) {
	.rp-pj-layout { grid-template-columns: 1fr; gap: 28px; margin-top: 36px; }
	.rp-pj-aside { position: static; }
	.rp-pj-facts { margin: -30px 14px 0; }
	.rp-pj-facts > div { flex-basis: 45%; padding: 8px 14px; border-left: 0; }
	.rp-pj-facts > div:first-child { padding-right: 14px; }
}
@media (max-width: 575px) {
	.rp-pj-hero { border-radius: 22px; min-height: 380px; }
	.rp-pj-hero-in { padding: 26px 20px 46px; }
	.rp-pj-lead { font-size: 14px; }
	.rp-pj-facts { margin: -26px 8px 0; padding: 14px; border-radius: 18px; }
	.rp-pj-facts > div { flex-basis: 100%; padding: 8px 4px; border-bottom: 1px solid var(--pj-line); }
	.rp-pj-facts > div:last-child { border-bottom: 0; }
	.rp-pj-shots { grid-template-columns: 1fr 1fr; }
	.rp-pj-nav { grid-template-columns: 1fr; }
	.rp-pj-step--next { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
	.rp-pj *, .rp-pj *::before, .rp-pj *::after { animation: none !important; transition: none !important; }
	.rp-pj-reveal { opacity: 1; transform: none; }
}
