/* ============================================================
   Shilihe Tech Studio — corporate navy theme
   Deep-navy mastheads, single confident blue accent, cool
   neutral greys. Restrained motion, responsive.
   ============================================================ */
:root {
    --bg: #f7f8fa;
    --panel: #ffffff;
    --ink: #131e2b;
    --muted: #55677a;
    --accent: #17609b;
    --accent-dark: #0f4a78;
    --accent-bright: #2b86cf;   /* accent tuned for dark surfaces */
    --accent-soft: #e9f2fa;
    --line: #e4e8ee;
    --alt: #eff3f7;
    --dark: #0b1f33;
    --dark-2: #123a5e;
    --dark-3: #16486f;
    --shadow-sm: 0 1px 2px rgba(11, 31, 51, .06);
    --shadow-md: 0 12px 28px -18px rgba(11, 31, 51, .55);
    --shadow-lg: 0 26px 54px -30px rgba(11, 31, 51, .55);
}

* { border-radius: 0 !important; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    font-family: "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

h1, h2, h3, h4, h5, h6 { color: var(--ink); }

/* ---------- Navigation ---------- */
.site-nav {
    background: rgba(255, 255, 255, .95);
    border-top: 3px solid var(--accent);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 26px -24px rgba(11, 31, 51, .9);
}
.navbar-brand { display: flex; flex-direction: column; line-height: 1.1; }
.brand-mark { font-weight: 800; letter-spacing: .18em; color: var(--dark); font-size: 1.05rem; }
.brand-sub { font-size: .62rem; letter-spacing: .3em; color: var(--muted); text-transform: uppercase; }
.site-nav .nav-link {
    color: var(--ink); font-size: .92rem; padding: .5rem 0.9rem;
}
.site-nav .nav-link:hover, .site-nav .nav-link.active { color: var(--accent); }
/* ---------- Language picker ---------- */
.lang-picker .lang-btn {
    display: flex; align-items: center; gap: .4rem;
    background: transparent; border: 1px solid var(--line); border-radius: 2px;
    color: var(--ink); font-size: .86rem; padding: .3rem .6rem; line-height: 1.2;
}
.lang-picker .lang-btn:hover, .lang-picker.show .lang-btn { border-color: var(--accent); color: var(--accent); }
.lang-globe { width: 15px; height: 15px; flex: none; }
.lang-current { max-width: 8.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.lang-menu {
    min-width: 264px; padding: 0; border: 1px solid var(--line); border-radius: 2px;
    box-shadow: var(--shadow-lg);
}
.lang-menu-head { position: sticky; top: 0; z-index: 2; padding: .5rem; background: #fff; border-bottom: 1px solid var(--line); }
.lang-search {
    width: 100%; border: 1px solid var(--line); border-radius: 2px; padding: .4rem .55rem;
    font-size: .85rem; color: var(--ink); outline: none; background: #fff;
}
.lang-search:focus { border-color: var(--accent); }
.lang-list { max-height: 320px; overflow-y: auto; padding: .25rem 0; }
.lang-item { display: flex; align-items: baseline; gap: .5rem; padding: .38rem .75rem; font-size: .86rem; color: var(--ink); }
.lang-item:hover { background: var(--alt); color: var(--ink); }
.lang-item.active { color: var(--accent); font-weight: 700; background: transparent; }
.lang-native { flex: 1 1 auto; }
.lang-en { flex: none; color: var(--muted); font-size: .74rem; }
.lang-item.active .lang-en { color: var(--accent); }
.lang-tick { flex: none; color: var(--accent); font-size: .8rem; }
.lang-empty { padding: .7rem .75rem; color: var(--muted); font-size: .82rem; }
.lang-menu-foot { padding: .4rem .75rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .72rem; }

.btn-accent {
    background: var(--accent); color: #fff; border: 1px solid var(--accent);
    font-weight: 600;
}
.btn-accent:hover, .btn-accent:focus { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }

.btn-outline {
    border: 1px solid #c3ccd7; color: var(--ink); background: #fff; font-weight: 600;
}
.btn-outline:hover { background: var(--dark); border-color: var(--dark); color: #fff; }

/* ---------- Hero / page head (dark navy masthead) ---------- */
.hero, .page-head {
    position: relative;
    color: #fff;
    background:
        radial-gradient(900px 380px at 84% -12%, rgba(43, 134, 207, .40), transparent 62%),
        repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(255, 255, 255, .05) 39px, rgba(255, 255, 255, .05) 40px),
        repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(255, 255, 255, .05) 39px, rgba(255, 255, 255, .05) 40px),
        linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 58%, var(--dark-3) 100%);
    border-bottom: 3px solid var(--accent);
}
.hero { padding: 104px 0 92px; }
.page-head { padding: 68px 0 60px; }
.hero h1, .page-head h1 {
    font-size: clamp(1.9rem, 4.5vw, 3rem); font-weight: 800; letter-spacing: -0.01em;
    max-width: 820px; line-height: 1.2; color: #fff;
}
.page-head h1 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
.hero-sub { color: rgba(208, 224, 239, .86); font-size: 1.05rem; max-width: 720px; margin-top: 1rem; }
.hero .section-label, .page-head .section-label { color: #7cbde9; }
.hero .btn-outline, .page-head .btn-outline {
    border-color: rgba(255, 255, 255, .55); color: #fff; background: transparent;
}
.hero .btn-outline:hover, .page-head .btn-outline:hover {
    background: #fff; border-color: #fff; color: var(--dark);
}

.section-label {
    text-transform: uppercase; letter-spacing: .16em; font-size: .75rem;
    color: var(--accent); font-weight: 700; margin-bottom: .5rem;
}
.section-title { font-weight: 800; font-size: clamp(1.3rem, 2.6vw, 1.8rem); }

.section { padding: 72px 0; }
.section-alt { background: var(--alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- Capability / case cards ---------- */
.cap-card {
    display: block; background: var(--panel); border: 1px solid var(--line);
    border-bottom: 2px solid var(--line);
    padding: 1.6rem; height: 100%; color: inherit;
    box-shadow: var(--shadow-sm);
    transition: border-color .15s, box-shadow .18s, transform .18s;
}
.cap-card:hover {
    border-color: var(--line); border-bottom-color: var(--accent);
    color: inherit; box-shadow: var(--shadow-md); transform: translateY(-2px);
}
.cap-icon {
    width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: #fff; font-weight: 800; font-size: 1.1rem; margin-bottom: 1rem;
}
.cap-card h5 { font-weight: 700; font-size: 1.02rem; }
.cap-card p { color: var(--muted); font-size: .9rem; margin-bottom: 0; }

.case-card {
    background: var(--panel); border: 1px solid var(--line); height: 100%;
    box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .18s;
}
.case-card:hover { box-shadow: var(--shadow-md); }
.case-card img { width: 100%; height: 180px; object-fit: cover; display: block; border-bottom: 1px solid var(--line); }
.case-body { padding: 1.1rem 1.2rem; }
.case-body h5, .case-body h6 { font-weight: 700; font-size: .98rem; }
.case-body p { color: var(--muted); font-size: .87rem; margin-bottom: 0; }

.stat-card {
    background: var(--panel); border: 1px solid var(--line); border-top: 2px solid var(--accent);
    padding: 1.4rem 1rem; text-align: center; height: 100%; box-shadow: var(--shadow-sm);
}
.stat-num { font-size: 1.9rem; font-weight: 800; color: var(--accent); }
.stat-label { color: var(--muted); font-size: .82rem; }

.service-name { font-weight: 800; }
.contact-card, .inquiry-box {
    background: var(--panel); border: 1px solid var(--line); border-top: 2px solid var(--accent);
    padding: 1.6rem; height: 100%; box-shadow: var(--shadow-sm);
}
.contact-card h6 { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; color: var(--accent); font-weight: 700; }

.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { padding: .55rem 0 .55rem 1.8rem; position: relative; border-bottom: 1px dashed var(--line); }
.check-list li::before { content: "▸"; position: absolute; left: .2rem; color: var(--accent); font-weight: 800; }

/* ---------- File list ---------- */
.file-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.file-list li { border-bottom: 1px solid var(--line); }
.file-item {
    display: flex; align-items: center; gap: 1rem; padding: .85rem .5rem; color: inherit;
    transition: background .12s;
}
.file-item:hover { background: var(--panel); color: inherit; }
.file-ext {
    flex: none; min-width: 44px; text-align: center; font-size: .68rem; font-weight: 800;
    background: var(--accent-soft); border: 1px solid #cfe3f4; color: var(--accent-dark); padding: .25rem .3rem;
}
.file-name { flex: 1 1 auto; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { color: var(--muted); font-size: .8rem; flex: none; }
.file-dl { color: var(--accent); font-weight: 800; flex: none; }

/* ---------- News ---------- */
.news-card {
    display: block; background: var(--panel); border: 1px solid var(--line); color: inherit;
    height: 100%; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .18s;
}
.news-card:hover { border-color: var(--accent); color: inherit; box-shadow: var(--shadow-md); }
.news-card img { width: 100%; height: 200px; object-fit: cover; display: block; border-bottom: 1px solid var(--line); }
.news-meta { color: var(--accent); font-size: .78rem; letter-spacing: .08em; }
.news-card h5 { font-weight: 700; font-size: 1.05rem; }
.news-card p { color: var(--muted); font-size: .88rem; margin-bottom: 0; }
.article-body { background: var(--panel); border: 1px solid var(--line); padding: 2.4rem; box-shadow: var(--shadow-sm); }
.article-cover { width: 100%; margin-bottom: 1.5rem; }
.article-body img { max-width: 100%; height: auto; }
.article-body h2, .article-body h3 { font-weight: 700; margin-top: 1.6rem; }
.article-body code { background: var(--alt); padding: .1rem .35rem; }

/* ---------- Inquiry form ---------- */
.hp-field { position: absolute; left: -9999px; height: 0; width: 0; opacity: 0; }
.inquiry-box .form-control, .inquiry-box .form-control:focus {
    background: var(--bg); border: 1px solid var(--line);
}
.inquiry-box .form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(23, 96, 155, .12); }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--dark); color: #9fb0c1; padding: 56px 0 32px; margin-top: 0;
    border-top: 3px solid var(--accent);
}
.site-footer .brand-mark { color: #fff; }
.site-footer h6 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; margin-bottom: 1rem; }
.footer-links { list-style: none; padding: 0; margin: 0; font-size: .88rem; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { color: #9fb0c1; }
.footer-links a:hover { color: #fff; }
.site-footer hr { border-color: rgba(255,255,255,.14); }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .82rem; }

/* ---------- Pagination ---------- */
.page-link { color: var(--ink); border-color: var(--line); }
.page-item.active .page-link { background: var(--accent); border-color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 767.98px) {
    .hero { padding: 72px 0 60px; }
    .section { padding: 48px 0; }
    .file-meta { display: none; }
    .footer-bottom { flex-direction: column; }
    .lang-picker, .lang-picker .lang-btn { width: 100%; }
    .lang-picker .lang-btn { justify-content: space-between; }
    .lang-menu { width: 100%; min-width: 0; }
}

/* ---------- RTL (Arabic / Persian / Hebrew) ---------- */
[dir="rtl"] .check-list li { padding: .55rem 1.8rem .55rem 0; }
[dir="rtl"] .check-list li::before { content: "◂"; left: auto; right: .2rem; }
[dir="rtl"] .file-item { flex-direction: row-reverse; text-align: right; }
[dir="rtl"] .lang-item, [dir="rtl"] .lang-menu-foot, [dir="rtl"] .hero, [dir="rtl"] .page-head { text-align: right; }
[dir="rtl"] .brand-sub, [dir="rtl"] .contact-card h6, [dir="rtl"] .site-footer h6,
[dir="rtl"] .news-meta, [dir="rtl"] .file-meta { text-transform: none; letter-spacing: .02em; }
[dir="rtl"] .inquiry-box .form-label { text-align: right; }
