/* Font Imports */
@import url('https://fonts.googleapis.com/css?family=Google+Sans:400,700|Noto+Sans:400,400i,700');

/* Variables based on 3DLAND Paper Palette */
:root {
  --color-primary: #D97853;     /* Liver Red/Orange from Fig 1 */
  --color-secondary: #5C8C6F;   /* Gallbladder Green from Fig 1 */
  --color-bg-soft: #FDF8F3;     /* Soft Peach/Beige Background from Fig 1/2 */
  --color-text: #2c3e50;        /* Dark Charcoal */
  --color-accent: #6D6695;      /* Spleen Purple */
}

body {
  font-family: 'Noto Sans', sans-serif;
  color: var(--color-text);
  background-color: #ffffff;
}

/* Hero Styling */
.my-hero-bg {
  /* Gradient simulating the soft aesthetic of the paper */
  background: linear-gradient(135deg, var(--color-bg-soft) 0%, #ffffff 100%);
}

.publication-title {
  font-family: 'Google Sans', sans-serif;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 10px !important;
}

.publication-subtitle {
  color: var(--color-primary);
  font-weight: 400;
}

.publication-authors {
  color: var(--color-accent);
  margin-bottom: 20px;
}

/* Button Styling */
.button.is-dark {
  background-color: #363636;
  transition: all 0.3s ease;
}

.button.is-dark:hover {
  background-color: var(--color-primary); /* Turns 'Liver' color on hover */
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(217, 120, 83, 0.3);
}

/* Hero Visual */
.hero-visual {
    margin-top: 40px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* Stat Boxes */
.stat-box {
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    border-top: 4px solid var(--color-primary);
}
.stat-box:hover {
    transform: translateY(-5px);
}

.title.is-3 {
    border-left: 5px solid var(--color-primary);
    padding-left: 15px;
    margin-bottom: 30px;
}

.abstract-text {
    font-size: 1.15rem;
    line-height: 1.8;
}

/* Code Block */
pre {
    background-color: #f5f5f5;
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* --- Styles for Interactive Charts --- */
.chart-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px 30px; /* فاصله عمودی و افقی */
    width: 100%;
    margin-top: 20px;
}

.chart-card {
    background-color: #FDF8F2; /* رنگ پس‌زمینه کارت مشابه تصویر */
    border: 2px solid #E6CCB2;
    border-radius: 15px;
    padding: 30px 20px 20px 20px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.chart-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* تب عنوان بالای کارت */
.chart-header {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #D6BCFA; /* پیش‌فرض */
    padding: 6px 30px;
    border-radius: 8px 8px 0 0; /* کمی گرد */
    clip-path: polygon(10% 0%, 90% 0%, 100% 100%, 0% 100%); /* شکل ذوزنقه */
    color: #4a3b32;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.05);
    white-space: nowrap;
}

/* رنگ‌های هدر برای هر ارگان (مشابه تصویر) */
.header-liver { background-color: #D9A695; }
.header-pancreas { background-color: #D9A695; }
.header-stomach { background-color: #D9A695; }
.header-kidney { background-color: #D9A695; }
.header-spleen { background-color: #D9A695; }
.header-gallbladder { background-color: #D9A695; }

.bar-row {
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    height: 40px;
    position: relative;
}

.bar {
    height: 100%;
    border-radius: 8px;
    width: 0%; /* شروع انیمیشن از صفر */
    transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
}

.bar.ours {
    background-color: #D99E88; /* رنگ آجری روشن مشابه تصویر */
    z-index: 2;
}

.bar.other {
    background-color: #6D7F99; /* رنگ آبی/طوسی مشابه تصویر */
    z-index: 1;
}

.bar-label {
    margin-left: 12px;
    font-weight: 800;
    font-size: 1.1rem;
    color: #333;
    opacity: 0;
    transition: opacity 0.5s ease 1s;
    white-space: nowrap;
}

.bar-label span {
    font-weight: 600;
    font-size: 0.9rem;
    color: #666;
}

/* وقتی کلاس active اضافه شود، لیبل‌ها ظاهر می‌شوند */
.chart-card.active .bar-label {
    opacity: 1;
}

.no-dataset {
    font-weight: 700;
    color: #333;
    padding-left: 5px;
}

.chart-container {
    display: grid;
    /* فاصله بین کارت‌ها را کمی کمتر کردیم تا جمع‌وجورتر شود */
    gap: 35px 20px; 
    width: 100%;
    margin-top: 30px;
    margin-bottom: 20px;
}

/* تنظیمات ریسپانسیو (Grid System) */

/* 1. موبایل (پیش‌فرض): تک ستونه */
.chart-container {
    grid-template-columns: 1fr;
}

/* 2. تبلت: دو ستونه */
@media (min-width: 768px) {
    .chart-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 3. دسکتاپ: سه ستونه (برای ایجاد حالت ۲ ردیف ۳ تایی) */
@media (min-width: 1024px) {
    .chart-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* استایل کارت‌ها (کمی padding را بهینه کردیم برای فضای کمتر) */
.chart-card {
    background-color: #FDF8F2;
    border: 2px solid #E6CCB2;
    border-radius: 12px; /* شعاع گردی کمی کمتر برای ظاهر مدرن‌تر */
    padding: 25px 15px 15px 15px; /* پدینگ کمتر */
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.chart-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* تب عنوان بالای کارت */
.chart-header {
    position: absolute;
    top: -14px; /* کمی پایین‌تر آوردیم */
    left: 50%;
    transform: translateX(-50%);
    background-color: #D6BCFA;
    padding: 4px 20px; /* کوچک‌تر کردن تب هدر */
    border-radius: 6px 6px 0 0;
    clip-path: polygon(10% 0%, 90% 0%, 100% 100%, 0% 100%);
    color: #4a3b32;
    font-weight: 700;
    font-size: 0.9rem; /* فونت کمی ریزتر */
    box-shadow: 0 -2px 5px rgba(0,0,0,0.05);
    white-space: nowrap;
    z-index: 10;
}

/* رنگ‌های هدر برای هر ارگان */
.header-liver { background-color: #D9A695; }
.header-pancreas { background-color: #D9A695; }
.header-stomach { background-color: #D9A695; }
.header-kidney { background-color: #D9A695; }
.header-spleen { background-color: #D9A695; }
.header-gallbladder { background-color: #D9A695; }

/* تنظیم ردیف بارها */
.bar-row {
    margin-bottom: 12px; /* فاصله بین بارها کمتر */
    display: flex;
    align-items: center;
    height: 30px; /* ارتفاع بارها کمی کمتر */
    position: relative;
}

.bar {
    height: 100%;
    border-radius: 6px;
    width: 0%;
    transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

.bar.ours {
    background-color: #D99E88;
    z-index: 2;
}

.bar.other {
    background-color: #6D7F99;
    z-index: 1;
}

/* تنظیم متن لیبل‌ها (فونت ریسپانسیو) */
.bar-label {
    margin-left: 8px;
    font-weight: 800;
    font-size: 0.9rem; /* فونت کوچک‌تر برای جا شدن در ۳ ستون */
    color: #333;
    opacity: 0;
    transition: opacity 0.5s ease 1s;
    white-space: nowrap;
}

.bar-label span {
    font-weight: 600;
    font-size: 0.75rem; /* فونت اسم دیتاست‌ها ریزتر */
    color: #666;
}

.chart-card.active .bar-label {
    opacity: 1;
}

.no-dataset {
    font-weight: 700;
    font-size: 0.85rem;
    color: #333;
    padding-left: 5px;
}

/* Footer */
.footer {
    background-color: var(--color-bg-soft);
    padding: 3rem 1.5rem;
}