/*
Theme Name: dds_netfocussweden.com
Author: Алексей Ларин
Description: Информационно-аналитическая тема о цифровом маркетинге и веб-технологиях.
Version: 1.1
Text Domain: nfs
*/

/* ============================================================
   Базовые переменные и сброс
   ============================================================ */
:root {
    --ink: #16202e;
    --ink-soft: #475467;
    --bg: #f5f7fa;
    --surface: #ffffff;
    --line: #e1e6ee;
    --brand: #1f6feb;
    --brand-dark: #14305c;
    --brand-soft: #e8f0fe;
    --accent: #14b8a6;
    --footer-bg: #101826;
    --footer-ink: #c3ccda;
    --footer-head: #ffffff;
    --radius: 12px;
    --shell: min(92%, 1180px);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--brand);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1, h2, h3, h4 {
    line-height: 1.25;
    color: var(--ink);
    margin: 0 0 0.5em;
}

p {
    margin: 0 0 1em;
}

.shell {
    width: var(--shell);
    margin-inline: auto;
}

/* ============================================================
   Шапка
   ============================================================ */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
    flex-wrap: wrap;
}

.branding {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.brand-logo,
.branding svg.logo-fallback {
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    display: block;
}

.branding-text {
    min-width: 0;
}

.site-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    color: var(--ink);
    line-height: 1.3;
}

.site-title a {
    color: inherit;
}

.site-desc {
    margin: 4px 0 0;
    font-size: 0.82rem;
    color: var(--ink-soft);
    max-width: 520px;
}

/* Навигация */
.main-nav {
    position: relative;
}

.nav-toggle {
    display: none;
    background: var(--brand-soft);
    border: 1px solid var(--line);
    color: var(--brand-dark);
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.main-nav a {
    display: block;
    padding: 8px 14px;
    border-radius: 8px;
    color: var(--ink);
    font-weight: 500;
    font-size: 0.95rem;
}

.main-nav a:hover {
    background: var(--brand-soft);
    color: var(--brand-dark);
    text-decoration: none;
}

.main-nav .current-menu-item > a {
    background: var(--brand);
    color: #fff;
}

/* ============================================================
   Раскладка
   ============================================================ */
.site-main {
    padding: 32px 0 48px;
}

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 36px;
    align-items: start;
}

.layout-single {
    display: block;
}

.layout-single .content-area {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

.content-area {
    min-width: 0;
}

/* ============================================================
   Хлебные крошки
   ============================================================ */
.breadcrumbs {
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin: 0 0 22px;
}

.breadcrumbs a {
    color: var(--brand);
}

.breadcrumbs .sep {
    margin: 0 6px;
    color: #aab3c2;
}

/* ============================================================
   Карточки записей
   ============================================================ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
    box-shadow: 0 12px 28px rgba(20, 48, 92, 0.1);
    transform: translateY(-2px);
}

.card-thumb {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--brand-soft);
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: block;
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 22px 22px;
}

.card-title {
    font-size: 1.15rem;
    margin: 0 0 8px;
}

.card-title a {
    color: var(--ink);
}

.card-title a:hover {
    color: var(--brand);
    text-decoration: none;
}

.card-meta {
    font-size: 0.8rem;
    color: var(--ink-soft);
    margin-bottom: 10px;
}

.card-excerpt {
    color: var(--ink-soft);
    font-size: 0.94rem;
    margin-bottom: 16px;
}

.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}

.card-more {
    margin-top: auto;
    align-self: flex-start;
    background: var(--brand);
    color: #fff;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.card-more:hover {
    background: var(--brand-dark);
    text-decoration: none;
    color: #fff;
}

/* ============================================================
   Одиночная запись / страница
   ============================================================ */
.entry {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 32px;
}

.entry-title {
    font-size: 1.9rem;
    margin-bottom: 12px;
}

.entry-meta {
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin-bottom: 20px;
}

.entry-thumb {
    margin: 0 0 24px;
    border-radius: var(--radius);
    overflow: hidden;
}

.entry-thumb img {
    width: 100%;
    display: block;
}

.entry-content {
    font-size: 1.02rem;
}

.entry-content img {
    border-radius: 8px;
    height: auto;
}

.entry-content h2,
.entry-content h3 {
    margin-top: 1.4em;
}

.entry-content ul,
.entry-content ol {
    padding-left: 1.4em;
}

.entry-content blockquote {
    border-left: 4px solid var(--brand);
    margin: 1.2em 0;
    padding: 4px 18px;
    background: var(--brand-soft);
    border-radius: 0 8px 8px 0;
    color: var(--brand-dark);
}

table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.2em 0;
}

table, th, td {
    border: 1px solid var(--line);
}

th, td {
    padding: 10px 12px;
    text-align: left;
}

th {
    background: var(--brand-soft);
}

/* ============================================================
   Сайдбар и виджеты
   ============================================================ */
.sidebar {
    min-width: 0;
}

.sidebar .widget {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-bottom: 24px;
    color: var(--ink);
}

.sidebar .widget-title {
    font-size: 1.05rem;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--brand-soft);
    color: var(--ink);
}

.sidebar .widget a {
    color: var(--brand);
}

.sidebar .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar .widget li {
    padding: 7px 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 0.93rem;
}

.sidebar .widget li:last-child {
    border-bottom: none;
}

.sidebar .widget .post-date {
    color: var(--ink-soft);
}

/* ============================================================
   Главная
   ============================================================ */
.home-block {
    margin-bottom: 56px;
}

.block-head {
    margin-bottom: 26px;
}

.block-kicker {
    display: inline-block;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand);
    font-weight: 700;
    margin-bottom: 8px;
}

.block-title {
    font-size: 1.7rem;
    margin: 0;
}

/* Блок: текст + иллюстрация */
.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
}

.split.reverse .split-media {
    order: -1;
}

.split-text h2 {
    font-size: 1.7rem;
}

.split-media img {
    width: 100%;
    display: block;
    border-radius: var(--radius);
}

/* Блок: сетка фич */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 24px;
    min-width: 0;
}

.feature-icon {
    width: 46px;
    height: 46px;
    display: block;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.15rem;
}

.feature-card p {
    color: var(--ink-soft);
    font-size: 0.94rem;
    margin: 0;
}

/* Блок: шаги */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    counter-reset: step;
}

.step {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 22px 22px;
    min-width: 0;
}

.step::before {
    counter-increment: step;
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    margin-bottom: 14px;
}

.step h3 {
    font-size: 1.08rem;
}

.step p {
    color: var(--ink-soft);
    font-size: 0.93rem;
    margin: 0;
}

/* Блок: FAQ */
.faq {
    display: block;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 14px;
    padding: 0 22px;
}

.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    padding: 18px 0;
    list-style: none;
    color: var(--ink);
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    color: var(--brand);
    font-size: 1.4rem;
    line-height: 1;
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item .faq-body {
    padding: 0 0 18px;
    color: var(--ink-soft);
}

.faq-item .faq-body p {
    margin: 0;
}

/* Блок последних записей на главной */
.home-latest .cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ============================================================
   Список записей (архивы, индекс)
   ============================================================ */
.list-head {
    margin-bottom: 24px;
}

.list-head h1 {
    font-size: 1.7rem;
    margin: 0;
}

/* ============================================================
   Пагинация
   ============================================================ */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 36px;
    justify-content: center;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    font-weight: 600;
    font-size: 0.92rem;
}

.pagination a.page-numbers:hover {
    background: var(--brand-soft);
    border-color: var(--brand);
    text-decoration: none;
}

.pagination .page-numbers.current {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.pagination .page-numbers.dots {
    border: none;
    background: none;
}

/* ============================================================
   Комментарии
   ============================================================ */
.comments-area {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 32px;
    margin-top: 28px;
}

.comments-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-list .children {
    list-style: none;
    margin: 0;
    padding-left: 28px;
}

.comment-item {
    margin-bottom: 18px;
}

.comment-inner {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 16px 18px;
}

.comment-meta {
    display: flex;
    gap: 14px;
    align-items: baseline;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.comment-author {
    font-weight: 700;
}

.comment-date {
    color: var(--ink-soft);
}

.comment-reply a {
    font-size: 0.85rem;
    font-weight: 600;
}

.comment-form label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
    margin-bottom: 16px;
    background: #fff;
}

.comment-form .submit,
.search-submit,
.button {
    background: var(--brand);
    color: #fff;
    border: none;
    padding: 11px 22px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
}

.comment-form .submit:hover,
.button:hover {
    background: var(--brand-dark);
}

/* ============================================================
   Форма поиска
   ============================================================ */
.search-form {
    display: flex;
    gap: 8px;
}

.search-form .search-field {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
    background: #fff;
}

.search-submit {
    cursor: pointer;
}

.search-submit:hover {
    background: var(--brand-dark);
}

/* ============================================================
   404
   ============================================================ */
.error-404 {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 44px 32px;
    text-align: center;
}

.error-404 .big {
    font-size: 4rem;
    font-weight: 800;
    color: var(--brand);
    margin: 0;
    line-height: 1;
}

.error-404 .search-form {
    max-width: 420px;
    margin: 24px auto 0;
}

/* ============================================================
   Контакты (статичные)
   ============================================================ */
.contact-links {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
}

.contact-links li {
    margin-bottom: 8px;
}

/* ============================================================
   Подвал
   ============================================================ */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-ink);
    padding: 48px 0 0;
}

.footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 36px;
    padding-bottom: 36px;
}

.footer-col {
    min-width: 0;
}

.site-footer .widget {
    color: var(--footer-ink);
}

.site-footer .widget-title {
    color: var(--footer-head);
    font-size: 1.05rem;
    margin: 0 0 14px;
}

.site-footer .widget p {
    color: var(--footer-ink);
    font-size: 0.92rem;
}

.site-footer .widget a {
    color: #9ec1ff;
}

.site-footer .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer .widget li {
    padding: 6px 0;
}

.site-footer .widget li a {
    color: var(--footer-ink);
}

.site-footer .widget li a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px 0;
    font-size: 0.85rem;
    color: #8a96a8;
    text-align: center;
}

/* ============================================================
   Cookie-баннер
   ============================================================ */
.cookie-banner[hidden] {
    display: none !important;
}

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: var(--brand-dark);
    color: #eef3fb;
    padding: 16px 0;
}

.cookie-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-banner p {
    margin: 0;
    font-size: 0.9rem;
    flex: 1;
    min-width: 220px;
}

.cookie-banner a {
    color: #9ec1ff;
}

.cookie-accept {
    background: var(--accent);
    color: #04332e;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.92rem;
}

.cookie-accept:hover {
    background: #0fd4bf;
}

/* ============================================================
   Адаптив
   ============================================================ */
@media (max-width: 960px) {
    .layout-with-sidebar {
        grid-template-columns: minmax(0, 1fr);
    }

    .split {
        grid-template-columns: minmax(0, 1fr);
    }

    .split.reverse .split-media {
        order: 0;
    }

    .entry-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 600px) {
    .nav-toggle {
        display: block;
    }

    .main-nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        right: 0;
        top: calc(100% + 8px);
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 10px;
        padding: 8px;
        min-width: 220px;
        box-shadow: 0 12px 28px rgba(20, 48, 92, 0.14);
        z-index: 50;
    }

    .main-nav ul.is-open {
        display: flex;
    }

    .header-inner {
        flex-wrap: nowrap;
        align-items: flex-start;
    }

    .layout-single .content-area {
        width: 100%;
    }

    .entry {
        padding: 22px;
    }

    .comments-area {
        padding: 20px;
    }

    .block-title {
        font-size: 1.4rem;
    }
}
