/* Hero */

.hero {
    background: linear-gradient(135deg, #1e293b 0%, #312e81 55%, #6d28d9 100%);
    border-radius: calc(var(--radius) + 8px);
    color: #ffffff;
    padding: 56px 48px;
    margin-bottom: 56px;
    box-shadow: var(--shadow);
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero h1 {
    font-size: 44px;
    margin: 20px 0 12px;
}

.hero-lead {
    font-size: 19px;
    color: #e0e7ff;
    max-width: 720px;
    margin: 0 0 28px;
}

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

.hero-actions .button-ghost {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.6);
}

.hero-actions .button-ghost:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.hero-note {
    margin: 24px 0 0;
    color: #c7d2fe;
    font-size: 15px;
    max-width: 720px;
}

/* Карточки продуктов */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
}

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--color-primary);
    transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.card-box {
    border-top-color: #2563eb;
}

.card-fambox {
    border-top-color: #7c3aed;
}

.card-revtools {
    border-top-color: #0d9488;
}

.card-wintools {
    border-top-color: #ea580c;
}

.card-aida {
    border-top-color: #ec4899;
}

.card-health {
    border-top-color: #22c55e;
}

.card-code {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--color-muted);
    text-transform: uppercase;
}

.card-title {
    font-size: 21px;
    margin: 6px 0 0;
}

.card-text {
    color: var(--color-ink-soft);
    margin: 0;
}

.card-list,
.feature-list {
    margin: 0;
    padding-left: 20px;
    color: var(--color-ink-soft);
    display: grid;
    gap: 6px;
}

.card-link {
    margin-top: auto;
    font-weight: 600;
}

/* Шаги */

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
}

.step {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 24px;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.12);
    color: var(--color-primary);
    font-weight: 700;
}

.step h3 {
    margin: 14px 0 8px;
    font-size: 18px;
}

.step p {
    margin: 0;
    color: var(--color-ink-soft);
}

/* Страница продукта */

.product-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left: 6px solid var(--color-primary);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}

.product-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.product-body {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    gap: 28px;
    margin-top: 32px;
}

.product-side {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 24px;
    align-self: start;
}

.access-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    border-radius: var(--radius-small);
    padding: 18px 22px;
    margin-top: 24px;
}

.access-granted {
    background: var(--color-success-bg);
    color: #14532d;
}

.access-denied {
    background: var(--color-warning-bg);
    color: #78350f;
}

.access-panel span {
    display: block;
}

.access-meta {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    font-size: 14px;
}

/* Страница инструмента */

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: box-shadow 0.18s, transform 0.18s;
    color: inherit;
}

.tool-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
    text-decoration: none;
}

.tool-icon,
.tool-icon-large {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: var(--color-primary);
    font-weight: 700;
    overflow: hidden;
}

.tool-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    font-size: 24px;
    margin-bottom: 16px;
}

.tool-icon-large {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    font-size: 32px;
    flex-shrink: 0;
}

.tool-icon-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.tool-icon-img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: inherit;
    background: #eef2ff;
}

.tool-icon-img.is-missing {
    visibility: hidden;
}

.tool-name {
    font-size: 18px;
    margin: 0 0 8px;
}

.tool-desc {
    font-size: 14px;
    color: var(--color-muted);
    margin: 0;
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
    padding: 24px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.tool-header-product {
    margin: 0 0 4px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-muted);
}

.back-link {
    margin-top: 32px;
}

/* Аккордеон */

.accordion {
    margin-top: 16px;
}

.accordion-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-small);
    margin-bottom: 8px;
    overflow: hidden;
}

.accordion-header {
    padding: 16px 20px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-header::-webkit-details-marker {
    display: none;
}

.accordion-header::after {
    content: "▾";
    transition: transform 0.2s;
}

.accordion-item[open] .accordion-header::after {
    transform: rotate(-180deg);
}

.accordion-body {
    padding: 0 20px 20px;
    border-top: 1px solid var(--color-border);
    color: var(--color-ink-soft);
}

.accordion-body p {
    margin: 12px 0;
}

.accordion-body ul,
.accordion-body ol {
    margin: 8px 0;
    padding-left: 24px;
}

/* Блок скачивания Parshenkov.Box */

.download-card {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 28px 32px;
    background: linear-gradient(135deg, #1d4ed8 0%, #6d28d9 100%);
    border-radius: var(--radius);
    color: #ffffff;
    text-decoration: none;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.download-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.18), transparent 55%);
    pointer-events: none;
}

.download-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    color: #ffffff;
    text-decoration: none;
}

.download-icon {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    color: #ffffff;
    backdrop-filter: blur(4px);
}

.download-icon svg {
    width: 42px;
    height: 42px;
}

.download-info {
    flex: 1 1 auto;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.download-badge {
    display: inline-block;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 4px 10px;
    margin-bottom: 8px;
}

.download-title {
    font-size: 24px;
    line-height: 1.25;
    margin: 0 0 6px;
    color: #ffffff;
}

.download-text {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
    line-height: 1.5;
}

.download-button {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: #ffffff;
    color: #1d4ed8;
    border-radius: var(--radius-small);
    font-weight: 700;
    font-size: 15px;
    transition: transform 0.15s ease, background 0.15s ease;
}

.download-button svg {
    width: 18px;
    height: 18px;
}

.download-card:hover .download-button {
    background: #e0e7ff;
    transform: translateX(2px);
}

/* Страницы ошибок */

.error-card {
    text-align: center;
    max-width: 620px;
}

.error-code {
    font-size: 64px;
    font-weight: 800;
    line-height: 1;
    color: var(--color-primary);
    margin-bottom: 12px;
}

/* Адаптивность */

@media (max-width: 900px) {
    .product-body {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero {
        padding: 40px 28px;
    }

    .hero h1 {
        font-size: 34px;
    }
}

@media (max-width: 720px) {
    .download-card {
        flex-direction: column;
        text-align: center;
        padding: 24px;
        gap: 18px;
    }

    .download-button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .tool-header {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
}
