/* ==========================================================================
   Upkeep Plumbing — block layer
   Adapts the component library in main.css to native block markup
   (core Group / Heading / Paragraph / List / Details / Image / Buttons and
   the Upkeep blocks). Loaded after main.css on the front end and inside the
   editor canvas, so pages look the same in both.
   ========================================================================== */

/* 1. Page wrappers -------------------------------------------------------- */

/* Pages built from full-width sections (Home, About). Anything added outside
   a section still sits in the normal content column. */
.up-content--blocks{display:block}
.up-content--blocks>:not(.up-section):not(.alignfull){width:100%;max-width:var(--up-container);margin-inline:auto;padding-inline:var(--up-gutter)}
.up-content--blocks>:not(.up-section):not(.alignfull):first-child{margin-top:3rem}
.up-content--blocks>:not(.up-section):not(.alignfull):last-child{margin-bottom:4rem}

/* Core block defaults that fight the design */
.wp-block-group{box-sizing:border-box}
.up-section .wp-block-image,.up-block .wp-block-image{margin-bottom:0}

/* 2. Utilities (replace the old inline styles) ---------------------------- */
.up-mb-0{margin-bottom:0!important}
.up-mb-05{margin-bottom:.5rem!important}
.up-mb-1{margin-bottom:1rem!important}
.up-mb-15{margin-bottom:1.5rem!important}
.up-mb-3{margin-bottom:3rem!important}
.up-mt-05{margin-top:.5rem!important}
.up-mt-15{margin-top:1.5rem!important}
.up-narrow{max-width:880px;margin-inline:auto}
.up-wide{max-width:1100px;margin-inline:auto}
.up-grid--flush{gap:0}
.up-grid--gap-sm{gap:1rem}
.up-small-muted{font-size:.9rem!important;color:#6c757d}
.up-note{margin:1rem 0 0;font-size:.93rem!important;color:#6c757d}
.up-heading{font-size:2.3rem;font-weight:800;color:var(--up-dark);margin-bottom:1.25rem}
@media (max-width:767.98px){.up-heading{font-size:1.85rem}}

/* Prose columns: buttons and cards never take the link underline, and
   headings inside components keep their own spacing. */
.up-prose a.up-btn,.up-prose a.up-card,.up-prose .wp-block-button__link{text-decoration:none}
.up-prose .up-type-card h3,.up-prose .up-rule-band h3,.up-prose .up-compare h3{margin-top:0}

/* 3. Section titles ------------------------------------------------------- */
.up-section-title>:last-child{margin-bottom:0}
.up-section-title--left{text-align:left;margin-bottom:1.5rem}
.up-section-title--left h2{margin-bottom:1rem}
.up-section-title--left p{max-width:none;margin:0}

/* 4. Buttons (core Buttons block styled as the theme button) -------------- */
.wp-block-button .wp-block-button__link{
  display:inline-flex;align-items:center;justify-content:center;gap:.5rem;
  background:var(--up-accent);color:#fff;border:2px solid transparent;border-radius:50px;
  padding:.75rem 2rem;font-size:1rem;font-weight:700;line-height:1.5;text-transform:uppercase;letter-spacing:1px;
  text-decoration:none;transition:all .3s;
}
.wp-block-button .wp-block-button__link:hover,.wp-block-button .wp-block-button__link:focus-visible{background:var(--up-accent-hover);color:#fff;transform:translateY(-2px);box-shadow:0 5px 15px rgba(255,107,53,.4)}
.up-btn-arrow .wp-block-button__link::after{
  content:'';flex:none;width:1em;height:1em;background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1 8a.5.5 0 0 1 .5-.5h11.793l-3.147-3.146a.5.5 0 0 1 .708-.708l4 4a.5.5 0 0 1 0 .708l-4 4a.5.5 0 0 1-.708-.708L13.293 8.5H1.5A.5.5 0 0 1 1 8z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1 8a.5.5 0 0 1 .5-.5h11.793l-3.147-3.146a.5.5 0 0 1 .708-.708l4 4a.5.5 0 0 1 0 .708l-4 4a.5.5 0 0 1-.708-.708L13.293 8.5H1.5A.5.5 0 0 1 1 8z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.up-section-cta{margin-top:3rem}
.up-section-cta .wp-block-button__link{font-size:1.25rem}

/* 5. Cards & features ----------------------------------------------------- */
.up-card--link h4{transition:color .3s}

/* Meet Glenn panel (Home) */
.up-panel{padding:3rem;background:#f8f9fa;border-radius:1rem;text-align:center}
.up-panel h3{margin-top:0}
.up-panel__role{font-size:1.25rem;font-weight:300}
.up-panel .up-chips{justify-content:center;margin-top:1.5rem}
@media (max-width:767.98px){.up-panel{padding:2rem 1.25rem}}

/* Round portrait from a core Image block */
.wp-block-image.up-avatar-fig{margin:0 auto 1rem}
.up-avatar-fig img{display:block;width:160px;height:160px;max-width:100%;margin:0 auto;border-radius:50%;object-fit:cover;border:4px solid #fff;box-shadow:0 .5rem 1.25rem rgba(0,43,92,.2)}
.up-avatar-fig--lg img{width:220px;height:220px}
.home .up-panel .up-avatar-fig img{width:300px;height:300px}
@media (max-width:400px){.home .up-panel .up-avatar-fig img{width:240px;height:240px}}

/* Person card (About) */
.up-person{text-align:center}
.up-person__name{margin:0;font-size:1.2rem;font-weight:700;color:var(--up-dark)}
.up-person__role{margin:0;font-size:.875em;color:#6c757d}

/* Credentials (About) */
.up-grid--creds{grid-template-columns:1fr 1fr;gap:1rem;margin-top:1.5rem}
.up-cred__title{margin:0 0 .25rem;font-weight:700;color:var(--up-dark)}
.up-cred__text{margin:0;font-size:.875em;line-height:1.5;color:#67788c}

/* Testimonials: the stars and author are paragraphs too */
.up-testimonial p.up-testimonial__stars{margin-bottom:1rem;font-size:1.2rem;font-style:normal}
.up-testimonial p.up-testimonial__author{margin:0;font-size:1rem;font-style:normal}

/* Owner quote: core Quote block uses <cite> */
.wp-block-quote.up-quote cite,.up-quote cite{display:block;font-size:.95rem;font-weight:700;font-style:normal;color:var(--up-primary)}
.up-quote>p:last-of-type{margin-bottom:.75rem}

/* "What you can expect" (About) */
.up-promise__item{display:flex;gap:1rem;align-items:flex-start;padding:1.05rem 0;border-bottom:1px solid #dbe7f3}
.up-promise__item:last-child{border-bottom:0}
.up-promise__item>.up-icon{flex:none;margin-top:.2rem;font-size:1.45rem;color:var(--up-accent)}
.up-promise__title{margin:0;font-size:1.05rem;font-weight:700;color:var(--up-dark)}
.up-promise__text{margin:0;color:#55657a}

/* Licence plate (About) */
.up-licence__label{display:block;margin:0 0 .25rem;font-size:.72rem;letter-spacing:1.5px;text-transform:uppercase;opacity:.8}
.up-licence__no{margin:0}
.up-licence__text{max-width:430px}
.up-licence__text p{margin:0;font-size:.98rem;line-height:1.6}
.up-tag{display:inline-block;margin-left:.25rem;padding:.25rem .5rem;border-radius:.375rem;background:#ffc107;color:#000;font-size:.8rem;line-height:1.2;vertical-align:middle}

/* Map */
.up-map--shadow{box-shadow:0 .5rem 1rem rgba(0,0,0,.15)}

/* 6. Service-page components --------------------------------------------- */
.up-danger>p{margin:0}
.up-callout .up-danger{margin-bottom:1rem}
.up-rule-band>:last-child{margin-bottom:0}

/* Timeline: the date is the first bold run in each item */
.up-timeline li>strong:first-child{display:block;font-size:.92rem;font-weight:800;letter-spacing:.5px;color:var(--up-dark)}

/* Type cards */
.up-type-card p.up-type-card__meta{margin:0;font-size:.82rem;line-height:1.5;color:var(--up-dark)}

/* "What's included" tick list */
.up-incl__item{display:flex;gap:.8rem;align-items:flex-start;padding:.75rem 0;border-bottom:1px solid #e6eef7}
.up-incl__item:last-child{border-bottom:0}
.up-incl__title{margin:0;font-weight:700}
.up-incl__text{margin:0;color:#6c757d}

/* FAQ answers are paragraphs inside core Details */
.up-faq details>p+p{padding-top:0}

/* Related cards row */
.up-rel{color:inherit}

/* 7. Fixes from staging review (0.3.1) ------------------------------------ */
/* Boxes in a service-page column need air before the next heading. */
.up-svc-main>.wp-block-group:not(.up-block){margin-bottom:1.75rem}
/* Form and contact-box headings inside a prose column keep their own spacing,
   and the contact box links keep the box's own (non-underlined) style. */
.up-prose .up-form__title,.up-prose .up-contact-info h3,.up-prose .up-contact-info h5{margin-top:0}
.up-prose .up-contact-info a{text-decoration:none}
.up-prose .up-contact-info a:hover{text-decoration:underline}
