/*
Theme Name: Avan & Peydaiesh
Theme URI: https://avanstudio.com
Author: Hamed
Description: Ultra-minimal brutalist architecture portfolio theme with multi-domain branding, Lottie splash intro, and Elementor-ready home canvas. Custom-coded, no page builder dependency required.
Version: 0.1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: avan-peydaiesh
Tested up to: 6.6
*/

/* ==========================================================================
   Reset & base
   ========================================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
	--bg: #000000;
	--fg: #ffffff;
	--bg-inverse: #ffffff;
	--fg-inverse: #000000;
	--line: rgba(255, 255, 255, 0.25);
	--gap: clamp(24px, 4vw, 64px);
	--ease: cubic-bezier(0.65, 0, 0.35, 1);
}

::selection{
	background: #ffffff;
	color: #000;
}

@font-face {
	font-family: 'Gothic';
	src: url('assets/fonts/gothic.woff');
}
@font-face {
	font-family: 'MyriadPro';
	src: url('assets/fonts/MyriadPro-Regular.woff');
}
@font-face {
	font-family: 'yekan';
	src: url('assets/fonts/YekanBakh-VF.woff2') format('woff2');
}

html, body { background: var(--bg); color: var(--fg); }

body {
	font-family: 'Gothic', 'MyriadPro', Arial, -apple-system, sans-serif;
	font-weight: 300;
	font-size: 16px;
	line-height: 1.5;
	letter-spacing: 0.01em;
	-webkit-font-smoothing: antialiased;
	min-height: 100vh;
	overflow-x: hidden;
}

body.rtl,body.rtl h1,body.rtl h2,body.rtl h3,body.rtl h4,body.rtl h5,body.rtl h6,body.rtl span,body.rtl a,body.rtl li,body.rtl p,body.rtl label,body.rtl input{
    font-family: 'yekan' !important;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; background: none; border: none; color: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.screen-reader-text {
	position: absolute;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* ==========================================================================
   Layout shell
   ========================================================================== */
.site-header {
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 200;
	padding: 30px var(--gap) 0;
	background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent 90%);
}

.site-header__row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	padding-bottom: 8px;
	position: relative;
}

.site-title {
	font-size: 12px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.14em;
}

.site-title a { display: block; }

.menu-toggle {
	width: 16px;
	height: 16px;
	position: relative;
	float: right;
	margin-top: 10px;
}
.menu-toggle img{
    transition:0.3s all;
}
.menu-toggle.is-active img {
  transform: rotate(90deg);
}

.site-header__line {
	height: 1px;
	width: 100%;
	background: var(--line);
}

/* ==========================================================================
   Overlay menu
   ========================================================================== */
.site-menu {
	position: fixed;
	inset: 0;
	z-index: 190;
	background: #000000ed;
	display: flex;
	align-items: start;
	justify-content: flex-end;
	padding: 160px var(--gap) var(--gap) var(--gap);
	visibility: hidden;
	opacity: 0;
	transition: opacity .5s var(--ease), visibility 0s linear .5s;
}
.site-menu.is-open {
	visibility: visible;
	opacity: 1;
	transition: opacity .5s var(--ease);
}
.site-menu__inner {
	max-width: 240px;
	width: 100%;
	padding-left: var(--gap);
	position: relative;
}
.site-menu__inner::before {
  content: "";
  position: absolute;
  width: 50%;
  height: 50%;
  right: 18px;
  top: -34px;
  border-radius: 0 30px 0 0;
  border-right: 2px dashed var(--line);
  border-top: 2px dashed var(--line);
  background: transparent;
}
.site-menu__list a {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 5px 0;
	font-size: 14px;
	font-weight: 300;
	opacity: 0;
	transform: translateX(24px);
	transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.site-menu.is-open .site-menu__list a {
	opacity: 1;
	transform: translateX(0);
}
.site-menu__list a .arrow {
  font-size: 20px;
  opacity: .6;
}
.site-menu__inner:hover li {
  opacity: 0.3;
}
.site-menu__inner li:hover{
    opacity:1 !important;
}

/* ==========================================================================
   Splash screen
   ========================================================================== */
.splash {
	position: fixed;
	inset: 0;
	z-index: 500;
	background: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
}
.splash__lottie {
	width: min(85vw, 820px);
	aspect-ratio: 1;
}
.splash__blink {
	position: fixed;
	inset: 0;
	z-index: 501;
	background: #000;
	opacity: 0;
	pointer-events: none;
}
.splash.is-leaving { transition: opacity .6s var(--ease); }

/* ==========================================================================
   Home
   ========================================================================== */
.home-canvas {
	position: relative;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--gap);
}

.home-canvas__stage {
	position: relative;
	width: min(60vw, 720px);
	aspect-ratio: 1;
}

.home-canvas__identity {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity .5s var(--ease);
}
.home-canvas__identity.is-visible {
	opacity: 1;
	pointer-events: auto;
}
.home-canvas__identity h2 {
	font-size: clamp(20px, 2vw, 28px);
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	margin-bottom: 12px;
}
.home-canvas__identity p {
	max-width: 360px;
	font-size: 14px;
	opacity: .7;
	margin: 0 auto;
}

.home-canvas__hover-zone {
	position: absolute;
	cursor: pointer;
}
.home-canvas__hover-zone--a { left: 0; top: 0; width: 55%; height: 60%; }
.home-canvas__hover-zone--p { right: 0; bottom: 0; width: 45%; height: 70%; }

.home-footer {
	position: fixed;
	bottom: var(--gap);
	left: var(--gap);
	right: var(--gap);
	display: flex;
	justify-content: space-between;
	font-size: 11px;
	letter-spacing: .08em;
	text-transform: uppercase;
	opacity: .5;
	z-index: 10;
}

@media (max-width: 768px) {
	.home-canvas__stage { width: 80vw; }
	.site-menu__inner { border-left: none; padding-left: 0; }
}

/* ==========================================================================
   Page transition loader
   ========================================================================== */
body.is-transitioning > .site-header,
body.is-transitioning > main,
body.is-transitioning > .projects-wrap,
body.is-transitioning > .site-menu,
body.is-transitioning > .home-footer {
	filter: blur(14px);
	transition: filter .5s var(--ease);
	pointer-events: none;
	user-select: none;
}

.ap-loader {
	position: fixed;
	inset: 0;
	z-index: 600;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.45);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	opacity: 0;
	visibility: hidden;
	transition: opacity .45s var(--ease), visibility 0s linear .45s;
}
.ap-loader.is-visible {
	opacity: 1;
	visibility: visible;
	transition: opacity .45s var(--ease);
}

.ap-loader__dots {
	position: relative;
	width: 38px;
	height: 38px;
}
.ap-loader__dots span {
	position: absolute;
	top: 0; left: 50%;
	width: 8px; height: 8px;
	margin-left: -3px;
	border-radius: 50%;
	background: #ffffff;
	transform-origin: 3px 19px;
	animation: ap-dot-pulse 1.2s linear infinite;
}
.ap-loader__dots span:nth-child(1) { transform: rotate(0deg);   animation-delay: 0s; }
.ap-loader__dots span:nth-child(2) { transform: rotate(45deg);  animation-delay: 0.15s; }
.ap-loader__dots span:nth-child(3) { transform: rotate(90deg);  animation-delay: 0.3s; }
.ap-loader__dots span:nth-child(4) { transform: rotate(135deg); animation-delay: 0.45s; }
.ap-loader__dots span:nth-child(5) { transform: rotate(180deg); animation-delay: 0.6s; }
.ap-loader__dots span:nth-child(6) { transform: rotate(225deg); animation-delay: 0.75s; }
.ap-loader__dots span:nth-child(7) { transform: rotate(270deg); animation-delay: 0.9s; }
.ap-loader__dots span:nth-child(8) { transform: rotate(315deg); animation-delay: 1.05s; }

@keyframes ap-dot-pulse {
	0%   { opacity: 1; }
	100% { opacity: 0.125; }
}

/* ==========================================================================
   Projects page — full-viewport, no vertical scroll on desktop
   ========================================================================== */

/* Wrapper fills the viewport between fixed header (≈80px) and footer (≈56px) */
.projects-wrap {
	display: flex;
	flex-direction: column;
	height: 100dvh;          /* dynamic viewport height avoids mobile browser chrome issues */
	padding-top: 80px;       /* clear fixed header */
	overflow: hidden;
}

/* Main row: nav arrows + grid + nav arrow + preview */
.projects-body {
	flex: 1 1 0;
	min-height: 0;           /* critical — lets flex child shrink below content size */
	display: grid;
	grid-template-columns: 40px 1fr 40px minmax(260px, 36%);
	align-items: center;
	gap: clamp(12px, 2vw, 28px);
	padding: clamp(16px, 2.5vh, 36px) var(--gap);
}

/* Nav arrows */
.projects-nav {
	font-size: 18px;
	opacity: .5;
	transition: opacity .25s var(--ease), transform .25s var(--ease);
	align-self: center;
}
.projects-nav:hover { opacity: 1; transform: scale(1.2); }

/* Circular thumbnail grid */
.projects-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 6vh;
	align-content: center;
}

.projects-thumb {
	aspect-ratio: 1;
	border-radius: 20%;
	overflow: hidden;
	background: rgba(255,255,255,0.08);
	transition: opacity .4s var(--ease), transform .35s var(--ease);
}
.projects-thumb img {
	width: 100%; height: 100%;
	object-fit: cover;
	display: block;
}
.projects-thumb.is-dimmed  { opacity: .18; }
.projects-thumb.is-active  { box-shadow: 0 0 0 3px rgba(255,255,255,0.75); transform: scale(1.05); }
.projects-thumb:hover:not(.is-active) { transform: scale(1.07); }

/* Right preview panel */
.projects-preview {
	display: flex;
	flex-direction: column;
	gap: clamp(12px, 1.8vh, 22px);
	min-height: 0;
}
.projects-preview__image-wrap {
	width: 100%;
	aspect-ratio: 4/2.2;
	background: rgba(255,255,255,0.06);
	overflow: hidden;
	flex-shrink: 0;
}
.projects-preview__image {
	width: 100%; height: 100%;
	object-fit: cover;
	display: block;
}
.projects-preview__studio {
	font-size: 11px;
	letter-spacing: .12em;
	text-transform: uppercase;
	opacity: .45;
	margin-bottom: 4px;
}
.projects-preview__text h3 {
	font-size: clamp(14px, 1.4vw, 20px);
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: .08em;
	margin-bottom: 8px;
}
.projects-preview__text p {
	font-size: 13px;
	line-height: 1.6;
	opacity: .65;
	margin-bottom: 14px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.projects-preview__btn {
	display: inline-block;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .12em;
	border-bottom: 1px solid rgba(255,255,255,0.5);
	padding-bottom: 3px;
	transition: opacity .25s var(--ease);
}
.projects-preview__btn:hover { opacity: .55; }

/* Footer — thin line + category text filters */
.projects-footer {
	flex-shrink: 0;
	padding: 0 var(--gap) clamp(14px, 2vh, 28px);
}
.projects-footer__line {
	height: 1px;
	background: var(--line);
	margin-bottom: clamp(10px, 1.6vh, 20px);
}
.projects-footer__cats {
	display: flex;
	gap: 40px;
	align-items: center;
	justify-content: end;
	position: relative;
	padding-right: 50px;
}
.projects-footer__cats::before{
	content: "";
	position: absolute;
	width: 20px;
	height: 20px;
	background: #fff;
	right: 0;
	border-radius: 50%;
}

.projects-footer__cat {
	font-size: 12px;
	letter-spacing: .1em;
	text-transform: uppercase;
	position: relative;
	padding-bottom: 2px;
	color: #fff6;
}
.projects-footer__cat::before {
	content: "";
	position: absolute;
	width: 2px;
	height: 16px;
	background: var(--line);
	left: -20px;
	opacity: 1 !important;
 }
 .projects-footer__cat.all::before {
	display: none;
  }
.projects-footer__cat:hover,.projects-footer__cat.is-active { color: #fff; }
.projects-empty { opacity: .5; padding: var(--gap); }
#close-project-preview {
	position: absolute;
	right: 15px;
	top: 15px;
	cursor: pointer;
	display: none;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
	.projects-body {
		grid-template-columns: 32px 1fr 32px;
		grid-template-rows: 1fr auto;
		grid-template-areas:
			"prev grid next"
			"preview preview preview";
		overflow-y: auto;
	}
	.projects-wrap {
		height: calc(100vh - 5px);
		overflow: visible;
	}
	.projects-nav--prev  { grid-area: prev; }
	.projects-grid       { grid-area: grid; }
	.projects-nav--next  { grid-area: next; }
	.projects-preview    { grid-area: preview; margin-top: 24px; }
	.projects-grid       { grid-template-columns: repeat(4, 1fr); }
	#ap-projects-preview {
		position: absolute;
		background: #000;
		z-index: 9;
		bottom: 0;
		padding: 60px 30px 30px 30px;
		border-top: 1px solid #ffffff3b;
		display: none;
	}
	#ap-preview-image {border-radius: 10px;}
	#ap-preview-title {padding-top: 22px;}
	.projects-footer__cats {padding: 0;}
	.projects-footer__cats::before {display: none;}
	.projects-footer__cats {
		justify-content: start;
	}
	.projects-footer__cat::before{
		display: none;
	}
	#close-project-preview{
		display: block;
	}
	.ap-gallery-main {
		min-height: 230px !important;
	}
}

@media (max-width: 600px) {
	.projects-grid { grid-template-columns: repeat(3, 1fr);gap: 16px }
	.projects-footer__cats {
		gap: 20px;
		flex-wrap: nowrap;
		overflow: auto;
	}
	.projects-body {padding: 0;}

}

/* ----------------------------------------------------------------- 
Projects Gallery
----------------------------------------------------------------- */
.gallery-parent {
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.gallery-parent > .elementor-widget-ap_project_gallery,
.gallery-parent > .elementor-widget-ap_project_gallery > .elementor-widget-container {
    height: 100%;
}

.ap-gallery {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
	gap: 30px;
}

.ap-gallery-main {
    position: relative;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.ap-gallery-main-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
	border-radius: 5px !important;
}

.ap-gallery-thumbs {
    display: flex;
    flex: 0 0 100px;
    width: 100%;
    height: 120px;
    min-height: 120px;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
}

.ap-gallery-thumb {
	flex: 0 0 90px;
	width: 90px !important;
	height: 120px;
	overflow: hidden;
	padding: 10px 0 20px 0;
	border-top: 3px solid #fff;
	opacity: 0.4;
}

.ap-gallery-thumb img {
    width: 100%;
    height: 100% !important;
    display: block;
    object-fit: cover;
	border-radius: 5px !important;
}

.ap-gallery-thumb:hover , .ap-gallery-thumb.is-active{
	opacity: 1;
}

.gallery-parent .ap-gallery-thumbs {
    scrollbar-width: thin;
    scrollbar-color: #ffffff transparent;
}

.gallery-parent .ap-gallery-thumbs::-webkit-scrollbar {
    height: 6px;
}

.gallery-parent .ap-gallery-thumbs::-webkit-scrollbar-track {
    background: transparent;
}

.gallery-parent .ap-gallery-thumbs::-webkit-scrollbar-thumb {
    background: #ffffff;
    border-radius: 20px;
}

.gallery-parent .ap-gallery-thumbs::-webkit-scrollbar-thumb:hover {
    background: #cccccc;
}
.projects-thumb{
    filter: grayscale(1);
}
.projects-thumb.is-active, .projects-thumb:hover {
  filter: grayscale(0);
}
.trp-shortcode-switcher,.trp-language-item {
  padding: 0 !important;
}
.trp-language-item:hover {
  background: inherit !important;
  opacity: 0.6 !important;
}
@media (min-width:1600px){
    .projects-grid {
        transform: scale(0.8);
      }
}

/* RTL Styles */
body.rtl .rtl,body.rtl .text1,body.rtl .text2{
	direction: rtl;
}
body.rtl .site-header__row{
	padding-bottom: 0;
}
body.rtl #ap-projects-next {
	color: #000;
	visibility: hidden !important;
	position: relative;
}
body.rtl #ap-projects-next::before {
	position: absolute;
	content: ">";
	visibility: visible;
	color: #fff;
	top: 94px;
	font-size: 30px;
	right: 65px;
}
.trp-language-item img {
	display: none !important;
}
a .arrow {
	display: block;
	width: 8px;
	height: 8px;
	background: #fff;
	border-radius: 2px;
}
/* Minimal White Scrollbar */

::-webkit-scrollbar {
	width: 5px;
	height: 5px;
}

::-webkit-scrollbar-track {
	background: transparent;
}

::-webkit-scrollbar-thumb {
	background: #fff;
	border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
	background: #e5e5e5;
}

html {
	scrollbar-width: thin;
	scrollbar-color: #fff transparent;
}

/* SubMenu */
.site-menu__inner .sub-menu {
	display: none;
}
li.menu-item:hover > ul {
	display: inherit;
}
.sub-menu {
	padding-left: 25px;
}