/*
Theme Name: dds_drizzytearz.com
Author: Александр Треков
Description: Мультиформатный технологический блог про мобильные устройства, софт и экосистемы. Тема со спокойной «дождливо-уютной» эстетикой.
Version: 1.1
Text Domain: dtz
*/

/* ===== Базовая палитра «дождь + цифровой уют» ===== */
:root {
    --dtz-bg: #f4f6fa;
    --dtz-surface: #ffffff;
    --dtz-ink: #1b2330;
    --dtz-muted: #5a6677;
    --dtz-line: #dbe2ec;
    --dtz-deep: #1f2c44;       /* глубокий дождевой синий */
    --dtz-deep-2: #28395a;
    --dtz-accent: #e9a23b;     /* тёплый янтарь — «уют» */
    --dtz-accent-ink: #2a1c00;
    --dtz-rain: #4c6fa5;       /* сине-серый дождь */
    --dtz-rain-soft: #eaf0f8;
    --dtz-radius: 14px;
    --dtz-shadow: 0 6px 24px rgba(31, 44, 68, .08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

a { color: var(--dtz-rain); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
    line-height: 1.25;
    color: var(--dtz-ink);
    margin: 0 0 .6em;
    font-weight: 700;
    letter-spacing: -.01em;
}
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; }

/* Контейнер ширины — один источник истины */
.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}

/* ===== Шапка ===== */
.site-header {
    background: var(--dtz-surface);
    border-bottom: 1px solid var(--dtz-line);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 18px 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.brand-logo, .brand-svg { flex: 0 0 auto; display: block; }
.brand-svg { width: 52px; height: 52px; }
.brand-text { min-width: 0; }
.brand-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--dtz-deep);
    display: block;
    line-height: 1.25;
}
.brand-title a { color: inherit; text-decoration: none; }
.brand-desc {
    font-size: .82rem;
    color: var(--dtz-muted);
    display: block;
    margin-top: 3px;
    max-width: 640px;
}

.main-nav { margin-left: auto; min-width: 0; }
.main-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 4px;
    margin: 0;
    padding: 0;
}
.main-nav a {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 9px;
    color: var(--dtz-deep);
    font-weight: 600;
    font-size: .95rem;
}
.main-nav a:hover { background: var(--dtz-rain-soft); text-decoration: none; }

.nav-toggle {
    display: none;
    margin-left: auto;
    background: var(--dtz-deep);
    color: #fff;
    border: 0;
    border-radius: 9px;
    padding: 10px 14px;
    font-size: .95rem;
    cursor: pointer;
}

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

.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,
.layout-single .entry-wide {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}
.content-area { min-width: 0; }

@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; gap: 28px; }
    .layout-single .content-area,
    .layout-single .entry-wide { width: 100%; }
}

/* ===== Хлебные крошки ===== */
.breadcrumbs {
    font-size: .85rem;
    color: var(--dtz-muted);
    margin: 0 0 22px;
}
.breadcrumbs a { color: var(--dtz-rain); }
.breadcrumbs .sep { margin: 0 6px; color: var(--dtz-line); }

/* ===== Карточки записей ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--dtz-surface);
    border: 1px solid var(--dtz-line);
    border-radius: var(--dtz-radius);
    overflow: hidden;
    box-shadow: var(--dtz-shadow);
    transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(31,44,68,.13); }
.card-thumb {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}
.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.card-thumb-fallback {
    width: 100%;
    height: 100%;
    display: block;
    background: linear-gradient(135deg, var(--dtz-deep), var(--dtz-rain));
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 18px 20px 20px;
}
.card-title { font-size: 1.15rem; margin: 0 0 8px; }
.card-title a { color: var(--dtz-ink); }
.card-title a:hover { color: var(--dtz-rain); text-decoration: none; }
.card-meta {
    font-size: .78rem;
    color: var(--dtz-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.card-excerpt { color: var(--dtz-muted); font-size: .95rem; }
.card-excerpt p { margin: 0 0 .5em; background: none; }
.card-more {
    margin-top: auto;
    padding-top: 14px;
    font-weight: 700;
    font-size: .9rem;
    color: var(--dtz-rain);
}
.card-more a { color: var(--dtz-rain); }

/* ===== Сайдбар / виджеты ===== */
.sidebar { min-width: 0; }
.widget {
    background: var(--dtz-surface);
    border: 1px solid var(--dtz-line);
    border-radius: var(--dtz-radius);
    padding: 20px 22px;
    margin-bottom: 24px;
    color: var(--dtz-ink);
}
.widget-title {
    font-size: 1.05rem;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--dtz-accent);
    color: var(--dtz-deep);
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--dtz-line);
    color: var(--dtz-ink);
}
.widget ul li:last-child { border-bottom: 0; }
.widget a { color: var(--dtz-rain); }
.widget a:hover { color: var(--dtz-deep); }
.widget .post-date { display: block; font-size: .76rem; color: var(--dtz-muted); margin-top: 2px; }

/* ===== Подвал ===== */
.site-footer {
    background: var(--dtz-deep);
    color: #d7deea;
    margin-top: 40px;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 34px;
    padding: 46px 0 30px;
}
@media (max-width: 760px) { .footer-cols { grid-template-columns: 1fr; gap: 28px; } }

.site-footer .widget {
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    color: #d7deea;
}
.site-footer .widget-title {
    color: #ffffff;
    border-bottom-color: var(--dtz-accent);
}
.site-footer .widget a { color: #f0c987; }
.site-footer .widget a:hover { color: #ffffff; }
.site-footer .widget ul li {
    border-bottom-color: rgba(255,255,255,.12);
    color: #d7deea;
}
.site-footer .widget .post-date { color: #9fb0c8; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.12);
    padding: 18px 0;
    font-size: .85rem;
    color: #9fb0c8;
    text-align: center;
}

/* ===== Главная — секции ===== */
.section { padding: 46px 0; }
.section + .section { border-top: 1px solid var(--dtz-line); }
.section-head { margin-bottom: 26px; }
.section-head .eyebrow {
    display: inline-block;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--dtz-accent);
    margin-bottom: 8px;
}

/* Блок: текст + иллюстрация */
.split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
    align-items: center;
}
.split.reverse .split-media { order: -1; }
.split-media img {
    width: 100%;
    border-radius: var(--dtz-radius);
    display: block;
    box-shadow: var(--dtz-shadow);
}
@media (max-width: 760px) {
    .split { grid-template-columns: 1fr; gap: 24px; }
    .split.reverse .split-media { order: 0; }
}

/* Блок: сетка иконок-рубрик */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
}
.feature {
    background: var(--dtz-surface);
    border: 1px solid var(--dtz-line);
    border-radius: var(--dtz-radius);
    padding: 24px 22px;
    min-width: 0;
}
.feature .ico {
    width: 46px; height: 46px;
    display: block;
    margin-bottom: 14px;
}
.feature h3 { font-size: 1.1rem; margin-bottom: 8px; }
.feature p { color: var(--dtz-muted); font-size: .94rem; margin: 0; }

/* Блок: шаги */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
    counter-reset: step;
}
.step {
    position: relative;
    background: var(--dtz-rain-soft);
    border-radius: var(--dtz-radius);
    padding: 26px 22px 22px;
    min-width: 0;
}
.step::before {
    counter-increment: step;
    content: counter(step);
    display: grid;
    place-items: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--dtz-deep);
    color: #fff;
    font-weight: 800;
    margin-bottom: 14px;
}
.step h3 { font-size: 1.05rem; margin-bottom: 6px; }
.step p { color: var(--dtz-muted); font-size: .92rem; margin: 0; }

/* Блок: FAQ */
.faq { max-width: 820px; }
.faq details {
    background: var(--dtz-surface);
    border: 1px solid var(--dtz-line);
    border-radius: var(--dtz-radius);
    padding: 4px 20px;
    margin-bottom: 14px;
}
.faq summary {
    cursor: pointer;
    font-weight: 700;
    padding: 14px 0;
    list-style: none;
    color: var(--dtz-deep);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: right; color: var(--dtz-accent); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq details p { color: var(--dtz-muted); margin: 0 0 14px; }

/* Блок: галерея */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}
.gallery figure { margin: 0; }
.gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--dtz-radius);
    display: block;
}
.gallery figcaption { font-size: .82rem; color: var(--dtz-muted); margin-top: 6px; }

/* Блок: цитата */
.quote-band {
    background: linear-gradient(135deg, var(--dtz-deep), var(--dtz-deep-2));
    color: #fff;
    border-radius: 20px;
    padding: 48px 40px;
    text-align: center;
}
.quote-band blockquote {
    margin: 0;
    font-size: clamp(1.3rem, 2.6vw, 1.8rem);
    font-weight: 700;
    line-height: 1.4;
    max-width: 860px;
    margin-inline: auto;
}
.quote-band cite { display: block; margin-top: 18px; font-size: .9rem; color: var(--dtz-accent); font-style: normal; }

/* Блок: факты */
.facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 22px;
}
.fact {
    text-align: center;
    background: var(--dtz-surface);
    border: 1px solid var(--dtz-line);
    border-radius: var(--dtz-radius);
    padding: 28px 18px;
    min-width: 0;
}
.fact .num { font-size: 2.2rem; font-weight: 800; color: var(--dtz-deep); display: block; }
.fact .label { color: var(--dtz-muted); font-size: .9rem; margin-top: 6px; display: block; }

/* Блок: CTA */
.cta-band {
    background: var(--dtz-accent);
    color: var(--dtz-accent-ink);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
}
.cta-band h2 { color: var(--dtz-accent-ink); }
.cta-band p { color: #4a3500; max-width: 640px; margin: 0 auto 22px; }
.btn {
    display: inline-block;
    background: var(--dtz-deep);
    color: #fff;
    padding: 12px 26px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
}
.btn:hover { background: var(--dtz-deep-2); color: #fff; text-decoration: none; }

/* Hero на главной */
.hero {
    background: linear-gradient(135deg, var(--dtz-deep) 0%, var(--dtz-deep-2) 60%, var(--dtz-rain) 100%);
    color: #fff;
    border-radius: 22px;
    padding: 54px 44px;
    margin: 30px 0 8px;
    position: relative;
    overflow: hidden;
}
.hero h1 { color: #fff; max-width: 760px; }
.hero p { color: #d7deea; max-width: 680px; font-size: 1.05rem; }
.hero .btn { background: var(--dtz-accent); color: var(--dtz-accent-ink); margin-top: 8px; }
.hero .btn:hover { background: #f0b257; color: var(--dtz-accent-ink); }
.hero-art {
    position: absolute;
    right: -20px; bottom: -20px;
    width: 260px;
    opacity: .35;
    pointer-events: none;
}
@media (max-width: 600px) { .hero { padding: 38px 24px; } .hero-art { display: none; } }

/* ===== Записи / контент ===== */
.entry-content { font-size: 1.02rem; }
.entry-content img { border-radius: var(--dtz-radius); }
.entry-content h2, .entry-content h3 { margin-top: 1.4em; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-header { margin-bottom: 22px; }
.entry-meta { font-size: .82rem; color: var(--dtz-muted); margin-top: 8px; }
.entry-thumb { margin-bottom: 24px; }
.entry-thumb img { width: 100%; border-radius: var(--dtz-radius); display: block; }

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
}
.entry-content table, .entry-content th, .entry-content td {
    border: 1px solid var(--dtz-line);
}
.entry-content th, .entry-content td { padding: 10px 12px; text-align: left; }
.entry-content th { background: var(--dtz-rain-soft); }

.page-title { margin-bottom: 22px; }

/* ===== Пагинация ===== */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 36px;
    align-items: center;
}
.pagination .page-numbers {
    display: inline-grid;
    place-items: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--dtz-line);
    border-radius: 10px;
    background: var(--dtz-surface);
    color: var(--dtz-deep);
    font-weight: 600;
    text-decoration: none;
}
.pagination a.page-numbers:hover { background: var(--dtz-rain-soft); text-decoration: none; }
.pagination .page-numbers.current {
    background: var(--dtz-deep);
    color: #fff;
    border-color: var(--dtz-deep);
}
.pagination .page-numbers.dots {
    border: 0;
    background: transparent;
}

/* ===== Поиск ===== */
.search-form {
    display: flex;
    gap: 8px;
}
.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid var(--dtz-line);
    border-radius: 10px;
    font-size: 1rem;
    background: var(--dtz-surface);
    color: var(--dtz-ink);
}
.search-form button {
    background: var(--dtz-deep);
    color: #fff;
    border: 0;
    border-radius: 10px;
    padding: 0 18px;
    font-weight: 700;
    cursor: pointer;
}
.search-form button:hover { background: var(--dtz-deep-2); }

/* ===== Комментарии ===== */
.comments-area { margin-top: 40px; }
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-list li { margin-bottom: 18px; }
.comment-body {
    background: var(--dtz-surface);
    border: 1px solid var(--dtz-line);
    border-radius: var(--dtz-radius);
    padding: 16px 20px;
}
.comment-author { font-weight: 700; color: var(--dtz-deep); }
.comment-meta { font-size: .78rem; color: var(--dtz-muted); margin-bottom: 8px; }
.comment-respond {
    background: var(--dtz-surface);
    border: 1px solid var(--dtz-line);
    border-radius: var(--dtz-radius);
    padding: 22px 24px;
    margin-top: 24px;
}
.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(--dtz-line);
    border-radius: 10px;
    font-size: 1rem;
    margin-top: 4px;
    background: var(--dtz-surface);
    color: var(--dtz-ink);
}
.comment-form p { margin-bottom: 14px; }
.comment-form .submit {
    background: var(--dtz-deep);
    color: #fff;
    border: 0;
    border-radius: 10px;
    padding: 12px 26px;
    font-weight: 700;
    cursor: pointer;
    width: auto;
}

/* ===== 404 ===== */
.error-404 { text-align: center; padding: 50px 0; }
.error-404 .big { font-size: clamp(4rem, 14vw, 8rem); font-weight: 800; color: var(--dtz-rain); line-height: 1; }
.error-404 .search-form { max-width: 460px; margin: 24px auto 0; }

/* ===== Контакты (статичные) ===== */
.contact-block { display: flex; flex-wrap: wrap; gap: 14px; margin: 18px 0; }
.contact-block a {
    display: inline-block;
    padding: 10px 18px;
    background: var(--dtz-rain-soft);
    border-radius: 10px;
    color: var(--dtz-deep);
    font-weight: 600;
}
.contact-block a:hover { background: var(--dtz-line); text-decoration: none; }

/* ===== Cookie-баннер ===== */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 16px; right: 16px; bottom: 16px;
    z-index: 999;
    background: var(--dtz-deep);
    color: #eef2f8;
    border-radius: var(--dtz-radius);
    box-shadow: 0 10px 40px rgba(0,0,0,.3);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.cookie-banner p { margin: 0; font-size: .9rem; flex: 1; min-width: 220px; }
.cookie-banner a { color: var(--dtz-accent); }
.cookie-banner button {
    background: var(--dtz-accent);
    color: var(--dtz-accent-ink);
    border: 0;
    border-radius: 9px;
    padding: 10px 22px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.cookie-banner button:hover { background: #f0b257; }

/* ===== Адаптив навигации ===== */
@media (max-width: 760px) {
    .main-nav {
        flex-basis: 100%;
        margin-left: 0;
    }
    .main-nav[hidden] { display: none !important; }
    .main-nav ul { flex-direction: column; gap: 2px; }
    .main-nav a { display: block; }
    .nav-toggle { display: inline-block; }
    .header-inner { position: relative; }
}
