/* =====================================================
   ILYK — Handbook
   css/handbook.css
   ===================================================== */

/* ── Демо-банер ────────────────────────────────────── */
.ilyk-handbook-demo-notice {
    background: #fefce8;
    border-bottom: 1px solid #fde047;
    padding: 10px 32px;
    font-size: 13px;
    font-weight: 500;
    color: #854d0e;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ilyk-handbook-demo-notice i { color: #ca8a04; }

/* ── Сторінка пароля ───────────────────────────────── */
.ilyk-handbook-password {
    min-height: calc(100vh - var(--ilyk-header-h));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: linear-gradient(135deg, #f8faff 0%, #eef1fe 100%);
}
.ilyk-handbook-password__inner {
    background: #fff;
    border-radius: 20px;
    padding: 48px 40px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: 0 8px 40px rgba(var(--ilyk-clr-primary-rgb), 0.10);
    border: 1px solid rgba(var(--ilyk-clr-primary-rgb), 0.12);
}
.ilyk-handbook-password__icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(var(--ilyk-clr-primary-rgb), 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 26px;
    color: var(--ilyk-clr-primary);
}
.ilyk-handbook-password__title {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 10px;
}
.ilyk-handbook-password__text {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 28px;
    line-height: 1.6;
}

.ilyk-handbook-password__form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
}
.ilyk-handbook-password__label {
    align-self: flex-start;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.ilyk-handbook-password__input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    color: #1e293b;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    text-align: center;
}
.ilyk-handbook-password__input:focus {
    border-color: rgba(var(--ilyk-clr-primary-rgb), 0.5);
    box-shadow: 0 0 0 3px rgba(var(--ilyk-clr-primary-rgb), 0.08);
}
.ilyk-handbook-password__input::placeholder {
    color: #cbd5e1;
}
.ilyk-handbook-password__submit {
    width: 100%;
    padding: 12px 24px;
    background: var(--ilyk-clr-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}
.ilyk-handbook-password__submit:hover {
    background: var(--ilyk-clr-primary-hover);
    transform: translateY(-1px);
}

/* Помилка пароля */
.ilyk-handbook-password__error {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 11px 16px;
    background: #fef2f2;
    border: 1.5px solid #fecaca;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #dc2626;
    margin-bottom: 4px;
    animation: ilyk-hb-shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}
.ilyk-handbook-password__error i {
    font-size: 15px;
    flex-shrink: 0;
}
.ilyk-handbook-password__input.is-error {
    border-color: #fca5a5;
    background: #fffafa;
}
.ilyk-handbook-password__input.is-error:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

@keyframes ilyk-hb-shake {
    10%, 90% { transform: translateX(-2px); }
    20%, 80% { transform: translateX(3px); }
    30%, 50%, 70% { transform: translateX(-4px); }
    40%, 60% { transform: translateX(4px); }
}

/* ── Hero ──────────────────────────────────────────── */
.ilyk-handbook__hero {
    background: linear-gradient(135deg, #f8faff 0%, #eef1fe 100%);
    border-bottom: 1px solid #e2e8f0;
    padding: 52px 0 44px;
}
.ilyk-handbook__hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}
.ilyk-handbook__hero-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ilyk-clr-primary);
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ilyk-handbook__hero-title {
    font-size: clamp(26px, 4vw, 40px);
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 14px;
    line-height: 1.2;
}
.ilyk-handbook__hero-intro {
    font-size: 16px;
    color: #475569;
    margin: 0 0 24px;
    max-width: 680px;
    line-height: 1.65;
}
.ilyk-handbook__pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    border: 1.5px solid rgba(var(--ilyk-clr-primary-rgb), 0.3);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ilyk-clr-primary);
    text-decoration: none;
    transition: all 0.2s;
}
.ilyk-handbook__pdf-btn:hover {
    background: rgba(var(--ilyk-clr-primary-rgb), 0.06);
    border-color: var(--ilyk-clr-primary);
    transform: translateY(-1px);
}

/* ── Layout: 2 колонки ─────────────────────────────── */
.ilyk-handbook__layout {
    padding: 48px 0 96px;
}
.ilyk-handbook__layout-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 48px;
    align-items: start;
}

/* ── Навігація (sticky) ────────────────────────────── */
.ilyk-handbook__nav-sticky {
    position: sticky;
    top: calc(var(--ilyk-header-h) + 24px);
}
.ilyk-handbook__nav-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
    margin: 0 0 16px;
    padding: 0 0 10px;
    border-bottom: 1px solid #f1f5f9;
}
.ilyk-handbook__nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ilyk-handbook__nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    transition: all 0.18s;
    line-height: 1.35;
}
.ilyk-handbook__nav-link:hover {
    background: #f8faff;
    color: var(--ilyk-clr-primary);
}
.ilyk-handbook__nav-link.is-active {
    background: rgba(var(--ilyk-clr-primary-rgb), 0.08);
    color: var(--ilyk-clr-primary);
    font-weight: 600;
}
.ilyk-handbook__nav-num {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    transition: all 0.18s;
}
.ilyk-handbook__nav-link.is-active .ilyk-handbook__nav-num {
    background: var(--ilyk-clr-primary);
    color: #fff;
}

/* ── Контент ───────────────────────────────────────── */
.ilyk-handbook__section {
    margin-bottom: 64px;
    scroll-margin-top: calc(var(--ilyk-header-h) + 24px);
}
.ilyk-handbook__section:last-child { margin-bottom: 0; }

.ilyk-handbook__section-head {
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f1f5f9;
}
.ilyk-handbook__section-title {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

/* ── Блоки ─────────────────────────────────────────── */
.ilyk-handbook__block {
    margin-bottom: 32px;
}
.ilyk-handbook__block:last-child { margin-bottom: 0; }

.ilyk-handbook__block-heading {
    font-size: 16px;
    font-weight: 600;
    color: #334155;
    margin: 0 0 16px;
}

/* TEXT */
.ilyk-handbook__text {
    font-size: 15px;
    line-height: 1.75;
    color: #475569;
}
.ilyk-handbook__text p { margin: 0 0 14px; }
.ilyk-handbook__text p:last-child { margin-bottom: 0; }
.ilyk-handbook__text ul, .ilyk-handbook__text ol {
    margin: 0 0 14px;
    padding-left: 20px;
}
.ilyk-handbook__text li { margin-bottom: 6px; }
.ilyk-handbook__text strong { color: #1e293b; }
.ilyk-handbook__text a { color: var(--ilyk-clr-primary); }

/* FILE */
.ilyk-handbook__file-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    max-width: 560px;
}
.ilyk-handbook__file-card + .ilyk-handbook__file-card { margin-top: 10px; }
.ilyk-handbook__file-card:hover {
    border-color: var(--ilyk-clr-primary);
    box-shadow: 0 4px 16px rgba(var(--ilyk-clr-primary-rgb), 0.10);
    transform: translateY(-1px);
}
.ilyk-handbook__file-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(var(--ilyk-clr-primary-rgb), 0.07);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--ilyk-clr-primary);
}
.ilyk-handbook__file-body {
    flex: 1;
    min-width: 0;
}
.ilyk-handbook__file-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ilyk-handbook__file-desc {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 3px;
}
.ilyk-handbook__file-action {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #94a3b8;
    transition: all 0.2s;
}
.ilyk-handbook__file-card:hover .ilyk-handbook__file-action {
    background: var(--ilyk-clr-primary);
    color: #fff;
}

/* VIDEO */
.ilyk-handbook__video { max-width: 680px; }
.ilyk-handbook__video-thumb {
    position: relative;
    display: block;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #1e293b;
    text-decoration: none;
}
.ilyk-handbook__video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, opacity 0.3s;
}
.ilyk-handbook__video-thumb:hover img {
    transform: scale(1.03);
    opacity: 0.85;
}
.ilyk-handbook__video-thumb--placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: rgba(255,255,255,0.3);
}
.ilyk-handbook__video-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ilyk-handbook__video-play i {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--ilyk-clr-primary);
    box-shadow: 0 4px 24px rgba(0,0,0,0.25);
    transition: transform 0.2s, box-shadow 0.2s;
    padding-left: 4px; /* оптична корекція play */
}
.ilyk-handbook__video-thumb:hover .ilyk-handbook__video-play i {
    transform: scale(1.1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.ilyk-handbook__video-desc {
    font-size: 13px;
    color: #64748b;
    margin: 12px 0 0;
    line-height: 1.55;
}

/* ACCORDION */
.ilyk-handbook__accordion { max-width: 720px; }
.ilyk-handbook__accordion-item {
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    overflow: hidden;
    margin-bottom: 8px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.ilyk-handbook__accordion-item:has(.show) {
    border-color: rgba(var(--ilyk-clr-primary-rgb), 0.3) !important;
    box-shadow: 0 2px 12px rgba(var(--ilyk-clr-primary-rgb), 0.07);
}
.ilyk-handbook__accordion .accordion-button {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    background: #fff !important;
    padding: 16px 20px !important;
    box-shadow: none !important;
}
.ilyk-handbook__accordion .accordion-button:not(.collapsed) {
    color: var(--ilyk-clr-primary) !important;
    background: rgba(var(--ilyk-clr-primary-rgb), 0.04) !important;
}
.ilyk-handbook__accordion .accordion-button::after {
    background-image: none !important;
    content: '\f078';
    font-family: 'Font Awesome 6 Pro', 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 11px;
    color: #94a3b8;
    transition: transform 0.25s;
}
.ilyk-handbook__accordion .accordion-button:not(.collapsed)::after {
    transform: rotate(-180deg);
    color: var(--ilyk-clr-primary);
}
.ilyk-handbook__accordion .accordion-body {
    font-size: 14px;
    line-height: 1.7;
    color: #475569;
    padding: 4px 20px 18px !important;
}
.ilyk-handbook__accordion .accordion-body p { margin: 0 0 10px; }
.ilyk-handbook__accordion .accordion-body p:last-child { margin-bottom: 0; }

/* CONTACTS */
.ilyk-handbook__contacts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.ilyk-handbook__contact-card {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: #fff;
    border: 1.5px solid #f1f5f9;
    border-radius: 16px;
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
    align-items: flex-start;
}
.ilyk-handbook__contact-card:hover {
    box-shadow: 0 6px 28px rgba(15, 23, 42, 0.09);
    border-color: #e2e8f0;
    transform: translateY(-2px);
}
.ilyk-handbook__contact-avatar {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #f1f5f9;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}
.ilyk-handbook__contact-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ilyk-handbook__contact-avatar--placeholder {
    width: 100%;
    height: 100%;
    background: rgba(var(--ilyk-clr-primary-rgb), 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: var(--ilyk-clr-primary);
    opacity: 0.6;
}
.ilyk-handbook__contact-body { flex: 1; min-width: 0; }
.ilyk-handbook__contact-name {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px;
}
.ilyk-handbook__contact-role {
    font-size: 13px;
    font-weight: 600;
    color: var(--ilyk-clr-primary);
    margin: 0 0 4px;
}
.ilyk-handbook__contact-note {
    font-size: 13px;
    color: #94a3b8;
    margin: 0 0 14px;
    line-height: 1.45;
}
.ilyk-handbook__contact-links {
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.ilyk-handbook__contact-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #475569;
    text-decoration: none;
    transition: color 0.18s;
}
.ilyk-handbook__contact-link i { font-size: 12px; color: #94a3b8; transition: color 0.18s; }
.ilyk-handbook__contact-link:hover { color: var(--ilyk-clr-primary); }
.ilyk-handbook__contact-link:hover i { color: var(--ilyk-clr-primary); }

/* ── Мобільна кнопка навігації ─────────────────────── */
.ilyk-handbook__mobile-nav-btn {
    display: none;
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 150;
    padding: 12px 20px;
    background: var(--ilyk-clr-primary);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(var(--ilyk-clr-primary-rgb), 0.35);
    display: none;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.ilyk-handbook__mobile-nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(var(--ilyk-clr-primary-rgb), 0.4);
}

/* ── Адаптив ───────────────────────────────────────── */
@media (max-width: 900px) {
    .ilyk-handbook__layout-inner {
        grid-template-columns: 1fr;
        padding: 0 24px;
    }

    /* Навігація — оверлей що з'являється знизу */
    .ilyk-handbook__nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 149;
        background: #fff;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.15);
        padding: 20px 24px 32px;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        max-height: 70vh;
        overflow-y: auto;
    }
    .ilyk-handbook__nav.is-open {
        transform: translateY(0);
    }
    .ilyk-handbook__nav-sticky {
        position: static;
    }

    .ilyk-handbook__mobile-nav-btn {
        display: flex;
    }

    .ilyk-handbook__layout {
        padding: 32px 0 80px;
    }
    .ilyk-handbook__section {
        scroll-margin-top: calc(var(--ilyk-header-h) + 16px);
    }
}

@media (max-width: 580px) {
    .ilyk-handbook__hero { padding: 36px 0 32px; }
    .ilyk-handbook__hero-inner { padding: 0 20px; }
    .ilyk-handbook__layout-inner { padding: 0 20px; }
    .ilyk-handbook__contacts { grid-template-columns: 1fr; }
    .ilyk-handbook-password__inner { padding: 32px 24px; }
    .ilyk-handbook-demo-notice { padding: 10px 20px; }
}
