/*
Theme Name: Safe Nest Movers
Theme URI: https://safe-nest-movers.dmitry-rogg.vn.ua/
Author: MediWeb
Description: Custom moving-company theme built from the dist layout. ACF Pro flexible content page builder + Contact Form 7.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: safe-nest-movers
*/

/* Most visual styles ship from /assets/css/*.min.css (the dist build).
   Below: layout + typography for the templates that have no dist markup
   (single post, default page) and the editor/Gutenberg content area. */

.admin-bar .header { top: 32px; }

/* ---------------------------------------------------------------------------
   Syne descender clipping fix.
   Syne is a display font with deep descenders. Elements animated via
   `data-anim` get an inline CSS `transform`; on GPU-composited layers Chrome
   clips glyph ink that overflows a tight line box, cutting the tails of
   g / y / p (e.g. "Blog" in the nav, "Residential Moving" titles). Extending
   the border-box downward with a little padding gives the tails room to paint.
--------------------------------------------------------------------------- */
.header__nav a,
.header__nav-parent > a { padding-bottom: .22em; }

.hero__title,
.hero-form__title,
.service-content__title,
.area-about__title,
.about__title,
.process__title,
.faq__title,
.areas__title,
.team__title,
.reviews__title,
.utp__item-title,
.blog__title,
.blog-single__title,
.page-title,
.title { padding-bottom: .1em; }

/* Breadcrumbs: darker text for readability on light backgrounds. */
.breadcrumbs,
.breadcrumbs__link,
.breadcrumbs__current,
.breadcrumbs__item {
    color: #14181f;
}
.breadcrumbs__link { opacity: .75; }
.breadcrumbs__link:hover { opacity: 1; }
.breadcrumbs__current { font-weight: 600; }

/* ---------------------------------------------------------------------------
   Readable content column: single post + template-less pages → 980px, centred
--------------------------------------------------------------------------- */
:root { --snm-content: 900px; } /* inner text column ≈ 860px after padding */

.page--blog-single,
.page--default {
    padding-bottom: 5rem;
}

.page--blog-single .blog-single__container,
.page--default .blog__container {
    max-width: var(--snm-content);
    margin-inline: auto;
    padding-inline: 1.25rem;
}

/* Single post is a single centred column (aside stacks under the article). */
.blog-single__row { display: block; }

.blog-single__head { margin-bottom: 1.5rem; }
.blog-single__title { margin: 0 0 .5rem; }
.blog-single__date { color: var(--grey, #7a7a7a); font-weight: 500; }

/* Featured image spans the full content-container width, with rounded corners. */
.blog-single__media {
    margin-block: 2rem;
}
.blog-single__media img {
    display: block;
    width: 100%;
    height: clamp(220px, 38vw, 460px);
    object-fit: cover;
    border-radius: 24px;
}

/* Back link + aside */
.blog-single__back {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-top: 2rem;
}
.blog-single__aside { margin-top: 3rem; }
.blog-single__aside-title {
    font-size: 1.25rem;
    margin: 0 0 1rem;
}
.blog-single__aside-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.blog-single__aside .blog-card--mini {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    height: 100%;
    padding: 1.25rem;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: border-color .25s ease, box-shadow .25s ease;
}
.blog-single__aside .blog-card--mini:hover {
    border-color: var(--green, #bede2b);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
}
.blog-single__aside .blog-card__title { font-weight: 600; }
.blog-single__aside .blog-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-top: auto;
    font-size: .875rem;
}

/* ---------------------------------------------------------------------------
   Editor / Gutenberg content — extends the dist `.editor` base.
   NOTE: dist main.min.css already styles `.editor` (font sizes, list bullets,
   tables). We only fix/extend here — DON'T re-declare list padding (would
   double-indent the custom bullets) and DON'T force heading sizes.
--------------------------------------------------------------------------- */

/* dist sets `text-wrap:balance`, which splits short paragraphs into equal
   half-width lines. `pretty` fills each line normally. This is the fix for
   the "text only uses the left half" issue. */
.editor {
    line-height: 1.65;
    text-wrap: pretty;
}
.editor > *:first-child { margin-top: 0; }
.editor p:not(:last-child) { margin-bottom: 1rem; }
.editor :is(h2, h3, h4, h6):not(:first-child) { margin-top: 1.6em; }
.editor :is(h2, h3, h4, h6) { margin-bottom: .5em; line-height: 1.25; }
.editor h6 { font-size: .9375rem; text-transform: uppercase; letter-spacing: .03em; opacity: .8; }

/* Content images: show at natural ratio (dist forces 361/314 crop) + rounded. */
.editor img,
.editor .wp-block-image img {
    aspect-ratio: auto;
    max-width: 100%;
    height: auto;
    border-radius: 20px;
}
.editor figure { margin: 1.5rem 0; }
.editor figure:first-child { margin-top: 0; }
.editor figcaption { margin-top: .5rem; font-size: .875rem; opacity: .7; text-align: center; }

/* Blockquote — classic and Gutenberg. */
.editor blockquote,
.editor .wp-block-quote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--green-lime, #bede2b);
    background: rgba(0, 0, 0, .035);
    border-radius: 12px;
    font-style: italic;
}
.editor blockquote p:last-child,
.editor .wp-block-quote p:last-child { margin-bottom: 0; }

/* Gutenberg columns fallback (in case block-library layout CSS is stripped). */
.editor .wp-block-columns { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.editor .wp-block-column { flex: 1 1 0%; min-width: 220px; }

/* Keep wide/full aligned blocks inside the readable column. */
.editor .alignwide,
.editor .alignfull { max-width: 100%; margin-inline: 0; }
.editor .aligncenter { display: block; margin-inline: auto; }
.editor .alignright { float: right; margin: 0 0 1rem 1.5rem; }
.editor .alignleft { float: left; margin: 0 1.5rem 1rem 0; }

/* ---------------------------------------------------------------------------
   Contact Form 7 submit button
   The dist `.btn-gradient` paints its gradient via a ::before pseudo-element,
   but CF7 renders the submit as <input type="submit"> — a replaced element
   that cannot show ::before/::after. So the input stays transparent. Fix:
   paint the gradient directly on the input.
--------------------------------------------------------------------------- */
.wpcf7-form input[type="submit"].btn-gradient {
    background: linear-gradient(94.27deg, #84cc16 -152.71%, #0b5000 192.49%);
    color: var(--green-light, #bde481);
    border-color: transparent;
}
.wpcf7-form input[type="submit"].btn-gradient:hover,
.wpcf7-form input[type="submit"].btn-gradient:focus-visible {
    background: var(--green, #84cc16);
    color: var(--green-dark, #2d4a00);
}
/* Same idea for the outline variant if ever used on a submit input. */
.wpcf7-form input[type="submit"].btn-border {
    background: transparent;
    border: 1px solid var(--green, #84cc16);
    color: var(--text, #262321);
}

/* ---------------------------------------------------------------------------
   Area single: Google Maps iframe (fills the map container like the image)
--------------------------------------------------------------------------- */
.area-about__maps iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: 0;
    border-radius: 16px;
}
