/* ============================================
   maifort — case-page.css
   Стили страницы кейса /cases/{slug}
   ============================================ */

/* ---------- ХЛЕБНЫЕ КРОШКИ ---------- */

.case-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 40px;  /* отступ от крошек до тега */
    position: relative;
    z-index: 2;
    padding-top: 100px;   /* отступ сверху под фиксированный хедер */
    background: none;
}
.case-breadcrumbs a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color .2s;
}
.case-breadcrumbs a:hover {
    color: var(--light-blue);
}
.case-breadcrumbs .current {
    color: #fff;
    font-weight: 600;
}

/* ---------- HERO КЕЙСА ---------- */
.case-hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--dark-2) 0%, var(--dark-4) 100%);
    overflow: hidden;
    padding: 60px 0 80px;
}
.case-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.case-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.case-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        120deg,
        rgba(26, 34, 56, 0.95) 0%,
        rgba(26, 34, 56, 0.85) 40%,
        rgba(58, 86, 149, 0.5) 100%
    );
    pointer-events: none;
}
.case-hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
}
.case-hero h1 {
    font-size: clamp(32px, 4.5vw, 52px);
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
}
.case-hero-lead {
    font-size: 20px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.85);
    max-width: 700px;
}

.case-tag {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 100px;
    background: var(--gradient);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 20px;
}
.case-tag.nda {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(6px);
}

.case-nda-icon {
    display: flex;
    justify-content: center;
    margin: 40px 0 24px;
}
.case-nda-icon svg {
    width: 72px;
    height: 72px;
    stroke: rgba(255, 255, 255, 0.85);
}
.case-nda-reason {
    margin-top: 24px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    max-width: 600px;
}

/* ---------- МЕТА-ПАНЕЛЬ ---------- */
.case-meta-section {
    background: var(--bg2);
    padding: 40px 0;
    border-bottom: 1px solid var(--border);
}
.case-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}
.case-meta-item {
    text-align: center;
}
.case-meta-label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 8px;
}
.case-meta-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
}

/* ---------- ОСНОВНОЙ КОНТЕНТ ---------- */
.case-content-section {
    padding: 80px 0;
    background: var(--bg);
}
.case-content-section .container {
    max-width: 900px;
}

.case-block {
    margin-bottom: 56px;
    padding: 32px 40px;
    background: var(--bg2);
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.case-block:last-child { margin-bottom: 0; }

.case-block::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent);
}
.case-block-task::before { background: var(--accent2); }
.case-block-solution::before { background: var(--accent); }
.case-block-result::before { background: var(--success); }

.case-block-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}
.case-block-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--gradient-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.case-block-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--accent);
}
.case-block-task .case-block-icon svg { stroke: var(--accent2); }
.case-block-result .case-block-icon svg { stroke: var(--success); }

.case-block-head h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    margin: 0;
    letter-spacing: -0.3px;
}

.case-block-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.case-block-list li {
    padding: 12px 0 12px 32px;
    position: relative;
    color: var(--text2);
    font-size: 16px;
    line-height: 1.6;
    border-bottom: 1px solid var(--border);
}
.case-block-list li:last-child { border-bottom: none; }
.case-block-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    top: 12px;
    color: var(--accent2);
    font-weight: bold;
    font-size: 16px;
}
.case-block-solution .case-block-list li::before { color: var(--accent); }
.case-block-result .case-block-list li::before {
    content: '✓';
    color: var(--success);
    font-size: 14px;
}

/* ---------- ЦИТАТА ---------- */
.case-quote-section {
    padding: 60px 0;
    background: var(--bg2);
}
.case-quote {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 56px;
    background: linear-gradient(135deg, var(--dark-2) 0%, var(--dark-4) 100%);
    border-radius: 24px;
    position: relative;
    box-shadow: 0 20px 60px rgba(13, 20, 33, 0.25);
}
.case-quote-mark {
    position: absolute;
    top: 20px;
    left: 40px;
    font-size: 100px;
    font-weight: 800;
    line-height: 1;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.6;
}
.case-quote-text {
    font-size: 20px;
    line-height: 1.6;
    color: #fff;
    font-style: italic;
    margin: 0 0 28px;
    position: relative;
    z-index: 1;
}
.case-quote-author {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    z-index: 1;
}
.case-quote-author strong {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}
.case-quote-author small {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

/* ---------- ОТЗЫВЫ ---------- */
.case-reviews-section {
    padding: 80px 0;
    background: var(--bg);
}
.case-reviews-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}
.case-review {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow);
}
.case-review-text {
    color: var(--text2);
    font-size: 15px;
    line-height: 1.65;
    font-style: italic;
    margin-bottom: 24px;
}
.case-review-author {
    display: flex;
    align-items: center;
    gap: 14px;
}
.case-review-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}
.case-review-author strong {
    display: block;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}
.case-review-author small {
    color: var(--muted);
    font-size: 12px;
}

/* ---------- ПОХОЖИЕ КЕЙСЫ ---------- */
.case-related-section {
    padding: 80px 0;
    background: var(--bg2);
}
.case-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.case-related-card {
    display: flex;
    flex-direction: column;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    transition: all .3s;
    box-shadow: var(--shadow);
}
.case-related-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.case-related-img {
    height: 180px;
    position: relative;
    overflow: hidden;
    background: var(--gradient-soft);
}
.case-related-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s;
}
.case-related-card:hover .case-related-img img {
    transform: scale(1.05);
}
.case-related-img .case-tag {
    position: absolute;
    top: 16px;
    left: 16px;
    margin: 0;
    z-index: 2;
}
.case-nda-visual {
    height: 100%;
    background: linear-gradient(135deg, #2A2E38 0%, #3A5695 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
}
.case-nda-visual svg {
    width: 40px;
    height: 40px;
    stroke: rgba(255, 255, 255, 0.9);
}
.case-nda-visual span {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
}
.case-related-body {
    padding: 20px 24px 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.case-related-body h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
    margin-bottom: 10px;
}
.case-related-body p {
    color: var(--text2);
    font-size: 14px;
    line-height: 1.55;
    margin-bottom: 16px;
    flex-grow: 1;
}
.case-more {
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}
.case-more::after {
    content: '→';
    transition: transform .2s;
}
.case-related-card:hover .case-more::after {
    transform: translateX(4px);
}

/* ---------- CTA С ФОРМОЙ ---------- */
.case-cta-section {
    padding: 80px 0;
    background: var(--gradient);
    position: relative;
    overflow: hidden;
}
.case-cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.1), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.08), transparent 50%);
    pointer-events: none;
}
.case-cta-box {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.case-cta-content { color: #fff; }
.case-cta-content .badge {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
    margin-bottom: 20px;
}
.case-cta-content h2 {
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 20px;
}
.case-cta-content > p {
    font-size: 17px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 28px;
}
.case-cta-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.case-cta-list li {
    padding: 10px 0 10px 32px;
    position: relative;
    color: rgba(255, 255, 255, 0.92);
    font-size: 15px;
    line-height: 1.5;
}
.case-cta-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 10px;
    color: #fff;
    font-weight: bold;
}

.case-cta-form-box {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 30px 80px rgba(13, 20, 33, 0.35);
}
.case-cta-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.case-cta-form input[type="text"],
.case-cta-form input[type="tel"],
.case-cta-form textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: var(--bg2);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    font-weight: 500;
    transition: border-color .2s, background .2s;
}
.case-cta-form input::placeholder,
.case-cta-form textarea::placeholder {
    color: var(--muted);
}
.case-cta-form input:focus,
.case-cta-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: #fff;
}
.case-cta-form textarea {
    resize: vertical;
    min-height: 90px;
}
.case-cta-form button {
    width: 100%;
    padding: 16px;
    margin-top: 4px;
}
.case-cta-form small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
    text-align: center;
    margin-top: 4px;
}
.case-cta-form small a {
    color: var(--accent);
    text-decoration: none;
}
.case-cta-form small a:hover {
    text-decoration: underline;
}

/* ---------- АДАПТИВ ---------- */
@media (max-width: 968px) {
    .case-breadcrumbs-wrap {
        padding: 80px 0 0;
    }
    .case-hero {
        min-height: auto;
        padding: 40px 0 60px;
    }
    .case-hero h1 {
        letter-spacing: -1px;
    }
    .case-hero-lead {
        font-size: 17px;
    }
    .case-meta {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .case-meta-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
        padding-bottom: 16px;
        border-bottom: 1px solid var(--border);
    }
    .case-meta-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
    .case-meta-label {
        margin-bottom: 0;
    }
    .case-content-section,
    .case-reviews-section,
    .case-related-section {
        padding: 60px 0;
    }
    .case-block {
        padding: 24px;
    }
    .case-block-head h2 {
        font-size: 20px;
    }
    .case-quote {
        padding: 32px 24px;
    }
    .case-quote-mark {
        font-size: 72px;
        left: 20px;
        top: 10px;
    }
    .case-quote-text {
        font-size: 17px;
    }
    .case-reviews-grid {
        grid-template-columns: 1fr;
    }
    .case-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .case-cta-box {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .case-cta-form-box {
        padding: 28px;
    }
}

@media (max-width: 600px) {
    .case-breadcrumbs-wrap {
        padding: 70px 0 0;
    }
    .case-breadcrumbs {
        font-size: 12px;
    }
    .case-hero {
        padding: 30px 0 50px;
    }
    .case-hero h1 {
        font-size: 26px;
    }
    .case-hero-lead {
        font-size: 15px;
    }
    .case-nda-icon svg {
        width: 56px;
        height: 56px;
    }
    .case-meta-section {
        padding: 24px 0;
    }
    .case-meta-value {
        font-size: 14px;
    }
    .case-content-section,
    .case-reviews-section,
    .case-related-section {
        padding: 40px 0;
    }
    .case-block {
        padding: 20px;
        border-radius: 14px;
    }
    .case-block-head {
        gap: 12px;
        margin-bottom: 16px;
    }
    .case-block-icon {
        width: 40px;
        height: 40px;
    }
    .case-block-icon svg {
        width: 20px;
        height: 20px;
    }
    .case-block-head h2 {
        font-size: 18px;
    }
    .case-block-list li {
        padding: 10px 0 10px 26px;
        font-size: 14px;
    }
    .case-quote {
        padding: 28px 20px;
        border-radius: 16px;
    }
    .case-quote-mark {
        font-size: 60px;
        left: 16px;
        top: 8px;
    }
    .case-quote-text {
        font-size: 15px;
    }
    .case-quote-author strong {
        font-size: 14px;
    }
    .case-quote-author small {
        font-size: 12px;
    }
    .case-review {
        padding: 24px;
    }
    .case-related-grid {
        grid-template-columns: 1fr;
    }
    .case-cta-section {
        padding: 50px 0;
    }
    .case-cta-content h2 {
        font-size: 24px;
    }
    .case-cta-content > p {
        font-size: 15px;
    }
    .case-cta-list li {
        font-size: 14px;
    }
    .case-cta-form-box {
        padding: 24px 20px;
    }
}