/* =========================================================
   layout.css  —  چیدمان کلی
   مسیر: theme-home/assets/css/layout.css
   ========================================================= */

/* =========================================================
   ۰. فونت‌های سفارشی
   ========================================================= */
@font-face {
  font-family: 'FasterOne';
  src: url('/assets/fonts/FasterOne-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'CarterOne';
  src: url('/assets/fonts/CarterOne-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* =========================================================
   ۱. Smooth Wrapper
   ========================================================= */
.smooth-wrapper {
  position: relative;
  width: 100%;
}

.smooth-content {
  position: relative;
  width: 100%;
  will-change: transform;
}

@media only screen and (max-width: 767px) {
  .mobile .smooth-content,
  .mobile .smooth-wrapper {
    display: contents;
  }
}

/* =========================================================
   ۲. Layout
   ========================================================= */
#layout {
  position: relative;
  width: 100%;
}

#page {
  position: relative;
  width: 100%;
}

.content-page {
  color: var(--cl-text);
  position: relative;
}

/* =========================================================
   ۳. ماژول‌بلوک
   ========================================================= */
.module-blok {
  background: var(--cl-theme);
  color: var(--cl-text);
  overflow: hidden;
  padding-bottom: 8rem;
  padding-top: 8rem;
  position: relative;
  transition: background-color 0.4s var(--ease-out-quad);
}

@media only screen and (max-width: 767px) {
  .module-blok {
    padding-bottom: 4.8rem;
    padding-top: 4.8rem;
  }
}

/* =========================================================
   ۴. گوشه‌های گرد
   ========================================================= */
.round-corners {
  border-radius: var(--radius);
  overflow: hidden;
  transform: translateZ(0);
}

/* =========================================================
   ۵. هدر جدید
   ========================================================= */
.the-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 100;
  padding: 1.4rem 0;
  transition: background 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              padding 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  background: transparent;
  opacity: 1;
  transform: translateY(0);
}

/* ===== هدر مخفی (۳۰ ثانیه اول) ===== */
.the-header.is-hidden {
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
}

.the-header.is-scrolled {
  background: var(--cl-navBg);
  padding: 0.8rem 0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.the-header .header-logo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 0.6rem;
  direction: ltr;
}

.the-header .header-logo span {
  font-family: 'CarterOne', sans-serif;
  font-size: 10vw;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: 0.01em;
  color: #000;
}

/* Rosha — زرد */
.the-header .header-logo .ros {
  color: #ffd550;
  text-shadow: 0.2vw 0.2vw 0 #000;
}

/* Art — مشکی */
.the-header .header-logo .art {
  color: #000;
}

/* Gallery — مشکی */
.the-header .header-logo .gal {
  color: #000;
}

/* =========================================================
   ۶. منوی دسکتاپ (خالی)
   ========================================================= */
.the-nav-desktop {
  display: none;
}

/* =========================================================
   ۷. منوی موبایل
   ========================================================= */
.the-nav-mobile {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  pointer-events: none;
  z-index: 10;
  display: none;
}

.the-nav-mobile .underlay {
  background: rgba(0, 0, 0, 0.3);
  height: 100vh;
  pointer-events: all;
}

.the-nav-mobile .bar {
  position: relative;
  left: 0;
  top: 2rem;
  width: 100%;
  color: var(--cl-navEl);
  transition: all 0.4s var(--ease-out-quad);
}

.the-nav-mobile .bar:not(.show) {
  transform: translateY(calc(-100% - 2rem));
  transition: all 1s ease;
}

.the-nav-mobile .bar .main {
  padding: 0 1.6rem;
  pointer-events: all;
  z-index: 2;
}

.the-nav-mobile .bar .menu {
  overflow: hidden;
  padding: 0 1.6rem;
}

.the-nav-mobile .bar .menu.isOpen {
  pointer-events: all;
}

.the-nav-mobile .bar .top,
.the-nav-mobile .bar .bottom {
  width: 100%;
  background: var(--cl-navBg);
  height: 1.6rem;
}

.the-nav-mobile .bar .top {
  border-radius: .6rem .6rem 0 0;
}

.the-nav-mobile .bar .bottom {
  border-radius: 0 0 .6rem .6rem;
}

.the-nav-mobile .bar .center {
  margin: -1px 0;
  overflow: hidden;
  padding: 1px 0;
  position: relative;
}

.the-nav-mobile .bar .center .main {
  background: var(--cl-navBg);
}

/* =========================================================
   ۸. همبرگر
   ========================================================= */
.hamburger {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.hamburger .icon {
  height: 0.7rem;
  width: 2.6rem;
  position: relative;
}

.hamburger .line {
  background: currentColor;
  height: 0.2rem;
  transform-origin: left center;
  width: 100%;
  position: absolute;
  left: 0;
  transition: transform 0.3s var(--ease-out-quad);
}

.hamburger .line.line-top {
  top: 0;
}

.hamburger .line.line-bottom {
  bottom: 0;
}

/* =========================================================
   ۹. فوتر
   ========================================================= */
.the-footer {
  background: var(--cl-theme);
  color: var(--cl-offwhite-400);
  overflow: hidden;
}

@media only screen and (max-width: 767px) {
  .the-footer {
    padding-bottom: 3.2rem;
    padding-top: 6.4rem;
  }

  .the-footer .divider {
    background: #435f49;
    grid-column: 1 / 17;
    height: 1px;
    margin: 4rem 0;
  }

  .the-footer .head {
    grid-column: 1 / 17;
  }

  .the-footer .title {
    font-family: 'Vazirmatn', sans-serif;
    font-size: 4.8rem;
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: .85;
    margin-bottom: 2.4rem;
  }

  .the-footer .nav-primary {
    grid-column: 1 / 17;
    margin: 3.2rem 0 4rem;
  }

  .the-footer .nav-secondary {
    grid-column: 1 / 17;
    margin: 1.6rem 0;
  }

  .the-footer .copyright {
    color: #9aa694;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1.2rem;
    font-weight: 400;
    grid-column: 10 / 17;
    line-height: 1.4;
  }
}

@media only screen and (min-width: 768px) {
  .the-footer {
    padding: 8rem 0;
  }

  .the-footer .divider {
    background: #435f49;
    height: 1px;
    margin: 8rem 0 4rem;
    width: 100%;
  }

  .the-footer .head {
    grid-column: 1 / 16;
  }

  .the-footer .title {
    font-family: 'Vazirmatn', sans-serif;
    font-size: 6.4rem;
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: .85;
    margin-bottom: 2.4rem;
  }

  .the-footer .nav-primary {
    grid-column: 25 / 33;
  }

  .the-footer .nav-secondary {
    grid-column: 41 / 48;
  }

  .the-footer .copyright {
    color: #9aa694;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1.2rem;
    font-weight: 400;
    grid-column: 41 / 47;
    grid-row: 2;
    line-height: 1.4;
    margin-top: 8rem;
  }
}

/* =========================================================
   ۱۰. لینک‌ها
   ========================================================= */
.link-main {
  cursor: pointer;
  display: block;
  font-family: 'Vazirmatn', sans-serif;
  font-size: 1.8rem;
  font-weight: 500;
  line-height: .85;
  position: relative;
  text-decoration: none !important;
  width: fit-content;
}

.hover-underlinee {
  display: inline-block;
  position: relative;
  text-decoration: none !important;
}

.hover-underlinee .line {
  background: currentColor;
  bottom: -.05em;
  height: 1.5px;
  position: absolute;
  transform: scaleX(0);
  width: 100%;
  transition: transform 0.4s var(--ease-out-quart);
}

.hover-underlinee:hover .line {
  transform: scaleX(1);
}

/* =========================================================
   ۱۱. Transition Wipe
   ========================================================= */
.transition-wipe {
  opacity: 1;
  overflow: hidden;
  pointer-events: none;
  z-index: 100;
}

.transition-wipe.showing {
  pointer-events: all;
}

.transition-wipe .bg {
  background: #f7a146;
  position: absolute;
  inset: 0;
}

/* =========================================================
   ۱۲. اسکرول‌بار
   ========================================================= */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--cl-offwhite-400);
}

::-webkit-scrollbar-thumb {
  background: var(--cl-green-800);
  border-radius: 4px;
  opacity: 0.5;
}

/* =========================================================
   ۱۳. Animated Line / Opacity
   ========================================================= */
.anim-line {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease-out-quart),
              transform 0.8s var(--ease-out-quart);
}

.anim-line.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.anim-opacity {
  opacity: 0;
  transition: opacity 1s var(--ease-out-quart);
}

.anim-opacity.is-visible {
  opacity: 1;
}

/* =========================================================
   ۱۴. Media
   ========================================================= */
.media img,
.media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* =========================================================
   ۱۵. Utilities
   ========================================================= */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed    { position: fixed; }
.sticky   { position: sticky; }

.hidden { display: none; }
.overflow-hidden { overflow: hidden; }
.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }

/* =========================================================
   ۱۶. اسکرول قفل
   ========================================================= */
body.is-loading {
  overflow: hidden;
  height: 100vh;
}

body.is-ready {
  overflow-x: hidden;
  overflow-y: auto;
}

/* =========================================================
   ۱۷. Flip X
   ========================================================= */
.flip-x {
  transform: scaleX(-1);
}