/* ===================================================
   CASES PAGE STYLES - /styles-cases.css
   =================================================== */

.cases-section { padding: 20px 0 60px; }

.cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 8px;
}

.case-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 32px 24px 24px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.case-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: var(--light-blue);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.35s ease;
}

.case-card:hover::before { transform: scaleY(1); }
.case-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.09); transform: translateY(-4px); }

.case-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    margin-bottom: 16px;
}

.case-tag {
    font-size: 14px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 20px;
    background: #eef6ff;
    color: var(--light-blue);
    white-space: nowrap;
}

.case-card h2 {
    font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    margin: 0 0 24px 0;
    letter-spacing: 0;
    color: #444;
}

.case-metric-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 8px;
    flex: 1;
}

.case-metric-main-number {
    display: flex;
    align-items: center;
    gap: 3px;
}

.case-metric-main-value {
    font-size: 64px;
    font-weight: 800;
    color: var(--light-blue);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    transition: color 0.25s ease;
}

.case-metric-main-suffix {
    font-size: 32px;
    font-weight: 700;
    color: var(--light-blue);
    line-height: 1;
    transition: color 0.25s ease;
}

.case-metric-main-label {
    font-size: 14px;
    color: #aaa;
    text-align: center;
    margin-top: 6px;
    line-height: 1.4;
}

.case-card:hover .case-metric-main-value,
.case-card:hover .case-metric-main-suffix { color: var(--btn-green); }

.case-card-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    width: 100%;
    text-align: center;
}

.case-read-more {
    font-size: 16px;
    font-weight: 600;
    color: var(--light-blue);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s ease;
}

.case-card:hover .case-read-more { gap: 8px; }

.cases-more-note {
    text-align: center;
    color: #bbb;
    font-size: 14px;
    margin-top: 32px;
}

/* ===================================================
   SINGLE CASE PAGE
   =================================================== */

/* H2 top spacing */
.cs-hero h2, .cs-services h2, .cs-problems h2, .cs-findings h2,
.cs-solutions h2, .cs-results h2, .cs-audit-screens h2 {
    margin-top: 0;
    padding-top: 0;
}

/* ---- HERO ---- */
.cs-hero { padding: 20px 0 40px; }

.cs-hero-layout {
    display: flex;
    gap: 48px;
    align-items: flex-start;
}

.cs-hero-left { flex: 1 1 0; min-width: 0; }

.cs-hero-left h1 {
    font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
    font-size: 46px;
    font-weight: 600;
    line-height: 55px;
    letter-spacing: .18px;
    color: var(--text-muted);
    margin: 0 0 16px 0;
}

.cs-hero-left .cs-tags {
    justify-content: flex-start;
    margin-top: 0;
    margin-bottom: 20px;
}

.cs-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cs-hero-desc {
    font-size: 18px;
    line-height: 1.75;
    color: #555;
    margin-bottom: 18px;
}

/* Hero counters */
.cs-counters {
    display: flex;
    gap: 0;
    margin-top: 36px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.cs-counter-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 16px;
    border-right: 1px solid var(--border);
}

.cs-counter-item:first-child { padding-left: 0; }
.cs-counter-item:last-child  { border-right: none; padding-right: 0; }

.cs-counter-number {
    display: flex;
    align-items: center;
    gap: 3px;
    line-height: 1;
}

.cs-counter-val {
    font-size: 52px;
    font-weight: 800;
    color: var(--light-blue);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.cs-counter-sfx {
    font-size: 28px;
    font-weight: 700;
    color: var(--light-blue);
    line-height: 1;
}

.cs-counter-label {
    font-size: 14px;
    color: #aaa;
    margin-top: 6px;
    line-height: 1.4;
    max-width: 160px;
}

/* Right info card */
.cs-hero-right { flex: 0 0 300px; width: 300px; }

.cs-info-card {
    background: var(--gray);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px 24px;
    position: sticky;
    top: 100px;
}

.cs-info-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #999;
    margin-bottom: 16px !important;
}

.cs-info-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.cs-info-label { font-size: 13px; color: #999; white-space: nowrap; }

.cs-info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-align: right;
}

.cs-info-divider { height: 1px; background: var(--border); margin: 20px 0 16px; }

.cs-info-services {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cs-info-services li {
    font-size: 14px;
    color: var(--text-muted);
    padding-left: 20px;
    position: relative;
}

.cs-info-services li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--btn-green);
    font-weight: 700;
    font-size: 13px;
}

/* ---- SERVICES ---- */
.cs-services { padding: 30px 0 40px; background: var(--gray); }

.cs-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 8px;
}

.cs-service-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 28px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    position: relative;
    overflow: hidden;
}

.cs-service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: var(--light-blue);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.35s ease;
}

.cs-service-card:hover::before { transform: scaleY(1); }
.cs-service-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.08); transform: translateY(-3px); }
.cs-service-card--soon { cursor: default; }
.cs-service-card--soon:hover { transform: none; box-shadow: none; }
.cs-service-card--soon::before { display: none; }

.cs-service-icon { width: 44px; height: 44px; }
.cs-service-icon img { width: 44px; height: 44px; object-fit: contain; }

.cs-service-body h3 {
    font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 1px;
    line-height: 1.3;
    text-align: left;
    margin: 0 0 8px 0;
    color: var(--text-muted);
}

.cs-service-body p { font-size: 16px; line-height: 1.6; color: #666; margin: 0; }

/* ---- PROBLEMS ---- */
.cs-problems { padding: 40px 0; }

.cs-problems-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: start;
    margin-top: 8px;
}

.cs-problems-text p { font-size: 16px; line-height: 1.8; color: #555; margin-bottom: 18px; }

.cs-problems-list-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #999;
    margin-bottom: 16px !important;
}

.cs-checklist { list-style: none; padding: 0; margin: 0; }

.cs-checklist li {
    font-size: 15px;
    color: var(--text-muted);
    padding: 11px 0 11px 32px;
    border-bottom: 1px solid var(--border);
    position: relative;
    line-height: 1.4;
}

.cs-checklist li:last-child { border-bottom: none; }

.cs-checklist li::before {
    content: "✗";
    position: absolute;
    left: 0; top: 10px;
    color: #f87171;
    font-weight: 700;
    font-size: 15px;
}

/* ---- ACCORDION ---- */
.cs-findings { padding: 40px 0; background: transparent; }

.cs-findings-intro {
    font-size: 16px;
    color: #777;
    text-align: center;
    margin: -10px auto 32px;
    max-width: 640px;
}

.cs-accordion {
    max-width: 1000px;
    margin: 0 auto;
}

.cs-acc-item { border-bottom: 1px solid var(--border); background: transparent; }
.cs-acc-item:last-child { border-bottom: none; }

.cs-acc-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 30px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 20px;
    font-weight: 500;
    color: var(--text-muted);
    gap: 16px;
    transition: background 0.2s ease;
    font-family: inherit;
}

.cs-acc-trigger:hover { background: transparent; }
.cs-acc-trigger[aria-expanded="true"] { background: transparent; color: var(--light-blue); }

.cs-acc-icon {
    font-size: 24px;
    font-weight: 300;
    color: var(--light-blue);
    flex-shrink: 0;
    transition: transform 0.3s ease;
    line-height: 1;
}

.cs-acc-trigger[aria-expanded="true"] .cs-acc-icon { transform: rotate(45deg); }

.cs-acc-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 28px;
}

.cs-acc-panel.open { max-height: 400px; padding: 0 28px 22px; }
.cs-acc-panel p { font-size: 16px; line-height: 1.8; color: #555; margin: 0; }

/* ---- SOLUTIONS ---- */
.cs-solutions { padding: 40px 0 50px; }

.cs-solutions-intro {
    font-size: 16px;
    color: #777;
    text-align: center;
    max-width: 640px;
    margin: -10px auto 36px;
}

.cs-steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.cs-step {
    background: linear-gradient(160deg, #fbfbfb, #f5fbfe);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 28px 22px 24px;
    border-left: 4px solid var(--light-blue);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.cs-step.cs-step--visible { opacity: 1; transform: translateY(0); }
.cs-step:nth-child(2) { transition-delay: 0.1s; }
.cs-step:nth-child(3) { transition-delay: 0.2s; }
.cs-step:nth-child(4) { transition-delay: 0.3s; }

.cs-step-num {
    font-size: 40px;
    font-weight: 800;
    color: #c8dcf5;
    line-height: 1;
    margin-bottom: 14px;
    letter-spacing: -1px;
}

.cs-step h3 { text-align: left; }
.cs-step p { font-size: 15px; line-height: 1.7; color: #666; margin: 0; }

/* ---- RESULTS ---- */
.cs-results { padding: 40px 0 50px; background: var(--gray); }

.cs-results-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 48px;
    align-items: center;
    margin-top: 8px;
}

.cs-results-metrics { display: flex; flex-direction: column; }

.cs-result-item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.cs-result-item:first-child { padding-top: 0; }
.cs-result-item:last-child  { border-bottom: none; }
.cs-result-badge { display: none; }
.cs-result-body { flex: 1; }

.cs-result-num {
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
    margin-bottom: 6px;
    flex-wrap: nowrap;
}

.cs-result-num .cs-counter-val { font-size: 32px; font-weight: 800; }

.cs-result-sfx {
    font-size: 20px;
    font-weight: 700;
    color: var(--light-blue);
    line-height: 1;
}

.cs-result-title {
    font-size: 18px;
    font-weight: 550;
    color: var(--text-muted);
    margin: 0;
    align-self: center;
}

.cs-result-label { font-size: 14px; color: #999; line-height: 1.5; margin: 0; }

.cs-screenshot-wrap {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.cs-screenshot { width: 100%; height: auto; border-radius: 6px; display: block; }

.cs-screenshot-caption {
    font-size: 13px;
    color: #aaa;
    text-align: center;
    margin: 10px 0 0 0 !important;
}

.cs-results-note {
    margin-top: 36px;
    padding: 20px 24px;
    background: #fff;
    border-left: 4px solid var(--btn-green);
    border-radius: 6px;
    border: 1px solid var(--border);
}

.cs-results-note p { font-size: 15px; line-height: 1.7; color: #777; margin: 0; }

/* ---- TESTIMONIAL ---- */
.cs-testimonial { padding: 0 0 48px; 
background: var(--gray);
}


.cs-quote {
    max-width: 720px;
    margin: 0 auto;
    padding: 16px 20px;
    background: #f5f9ff;
    border: 1px solid var(--border);
    border-left: 4px solid var(--light-blue);
    border-radius: 8px;
    background: transparent;
}

.cs-quote-text {
    font-size: 20px;
    font-weight: 400;
    line-height: 1.7;
    color: #444;
    margin: 0 0 4px 0;
    font-style: italic;
}

.cs-quote-author {
    font-size: 14px;
    color: #999;
    font-style: normal;
    padding: 20px 20px 10px;
}

/* ---- SLIDER ---- */
.cs-audit-screens { padding: 40px 0 50px; }

.cs-audit-screens-intro {
    font-size: 16px;
    color: #777;
    text-align: center;
    max-width: 640px;
    margin: -10px auto 32px;
}

.cs-slider { position: relative; max-width: 900px; margin: 0 auto; }

.cs-slider-track {
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
}

.cs-slide { display: none; flex-direction: column; }
.cs-slide.cs-slide--active { display: flex; }

.cs-slide-img-wrap {
    width: 100%;
    height: 460px;
    background: #f5f5f5;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-slide-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.cs-slide-caption {
    font-size: 14px;
    color: #888;
    text-align: center;
    padding: 14px 24px;
    margin: 0 !important;
    border-top: 1px solid var(--border);
    background: #fff;
    border-radius: 0 0 10px 10px;
}

/* Modern arrow buttons */
.cs-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-60%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.10);
    cursor: pointer;
    color: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    z-index: 2;
    padding: 0;
}

.cs-slider-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #111;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.13);
}

.cs-slider-btn--prev { left: -26px; }
.cs-slider-btn--next { right: -26px; }

.cs-slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
}

.cs-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: #ddd;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, transform 0.2s;
}

.cs-dot.cs-dot--active { background: var(--light-blue); transform: scale(1.2); }

/* FAQ единый стиль на кейсах */
.faq-toggle {
    color: var(--light-blue);
}
.faq-item.active .faq-question h3 {
    color: var(--light-blue);
}
#toc-mobile ul li a,
.toc-header-btn,
.back-button,
.toc-mobile-btn {
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}
/* ===================================================
   RESPONSIVE
   =================================================== */
   #list ul li a.active {
  font-weight: 400;          /* было: 550 */
  color: var(--light-blue);
  background: #f0f8ff;
  border-left-color: var(--light-blue);
}

@media (max-width: 1024px) {
    .cases-grid { grid-template-columns: repeat(2, 1fr); }
    .cs-hero-layout { flex-direction: column; }
    .cs-hero-right  { flex: unset; width: 100%; }
    .cs-info-card   { position: static; }
    .cs-steps-grid  { grid-template-columns: repeat(2, 1fr); }
    .cs-services-grid { grid-template-columns: 1fr; }
    .cs-results-layout { grid-template-columns: 1fr; gap: 32px; }
    .cs-problems-layout { grid-template-columns: 1fr; gap: 32px; }
    .cs-hero-left h1 { font-size: 34px; line-height: 40px; }
}

@media (max-width: 640px) {
    .cases-grid { grid-template-columns: 1fr; gap: 16px; }
    .cases-section { padding: 10px 0 40px; }
    .case-card { padding: 24px 16px 18px; }
    .case-metric-main-value { font-size: 52px; }
    .case-metric-main-suffix { font-size: 26px; }

    .cs-counters {
        flex-direction: column;
        gap: 0;
        border-top: 1px solid var(--border);
    }
    .cs-counter-item {
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 14px 0;
        flex-direction: row;
        align-items: center;
        gap: 12px;
        text-align: left;
    }
    .cs-counter-item:last-child { border-bottom: none; }
    .cs-counter-label { max-width: none; margin-top: 0; font-size: 15px; }
    .cs-counter-val  { font-size: 40px; }
    .cs-counter-sfx  { font-size: 22px; }

    .cs-steps-grid { grid-template-columns: 1fr; }
    .cs-hero-desc  { font-size: 15px; }
    .cs-accordion  { max-width: 100%; }
    .cs-results-layout { grid-template-columns: 1fr; gap: 28px; }

    .cs-slider-btn--prev { left: 4px; }
    .cs-slider-btn--next { right: 4px; }
    .cs-slider-btn { width: 40px; height: 40px; }
    .cs-slider-btn svg { width: 16px; height: 16px; }
    .cs-slide-img-wrap { height: 280px; }
    .cs-quote { padding: 24px 20px; }
    .cs-quote-text { font-size: 17px; }
    #toc-mobile ul li a:hover,
    #toc-mobile ul li a.active {
     font-weight: 400;          /* было: 550 - убираем смену веса */
    color: var(--light-blue);
    background: #f0f8ff;
    }
    @media (hover: none) {
  #toc-mobile ul li a:hover {
    color: var(--text-muted);
    background: transparent;
  }
}
}
