/* =========================================================
   پالت رنگی و توکن‌های طراحی
   ========================================================= */
:root {
    --teal-950: #0a2e2c;
    --teal-900: #0d3a37;
    --teal-800: #114b47;
    --teal-700: #17615c;
    --teal-600: #1f7a73;
    --teal-500: #2c948b;
    --sand-50: #f7f5f0;
    --sand-100: #f1eee5;
    --amber-500: #e08a3c;
    --amber-600: #c9752e;
    --slate-900: #1c2624;
    --slate-600: #4c5a57;
    --slate-300: #aebab6;
    --line: #dfe4e0;
    --font-main: 'Vazirmatn', Tahoma, sans-serif;
    --radius-sm: 6px;
    --radius-md: 12px;
    --shadow-soft: 0 10px 30px rgba(10, 46, 44, 0.08);
}

* { box-sizing: border-box; }

html, body {
    font-family: var(--font-main);
    background: var(--sand-50);
    color: var(--slate-900);
    scroll-behavior: smooth;
}

a { text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* =========================================================
   نوار ناوبری صفحه اول
   ========================================================= */
.site-navbar {
    background: var(--teal-950);
    padding: .9rem 0;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 16px rgba(0,0,0,.15);
}
.site-navbar .navbar-brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: .6rem;
}
.site-navbar .navbar-brand img { height: 38px; }
.site-navbar .nav-link {
    color: rgba(255,255,255,.82);
    font-weight: 500;
    padding: .4rem 1rem !important;
    transition: color .2s ease;
}
.site-navbar .nav-link:hover { color: #fff; }
.btn-portal-login {
    background: var(--amber-500);
    color: #fff !important;
    border-radius: var(--radius-sm);
    padding: .5rem 1.4rem !important;
    font-weight: 600;
    transition: background .2s ease, transform .2s ease;
}
.btn-portal-login:hover { background: var(--amber-600); transform: translateY(-1px); }

/* =========================================================
   هیرو / اسلایدر تبلیغاتی
   ========================================================= */
.hero-section {
    position: relative;
    background: linear-gradient(160deg, var(--teal-950) 0%, var(--teal-800) 65%, var(--teal-700) 100%);
    overflow: hidden;
    min-height: 78vh;
    display: flex;
    align-items: center;
}
.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 14% 20%, rgba(255,255,255,.05) 0, transparent 40%),
        radial-gradient(circle at 85% 75%, rgba(224,138,60,.10) 0, transparent 45%);
    pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; }
.hero-eyebrow-note {
    color: var(--amber-500);
    font-weight: 600;
    font-size: .95rem;
}
.hero-title {
    color: #fff;
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    line-height: 1.35;
    max-width: 14ch;
}
.hero-subtitle {
    color: rgba(255,255,255,.78);
    font-size: 1.1rem;
    max-width: 46ch;
    line-height: 1.9;
}
.hero-stats { display: flex; gap: 2.2rem; flex-wrap: wrap; margin-top: 2rem; }
.hero-stat-num { color: #fff; font-size: 1.9rem; font-weight: 800; }
.hero-stat-label { color: rgba(255,255,255,.65); font-size: .88rem; }

.hero-slider { position: relative; height: 100%; border-radius: var(--radius-md); overflow: hidden; }
.hero-slide {
    position: absolute; inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-md);
}
.hero-slide.active { opacity: 1; }
.hero-slide-caption {
    position: absolute; right: 0; bottom: 0; left: 0;
    padding: 1.4rem;
    background: linear-gradient(0deg, rgba(10,46,44,.85), transparent);
    color: #fff;
}
.hero-slide-dots { position: absolute; bottom: 12px; right: 50%; transform: translateX(50%); display: flex; gap: 6px; z-index: 3; }
.hero-slide-dots span {
    width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.4); cursor: pointer; transition: background .2s;
}
.hero-slide-dots span.active { background: #fff; }

/* دکمه اصلی CTA */
.btn-cta {
    background: var(--amber-500);
    color: #fff;
    padding: .85rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    display: inline-block;
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
    box-shadow: 0 8px 20px rgba(224,138,60,.35);
}
.btn-cta:hover { background: var(--amber-600); transform: translateY(-2px); color: #fff; }

/* =========================================================
   بخش‌های عمومی
   ========================================================= */
.section { padding: 5rem 0; }
.section-sand { background: var(--sand-100); }
.section-heading { font-size: 1.9rem; font-weight: 800; color: var(--teal-950); margin-bottom: .6rem; }
.section-lead { color: var(--slate-600); max-width: 60ch; line-height: 1.9; }

/* کارت‌های نمایشی (تجهیزات / بیمه / طرف قرارداد) */
.showcase-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: .5rem;
    scroll-snap-type: x proximity;
}
.showcase-card {
    flex: 0 0 220px;
    scroll-snap-align: start;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 1.4rem 1rem;
    text-align: center;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.showcase-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); border-color: var(--teal-500); }
.showcase-card img { height: 64px; object-fit: contain; margin-bottom: .9rem; filter: grayscale(15%); }
.showcase-card .title { font-weight: 700; font-size: .95rem; color: var(--slate-900); }
.showcase-card .desc { font-size: .82rem; color: var(--slate-600); margin-top: .3rem; }

/* درباره ما */
.about-figure {
    background: var(--teal-900);
    border-radius: var(--radius-md);
    padding: 2.2rem;
    color: #fff;
}
.about-figure .num { font-size: 2.4rem; font-weight: 800; color: var(--amber-500); }
.about-figure .label { color: rgba(255,255,255,.7); font-size: .9rem; }

/* تماس با ما */
.contact-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 1.6rem;
    height: 100%;
}
.contact-card i { color: var(--amber-500); font-size: 1.3rem; }
.map-frame { border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--line); min-height: 320px; }
.map-frame iframe { width: 100%; height: 100%; min-height: 320px; border: 0; }

.social-links a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 50%;
    background: var(--teal-900); color: #fff; margin-left: .5rem;
    transition: background .2s ease, transform .2s ease;
}
.social-links a:hover { background: var(--amber-500); transform: translateY(-3px); }

/* فوتر */
.site-footer { background: var(--teal-950); color: rgba(255,255,255,.7); padding: 2.4rem 0; }
.site-footer a { color: rgba(255,255,255,.85); }

/* انیمیشن‌های ورود ملایم (فقط برای هیرو، به‌صورت هدفمند) */
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeSlideUp .8s ease both; }
.delay-1 { animation-delay: .12s; }
.delay-2 { animation-delay: .24s; }
.delay-3 { animation-delay: .36s; }

@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.float-icon { animation: floatY 4.5s ease-in-out infinite; }

/* =========================================================
   پنل‌های مدیریت و آزمایشگاه (Admin / Lab)
   ========================================================= */
.app-shell { min-height: 100vh; display: flex; }
.app-sidebar {
    width: 260px;
    background: var(--teal-950);
    color: #fff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.app-sidebar .brand { padding: 1.3rem 1.4rem; font-weight: 800; font-size: 1.1rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.app-sidebar .nav-link {
    color: rgba(255,255,255,.75);
    padding: .75rem 1.4rem;
    display: flex;
    align-items: center;
    gap: .7rem;
    font-weight: 500;
    border-right: 3px solid transparent;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.app-sidebar .nav-link:hover { background: rgba(255,255,255,.05); color: #fff; }
.app-sidebar .nav-link.active { background: rgba(255,255,255,.08); color: #fff; border-color: var(--amber-500); }
.app-main { flex: 1; min-width: 0; }
.app-topbar {
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 1rem 1.6rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.app-content { padding: 1.6rem; }

.stat-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 1.3rem;
    transition: box-shadow .2s ease, transform .2s ease;
}
.stat-card:hover { box-shadow: var(--shadow-soft); transform: translateY(-3px); }
.stat-card .icon { width: 46px; height: 46px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; color: #fff; }
.stat-card .value { font-size: 1.6rem; font-weight: 800; color: var(--slate-900); }
.stat-card .label { color: var(--slate-600); font-size: .85rem; }

.bg-teal { background: var(--teal-700) !important; }
.bg-amber { background: var(--amber-500) !important; }

.card-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); }
.table thead th { color: var(--slate-600); font-weight: 600; font-size: .85rem; border-bottom-width: 1px; }

.badge-severity-info { background: var(--teal-600); }
.badge-severity-warning { background: var(--amber-500); }
.badge-severity-critical { background: #c23b3b; }

.balance-positive { color: #c23b3b; font-weight: 700; }
.balance-negative { color: #1f7a3f; font-weight: 700; }
.balance-zero { color: var(--slate-600); font-weight: 700; }

@media (max-width: 991px) {
    .app-sidebar { position: fixed; right: -260px; z-index: 1050; transition: right .25s ease; }
    .app-sidebar.open { right: 0; }
    .hero-section { min-height: auto; padding: 3rem 0; }
}
