/* Публичные страницы разделов: услуги, домены, VPS, аутсорс.
   Переменные подхватываются из основной темы; здесь только то,
   чего не было в style.css. */

:root {
    --pg-bg: #f1f5f9;
    --pg-surface: #ffffff;
    --pg-border: #e2e8f0;
    --pg-text: #0f172a;
    --pg-muted: #475569;
    --pg-accent: #3b82f6;
    --pg-accent-soft: #eff6ff;
}

body:has(.pg) {
    background-color: var(--pg-bg) !important;
}

[data-theme="dark"] {
    --pg-bg: #0f172a;
    --pg-surface: #1e293b;
    --pg-border: #334155;
    --pg-text: #e2e8f0;
    --pg-muted: #94a3b8;
    --pg-accent: #60a5fa;
    --pg-accent-soft: #1e3a5f;
}

.pg {
    max-width: 1040px;
    margin: 40px auto 80px;
    padding: 48px;
    background: var(--pg-surface);
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.03), 0 1px 3px rgba(0,0,0,0.05);
    color: var(--pg-text);
    border: 1px solid var(--pg-border);
}

@media (max-width: 768px) {
    .pg {
        margin: 20px auto 40px;
        padding: 24px 20px;
        border-radius: 16px;
    }
}

.pg-hero {
    padding: 16px 0 40px;
    border-bottom: 1px solid var(--pg-border);
    margin-bottom: 48px;
}

.pg-hero h1 {
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    line-height: 1.15;
    margin: 0 0 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.pg-hero p {
    font-size: 1.1rem;
    color: var(--pg-muted);
    margin: 0;
    max-width: 720px;
    line-height: 1.6;
}

.pg-section {
    margin-bottom: 56px;
}

.pg-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.pg-section-lead {
    color: var(--pg-muted);
    margin: 0 0 24px;
    max-width: 720px;
}

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

.pg-card {
    background: var(--pg-surface);
    border: 1px solid var(--pg-border);
    border-radius: 14px;
    padding: 24px;
    transition: border-color .2s, transform .2s, box-shadow .2s;
    display: block;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

a.pg-card:hover {
    border-color: var(--pg-accent);
    transform: translateY(-2px);
}

.pg-card h3 {
    margin: 0 0 10px;
    font-size: 1.1rem;
    font-weight: 700;
}

.pg-card p {
    margin: 0;
    color: var(--pg-muted);
    line-height: 1.6;
    font-size: .95rem;
}

.pg-card-link {
    display: inline-block;
    margin-top: 14px;
    color: var(--pg-accent);
    font-weight: 600;
    font-size: .92rem;
}

.pg-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.pg-list li {
    position: relative;
    padding-left: 28px;
    line-height: 1.6;
    color: var(--pg-text);
}

.pg-list li::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 9px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--pg-accent);
}

.pg-note {
    color: var(--pg-muted);
    font-size: .9rem;
    margin-top: 12px;
}

.pg-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--pg-border);
    border-radius: 12px;
    overflow: hidden;
}

.pg-table th,
.pg-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--pg-border);
}

.pg-table th {
    background: var(--pg-surface);
    font-weight: 600;
    font-size: .9rem;
    color: var(--pg-muted);
}

.pg-table tr:last-child td {
    border-bottom: none;
}

.pg-price {
    font-weight: 700;
    white-space: nowrap;
}

.pg-cta {
    background: var(--pg-accent-soft);
    border: 1px solid var(--pg-border);
    border-radius: 16px;
    padding: 36px;
    text-align: center;
}

.pg-cta h2 {
    margin: 0 0 10px;
    font-size: 1.4rem;
}

.pg-cta p {
    margin: 0 0 20px;
    color: var(--pg-muted);
}

.pg-btn {
    display: inline-block;
    background: var(--pg-accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 26px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
}

.pg-btn:hover { opacity: .92; }

.pg-btn-ghost {
    background: transparent;
    color: var(--pg-accent);
    border: 1px solid var(--pg-accent);
}

.pg-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.pg-tag {
    background: var(--pg-surface);
    border: 1px solid var(--pg-border);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: .88rem;
    color: var(--pg-muted);
    text-decoration: none;
}

.pg-tag:hover { border-color: var(--pg-accent); color: var(--pg-accent); }

.pg-audience {
    background: var(--pg-surface);
    border-left: 3px solid var(--pg-accent);
    border-radius: 0 10px 10px 0;
    padding: 16px 20px;
    color: var(--pg-muted);
    line-height: 1.6;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* --- содержимое двух карточек в зелёном блоке ---
   Раньше в них был только заголовок, а ниже пустота на 120px. */
.nix-inner-card {
    text-decoration: none;
    flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease;
}

.nix-inner-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .16);
}

.nix-inner-list {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    width: 100%;
}

.nix-inner-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 7px;
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--inner-card-text);
    opacity: .72;
}

.nix-inner-list li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 8px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green-bg);
    opacity: .9;
}

.nix-inner-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 14px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--inner-card-text);
    opacity: .55;
    transition: opacity .18s ease, gap .18s ease;
}

.nix-inner-card:hover .nix-inner-more {
    opacity: 1;
    gap: 10px;
}

@media (max-width: 700px) {
    .nix-green-inner-cards { flex-direction: column; }
    .nix-inner-list li { font-size: 0.86rem; }
}

/* --- контентные блоки на главной ---
   Секция «вылезает» на зелёную карточку скруглением, как было у заглушки. */
.nix-content {
    background: var(--bg-color);
    border-radius: 30px 30px 0 0;
    margin-top: -30px;
    position: relative;
    z-index: 5;
}

.pg-home {
    padding-top: 64px;
    padding-bottom: 72px;
}

.pg-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 14px;
    border-radius: 11px;
    background: var(--pg-accent-soft);
    color: var(--pg-accent);
}

/* Две колонки: пакет и аргументы рядом */
.pg-cols {
    display: grid;
    gap: 40px;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    margin-bottom: 56px;
}

.pg-cols h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 8px;
}

/* Список в одну колонку — внутри узкой колонки сетка не нужна */
.pg-list-1 { grid-template-columns: 1fr; }

.pg-cta .pg-btn + .pg-btn { margin-left: 10px; }

@media (max-width: 640px) {
    .pg-home { padding-top: 40px; padding-bottom: 48px; }
    .pg-cols { gap: 32px; margin-bottom: 40px; }
    .pg-cta .pg-btn + .pg-btn { margin-left: 0; margin-top: 10px; }
    .pg-cta .pg-btn { display: block; }
}

/* Переключатель языка в шапке */
.lang-picker { display: inline-flex; gap: 2px; margin: 0 8px; }

.lang-picker a {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--pg-muted);
    text-decoration: none;
}

.lang-picker a.is-active {
    background: var(--pg-accent-soft);
    color: var(--pg-accent);
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    padding: 4px;
    display: inline-flex;
    align-items: center;
}

@media (max-width: 640px) {
    .pg-hero { padding: 40px 0 28px; margin-bottom: 32px; }
    .pg-cta { padding: 26px 20px; }
    .pg-list { grid-template-columns: 1fr; }
}
