/* ========================================================
   ۰. استایل بنر ورودی فرمایش رهبری و شهدا
   ======================================================== */
.banner-stage-container {
    position: relative;
    background: #0f172a;
    width: 100% !important;
    min-height: 560px;
    height: 75vh;
    max-height: 780px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1.5px solid #bae6fd;
    padding: 0;
    margin: 0;
}

.banner-card-box {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease-out, opacity 0.15s ease-out, filter 0.15s ease-out;
    will-change: transform, opacity, filter;
}

.banner-quote-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    border-radius: 0 !important;
    filter: drop-shadow(0 4px 15px rgba(0,0,0,0.15));
}

.scroll-guide-pill {
    position: absolute;
    bottom: 24px;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 26px;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50rem;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    animation: floatUpDown 2.2s infinite ease-in-out;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}

.scroll-guide-pill:hover {
    background: rgba(2, 132, 199, 0.9);
    color: #ffffff;
    border-color: #38bdf8;
    transform: translateY(-2px);
}

@keyframes floatUpDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

/* ========================================================
   تنظیمات عمومی و تایپوگرافی
   ======================================================== */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-accent {
    color: #0284c7 !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.link-accent:hover {
    color: #0369a1 !important;
    transform: translateX(-4px);
}

.btn-custom-blue {
    color: #0284c7 !important;
    background: #f0f9ff !important;
    border: 1.5px solid #bae6fd !important;
    border-radius: 50rem !important;
    font-weight: 700 !important;
    padding: 8px 22px !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.btn-custom-blue:hover {
    color: #ffffff !important;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    border-color: #0284c7 !important;
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.3) !important;
    transform: translateY(-2px);
}

/* ========================================================
   ۱. هیرو بنر معرفی صندوق (لوگوی شناور)
   ======================================================== */
@keyframes upDownMover {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-26px); }
}

.floating-logo-wrapper {
    text-align: center;
    animation: upDownMover 3s ease-in-out infinite;
}

.floating-logo-wrapper img {
    max-width: 250px !important;
    height: auto;
    filter: drop-shadow(0 15px 25px rgba(2, 132, 199, 0.2));
}

.hero-intro-fullwidth {
    width: 100% !important;
    min-height: 560px !important;
    padding: 100px 0 !important;
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.62) 0%, rgba(240, 249, 255, 0.88) 50%, rgba(224, 242, 254, 0.94) 100%),
                      url("../img/hero-bg.jpg");
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    border-bottom: 1.5px solid #bae6fd !important;
    box-shadow: 0 12px 35px -10px rgba(2, 132, 199, 0.15) !important;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.hero-intro-fullwidth::before {
    content: '';
    position: absolute;
    top: -80px;
    left: -80px;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-date-badge {
    background: #ffffff;
    color: #0369a1;
    font-size: 0.85rem;
    font-weight: 800;
    padding: 7px 18px;
    border-radius: 50px;
    border: 1px solid #bae6fd;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.08);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    direction: ltr;
    unicode-bidi: plaintext;
}

.hero-title {
    color: #0f172a;
    letter-spacing: -0.5px;
    line-height: 1.4;
}

.hero-lead {
    color: #334155;
    max-width: 540px;
    font-weight: 400;
}

.btn-hero-more {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 50rem !important;
    padding: 14px 38px !important;
    font-weight: 700 !important;
    font-size: 1.05rem !important;
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.35) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex;
    align-items: center;
}
.btn-hero-more:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%) !important;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(2, 132, 199, 0.45) !important;
    color: #ffffff !important;
}

/* ========================================================
   ۲. اسلایدر اخبار و رویدادها
   ======================================================== */
.news-section-title { color: #0f172a; }
.news-link-title { color: #0f172a; }
.news-lead-text { color: #475569 !important; }
.news-media-box { border-color: #f1f5f9; }
.object-fit-cover { object-fit: cover; }
.slider-border-box { border-color: #f1f5f9 !important; }

.news-date-tag {
    direction: ltr;
    unicode-bidi: plaintext;
    font-weight: 700;
}

.news-wrapper-card {
    background: #ffffff;
    border-radius: 24px;
    border: 1.5px solid #e0f2fe;
    box-shadow: 0 12px 30px -8px rgba(15, 23, 42, 0.06);
    transition: border-color 0.3s ease;
}
.news-wrapper-card:hover {
    border-color: #bae6fd;
}

.event-slide-item {
    animation: fadeInSlide 0.5s ease-in-out;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slider-btn-action {
    width: 36px;
    height: 36px;
    border-color: #cbd5e1;
}

.event-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #cbd5e1 !important;
    border: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}
.event-dot[aria-current="true"] {
    width: 26px;
    background-color: #0284c7 !important;
}

/* ========================================================
   ۳. نمودار سه‌بعدی ایزومتریک عملکرد
   ======================================================== */
.stats-wrapper-card {
    background: #ffffff;
    border-radius: 24px;
    border: 1.5px solid #e0f2fe;
    box-shadow: 0 12px 30px -8px rgba(15, 23, 42, 0.06);
}

.stats-header-title { color: #0f172a; }
.stats-badge-pill {
    background-color: #e0f2fe;
    color: #0284c7;
    border: 1px solid #bae6fd;
}

#stats-section .custom-chart-container,
#stats-section .custom-chart-container * {
    box-sizing: border-box;
}

#stats-section .custom-chart-container {
    --plot-height: 280px;
    --label-space: 42px;

    background: linear-gradient(135deg, #eaf3fb 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    padding: 130px 24px 20px 16px; /* فضای بالای نمودار برای نمایش بدون مشکل تولتیپ */
    overflow-x: auto;
    box-shadow:
        inset 0 2px 6px rgba(0, 0, 0, 0.02),
        0 8px 24px rgba(37, 99, 235, 0.06);
}

#stats-section .custom-chart-container:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 4px;
}

#stats-section .chart-inner-layout {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 620px;
    height: calc(var(--plot-height) + var(--label-space));
}

#stats-section .chart-y-axis {
    position: relative;
    flex: 0 0 42px;
    height: var(--plot-height);
    color: #475569;
    font-size: 0.76rem;
    font-weight: 700;
    user-select: none;
}

#stats-section .chart-y-axis > span {
    position: absolute;
    right: 0;
    bottom: calc(var(--tick, 0) * 1%);
    transform: translateY(50%);
    line-height: 1;
}

#stats-section .chart-plot-area {
    position: relative;
    flex: 1 0 540px;
    height: var(--plot-height);
    isolation: isolate;
}

#stats-section .chart-grid-backdrop {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: repeating-linear-gradient(
        to right,
        rgba(147, 197, 253, 0.22) 0,
        rgba(147, 197, 253, 0.22) 1px,
        transparent 1px,
        transparent 54px
    );
}

#stats-section .grid-row {
    position: absolute;
    right: 0;
    left: 0;
    bottom: calc(var(--tick, 0) * 1%);
    height: 1px;
    background: rgba(96, 165, 250, 0.35);
}

#stats-section .grid-row.bottom-baseline {
    height: 2px;
    background: #60a5fa;
}

#stats-section .chart-bars-track {
    position: relative;
    display: flex;
    height: 100%;
    padding: 0 12px;
    z-index: 1;
}

#stats-section .bar-item-group {
    --blue-lightness: clamp(38%, calc(62% - var(--col-idx, 0) * 3%), 62%);
    --c-main: hsl(211, 78%, var(--blue-lightness));
    --c-side: hsl(211, 82%, calc(var(--blue-lightness) - 12%));
    --c-top: hsl(211, 88%, calc(var(--blue-lightness) + 18%));

    position: relative;
    flex: 1 0 64px;
    height: 100%;
}

#stats-section .bar-item-group:hover,
#stats-section .bar-item-group:focus-within {
    z-index: 25;
}

#stats-section .bar-trigger {
    appearance: none;
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
    overflow: visible;
    touch-action: manipulation;
}

#stats-section .bar-trigger:focus-visible {
    outline: 2px dashed #2563eb;
    outline-offset: 3px;
}

#stats-section .bar-3d-box {
    position: absolute;
    bottom: 0;
    left: calc(50% - 20px);
    display: block;
    width: 32px;
    height: clamp(0%, var(--bar-height, 0%), 100%);
    pointer-events: none;
    transition: filter 0.2s ease;
}

#stats-section .bar-3d-box.is-zero {
    display: none;
}

#stats-section .face-front,
#stats-section .face-top,
#stats-section .face-side {
    position: absolute;
    display: block;
}

#stats-section .face-front {
    inset: 0;
    background: var(--c-main);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
}

#stats-section .face-top {
    top: -9px;
    left: 0;
    width: 100%;
    height: 9px;
    background: var(--c-top);
    transform: skewX(-45deg);
    transform-origin: bottom left;
}

#stats-section .face-side {
    top: 0;
    left: 100%;
    width: 9px;
    height: 100%;
    background: var(--c-side);
    transform: skewY(-45deg);
    transform-origin: top left;
}

#stats-section .bar-trigger:hover .bar-3d-box,
#stats-section .bar-trigger:focus .bar-3d-box {
    filter: brightness(1.08) drop-shadow(0 5px 7px rgba(15, 23, 42, 0.2));
}

#stats-section .bar-x-label {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    width: 100%;
    text-align: center;
    white-space: nowrap;
    font-size: 0.78rem;
    font-weight: 700;
    color: #334155;
    user-select: none;
}

/* کارت تولتیپ اطلاعات ستون */
#stats-section .bar-info-card {
    position: absolute;
    bottom: calc(100% + 14px);
    left: 50%;
    width: 220px;
    min-height: auto;
    max-height: none; /* محدودیت ارتفاع برداشته شد */
    overflow: visible; /* محتوا بریده نمی‌شود */
    padding: 10px 14px;
    transform: translateX(-50%) translateY(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 12px;
    color: #ffffff;
    text-align: right;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
    z-index: 30;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

#stats-section .bar-item-group:hover .bar-info-card,
#stats-section .bar-item-group:focus-within .bar-info-card {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

#stats-section .bar-item-group:first-child .bar-info-card {
    left: 0;
    transform: translateY(6px);
}

#stats-section .bar-item-group:last-child:not(:first-child) .bar-info-card {
    right: 0;
    left: auto;
    transform: translateY(6px);
}

#stats-section .bar-item-group:first-child:hover .bar-info-card,
#stats-section .bar-item-group:first-child:focus-within .bar-info-card,
#stats-section .bar-item-group:last-child:not(:first-child):hover .bar-info-card,
#stats-section .bar-item-group:last-child:not(:first-child):focus-within .bar-info-card {
    transform: translateY(0);
}

#stats-section .info-card-header {
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(51, 65, 85, 0.8);
    color: #60a5fa;
    font-size: 0.82rem;
    font-weight: 800;
}

#stats-section .info-card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.76rem;
    padding: 3px 0;
}

#stats-section .info-card-label {
    flex-shrink: 0;
    color: #94a3b8;
    font-weight: 500;
}

#stats-section .info-card-val {
    color: #38bdf8;
    font-weight: 800;
    direction: ltr;
    text-align: left;
    white-space: nowrap;
}

@media (max-width: 576px) {
    #stats-section .custom-chart-container {
        --plot-height: 240px;
        padding-right: 16px;
        padding-left: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #stats-section .bar-3d-box,
    #stats-section .bar-info-card {
        transition: none;
    }
}

/* ========================================================
   ۴. بخش خدمات الکترونیک (میز خدمت نئون چرخان)
   ======================================================== */
.facility-cta-card {
    position: relative !important;
    border-radius: 28px !important;
    overflow: hidden !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    background: #0284c7 !important;
    box-shadow: 0 12px 35px rgba(2, 132, 199, 0.2), 0 0 20px rgba(250, 204, 21, 0.15) !important;
}

.facility-cta-card::before {
    content: "" !important;
    position: absolute !important;
    width: 300% !important;
    height: 300% !important;
    background: conic-gradient(
        #0284c7 0deg,
        #38bdf8 45deg,
        #facc15 90deg,
        #f59e0b 135deg,
        #0284c7 180deg,
        #38bdf8 225deg,
        #facc15 270deg,
        #f59e0b 315deg,
        #0284c7 360deg
    ) !important;
    animation: rotateNeon 4.5s linear infinite !important;
    z-index: 1 !important;
}

.facility-cta-card::after {
    content: "" !important;
    position: absolute !important;
    inset: 3.5px !important;
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 65%, #fffbeb 100%) !important;
    border-radius: 25px !important;
    z-index: 2 !important;
}

.facility-inner-content {
    position: relative !important;
    z-index: 10 !important;
    width: 100% !important;
}

@keyframes rotateNeon {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.facility-badge {
    background: #ffffff;
    color: #0284c7;
    font-size: 0.85rem;
    font-weight: 800;
    padding: 6px 16px;
    border-radius: 50px;
    border: 1px solid #bae6fd;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.08);
}

.facility-main-title { color: #0f172a; }
.facility-lead-desc { color: #475569 !important; }

.btn-facility-enter {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 50rem !important;
    padding: 12px 30px !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex;
    align-items: center;
    text-decoration: none !important;
}
.btn-facility-enter:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(2, 132, 199, 0.4) !important;
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%) !important;
    color: #ffffff !important;
}

.facility-svg-box {
    background: #ffffff;
    border-radius: 24px;
    padding: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #bae6fd;
    box-shadow: 0 10px 30px rgba(2, 132, 199, 0.15);
    transition: transform 0.3s ease;
}
.facility-svg-box:hover {
    transform: translateY(-4px) scale(1.02);
}

@media (prefers-reduced-motion: reduce) {
    .facility-cta-card::before,
    .floating-logo-wrapper,
    .scroll-guide-pill,
    .event-slide-item {
        animation: none !important;
        transition: none !important;
    }
}

/* ==========================================
   دکمه شناور تماس با ستاد (Floating Phone Button)
   ========================================== */
.floating-contact-btn {
    position: fixed;
    bottom: 30px;
    left: 30px; /* در صفحات راست‌به‌چپ، گوشه پایین-چپ بهترین دید را دارد */
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    color: #ffffff !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(13, 110, 253, 0.4);
    z-index: 1050;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.floating-contact-btn:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 12px 28px rgba(13, 110, 253, 0.55);
    color: #ffffff !important;
}

/* افکت موج و انیمیشن زنده (Pulse) */
.contact-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    opacity: 0.6;
    z-index: -1;
    animation: contactPulseAnim 2.2s infinite ease-out;
}

@keyframes contactPulseAnim {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    70% {
        transform: scale(1.5);
        opacity: 0;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* آیکون تلفن در هنگام شناور شدن */
.floating-contact-btn i {
    transition: transform 0.3s ease;
}

.floating-contact-btn:hover i {
    transform: rotate(15deg);
}

/* واکنش‌گرایی برای موبایل */
@media (max-width: 768px) {
    .floating-contact-btn {
        bottom: 20px;
        left: 20px;
        width: 52px;
        height: 52px;
        font-size: 20px;
    }
}

/* ========================================================
   تنظیمات واکنش‌گرا (Responsive) برای موبایل (Hero و معرفی صندوق)
   ======================================================== */
@media (max-width: 768px) {
    /* تنظیم ارتفاع بنر بالا در موبایل */
    .banner-stage-container {
        min-height: 280px !important;
        height: 45vh !important;
        max-height: 360px !important;
    }

    /* تنظیم بخش معرفی صندوق در موبایل */
    .hero-intro-fullwidth {
        min-height: auto !important;
        padding: 50px 0 !important;
        text-align: center !important;
    }

    .hero-title {
        font-size: 1.5rem !important;
        line-height: 1.5 !important;
    }

    .hero-lead {
        font-size: 0.95rem !important;
        margin-left: auto;
        margin-right: auto;
    }

    /* مرکز چین شدن و تمام عرض شدن دکمه ادامه مطلب در موبایل */
    .hero-intro-fullwidth .btn-hero-more {
        width: 100% !important;
        justify-content: center !important;
        padding: 12px 24px !important;
        font-size: 0.95rem !important;
    }

    /* تنظیم فاصله‌ها در کارت‌های خبری و آمار در موبایل */
    .news-wrapper-card, 
    .stats-wrapper-card, 
    .facility-inner-content {
        padding: 1.25rem !important;
    }
}
