/* ============== Molding & Stamping Solution Page (NEXSPC 4.0) ============== */
:root {
    --ms-primary: #29b6f6;
    --ms-orange: #ff9800;
    --ms-deep: #04205F;
    --ms-bg: #f8f9fa;
}

.ms-hero {
    position: relative;
    color: #fff;
    padding: 120px 0 90px;
    background-image: url('/static/images/Gemini_Generated_Image_v36ar7v36ar7v36a.png');
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.ms-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(3, 18, 58, 0.86);
}

.ms-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(900px 420px at 70% 24%, rgba(41, 182, 246, 0.24), rgba(0, 0, 0, 0)),
        radial-gradient(820px 380px at 22% 18%, rgba(255, 152, 0, 0.18), rgba(0, 0, 0, 0));
    pointer-events: none;
}

.ms-hero .container {
    position: relative;
    z-index: 2;
}

.ms-hero h1 {
    font-size: 3.05rem;
    font-weight: 950;
    line-height: 1.15;
    color: #fff;
    margin-bottom: 18px;
    letter-spacing: 0.2px;
}

.ms-hero .subtitle {
    font-size: 1.25rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 300;
    margin-bottom: 22px;
    max-width: 760px;
}

.ms-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 28px;
}

.ms-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.92);
    white-space: nowrap;
}

.ms-badge i.material-symbols-outlined {
    font-size: 18px;
    color: var(--ms-primary);
}

.ms-hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.ms-cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    border-radius: 999px;
    background: var(--ms-primary);
    color: #fff !important;
    font-weight: 950;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease;
    border: 0;
}

.ms-cta-primary:hover {
    background: #039be5;
    transform: translateY(-2px);
    color: #fff !important;
}

.ms-cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.18);
    text-decoration: none;
    font-weight: 850;
    transition: transform 0.2s ease, background 0.2s ease;
}

.ms-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-2px);
    color: #fff !important;
}

.ms-hero-note {
    margin-top: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
}

.ms-hero-ui {
    position: relative;
    border-radius: 18px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.40);
    overflow: hidden;
    cursor: zoom-in;
}

.ms-hero-ui img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.ms-hero-ui .ms-ui-label {
    position: absolute;
    left: 18px;
    top: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.92);
}

.ms-hero-ui .ms-ui-label .dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #81c784;
    box-shadow: 0 0 0 6px rgba(129, 199, 132, 0.20);
}

/* overlay: pressure curve + cavity boxplot hint */
.ms-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.ms-overlay .curve {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    height: 120px;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.ms-overlay .curve svg {
    width: 100%;
    height: 100%;
    opacity: 0.9;
}

.ms-overlay .curve path {
    stroke: rgba(255, 255, 255, 0.85);
    stroke-width: 3;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 520;
    stroke-dashoffset: 520;
    transition: stroke-dashoffset 1.2s ease;
}

.ms-overlay.grow .curve path {
    stroke-dashoffset: 0;
}

.ms-overlay .boxes {
    position: absolute;
    right: 18px;
    top: 56px;
    width: 170px;
    height: 120px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.ms-box-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 10px;
    align-items: end;
    height: 100%;
}

.ms-box {
    height: 70px;
    border-radius: 10px;
    background: rgba(41, 182, 246, 0.16);
    border: 1px solid rgba(41, 182, 246, 0.26);
    position: relative;
}

.ms-box::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: rgba(255, 255, 255, 0.55);
    transform: translateX(-50%);
    border-radius: 2px;
}

.ms-box.bad {
    background: rgba(255, 152, 0, 0.18);
    border-color: rgba(255, 152, 0, 0.34);
}

/* Section heading */
.ms-section-title { margin-bottom: 18px; }
.ms-section-title h2 {
    color: var(--ms-deep);
    font-weight: 950;
    margin-bottom: 10px;
}
.ms-section-title p {
    margin: 0;
    color: #555;
    font-size: 1.05rem;
    line-height: 1.8;
}

/* Pain points */
.ms-pain {
    background: var(--ms-bg);
    padding: 60px 0;
}
.ms-pain-question {
    font-size: 1.15rem;
    font-weight: 950;
    color: #2d3a4b;
    margin: 0 0 22px 0;
    padding: 14px 16px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid #eef1f4;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}
.ms-pain-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.ms-pain-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #eef1f4;
    padding: 22px 22px 20px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}
.ms-pain-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, rgba(255,152,0,0.9), rgba(41,182,246,0.9));
    opacity: 0.65;
}
.ms-pain-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 40px rgba(0,0,0,0.12);
    border-color: rgba(4,32,95,0.25);
}
.ms-pain-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.ms-pain-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255,152,0,0.10);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 1px solid rgba(255,152,0,0.20);
}
.ms-pain-icon i.material-symbols-outlined {
    font-size: 24px;
    color: #b35a00;
}
.ms-pain-card h3 {
    font-size: 1.22rem;
    font-weight: 950;
    color: var(--ms-deep);
    margin: 0;
    line-height: 1.3;
}
.ms-pain-card p {
    color: #444;
    line-height: 1.85;
    margin: 0;
    font-size: 1rem;
}

/* Solutions */
.ms-solution { padding: 60px 0 20px; }
.ms-scenario { padding-top: 36px; padding-bottom: 36px; }
.ms-scenario h3 {
    font-size: 1.9rem;
    font-weight: 950;
    color: var(--ms-deep);
    margin-bottom: 10px;
}
.ms-scenario .en-title {
    margin-top: 0;
    color: #6a7b90;
    letter-spacing: 0.4px;
    font-weight: 850;
}
.ms-scenario .intro-text {
    font-size: 1.08rem;
    line-height: 2;
    color: #555;
    text-align: justify;
}
.ms-checklist {
    list-style: none;
    padding-left: 0;
    margin: 16px 0 0;
}
.ms-checklist li {
    position: relative;
    padding-left: 28px;
    margin: 10px 0;
    color: #444;
    line-height: 1.8;
}
.ms-checklist li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--ms-primary);
    font-weight: 900;
}
.ms-value {
    font-size: 1rem;
    margin-top: 14px;
    padding: 14px 14px;
    border-radius: 14px;
    background: rgba(41,182,246,0.10);
    border: 1px solid rgba(41,182,246,0.20);
    color: #0b3b6b;
    font-weight: 900;
    line-height: 1.8;
}

.ms-shot {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 12px 34px rgba(0,0,0,0.12);
    background: #fff;
    cursor: zoom-in;
}
.ms-shot img { width: 100%; height: auto; display: block; }
.ms-shot-badge {
    position: absolute;
    right: 12px;
    top: 12px;
    padding: 7px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 950;
    background: rgba(0,0,0,0.52);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.18);
    backdrop-filter: blur(8px);
    user-select: none;
}

/* Compare */
.ms-compare { background: var(--ms-bg); padding: 60px 0; }
.ms-compare-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid #eef1f4;
}
.ms-compare-table thead th {
    background: #C6E6FC;
    color: #fff;
    padding: 18px 18px;
    text-align: left;
    font-weight: 950;
    font-size: 1.05rem;
    color: #04205F;
}
.ms-compare-table tbody td {
    padding: 18px 18px;
    border-bottom: 1px solid #C6E6FC;
    color: #444;
    line-height: 1.9;
    vertical-align: top;
}
.ms-compare-table tbody tr:last-child td { border-bottom: none; }
.ms-compare-table .old { color: #6c757d; }
.ms-compare-table .new {
    background: rgba(255,152,0,0.08);
    border-left: 4px solid rgba(255,152,0,0.75);
    font-weight: 850;
    color: #5a3300;
}

/* CTA */
.ms-cta { padding: 70px 0 90px; background: linear-gradient(180deg, rgba(255,152,0,0.06), rgba(4,32,95,0.00)); }
.ms-cta-box {
    background: #fff;
    border-radius: 18px;
    border: 1px solid #eef1f4;
    box-shadow: 0 16px 46px rgba(0,0,0,0.10);
    padding: 28px;
    overflow: hidden;
}

/* TOC */
.ms-toc {
    position: fixed;
    right: 18px;
    top: 140px;
    z-index: 50;
    width: 230px;
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(4,32,95,0.10);
    border-radius: 14px;
    box-shadow: 0 14px 40px rgba(0,0,0,0.12);
    padding: 12px;
    backdrop-filter: blur(10px);
}
.ms-toc .title {
    font-weight: 950;
    color: var(--ms-deep);
    font-size: 13px;
    letter-spacing: 0.2px;
    margin-bottom: 6px;
}
.ms-toc a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px;
    border-radius: 12px;
    text-decoration: none;
    color: #2d3a4b;
    font-weight: 850;
    font-size: 13px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.ms-toc a:hover {
    background: rgba(255,152,0,0.10);
    transform: translateY(-1px);
    color: var(--ms-deep);
}
.ms-toc a.active {
    background: rgba(255,152,0,0.14);
    color: var(--ms-deep);
    border: 1px solid rgba(255,152,0,0.24);
}
.ms-toc .dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(4,32,95,0.25);
    flex: 0 0 auto;
}
.ms-toc a.active .dot {
    background: var(--ms-orange);
    box-shadow: 0 0 0 6px rgba(255,152,0,0.18);
}

/* Lightbox */
.ms-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.72);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
}
.ms-lightbox.open { display: flex; }
.ms-lightbox-inner {
    max-width: 1100px;
    width: 100%;
    max-height: 86vh;
    background: rgba(255,255,255,0.95);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.22);
    box-shadow: 0 28px 90px rgba(0,0,0,0.40);
    position: relative;
    display: flex;
    flex-direction: column;
}
.ms-lightbox-bar {
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(4,32,95,0.92), rgba(255,152,0,0.92));
    color: #fff;
}
.ms-lightbox-bar .cap {
    font-weight: 950;
    font-size: 13px;
    letter-spacing: 0.2px;
    opacity: 0.95;
}
.ms-lightbox-close {
    border: 0;
    background: rgba(255,255,255,0.12);
    color: #fff;
    border-radius: 10px;
    padding: 8px 10px;
    font-weight: 950;
    cursor: pointer;
}
.ms-lightbox-body {
    padding: 14px;
    overflow: auto;
    background: #f6f7f9;
}
.ms-lightbox-body img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.08);
    background: #fff;
}

/* Mobile sticky CTA */
.ms-mobile-cta {
    display: none;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 200;
    background: rgba(255,255,255,0.94);
    border: 1px solid rgba(4,32,95,0.10);
    border-radius: 16px;
    padding: 10px;
    box-shadow: 0 16px 52px rgba(0,0,0,0.16);
    backdrop-filter: blur(10px);
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}
.ms-mobile-cta .text {
    font-size: 12px;
    color: #2d3a4b;
    font-weight: 950;
    line-height: 1.3;
}
.ms-mobile-cta .btn {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 10px 14px;
    background: var(--ms-orange);
    color: #2b1600 !important;
    font-weight: 950;
    text-decoration: none;
    border: 0;
}

@media (max-width: 992px) {
    .ms-hero h1 { font-size: 2.25rem; }
    .ms-hero { padding: 105px 0 70px; }
    .ms-pain-grid { grid-template-columns: 1fr; }
    .ms-toc { display: none; }
    .ms-overlay .boxes { display: none; }
}
@media (max-width: 768px) {
    .ms-hero { padding: 96px 0 56px; }
    .ms-hero .subtitle { font-size: 1.05rem; }
    .ms-mobile-cta { display: flex; }
    body { padding-bottom: 86px; }
    .ms-compare-table,
    .ms-compare-table thead,
    .ms-compare-table tbody,
    .ms-compare-table th,
    .ms-compare-table td,
    .ms-compare-table tr { display: block; width: 100%; }
    .ms-compare-table thead { display: none; }
    .ms-compare-table tbody tr { border-bottom: 1px solid #eef1f4; }
    .ms-compare-table tbody td { border-bottom: none; padding: 14px 16px; }
    .ms-compare-table tbody td:first-child {
        font-weight: 950;
        color: var(--ms-deep);
        padding-top: 16px;
    }
    .ms-compare-table .new {
        border-left: 0;
        border-top: 3px solid rgba(255,152,0,0.80);
    }
}