/*
Theme Name: dds_praveengujars.com
Author: Максим Руднев
Description: Информационная тема о продуктовой аналитике: структура данных, карточки товаров, метрики и проверка решений.
Version: 1.1
Text Domain: pgd
*/

/* ==== Базовые переменные ==== */
:root {
    --pgd-bg: #f4f6f9;
    --pgd-surface: #ffffff;
    --pgd-ink: #1c2733;
    --pgd-muted: #5a6b7b;
    --pgd-accent: #2f6f8f;
    --pgd-accent-dark: #234f66;
    --pgd-line: #dde4ec;
    --pgd-dark: #17222e;
    --pgd-radius: 10px;
    --pgd-shadow: 0 2px 10px rgba(23, 34, 46, .07);
}

* { 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(--pgd-ink);
    background: var(--pgd-bg);
    line-height: 1.65;
    font-size: 17px;
    overflow-x: hidden;
}

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

a { color: var(--pgd-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; color: var(--pgd-ink); margin: 0 0 .6em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

/* ==== Контейнер ==== */
.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}

/* ==== Шапка ==== */
.site-header {
    background: var(--pgd-surface);
    border-bottom: 1px solid var(--pgd-line);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.1rem 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: .8rem;
    min-width: 0;
}
.brand-logo { display: block; width: 52px; height: 52px; }
.brand-text { min-width: 0; }
.brand-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--pgd-ink);
    line-height: 1.3;
}
.brand-title a { color: inherit; }
.brand-desc {
    font-size: .82rem;
    color: var(--pgd-muted);
    margin: .15rem 0 0;
}

/* ==== Навигация ==== */
.main-nav { margin-left: auto; }
.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--pgd-line);
    border-radius: 8px;
    padding: .5rem .7rem;
    font-size: 1rem;
    cursor: pointer;
    color: var(--pgd-ink);
}
.main-nav ul {
    list-style: none;
    display: flex;
    gap: .3rem;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.main-nav a {
    display: block;
    padding: .5rem .85rem;
    border-radius: 8px;
    color: var(--pgd-ink);
    font-weight: 500;
    font-size: .95rem;
}
.main-nav a:hover { background: var(--pgd-bg); text-decoration: none; color: var(--pgd-accent); }
.main-nav .current-menu-item > a { color: var(--pgd-accent); }

/* ==== Хлебные крошки ==== */
.breadcrumbs {
    font-size: .85rem;
    color: var(--pgd-muted);
    padding: 1rem 0 0;
}
.breadcrumbs a { color: var(--pgd-muted); }
.breadcrumbs a:hover { color: var(--pgd-accent); }
.breadcrumbs .sep { margin: 0 .35rem; color: var(--pgd-line); }

/* ==== Раскладки ==== */
.site-main { padding: 1.6rem 0 2.6rem; }
.layout-with-sidebar {
    display: grid;
    grid-template-columns: 67% 27%;
    gap: 6%;
    align-items: start;
}
.layout-single .content-area { width: 85%; margin-inline: auto; }
.content-area { min-width: 0; }

/* ==== Сайдбар ==== */
.sidebar { min-width: 0; }
.widget {
    background: var(--pgd-surface);
    border: 1px solid var(--pgd-line);
    border-radius: var(--pgd-radius);
    padding: 1.2rem 1.3rem;
    margin-bottom: 1.4rem;
    box-shadow: var(--pgd-shadow);
}
.widget-title {
    font-size: 1.05rem;
    margin: 0 0 .8rem;
    color: var(--pgd-ink);
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--pgd-accent);
}
.sidebar .widget, .sidebar .widget p, .sidebar .widget li, .sidebar .widget a { color: var(--pgd-ink); }
.sidebar .widget a:hover { color: var(--pgd-accent); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: .45rem 0; border-bottom: 1px solid var(--pgd-line); font-size: .95rem; }
.widget li:last-child { border-bottom: none; }
.widget .post-date { display: block; font-size: .78rem; color: var(--pgd-muted); margin-top: .15rem; }

/* ==== Карточки записей ==== */
.card {
    display: flex;
    flex-direction: column;
    background: var(--pgd-surface);
    border: 1px solid var(--pgd-line);
    border-radius: var(--pgd-radius);
    overflow: hidden;
    box-shadow: var(--pgd-shadow);
    margin-bottom: 1.6rem;
}
.card-thumb-wrap {
    display: block;
    overflow: hidden;
}
.card-thumb-wrap img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}
.card-thumb-wrap:hover img { transform: scale(1.03); }
.card-body { flex: 1; padding: 1.2rem 1.4rem 1.4rem; }
.card-title { font-size: 1.25rem; margin: 0 0 .4rem; }
.card-title a { color: var(--pgd-ink); }
.card-title a:hover { color: var(--pgd-accent); text-decoration: none; }
.card-meta { font-size: .8rem; color: var(--pgd-muted); margin-bottom: .6rem; }
.card-excerpt { color: var(--pgd-muted); font-size: .96rem; }
.card-excerpt p { margin: 0 0 .5em; background: none; }
.card-more {
    display: inline-block;
    margin-top: .5rem;
    font-weight: 600;
    color: var(--pgd-accent);
}

/* ==== Одиночная запись / страница ==== */
.entry {
    background: var(--pgd-surface);
    border: 1px solid var(--pgd-line);
    border-radius: var(--pgd-radius);
    padding: 1.8rem 2rem;
    box-shadow: var(--pgd-shadow);
}
.entry-title { font-size: 1.9rem; margin-bottom: .5rem; }
.entry-meta { font-size: .85rem; color: var(--pgd-muted); margin-bottom: 1.2rem; }
.entry-thumb { border-radius: var(--pgd-radius); overflow: hidden; margin-bottom: 1.4rem; }
.entry-thumb img { width: 100%; display: block; }
.entry-content { min-width: 0; }
.entry-content img { border-radius: 8px; }
.entry-content h2 { margin-top: 1.6rem; }
.entry-content ul, .entry-content ol { padding-left: 1.3rem; }
.entry-content table { border-collapse: collapse; width: 100%; margin: 1.2rem 0; }
.entry-content table th,
.entry-content table td { border: 1px solid var(--pgd-line); padding: .6rem .8rem; text-align: left; }
.entry-content table th { background: var(--pgd-bg); }
.entry-content blockquote {
    margin: 1.4rem 0;
    padding: 1rem 1.4rem;
    background: var(--pgd-bg);
    border-left: 4px solid var(--pgd-accent);
    border-radius: 0 8px 8px 0;
    color: var(--pgd-ink);
}
.entry-content blockquote p:last-child { margin-bottom: 0; }

/* ==== Пагинация ==== */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin: 2rem 0 .5rem;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 .7rem;
    border: 1px solid var(--pgd-line);
    border-radius: 8px;
    background: var(--pgd-surface);
    color: var(--pgd-ink);
    font-size: .95rem;
}
.pagination a.page-numbers:hover { background: var(--pgd-bg); text-decoration: none; border-color: var(--pgd-accent); }
.pagination .page-numbers.current {
    background: var(--pgd-accent);
    border-color: var(--pgd-accent);
    color: #fff;
}
.pagination .page-numbers.dots { border: none; background: none; }

/* ==== Список статей (заголовок раздела) ==== */
.list-header { margin-bottom: 1.4rem; }
.list-header h1 { margin-bottom: .3rem; }
.list-header p { color: var(--pgd-muted); margin: 0; }

/* ==== Подвал ==== */
.site-footer {
    background: var(--pgd-dark);
    color: #c7d3de;
    margin-top: 2rem;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    padding: 2.6rem 0 2rem;
}
.footer-col { min-width: 0; }
.site-footer .widget {
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    color: #c7d3de;
}
.site-footer .widget-title { color: #ffffff; border-bottom-color: var(--pgd-accent); }
.site-footer .widget,
.site-footer .widget p,
.site-footer .widget li { color: #c7d3de; }
.site-footer .widget a { color: #eaf1f7; }
.site-footer .widget a:hover { color: #ffffff; }
.site-footer .widget li { border-bottom-color: rgba(255,255,255,.1); }
.site-footer .widget .post-date { color: #93a4b3; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 1.1rem 0;
    font-size: .85rem;
    color: #93a4b3;
    text-align: center;
}

/* ==== Cookie-баннер ==== */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    padding: 1rem 1.4rem;
    background: rgba(23, 34, 46, .97);
    color: #eaf1f7;
    font-size: .9rem;
}
.cookie-banner p { margin: 0; max-width: 720px; }
.cookie-banner a { color: #8fc5dc; }
.cookie-accept {
    flex: none;
    background: var(--pgd-accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: .6rem 1.4rem;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
}
.cookie-accept:hover { background: var(--pgd-accent-dark); }

/* ==== Форма поиска ==== */
.search-form { display: flex; gap: .5rem; }
.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: .55rem .8rem;
    border: 1px solid var(--pgd-line);
    border-radius: 8px;
    font-size: .95rem;
    background: var(--pgd-surface);
    color: var(--pgd-ink);
}
.search-form button {
    flex: none;
    background: var(--pgd-accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: .55rem 1.1rem;
    cursor: pointer;
    font-size: .95rem;
}
.search-form button:hover { background: var(--pgd-accent-dark); }

/* ==== 404 ==== */
.error-404 {
    background: var(--pgd-surface);
    border: 1px solid var(--pgd-line);
    border-radius: var(--pgd-radius);
    padding: 2.4rem 2rem;
    text-align: center;
    box-shadow: var(--pgd-shadow);
}
.error-404 .code { font-size: 4rem; font-weight: 800; color: var(--pgd-accent); line-height: 1; }
.error-404 .search-form { max-width: 440px; margin: 1.4rem auto 1rem; }

/* ==== Комментарии ==== */
.comments-area {
    background: var(--pgd-surface);
    border: 1px solid var(--pgd-line);
    border-radius: var(--pgd-radius);
    padding: 1.6rem 2rem;
    margin-top: 1.6rem;
    box-shadow: var(--pgd-shadow);
}
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list li { border-bottom: 1px solid var(--pgd-line); padding: 1rem 0; }
.comment-list .children { list-style: none; padding-left: 1.4rem; }
.comment-meta { font-size: .82rem; color: var(--pgd-muted); margin-bottom: .3rem; }
.comment-author { font-weight: 600; color: var(--pgd-ink); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: .6rem .8rem;
    border: 1px solid var(--pgd-line);
    border-radius: 8px;
    font-family: inherit;
    font-size: .95rem;
    margin-top: .3rem;
    background: var(--pgd-surface);
    color: var(--pgd-ink);
}
.comment-form p { margin-bottom: .9rem; }
.comment-form .submit {
    background: var(--pgd-accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: .6rem 1.6rem;
    font-weight: 600;
    cursor: pointer;
    width: auto;
}

/* ==== Главная ==== */
.front-section { padding: 2.6rem 0; }
.front-section + .front-section { border-top: 1px solid var(--pgd-line); }
.section-head { max-width: 720px; margin-bottom: 1.6rem; }
.section-head h2 { margin-bottom: .4rem; }
.section-head p { color: var(--pgd-muted); margin: 0; }

/* блок текст+иллюстрация */
.fs-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.4rem;
    align-items: center;
}
.fs-split.reverse .fs-split-media { order: 2; }
.fs-split-text { min-width: 0; }
.fs-split-text h2 { margin-bottom: .6rem; }
.fs-split-media img {
    width: 100%;
    display: block;
    border-radius: var(--pgd-radius);
    box-shadow: var(--pgd-shadow);
}

/* сетка карточек-иконок */
.fs-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.4rem;
}
.fs-feature {
    background: var(--pgd-surface);
    border: 1px solid var(--pgd-line);
    border-radius: var(--pgd-radius);
    padding: 1.5rem 1.5rem;
    box-shadow: var(--pgd-shadow);
    min-width: 0;
}
.fs-feature .ico {
    width: 46px; height: 46px;
    display: flex; align-items: center; justify-content: center;
    background: var(--pgd-bg);
    border-radius: 10px;
    margin-bottom: .9rem;
    color: var(--pgd-accent);
}
.fs-feature h3 { margin-bottom: .35rem; }
.fs-feature p { color: var(--pgd-muted); font-size: .95rem; margin: 0; }

/* пошаговый блок */
.fs-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.4rem;
    counter-reset: pgd-step;
}
.fs-step {
    background: var(--pgd-surface);
    border: 1px solid var(--pgd-line);
    border-radius: var(--pgd-radius);
    padding: 1.4rem 1.3rem;
    box-shadow: var(--pgd-shadow);
    min-width: 0;
}
.fs-step .num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--pgd-accent);
    color: #fff;
    font-weight: 700;
    margin-bottom: .8rem;
}
.fs-step h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.fs-step p { color: var(--pgd-muted); font-size: .92rem; margin: 0; }

/* факты / статистика */
.fs-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.4rem;
}
.fs-fact {
    text-align: center;
    padding: 1.4rem 1rem;
    background: var(--pgd-surface);
    border: 1px solid var(--pgd-line);
    border-radius: var(--pgd-radius);
    box-shadow: var(--pgd-shadow);
    min-width: 0;
}
.fs-fact .big { font-size: 2.1rem; font-weight: 800; color: var(--pgd-accent); }
.fs-fact .lbl { color: var(--pgd-muted); font-size: .9rem; margin-top: .3rem; }

/* FAQ */
.fs-faq { max-width: 820px; }
.fs-faq details {
    background: var(--pgd-surface);
    border: 1px solid var(--pgd-line);
    border-radius: var(--pgd-radius);
    padding: 1rem 1.3rem;
    margin-bottom: .8rem;
    box-shadow: var(--pgd-shadow);
}
.fs-faq summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--pgd-ink);
    list-style: none;
}
.fs-faq summary::-webkit-details-marker { display: none; }
.fs-faq summary::after { content: "+"; float: right; color: var(--pgd-accent); font-weight: 700; }
.fs-faq details[open] summary::after { content: "–"; }
.fs-faq details p { margin: .8rem 0 0; color: var(--pgd-muted); }

/* цитата / акцент */
.fs-quote {
    background: var(--pgd-accent-dark);
    color: #eaf3f8;
    border-radius: var(--pgd-radius);
    padding: 2.4rem 2.4rem;
}
.fs-quote blockquote { margin: 0; font-size: 1.35rem; line-height: 1.5; font-weight: 500; }
.fs-quote .who { margin-top: 1rem; font-size: .9rem; color: #9fc4d6; }

/* CTA */
.fs-cta {
    background: var(--pgd-accent);
    color: #fff;
    border-radius: var(--pgd-radius);
    padding: 2.4rem 2.4rem;
    text-align: center;
}
.fs-cta h2 { color: #fff; }
.fs-cta p { color: #dcecf3; max-width: 640px; margin: 0 auto 1.3rem; }
.fs-cta .btn {
    display: inline-block;
    background: #fff;
    color: var(--pgd-accent-dark);
    padding: .75rem 1.8rem;
    border-radius: 8px;
    font-weight: 700;
}
.fs-cta .btn:hover { text-decoration: none; background: #eaf3f8; }

/* галерея */
.fs-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.fs-gallery figure { margin: 0; border-radius: var(--pgd-radius); overflow: hidden; box-shadow: var(--pgd-shadow); }
.fs-gallery img { width: 100%; height: 220px; object-fit: cover; display: block; }

/* последние записи на главной */
.front-latest .cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
}
.front-latest .card { margin-bottom: 0; }

/* ==== Адаптив ==== */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; }
    .fs-grid, .fs-steps, .fs-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .front-latest .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-cols { grid-template-columns: 1fr; gap: 1.6rem; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 1.6rem; }
    .entry-title { font-size: 1.5rem; }
    .main-nav {
        margin-left: 0;
        width: 100%;
    }
    .nav-toggle { display: block; margin-left: auto; }
    .main-nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: .6rem;
    }
    .main-nav.open ul { display: flex; }
    .main-nav a { padding: .7rem .5rem; border-bottom: 1px solid var(--pgd-line); border-radius: 0; }
    .layout-single .content-area { width: 100%; }
    .fs-split { grid-template-columns: 1fr; gap: 1.4rem; }
    .fs-split.reverse .fs-split-media { order: 0; }
    .fs-grid, .fs-steps, .fs-facts, .fs-gallery,
    .front-latest .cards-grid { grid-template-columns: 1fr; }
    .entry { padding: 1.4rem 1.2rem; }
    .fs-quote, .fs-cta { padding: 1.8rem 1.4rem; }
    .fs-gallery img { height: 190px; }
    .comments-area { padding: 1.2rem 1.2rem; }
}
