﻿/* صفحهٔ محاسبات فرااکسیژن؛ همهٔ قواعد زیر .calc-page هستند و روی بقیهٔ سایت اثر نمی‌گذارند */
.calc-page {
    --c-primary: #2b5fd9;
    --c-accent: var(--primary-red, var(--primary-red,#E53E3E));
    --c-ink: #1f2a44;
    --c-muted: #6b7690;
    --c-line: #e3e8f1;
    --c-card: #fff;
    --c-radius: 16px;
    max-width: 1200px; margin: 0 auto; padding: 8px 12px 40px; color: var(--c-ink);
}

/* ---- توضیح بالای صفحه ---- */
.calc-page .calc-intro {
    background: linear-gradient(135deg, #eef3ff, #f7f9ff); border: 1px solid #d7e1fb; border-radius: var(--c-radius);
    padding: 16px 20px; margin: 18px 0 26px; text-align: justify; line-height: 2; color: #2b3a5e;
}

/* ---- عنوان بخش‌ها ---- */
.calc-page .calc-title { display: flex; align-items: center; gap: 10px; margin: 8px 0 14px; font-size: 1.15rem; font-weight: 800; }
.calc-page .calc-title::before { content: ""; width: 6px; height: 22px; border-radius: 4px; background: var(--c-primary); }
.calc-page .calc-title small { font-weight: 400; color: var(--c-muted); font-size: .8rem; }

/* ---- بنر انتخاب فن ---- */
.calc-page .fan-hero {
    display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; align-items: stretch;
    background: linear-gradient(135deg, #17233f 0%, #24407f 100%); border-radius: 20px; padding: 24px;
    color: #fff; box-shadow: 0 14px 34px rgba(23, 35, 63, .28); position: relative; overflow: hidden; margin-bottom: 34px;
}
.calc-page .fan-hero::after {
    content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%; inset-inline-start: -90px; bottom: -150px;
    background: radial-gradient(circle, rgba(255, 255, 255, .12), transparent 70%); pointer-events: none;
}
.calc-page .fan-hero h2 { font-size: 1.45rem; font-weight: 800; margin: 0 0 8px; }
.calc-page .fan-hero p { margin: 0; color: #cfd8ee; line-height: 2; }
.calc-page .fan-hero .fan-note { margin-top: 10px; font-size: .8rem; color: #9fb0d8; }
.calc-page .fan-hero-text { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; }
.calc-page .fan-hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; position: relative; z-index: 1; }
.calc-page .fan-btn {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .22); border-radius: 16px; padding: 18px 10px;
    color: #fff; text-decoration: none; transition: transform .18s, background .18s, box-shadow .18s; position: relative;
}
.calc-page .fan-btn:hover { background: rgba(255, 255, 255, .17); transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0, 0, 0, .25); color: #fff; }
.calc-page .fan-btn svg { width: 54px; height: 54px; }
.calc-page .fan-btn:hover svg { animation: calc-spin 1.6s linear infinite; }
.calc-page .fan-btn b { font-size: 1rem; }
.calc-page .fan-btn span { font-size: .78rem; color: #cfd8ee; }
.calc-page .fan-btn .badge-new {
    position: absolute; top: 10px; inset-inline-start: 10px; background: var(--c-accent); color: #fff;
    border-radius: 20px; padding: 2px 9px; font-size: .68rem; font-weight: 700;
}
@keyframes calc-spin { to { transform: rotate(360deg); } }

/* ---- شبکهٔ کارت‌ها ---- */
.calc-page .calc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 18px; }
.calc-page .calc-card {
    display: flex; flex-direction: column; background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--c-radius);
    overflow: hidden; text-decoration: none; color: var(--c-ink); box-shadow: 0 2px 10px rgba(31, 42, 68, .06);
    transition: transform .18s, box-shadow .18s, border-color .18s;
}
.calc-page .calc-card:hover { transform: translateY(-5px); box-shadow: 0 14px 28px rgba(31, 42, 68, .14); border-color: #c7d5f5; color: var(--c-ink); }
.calc-page .calc-card .calc-img {
    aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; padding: 16px; background: #f7f9fd;
}
.calc-page .calc-card .calc-img img { max-width: 100%; max-height: 100%; object-fit: contain; border: 0; padding: 0; background: transparent; transition: transform .25s; }
.calc-page .calc-card:hover .calc-img img { transform: scale(1.06); }
.calc-page .calc-card .calc-name {
    padding: 12px 10px 14px; text-align: center; font-weight: 600; font-size: .92rem; line-height: 1.8; min-height: 4.2em;
    border-top: 1px solid var(--c-line); display: flex; align-items: center; justify-content: center;
}

@media (max-width: 767.98px) {
    .calc-page .fan-hero { grid-template-columns: 1fr; padding: 18px; }
    .calc-page .calc-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* ---- H1 و سرتیتر صفحه ---- */
.calc-page .calc-head { margin: 14px 0 20px; }
.calc-page .calc-head h1 { font-size: 1.5rem; font-weight: 800; line-height: 1.7; margin: 0 0 10px; color: var(--c-ink); }
.calc-page .calc-head p { margin: 0; background: linear-gradient(135deg, #eef3ff, #f7f9ff); border: 1px solid #d7e1fb; border-radius: var(--c-radius); padding: 14px 18px; line-height: 2; color: #2b3a5e; text-align: justify; }
.calc-page .calc-name { margin: 0; }
.calc-page .calc-title { margin-top: 8px; }

/* ---- صفحهٔ ابزار (فرم محاسبه) ---- */
.calc-page.calc-tool { max-width: 980px; }
.calc-bc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--c-muted, #6b7690); margin: 8px 0 4px; }
.calc-bc a { color: inherit; text-decoration: none; }
.calc-bc a:hover { color: var(--c-accent, var(--primary-red,#E53E3E)); }
.calc-form { background: #fff; border: 1px solid var(--c-line, #e3e8f1); border-radius: 18px; padding: 22px; box-shadow: 0 6px 22px rgba(31, 42, 68, .07); }
.calc-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.calc-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.calc-field--wide { grid-column: span 2; }
.calc-field label { font-size: 13px; font-weight: 700; color: var(--c-ink, #1f2a44); }
.calc-input { width: 100%; height: 46px; padding: 0 14px; border: 1.5px solid #d5dcea; border-radius: 12px; background: #fbfcff; font-size: 15px; color: var(--c-ink, #1f2a44); transition: border-color .15s, box-shadow .15s; text-align: center; }
select.calc-input { text-align: start; }
.calc-input:focus { outline: 0; border-color: var(--c-primary, #2b5fd9); box-shadow: 0 0 0 4px rgba(43, 95, 217, .14); background: #fff; }
.calc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.calc-btn { display: inline-flex; align-items: center; justify-content: center; height: 46px; padding: 0 26px; border-radius: 12px; font-weight: 700; font-size: 15px; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; }
.calc-btn--primary { background: var(--c-primary, #2b5fd9); color: #fff; }
.calc-btn--primary:hover { background: #204cb5; box-shadow: 0 8px 18px rgba(43, 95, 217, .3); transform: translateY(-1px); color: #fff; }
.calc-btn--ghost { background: #fff; color: var(--c-accent, var(--primary-red,#E53E3E)); border-color: var(--red-border,#F5B5B5); }
.calc-btn--ghost:hover { background: var(--red-soft,#FEF2F2); color: var(--c-accent, var(--primary-red,#E53E3E)); }
.calc-result { margin-top: 18px; padding: 16px 18px; border-radius: 14px; background: #ecf9f1; border: 1px solid #b9e6cb; color: #14532d; font-weight: 700; line-height: 2; text-align: center; }

/* ---- محصولات پیشنهادی ---- */
.calc-suggest { margin-top: 30px; }
.calc-sub { font-size: 1.05rem; font-weight: 800; margin: 0 0 14px; padding-inline-start: 12px; border-inline-start: 4px solid var(--c-accent, var(--primary-red,#E53E3E)); line-height: 1.7; }
.calc-products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.calc-products > * { min-width: 0; display: flex; }
.calc-products > * > * { width: 100%; }

/* ---- لینک به سایر ابزارها ---- */
.calc-others { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; padding-top: 18px; border-top: 1px dashed var(--c-line, #e3e8f1); }
.calc-others a { padding: 7px 14px; border: 1px solid var(--c-line, #e3e8f1); border-radius: 999px; background: #fff; color: var(--c-ink, #1f2a44); font-size: 13px; text-decoration: none; transition: .15s; }
.calc-others a:hover { background: var(--c-primary, #2b5fd9); border-color: var(--c-primary, #2b5fd9); color: #fff; }

@media (max-width: 991.98px) { .calc-products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767.98px) {
    .calc-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .calc-form { padding: 16px; }
    .calc-field--wide { grid-column: auto; }
    .calc-btn { flex: 1 1 100%; }
    .calc-page .calc-head h1 { font-size: 1.2rem; }
}
