/* ==========================================================================
   Detail firmy
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hlavička
   -------------------------------------------------------------------------- */

.company-hero {
    padding-top: var(--header-h-detail);
    background:
        radial-gradient(ellipse 45% 100% at 88% 0%, rgba(124, 77, 255, 0.5), transparent 70%),
        radial-gradient(ellipse 30% 80% at 100% 70%, rgba(255, 79, 192, 0.3), transparent 70%),
        radial-gradient(ellipse 40% 90% at 62% -20%, rgba(47, 92, 255, 0.4), transparent 70%),
        var(--color-bg-hero);
}

.company-hero .backdrop__veil {
    background: linear-gradient(180deg, rgba(6, 5, 26, 0.2) 0%, rgba(6, 5, 26, 0.75) 45%, rgba(6, 5, 26, 0.92) 100%);
}

.company-hero__body {
    padding: 28px var(--gutter) 36px;
}

.company-hero__back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--color-text-on-dark-muted-2);
    font-size: var(--fs-small);
}

.company-hero__back:hover {
    color: #fff;
}

.company-hero__title {
    max-width: 1100px;
    margin-top: 22px;
    font-size: var(--fs-h1-detail);
    line-height: 1.02;
    letter-spacing: var(--tracking-tight);
    overflow-wrap: anywhere;
}

.company-hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 28px;
    margin-top: 24px;
    color: var(--color-text-on-dark-muted);
    font-size: 16px;
}

.status--on-dark {
    gap: 9px;
    color: var(--color-success-soft);
}

.status--on-dark::before {
    width: 9px;
    height: 9px;
    background: var(--color-success);
}

.status--inactive {
    color: var(--color-text-on-dark-muted-2);
}

.status--inactive::before {
    background: var(--color-text-on-dark-muted-3);
}

/* Identifikátory IČO / DIČ / IČ DPH */
.company-ids {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 28px;
}

.company-ids__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.company-id {
    display: flex;
    align-items: center;
    gap: 8px;
}

.company-id__label {
    min-width: 64px;
    color: var(--color-text-on-dark-muted-2);
    font-size: 14px;
}

.company-id__value {
    display: flex;
    align-items: center;
    gap: 12px;
}

.company-id__number {
    font-family: var(--font-mono);
    font-size: clamp(18px, 1.6vw, 22px);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.02em;
}

.company-ids__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.company-ids__link {
    --btn-height: 52px;
    --btn-radius: var(--radius-lg);
    --btn-bg: var(--color-glass-3);
    --btn-bg-hover: var(--color-glass-5);
    --btn-fs: 15.5px;
    gap: 10px;
    width: 100%;
    padding: 0 20px 0 16px;
    font-weight: 500;
}

.company-ids__link.is-copied {
    --btn-bg: rgba(62, 224, 162, 0.18);
}

.company-ids__link .copy-button__done {
    color: var(--color-success-soft);
}

.company-ids__link.is-copied .copy-button__idle {
    display: none;
}

.company-ids__link.is-copied .copy-button__done {
    display: inline;
}

.company-ids__api {
    --btn-fs: 15.5px;
    display: none;
}

@media (min-width: 720px) {
    .company-hero .backdrop__veil {
        background: linear-gradient(90deg, rgba(6, 5, 26, 0.9) 0%, rgba(6, 5, 26, 0.55) 40%, rgba(6, 5, 26, 0) 68%);
    }

    .company-hero__body {
        padding: clamp(40px, 6vw, 88px) var(--gutter) clamp(44px, 6vw, 80px);
    }

    .company-ids {
        flex-flow: row wrap;
        align-items: flex-end;
        gap: 28px clamp(36px, 5vw, 72px);
        margin-top: clamp(40px, 5vw, 64px);
    }

    .company-ids__list {
        display: contents;
    }

    .company-id {
        flex-direction: column;
        align-items: flex-start;
    }

    .company-id__label {
        min-width: 0;
    }

    .company-ids__link {
        width: auto;
    }

    .company-ids__api {
        display: inline-flex;
    }
}

/* --------------------------------------------------------------------------
   Základné údaje
   -------------------------------------------------------------------------- */

.facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
    align-content: start;
    gap: 0 48px;
}

.fact {
    display: grid;
    grid-template-columns: 36px 100px minmax(0, 1fr);
    align-items: center;
    gap: 4px 16px;
    padding: 10px 0;
}

.fact__icon {
    --badge-size: 36px;
    --badge-radius: var(--radius-sm);
    box-shadow: 0 8px 20px -10px rgba(107, 77, 255, 0.9);
}

.fact__icon .icon {
    --icon-size: 17px;
}

.fact:nth-child(-n + 2) .fact__icon { --badge-bg: var(--gradient-step-1); }
.fact:nth-child(n + 3):nth-child(-n + 4) .fact__icon { --badge-bg: var(--gradient-step-2); }
.fact:nth-child(n + 5):nth-child(-n + 6) .fact__icon { --badge-bg: var(--gradient-step-3); }
.fact:nth-child(n + 7) .fact__icon { --badge-bg: var(--gradient-step-4); }

.fact__label {
    width: min-content;
    color: var(--color-text-muted-2);
    font-size: var(--fs-small);
    line-height: 1.25;
}

.fact__value {
    color: var(--color-ink);
    font-size: 16.5px;
    font-weight: 500;
    line-height: 1.4;
}

.fact__note {
    color: var(--color-text-muted-2);
    font-weight: 400;
}

/* --------------------------------------------------------------------------
   Ľudia vo firme
   -------------------------------------------------------------------------- */

.people-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 48px;
}

.people-group__title {
    color: var(--color-text-muted-2);
    font-size: 15px;
    font-weight: 500;
}

.people-group__list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 22px;
    padding: 0;
    list-style: none;
}

.member {
    display: flex;
    align-items: center;
    gap: 18px;
}

.member__avatar {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--gradient-avatar-a);
    box-shadow: 0 14px 30px -14px rgba(61, 107, 255, 0.9);
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.people-group--owners .member__avatar {
    background: var(--gradient-avatar-b);
    box-shadow: 0 14px 30px -14px rgba(224, 91, 216, 0.9);
}

.member__name {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.member__role {
    margin-top: 4px;
    color: var(--color-text-muted);
    font-size: 16px;
}

/* Ukončené záznamy – skryté, kým sa nerozbalí história */
.member--ended {
    opacity: 0.6;
}

.member--ended .member__avatar,
.people-group--owners .member--ended .member__avatar {
    background: #d6d4e4;
    box-shadow: none;
    color: #3a3b52;
}

.people-groups.is-collapsed .member--ended {
    display: none;
}

.toggle-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--color-link);
    font-size: 15px;
    font-weight: 500;
}

.toggle-link:hover {
    color: var(--color-link-hover);
}

.toggle-link__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #e6e1ff;
    font-size: 15px;
}

/* --------------------------------------------------------------------------
   Predmety činnosti
   -------------------------------------------------------------------------- */

.activities__count {
    margin-top: 14px;
    color: var(--color-text-muted-3);
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 500;
}

.activities__main-label {
    color: var(--color-text-muted-2);
    font-size: 14px;
}

.activities__main {
    margin-top: 8px;
    padding-bottom: 4px;
    background: var(--gradient-brand-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: clamp(28px, 3.2vw, 44px);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: var(--tracking-h2);
}

.activities__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: 18px 48px;
    margin-top: 40px;
    padding: 0;
    list-style: none;
}

.activities.is-collapsed .activities__item:nth-child(n + 7) {
    display: none;
}

.activities__item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    color: #1d1e33;
    font-size: 17px;
    line-height: 1.45;
    text-wrap: pretty;
}

.activities__item::before {
    content: '';
    flex: none;
    width: 12px;
    height: 12px;
    margin-top: 5px;
    border-radius: 4px;
    background: var(--mark, #3d6bff);
}

.activities__item:nth-child(12n + 1) { --mark: #3d6bff; }
.activities__item:nth-child(12n + 2) { --mark: #4f63ff; }
.activities__item:nth-child(12n + 3) { --mark: #6458ff; }
.activities__item:nth-child(12n + 4) { --mark: #7a4dff; }
.activities__item:nth-child(12n + 5) { --mark: #8f4cf8; }
.activities__item:nth-child(12n + 6) { --mark: #a44cf0; }
.activities__item:nth-child(12n + 7) { --mark: #b84ee8; }
.activities__item:nth-child(12n + 8) { --mark: #c950e0; }
.activities__item:nth-child(12n + 9) { --mark: #d852d8; }
.activities__item:nth-child(12n + 10) { --mark: #e454cc; }
.activities__item:nth-child(12n + 11) { --mark: #ee55c2; }
.activities__item:nth-child(12n + 12) { --mark: #f757b8; }

.activities__toggle {
    margin: 26px auto 0;
    display: flex;
    gap: 8px;
}

.activities__chevron {
    width: 14px;
    height: 14px;
    transition: transform 0.25s;
}

.activities__toggle[aria-expanded='true'] .activities__chevron {
    transform: rotate(180deg);
}

/* --------------------------------------------------------------------------
   API karta
   -------------------------------------------------------------------------- */

.api-card-section {
    padding: clamp(40px, 5vw, 72px) var(--gutter);
}

.api-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    align-items: center;
    gap: 24px 40px;
    padding: clamp(22px, 3vw, 32px);
    overflow: hidden;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(ellipse 60% 120% at 100% 0%, rgba(124, 77, 255, 0.4), transparent 70%),
        radial-gradient(ellipse 40% 90% at 100% 100%, rgba(255, 79, 192, 0.2), transparent 70%),
        var(--color-bg-card-dark);
    color: #fff;
    scroll-margin-top: 24px;
}

.api-card__title {
    font-size: 22px;
    letter-spacing: -0.02em;
}

.api-card__text {
    max-width: 420px;
    margin-top: 10px;
    color: var(--color-text-on-dark-muted);
    font-size: 15.5px;
    line-height: 1.55;
}

.api-card__text code {
    color: var(--color-accent-soft);
    font-size: 14px;
    font-weight: 500;
}

.api-card .button-pair {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 10px;
    max-width: 440px;
    margin-top: 20px;
}

