/*
Theme Name: SafeNestMovers
Theme URI: https://dzala.dmitry-rogg.vn.ua/
Author: MediWeb
Author URI: https://dzala.dmitry-rogg.vn.ua/
Description: Custom theme for the Dzala / SafeNestMovers general contractor site. Built on ACF Pro flexible content + Contact Form 7, from the static dist template.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: safenestmovers
*/

:root {
    --snm-primary: #d9a14c;
    --snm-ink: #ffffff;
    --snm-muted: #c2c6c9;
    --snm-border: #3f4448;
    --snm-light: #34393d;
}

/* ============================================================
   Default page shell (page.php — pages with NO template)
   ============================================================ */
.page--default {
    padding: clamp(2rem, 4vw + 1rem, 4.5rem) 0 clamp(2.5rem, 4vw + 1rem, 5rem);
}
.entry__container {
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2rem);
}
.entry__head {
    margin-bottom: clamp(1.5rem, 2vw + 1rem, 2.5rem);
}
.entry__title {
    margin: 0 0 .75rem;
    font-family: var(--font-seccondary, var(--font-main, sans-serif));
    font-weight: 800;
    line-height: 1.1;
    color: var(--snm-ink);
    font-size: clamp(2rem, 3vw + 1.25rem, 3.25rem);
}
.entry__cover {
    margin: 0 0 clamp(1.5rem, 3vw + 1rem, 2.5rem);
}
.entry__cover img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 1.25rem;
    object-fit: cover;
}

/* ============================================================
   Rich content typography — shared by page content (.entry-content)
   and blog post content (.editor). Renders Gutenberg blocks nicely.
   ============================================================ */
.entry-content,
.editor {
    color: var(--snm-ink);
    font-family: var(--font-main, system-ui, sans-serif);
    font-size: 1.0625rem;
    font-weight: 500;
    line-height: 1.75;
}
.entry-content > *,
.editor > * {
    margin-top: 0;
    margin-bottom: 1.35rem;
}
.entry-content > *:last-child,
.editor > *:last-child {
    margin-bottom: 0;
}
.entry-content p,
.editor p {
    margin: 0 0 1.35rem;
}

/* Headings */
.entry-content :is(h1, h2, h3, h4, h5, h6),
.editor :is(h1, h2, h3, h4, h5, h6) {
    font-family: var(--font-seccondary, var(--font-main, sans-serif));
    font-weight: 800;
    line-height: 1.2;
    color: var(--snm-ink);
    margin: 2.25rem 0 1rem;
}
.entry-content h2, .editor h2 { font-size: clamp(1.6rem, 1.2vw + 1.25rem, 2.15rem); }
.entry-content h3, .editor h3 { font-size: clamp(1.35rem, .8vw + 1.1rem, 1.7rem); }
.entry-content h4, .editor h4 { font-size: clamp(1.15rem, .5vw + 1rem, 1.35rem); }
.entry-content :is(h1,h2,h3):first-child,
.editor :is(h1,h2,h3):first-child { margin-top: 0; }

/* Links */
.entry-content a, .editor a {
    color: var(--snm-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--snm-primary);
    transition: color .2s ease;
}
.entry-content a:hover, .editor a:hover { color: var(--snm-muted); }

/* Lists */
.entry-content :is(ul, ol),
.editor :is(ul, ol) {
    margin: 0 0 1.35rem;
    padding-left: 1.4rem;
}
.entry-content li, .editor li { margin-bottom: .5rem; padding-left: .25rem; }
.entry-content :is(ul, ol), .editor :is(ul, ol) { list-style-position: outside; }
.entry-content ol, .editor ol { padding-left: 1.75rem; }
.entry-content ol > li::marker, .editor ol > li::marker { color: var(--snm-primary); font-weight: 700; }
.entry-content ul, .editor ul { list-style: none; padding-left: 0; }
.entry-content ul > li, .editor ul > li { position: relative; padding-left: 1.75rem; }
.entry-content ul > li::before,
.editor ul > li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .62em;
    width: .55rem;
    height: .55rem;
    border-radius: 50%;
    background: var(--snm-primary);
}
.entry-content ol, .editor ol { padding-left: 1.25rem; }

/* Images / figures + Gutenberg image block */
.entry-content :is(img, .wp-block-image img),
.editor :is(img, .wp-block-image img) {
    display: block;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 1.25rem;
}

/* если нужна картинка в исходных пропорциях — класс is-style-natural у блока */
.entry-content .wp-block-image.is-style-natural img,
.editor .wp-block-image.is-style-natural img { aspect-ratio: auto; height: auto; }
.entry-content figure, .editor figure { margin: 0 0 1.6rem; }
.entry-content figcaption,
.editor figcaption,
.entry-content .wp-element-caption,
.editor .wp-element-caption {
    margin-top: .6rem;
    color: var(--snm-muted);
    font-size: .9rem;
    text-align: center;
}
.entry-content figure.alignleft, .editor figure.alignleft { float: left; max-width: 50%; margin: .25rem 1.75rem 1.25rem 0; }
.entry-content figure.alignright, .editor figure.alignright { float: right; max-width: 50%; margin: .25rem 0 1.25rem 1.75rem; }
.entry-content figure.aligncenter, .editor figure.aligncenter { margin-left: auto; margin-right: auto; }

/* Gutenberg wide/full alignment */
.entry-content .alignwide, .editor .alignwide { width: min(100%, 1100px); margin-left: 50%; transform: translateX(-50%); }
.entry-content .alignfull, .editor .alignfull { width: 100vw; margin-left: 50%; transform: translateX(-50%); border-radius: 0; }

/* Gutenberg columns */
.entry-content .wp-block-columns,
.editor .wp-block-columns {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(1.25rem, 3vw, 2.5rem);
    margin: 0 0 1.6rem;
    align-items: flex-start;
}
.entry-content .wp-block-column,
.editor .wp-block-column {
    flex: 1 1 0;
    min-width: 0;
}
.entry-content .wp-block-column > *:last-child,
.editor .wp-block-column > *:last-child { margin-bottom: 0; }

/* Buttons */
.entry-content .wp-block-buttons,
.editor .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 1rem; }
.entry-content .wp-block-button__link,
.editor .wp-block-button__link {
    display: inline-block;
    padding: .75rem 1.75rem;
    border-radius: 999px;
    background: var(--snm-primary);
    color: #23272a;
    font-weight: 700;
    text-decoration: none;
}

/* Blockquote */
.entry-content :is(blockquote, .wp-block-quote),
.editor :is(blockquote, .wp-block-quote) {
    margin: 1.9rem 0;
    padding: 1.25rem 1.6rem;
    border-left: 4px solid var(--snm-primary);
    border-radius: .6rem;
    background: var(--snm-light);
    font-family: var(--font-seccondary, var(--font-main, sans-serif));
    font-size: 1.2rem;
    font-style: italic;
}
.entry-content blockquote p:last-child, .editor blockquote p:last-child { margin-bottom: .5rem; }
.entry-content cite, .editor cite { display: block; color: var(--snm-muted); font-size: .95rem; font-style: normal; }

/* Tables */
.entry-content table, .editor table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.6rem;
    font-size: 1rem;
}
.entry-content :is(th, td), .editor :is(th, td) {
    padding: .75rem 1rem;
    border: 1px solid var(--snm-border);
    text-align: left;
}
.entry-content th, .editor th { background: var(--snm-light); font-weight: 700; }

/* Separator / embeds */
.entry-content :is(hr, .wp-block-separator),
.editor :is(hr, .wp-block-separator) {
    border: none;
    height: 1px;
    background: var(--snm-border);
    margin: 2.25rem 0;
}
.entry-content .wp-block-embed, .editor .wp-block-embed { margin: 0 0 1.6rem; }

/* Mobile */
@media (max-width: 48rem) {
    .entry-content .wp-block-columns,
    .editor .wp-block-columns { flex-direction: column; gap: 1.25rem; }
    .entry-content :is(figure.alignleft, figure.alignright),
    .editor :is(figure.alignleft, figure.alignright) {
        float: none;
        max-width: 100%;
        margin: 0 0 1.25rem;
    }
    .entry-content .alignwide, .editor .alignwide,
    .entry-content .alignfull, .editor .alignfull {
        width: 100%;
        margin-left: 0;
        transform: none;
    }
}

/* ============================================================
   Blog post shell (single.php) — narrow centred column
   ============================================================ */
.content .content__container {
    max-width: 61.25rem; /* 980px */
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--padding-container, 1.25rem);
    padding-right: var(--padding-container, 1.25rem);
}
