/*
Theme Name: dds_ohmyexpatlife.com
Author: Анна Верещагина
Description: Гид для тех, кто строит жизнь в чужом городе — жильё, работа, адаптация и городская жизнь.
Version: 1.1
Text Domain: expatlife
*/

:root {
    --bg: #f6f3ee;
    --ink: #232c2e;
    --muted: #5e6c70;
    --brand: #18555c;
    --brand-dark: #0f3a40;
    --accent: #e07a52;
    --accent-dark: #c5603a;
    --line: #e3ddd3;
    --card-bg: #ffffff;
    --soft: #eef2f0;
    --footer-bg: #14272b;
    --footer-ink: #cdd9d8;
    --footer-mut: #8ea2a2;
    --shell: min(92%, 1180px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

a { color: var(--brand); }
a:hover { color: var(--accent-dark); }

h1, h2, h3, h4 {
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.2;
    color: var(--brand-dark);
    margin: 0 0 0.6em;
}
h1 { font-size: 2.1rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; }

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

/* ---------- Header ---------- */
.site-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    padding: 1.1rem 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    min-width: 0;
    flex: 1;
}
.brand-logo { display: block; height: 52px; width: auto; flex: 0 0 auto; }
.brand-text { min-width: 0; }
.site-title {
    font-family: Georgia, serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin: 0;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.site-desc {
    font-size: 0.82rem;
    color: var(--muted);
    margin: 0.2rem 0 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.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.85rem;
    text-decoration: none;
    color: var(--ink);
    border-radius: 8px;
    font-size: 0.97rem;
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
    background: var(--soft);
    color: var(--brand-dark);
}

/* ---------- Layout ---------- */
.site-main { padding: 2.2rem 0 3rem; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 2.4rem;
    align-items: start;
}
.layout-single { display: block; }
.layout-single .content-area { width: 85%; margin-inline: auto; }
.layout-single.full .content-area { width: 100%; }

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

.sidebar { min-width: 0; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0 0 1.4rem;
}
.breadcrumbs a { color: var(--brand); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs .sep { color: var(--line); margin: 0 0.25rem; }

/* ---------- Cards ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(20,39,43,.09); }
.card-thumb { display: block; }
.card-thumb img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
}
.card-thumb--placeholder {
    display: block;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
}
.card-thumb--placeholder svg { width: 100%; height: 100%; display: block; }
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.1rem 1.2rem 1.3rem;
    min-width: 0;
}
.card-meta { font-size: 0.78rem; color: var(--muted); margin-bottom: 0.35rem; }
.card-title { font-size: 1.18rem; margin: 0 0 0.5rem; }
.card-title a { color: var(--brand-dark); text-decoration: none; }
.card-title a:hover { color: var(--accent-dark); }
.card-excerpt { color: var(--ink); font-size: 0.95rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    padding-top: 0.6rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--accent-dark);
}

/* ---------- Single / page content ---------- */
.entry-header { margin-bottom: 1.4rem; }
.entry-title { font-size: 2.15rem; }
.entry-meta { color: var(--muted); font-size: 0.88rem; }
.entry-content { font-size: 1.04rem; }
.entry-content img { border-radius: 10px; display: block; }
.entry-content h2, .entry-content h3 { margin-top: 1.6em; }
.entry-content blockquote {
    margin: 1.4em 0;
    padding: 0.4em 1.2em;
    border-left: 4px solid var(--accent);
    background: var(--soft);
    color: var(--brand-dark);
}
.entry-thumb { margin: 0 0 1.6rem; }
.entry-thumb img { width: 100%; border-radius: 12px; display: block; object-fit: cover; }

table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--line);
    margin: 1.2em 0;
}
th, td {
    border: 1px solid var(--line);
    padding: 0.6em 0.8em;
    text-align: left;
}
th { background: var(--soft); }

/* ---------- Front page sections ---------- */
.front .site-main { padding-top: 0; }
.section { padding: 3rem 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-alt { background: var(--soft); }
.section-head { max-width: 640px; margin-bottom: 1.8rem; }
.section-head p { color: var(--muted); margin: 0; }
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--accent-dark);
    font-family: -apple-system, sans-serif;
}

/* Hero / text + illustration */
.split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.4rem;
    align-items: center;
}
.split-rev .split-media { order: -1; }
.split-text h2 { font-size: 2.2rem; }
.split-text .lead { font-size: 1.12rem; color: var(--ink); }
.split-media img { width: 100%; border-radius: 16px; display: block; }

.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 0.7rem 1.4rem;
    border-radius: 10px;
    transition: background .15s ease;
}
.btn:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost {
    background: transparent;
    color: var(--brand-dark);
    border: 1px solid var(--brand);
}
.btn-ghost:hover { background: var(--brand); color: #fff; }

/* Pillar grid */
.pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.4rem;
}
.pillar {
    background: var(--card-bg);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1.5rem 1.4rem;
    min-width: 0;
}
.pillar-ico {
    width: 46px;
    height: 46px;
    margin-bottom: 0.9rem;
    color: var(--brand);
}
.pillar h3 { font-size: 1.18rem; margin-bottom: 0.4rem; }
.pillar p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Steps */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.6rem;
    counter-reset: step;
}
.step {
    position: relative;
    padding: 1.4rem 1.3rem 1.3rem;
    background: var(--card-bg);
    border: 1px solid var(--line);
    border-radius: 14px;
    min-width: 0;
}
.step::before {
    counter-increment: step;
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-family: Georgia, serif;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.9rem;
}
.step h3 { font-size: 1.12rem; margin-bottom: 0.35rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.94rem; }

/* FAQ */
.faq { max-width: 820px; }
.faq details {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--card-bg);
    margin-bottom: 0.85rem;
    padding: 0 1.2rem;
}
.faq summary {
    cursor: pointer;
    list-style: none;
    padding: 1rem 0;
    font-weight: 600;
    color: var(--brand-dark);
    font-family: Georgia, serif;
    font-size: 1.05rem;
    position: relative;
    padding-right: 1.8rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 0.9rem;
    font-size: 1.4rem;
    color: var(--accent-dark);
    line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 1rem; color: var(--muted); }

/* Latest posts heading row */
.latest-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.6rem;
    flex-wrap: wrap;
}
.latest-head .all-link { font-weight: 600; text-decoration: none; }

/* CTA accent */
.cta {
    background: var(--brand-dark);
    color: #fff;
    border-radius: 18px;
    padding: 2.6rem 2.2rem;
    text-align: center;
}
.cta h2 { color: #fff; }
.cta p { color: #d4e2e1; max-width: 620px; margin: 0 auto 1.4rem; }

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: center;
    margin: 2.4rem 0 0;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.7rem;
    border: 1px solid var(--line);
    border-radius: 9px;
    text-decoration: none;
    color: var(--brand-dark);
    background: var(--card-bg);
    font-size: 0.95rem;
}
.pagination a.page-numbers:hover { background: var(--soft); }
.pagination .page-numbers.current {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
.pagination .page-numbers.dots { border: none; background: none; }

/* ---------- Sidebar / widgets ---------- */
.widget {
    background: var(--card-bg);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1.3rem 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--ink);
}
.widget .widget-title,
.widget .widgettitle,
.widget h2 {
    font-size: 1.1rem;
    color: var(--brand-dark);
    margin: 0 0 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { margin: 0 0 0.65rem; line-height: 1.4; }
.widget a { color: var(--brand); text-decoration: none; }
.widget a:hover { color: var(--accent-dark); text-decoration: underline; }
.widget .post-date { display: block; font-size: 0.78rem; color: var(--muted); }

/* ---------- 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: 9px;
    font-size: 0.95rem;
    background: #fff;
    color: var(--ink);
}
.search-form button {
    border: none;
    background: var(--brand);
    color: #fff;
    padding: 0 1.1rem;
    border-radius: 9px;
    cursor: pointer;
    font-size: 0.95rem;
}
.search-form button:hover { background: var(--brand-dark); }

/* ---------- Comments ---------- */
.comments-area { margin-top: 2.6rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.comment-list { list-style: none; padding: 0; margin: 0 0 1.6rem; }
.comment-list ol { list-style: none; }
.comment-body { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.comment-author { font-weight: 600; }
.comment-meta { font-size: 0.8rem; color: var(--muted); }
.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: 9px;
    font-size: 0.95rem;
    margin-top: 0.3rem;
    background: #fff;
}
.comment-form p { margin-bottom: 1rem; }
.comment-form .submit {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
}

/* ---------- 404 ---------- */
.error-404 { text-align: center; padding: 2rem 0 3rem; }
.error-404 .big { font-size: 5rem; font-family: Georgia, serif; color: var(--brand); margin: 0; }

/* ---------- 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(230px, 1fr));
    gap: 2rem;
    padding: 3rem 0 2rem;
}
.footer-cols .widget {
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    color: var(--footer-ink);
}
.footer-cols .widget .widget-title,
.footer-cols .widget .widgettitle,
.footer-cols .widget h2 {
    color: #fff;
    border-bottom-color: var(--accent);
}
.footer-cols .widget a { color: var(--footer-ink); }
.footer-cols .widget a:hover { color: #fff; }
.footer-cols .widget .post-date { color: var(--footer-mut); }
.footer-cols .widget li { color: var(--footer-ink); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 1.2rem 0;
    font-size: 0.85rem;
    color: var(--footer-mut);
}

/* ---------- Cookie banner ---------- */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    background: var(--brand-dark);
    color: #eef4f3;
    padding: 0.9rem 1.2rem;
    font-size: 0.9rem;
    box-shadow: 0 -4px 18px rgba(0,0,0,.18);
}
.cookie-banner p { margin: 0; max-width: 760px; }
.cookie-banner a { color: #ffd9c7; }
.cookie-accept {
    border: none;
    background: var(--accent);
    color: #fff;
    padding: 0.55rem 1.3rem;
    border-radius: 9px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.cookie-accept:hover { background: var(--accent-dark); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; }
    .layout-single .content-area { width: 100%; }
    .split-rev .split-media { order: 0; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 1.7rem; }
    .entry-title { font-size: 1.7rem; }
    .nav-toggle { display: block; }
    .main-nav {
        flex-basis: 100%;
        display: none;
    }
    .main-nav.is-open { display: block; }
    .main-nav ul { flex-direction: column; gap: 0.15rem; }
    .header-inner { gap: 0.8rem; }
    .section { padding: 2.2rem 0; }
    .cta { padding: 2rem 1.2rem; }
}
