:root {
    --primary: #8c1d3a;
    --primary-dark: #63102a;
    --primary-light: #f7ecef;
    --navy: #1d4677;
    --navy-light: #eaf0f8;
    --accent: #8c1d3a;
    --text: #1f2933;
    --muted: #5f6b7a;
    --line: #e3e8ef;
    --bg-alt: #f5f7fa;
    --dark: #0d1f3c;
    --ok: #1a7f45;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(15, 35, 70, .08);
    --header-h: 72px;
    --font: "Microsoft JhengHei", "Noto Sans TC", "PingFang TC", "Heiti TC", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
    margin: 0;
    padding-top: var(--header-h);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.75;
    color: var(--text);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}
body.lang-en { --font: "Segoe UI", "Helvetica Neue", Arial, "Microsoft JhengHei", sans-serif; }

img { max-width: 100%; height: auto; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--primary); }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
svg { width: 1em; height: 1em; flex: none; }

.container { width: min(1200px, 100% - 40px); margin-inline: auto; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: fixed; left: 16px; top: -60px; z-index: 1000;
    padding: 10px 18px; border-radius: 8px;
    background: var(--primary); color: #fff;
    transition: top .2s;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4em;
    padding: .75em 1.6em;
    border: 2px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }

.link-arrow { font-weight: 600; color: var(--primary); }
.link-arrow::after { content: " →"; transition: margin-left .2s; }
.link-arrow:hover::after { margin-left: 4px; }

/* ---------- Header ---------- */
.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--header-h);
    z-index: 100;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(160%) blur(8px);
    transition: box-shadow .2s;
}
.site-header.scrolled { box-shadow: 0 2px 16px rgba(15, 35, 70, .1); }
.header-inner { width: calc(100% - 48px); height: 100%; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand img { display: block; height: 42px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 18px; color: var(--dark); letter-spacing: .06em; }
.brand-text small { font-size: 10.5px; color: var(--muted); letter-spacing: .06em; font-family: "Segoe UI", Arial, sans-serif; }

.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 6px; }
.nav-list > li > a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    color: var(--text);
    font-weight: 600;
    font-size: .98rem;
    border-radius: 8px;
}
.nav-list > li > a:hover { color: var(--primary); background: var(--primary-light); }
.nav-lang > a { color: var(--muted) !important; font-weight: 500 !important; }
.nav-list > li.nav-cta > a { color: #fff; margin-left: 6px; padding: .5em 1.2em; border-radius: 999px; background: var(--primary); }
.nav-list > li.nav-cta > a:hover { color: #fff; background: var(--primary-dark); }

.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: none; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; margin: 5px 0; background: var(--text); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1080px) {
    .nav-toggle { display: block; }
    .site-nav {
        position: fixed;
        top: var(--header-h);
        left: 0; right: 0;
        max-height: calc(100vh - var(--header-h));
        overflow-y: auto;
        background: #fff;
        border-top: 1px solid var(--line);
        box-shadow: 0 12px 24px rgba(15, 35, 70, .12);
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        transition: opacity .2s, transform .2s, visibility .2s;
    }
    .nav-open .site-nav { transform: none; opacity: 1; visibility: visible; }
    .nav-list { flex-direction: column; align-items: stretch; padding: 12px 20px 20px; gap: 2px; }
    .nav-list > li > a { padding: 12px; }
    .nav-list > li.nav-cta > a { margin: 10px 0 0; justify-content: center; }
}
@media (max-width: 520px) {
    .brand img { height: 36px; }
    .brand-text strong { font-size: 15px; }
    .brand-text small { font-size: 9px; letter-spacing: .02em; }
}

/* ---------- Hero slider ---------- */
.hero { background: var(--dark); }
#slider { overflow: hidden; }
#slider .glider-arrow { width: 28px; height: 28px; filter: drop-shadow(0 0 3px rgba(0, 0, 0, .45)); }
@media (max-width: 640px) {
    #slider .glider-arrow { width: 16px; height: 16px; border-width: 3px; }
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); letter-spacing: .06em; color: var(--text); }
.lang-en .section-head h2 { letter-spacing: 0; }
.section-head h2::after { content: ""; display: block; width: 56px; height: 4px; margin: 14px auto 0; background: var(--accent); border-radius: 2px; }
.section-head p { color: var(--muted); margin-top: 16px; }
.eyebrow { display: block; color: var(--navy); font-weight: 700; font-size: .85rem; letter-spacing: .3em; margin-bottom: 6px; font-family: "Segoe UI", Arial, sans-serif; }

@media (max-width: 640px) {
    .section { padding: 64px 0; }
    .section-head { margin-bottom: 36px; }
}

/* ---------- Reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
[data-reveal].revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about-lead {
    padding-left: 18px;
    border-left: 4px solid var(--accent);
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.8;
    color: var(--text);
}
.about-text p:not(.about-lead) { color: var(--muted); text-align: justify; }
.about-photo { position: relative; margin: 0; }
.about-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.about-photo figcaption {
    position: absolute;
    left: 16px;
    bottom: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: .88rem;
    font-weight: 600;
    color: #fff;
    background: rgba(13, 31, 60, .75);
    backdrop-filter: blur(4px);
}
.stats { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.stats li { background: var(--bg-alt); border-radius: var(--radius); padding: 16px 18px; text-align: center; }
.stats strong { display: block; font-size: 1.9rem; line-height: 1.1; color: var(--primary); font-family: "Segoe UI", Arial, var(--font); }
.stats small { font-size: 1rem; margin-left: 2px; }
.stats span { display: block; margin-top: 6px; color: var(--muted); font-size: .9rem; }

.honors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 56px; }
.honor {
    border: 1px solid var(--line);
    border-top: 4px solid var(--accent);
    border-radius: var(--radius);
    padding: 28px;
    background: #fff;
    transition: transform .25s, box-shadow .25s;
}
.honor:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.honor-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.honor-icon {
    width: 52px; height: 52px;
    display: grid; place-items: center;
    flex: none;
    border-radius: 14px;
    font-size: 26px;
    color: var(--primary);
    background: var(--primary-light);
}
.honor-head small { display: block; font-size: .75rem; font-weight: 700; letter-spacing: .25em; color: var(--navy); font-family: "Segoe UI", Arial, sans-serif; }
.honor h3 { margin: 0; font-size: 1.35rem; letter-spacing: .15em; }
.lang-en .honor h3 { letter-spacing: 0; }
.honor p { color: var(--muted); font-size: .95rem; margin-bottom: 12px; }
.honor ul { list-style: none; margin: 0; padding: 0; }
.honor li { position: relative; padding: 8px 0 8px 24px; border-top: 1px dashed var(--line); font-size: .95rem; }
.honor li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 15px;
    width: 12px;
    height: 7px;
    border-left: 2px solid var(--primary);
    border-bottom: 2px solid var(--primary);
    transform: rotate(-45deg);
}

@media (max-width: 900px) {
    .about-grid, .honors { grid-template-columns: 1fr; }
    .about-grid { gap: 32px; }
    .about-photo { order: -1; }
}

/* ---------- Products ---------- */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.product-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    overflow: hidden;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.product-photo {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: radial-gradient(circle at 50% 42%, #fff 0, #eef1f5 75%);
}
.product-photo img { width: 74%; height: 86%; object-fit: contain; mix-blend-mode: multiply; transition: transform .5s; }
.product-card:hover .product-photo img { transform: scale(1.05); }
.product-photo span {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    color: #fff;
    background: rgba(13, 31, 60, .72);
    backdrop-filter: blur(4px);
}
.product-body { display: flex; flex-direction: column; flex: 1; padding: 22px 22px 20px; }
.product-body h3 { font-size: 1.3rem; }
.product-body > p { color: var(--muted); font-size: .94rem; text-align: justify; }
.product-specs { margin: 0 0 16px; }
.product-specs > div { display: grid; grid-template-columns: 5.2em 1fr; gap: 8px; padding: 8px 0; border-top: 1px dashed var(--line); font-size: .93rem; }
.lang-en .product-specs > div { grid-template-columns: 6.8em 1fr; }
.product-specs dt { font-weight: 700; color: var(--navy); }
.product-specs dd { margin: 0; }
.product-body .link-arrow { margin-top: auto; }

.product-notes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
    margin-top: 28px;
    padding: 16px 24px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--line);
    font-size: .93rem;
    color: var(--muted);
}
.product-notes p { display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.product-notes svg { color: var(--ok); font-size: 18px; margin-top: 3px; }
.product-notes b { color: var(--text); margin-right: 8px; }

.forms-row, .compliance-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin-top: 16px;
    padding: 14px 24px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--line);
}
.forms-label { font-weight: 700; color: var(--navy); margin-right: 6px; }
.form-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 14px 4px 4px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--bg-alt);
    color: var(--text);
    font-size: .92rem;
}
.form-chip img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: #fff; }
.form-chip:hover { border-color: var(--primary); color: var(--primary); }
.forms-row .link-arrow { margin-left: auto; }
.chip { padding: 4px 14px; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--line); font-size: .9rem; }

@media (max-width: 1000px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .product-grid, .product-notes { grid-template-columns: 1fr; }
    .forms-row .link-arrow { margin-left: 0; width: 100%; }
}

/* ---------- Spec tables ---------- */
.spec-tab-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 20px; }
.spec-tab-list button {
    min-width: 170px;
    padding: 10px 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-weight: 700;
    line-height: 1.35;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}
.spec-tab-list small { display: block; font-size: 11px; letter-spacing: .2em; color: var(--muted); font-family: "Segoe UI", Arial, sans-serif; }
.spec-tab-list button:hover { border-color: var(--primary); }
.spec-tab-list [aria-selected="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.spec-tab-list [aria-selected="true"] small { color: rgba(255, 255, 255, .75); }

.table-scroll { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.spec-table { width: 100%; min-width: 600px; border-collapse: collapse; font-family: "Segoe UI", Arial, var(--font); }
.spec-table th, .spec-table td { padding: 14px 18px; text-align: center; border-bottom: 1px solid var(--line); }
.spec-table thead th { background: var(--navy-light); color: var(--navy); font-size: .92rem; font-weight: 700; font-family: var(--font); }
.spec-table tbody th { color: var(--text); font-weight: 700; white-space: nowrap; }
.spec-table tbody tr:nth-child(even) { background: #fafbfd; }
.spec-table tbody tr:last-child > * { border-bottom: 0; }
.spec-dot { color: var(--primary); }
.spec-custom { color: var(--primary); font-weight: 700; letter-spacing: .08em; font-family: var(--font); }
.spec-note { display: flex; align-items: center; gap: 8px; justify-content: center; margin: 14px 0 0; color: var(--muted); font-size: .93rem; }
.spec-note svg { color: var(--ok); font-size: 18px; }

@media (max-width: 640px) {
    .spec-tab-list button { min-width: 0; flex: 1 1 calc(50% - 10px); padding: 8px 10px; }
}

/* ---------- Applications ---------- */
.section-dark {
    color: #fff;
    background:
        radial-gradient(1000px 400px at 85% 0%, rgba(140, 29, 58, .3), transparent 60%),
        linear-gradient(135deg, #0d1f3c, #183d6a);
}
.section-dark .section-head h2 { color: #fff; }
.section-dark .eyebrow { color: #f0a9ba; }
.section-dark .section-head p { color: rgba(255, 255, 255, .7); }

.app-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.app-card {
    padding: 32px 28px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    transition: background .25s, transform .25s;
}
.app-card:hover { background: rgba(255, 255, 255, .1); transform: translateY(-4px); }
.app-icon {
    width: 56px; height: 56px;
    margin-bottom: 20px;
    display: grid; place-items: center;
    border-radius: 16px;
    color: #fff;
    font-size: 28px;
    background: linear-gradient(135deg, var(--primary), #c0466a);
    box-shadow: 0 0 0 8px rgba(255, 255, 255, .06);
}
.app-card h3 { font-size: 1.25rem; color: #fff; }
.app-card p { color: rgba(255, 255, 255, .75); font-size: .96rem; }
.app-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.app-tags li { font-size: .85rem; color: #f0a9ba; border: 1px solid rgba(240, 169, 186, .45); border-radius: 999px; padding: 3px 14px; }

@media (max-width: 900px) {
    .app-grid { grid-template-columns: 1fr; }
}

/* ---------- Quality ---------- */
.cert-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; max-width: 960px; margin: 0 auto; }
.cert-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 14px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--text);
    text-align: center;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
.cert-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; color: var(--text); }
.cert-photo { position: relative; display: block; width: 100%; margin-bottom: 14px; }
.cert-photo img { display: block; width: 100%; aspect-ratio: 420 / 594; object-fit: cover; border-radius: 8px; }
.cert-card strong { font-size: 1.15rem; font-family: "Segoe UI", Arial, var(--font); }
.cert-card small { color: var(--muted); }
.cert-zoom {
    position: absolute; top: 10px; right: 10px;
    width: 36px; height: 36px; display: grid; place-items: center;
    border-radius: 50%; background: rgba(13, 31, 60, .8); color: #fff;
    font-size: 20px; font-style: normal;
    opacity: 0; transition: opacity .25s;
}
.cert-card:hover .cert-zoom { opacity: 1; }
.compliance-row { justify-content: center; margin-top: 36px; background: var(--bg-alt); border: 0; }

@media (max-width: 640px) {
    .cert-grid { gap: 12px; }
    .cert-card { padding: 8px 8px 12px; }
    .cert-card small { display: none; }
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: stretch; }
.contact-form { background: #fff; border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field label em { color: var(--accent); font-style: normal; }
.field input, .field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cfd8e3;
    border-radius: 10px;
    font: inherit;
    color: var(--text);
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(140, 29, 58, .15); }
.field .invalid { border-color: var(--accent); }
.field-error { display: block; min-height: 1.2em; color: var(--accent); font-size: .85rem; margin-top: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 14px 0 0; min-height: 1.5em; font-weight: 600; text-align: center; }
.form-status.ok { color: var(--ok); }
.form-status.error { color: var(--accent); }

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: linear-gradient(160deg, var(--navy), var(--dark));
    color: #fff;
    border-radius: var(--radius);
    padding: 36px 32px;
}
.contact-info img { height: 52px; width: auto; background: #fff; border-radius: 10px; padding: 6px 12px; box-sizing: content-box; }
.contact-info ul { list-style: none; margin: 0; padding: 0; width: 100%; }
.contact-info li { padding: 11px 0; border-top: 1px solid rgba(255, 255, 255, .2); }
.contact-info li:first-child { border-top: 0; }
.contact-info li span { display: block; font-size: .85rem; opacity: .7; }
.contact-info a { color: #fff; word-break: break-all; }

.map { margin-top: 40px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.map iframe { display: block; width: 100%; height: 380px; border: 0; }

@media (max-width: 900px) {
    .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .contact-form { padding: 28px 20px; }
    .map iframe { height: 300px; }
}

/* ---------- Footer ---------- */
.site-footer { background: #0a172d; color: rgba(255, 255, 255, .75); font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(2, .9fr) 1.2fr 1.4fr; gap: 32px; padding: 64px 0 48px; }
.footer-brand img { display: block; height: 42px; width: auto; background: #fff; border-radius: 8px; padding: 6px 10px; box-sizing: content-box; }
.footer-brand strong { display: block; margin-top: 14px; color: #fff; font-size: 1.05rem; }
.footer-brand p { margin-top: 10px; }
.site-footer h3 { color: #fff; font-size: 1rem; letter-spacing: .1em; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: rgba(255, 255, 255, .75); }
.site-footer a:hover { color: #fff; }
.footer-contact li { word-break: break-word; }
.footer-contact b { display: block; color: #fff; font-size: .88rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 18px 0; font-size: .85rem; text-align: center; color: rgba(255, 255, 255, .5); }

@media (max-width: 1000px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
    .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Back to top ---------- */
.to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 90;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 22px;
    box-shadow: var(--shadow);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .25s, transform .25s, visibility .25s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--primary-dark); }

/* ---------- Lightbox ---------- */
.lightbox { padding: 0; border: 0; background: transparent; max-width: 94vw; max-height: 94vh; overflow: visible; }
.lightbox::backdrop { background: rgba(4, 12, 24, .86); }
.lightbox img { display: block; max-width: 92vw; max-height: 84vh; width: auto; border-radius: 8px; background: #fff; }
.lightbox-close {
    position: absolute; top: -48px; right: 0;
    width: 40px; height: 40px;
    border: 0; border-radius: 50%; background: rgba(255, 255, 255, .15); color: #fff;
    font-size: 28px; line-height: 1; cursor: pointer;
}
.lightbox-caption { margin: 12px 0 0; text-align: center; color: #fff; }

/* ---------- Error page ---------- */
.error-page { text-align: center; padding: 120px 0; }
.error-code { font-size: 96px; font-weight: 700; line-height: 1; color: rgba(140, 29, 58, .2); margin-bottom: 16px; font-family: "Segoe UI", Arial, sans-serif; }
.error-actions { display: flex; justify-content: center; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: #fff; }
