/*=============== فونت و تنظیمات پایه ===============*/
@import url(fontiran.css);

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    direction: ltr;
}

/* با Flexbox کل صفحه را به ستون تقسیم می‌کنیم */
.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* حداقل ارتفاع برابر با ارتفاع صفحه */
    background-color: #f5f5f7;
    font-family: 'Montserrat', 'Poppins', Arial, sans-serif !important;
    direction: ltr;
    color: #1d1d1f;
}

/*============ ناوبار ============*/
.navbar {
    /*background-color: rgba(255, 255, 255, 0.9);*/
    /*box-shadow: 0 0.5px 0 rgba(0, 0, 0, 0.05);*/
}

.navbar-brand img {
    width: 100px;
    height: auto;
    /*margin-top: 4px;*/
}

.nav-link {
    font-size: 0.9rem;
    color: #1d1d1f !important;
    margin: 0 0.5rem;
}

.nav-link:hover {
    color: #3a9336 !important;
}

.navbar-nav {
    margin-top: 20px !important;


}

.navbar-nav.rtl {
    direction: ltr !important;
}

/*============ بخش هدر (Hero) ============*/
/* چون ناوبار fixed-top است، باید یک padding-top برای main.hero بدهیم */
main.hero {
    display: flex;
    flex: 1; /* باعث می‌شود این بخش در صورت کم بودن محتوا، فضا را پر کند */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 70px; /* ارتفاع تقریبی ناوبار (حداقل 56px بوت‌استرپ + فاصله) */
    /* background-color: #f5f5f7; چون در .page-wrapper تنظیم شده */
}

.hero-content {
    max-width: 800px; /* برای جلوگیری از کشیده شدن بیش از حد متن در دسکتاپ */
    width: 100%;
    padding: 0 1rem; /* فاصله داخلی در موبایل و دسکتاپ */
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1f274b;
}

.hero-subtitle {
    font-size: 2.5rem;
    color: #1d1d1f;
    margin-bottom: 2rem;
}

#btn-admin {
    background-color: #f5f5f7;
    color: #3a9336;
    border: 1px solid #3a9336;
    border-radius: 65px;
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
    margin-bottom: 2rem;
    transition: background-color 0.25s ease, color 0.25s ease;
}

#btn-admin:hover {
    background-color: #3a9336;
    color: #f5f5f7;
}

/* تصاویر هدر: */
.headerImg {
    display: block;
    width: 100%;
    margin-top: 20px;
    border-radius: 18px 18px 0 0;
    background: #fff;
    padding: 5px;
}

/* فقط در دسکتاپ نمایش بده، در موبایل مخفی کن */
.desktop-only {
    display: none;
}

/* در موبایل عکس موبایلی را نمایش بده */
.mobile-only {
    display: block;
    width: 100%;
    margin: 20px auto;
}

/*============ فوتر ============*/
/* با Flexbox دیگر نیازی به position: fixed نداریم */
.footer {
    background-color: #f8f9fa;
    padding: 1rem 0;
    text-align: center;
    color: #6e6e73;
    box-shadow: 0 -0.5px 0 rgba(0, 0, 0, 0.05);
    margin-top: auto; /* باعث می‌شود فوتر تا انتهای ستون برود */
}

.footer-text {
    margin: 0;
    font-size: 0.9rem;
    direction: ltr;
}

.screenshot-container {
    position: relative;
    display: inline-block;
}

.screenshot-container img {
    display: block;
    border-radius: 20px; /* هر عددی که خواستی */
}

/* گوشه‌ها: آرک (Arc) کوتاه با border-radius */
.marker.corner {
    position: absolute;
    width: 36px;
    height: 36px;
    /*border: 4px solid #fff;    !* رنگ خط *!*/
    border-radius: 12px; /* گوشه گرد */
}

.top-left {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
}

.top-right {
    top: -2px;
    right: -2px;
    border-left: none;
    border-bottom: none;
}

.bottom-left {
    bottom: -2px;
    left: -2px;
    border-right: none;
    border-top: none;
}

.bottom-right {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
}

/* وسط اضلاع: خط کوتاه */
.marker.side {
    position: absolute;
    background: #fff;
    /* خط افقی یا عمودی بر اساس ضلع */
}

.top {
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 4px;
    border-radius: 2px;
}

.bottom {
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 4px;
    border-radius: 2px;
}

.left {
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 32px;
    border-radius: 2px;
}

.right {
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 32px;
    border-radius: 2px;
}

/* ==== Lux Preloader ==== */
:root {
    --bg: #f5f5f7;
    --ink: #1d1d1f;
    --brand: #3a9336;
    --glass: rgba(255, 255, 255, .55);
    --ring1: #cfd3d6;
    --ring2: #a6b0b6;
}

html, body {
    height: 100%
}

body.preloading {
    overflow: hidden
}

/* تا لود کامل اسکرول نباشه */

/* ورود نرم محتوای اصلی */
.page-wrapper {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .7s ease .15s, transform .7s ease .15s;
}

body.app-loaded .page-wrapper {
    opacity: 1;
    transform: none;
}

/* لایه‌ی پری‌لودر */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(1200px 700px at 50% 20%, rgba(58, 147, 54, .09), transparent 60%),
    var(--bg);
    transition: opacity .6s ease, visibility .6s ease, filter .6s ease;
}

#preloader.hide {
    opacity: 0;
    visibility: hidden;
    filter: blur(2px)
}

/* محتوای مرکزی */
.plx {
    position: relative;
    text-align: center;
    display: grid;
    place-items: center;
    gap: 16px
}

.plx-glass {
    position: absolute;
    border-radius: 36px;
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    animation: glassFloat 4.5s ease-in-out infinite;
}

.plx-logo {
    width: 96px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .08));
    animation: logoFade 1.2s ease;
}

.plx-ring {
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: conic-gradient(from 0deg, var(--brand), var(--ring1), var(--ring2), var(--brand));
    mask: radial-gradient(closest-side, transparent 54%, #000 55%);
    animation: ringSpin 1.8s linear infinite;
    opacity: .85;
}

.plx-text {
    margin: 0;
    color: var(--ink);
    font-weight: 600;
    letter-spacing: .2px;
}

.plx-text .plx-fade {
    opacity: .75
}

.plx-dots {
    display: inline-flex;
    gap: 4px;
    margin-inline-start: 6px
}

.plx-dots i {
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: var(--brand);
    display: inline-block;
    opacity: .3;
    transform: translateY(0);
    animation: dot 1.2s ease-in-out infinite;
}

.plx-dots i:nth-child(2) {
    animation-delay: .15s
}

.plx-dots i:nth-child(3) {
    animation-delay: .3s
}

/* حالت کاهش حرکت برای دسترسی‌پذیری */
@media (prefers-reduced-motion: reduce) {
    .plx-glass, .plx-ring, .plx-logo, .plx-dots i {
        animation: none
    }
}

/* انیمیشن‌ها */
@keyframes ringSpin {
    to {
        transform: rotate(360deg)
    }
}

@keyframes glassFloat {
    0%, 100% {
        transform: translateY(0)
    }
    50% {
        transform: translateY(-6px)
    }
}

@keyframes logoFade {
    from {
        opacity: 0;
        transform: translateY(6px) scale(.98)
    }
    to {
        opacity: 1;
        transform: none
    }
}

@keyframes dot {
    0%, 100% {
        opacity: .3;
        transform: translateY(0)
    }
    50% {
        opacity: 1;
        transform: translateY(-3px)
    }
}

/*============ Media Queries برای واکنش‌گرایی ============*/
@media (min-width: 769px) {
    .desktop-only {
        display: block;
    }

    .mobile-only {
        display: none;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .hero-subtitle {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    main.hero {
        padding-top: 70px; /* اگر ناوبار ارتفاعش بیشتر شد می‌توانید به ~80px تغییر دهید */
    }

    .hero-title {
        font-size: 2rem;
        margin-top: 30px;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .mobile-only {
        width: 56%;
        margin: 15px auto;
        border-radius: 18px;
    }

    .navbar {
        justify-content: flex-start;

    }


    .navbar-brand {
        margin-left: 0 !important;
        margin-right: auto !important;
    }

    .navbar-nav {
        margin-right: 0 !important;
        margin-left: 0 !important;
        width: 100%;
        padding: 0; /* اگر UL شما padding داخلی داشت */
    }

    .navbar-nav .nav-item {
        width: 100%;
        font-weight: bold;
        text-align: center;
        margin-right: 0;
        padding: 12px 0; /* فاصله‌ی داخلی از راست */
        /*border-bottom: 1px solid rgba(0, 0, 0, 0.63);*/
        background: rgba(189, 195, 199, 0.05);
        border-radius: 38px;
        /*box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);*/
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
        border: 1px solid rgba(255, 255, 255, 0.84);
        margin: 5px 0;
    }

    /* ۴. حذف border آخر (اختیاری) */
    .navbar-nav .nav-item:last-child {
        border-bottom: none;
    }

    /* ۵. اگر هنوز UL داخل .container قرار دارد و آن padding دارد،
       می‌توانید padding کانتینر را صفر کنید */
    .navbar .container {
        padding-right: 0;
        padding-left: 0;
    }

    /* ۶. باقی تنظیمات (مثلاً justify-content) که در کد شما بود */
    #navbarNav {
        justify-content: flex-end;
        margin-right: 0;
        margin-left: 0;
        width: 100%;
        margin-top: 10px;
    }

    .screenshot-container {
        position: relative;
        display: none;
    }

}

@media (max-width: 450px) {
    .navbar-brand img {
        margin-top: 0;
    }

    .hero-title {
        font-size: 1.7rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .mobile-only {
        width: 96%;
        margin: 15px auto;
        border-radius: 18px;
    }
}


/* === Desktop fix for the phones row === */

/* 1) اجازه بده عرض ردیف باز بشه (قبلاً 800px محدود شده بود) */
.hero-content {
    max-width: min(1200px, 92vw) !important; /* برای سه گوشی کنار هم */
}

/* 2) چینش ردیف گوشی‌ها: مرکزچین و بدون مارجین‌های دستی */
.phones-row {
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    gap: clamp(24px, 4vw, 64px) !important;
    margin: 90px 0 0 0 !important;
    padding: 40px 0 10px !important;
}

/* 3) ظرف هر گوشی با نسبت قاب PNG */
.iphone {
    position: relative;
    flex: 0 0 auto;
    width: clamp(260px, 22vw, 360px); /* اندازه‌ی واکنش‌گرا برای دسکتاپ */
    aspect-ratio: 588 / 880; /* نسبت hero_iphone.png */
    margin: 0;
    z-index: 1;
}

/* 4) قاب رویی */
.iphone-shell {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    display: block;
    z-index: 2;
}

/* 5) اسکرین داخل قاب (اعداد دقیق) */
.frame-hero .iphone-screen {
    position: absolute;
    display: block;
    z-index: 1;
    left: calc(1 / 588 * 100%);
    right: calc(261 / 588 * 100%);
    top: calc(1 / 880 * 100%);
    bottom: calc(196 / 880 * 100%);
    border-radius: 14px;
    background: #111;
    object-fit: cover;
    object-position: center;

    /* خنثی‌سازی هر مقدار قدیمی */
    width: auto !important;
    height: 100% !important;
}

/* فقط برای خیلی واید‌ها کمی بزرگ‌ترش کن */
@media (min-width: 1400px) {
    .hero-content {
        max-width: 1320px !important;
    }

    .iphone {
        width: clamp(300px, 21vw, 400px);
    }
}

/* ظرف هر گوشی */
.iphone {
    position: relative;
    flex: 0 0 auto;
    width: clamp(260px, 22vw, 360px);
    aspect-ratio: 588 / 880; /* نسبت خود hero_iphone.png */
    margin: 0 -150px 0 0;
    z-index: 1;
}

/* قاب رویی (همان PNG) */
.iphone-shell {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    z-index: 2; /* روی viewport قرار بگیرد */
}

/* فقط یکبار تعریف کن؛ تکراری‌ها رو بردار */
.iphone-viewport{
  position: absolute;
  left: 3.571%;
  top:  2.159%;
  width: 52.041%;
  height: 75.568%;
  border-radius: 11.8% / 5.73%;
  overflow: hidden;
  z-index: 1;
  background: #000;
}

/* تصویر داخل viewport */
.iphone-screen{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;

  /* ریزبهبود برای Safari جهت جلوگیری از آرتیفکت‌های رندر */
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
}


@media (max-width: 768px) {
    .iphone {
        margin: -10px -110px 0 0;
        width: clamp(220px, 22vw, 360px);
    }

}

/* --- موبایل: بیرون‌زدن بدون اسکرول افقی --- */
@supports (overflow-x: clip) {
    html, body, .page-wrapper {
        overflow-x: clip;
    }
}

@supports not (overflow-x: clip) {
    html, body, .page-wrapper {
        overflow-x: hidden;
    }
}

/* برای اینکه بیرون‌زدن دیده شود ولی اسکرول نیاید */
@media (max-width: 500px) {
    .phones-row {
        overflow: visible; /* اجازه‌ی نمایش بیرون‌زدگی */
        position: relative;
    }

    /* اگر container بوت‌استرپ padding داشت، کمی جا بده */
    .hero .container {
        padding-left: 0;
        padding-right: 0;
    }
}

/* پایه: همون مارجین‌های فعلیت بمونه */
.iphone {
    /* مارجین‌های قبلی‌ات اینجا هستن (مثلاً 0 -150px 0 0) */
    /* یک متغیر برای مارجین‌تاپ پایه تعریف می‌کنیم */
    --mt-base: 0px;
    margin-top: var(--mt-base);

}

/* در موبایل، مقدار پایه رو همون 30px کن تا با قبلیت هم‌راستا باشه */
@media (max-width: 768px) {

    /* آیتم‌های فرد: 20px روی مقدار پایه اضافه کن */
    .phones-row > .iphone:nth-child(odd) {
        margin-top: calc(var(--mt-base, 0px) + 20px);
    }

    .phones-row {
        margin: 10px 0 0 0 !important;
    }

}

