    /* --- متغیرهای رنگی مدرن --- */
    :root {
      --primary: #112548;       /* آبی سرمه‌ای روشن‌تر */
      --primary-dark: #1e3a8a;  /* آبی تیره */
      --accent: #3b82f6;        /* آبی آسمانی */
      --bg-body: #f1f5f9;       /* خاکستری خیلی روشن */
      --bg-card: #ffffff;
      --text-main: #0f172a;
      --text-muted: #64748b;
      --success: #10b981; 
      --warning: #f59e0b;
      --danger: #ef4444;
      --radius: 24px;
      --shadow: 0 10px 40px -10px rgba(0,0,0,0.08);
      --bg-input: #f8fafc;
      --border-light: #e2e8f0;
      --shadow-soft: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
      --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    }
    
@font-face {
  font-family: 'Baloo Bhaijaan 2';
  src: url('https://quamtex.ir/fonts/webfonts/baloo-bhaijaan-2-arabic-500-normal.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Baloo Bhaijaan 2';
  src: url('https://quamtex.ir/fonts/webfonts/baloo-bhaijaan-2-latin-500-normal.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}


body {
  background-color: #dae0e2;
  font-family: 'Baloo Bhaijaan 2', arial;
  font-size: 8px;
}

.main-container {
  display: flex;
  flex-direction: row;
}

.main-content {
  padding: clamp(-0.125rem, 0.4464285714285714rem + 0.8571428571428572vw, 1.25rem);
  margin: clamp(-0.125rem, -0.0892857142857143rem + 1.4285714285714286vw, 1.25rem);
  background-color: #ffffff;
  border-radius: 20px;
  font-size: clamp(0.938rem, 0.842rem + 0.426vw, 1.188rem);
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  color: #112548;
  width: 100%;
}

.description {
  background-color: #ffffff;
  padding: 20px;
  border-radius: 20px;
  margin-bottom: 16px;
  text-align: right;
  font-size: clamp(0.875rem, 0.731rem + 0.638vw, 1.25rem);
  border: 2px solid #e2e8f0;
  margin-top: 15px;
}

.description-title {
  font-size: clamp(1rem, 0.809rem + 0.851vw, 1.5rem);
  color: #112548;
}

h3 {
  font-size: 18px;
  align-self: center;
}

.rtl {
  direction: rtl;
}

h1 {
    font-size: 24px;
    margin-bottom: 16px;
}
 


    /* --- کارت محاسبه‌گر --- */
    .calculator-card {
      border-radius: var(--radius);
      padding: 40px;
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 30px;
      align-items: end;
      border: 2px solid #e2e8f0;
      margin-bottom: 15px;
    }

    /* --- اینپوت‌ها --- */
    .input-group {
      display: flex;
      flex-direction: column;
      gap: 5px;
      margin-bottom: 12px;
    }

    .input-group label {
      color: #64748b;
      font-size: 0.95rem;
      direction: rtl;
    }

    .input-wrapper {
      position: relative;
    }

    input, select {
    font-size: 16px;
    border: 2px solid var(--border-light);
    background-color: var(--bg-input);
    outline: none;
    height: 50px;
    bottom: 14px;
    border-radius: 16px;
    width: 100%;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.02);
    text-align: center;
    font-family: "Baloo Bhaijaan 2", sans-serif;
    color: var(--primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    input:focus, select:focus {
      border-color: var(--accent);
      background: #fff;
      box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
      transform: translateY(-2px);
    }

    /* --- دکمه --- */
    .btn-calculate {
    font-size: 1.2rem;
    border: none;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, #2c4a85 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(17, 37, 72, 0.2);
    font-family: "Baloo Bhaijaan 2", sans-serif;
    grid-column: span 2;
    justify-self: center;
    width: 40%;
    min-width: 150px;
    height: 48px; 
    letter-spacing: 0.5px;
    }

    .btn-calculate:hover {
      transform: translateY(-3px);
      background: linear-gradient(135deg, #1e3a6e 0%, #3b5d9c 100%);
    }

    .btn-calculate:active {
      transform: translateY(0);
      box-shadow: 0 2px 5px rgba(17, 37, 72, 0.2);
      transform: translateY(0px);
    }

    /* --- بخش نتایج (مخفی به صورت پیش‌فرض) --- */
    #results-area {
      display: none; /* با جاوااسکریپت نمایش داده می‌شود */
      animation: slideUp 0.6s ease-out;
      border: 2px solid #e2e8f0;
      border-radius: 20px;
      padding: 8px;
    }

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

    .results-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px;
    }

    /* --- کارت‌های نتیجه --- */
    .result-box {
      background: white;
      padding: 25px;
      border-radius: 20px;
      border: 1px solid #e2e8f0;
      text-align: center;
      transition: transform 0.3s;
    }
    
    .result-box:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow);
    }

    .result-box.main {
      background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
      border-color: #bfdbfe;
      grid-column: 1 / -1;
    }

    .result-title {
      font-size: 1.1rem;
      color: var(--text-muted);
      margin-bottom: 10px;
    }

    .result-value {
      font-size: 2.5rem;
      font-weight: bold;
      color: var(--primary-dark);
    }

    .unit {
      font-size: 1rem;
      color: var(--text-muted);
      font-weight: normal;
    }

    /* --- بخش ماکروها --- */
    .macros-container {
      display: flex;
      justify-content: space-around;
      margin-top: 20px;
      gap: 10px;
    }

    .macro-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      width: 30%;
    }

    .progress-bar {
      width: 100%;
      height: 8px;
      background: #e2e8f0;
      border-radius: 10px;
      overflow: hidden;
      margin-top: 8px;
    }

    .progress-fill {
      height: 100%;
      border-radius: 10px;
    }

    /* رنگ‌های ماکرو */
    .p-color { background-color: var(--success); }
    .c-color { background-color: var(--warning); }
    .f-color { background-color: var(--danger); }

    .tag {
        font-size: 0.9rem;
        padding: 5px 10px;
        border-radius: 8px;
        background: #fff;
        margin-bottom: 5px;
    }

    /* --- نوتیفیکیشن خطا --- */
    .notification {
      position: fixed;
      top: 20px;
      left: 50%;
      transform: translateX(-50%) translateY(-150%);
      background: #fef2f2;
      border: 1px solid #fecaca;
      color: #991b1b;
      padding: 10px 16px;
      border-radius: 12px;
      box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
      z-index: 10000;
      transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
      display: flex;
      align-items: center;
      gap: 10px;
      width: 50%;
      display: flex;
      flex-direction: row;
      justify-content: center;
      font-size: clamp(1rem, 0.556rem + 0.926vw, 1.25rem);
    }
    
    .notification.active {
      transform: translateX(-50%) translateY(0);
    }

      .water {grid-column: span 2;}
    /* --- ریسپانسیو --- */
    @media (max-width: 768px) {
      .calculator-card {
        padding: 20px;
        gap: 20px;
        display: block;
      }
      
      h1 { font-size: 1.5rem; }
      
      .result-value { font-size: 2rem; }
      .input-group {margin-bottom: 20px ;}
      .notification {width: 90%;}
    }
    
    
    /* --- استایل‌های عمومی بخش توضیحات و FAQ --- */
.content-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f5f9;
    line-height: 1.8;
    color: #334155;
}

.section-title {
    font-size: 1.5rem;
    color: #0f172a;
    margin-bottom: 1.5rem;
    border-right: 4px solid #3b82f6; /* رنگ آبی برند */
    padding-right: 12px;
    font-weight: 800;
}

.subsection-title {
    font-size: 1.1rem;
    color: #1e293b;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-align: right;
}

/* --- استایل لیست‌ها --- */
.info-list {
    list-style: none;
    padding: 0;
}
.info-list li {
    margin-bottom: 12px;
    padding-right: 20px;
    position: relative;
}
.info-list li::before {
    content: "•";
    color: #3b82f6;
    font-size: 1.5rem;
    position: absolute;
    right: 0;
    top: -5px;
}

/* --- باکس فرمول ریاضی --- */
.formula-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}
.formula-box h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: #64748b;
}
.math-row {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    margin-bottom: 8px;
    color: #0f172a;
    font-size: 0.9rem;
}
.math-row span {
    color: #3b82f6;
    display: inline-block;
    width: 60px;
}

/* --- باکس‌های راهنما (کاهش/افزایش وزن) --- */
.guide-steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 768px) {
    .guide-steps {
        grid-template-columns: 1fr 1fr;
    }
}
.step-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: transform 0.2s;
}
.step-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.step-icon {
    font-size: 1.8rem;
    background: #eff6ff;
    padding: 8px;
    border-radius: 10px;
    line-height: 1;
}

/* --- استایل آکاردئون FAQ --- */
.faq-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item[open] {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.faq-question {
    padding: 1rem 1.2rem;
    cursor: pointer;
    font-weight: 600;
    color: #1e293b;
    list-style: none; /* حذف نشانگر پیش‌فرض */
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* آیکون سفارشی برای FAQ */
.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: #94a3b8;
    transition: transform 0.3s ease;
    line-height: 1;
}

.faq-item[open] .faq-question::after {
    content: '−';
    transform: rotate(180deg);
    color: #3b82f6;
}

/* حذف نشانگر پیش‌فرض در کروم/سافاری */
.faq-question::-webkit-details-marker {
    display: none;
}

.faq-answer {
    padding: 0 1.2rem 1.2rem 1.2rem;
    color: #475569;
    font-size: 0.95rem;
    border-top: 1px solid transparent;
    animation: fadeIn 0.3s ease-in-out;
}

.faq-item[open] .faq-answer {
    border-top-color: #e2e8f0;
    padding-top: 1rem;
}

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