/*
Theme Name: dds_plncton.com
Author: Савельев Ярослав
Description: Тема для информационного сайта digital-агентства plncton.com — креатив, брендинг и маркетинг.
Version: 1.1
Text Domain: dds_plncton
*/

/* ===== СБРОСЫ И БАЗА ===== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: #0D1117;
    color: #E6EDF0;
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    letter-spacing: 0.02em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

a {
    color: #A0F0FF;
    text-decoration: none;
    transition: color .25s ease;
}
a:hover { color: #C0FF4E; }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Satoshi', 'General Sans', 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: #E6EDF0;
    margin: 1.4em 0 0.6em;
}
h1 { font-size: 2.4rem; margin-top: 0.2em; }
h2 { font-size: 1.85rem; }
h3 { font-size: 1.45rem; }
h4 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

blockquote {
    margin: 1.5em 0;
    padding: 1em 1.4em;
    border-left: 2px solid #C0FF4E;
    font-family: 'JetBrains Mono', 'Menlo', monospace;
    color: #A0F0FF;
    background: rgba(192,255,78,.04);
}

code, pre {
    font-family: 'JetBrains Mono', 'Menlo', monospace;
    background: rgba(160,240,255,.07);
    border-radius: 4px;
    padding: 0.1em 0.35em;
    font-size: 0.92em;
}
pre {
    padding: 1em;
    overflow-x: auto;
    line-height: 1.5;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    border: 1px solid #2a3138;
}
th, td {
    border: 1px solid #2a3138;
    padding: 0.65em 0.85em;
    text-align: left;
}
th { background: #111A1A; font-weight: 700; }

hr { border: 0; border-top: 1px solid #2a3138; margin: 2em 0; }

ul, ol { padding-left: 1.4em; }
li { margin: 0.25em 0; }

/* ===== УТИЛИТЫ ===== */
.wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

.btn-primary {
    display: inline-block;
    padding: 14px 26px;
    background: #C0FF4E;
    color: #0D1117;
    font-weight: 700;
    font-family: 'Satoshi', 'Inter', sans-serif;
    border: 0;
    border-radius: 12px 12px 24px 24px;
    cursor: pointer;
    transition: border-radius .35s ease, transform .25s ease, background .25s ease;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.85rem;
}
.btn-primary:hover {
    border-radius: 24px 24px 12px 12px;
    background: #d4ff7a;
    color: #0D1117;
    transform: translateY(-1px);
}

.btn-ghost {
    display: inline-block;
    padding: 12px 22px;
    background: transparent;
    color: #C0FF4E;
    border: 1px solid #C0FF4E;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: color .2s ease, background .2s ease;
    position: relative;
}
.btn-ghost .lbl-default { display: inline; }
.btn-ghost .lbl-hover { display: none; }
.btn-ghost:hover .lbl-default { display: none; }
.btn-ghost:hover .lbl-hover { display: inline; }
.btn-ghost:hover { background: rgba(192,255,78,.08); color: #C0FF4E; }

input[type="text"],
input[type="email"],
input[type="search"],
input[type="url"],
input[type="password"],
textarea,
select {
    background: transparent;
    color: #E6EDF0;
    border: 0;
    border-bottom: 2px solid #C0FF4E;
    padding: 10px 0;
    font-family: inherit;
    font-size: 1rem;
    width: 100%;
    outline: none;
    caret-color: #C0FF4E;
}
input::placeholder, textarea::placeholder { color: rgba(230,237,240,.45); }

/* ===== ШАПКА ===== */
.site-header {
    background: #0D1117;
    border-bottom: 1px solid rgba(160,240,255,.08);
    padding: 22px 0;
}
.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
}
.brand-logo {
    width: 48px; height: 48px;
    display: block;
    flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; }
.brand-name {
    font-family: 'JetBrains Mono', monospace;
    color: #E6EDF0;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}
.brand-desc {
    color: rgba(230,237,240,.55);
    font-size: 0.82rem;
    line-height: 1.4;
    margin-top: 3px;
    max-width: 460px;
}

.primary-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}
.primary-nav a {
    color: #E6EDF0;
    font-family: 'Satoshi', 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: border-color .2s ease, color .2s ease;
}
.primary-nav a:hover,
.primary-nav .current-menu-item a {
    color: #C0FF4E;
    border-color: #C0FF4E;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid #C0FF4E;
    color: #C0FF4E;
    padding: 10px 14px;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    border-radius: 8px;
}

/* ===== СЕКЦИИ И LAYOUT ===== */
.site-main { padding: 48px 0 64px; }

.layout-grid {
    display: grid;
    grid-template-columns: 67% 27%;
    gap: 6%;
    align-items: start;
}
.layout-grid.no-sidebar { grid-template-columns: 85%; justify-content: center; }
.layout-grid.full-wide { grid-template-columns: 85%; justify-content: center; }

.sidebar {
    background: #111A1A;
    padding: 24px;
    border: 1px solid rgba(160,240,255,.06);
}
.sidebar .widget { margin-bottom: 28px; }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #C0FF4E;
    margin: 0 0 14px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
}
.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar li { padding: 6px 0; border-bottom: 1px dashed rgba(160,240,255,.1); }
.sidebar li:last-child { border-bottom: 0; }
.sidebar li a { color: #E6EDF0; }
.sidebar li a:hover { color: #C0FF4E; }

/* ===== КАРТОЧКИ ЗАПИСЕЙ ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.cards-grid .card:nth-child(3n+1) { transform: translateY(-8px); }
.cards-grid .card:nth-child(3n+2) { transform: translateY(6px); }
.cards-grid .card:nth-child(3n+3) { transform: translateY(-4px); }

.card {
    display: flex;
    flex-direction: column;
    background: #111A1A;
    border: 1px solid rgba(160,240,255,.08);
    overflow: hidden;
    transition: transform .35s ease, border-color .35s ease;
}
.card:hover {
    border-color: rgba(192,255,78,.4);
    transform: translateY(-10px) rotate(-0.4deg) !important;
}

.card-thumb-wrap {
    display: block;
    background: #0D1117;
    overflow: hidden;
}
.card-thumb-wrap img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform .6s ease;
}
.card:hover .card-thumb-wrap img { transform: scale(1.04); }

.card-body {
    flex: 1;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.card-title {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.3;
}
.card-title a { color: #E6EDF0; }
.card-title a:hover { color: #C0FF4E; }
.card-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: rgba(160,240,255,.65);
    letter-spacing: 0.06em;
}
.card-excerpt { color: rgba(230,237,240,.78); font-size: 0.95rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    align-self: flex-start;
    color: #C0FF4E;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
}
.card-more::after { content: ' →'; transition: margin-left .25s ease; display: inline-block; }
.card-more:hover { color: #d4ff7a; }
.card-more:hover::after { margin-left: 4px; }

/* Карточка горизонтальная (для блог-страницы) */
.card.row {
    flex-direction: row;
}
.card.row .card-thumb-wrap {
    flex: 0 0 280px;
    position: relative;
    overflow: hidden;
}
.card.row .card-thumb-wrap a {
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}
.card.row .card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: auto;
}

/* ===== ХЛЕБНЫЕ КРОШКИ ===== */
.crumbs {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: rgba(160,240,255,.55);
    margin: 0 0 28px;
    letter-spacing: 0.04em;
}
.crumbs a { color: rgba(160,240,255,.85); }
.crumbs a:hover { color: #C0FF4E; }
.crumbs .sep { margin: 0 8px; color: rgba(192,255,78,.5); }
.crumbs .current { color: #E6EDF0; }

/* ===== ПАГИНАЦИЯ ===== */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 40px 0 0;
    align-items: center;
}
.pagination a, .pagination span {
    display: inline-block;
    padding: 10px 14px;
    min-width: 42px;
    text-align: center;
    border: 1px solid rgba(160,240,255,.12);
    color: #E6EDF0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.pagination a:hover {
    border-color: #C0FF4E;
    color: #C0FF4E;
    background: rgba(192,255,78,.05);
}
.pagination .current {
    background: #C0FF4E;
    color: #0D1117;
    border-color: #C0FF4E;
    font-weight: 700;
}
.pagination .dots { border: 0; }

/* ===== ЗАПИСЬ И СТРАНИЦА ===== */
.entry {
    background: #111A1A;
    padding: 34px;
    border: 1px solid rgba(160,240,255,.06);
}
.entry-header { margin-bottom: 24px; }
.entry-title { margin: 0 0 10px; font-size: 2.1rem; }
.entry-meta {
    color: rgba(160,240,255,.65);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
}
.entry-thumb img { width: 100%; display: block; margin-bottom: 24px; }
.entry-content {
    color: #E6EDF0;
    font-size: 1.02rem;
}
.entry-content p { background: none; }
.entry-content img { display: block; margin: 1.4em auto; }

.entry-tags {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px dashed rgba(160,240,255,.15);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
}
.entry-tags a {
    display: inline-block;
    margin: 0 6px 6px 0;
    padding: 4px 10px;
    border: 1px solid rgba(192,255,78,.3);
    color: #A0F0FF;
}
.entry-tags a:hover { color: #C0FF4E; border-color: #C0FF4E; }

/* ===== ГЛАВНАЯ — БЛОКИ ===== */
.hero-block {
    background: #111A1A;
    padding: 60px 44px;
    margin-bottom: 36px;
    border: 1px solid rgba(160,240,255,.06);
    position: relative;
    overflow: hidden;
}
.hero-block::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 15% 30%, rgba(160,240,255,.08) 0%, transparent 4%),
        radial-gradient(circle at 80% 60%, rgba(192,255,78,.06) 0%, transparent 5%),
        radial-gradient(circle at 50% 85%, rgba(255,107,107,.05) 0%, transparent 4%);
    pointer-events: none;
}
.hero-block > * { position: relative; z-index: 1; }
.hero-block h1, .hero-block h2 { margin-top: 0; }
.hero-block h1 .accent { color: #C0FF4E; }
.hero-block h2 .accent { color: #FF6B6B; }

.feature-block {
    background: #111A1A;
    padding: 50px 44px;
    margin-bottom: 36px;
    border: 1px solid rgba(160,240,255,.06);
}
.feature-block.alt { background: #0D1117; border-color: rgba(192,255,78,.1); }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
    margin-top: 28px;
}
.feature-cell {
    padding: 22px;
    border: 1px dashed rgba(160,240,255,.18);
    background: rgba(13,17,23,.4);
}
.feature-cell .num {
    font-family: 'JetBrains Mono', monospace;
    color: #C0FF4E;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    display: block;
    margin-bottom: 10px;
    border-left: 2px solid #C0FF4E;
    padding-left: 10px;
}
.feature-cell h3 { margin: 0 0 10px; font-size: 1.15rem; }
.feature-cell p { margin: 0; color: rgba(230,237,240,.78); font-size: 0.95rem; }

.section-title {
    margin: 0 0 24px;
    font-size: 1.6rem;
    border-left: 4px solid #C0FF4E;
    padding-left: 14px;
}
.section-title .accent { color: #FF6B6B; }

.recent-posts-section { margin: 36px 0; }

/* ===== ПОДВАЛ ===== */
.site-footer {
    background: #111A1A;
    border-top: 1px solid rgba(160,240,255,.08);
    padding: 56px 0 0;
    margin-top: 64px;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
    margin-bottom: 40px;
}
.footer-col .widget-title {
    font-family: 'JetBrains Mono', monospace;
    color: #C0FF4E;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0 0 14px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { padding: 5px 0; }
.footer-col li a { color: rgba(230,237,240,.78); }
.footer-col li a:hover { color: #C0FF4E; }
.footer-col p { color: rgba(230,237,240,.7); font-size: 0.92rem; }

/* Бегущая строка бейджей */
.badge-marquee {
    overflow: hidden;
    position: relative;
    border-top: 1px solid rgba(160,240,255,.08);
    border-bottom: 1px solid rgba(160,240,255,.08);
    padding: 16px 0;
    background: #0D1117;
}
.badge-track {
    display: flex;
    gap: 14px;
    width: max-content;
    animation: badge-scroll 38s linear infinite;
}
.badge-marquee:hover .badge-track { animation-play-state: paused; }
.badge-pill {
    flex-shrink: 0;
    padding: 8px 16px;
    border: 1px solid rgba(160,240,255,.2);
    color: #A0F0FF;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    white-space: nowrap;
    border-radius: 12px 12px 24px 24px;
}
.badge-pill.lime { color: #C0FF4E; border-color: rgba(192,255,78,.3); }
.badge-pill.coral { color: #FF6B6B; border-color: rgba(255,107,107,.3); }
@keyframes badge-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.copyright {
    text-align: center;
    padding: 22px 0;
    color: rgba(230,237,240,.5);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
}

/* ===== COOKIE-БАННЕР =====
   ВАЖНО: правило [hidden] идёт ДО основного блока стилей баннера */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    background: #111A1A;
    border: 1px solid #C0FF4E;
    padding: 18px 22px;
    z-index: 9999;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    border-radius: 12px 12px 24px 24px;
    box-shadow: 0 12px 40px rgba(0,0,0,.5);
}
.cookie-banner p {
    margin: 0;
    flex: 1;
    min-width: 240px;
    color: #E6EDF0;
    font-size: 0.92rem;
}
.cookie-banner button {
    flex-shrink: 0;
}

/* ===== КОММЕНТАРИИ ===== */
.comments-area {
    background: #111A1A;
    padding: 28px;
    margin-top: 28px;
    border: 1px solid rgba(160,240,255,.06);
}
.comments-title {
    font-size: 1.3rem;
    margin: 0 0 18px;
    border-left: 3px solid #C0FF4E;
    padding-left: 12px;
}
.comments-list { list-style: none; padding: 0; margin: 0 0 24px; }
.comments-list ol { list-style: none; padding-left: 30px; }
.comment-body {
    padding: 14px 0;
    border-bottom: 1px dashed rgba(160,240,255,.12);
}
.comment-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.comment-author img { border-radius: 50%; }
.comment-author .fn { font-weight: 700; color: #A0F0FF; }
.comment-meta-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: rgba(230,237,240,.5);
    margin-left: auto;
}
.comment-content { color: rgba(230,237,240,.85); font-size: 0.95rem; }
.comment-reply-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #C0FF4E;
}
.comment-form label { display: block; margin: 12px 0 4px; font-size: 0.88rem; color: rgba(230,237,240,.75); }
.comment-form .form-submit { margin-top: 18px; }

/* ===== ПОИСК ===== */
.search-form {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    max-width: 520px;
}
.search-form .search-field { flex: 1; }
.search-form .search-submit {
    padding: 10px 18px;
    background: #C0FF4E;
    color: #0D1117;
    border: 0;
    border-radius: 12px 12px 24px 24px;
    cursor: pointer;
    font-weight: 700;
    transition: border-radius .35s ease;
}
.search-form .search-submit:hover { border-radius: 24px 24px 12px 12px; }

/* ===== 404 ===== */
.error-404 {
    text-align: center;
    padding: 60px 20px;
}
.error-404 .code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 6rem;
    color: #C0FF4E;
    line-height: 1;
    margin: 0 0 10px;
    letter-spacing: 0.06em;
}
.error-404 .accent { color: #FF6B6B; }
.error-404 h1 { margin-bottom: 16px; }
.error-404 .actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 26px;
    flex-wrap: wrap;
}
.error-404 .search-form { margin: 30px auto 0; }

/* ===== ЧАСТИЦЫ В ФОНЕ (декоративные) ===== */
.particles-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.particles-bg span {
    position: absolute;
    border-radius: 50%;
    background: rgba(160,240,255,.06);
    animation: float 14s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translate(0,0); }
    50% { transform: translate(20px, -30px); }
}

/* ===== АДАПТИВ ===== */
@media (max-width: 960px) {
    .layout-grid { grid-template-columns: 1fr; gap: 28px; }
    .layout-grid.no-sidebar, .layout-grid.full-wide { grid-template-columns: 1fr; }
    .footer-cols { grid-template-columns: 1fr 1fr; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.55rem; }
}

@media (max-width: 600px) {
    .menu-toggle { display: inline-block; }
    .primary-nav { width: 100%; display: none; }
    .primary-nav.is-open { display: block; }
    .primary-nav ul { flex-direction: column; gap: 0; }
    .primary-nav li { border-bottom: 1px dashed rgba(160,240,255,.12); }
    .primary-nav a { display: block; padding: 12px 0; border-bottom: 0; }

    .hero-block, .feature-block { padding: 36px 22px; }
    .entry { padding: 22px; }
    .footer-cols { grid-template-columns: 1fr; }

    /* Горизонтальные карточки → вертикальные на мобильных */
    .card.row { flex-direction: column; }
    .card.row .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
    }
    .card.row .card-thumb-wrap a {
        position: static;
    }
    .card.row .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .cards-grid .card { transform: none !important; }
    .error-404 .code { font-size: 4rem; }
}
