/* ==================================== */
/*           30X60 — Custom CSS         */
/* ==================================== */

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

/* ---------- Fonts ---------- */
@font-face {
  font-family: '2Yekan';
  src: url('assets/fonts/2yekan.ttf') format('truetype');
}
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700&display=swap');

html, body {
  font-family: 'Antonio','2Yekan', sans-serif;
  background-color: #fff;
  color: #3ba8cc;
  overflow-x: hidden;
  direction: ltr;
}

/* ---------- Headings ---------- */
h1 {
  font-family: 'Antonio', sans-serif;
  text-align: center;
  font-size: 50px;
  width: fit-content;
  margin: 10px auto 14px;
  letter-spacing: 1px;
}

/* ---------- Navigation ---------- */
.nav {
  font-family: 'Orbitron', '2Yekan', sans-serif;
  display: flex;
  justify-content: center;
  gap: 50px;
  font-size: 14px;
}
.nav a {
  color: #3ba8cc;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 3px;
  transition: border-color 0.3s;
}
.nav a:hover,
.nav a.active {
  border-color: #3ba8cc;
}
.menu-divider {
  width: 700px;
  height: 1px;
  background: linear-gradient(to right, transparent, #3ba8cc, transparent);
  opacity: 0.5;
  margin: 5px auto;
}

/* ---------- Footer ---------- */
.footer-fixed {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: white;
  text-align: center;
  padding: 5px 0;
  z-index: 1000;
}

/* ---------- Filters ---------- */
.filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  font-size: 18px;
}
.filters button {
  background: none;
  border: none;
  color: #3ba8cc;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s;
}
.filters button.active,
.filters button:hover {
  border-color: #3ba8cc;
}

/* ==================================== */
/*        Projects Layout (Desktop)     */
/* ==================================== */
body.project-page main {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 40px 0;
}

.viewport {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 100%;
  height: calc(100vh - 230px);
  overflow: hidden;
  margin: 0 auto;
}

.projects-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  transition: transform 0.5s ease-in-out;
}

.project {
  flex: 0 0 255px;
  width: 255px;
  height: 650px;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 0 6px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: transform 0.3s;
}
.project:hover {
  transform: translateY(-5px);
}
.project img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-info {
  padding: 8px;
  font-size: 14px;
  color: #3ba8cc;
  text-align: left;
}

/* ---------- Navigation Arrows ---------- */
body.project-page .arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  border-radius: 6px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  padding: 12px;
  transition: all 0.3s ease;
  z-index: 20;
}
body.project-page .arrow img {
  width: 20px;
  height: 20px;
}
body.project-page .arrow:hover {
  background: #3ba8cc;
  box-shadow: 0 0 10px rgba(59, 168, 204, 0.4);
}
body.project-page .arrow:hover img {
  filter: brightness(0) invert(1);
}
.arrow.left { left: -60px; }
.arrow.right { right: -60px; }

/* ==================================== */
/* 📱 Mobile View — Projects Page       */
/* ==================================== */
/* ==================================== */
/* 📱 Mobile View — Projects Page       */
/* ==================================== */
@media (max-width: 768px) {

  .viewport {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: auto;
    min-height: 100vh;
  }

  .projects-wrapper {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-height: 100% !important;
    gap: 10px !important;
    padding-bottom: 120px !important;
  }

  .project {
    width: 96% !important;       /* 🔹 کمی عریض‌تر */
    height: 90vh !important;     /* 🔹 تمام قد — فقط یک پروژه در صفحه */
    margin: 0 auto;
    display: flex;
    flex-direction: row-reverse; /* 🔹 عکس سمت راست، متن سمت چپ */
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
  }

  .project img {
    width: 55%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
  }

  .project-info {
    width: 45%;
    padding: 10px 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 15px;
    text-align: left;
    color: #3ba8cc;
  }

  body.project-page .arrow.left { left: -70px !important; }
  body.project-page .arrow.right { right: -70px !important; }

  /* منو و فیلتر */
  .filters {
    font-size: 10px !important;
    gap: 10px !important;
  }

  .footer-fixed {
    position: fixed !important;
    bottom: 0 !important;
    width: 100% !important;
    padding: 6px 0 !important;
    z-index: 999 !important;
  }

  .footer-fixed .nav {
    font-size: 12px !important;
    gap: 25px !important;
    flex-wrap: wrap;
    justify-content: center;
  }
}


/* ==================================== */
/*             HOME PAGE                */
/* ==================================== */
body.home-page {
  background-color: #3ba8cc;
  background-image: url('assets/logo.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 800px auto;
  background-attachment: fixed;
  background-blend-mode: soft-light;
  color: #fff;
  font-family: 'Orbitron', '2Yekan', sans-serif;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

body.home-page .container {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  animation: fadeIn 2s ease-out forwards;
}
body.home-page .main-title {
  font-size: 250px;
  font-family: 'Antonio', '2Yekan', sans-serif;
  font-weight: bold;
  margin: 0;
  letter-spacing: 4px;
}
body.home-page .subtitle,
body.home-page .subtext {
  font-family: 'Calibri (Body)', '2Yekan', sans-serif;
  font-size: 40px;
  letter-spacing: 2px;
}
body.home-page .footer-fixed {
  background: #3ba8cc;
  color: #fff;
  border-top: none;
  animation: slideUp 1.3s ease-out forwards;
  animation-delay: 0.8s;
}


.lang-switch {
  margin-top: 10px;
  font-size: 9px;
  color: #fff;
  opacity: 0.8;
  font-family: '2Yekan', sans-serif;
}
.lang-switch a {
  text-decoration: none;
  margin: 0 6px;
  color: inherit;
}
.lang-switch a:hover {
  text-decoration: underline;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(60px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 768px) {
  body.home-page {
    background-size: 440px auto;
    background-position: center 40%;
    background-attachment: scroll;
  }
  body.home-page .main-title { font-size: 130px; transform: translateY(-40px); }
  body.home-page .subtitle,
  body.home-page .subtext { font-size: 22px; transform: translateY(-55px); }
  body.home-page .nav { flex-wrap: wrap; gap: 25px; font-size: 14px; }
  .lang-switch { font-size: 8px; margin-top: 6px; }
}

/* ---------- RTL Support ---------- */
html[lang="fa"] body {
  direction: rtl;
  text-align: right;
}
html[lang="fa"] .project-info {
  text-align: right;
}
/* ---------- Fix: let .project box resize with its content (place at end of custom.css) ---------- */
/* اطمینان از اینکه این قوانین مخصوص صفحه پروژه هستند و اولویت بالایی دارند */
body.project-page .projects-wrapper {
  /* اجازه بده ارتفاع براساس کارت‌ها تعیین بشه */
  align-items: stretch !important;
  height: auto !important;
  min-height: 0 !important;       /* اگر جایی min-height گذاشته شده بود لغوش کن */
  overflow: visible !important;
}

/* کارت سفید: ارتفاع خود را از محتوا می‌گیرد، نه ثابت باشد */
body.project-page .project {
  width: 92% !important;          /* کمی پهن‌تر در موبایل - تنظیم برحسب نیاز */
  height: auto !important;        /* مهم: برداشت محدودیت ارتفاع */
  min-height: 60vh !important;    /* حداقل ارتفاع کارت (مثلاً 60% ارتفاع صفحه) */
  display: flex !important;
  flex-direction: row-reverse !important; /* عکس سمت راست، متن سمت چپ */
  align-items: stretch !important;         /* عکس تمام ارتفاع کارت را بگیرد */
  padding: 12px !important;
  box-shadow: 0 6px 18px rgba(0,0,0,0.09) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
}

/* تصویر داخل کارت: نسبتش حفظ شود، حداکثر ارتفاع برابر با ارتفاع کارت */
body.project-page .project img {
  width: 100% !important;            /* نصف عرض کارت */
  height: 100% !important;          /* تمام ارتفاع کارت را بگیرد */
  max-height: 100% !important;
  object-fit: cover !important;     /* کراپ تمیز */
  display: block !important;
  border-radius: 8px !important;
}

/* متن/اطلاعات پروژه: در سمت چپ، ارتفاعش را از کارت بگیرد */
body.project-page .project-info {
  width: 48% !important;
  padding: 18px !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  text-align: left !important;
  color: #3ba8cc !important;
}

/* اگر جایی قوانین عمومی برای img یا .project ارتفاعِ ثابت دارند آنها را بازنویسی کن */
img {
  max-width: 100% !important;
  height: auto !important;
}

/* اگر هنوز کارت‌ها خیلی پرشده‌اند، می‌توان مقدار min-height را تغییر داد:
   body.project-page .project { min-height: 70vh !important; } 
   یا کمتر/بیشتر کن تا نتیجه دلخواه بدست آید */
/* =============================== */
/* ✅ حالت دسکتاپ (اصلی)          */
/* =============================== */
/* =============================== */
/* ✅ حالت دسکتاپ (فقط عکس‌ها)    */
/* =============================== */
@media (min-width: 769px) {
  body.project-page .projects-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px; /* فاصله بین پروژه‌ها */
    overflow-x: auto;
    overflow-y: hidden;
    height: 80vh;
  }

  body.project-page .project {
    position: relative;
    background: none !important; /* حذف باکس سفید */
    border-radius: 0 !important; /* حذف گوشه‌های گرد */
    box-shadow: none !important; /* حذف سایه */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: auto;
    height: 100%;
    overflow: hidden;
  }

  body.project-page .project img {
    width: auto;
    height: 100%;
    object-fit: cover;
    border-radius: 0 !important; /* حذف رادیوس از خود عکس */
  }

  body.project-page .project-info {
    display: none !important; /* حذف متن‌ها */
  }

  body.project-page .arrow {
    display: flex !important;
  }
}

/* ================================================= */
/*                CONTACT PAGE (NEW)                */
/* ================================================= */

body.contact-page {
    background: #fff;
    color: #3ba8cc;
}

/* Wrapper اصلی */
.contact-container {
    width: 1100px;
    margin: 100px auto 60px auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 60px;
}

/* ستون اطلاعات */
.contact-info {
    width: 45%;
    padding-left: 35px;
    border-left: 2px solid #3ba8cc;
}

.contact-info h2 {
    font-family: 'Calibri (Body)', sans-serif;
    font-size: 32px;
    margin-bottom: 25px;
}

.contact-info h3 {
  font-family: 'Calibri (Body)', sans-serif;
    font-size: 18px;
    margin-top: 25px;
    margin-bottom: 5px;
}

.contact-info p {
  font-family: 'Calibri (Body)', sans-serif;
    font-size: 15px;
    line-height: 22px;
}

/* نقشه */
.contact-map iframe {
    width: 500px;
    height: 460px;
    border: none;
    border-radius: 6px;
    box-shadow: 0 0 12px rgba(0,0,0,0.1);
}

/* ========================================= */
/*               MOBILE VERSION              */
/* ========================================= */
@media (max-width: 768px) {

  .contact-container {
      width: 92%;
      margin: 40px auto 120px auto;
      flex-direction: column; /* اول متن، بعد نقشه */
      gap: 40px;
  }

  .contact-info {
      width: 100%;
      border-left: none;
      padding-left: 0;
      padding-top: 25px;
  }

  /* ---- مرکز چین کردن نقشه ---- */
  .contact-map {
      width: 100%;
      display: flex;
      justify-content: center;
  }

  .contact-map iframe {
      width: 100%;
      max-width: 350px;
      height: 330px;
  }

  .contact-info h2 {
      text-align: center;
  }
}

/* =========================== */
/*          ABOUT PAGE         */
/* =========================== */

body.about-page {
    background: #fff;
    color: #3ba8cc;
}

/* Title */
body.about-page h1 {
  font-family: 'Antonio', sans-serif;
  text-align: center;
  font-size: 50px;
  border-bottom: 4px solid #3ba8cc;
  width: fit-content;
  margin: 10px auto 14px;
  letter-spacing: 1px;
}

/* Main container */
.about-container {
    max-width: 1100px;
    margin: 40px auto 100px auto;
    padding: 0 20px;
    border-left: 2px solid #33a6c4;
}

.about-container h2,
.about-container h3,
.about-container h4 {
    font-family: 'Calibri (Body)', sans-serif;
    font-weight: bold;
    margin-bottom: 15px;
}

.about-container h2 {
    font-size: 26px;
}

.about-container h3 {
    font-size: 20px;
}

.about-container h4 {
    font-size: 18px;
}

/* Text */
.about-container p {
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 15px;
    font-family: 'Calibri (Body)', sans-serif;
}

/* Image */
.about-image {
    text-align: center;
    margin: 20px 0;
}

.about-page .about-image img {
    max-width: 220px !important;   /* دقیق و ثابت */
    height: auto !important;
    display: block;
    margin: 20px auto;
}

/* Mobile version */
@media (max-width: 768px) {
    body.about-page h1 {
        font-size: 48px;
    }

    .about-container {
        border-left-width: 1.5px;
        padding-left: 15px;
    }

    .about-container h2,
    .about-container h3,
    .about-container h4 {
        font-size: 22px;
    }

    .about-container p {
        font-size: 16px;
    }

    .about-image img {
        max-width: 45%;
    }
}
/* Mobile padding fix for project pages */
@media (max-width: 768px) {
    main {
        padding: 0 16px !important;
    }

    .left,
    .right {
        padding: 0 8px !important;
    }

    #mainImage {
        border-radius: 6px;
    }

    .gallery img {
        border-radius: 4px;
    }
}
