/* Публичный сайт поверх glass-cabinet.css: та же оболочка, что у админки и CRM.
   Токены, карточки, кнопки и чипы живут в glass-cabinet.css. Здесь только
   верхняя навигация, подвал и ритм маркетинговых страниц. */

.pub-nav {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--glass-panel-grad);
    border-bottom: 1px solid var(--glass-panel-border);
    box-shadow: var(--glass-panel-shadow);
    -webkit-backdrop-filter: blur(22px) saturate(1.15);
    backdrop-filter: blur(22px) saturate(1.15);
    padding: 10px 0;
}
.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    min-width: 0;
}
.brand-lockup .brand-badge {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: var(--sa-radius-md);
    background: var(--sa-card-bg);
    border: 1px solid var(--glass-card-border);
    box-shadow: var(--sa-shadow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.brand-lockup .brand-badge img { width: 100%; height: 100%; object-fit: cover; }
.brand-lockup .brand-word { font-weight: 800; color: var(--sa-primary-dark); font-size: 1.15rem; line-height: 1; }
.pub-nav-links { gap: 2px; }
.pub-nav .nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 8px 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--sa-text-body);
    font-size: .95rem;
    font-weight: 500;
    text-decoration: none;
    box-shadow: none;
}
.pub-nav .nav-link:hover {
    background: transparent;
    color: var(--sa-primary-dark);
}
.pub-nav .nav-link.active {
    background: transparent;
    border: 0;
    color: var(--sa-primary-dark);
    font-weight: 600;
    box-shadow: none;
}
.pub-nav .nav-link.active::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 2px;
    height: 2px;
    background: var(--sa-primary);
    border-radius: 2px;
}
@media (max-width: 991.98px) {
    .pub-nav .nav-link.active::after { display: none; }
}
.pub-nav .btn-sa,
.pub-nav .btn-sa-outline {
    box-sizing: border-box;
    min-height: 44px;
    padding-top: 0;
    padding-bottom: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.pub-nav .navbar-toggler { border: 0; }
@media (max-width: 991.98px) {
    .pub-nav .navbar-collapse { margin-top: 10px; }
    .pub-nav-actions { margin-top: 10px; }
}

.btn-sa-outline {
    background: var(--glass-inset-fill);
    border: 1px solid var(--field-border);
    color: var(--sa-primary-dark);
    border-radius: var(--sa-radius-md);
    padding: 8px 18px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-sa-outline:hover,
.btn-sa-outline:focus {
    background: var(--sage-cta);
    border-color: transparent;
    color: #fff;
}

.pub-footer {
    margin-top: 28px;
    padding: 28px 0 20px;
    background: var(--glass-panel-grad);
    border-top: 1px solid var(--glass-panel-border);
    color: var(--sa-text-body);
    -webkit-backdrop-filter: blur(22px) saturate(1.15);
    backdrop-filter: blur(22px) saturate(1.15);
}
.pub-footer h6 { color: var(--sa-text-strong); font-weight: 700; font-size: .84rem; }
.pub-footer a { color: var(--sa-text-muted); text-decoration: none; }
.pub-footer a:hover { color: var(--sa-primary-dark); }
.pub-footer .footer-lead { color: var(--sa-text-muted); font-size: .85rem; max-width: 36ch; }
.pub-footer .footer-docs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1.5rem;
    align-items: start;
}
.pub-footer .footer-docs a { line-height: 1.35; }
.pub-footer hr { border-color: var(--glass-inset-border); opacity: 1; }

.pub-page { padding: 20px 0 4px; }
.home-stats { padding-top: 4.5rem; padding-bottom: 1.5rem; }

/* Фотосекция: снимок на всю ширину, стеклянные блоки поверх. */
.photo-stage {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    min-height: 560px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.photo-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(100deg, rgba(24, 32, 22, .62) 0%, rgba(24, 32, 22, .34) 46%, rgba(24, 32, 22, .18) 100%);
}
.photo-stage--soft::before {
    background:
        linear-gradient(180deg, rgba(244, 245, 236, .2) 0%, rgba(35, 42, 27, .38) 100%);
}
.photo-stage > .container { position: relative; z-index: 1; width: 100%; }
.photo-stage--short { min-height: calc(380px + 28px); }
main:has(.photo-stage--short) + .pub-footer { margin-top: 0; }
.photo-tile {
    position: relative;
    display: block;
    height: 168px;
    min-height: 168px;
    border-radius: var(--sa-radius-xl);
    overflow: hidden;
    background-size: cover;
    background-position: center;
    box-shadow: var(--glass-card-shadow);
    text-decoration: none;
}
.photo-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(24, 32, 22, .55) 100%);
}
.photo-tile span {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 1;
    padding: 8px 12px;
    border-radius: var(--sa-radius-md);
    background: var(--glass-card-grad);
    border: 1px solid var(--glass-card-border);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: var(--sa-text-strong);
    font-weight: 700;
    font-size: .9rem;
}
.photo-tile:hover span { color: var(--sa-primary-dark); }
@media (max-width: 991.98px) {
    .photo-stage { min-height: 0; padding: 28px 0; }
    .photo-stage--short { padding-bottom: calc(28px + 28px); }
    .photo-tile { height: 140px; }
}
.pub-title {
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    font-weight: 800;
    color: var(--sa-text-strong);
    line-height: 1.2;
    letter-spacing: -.02em;
    margin: 0 0 8px;
}
.pub-sub { color: var(--sa-text-muted); font-size: .95rem; margin: 0 0 16px; max-width: 62ch; }
.section-title { font-size: 1.25rem; font-weight: 800; color: var(--sa-text-strong); }
.section-subtitle { color: var(--sa-text-muted); font-size: .9rem; }
.step-num { width: 56px; height: 56px; background: color-mix(in srgb, var(--sa-primary) 18%, transparent); }
.step-num i { color: var(--sa-primary-dark) !important; }

.pub-cta { margin: 8px 0 4px; }

/* Якоря на «Возможностях» — те же пилюли, что пункты меню админки */
.feature-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--sa-radius-md);
    border: 1px solid var(--sa-primary-light);
    background: var(--glass-inset-soft-fill);
    color: var(--sa-text-muted);
    font-size: .84rem;
    font-weight: 600;
    text-decoration: none;
    min-height: 40px;
}
.feature-tab:hover { color: var(--sa-primary-dark); background: var(--glass-inset-fill); }
.feature-anchors {
    position: sticky;
    top: 66px;
    z-index: 20;
    padding: 10px 0;
    background: color-mix(in srgb, var(--sa-body-bg) 78%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

/* Переключатель периода на тарифах — сегмент как в кабинете */
.billing-switch {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: var(--glass-inset-soft-fill);
    border: 1px solid var(--glass-inset-border);
    border-radius: var(--sa-radius-full);
}
.billing-switch button {
    background: transparent;
    border: 0;
    color: var(--sa-text-muted);
    padding: 8px 16px;
    border-radius: var(--sa-radius-full);
    font-weight: 600;
    cursor: pointer;
    min-height: 40px;
}
.billing-switch button.active {
    background: var(--selection-grad);
    color: #fff;
    box-shadow: var(--selection-shadow);
}
.save-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: var(--sa-radius-full);
    background: color-mix(in srgb, var(--sa-success) 16%, transparent);
    color: var(--money);
    font-size: .72rem;
    font-weight: 700;
}
.billing-switch button.active .save-badge { background: rgba(255,255,255,.22); color: #fff; }
.yearly-hint[hidden], .monthly-hint[hidden] { display: none !important; }

.plan-card { height: 100%; display: flex; flex-direction: column; }
.plan-card.popular { outline: 2px solid var(--sa-primary); outline-offset: 0; }
.plan-card .price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--sa-text-strong);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.plan-card .price-period { color: var(--sa-text-muted); font-weight: 500; }
.plan-card .cta { margin-top: auto; }
.plan-popular-tag {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--selection-grad);
    color: #fff;
    padding: 3px 12px;
    border-radius: var(--sa-radius-full);
    font-weight: 700;
    font-size: .72rem;
    box-shadow: var(--selection-shadow);
}
.compare-table { font-size: .9rem; }
.compare-table th, .compare-table td { vertical-align: middle; padding: .75rem 1rem; }
.compare-table thead th { text-align: center; }
.compare-table thead th:first-child,
.compare-table tbody td:first-child { text-align: left; }
.compare-table tbody td { text-align: center; }
.compare-yes { color: var(--sa-success); font-size: 1.15rem; }
.compare-no { color: var(--sa-text-faint); font-size: 1.15rem; }
.accordion-item-sa {
    border: 1px solid var(--glass-card-border);
    border-radius: var(--sa-radius-lg) !important;
    margin-bottom: .5rem;
    background: var(--glass-card-grad);
    overflow: hidden;
}
.accordion-item-sa .accordion-button {
    background: transparent;
    color: var(--sa-text-strong);
    font-weight: 600;
    box-shadow: none;
}
.accordion-item-sa .accordion-button:not(.collapsed) {
    background: color-mix(in srgb, var(--sa-primary) 14%, transparent);
    color: var(--sa-text-strong);
}
.accordion-item-sa .accordion-body { color: var(--sa-text-muted); }

.feature-icon { width: 46px; height: 46px; background: color-mix(in srgb, var(--sa-primary) 18%, transparent) !important; color: var(--sa-primary-dark); }
.feature-icon i { color: var(--sa-primary-dark) !important; }
.rating-stars { color: var(--star); display: inline-flex; gap: 2px; }
.contact-link, .about-link { color: var(--sa-primary-dark); font-weight: 600; text-decoration: none; }
.contact-link:hover, .about-link:hover { color: var(--sa-primary); }
.contact-card-icon, .value-icon {
    width: 46px;
    height: 46px;
    background: color-mix(in srgb, var(--sa-primary) 18%, transparent);
    color: var(--sa-primary-dark);
}
.social-circle {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--sa-radius-md);
    background: var(--glass-inset-fill);
    border: 1px solid var(--glass-inset-border);
    color: var(--sa-text-muted);
    text-decoration: none;
}
.social-circle:hover { color: var(--sa-primary-dark); background: var(--sa-primary-bg); }
