/* ed: 2026-07 — локальные цвета для risk/solution блоков */
.engineering-page {
    --eng-color-error-lighter: #ef9a9a;
    --eng-color-success-lighter: #81c784;
}

.engineering-page {
    padding-top: 0;
}

.en-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    z-index: 1;
    overflow: hidden;
}

.en-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.en-hero-image {
    position: absolute;
    inset: 0;
    background: url('https://images.unsplash.com/photo-1504307651254-35680f356dfd?w=1920&q=80') center/cover no-repeat;
}

.en-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, 
        rgba(var(--surface-elevated-rgb), 0.95) 0%, 
        rgba(var(--surface-elevated-rgb), 0.85) 50%,
        rgba(var(--surface-deep-rgb), 0.95) 85%, 
        var(--surface-deep) 100%
    );
}

.en-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, var(--surface-deep) 0%, transparent 100%);
    z-index: 2;
    pointer-events: none;
}

.en-hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 140px 0 80px;
}

.en-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    color: var(--text-body);
    line-height: 1.2;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.en-hero-subtitle {
    font-size: 18px;
    color: rgba(var(--text-body-rgb), 0.75);
    margin-bottom: 40px;
    line-height: 1.7;
}

.en-hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.intro-text {
    max-width: 800px;
    margin: 0 auto 60px;
    text-align: center;
}

.intro-text p {
    font-size: 18px;
    color: rgba(var(--text-body-rgb), 0.8);
    line-height: 1.8;
}

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

.stat-card {
    padding: 40px 32px;
    background: rgba(var(--text-body-rgb), 0.1);
    border: 1px solid rgba(var(--text-body-rgb), 0.12);
    border-radius: var(--radius);
    text-align: center;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 64px;
    font-weight: 800;
    color: var(--accent-gold);
    line-height: 1;
    margin-bottom: 16px;
}

.stat-text {
    font-size: 16px;
    color: rgba(var(--text-body-rgb), 0.7);
    line-height: 1.5;
}

.comparison-table {
    background: rgba(var(--text-body-rgb), 0.1);
    border: 1px solid rgba(var(--text-body-rgb), 0.12);
    border-radius: var(--radius-card);
    overflow: hidden;
}

.comparison-header {
    display: grid;
    grid-template-columns: 1.5fr 2fr 2fr;
    padding: 20px 32px;
    background: rgba(var(--accent-gold-rgb), 0.1);
}

.comparison-header span {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comparison-header .highlight-col {
    text-align: center;
}

.comparison-row {
    display: grid;
    grid-template-columns: 1.5fr 2fr 2fr;
    padding: 20px 32px;
    border-bottom: 1px solid rgba(var(--text-body-rgb), 0.12);
    align-items: center;
    transition: background 0.2s ease, padding-left 0.2s ease;
}

.comparison-row:last-child {
    border-bottom: none;
}
.comparison-row:nth-child(even) { background: rgba(var(--accent-gold-rgb),0.04); }
.comparison-row:hover { background: rgba(var(--accent-gold-rgb),0.08); padding-left: 40px; }

.row-criterion {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-body);
}

.row-bad {
    font-size: 14px;
    color: rgba(var(--text-body-rgb), 0.5);
    padding-right: 20px;
}

.row-good {
    font-size: 14px;
    color: rgba(var(--text-body-rgb), 0.85);
    text-align: center;
}

.risks-accordion {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.risk-item {
    background: rgba(var(--text-body-rgb), 0.1);
    border: 1px solid rgba(var(--text-body-rgb), 0.1);
    border-radius: var(--radius-card);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
    position: relative;
}

.risk-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--accent-gold) 0%, rgba(var(--accent-gold-rgb), 0.3) 100%);
    border-radius: 0 3px 3px 0;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.risk-item:hover {
    border-color: rgba(var(--accent-gold-rgb), 0.15);
    background: rgba(var(--text-body-rgb), 0.14);
}

.risk-item.active {
    border-color: rgba(var(--accent-gold-rgb), 0.2);
    background: rgba(var(--text-body-rgb), 0.16);
}

.risk-item.active::before {
    opacity: 1;
}

.risk-header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: none;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
    position: relative;
    z-index: 1;
}

.risk-header:hover {
    background: rgba(var(--accent-gold-rgb), 0.03);
}

.risk-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(var(--accent-gold-rgb), 0.12) 0%, rgba(var(--accent-gold-rgb), 0.05) 100%);
    border-radius: 10px;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 800;
    color: var(--accent-gold);
    flex-shrink: 0;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.risk-item.active .risk-number {
    background: linear-gradient(135deg, rgba(var(--accent-gold-rgb), 0.2) 0%, rgba(var(--accent-gold-rgb), 0.1) 100%);
}

.risk-name {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-body);
    text-align: left;
    transition: color 0.3s ease;
}

.risk-item.active .risk-name {
    color: var(--accent-gold);
}

.risk-arrow {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(var(--text-body-rgb), 0.07);
    color: rgba(var(--text-body-rgb), 0.35);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
}

.risk-item.active .risk-arrow {
    transform: rotate(180deg);
    background: rgba(var(--accent-gold-rgb), 0.1);
    color: var(--accent-gold);
}

.risk-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.risk-item.active .risk-content {
    max-height: 500px;
}

.risk-content-inner {
    padding: 0 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.risk-problem,
.risk-solution {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    border-radius: 12px;
}

.risk-problem {
    background: rgba(var(--color-error-light-rgb), 0.06);
    border: 1px solid rgba(var(--color-error-light-rgb), 0.1);
}

.risk-solution {
    background: rgba(var(--color-success-light-rgb), 0.06);
    border: 1px solid rgba(var(--color-success-light-rgb), 0.1);
}

.risk-problem svg {
    width: 20px;
    height: 20px;
    color: var(--eng-color-error-lighter);
    flex-shrink: 0;
    margin-top: 2px;
}

.risk-solution svg {
    width: 20px;
    height: 20px;
    color: var(--eng-color-success-lighter);
    flex-shrink: 0;
    margin-top: 2px;
}

.risk-problem p,
.risk-solution p {
    font-size: 14px;
    color: rgba(var(--text-body-rgb), 0.72);
    line-height: 1.7;
    margin: 0;
}

.risk-problem strong,
.risk-solution strong {
    color: var(--text-body);
    font-weight: 600;
}

.risk-problem strong {
    color: var(--eng-color-error-lighter);
}

.risk-solution strong {
    color: var(--eng-color-success-lighter);
}

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

.equipment-card {
    padding: 32px;
    background: rgba(var(--text-body-rgb), 0.1);
    border: 1px solid rgba(var(--text-body-rgb), 0.12);
    border-radius: var(--radius);
    text-align: center;
}

.equipment-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--accent-gold-rgb), 0.1);
    border-radius: 18px;
    color: var(--accent-gold);
    margin: 0 auto 20px;
}

.equipment-card h4 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-body);
    margin-bottom: 12px;
}

.equipment-card p {
    font-size: 14px;
    color: rgba(var(--text-body-rgb), 0.65);
    line-height: 1.6;
}

.case-block {
    /* ed: 2026-06 — ар-деко: острый радиус. Было: 24px. */
    background: linear-gradient(135deg, rgba(var(--accent-gold-rgb), 0.08) 0%, rgba(var(--accent-gold-rgb), 0.02) 100%);
    border: 1px solid rgba(var(--accent-gold-rgb), 0.15);
    border-radius: 6px;
    padding: 48px;
}

.case-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(var(--accent-gold-rgb), 0.15);
    /* ed: 2026-06 — ар-деко: острый радиус. Было: 8px. */
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--accent-gold);
    margin-bottom: 24px;
}

.case-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.case-problem h4,
.case-findings h4,
.case-solution h4 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-body);
    margin-bottom: 12px;
}

.case-problem p,
.case-solution p {
    font-size: 15px;
    color: rgba(var(--text-body-rgb), 0.75);
    line-height: 1.6;
}

.case-findings ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.case-findings li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(var(--color-error-light-rgb), 0.1);
    border: 1px solid rgba(var(--color-error-light-rgb), 0.2);
    border-radius: 8px;
    font-size: 14px;
    color: var(--color-error-light);
}

.case-findings li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--color-error-light);
    border-radius: 50%;
}

.case-result {
    display: flex;
    gap: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(var(--text-body-rgb), 0.1);
}

.result-item {
    flex: 1;
}

.result-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: rgba(var(--text-body-rgb), 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.result-text {
    font-size: 15px;
    color: rgba(var(--text-body-rgb), 0.8);
    line-height: 1.5;
}

.result-savings {
    padding: 20px 32px;
    background: rgba(var(--color-success-light-rgb), 0.1);
    border: 1px solid rgba(var(--color-success-light-rgb), 0.2);
    border-radius: 12px;
    text-align: center;
}

.savings-label {
    display: block;
    font-size: 12px;
    color: rgba(var(--text-body-rgb), 0.6);
    margin-bottom: 8px;
}

.savings-value {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    color: var(--color-success-light);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
    background: rgba(var(--text-body-rgb), 0.1);
    border: 1px solid rgba(var(--text-body-rgb), 0.12);
    border-radius: var(--radius-card);
}

.benefit-item svg {
    color: var(--color-success-light);
    flex-shrink: 0;
    margin-top: 2px;
}

.benefit-item p {
    font-size: 15px;
    color: rgba(var(--text-body-rgb), 0.8);
    line-height: 1.5;
}

.faq-list {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-item {
    /* ed: 2026-06 — ар-деко: золотой border tint, острый радиус. Было: white border, 16px. */
    background: rgba(var(--text-body-rgb), 0.1);
    border: 1px solid rgba(var(--accent-gold-rgb), 0.1);
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
    position: relative;
}

.faq-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--accent-gold) 0%, rgba(var(--accent-gold-rgb), 0.3) 100%);
    border-radius: 0 3px 3px 0;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.faq-item:hover {
    border-color: rgba(var(--accent-gold-rgb), 0.15);
    background: rgba(var(--text-body-rgb), 0.14);
}

.faq-item.active {
    border-color: rgba(var(--accent-gold-rgb), 0.2);
    background: rgba(var(--text-body-rgb), 0.16);
}

.faq-item.active::before {
    opacity: 1;
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-body);
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease;
    position: relative;
    z-index: 1;
}

.faq-question:hover {
    color: var(--accent-gold);
}

.faq-question span {
    flex: 1;
    transition: color 0.3s ease;
}

.faq-item.active .faq-question span {
    color: var(--accent-gold);
}

.faq-question svg {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    /* ed: 2026-06 — ар-деко: острый радиус. Было: 8px. */
    border-radius: 4px;
    background: rgba(var(--text-body-rgb), 0.07);
    color: rgba(var(--text-body-rgb), 0.35);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.faq-item.active .faq-question svg {
    transform: rotate(180deg);
    background: rgba(var(--accent-gold-rgb), 0.1);
    color: var(--accent-gold);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.faq-item.active .faq-answer {
    max-height: 300px;
}

.faq-answer-inner {
    padding: 0 24px 24px;
}

.faq-answer p {
    font-size: 14px;
    color: rgba(var(--text-body-rgb), 0.72);
    line-height: 1.7;
    padding: 16px 20px;
    background: rgba(var(--accent-gold-rgb), 0.04);
    border: 1px solid rgba(var(--accent-gold-rgb), 0.08);
    /* ed: 2026-06 — ар-деко: острый радиус. Было: 12px. */
    border-radius: 4px;
    margin: 0;
}

/* CTA, Case, Related styles moved to _app/css/hub-shared.css */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(var(--shadow-color-rgb), 0.8);
    /* backdrop-filter removed for performance */
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: var(--surface-elevated);
    border: 1px solid rgba(var(--text-body-rgb), 0.1);
    border-radius: var(--radius);
    padding: 40px;
    max-width: 420px;
    width: 90%;
    z-index: 2001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(var(--text-body-rgb), 0.5);
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--text-body);
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-body);
}

.modal-desc {
    font-size: 14px;
    color: rgba(var(--text-body-rgb), 0.7);
    margin-bottom: 24px;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-form input {
    padding: 14px 18px;
    background: var(--surface-elevated);
    border: 1px solid rgba(var(--text-body-rgb), 0.1);
    border-radius: 8px;
    color: var(--text-body);
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.modal-form input:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.modal-form input::placeholder {
    color: rgba(var(--text-body-rgb), 0.5);
}

.modal-note {
    font-size: 12px;
    color: rgba(var(--text-body-rgb), 0.5);
    text-align: center;
    margin-top: 16px;
}

@media (max-width: 1024px) {
    .en-hero {
        min-height: 100dvh;
    }
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .comparison-header,
    .comparison-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .comparison-row:hover { padding-left:16px; }
    
    .comparison-header span:nth-child(2),
    .row-bad {
        display: none;
    }
    
    .comparison-header .highlight-col,
    .row-good {
        text-align: left;
        padding-left: 48px;
    }
    
    .equipment-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .case-result {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .en-hero h1 {
        font-size: 32px;
    }
    
    .en-hero-subtitle {
        font-size: 16px;
    }
    
    .en-hero-content {
        padding: 120px 0 60px;
    }
    
    .section {
        padding: var(--section-padding-md) 0;
    }
    
    .en-section-title {
        font-size: 28px;
    }
    
    .stat-number {
        font-size: 48px;
    }
    
    .equipment-grid {
        grid-template-columns: 1fr;
    }
    
    .case-block {
        padding: 32px 24px;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .en-hero h1 {
        font-size: 26px;
    }
    
    .en-hero-actions {
        flex-direction: column;
    }
    
    .en-hero-actions .btn {
        width: 100%;
    }
    
    .en-section-title {
        font-size: 24px;
    }
    
    .en-section-subtitle {
        font-size: 15px;
    }
    
    .intro-text p {
        font-size: 15px;
    }
    
    .comparison-row {
        padding: 16px;
    }
    
    .risk-header {
        padding: 16px 20px;
    }

    .risk-content-inner {
        padding: 0 20px 20px;
    }

    .risk-problem,
    .risk-solution {
        padding: 14px 16px;
    }
    
    .cta-content h2 {
        font-size: 24px;
    }
    
    .benefit-item {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .benefit-item svg {
        margin: 0 auto;
    }
}
