.stem-labs {
    width: min(1140px, calc(100% - 1.5rem));
    margin: 1.25rem auto 2.75rem;
    font-family: "DM Sans", system-ui, sans-serif;
    color: var(--ink, #102033);
}
.stem-labs h1,
.stem-labs h2,
.stem-labs h3,
.stem-labs h4,
.stem-labs h5,
.stem-labs .accordion-button {
    font-family: "Space Grotesk", sans-serif;
    letter-spacing: -0.03em;
}
.stem-labs section,
.stem-labs [id] { scroll-margin-top: 130px; }

.stem-jump {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding: 0 0 0.85rem;
    margin: 0;
    -webkit-overflow-scrolling: touch;
}
.stem-jump a {
    flex: 0 0 auto;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--line, #d7e1e8);
    background: #fff;
    color: var(--ink, #102033);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
}
.stem-jump a:hover { color: var(--cyan, #0b7ea8); border-color: var(--cyan, #0b7ea8); }

.stem-hero,
.stem-block {
    background: #fff;
    border: 1px solid var(--line, #d7e1e8);
    border-radius: 18px;
    padding: 1.6rem 1.15rem 1.4rem;
    margin: 0 0 1rem;
}
.stem-hero {
    color: #fff;
    border: 0;
    padding: 2rem 1.4rem 1.5rem;
    background:
        radial-gradient(circle at 88% 12%, rgba(232, 132, 12, 0.5), transparent 32%),
        linear-gradient(128deg, #071824 0%, #0b4f6c 48%, #1490b8 100%);
    box-shadow: 0 18px 40px rgba(7, 24, 36, 0.16);
}
.stem-eyebrow {
    display: inline-flex;
    margin-bottom: 0.7rem;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.stem-hero h1 {
    color: #fff;
    font-size: clamp(1.7rem, 3vw, 2.45rem);
    line-height: 1.12;
    margin-bottom: 0.7rem;
}
.stem-hero-lead {
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.05rem;
    line-height: 1.5;
    max-width: 36rem;
    margin-bottom: 1.1rem;
}
.stem-book {
    background: var(--ember, #e8840c);
    border: 0;
    color: #fff;
}
.stem-book:hover { background: #cf7308; color: #fff; }

.stem-title {
    text-align: center;
    color: var(--ink, #102033);
    font-size: 1.55rem;
    margin: 0 0 0.35rem;
}
.stem-title::after {
    content: "";
    display: block;
    width: 42px;
    height: 3px;
    margin: 0.55rem auto 1rem;
    border-radius: 2px;
    background: var(--ember, #e8840c);
}
.stem-lead {
    text-align: center;
    color: #526274;
    max-width: 40rem;
    margin: -0.35rem auto 1.25rem;
}

.stem-labs .gallery-marquee {
    gap: 1.25rem;
    width: max-content;
    animation: stem-marquee 48s linear infinite;
}
.stem-hero .position-relative.overflow-hidden:hover .gallery-marquee { animation-play-state: paused; }
.stem-labs .marquee-item { width: 118px; text-align: center; color: #fff; }
.stem-labs .banner-slider-img {
    width: 92px;
    height: 92px;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.85);
    background: #fff;
}
.stem-labs .marquee-caption {
    margin-top: 0.4rem;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.25;
    color: #fff;
}
@keyframes stem-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.stem-labs .admin-stat-card {
    background: #fff !important;
    color: var(--ink, #102033) !important;
    border: 1px solid var(--line, #d7e1e8) !important;
    border-radius: 16px;
    box-shadow: none !important;
}
.stem-labs .stat-icon {
    width: 44px;
    height: 44px;
    margin-inline: auto;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    background: #e7f5fb !important;
    color: var(--cyan, #0b7ea8) !important;
}
.stem-labs .stat-count {
    color: var(--cyan, #0b7ea8) !important;
    font-family: "Space Grotesk", sans-serif;
}
.stem-labs .stat-label {
    font-size: 0.92rem !important;
    line-height: 1.3 !important;
    font-weight: 650;
    color: #526274 !important;
    font-family: "DM Sans", sans-serif !important;
}
.stem-labs .admin-stat-card .btn {
    color: var(--cyan, #0b7ea8) !important;
    border-color: var(--cyan, #0b7ea8) !important;
    background: transparent !important;
}
.stem-labs .admin-stat-card .btn:hover {
    background: var(--cyan, #0b7ea8) !important;
    color: #fff !important;
}

.stem-labs .semicircle-card {
    width: 100%;
    max-width: none;
    min-height: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    background: #fff !important;
    color: var(--ink, #102033) !important;
    border: 1px solid var(--line, #d7e1e8);
    border-top: 3px solid var(--cyan, #0b7ea8);
    border-radius: 16px;
    box-shadow: none;
    padding: 1rem 1rem 1.1rem;
}
.stem-labs .card-semicircle {
    position: static;
    width: 72px;
    height: 72px;
    margin: 0 0 0.65rem;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--cyan, #0b7ea8);
    background: #fff;
}
.stem-labs .card-semicircle-img { width: 100%; height: 100%; object-fit: cover; }
.stem-labs .semicircle-card .card-body { padding: 0; }
.stem-labs .semicircle-card h5 { margin-top: 0 !important; color: var(--ink, #102033); }
.stem-labs .semicircle-card p {
    font-size: 0.92rem;
    line-height: 1.5;
    color: #3d4e5e;
    margin-bottom: 0.4rem;
}
.stem-labs .semicircle-card b { color: var(--cyan-deep, #085272); }

.stem-labs .accordion-item {
    border-color: var(--line, #d7e1e8);
    overflow: hidden;
}
.stem-labs .accordion-button {
    font-weight: 600;
    color: var(--ink, #102033);
    background: #fff;
}
.stem-labs .accordion-button:not(.collapsed) {
    background: #e7f5fb;
    color: var(--cyan-deep, #085272);
    box-shadow: none;
}
.stem-labs .accordion-button:focus { box-shadow: 0 0 0 0.2rem rgba(11, 126, 168, 0.2); }
.stem-labs .accordion-body { color: #243444; line-height: 1.5; }

.stem-labs .glass-card {
    height: 100%;
    border: 1px solid var(--line, #d7e1e8);
    border-radius: 16px;
    background: #fff;
    box-shadow: none;
}
.stem-labs .glass-card .text-muted { color: #526274 !important; }
.stem-labs .glass-card i { color: var(--cyan, #0b7ea8) !important; }
.stem-labs .gallery-thumb {
    height: 180px;
    object-fit: cover;
    border: 1px solid var(--line, #d7e1e8);
}
.stem-labs #stemLabForm {
    background: #f7fafc !important;
    border: 1px solid var(--line, #d7e1e8);
    box-shadow: none !important;
}
.stem-labs #contact .form-label { color: var(--ink, #102033); }
.stem-labs #stemLabForm .btn-primary {
    background: var(--cyan, #0b7ea8);
    border-color: var(--cyan, #0b7ea8);
}

@media (max-width: 767.98px) {
    .stem-labs { width: min(1140px, calc(100% - 1rem)); }
    .stem-hero,
    .stem-block { padding: 1.15rem 0.85rem 1.1rem; }
    .stem-labs .banner-slider-img,
    .stem-labs .marquee-item { width: 84px; }
    .stem-labs .banner-slider-img { height: 84px; }
}

[data-bs-theme="dark"] .stem-labs { color: #e8eef5; }
[data-bs-theme="dark"] .stem-jump a,
[data-bs-theme="dark"] .stem-block,
[data-bs-theme="dark"] .stem-labs .admin-stat-card,
[data-bs-theme="dark"] .stem-labs .semicircle-card,
[data-bs-theme="dark"] .stem-labs .glass-card,
[data-bs-theme="dark"] .stem-labs .accordion-item,
[data-bs-theme="dark"] .stem-labs .accordion-button {
    background: #152033 !important;
    color: #e8eef5 !important;
    border-color: #2a3b52 !important;
}
[data-bs-theme="dark"] .stem-title,
[data-bs-theme="dark"] .stem-labs .semicircle-card h5,
[data-bs-theme="dark"] .stem-labs .semicircle-card b { color: #e8eef5 !important; }
[data-bs-theme="dark"] .stem-lead,
[data-bs-theme="dark"] .stem-labs .semicircle-card p,
[data-bs-theme="dark"] .stem-labs .stat-label,
[data-bs-theme="dark"] .stem-labs .glass-card .text-muted,
[data-bs-theme="dark"] .stem-labs .accordion-body { color: #c5d2e0 !important; }
[data-bs-theme="dark"] .stem-labs .accordion-button:not(.collapsed) {
    background: #1c3148 !important;
    color: #7dd3f0 !important;
}
[data-bs-theme="dark"] .stem-labs #stemLabForm { background: #10192b !important; }
