html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  /* به اندازه ارتفاع هدرت */
}

.project-image {
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;
}

body {
  font-family: "Bodoni Moda", Georgia, serif;
}

.font-cairo,
.font-cairo * {
  font-family: 'cairo', 'Cairo', 'Tahoma', sans-serif !important;
}

.font-oswald,
.font-oswald * {
  font-family: "Bodoni Moda", Georgia, serif !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
.heading-text,
.main-text,
.project-description,
.ProjectAll,
.project-item span {
  font-family: "Bodoni Moda", Georgia, serif !important;
}

.font-cairo .main-text,
.font-cairo .project-description,
.font-cairo.main-text,
.font-cairo.project-description {
  font-family: 'cairo', 'Cairo', 'Tahoma', sans-serif !important;
}

.header-animated {
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s ease;
  will-change: transform, opacity;
}

.header-animated.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-120%);
}

.header-animated.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.letterColor {
  display: inline-block;
  transition: color 0.3s ease;
}

.normal-case {
  text-transform: none;
}

.light {
  font-weight: 400;
}

.regular {
  font-weight: 500;
}

.bold {
  font-weight: 700;
}


/* Oswald Font Loading - disabled */
/*
@font-face {
  font-family: 'Oswald';
  src: url('./font/Oswald-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Oswald';
  src: url('./font/Oswald-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Oswald';
  src: url('./font/Oswald-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
*/


@keyframes fadeInUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

#projects,
#projects * {
  cursor: url('../public/assets/img/02.png') 16 16, auto !important;
}


/* ========================= پس‌زمینه‌ها و رنگ‌ها ========================= */
.backgroundColorAll {
  background-color: #fcfcf3;
}

.backgroundColorAllRed {
  background-color: #333333;
}

.backgroundColorAllblack {
  background-color: #000000;
}

.backgroundColorAllgray {
  background-color: rgb(179, 172, 158);
}

#menue a p {
  color: #000;
  transition: color 0.4s ease;
}

#menue a:hover p {
  color: #b3ac9e;
}



/* ========================= فوتر متحرک (اسکرول افقی) */
@keyframes loop-scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-200%);
  }
}

.animate-scroll-moving-fotter {
  animation: loop-scroll 10s linear infinite;
}

/* ========================= پروژه‌ها (classes مربوطه) ========================= */
.project-item {
  position: relative;
  overflow: hidden;
}

/* --- توضیحات دسته‌بندی حذف شد - الان hover آکاردئون رو باز/بسته میکنه ---
.main-text,
.project-description {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.main-text {
  opacity: 1;
  z-index: 2;
  transition-delay: 0s;
}

.project-description {
  opacity: 0;
  z-index: 1;
  transition-delay: 0s;
}

.project-item:hover .project-description {
  opacity: 1;
  z-index: 3;
}

.project-item:hover .main-text {
  opacity: 0;
  transition-delay: 0s;
}

.project-item:not(:hover) .main-text {
  opacity: 1;
  transition-delay: 0.3s;
}

.project-item:not(:hover) .project-description {
  opacity: 0;
  transition-delay: 0s;
}
--- */

/* پایان بخش پروژه‌ها */



/* ========================= رفتارها برای دستگاه‌های لمسی/ماوس ========================= */
@media (hover: hover) and (pointer: fine) {
  .group:hover .backgroundColorAllRed {
    height: 100%;
    top: 0;
    transform: none;
    transition: height 0.45s ease-out, top 0.45s ease-out;
  }

  /* --- توضیحات دسته‌بندی حذف شد ---
  .group:hover .project-description {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  --- */

  .main-text {
    transition: opacity 0.3s ease;
  }
}

@media (hover: none) and (pointer: coarse) {
  .bgRedProject .backgroundColorAllRed {
    height: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    transition: none !important;
  }

  /* --- توضیحات دسته‌بندی حذف شد ---
  .project-description {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
  --- */
}


/* ========================= splash */
#splash {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease;
  z-index: 9999;
}

#splash.hidden {
  opacity: 0;
  pointer-events: none;
}

#splash p {
  font-size: 4rem;
  color: #fff;
  transition: opacity 0.5s;
}

@keyframes slideUp {
  from {
    transform: translateY(0);
    opacity: 1;
  }

  to {
    transform: translateY(-100%);
    opacity: 0;
  }
}

.slide-up {
  animation: slideUp 0.6s ease-out forwards;
}



/* ========================= بهینه‌سازی rendering ========================= */

/* المان‌هایی که transform داره - به browser اطلاع بدیم */
.eye,
.pupil,
#scroll-content-graphic,
#scroll-content-film,
#scroll-content-animal-advocacy,
#scroll-content-project {
  will-change: transform;
}

/* وقتی لازم نیست انیمیشن بشه، will-change رو حذف کن تا حافظه آزاد بشه */
.animation-done {
  will-change: auto;
}

/* lazy img placeholder */
img.lazy {
  background-color: #111;
}

img.lazy.loaded {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* پایان فایل */

/* اسکرول افقی نمونه‌کارها در موبایل - scrollbar مخفی */
@media (max-width: 767px) {
  .accordion-content>div>div {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .accordion-content>div>div::-webkit-scrollbar {
    display: none;
  }
}

/* آکاردئون نمونه‌کارها - گالری فقط عکس */
.accordion-scroll-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  max-height: calc(3 * 33vw + 1rem);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #444 #0c0c0c;
}

.accordion-scroll-inner::-webkit-scrollbar {
  width: 4px;
}

.accordion-scroll-inner::-webkit-scrollbar-track {
  background: #0c0c0c;
}

.accordion-scroll-inner::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 2px;
}

@media (min-width: 640px) {
  .accordion-scroll-inner {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-height: calc(3 * 22vw + 1rem);
  }
}

@media (min-width: 768px) {
  .accordion-scroll-inner {
    grid-template-columns: repeat(6, 1fr);
    max-height: calc(2 * 18vw + 2rem);
  }
}

@media (min-width: 1024px) {
  .accordion-scroll-inner {
    grid-template-columns: repeat(9, 1fr);
    max-height: calc(2 * 15vw + 2rem);
  }
}

@keyframes fadeInUpAccordion {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* UI/UX Image Hover Scroll Effect */
.uiux-image-wrapper {
  position: relative;
  width: 100%;
  height: 60vh;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid rgba(128, 128, 128, 0.3);
}

.uiux-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: top;
  transition: transform 5s ease-out;
}

.uiux-image-wrapper:hover .uiux-image {
  transform: translateY(calc(-100% + 60vh));
}

/* Accordion Content Transition Consistency */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 700ms ease-in-out, opacity 300ms ease-in-out !important;
  will-change: max-height, opacity;
}

.accordion-content.open {
  opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
  .project-item:hover .main-text {
    opacity: 0 !important;
  }
}

/*-----------------------------------------------------------------------------------------------------*/
/* ===============================
   UI/UX Gallery
================================ */

.uiux-accordion-wrapper {
  width: 100%;
}

.uiux-gallery-section {
  width: 100%;
}

.uiux-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

/* کارت هر عکس */
.uiux-image-card {
  position: relative;
  width: 100%;
  height: 260px;
  overflow: hidden;
  border: 1px solid rgba(156, 163, 175, 0.25);
  background: #111;
  cursor: pointer;
  transition: border-color 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}

/* عکس داخل گرید */
.uiux-gallery-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;

  /*
    چون عکس‌های UI/UX معمولاً بلند هستند،
    این باعث می‌شود قسمت بالایی طراحی بهتر دیده شود.
  */
  object-position: top center;

  filter: grayscale(10%);
  transition: transform 0.6s ease, filter 0.4s ease;
}

.uiux-image-card:hover {
  border-color: rgba(252, 252, 243, 0.55);
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.uiux-image-card:hover .uiux-gallery-image {
  transform: scale(1.04);
  filter: grayscale(0%);
}

/* یک افکت تاریک خیلی نرم */
.uiux-image-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.05),
    rgba(0, 0, 0, 0.25)
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.uiux-image-card:hover::after {
  opacity: 1;
}


/* ===============================
   UI/UX Lightbox
================================ */

 
  /* ورود/خروج نرم */
  #uiuxLightbox { opacity: 0; transition: opacity .4s ease; }
  #uiuxLightbox.is-open { opacity: 1; }

  .uiux-lb-panel {
    transform: translateY(30px) scale(.96);
    opacity: 0;
    transition: transform .5s cubic-bezier(.22,1,.36,1), opacity .45s ease;
  }
  #uiuxLightbox.is-open .uiux-lb-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
  }

  /* اسکرول‌بار شیک */
  .uiux-lb-scroll::-webkit-scrollbar { width: 7px; }
  .uiux-lb-scroll::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.18);
    border-radius: 99px;
  }
  .uiux-lb-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.18) transparent;
    -webkit-overflow-scrolling: touch; /* اسکرول روون موبایل */
  }
