/* ==========================================================================
   NSOLVERS WORK & CASE STUDIES DESIGN SYSTEM (work.css)
   Scoped with .nsw-* and .nsc-* prefixes to prevent collisions with legacy style.css
   ========================================================================== */

:root {
    --nsw-bg-dark: #060e1e;
    --nsw-card-bg: rgba(10, 25, 47, 0.72);
    --nsw-card-border: rgba(255, 255, 255, 0.08);
    --nsw-card-hover-border: rgba(0, 229, 255, 0.4);
    --nsw-cyan: #00E5FF;
    --nsw-sky: #38BDF8;
    --nsw-blue: #38BDF8;
    --nsw-emerald: #10B981;
    --nsw-amber: #F59E0B;
    --nsw-text-main: #F8FAFC;
    --nsw-text-muted: #94A3B8;
}

/* ===================== HERO SECTION ===================== */
.nsw-hero-section {
    position: relative;
    padding: 6rem 1.5rem 3.5rem;
    overflow-x: clip;
    background: radial-gradient(circle at 50% 0%, rgba(14, 30, 60, 0.6) 0%, rgba(6, 14, 30, 0.95) 75%, #060e1e 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nsw-glow-bg {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(90px);
    z-index: 0;
}

.nsw-glow-1 {
    top: -10%;
    left: 15%;
    width: 500px;
    height: 450px;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.14) 0%, transparent 70%);
}

.nsw-glow-2 {
    top: 5%;
    right: 15%;
    width: 550px;
    height: 450px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.13) 0%, transparent 70%);
}

.nsw-container {
    max-width: 1240px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.nsw-breadcrumbs {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--nsw-text-muted);
    margin-bottom: 1.5rem;
}

.nsw-breadcrumbs a {
    color: var(--nsw-text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.nsw-breadcrumbs a:hover {
    color: var(--nsw-cyan);
}

.nsw-breadcrumbs .nsw-sep {
    opacity: 0.4;
}

.nsw-breadcrumbs .nsw-current {
    color: var(--nsw-cyan);
    font-weight: 500;
}

.nsw-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    background: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.28);
    color: var(--nsw-cyan);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.25rem;
}

.nsw-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--nsw-cyan);
    box-shadow: 0 0 8px var(--nsw-cyan);
}

.nsw-hero-title {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: #FFFFFF;
    margin-bottom: 1.25rem;
    max-width: 22ch;
}

.nsw-gradient-text {
    color: #00E5FF;
}

.nsw-hero-lead {
    font-size: clamp(1.05rem, 1.8vw, 1.2rem);
    line-height: 1.65;
    color: #CBD5E1;
    max-width: 66ch;
    margin-bottom: 2rem;
}

/* ===================== KPI STATS DOCK ===================== */
.nsw-stats-dock {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    background: rgba(10, 25, 47, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin-top: 2.5rem;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
}

.nsw-stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding-right: 1.5rem;
}

.nsw-stat-item:last-child {
    border-right: none;
    padding-right: 0;
}

.nsw-stat-val {
    font-size: 2.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #FFFFFF;
    line-height: 1;
}

.nsw-stat-val-cyan {
    color: var(--nsw-cyan);
    text-shadow: 0 0 16px rgba(0, 229, 255, 0.4);
}

.nsw-stat-lbl {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--nsw-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===================== FILTER TABS ===================== */
.nsw-filters-wrap {
    padding: 2.5rem 0 1.5rem;
    position: sticky;
    top: 68px;
    z-index: 30;
    background: rgba(6, 14, 30, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nsw-filter-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.nsw-filter-btn {
    appearance: none;
    background: rgba(15, 30, 56, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 9999px;
    padding: 0.6rem 1.25rem;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    color: #CBD5E1;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.nsw-filter-btn:hover {
    background: rgba(25, 45, 80, 0.8);
    border-color: rgba(0, 229, 255, 0.3);
    color: #FFFFFF;
}

.nsw-filter-btn.active {
    background: rgba(0, 229, 255, 0.15);
    border-color: var(--nsw-cyan);
    color: var(--nsw-cyan);
    box-shadow: none !important;
}

.nsw-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.72rem;
    font-weight: 600;
}

.nsw-filter-btn.active .nsw-filter-count {
    background: var(--nsw-cyan);
    color: #060e1e;
}

/* ===================== PROJECTS GRID ===================== */
.nsw-projects-section {
    padding: 3rem 1.5rem 6rem;
}

.nsw-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

.nsw-card {
    position: relative;
    background: var(--nsw-card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--nsw-card-border);
    border-radius: 18px;
    padding: 1.85rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.nsw-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 18px;
    background: radial-gradient(circle at 80% 0%, var(--nsw-card-glow, rgba(0, 229, 255, 0.08)) 0%, transparent 60%);
    pointer-events: none;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.nsw-card:hover {
    transform: translateY(-5px);
    border-color: var(--nsw-card-hover-border);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 25px var(--nsw-card-glow, rgba(0, 229, 255, 0.15));
}

.nsw-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.1rem;
}

.nsw-type-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nsw-type-fullstack {
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38BDF8;
}

.nsw-type-application {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10B981;
}

.nsw-type-frontend {
    background: rgba(0, 229, 255, 0.12);
    border: 1px solid rgba(0, 229, 255, 0.3);
    color: #00E5FF;
}

.nsw-type-ai {
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid rgba(0, 229, 255, 0.3);
    color: #00E5FF;
}

.nsw-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.nsw-card-desc {
    font-size: 0.92rem;
    line-height: 1.62;
    color: #94A3B8;
    margin-bottom: 1.5rem;
}

.nsw-tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.75rem;
    padding: 0;
    list-style: none;
}

.nsw-tech-pill {
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
    font-weight: 500;
    color: #CBD5E1;
}

.nsw-card-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.nsw-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    background: #00E5FF;
    color: #060e1e;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.55rem 1.15rem;
    border-radius: 8px;
    border: 1px solid #00E5FF;
    text-decoration: none;
    box-shadow: none !important;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.nsw-btn-primary:hover {
    transform: translateY(-2px);
    background: #00d8bc;
    border-color: #00d8bc;
    box-shadow: none !important;
}

.nsw-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.55rem 1.05rem;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: none !important;
    transition: all 0.2s ease;
}

.nsw-btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--nsw-cyan);
    box-shadow: none !important;
}

/* ===================== VIDEO SHOWCASE SUITE ===================== */
.nsw-video-section {
    padding: 4.5rem 1.5rem;
    background: #060e1e;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nsw-video-header {
    text-align: left;
    max-width: 680px;
    margin: 0 0 2.5rem;
}

.nsw-video-frame {
    max-width: 900px;
    margin: 0 0 2.5rem;
    background: #081222;
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 16px;
    overflow: hidden;
}

.nsw-video-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.25rem;
    background: rgba(14, 25, 45, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nsw-video-dots {
    display: flex;
    gap: 6px;
}

.nsw-video-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.nsw-video-title {
    font-size: 0.8rem;
    font-weight: 500;
    color: #94A3B8;
    letter-spacing: 0.03em;
}

.nsw-video-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    background: rgba(0, 229, 255, 0.12);
    border: 1px solid rgba(0, 229, 255, 0.3);
    color: #00E5FF;
}

.nsw-video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
}

.nsw-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ===================== TESTIMONIALS SECTION ===================== */
.nsw-reviews-section {
    padding: 5rem 1.5rem;
    background: #060e1e;
}

.nsw-reviews-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.nsw-review-card {
    background: rgba(10, 25, 47, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.nsw-review-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 229, 255, 0.3);
}

.nsw-review-stars {
    color: #F59E0B;
    margin-bottom: 0.85rem;
    font-size: 0.95rem;
    letter-spacing: 2px;
}

.nsw-review-body {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #CBD5E1;
    margin-bottom: 1.25rem;
    font-style: italic;
}

.nsw-review-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
}

.nsw-author-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00E5FF 0%, #38BDF8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #060e1e;
    font-weight: 700;
    font-size: 0.9rem;
}

.nsw-author-info h4 {
    font-size: 0.92rem;
    font-weight: 600;
    color: #FFFFFF;
    margin: 0;
}

.nsw-author-info span {
    font-size: 0.76rem;
    color: var(--nsw-text-muted);
}

/* ===================== DEDICATED CASE STUDY STYLES (nsc-*) ===================== */
.nsc-hero {
    position: relative;
    padding: 6.5rem 1.5rem 4rem;
    background: radial-gradient(circle at 50% 0%, rgba(14, 30, 60, 0.7) 0%, rgba(6, 14, 30, 0.95) 80%, #060e1e 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nsc-meta-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    background: rgba(10, 25, 47, 0.75);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin-top: 3rem;
}

.nsc-meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.nsc-meta-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--nsw-text-muted);
}

.nsc-meta-value {
    font-size: 1.05rem;
    font-weight: 600;
    color: #FFFFFF;
}

.nsc-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3.5rem;
    padding: 4rem 0;
    align-items: start;
}

.nsc-article {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
}

.nsc-section-block h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.nsc-section-block p {
    font-size: 1.02rem;
    line-height: 1.75;
    color: #CBD5E1;
    margin-bottom: 1.25rem;
}

.nsc-results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin: 2rem 0;
}

.nsc-result-box {
    background: rgba(10, 25, 47, 0.8);
    border: 1px solid rgba(0, 229, 255, 0.25);
    border-radius: 14px;
    padding: 1.5rem;
    text-align: left;
}

.nsc-result-num {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--nsw-cyan);
    margin-bottom: 0.35rem;
}

.nsc-result-desc {
    font-size: 0.85rem;
    color: var(--nsw-text-muted);
    line-height: 1.4;
}

.nsc-sidebar {
    position: sticky;
    top: calc(72px + 2rem);
    align-self: start;
    height: fit-content;
    background: rgba(10, 25, 47, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 2rem;
}

.nsc-sidebar-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* ===================== RESPONSIVE BREAKPOINTS ===================== */
@media (min-width: 1081px) {
    .nsc-article,
    .nsc-sidebar {
        position: sticky;
        top: calc(72px + 2rem);
        align-self: start;
    }
}

@media (max-width: 1080px) {
    .nsw-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .nsw-reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .nsc-layout {
        grid-template-columns: 1fr;
    }
    .nsc-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .nsw-stats-dock,
    .nsc-meta-bar {
        grid-template-columns: repeat(2, 1fr);
        padding: 1.25rem;
    }
    .nsw-grid {
        grid-template-columns: 1fr;
    }
    .nsw-reviews-grid {
        grid-template-columns: 1fr;
    }
    .nsc-results-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .nsw-stats-dock,
    .nsc-meta-bar {
        grid-template-columns: 1fr;
    }
}
