/* Single case styles */

/* =========================
   BASE
========================= */

.single-case .container {
    max-width: 1450px;
    margin: 0 auto;
    padding: 0 24px;
    overflow-x: clip;
}

/* =========================
   HERO
========================= */

.case-hero {
    margin-bottom: 80px;
}

.case-hero-inner {
    max-width: 1450px;
    margin: 0 auto;
    padding: 60px;
    border-radius: 24px;

    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 50px;
    align-items: center;

    background: linear-gradient(135deg, #f8fdff, #eef7f8);
    border: 1px solid rgba(255,255,255,0.6);

    box-shadow:
        0 30px 80px rgba(0,0,0,0.08),
        inset 0 1px 0 rgba(255,255,255,0.7);

    position: relative;
    overflow: hidden;
}

.case-hero-inner::after {
    content: '';
    position: absolute;
    right: -120px;
    top: -120px;
    width: 320px;
    height: 320px;
    background: rgba(30,158,158,0.18);
    filter: blur(100px);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

.case-hero-inner::before {
    content: '';
    position: absolute;
    left: -100px;
    bottom: -100px;
    width: 260px;
    height: 260px;
    background: rgba(79,209,197,0.18);
    filter: blur(90px);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

/* Контент поверх glow */
.case-hero-left,
.case-hero-right {
    position: relative;
    z-index: 1;
}

/* TITLE */
.case-title {
    font-size: 44px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* RESULT */
.case-result-big {
    display: inline-block;
    padding: 10px 16px;
    background: rgba(30,158,158,0.1);
    border: 1px solid rgba(30,158,158,0.2);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    animation: pulseIn 0.5s 0.3s ease both;
}

@keyframes pulseIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

/* CHIPS */
.case-hero-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.case-chip {
    background: rgba(255,255,255,0.7);
    border: 1px solid rgba(30,158,158,0.2);
    backdrop-filter: blur(6px);
    color: #1e9e9e;
    padding: 8px 14px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    transition: 0.2s;
}

.case-chip:hover {
    transform: translateY(-2px);
    background: #fff;
}

/* IMAGE */
.case-hero-right {
    transform: perspective(1000px) rotateY(-6deg);
    transition: transform 0.4s ease;
}

.case-hero-right:hover {
    transform: perspective(1000px) rotateY(0deg) scale(1.02);
}

.case-hero-right img {
    width: 100%;
    border-radius: 18px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.12);
    display: block;
}

/* =========================
   META GRID
========================= */

.case-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 70px;
}

.case-meta-card {
    padding: 20px;
    border-radius: 16px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow:
        0 10px 30px rgba(0,0,0,0.05),
        inset 0 1px 0 rgba(255,255,255,0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.case-meta-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

.case-meta-card.highlight {
    border: 2px solid #1e9e9e;
    background: rgba(30,158,158,0.06);
}

.case-meta-card span {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #94a3b8;
    margin-bottom: 6px;
}

.case-meta-card strong {
    font-size: 14px;
    font-weight: 500;
    color: #0f172a;
    line-height: 1.5;
}

.case-meta-card a {
    color: #1e9e9e;
    text-decoration: none;
    font-weight: 500;
}

.case-meta-card a:hover {
    text-decoration: underline;
}

.case-meta-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* =========================
   LAYOUT
========================= */

.case-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 60px;
    align-items: start;
    margin-top: 40px;
}

.case-main-content {
    min-width: 0;
}

/* =========================
   SIDEBAR
========================= */

.case-sidebar {
    align-self: start;
	height: 96%;
}

.case-sidebar-wrap {
    position: sticky;
    top: 20px;
    max-width: 100%;
}

.case-sidebar-inner {
    padding: 20px 0;
}

/* =========================
   CONTENT
========================= */

.case-content {
    padding-top: 60px;
    border-top: 1px solid rgba(0,0,0,0.06);
    font-size: 18px;
    line-height: 1.75;
    color: #1e293b;
}

.case-content h2 {
    font-size: 28px;
    margin: 40px 0 15px;
    padding-left: 14px;
    border-left: 3px solid #1e9e9e;
}

.case-content h3 {
    font-size: 22px;
    margin: 30px 0 10px;
}

.case-content h4 {
    font-size: 18px;
    margin: 30px 0 10px;
}

.case-content p {
    margin-bottom: 16px;
}

.case-content ul {
    padding-left: 20px;
}

.case-content li {
    margin-bottom: 8px;
}

.case-content strong {
    color: #0f172a;
}

/* Trend: красивые таблицы в контенте если есть */
.case-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    margin: 24px 0;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.case-content th {
    background: rgba(30,158,158,0.08);
    color: #0f172a;
    font-weight: 600;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 2px solid rgba(30,158,158,0.2);
}

.case-content td {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    color: #1e293b;
}

.case-content tr:hover td {
    background: rgba(30,158,158,0.03);
}

.case-content a {
    word-break: break-word;
    color: #1e9e9e;
}

/* =========================
   ANIMATION
========================= */

.case-hero {
    animation: fadeUp 0.6s ease both;
}

.case-meta-card {
    animation: fadeUp 0.5s ease both;
}

.case-meta-card:nth-child(1) { animation-delay: 0.05s; }
.case-meta-card:nth-child(2) { animation-delay: 0.10s; }
.case-meta-card:nth-child(3) { animation-delay: 0.15s; }
.case-meta-card:nth-child(4) { animation-delay: 0.20s; }
.case-meta-card:nth-child(5) { animation-delay: 0.25s; }

.case-content {
    animation: fadeUp 0.6s 0.2s ease both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =========================
   ФОРМА
========================= */

.case-form {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    padding: 26px;
    border-radius: 22px;
    box-shadow:
        0 20px 60px rgba(0,0,0,0.08),
        inset 0 1px 0 rgba(255,255,255,0.6);
    border: 1px solid rgba(0,0,0,0.04);
}

.case-form .form__contact-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #0f172a;
}

.modern-form-switch {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.switch-pill {
    flex: 1;
}

.switch-pill input {
    display: none;
}

.switch-pill .pill-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 999px;
    background: #f1f5f9;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
    transition: all 0.25s ease;
}

.switch-pill input:checked + .pill-content {
    background: linear-gradient(135deg, #1e9e9e, #4fd1c5);
    color: #fff;
    box-shadow: 0 6px 20px rgba(30,158,158,0.35);
}

.switch-pill input[value="telegram"]:checked + .pill-content {
    background: linear-gradient(135deg, #229ED9, #38bdf8);
    box-shadow: 0 6px 20px rgba(34,158,217,0.35);
}

.pill-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
}

.form-row {
    display: flex;
    gap: 10px;
}

.form-group {
    width: 100%;
    margin-bottom: 12px;
}

.input-field,
.tel-input,
textarea {
    width: 100%;
    padding: 13px 14px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.input-field:focus,
.tel-input:focus,
textarea:focus {
    border-color: #1e9e9e;
    box-shadow: 0 0 0 3px rgba(30,158,158,0.1);
    outline: none;
}

.input-field::placeholder,
.tel-input::placeholder,
textarea::placeholder {
    color: #c0cdd9;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, #ff5a4f, #ff7a6f);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    letter-spacing: 0.01em;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255,90,79,0.35);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: none;
}

.case-form-fast {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.case-form-fast-title {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 10px;
}

.case-form-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    background: #f8fafc;
    transition: background 0.2s ease, transform 0.2s ease;
    margin-bottom: 6px;
}

.case-form-link:hover {
    transform: translateX(3px);
}

.case-form-link.tg { color: #229ED9; }
.case-form-link.tg:hover { background: rgba(34,158,217,0.1); }
.case-form-link.phone { color: #0f172a; }
.case-form-link.phone:hover { background: rgba(0,0,0,0.05); }

.case-form-link svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
}

/* =========================
   CTA BOTTOM
========================= */

.case-bottom-cta {
    margin: 60px 0;
    padding: 40px;
    background: #f8fafc;
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.04);
}

.case-bottom-cta h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.case-bottom-cta p {
    margin-bottom: 20px;
    color: #64748b;
}

/* =========================
   MOBILE ≤ 1024px
========================= */

@media (max-width: 1024px) {
    .case-layout {
        grid-template-columns: 1fr;
    }

    .case-sidebar {
        display: none;
    }

    .case-hero-inner {
        padding: 40px 30px;
    }

    .case-content h2 {
        font-size: 24px;
    }
}

/* =========================
   MOBILE ≤ 768px
========================= */

@media (max-width: 768px) {

    .single-case .container {
        padding: 0 16px;
    }

    .case-hero {
        margin-bottom: 40px;
    }

    .case-hero-inner {
        grid-template-columns: 1fr;
        padding: 24px 20px;
        gap: 24px;
        border-radius: 20px;
    }

    .case-hero-right {
        transform: none;
    }

    .case-hero-right:hover {
        transform: none;
    }

    .case-title {
        font-size: 28px;
    }

    .case-result-big {
        font-size: 14px;
        padding: 8px 12px;
    }

    .case-meta-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        margin-bottom: 40px;
    }

    .case-meta-card {
        padding: 14px;
    }

    .case-meta-card:hover {
        transform: none;
        box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    }

    .case-content {
        font-size: 16px;
        padding-top: 40px;
    }

    .case-content h2 {
        font-size: 22px;
        padding-left: 12px;
    }

    .case-content h3 {
        font-size: 19px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .case-form {
        padding: 20px 16px;
        border-radius: 16px;
    }

    .case-form .form__contact-title {
        font-size: 17px;
    }

    .case-bottom-cta {
        padding: 24px 16px;
        margin: 40px 0;
        border-radius: 16px;
    }

    .case-bottom-cta h3 {
        font-size: 20px;
    }
}

/* =========================
   MOBILE ≤ 480px
========================= */

@media (max-width: 480px) {

    .case-title {
        font-size: 24px;
    }

    .case-meta-grid {
        grid-template-columns: 1fr;
    }

    .case-chip {
        font-size: 12px;
        padding: 6px 10px;
    }

    .input-field,
    .tel-input,
    textarea {
        font-size: 16px;
    }

    .case-form-link {
        font-size: 13px;
    }
}