/*
Theme Name: dds_idlinkplus.com
Author: Михаил Лавров
Version: 1.2
*/

:root {
    --brand: #143a5c;
    --brand-2: #1f5f8b;
    --accent: #16b5a4;
    --accent-dark: #0e8f81;
    --ink: #1b2733;
    --muted: #5b6b7a;
    --line: #dbe3ea;
    --bg: #f4f7fa;
    --card: #ffffff;
    --footer-bg: #0f2942;
    --footer-ink: #c7d5e2;
    --footer-head: #ffffff;
    --radius: 12px;
    --shadow: 0 6px 24px rgba(20, 58, 92, 0.08);
}

* { 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-2); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; color: var(--brand); margin: 0 0 0.6em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}

/* ---------- Header ---------- */
.site-header {
    background: var(--card);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1rem 0;
    flex-wrap: wrap;
}
.brand-link { display: flex; align-items: center; gap: 0.8rem; min-width: 0; text-decoration: none; }
.brand-logo, .brand-svg { display: block; width: 48px; height: 48px; flex: 0 0 auto; }
.brand-text { min-width: 0; }
.brand-name {
    font-weight: 700;
    color: var(--brand);
    font-size: 1.05rem;
    display: block;
    max-width: 46ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.brand-desc {
    font-size: 0.78rem;
    color: var(--muted);
    display: block;
    max-width: 60ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nav-toggle {
    margin-left: auto;
    display: none;
    background: var(--brand);
    color: #fff;
    border: 0;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
}
.main-nav { margin-left: auto; }
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.main-nav a {
    display: block;
    padding: 0.5rem 0.9rem;
    color: var(--ink);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
}
.main-nav a:hover { background: var(--bg); color: var(--brand); text-decoration: none; }
.main-nav .current-menu-item > a { background: var(--brand); color: #fff; }

/* ---------- Layout ---------- */
.site-main { padding: 2rem 0 3rem; }
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 3%;
    align-items: start;
}
.layout-single .content-area,
.layout-single { width: 100%; }
.content-area { min-width: 0; }

.sidebar { min-width: 0; }
.widget {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.2rem 1.3rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}
.widget-title {
    font-size: 1.05rem;
    margin: 0 0 0.8rem;
    color: var(--brand);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.4rem;
}
.sidebar .widget, .sidebar .widget a, .sidebar .widget li { color: var(--ink); }
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li { padding: 0.4rem 0; border-bottom: 1px solid var(--line); }
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget a { color: var(--brand-2); }
.sidebar .widget .post-date { display: block; font-size: 0.8rem; color: var(--muted); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 1.4rem;
}
.breadcrumbs a { color: var(--brand-2); }
.breadcrumbs .sep { margin: 0 0.35rem; color: var(--line); }

/* ---------- Cards ---------- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.card-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.card-thumb-ph {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-thumb-ph svg { width: 64px; height: 64px; opacity: 0.85; }
.card-body {
    flex: 1;
    padding: 1.2rem 1.3rem 1.4rem;
    display: flex;
    flex-direction: column;
}
.card-title { font-size: 1.15rem; margin: 0 0 0.5rem; }
.card-title a { color: var(--brand); }
.card-meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.6rem; }
.card-excerpt { color: var(--ink); }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    align-self: flex-start;
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}
.card-more:hover { background: var(--accent-dark); text-decoration: none; }

/* ---------- Single / Page ---------- */
.entry {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem 2.2rem;
    box-shadow: var(--shadow);
}
.entry-title { margin-top: 0; }
.entry-meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.2rem; }
.entry-thumb { border-radius: var(--radius); margin-bottom: 1.4rem; width: 100%; object-fit: cover; }
.entry-content img { border-radius: 8px; }
.entry-content h2, .entry-content h3 { margin-top: 1.6em; }
.entry-content table { border-collapse: collapse; width: 100%; margin: 1.2em 0; }
.entry-content table, .entry-content th, .entry-content td { border: 1px solid var(--line); }
.entry-content th, .entry-content td { padding: 0.55rem 0.75rem; text-align: left; }
.entry-content th { background: var(--bg); }

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 2.2rem 0 0;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--card);
    color: var(--ink);
    font-weight: 600;
}
.pagination a.page-numbers:hover { background: var(--bg); text-decoration: none; }
.pagination .page-numbers.current { background: var(--brand); color: #fff; border-color: var(--brand); }
.pagination .page-numbers.dots { border: 0; background: none; }

/* ---------- Front page sections ---------- */
.front-section { padding: 2.6rem 0; }
.front-section + .front-section { border-top: 1px solid var(--line); }
.section-head { text-align: center; max-width: 60ch; margin: 0 auto 2rem; }
.section-head p { color: var(--muted); }

/* split: text + illustration */
.fs-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: center;
}
.fs-split.reverse .fs-split-media { order: -1; }
.fs-split-media img { width: 100%; border-radius: var(--radius); display: block; box-shadow: var(--shadow); }
.fs-split-text h2 { text-align: left; }

/* feature grid */
.fs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}
.fs-feature {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.6rem 1.5rem;
    box-shadow: var(--shadow);
    min-width: 0;
}
.fs-feature .fs-ico {
    width: 46px; height: 46px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(22, 181, 164, 0.12);
    border-radius: 10px;
    margin-bottom: 0.9rem;
}
.fs-feature .fs-ico svg { width: 26px; height: 26px; }
.fs-feature h3 { margin-bottom: 0.4rem; }
.fs-feature p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* steps */
.fs-steps { counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.fs-step {
    position: relative;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.6rem 1.5rem 1.4rem;
    box-shadow: var(--shadow);
    min-width: 0;
}
.fs-step::before {
    counter-increment: step;
    content: counter(step);
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    background: var(--brand); color: #fff;
    border-radius: 50%;
    font-weight: 700;
    margin-bottom: 0.9rem;
}
.fs-step h3 { margin-bottom: 0.4rem; font-size: 1.1rem; }
.fs-step p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* quote / accent */
.fs-quote {
    background: var(--brand);
    color: #eaf3fa;
    border-radius: var(--radius);
    padding: 2.6rem 2.4rem;
    text-align: center;
}
.fs-quote blockquote {
    margin: 0;
    font-size: 1.4rem;
    line-height: 1.5;
    font-weight: 600;
    color: #fff;
}
.fs-quote cite { display: block; margin-top: 1rem; font-style: normal; font-size: 0.95rem; color: var(--accent); }

/* stats */
.fs-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.5rem; }
.fs-stat {
    text-align: center;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.8rem 1.2rem;
    box-shadow: var(--shadow);
    min-width: 0;
}
.fs-stat .num { font-size: 2.2rem; font-weight: 800; color: var(--accent); display: block; }
.fs-stat .lbl { color: var(--muted); font-size: 0.9rem; }

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

/* CTA */
.fs-cta {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 2.6rem 2.4rem;
    text-align: center;
}
.fs-cta h2 { color: #fff; }
.fs-cta p { color: #d6e6f2; max-width: 60ch; margin: 0 auto 1.4rem; }
.fs-cta .btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-weight: 700;
}
.fs-cta .btn:hover { background: var(--accent-dark); text-decoration: none; }

/* gallery */
.fs-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.fs-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); display: block; box-shadow: var(--shadow); }

.latest-head { text-align: center; margin-bottom: 2rem; }

/* ---------- Search form ---------- */
.search-form { display: flex; gap: 0.5rem; }
.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 1rem;
}
.search-form button {
    background: var(--brand);
    color: #fff;
    border: 0;
    padding: 0.6rem 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

/* ---------- Comments ---------- */
.comments-area { margin-top: 2rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem 2rem; box-shadow: var(--shadow); }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list li { border-bottom: 1px solid var(--line); padding: 1rem 0; }
.comment-list .children { list-style: none; padding-left: 1.5rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 0.8rem;
}
.comment-form input[type="submit"], .comment-reply-link {
    background: var(--brand);
    color: #fff;
    border: 0;
    padding: 0.6rem 1.4rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

/* ---------- 404 ---------- */
.error-404 { text-align: center; padding: 2rem 0; }
.error-404 .code { font-size: 5rem; font-weight: 800; color: var(--accent); line-height: 1; }
.error-404 .search-form { max-width: 480px; margin: 1.6rem auto; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-ink); margin-top: 2rem; }
.footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    padding: 2.8rem 0 2rem;
}
.footer-col { min-width: 0; }
.footer-col .widget { background: none; border: 0; box-shadow: none; padding: 0; margin: 0; }
.footer-col, .footer-col .widget, .footer-col p, .footer-col li { color: var(--footer-ink); }
.footer-col .widget-title { color: var(--footer-head); border-bottom-color: var(--accent); }
.footer-col a { color: #ffffff; }
.footer-col a:hover { color: var(--accent); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { padding: 0.35rem 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-col li:last-child { border-bottom: 0; }
.footer-col .post-date { display: block; font-size: 0.8rem; color: #8fa6bb; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding: 1.2rem 0;
    text-align: center;
    font-size: 0.85rem;
    color: #8fa6bb;
}

/* ---------- Cookie banner ---------- */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 999;
    background: var(--footer-bg);
    color: var(--footer-ink);
    padding: 1rem 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}
.cookie-inner { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.cookie-inner p { margin: 0; flex: 1; min-width: 220px; font-size: 0.9rem; }
.cookie-inner a { color: var(--accent); }
.cookie-banner button {
    background: var(--accent);
    color: #fff;
    border: 0;
    padding: 0.6rem 1.6rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    white-space: nowrap;
}
.cookie-banner button:hover { background: var(--accent-dark); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; }
    .sidebar { margin-top: 2rem; }
    .fs-split { grid-template-columns: 1fr; }
    .fs-split.reverse .fs-split-media { order: 0; }
}
@media (max-width: 600px) {
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.35rem; }
    .nav-toggle { display: block; }
    .main-nav { flex-basis: 100%; margin-left: 0; display: none; }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; gap: 0.2rem; }
    .brand-desc { display: none; }
    .entry { padding: 1.4rem 1.3rem; }
    .fs-quote { padding: 1.8rem 1.4rem; }
    .fs-quote blockquote { font-size: 1.15rem; }
    .fs-cta { padding: 1.8rem 1.4rem; }
}
