@import url(./variables.css);

/* hero */
.hero {
    position: relative;
    overflow: hidden;
    padding-block: clamp(24px, 6vw, 64px);
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    inset: -30% -15% auto auto;
    width: 160%;
    height: 160%;
    transform: rotate(25deg);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    gap: clamp(16px, 3vw, 32px);
    grid-template-columns: 1fr;
    align-items: center;
}

.hero-cards {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr 1fr;
}

.card {
    background: linear-gradient(180deg, #111, #0d0d0e);
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow);
    padding: 14px;
}

.card h3 {
    margin: 0 0 10px 0;
    font-size: clamp(12px, 1.6vw, 14px);
    color: #d7deff;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.price {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-variant-numeric: tabular-nums;
    color: var(--text);
    gap: 10px;
}

.price strong {
    font-size: clamp(16px, 2.6vw, 20px);
    letter-spacing: .5px
}

.delta {
    font-size: clamp(12px, 1.8vw, 14px);
    border-radius: 999px;
    padding: .15rem .5rem
}

.delta.up {
    color: var(--pos)
}

.delta.down {
    color: var(--neg)
}

.spark {
    width: 100%;
    height: 46px
}

/* right column */
.hero-text {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-title {
    margin: 0 0 12px;
    font-size: clamp(32px, 4.8vw, 48px);
    line-height: 1.4;
    font-weight: 800;
    color: var(--text);
    text-align: center;
}

.hero-desc {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: clamp(14px, 2.2vw, 16px);
    max-width: 100%;
    text-align: center;
}

.actionBtn {
    display: block;
    width: max-content;
    gap: .5rem;
    background: var(--primary);
    color: #fff;
    border: 0;
    margin: 30px auto;
    cursor: pointer;
    font-weight: 700;
    padding: .8rem 35px;
    border-radius: 12px;
    transition: transform .2s ease;
}

.actionBtn:focus-visible {
    outline: 2px solid #8fb3ff;
    outline-offset: 3px
}

.actionBtn:hover {
    transform: translateY(-2px)
}

/*nai section*/
.naiQuestionContainer {
    margin-top: 1rem;
    overflow: hidden;
}
.naiTitle {
    font-size: clamp(18px, 1.1vw, 22px);
    color: var(--text);
}
.naiQuestionContainer .swiper-wrapper {
    height: 50px !important;
}
.naiSwiper {
    margin-top: 1.5rem;
    height: 50%;
    overflow: hidden;
}
.naiQuestionContainer .swiper {
    width: 100%;
    height: 100%;
}
.naiQuestionContainer .swiper-slide {
    height: calc(100% - 10px) !important;
    margin-top: 5px;
}
.naiQuestion {
    text-align: center;
    font-size: 15px;
    width: auto !important;
    padding: 8px 16px 10px 25px;
    background-color: #2a2a2abb;
    border-radius: var(--radius1);
    cursor: pointer;
    transition: 0.2s;
}
.naiQuestion:hover {
    background-color: #2d2d2d;
    transition: 0.2s;
}
/*end of nai section*/

/*news section*/
.cryptoNewsContainer {
    margin-top: 4rem;
}
.cryptoNewsTitle {
    font-size: clamp(18px, 1.1vw, 22px);
    color: var(--text);
}
.cryptoNewsSwiper {
    margin-top: 1.5rem;
    position: relative;
}
.cryptoNewsItem {
    padding: 40px 25px 20px;
    border-radius: var(--radius);
    background-color: var(--bg1);
    cursor: pointer;
    transition: 0.2s;
}
.cryptoNewsItem:hover {
    transition: 0.2s;
}
.cryptoNewsHeadline {
    font-size: clamp(18px, 1vw, 18px);
    color: var(--text);
    line-height: 1.8rem;
}
.cryptoNewsDescription {
    font-size: clamp(16px, 0.9vw, 16px);
}
.cryptoNewsNaiAnalyzeContainer {
    border-radius: var(--radius);
    margin-top: 2rem;
    position: relative;
}
.cryptoNewsNaiAnalyzeImage {
    position: absolute;
    top: -14px;
    right: -8px;
}
.cryptoNewsNaiAnalyzeHeadline {
    font-size: clamp(13px, 0.8vw, 15px);
    border-radius: var(--radius) var(--radius) 0 0;
    background-color: var(--black);
    padding: 15px 15px;
    width: 67%;
    z-index: 2;
}
.cryptoNewsNaiAnalyzeDescription {
    background-color: var(--black);
    font-size: clamp(12px, 0.85vw, 14px);
    padding: 15px 15px 20px 15px;
    margin-top: -6px;
    border-radius: 0 var(--radius) var(--radius) var(--radius);
    z-index: 2;
}
.naiEffect {
    font-size: clamp(13px, 0.8vw, 15px);
    border-bottom-left-radius: var(--radius);
    background-color: var(--bg1);
    margin-top: 8px;
    padding: 0 5px 6px 5px;
    width: 33%;
    display: inline-flex;
    z-index: 2;
}
.topBox {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.underlayBox {
    width: 80%;
    height: 30px;
    position: absolute;
    z-index: 0;
    top: 25px;
    left: 0;
    background-color: var(--black);

}
.newsEffectText {
    margin: 0 10px;
    white-space: nowrap;
}
.leftShadow {
    height: 100%;
    width: 15%;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 10;
    opacity: 1;
    background-image: linear-gradient(to right, #000000, #000000cc, #00000000);
    transform: translateX(0);
    transition: opacity .24s ease, transform .24s ease;
    pointer-events: none;
}
.leftShadow.isHidden {
    opacity: 0;
    transition: 0.3s;
}
/*end of news section*/

.ctaContainer{
    max-width: var(--maxw) !important;
    padding-block: 44px 72px; /* فاصله بالا و پایین نسبت به فوتر */
}
.cta_card{
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    max-width: 1024px;
    margin: auto;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--card);
    box-shadow: 0 20px 60px rgba(0,0,0,.45);
    padding: 40px;
}
/* پس‌زمینه گرادیانی شبیه به تصویر */
.cta_card::before{
    content:"";
    position:absolute;
    inset:0;
    background:
            radial-gradient(1200px 420px at 15% 100%, rgba(168,45,255,.18), transparent 60%),
            radial-gradient(1000px 360px at 90% 0%,   rgba(0,140,255,.18), transparent 60%),
            linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0) 40%);
    pointer-events:none;
}
.cta_inner{
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 24px;
    padding: 28px 36px;
    min-height: 150px;
}
.cta_text{
    margin: 0 30px 0 0;
    text-align:right;
    font-weight:700;
    font-size: clamp(16px, 2.1vw, 20px);
    color:#f3f6fb;
}
.startChat {
    margin: 0 auto 0 0 !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px){
    .hero-cards {
        display: grid;
        gap: 16px;
        grid-template-columns: 1fr;
    }
    .cta{padding-block: 24px 56px}
    .cta_card {
        padding: 10px;
        align-items: center;
        justify-content: center;
    }
    .cta_text {
        margin: 10px;
        text-align: center;
    }
    .startChat {
        margin: 40px auto 20px !important;
    }
}
@media (max-width: 768px){
    .cta_card {
        padding: 30px 40px 20px 40px;
        align-items: center;
        justify-content: center;
    }
    .cta_text {
        margin: 0 30px 10px 10px;
        text-align: center;
    }
    .startChat {
        margin: 20px auto 20px !important;
    }
}
@media (min-width: 992px) {
    .hero-grid {
        grid-template-columns: minmax(320px, 1fr) 1.1fr;
    }
    .hero-text {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
    }
    .hero-title {
        text-align: right;
    }
    .hero-desc {
        text-align: right;
    }
    .actionBtn {
        margin: 30px 75% 30px 0 !important;
    }
    .startChat {
        margin: 0 auto 0 0 !important;
    }
}

/* NAI bubble : START */
.nai-bubble{
  position: fixed;
  right: 16px; bottom: 16px;
  width: min(380px, 92vw);
  background: #0F1423;
  color: #EDEDED;
  border: 1px solid #26314A;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  overflow: hidden;
  z-index: 9999;
}
.nai-bubble__head{
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 12px; background:#111827; border-bottom:1px solid #26314A;
}
.nai-bubble__close{
  all:unset; cursor:pointer; font-size:20px; line-height:1; padding:0 6px; color:#9CA3AF;
}
.nai-bubble__close:hover{ color:#fff; }
.nai-bubble__body{ padding:14px; min-height:92px; }
.nai-bubble__body p{ margin:0; line-height:1.8; }

.nai-loader{
  width:22px; height:22px; border-radius:50%;
  border:3px solid #2C3757; border-top-color:#6CA6FF;
  animation:nai-spin 0.9s linear infinite; display:inline-block; vertical-align:middle;
  margin-inline-end:8px;
}
@keyframes nai-spin{ to{ transform: rotate(360deg);} }

.nai-hint{ display:inline-block; color:#AEB6C2; font-size:13px; }

.nai-error{ color:#FCA5A5; }

.nai-bubble__body{
  max-height: 50vh;
  overflow: auto;
  direction: rtl;
}

.nai-bubble__body p{
  white-space: pre-wrap;
  line-height: 1.9;
  overflow-wrap: anywhere;
  margin: 0;
}

.nai-questions {
  list-style: none;
  padding: 0;
  margin-top: 10px;
}
.nai-questions li {
  margin: 5px 0;
}
.nai-q {
  background: #0d1421;
  border: 1px solid #2b3a57;
  border-radius: 8px;
  color: #fff;
  padding: 8px 12px;
  width: 100%;
  text-align: right;
  cursor: pointer;
  transition: background 0.2s;
}
.nai-q:hover {
  background: #1b2640;
}
/* ظرف اسکرولی سؤالات داخل باکس نوآی */
.nai-questions-wrap {
  max-height: 260px; /* حدوداً 5 آیتم با فاصله؛ اگر ارتفاع هر دکمه متفاوت بود تنظیمش کن */
  overflow-y: auto;
  margin-top: 10px;
  padding-inline-start: 0; /* RTL */
}

/* لیست و آیتم‌ها */
.nai-questions {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nai-questions li {
  margin: 6px 0;
}

/* دکمه سوال */
.nai-q {
  background: #0d1421;
  border: 1px solid #2b3a57;
  border-radius: 10px;
  color: #fff;
  padding: 10px 12px;
  width: 100%;
  text-align: right;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  line-height: 1.4;
}
.nai-q:hover, .nai-q:focus {
  background: #1b2640;
  border-color: #3b4e77;
  outline: none;
}

/* اسکرول‌بار ظریف (اختیاری) */
.nai-questions-wrap::-webkit-scrollbar {
  width: 8px;
}
.nai-questions-wrap::-webkit-scrollbar-thumb {
  background: #2b3a57;
  border-radius: 6px;
}

/* NAI bubble : END */