/* =========================================================================
   Application guide — interactive portal simulation
   ========================================================================= */

.guide-hero.page-hero {
    padding-top: calc(var(--header-h) + 36px);
    padding-bottom: 22px;
}
.guide-hero .page-hero__title {
    font-size: clamp(1.7rem, 3.2vw, 2.35rem);
    margin: 6px 0 8px;
}
.guide-hero .page-hero__lead {
    font-size: 0.98rem;
    max-width: 54ch;
    margin: 0;
}
.guide-hero__inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
    flex-wrap: wrap;
}
.guide-hero__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.guide-section.section {
    padding-top: clamp(18px, 3vw, 28px);
    padding-bottom: clamp(40px, 6vw, 72px);
}

.guide-sim {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.guide-steps {
    position: sticky;
    top: calc(var(--header-h) + 16px);
    padding: 14px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}
.guide-steps__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.guide-steps__btn {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    text-align: left;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.guide-steps__btn:hover { background: rgba(18, 24, 38, 0.04); color: var(--text); }
.guide-steps__btn.is-active {
    background: rgba(227, 6, 19, 0.08);
    color: #c53a42;
}
.guide-steps__num {
    flex: none;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--surface-2);
    font-size: 0.72rem;
    font-weight: 800;
}
.guide-steps__btn.is-active .guide-steps__num {
    background: rgba(227, 6, 19, 0.14);
    color: #c53a42;
}
.guide-steps__label {
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1.35;
    padding-top: 3px;
}

.guide-stage {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.guide-panel[hidden] { display: none !important; }
.guide-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 20px;
    padding: 20px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}
.guide-panel__kicker {
    display: inline-block;
    margin-bottom: 8px;
    color: #c53a42;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.guide-panel__title {
    font-size: clamp(1.25rem, 2.2vw, 1.55rem);
    margin-bottom: 10px;
}
.guide-panel__text {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 14px;
}
.guide-panel__tips {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.guide-panel__tips li {
    position: relative;
    padding: 10px 12px 10px 28px;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    font-size: 0.88rem;
    line-height: 1.4;
}
.guide-panel__tips li::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 15px;
    width: 7px;
    height: 7px;
    border-radius: 2px;
    background: var(--red);
}

.guide-device {
    margin: 0;
    min-width: 0;
}
.guide-device__chrome {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 14px 14px 0 0;
    background: #eef1f6;
    border: 1px solid var(--border);
    border-bottom: 0;
}
.guide-device__chrome span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #d1d5db;
}
.guide-device__chrome span:nth-child(1) { background: #f87171; }
.guide-device__chrome span:nth-child(2) { background: #fbbf24; }
.guide-device__chrome span:nth-child(3) { background: #34d399; }
.guide-device__chrome em {
    margin-left: 8px;
    font-style: normal;
    font-size: 0.75rem;
    color: var(--text-dim);
    font-weight: 600;
}
.guide-device__screen {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 0 0 14px 14px;
    overflow: hidden;
    background: #f8fafc;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
    cursor: zoom-in;
}
.guide-device__screen img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.35s ease;
}
.guide-device__screen:hover img { transform: scale(1.02); }
.guide-device__zoom-hint {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 11px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}
.guide-device__zoom-hint svg { width: 14px; height: 14px; }
.guide-device__screen:hover .guide-device__zoom-hint,
.guide-device__screen:focus-visible .guide-device__zoom-hint {
    opacity: 1;
    transform: translateY(0);
}
.guide-device__cap {
    margin-top: 8px;
    color: var(--text-dim);
    font-size: 0.78rem;
    text-align: center;
}

/* Lightbox */
.guide-lightbox[hidden] { display: none !important; }
.guide-lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 24px;
}
.guide-lightbox__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    background: rgba(12, 17, 30, 0.78);
    backdrop-filter: blur(4px);
    cursor: zoom-out;
}
.guide-lightbox__dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 1100px);
    max-height: calc(100vh - 48px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.guide-lightbox__img {
    width: 100%;
    height: auto;
    max-height: calc(100vh - 48px);
    object-fit: contain;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.55);
}
.guide-lightbox__close {
    position: absolute;
    top: -10px;
    right: -10px;
    z-index: 2;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--text);
    box-shadow: var(--shadow-md);
    cursor: pointer;
}
.guide-lightbox__close svg { width: 18px; height: 18px; }
.guide-lightbox__close:hover { color: var(--red); }
body.guide-lightbox-open { overflow: hidden; }

@media (max-width: 720px) {
    .guide-device__zoom-hint { opacity: 1; transform: none; }
    .guide-lightbox__close { top: 8px; right: 8px; }
}

.guide-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.guide-nav__dots {
    display: flex;
    gap: 8px;
}
.guide-nav__dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 50%;
    background: rgba(18, 24, 38, 0.16);
    cursor: pointer;
    padding: 0;
}
.guide-nav__dot.is-active { background: #c53a42; }

.guide-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 28px;
    padding: 22px 24px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(227, 6, 19, 0.08), rgba(227, 6, 19, 0.02));
    border: 1px solid rgba(227, 6, 19, 0.14);
}
.guide-cta h2 {
    font-size: 1.3rem;
    margin-bottom: 4px;
}
.guide-cta p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.94rem;
}
.guide-cta__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 1024px) {
    .guide-sim { grid-template-columns: 1fr; }
    .guide-steps { position: static; }
    .guide-steps__list {
        flex-direction: row;
        overflow-x: auto;
        gap: 8px;
    }
    .guide-steps__btn { min-width: 180px; }
    .guide-panel { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .guide-hero__actions,
    .guide-cta__actions { width: 100%; }
    .guide-hero__actions .btn,
    .guide-cta__actions .btn,
    .guide-nav .btn { flex: 1; justify-content: center; }
}
