/*
Theme Name: Perera Mortgages (GeneratePress child)
Theme URI: https://pereramortgages.co.uk
Template: generatepress
Author: Perera Mortgages
Description: Perera Mortgages child theme for GeneratePress. Same look as the 0.2.0 demo theme. GeneratePress provides the base and its updates; this child adds the Perera header, menu, footer and page layouts. All page content, the header menu and the footer links are managed in WordPress.
Version: 1.3.2
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.0
Text Domain: perera-mortgages
*/

/* ---- GeneratePress compatibility: let the Perera layout fill the page ---- */
body.pm-site { background: #fff; color: var(--pm-ink, #162942); font-family: Arial, sans-serif; font-size: 16px; line-height: 1.6; }
.pm-site #page.grid-container { max-width: none; width: auto; margin: 0; padding: 0; background: transparent; }
.pm-site #content.site-content { display: block; padding: 0; }
.pm-site .site-footer { background: transparent; }
/* GeneratePress zeroes and resets margins on text elements; put back browser spacing inside Perera sections.
   :where() keeps this weak, so every Perera component rule below still wins. */
.pm-site :where(.pm-main, .pm-site-header, .pm-site-footer) :where(h1, h2, h3, h4, h5, h6, p, ul, ol, blockquote, figure, details) { margin-block: revert; }
.pm-site :where(.pm-main) :where(h1, h2, h3, h4, h5, h6) { font-size: revert; line-height: revert; }
.pm-site :where(.pm-main) :where(ul, ol) { margin-inline: revert; padding-inline-start: revert; list-style: revert; }
.pm-site :where(.pm-main) :where(.pm-checks, .pm-post-list) { padding: 0; list-style: none; }
/* GeneratePress gives every button a grey background. */
.pm-site .pm-menu-toggle, .pm-site .pm-nav-dropdown__toggle { background: transparent; }
.pm-site .pm-menu-toggle:hover, .pm-site .pm-menu-toggle:focus,
.pm-site .pm-nav-dropdown__toggle:hover, .pm-site .pm-nav-dropdown__toggle:focus { background: transparent; }
.pm-site .wp-block-button.pm-button .wp-block-button__link { padding: 10px 20px; }
.pm-site .screen-reader-text.skip-link:focus { z-index: 100000; }



/* ---- Live 0.2.0 styles, unchanged ---- */

:root {
  --pm-navy: #0b1f3b;
  --pm-navy-deep: #07172c;
  --pm-gold: #c9a96a;
  --pm-ivory: #f8f5ee;
  --pm-ink: #162942;
  --pm-muted: #596576;
  --pm-line: #e2ddd3;
  --pm-serif: Georgia, "Times New Roman", serif;
  --pm-sans: Arial, sans-serif;
  --pm-content: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--pm-ink);
  background: #fff;
  font-family: var(--pm-sans);
  line-height: 1.6;
}
h1, h2, h3, h4, .wp-block-post-title { font-family: var(--pm-serif); font-weight: 400; }
a { color: inherit; }
img { max-width: 100%; height: auto; }

.wp-site-blocks { overflow: clip; }
.wp-site-blocks > * + *, .pm-main > * + * { margin-block-start: 0; }
.pm-hero > * + *, .pm-site-header + * { margin-block-start: 0; }

.pm-container { width: min(100% - 48px, var(--pm-content)); margin-inline: auto; }
.pm-kicker { margin: 0; color: #9a7535; font-size: 11px; font-weight: 800; letter-spacing: .19em; line-height: 1.4; text-transform: uppercase; }
.pm-kicker--light { color: #e1c17f; }
.pm-button .wp-block-button__link,
.pm-button > a {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 20px;
  border: 1px solid var(--pm-gold);
  border-radius: 7px;
  background: var(--pm-gold);
  color: var(--pm-navy);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.pm-button .wp-block-button__link:hover,
.pm-button > a:hover { transform: translateY(-2px); box-shadow: 0 8px 22px #07172c20; }
.pm-button--outline .wp-block-button__link { border-color: #c9a96a80; background: #ffffff0a; color: #fff; }
.pm-site-header { position: relative; z-index: 10; background: var(--pm-navy); border-bottom: 1px solid #ffffff1f; color: #fff; }
.pm-header-inner { display: flex; min-height: 88px; align-items: center; justify-content: space-between; gap: 26px; }
.pm-wordmark { display: inline-flex; flex-direction: column; color: var(--pm-ivory); line-height: 1; text-decoration: none; }
.pm-wordmark__name { font-family: var(--pm-serif); font-size: 29px; letter-spacing: .18em; }
.pm-wordmark__name span { color: var(--pm-gold); }
.pm-wordmark__descriptor { margin-top: 9px; color: var(--pm-gold); font-size: 10px; letter-spacing: .43em; }
.pm-navigation { margin-left: auto; }
.pm-navigation .wp-block-navigation__container { gap: 22px; }
.pm-navigation .wp-block-navigation-item__content { color: #fff; font-size: 14px; text-decoration: none; }
.pm-navigation .wp-block-navigation-item__content:hover { color: #e1c17f; }
.pm-navigation .wp-block-navigation-item__content[href^="tel:"] { color: var(--pm-gold); font-weight: 700; }
.pm-header-phone { color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; }
.pm-header-cta .wp-block-button__link { min-height: 44px; padding-inline: 18px; }
.pm-hero { position: relative; min-height: 530px; overflow: hidden; background: var(--pm-navy); color: #fff; }
.pm-hero__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 68% center; }
.pm-hero__image img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: inherit; }
.pm-hero::after { position: absolute; inset: 0; background: linear-gradient(90deg,#0b1f3bf5 0%,#0b1f3be6 30%,#0b1f3ba3 52%,#0b1f3b40 75%,#0b1f3b24 100%); content: ""; }
.pm-hero__inner { position: relative; z-index: 1; display: flex; min-height: 530px; align-items: center; }
.pm-hero__copy { max-width: 610px; padding-block: 55px; }
.pm-hero h1 { margin: 18px 0 22px; color: #fff; font-size: clamp(49px, 5vw, 64px); line-height: .98; }
.pm-hero h1 em, .pm-section-title em { color: var(--pm-gold); font-style: normal; }
.pm-hero__lead { max-width: 580px; margin: 0 0 14px; font-size: 20px; line-height: 1.45; }
.pm-hero__body { max-width: 550px; margin: 0 0 26px; color: #ffffffd6; font-size: 16px; line-height: 1.65; }
.pm-trust { border-bottom: 1px solid #e4ddd1; background: var(--pm-ivory); }
.pm-trust__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.pm-trust__item { padding: 21px 24px; border-right: 1px solid #ddd5c8; }
.pm-trust__item:last-child { border-right: 0; }
.pm-trust__item::before { display: block; width: 24px; height: 2px; margin-bottom: 12px; background: var(--pm-gold); content: ""; }
.pm-trust__item strong { display: block; margin-bottom: 5px; color: var(--pm-navy); }
.pm-trust__item span { color: var(--pm-muted); font-size: 13px; }
.pm-special { display: grid; grid-template-columns: 1fr 1fr; background: var(--pm-ivory); }
.pm-special__media { min-height: 440px; background: var(--pm-ivory) url("assets/images/foreign-national-couple.jpg") center / cover no-repeat; }
.pm-special__media img { display: block; width: 100%; height: 100%; min-height: 440px; object-fit: cover; }
.pm-special__copy { display: flex; align-items: center; padding: 55px; }
.pm-special__inner { max-width: 540px; }
.pm-section-title { margin: 14px 0 20px; color: var(--pm-navy); font-size: clamp(38px, 3.6vw, 47px); line-height: 1.04; }
.pm-special p { color: #4f5c6c; line-height: 1.7; }
.pm-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin: 22px 0 25px; padding: 0; list-style: none; }
.pm-checks li { position: relative; padding-left: 19px; color: var(--pm-ink); font-size: 14px; line-height: 1.45; }
.pm-checks li::before { position: absolute; left: 0; color: var(--pm-gold); font-weight: 800; content: "✓"; }
.pm-services { padding-block: 72px; }
.pm-services h2, .pm-process h2 { max-width: 760px; margin: 13px 0 8px; color: var(--pm-navy); font-size: clamp(35px, 3.2vw, 44px); line-height: 1.08; }
.pm-services__intro { max-width: 760px; color: var(--pm-muted); line-height: 1.6; }
.pm-service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 32px; }
.pm-service-card { position: relative; min-height: 175px; padding: 22px 20px; border: 1px solid var(--pm-line); border-radius: 12px; background: #fbfaf7; transition: transform .22s ease, box-shadow .22s ease; }
.pm-service-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px #0b1f3b12; }
.pm-service-card--featured { border-color: var(--pm-navy); background: var(--pm-navy); color: #fff; }
.pm-service-card__icon { display: grid; width: 35px; height: 35px; margin-bottom: 22px; place-items: center; border: 1px solid var(--pm-gold); border-radius: 50%; color: var(--pm-gold); }
.pm-service-card h3 { margin: 0 0 8px; color: var(--pm-navy); font-size: 20px; }
.pm-service-card--featured h3 { color: #fff; }
.pm-service-card p { margin: 0; color: #657080; font-size: 13px; line-height: 1.5; }
.pm-service-card--featured p { color: #ffffffb3; }
.pm-service-card__arrow { position: absolute; right: 18px; bottom: 16px; color: var(--pm-gold); }
.pm-services__more { margin-top: 24px; text-align: right; }
.pm-services__more a { color: var(--pm-navy); font-weight: 700; text-decoration-color: var(--pm-gold); text-underline-offset: 4px; }
.pm-sri { position: relative; overflow: hidden; background: var(--pm-navy-deep); color: #fff; }
.pm-sri__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pm-sri::after { position: absolute; inset: 0; background: linear-gradient(90deg,#051528fa,#051528db 43%,#05152838 78%); content: ""; }
.pm-sri__inner { position: relative; z-index: 1; padding-block: 88px; }
.pm-sri__copy { max-width: 600px; }
.pm-sri h2 { margin: 15px 0 23px; color: #fff; font-size: 48px; line-height: 1.05; }
.pm-sri p { color: #ffffffe0; line-height: 1.7; }
.pm-why { padding-block: 64px; background: var(--pm-ivory); }
.pm-why__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 30px; }
.pm-why__item { padding-top: 18px; border-top: 2px solid var(--pm-gold); }
.pm-why__item strong { color: var(--pm-navy); }
.pm-why__item p { color: var(--pm-muted); font-size: 14px; line-height: 1.55; }
.pm-process { padding-block: 72px; background: #fff; }
.pm-process__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 38px; border-top: 1px solid #ded8cc; }
.pm-process__step { padding: 27px 28px 0 0; border-right: 1px solid #ded8cc; }
.pm-process__step:last-child { border-right: 0; }
.pm-process__number { color: var(--pm-gold); font-family: var(--pm-serif); font-size: 30px; }
.pm-process__step h3 { margin: 9px 0 8px; color: var(--pm-navy); font-family: var(--pm-sans); font-size: 17px; font-weight: 700; }
.pm-process__step p { color: var(--pm-muted); font-size: 14px; line-height: 1.6; }
.pm-contact { padding-block: 68px; background: var(--pm-navy); color: #fff; }
.pm-contact h2 { margin: 15px 0; color: #fff; font-size: clamp(39px, 3.6vw, 48px); line-height: 1.05; }
.pm-contact h2 span { color: var(--pm-gold); }
.pm-contact__intro { color: #ffffffb8; }
.pm-contact__links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.pm-contact__link { display: inline-flex; min-height: 48px; align-items: center; padding: 12px 18px; border: 1px solid #c9a96a80; border-radius: 8px; background: #ffffff0a; color: #fff; font-weight: 700; text-decoration: none; }
.pm-contact__link:hover { background: #ffffff12; }
.pm-contact__link--primary { border-color: var(--pm-gold); background: var(--pm-gold); color: var(--pm-navy); }
.pm-inline-button { display: inline-flex; min-height: 46px; align-items: center; gap: 9px; padding: 10px 20px; border-radius: 7px; background: var(--pm-gold); color: var(--pm-navy); font-weight: 800; text-decoration: none; }
.pm-site-footer { padding-block: 42px 28px; background: #061426; color: #ffffffb0; font-size: 12px; line-height: 1.65; }
.pm-footer-top { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 32px; padding-bottom: 28px; margin-bottom: 24px; border-bottom: 1px solid #ffffff1f; }
.pm-footer-links { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.pm-footer-links a, .pm-footer-contact a { color: #e1c17f; text-decoration: none; }
.pm-footer-links .wp-block-navigation__container { gap: 10px 18px; }
.pm-footer-links .wp-block-navigation-item__content { color: #e1c17f; font-size: 12px; text-decoration: none; }
.pm-footer-contact a { display: block; margin-bottom: 7px; }
.pm-footer-legal p { max-width: 980px; margin: 0 0 9px; }
.pm-footer-risk { margin-top: 16px !important; color: #fff; font-weight: 700; letter-spacing: .02em; }
.pm-page-hero { padding-block: 76px 58px; background: var(--pm-ivory); }
.pm-page-hero h1 { max-width: 900px; margin: 15px 0 16px; color: var(--pm-navy); font-size: clamp(42px, 5vw, 62px); line-height: 1; }
.pm-page-hero p { max-width: 760px; color: var(--pm-muted); font-size: 18px; line-height: 1.6; }
.pm-page-hero .pm-page-intro { color: var(--pm-navy); font-family: var(--pm-serif); font-size: clamp(20px, 2vw, 23px); line-height: 1.5; }
.pm-page-lead { color: var(--pm-navy); font-family: var(--pm-serif); font-size: 22px; line-height: 1.5; }
.pm-page-content { padding-block: 56px 76px; }
.pm-page-content h2, .pm-page-content h3 { color: var(--pm-navy); }
.pm-page-content > .wp-block-heading { margin-top: 2.25em; font-size: clamp(30px, 3vw, 38px); line-height: 1.12; }
.pm-page-content > .wp-block-heading:first-child { margin-top: 0; }
.pm-page-content > p { max-width: 760px; color: #4f5c6c; line-height: 1.75; }
.pm-service-factors { margin-block: 38px; padding: 34px; border: 1px solid var(--pm-line); border-radius: 14px; background: var(--pm-ivory); }
.pm-service-factors > .wp-block-heading { margin: 0 0 22px; font-size: 30px; }
.pm-service-factor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pm-service-factor-grid > .wp-block-column { margin: 0; }
.pm-service-factor { height: 100%; padding: 20px; border: 1px solid #e5ded2; border-radius: 10px; background: #fff; }
.pm-service-factor h3 { margin: 0 0 8px; font-family: var(--pm-sans); font-size: 17px; font-weight: 700; }
.pm-service-factor p { margin: 0; color: var(--pm-muted); font-size: 14px; line-height: 1.6; }
.pm-service-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-block: 28px 48px; }
.pm-service-steps > .wp-block-column { margin: 0; }
.pm-service-step { height: 100%; padding: 22px; border-top: 2px solid var(--pm-gold); background: #fbfaf7; }
.pm-service-step .pm-process__number { margin: 0; color: #a98545; font-family: var(--pm-serif); font-size: 30px; }
.pm-service-step h3 { margin: 8px 0; font-family: var(--pm-sans); font-size: 17px; font-weight: 700; }
.pm-service-step p:last-child { margin-bottom: 0; color: var(--pm-muted); font-size: 14px; line-height: 1.65; }
.pm-page-content .wp-block-details { max-width: 800px; padding: 18px 0; border-bottom: 1px solid var(--pm-line); }
.pm-page-content .wp-block-details:first-of-type { border-top: 1px solid var(--pm-line); }
.pm-page-content .wp-block-details summary { color: var(--pm-navy); font-weight: 700; cursor: pointer; }
.pm-page-content .wp-block-details p { margin: 12px 0 0; color: var(--pm-muted); line-height: 1.7; }
.pm-page-cta { padding-block: 52px; background: var(--pm-navy); color: #fff; }
.pm-page-cta h2 { color: #fff; font-size: 38px; }
.pm-skip-link { position: absolute; z-index: 100; top: 8px; left: 8px; transform: translateY(-150%); padding: 10px 14px; background: #fff; color: var(--pm-navy); }
.pm-skip-link:focus { transform: translateY(0); }

@media (max-width: 1160px) {
  .pm-navigation .wp-block-navigation__container { gap: 14px; }
  .pm-header-cta, .pm-header-phone { display: none; }
  .pm-service-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 800px) {
  html { scroll-behavior: auto; }
  .pm-container { width: min(100% - 40px, var(--pm-content)); }
  .pm-header-inner { min-height: 92px; }
  .pm-wordmark__name { font-size: 26px; }
  .pm-navigation { margin-left: 0; }
  .pm-header-phone { display: none; }
  .pm-navigation .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none; }
  .pm-navigation .wp-block-navigation__responsive-container-open { display: flex; }
  .pm-navigation .wp-block-navigation__responsive-container.is-menu-open { z-index: 30; padding: 22px; background: var(--pm-navy); }
  .pm-navigation .wp-block-navigation__responsive-container-content { align-items: stretch; }
  .pm-navigation .wp-block-navigation__container { width: 100%; align-items: stretch; gap: 0; }
  .pm-navigation .wp-block-navigation-item { padding-block: 12px; border-bottom: 1px solid #ffffff1f; }
  .pm-navigation .wp-block-navigation-item__content { font-size: 16px; }
  .pm-navigation .wp-block-navigation__responsive-container-close,
  .pm-navigation .wp-block-navigation__responsive-container-open { color: var(--pm-gold); }
  .pm-hero, .pm-hero__inner { min-height: 590px; }
  .pm-hero__image { object-position: 72% center; }
  .pm-hero::after { background: linear-gradient(90deg,#0b1f3be3 0%,#0b1f3bba 52%,#0b1f3b45 100%); }
  .pm-hero__copy { max-width: 94%; padding-block: 45px; }
  .pm-hero h1 { font-size: 49px; }
  .pm-hero__lead { font-size: 19px; }
  .pm-hero__body { font-size: 15px; }
  .pm-trust__grid { grid-template-columns: 1fr 1fr; }
  .pm-trust__item { padding: 18px 14px; }
  .pm-trust__item:nth-child(2) { border-right: 0; }
  .pm-special { grid-template-columns: 1fr; }
  .pm-special__media, .pm-special__media img { min-height: 0; height: 290px; }
  .pm-special__copy { padding: 38px 22px 44px; }
  .pm-section-title { font-size: 42px; }
  .pm-checks { grid-template-columns: 1fr; }
  .pm-services, .pm-process { padding-block: 54px; }
  .pm-service-grid { gap: 11px; }
  .pm-service-card { min-height: 155px; padding: 17px 15px; }
  .pm-service-card h3 { font-size: 17px; }
  .pm-service-card p { font-size: 12px; }
  .pm-why__grid { grid-template-columns: 1fr; }
  .pm-sri__inner { padding-block: 54px; }
  .pm-sri h2 { font-size: 36px; }
  .pm-process h2 { font-size: 35px; }
  .pm-process__grid { grid-template-columns: 1fr; gap: 0; margin-top: 28px; }
  .pm-process__step { padding: 22px 0; border-right: 0; border-bottom: 1px solid #ded8cc; }
  .pm-process__step:last-child { border-bottom: 0; }
  .pm-footer-top { grid-template-columns: 1fr; gap: 22px; }
  .pm-page-hero { padding-block: 54px 38px; }
  .pm-page-content { padding-block: 38px 54px; }
  .pm-page-lead { font-size: 20px; }
  .pm-service-factors { padding: 22px 16px; }
  .pm-service-factors > .wp-block-heading { font-size: 26px; }
  .pm-service-factor-grid, .pm-service-steps { grid-template-columns: 1fr; gap: 10px; }
  .pm-service-step { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Prevent the site editor from introducing spacing between full-bleed sections. */
:where(.wp-site-blocks) > :where(.wp-block-template-part, main) { margin-block-start: 0; }
.pm-main > .wp-block-html, .pm-main > .wp-block-group { margin-block-start: 0; }

/* v0.2.0: Code-first theme refinements; no Gutenberg navigation dependence. */
body { overflow-x: clip; }
.pm-main { display: block; }
.pm-site-header { z-index: 80; }
.pm-header-inner { gap: 16px; }
.pm-header-inner > .pm-wordmark { flex-shrink: 0; }
.pm-header-nav { display: flex; gap: clamp(11px, 1.55vw, 22px); align-items: center; margin-left: auto; white-space: nowrap; }
.pm-header-nav > a,
.pm-nav-dropdown__toggle {
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font: 500 13px/1.4 var(--pm-sans);
  text-decoration: none;
  white-space: nowrap;
}
.pm-header-nav > a:hover,
.pm-header-nav > a:focus-visible,
.pm-nav-dropdown__toggle:hover,
.pm-nav-dropdown__toggle:focus-visible { color: var(--pm-gold); }
.pm-nav-dropdown { position: relative; }
.pm-nav-dropdown__toggle { padding: 10px 0; }
.pm-nav-dropdown__toggle span { color: var(--pm-gold); margin-left: 2px; }
.pm-nav-dropdown__panel {
  position: absolute;
  top: calc(100% - 2px);
  left: -16px;
  z-index: 85;
  display: none;
  width: 240px;
  max-height: min(70vh, 500px);
  overflow-y: auto;
  padding: 10px 0;
  border: 1px solid #fff2;
  border-radius: 7px;
  background: #102b49;
  box-shadow: 0 18px 30px #0614264d;
}
.pm-nav-dropdown:hover .pm-nav-dropdown__panel,
.pm-nav-dropdown:focus-within .pm-nav-dropdown__panel,
.pm-nav-dropdown.is-open .pm-nav-dropdown__panel { display: block; }
.pm-nav-dropdown__panel a { display: block; padding: 9px 16px; color: #fff; font-size: 13px; font-weight: 500; line-height: 1.35; text-decoration: none; white-space: normal; }
.pm-nav-dropdown__panel a:hover, .pm-nav-dropdown__panel a:focus-visible { background: #ffffff12; color: var(--pm-gold); }
.pm-header-phone { font-size: 13px; }
.pm-header-action { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 15px; border-radius: 6px; border: 1px solid var(--pm-gold); background: var(--pm-gold); color: var(--pm-navy); font-size: 13px; font-weight: 800; line-height: 1.2; text-decoration: none; white-space: nowrap; }
.pm-header-action:hover { background: #e1bd78; }
.pm-menu-toggle { display: none; }
.pm-service-card { display: block; text-decoration: none; }
.pm-service-card h3, .pm-service-card p, .pm-service-card span { text-decoration: none; }
.pm-service-card:focus-visible { outline: 3px solid var(--pm-gold); outline-offset: 3px; }
.pm-contact__links--on-white .pm-contact__link:not(.pm-contact__link--primary) { color: var(--pm-navy); border-color: var(--pm-gold); background: #fff; }
.pm-footer-links a:focus-visible, .pm-footer-contact a:focus-visible { outline: 2px solid var(--pm-gold); outline-offset: 4px; }
.pm-footer-links { align-content: start; }
.pm-footer-legal a { color: #e1c17f; }
.pm-page-cta p { color: #d4dee7; }
.pm-page-cta h2 { margin-top: 0; }
.pm-page-content { min-height: 200px; }
.pm-page-content > h2 { font-size: clamp(30px, 3vw, 38px); }
.pm-main > * { margin-block: 0; }
.pm-fn .fn-main { display: block; }

@media (max-width: 1160px) {
  .pm-header-phone { display: none; }
  .pm-header-inner { gap: 14px; }
  .pm-header-nav { gap: 13px; }
}
@media (max-width: 1000px) {
  .pm-header-action { display: none; }
  .pm-header-inner { position: relative; min-height: 80px; }
  .pm-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 10px;
    border: 1px solid #ffffff66;
    border-radius: 5px;
    background: transparent;
    cursor: pointer;
  }
  .pm-menu-toggle span { display: block; width: 100%; height: 2px; background: var(--pm-gold); }
  .pm-menu-toggle:focus-visible { outline: 2px solid var(--pm-gold); outline-offset: 3px; }
  .pm-header-nav {
    position: absolute;
    z-index: 100;
    top: 100%;
    left: -20px;
    right: -20px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 12px 20px 22px;
    background: var(--pm-navy);
    border-top: 1px solid #ffffff26;
    box-shadow: 0 16px 26px #07172c3d;
    white-space: normal;
  }
  .pm-header-nav.is-open { display: flex; }
  .pm-header-nav > a, .pm-nav-dropdown__toggle { display: block; width: 100%; padding: 13px 4px; border-bottom: 1px solid #ffffff1c; text-align: left; font-size: 15px; }
  .pm-nav-dropdown__panel { position: static; width: 100%; max-height: unset; border: 0; border-radius: 0; padding: 0 0 8px 12px; box-shadow: none; background: #132e4b; }
  .pm-nav-dropdown:hover .pm-nav-dropdown__panel { display: none; }
  .pm-nav-dropdown.is-open .pm-nav-dropdown__panel, .pm-nav-dropdown:focus-within .pm-nav-dropdown__panel { display: block; }
  .pm-nav-dropdown__panel a { padding: 10px 15px; }
}
@media (max-width: 600px) {
  .pm-header-nav { left: -20px; right: -20px; }
  .pm-service-grid { grid-template-columns: 1fr 1fr; }
  .pm-service-card { min-height: 175px; }
  .pm-service-card__icon { margin-bottom: 16px; }
}
@media (max-width: 420px) {
  .pm-container { width: calc(100% - 36px); }
  .pm-header-nav { left: -18px; right: -18px; }
  .pm-service-grid { grid-template-columns: 1fr; }
  .pm-service-card { min-height: 145px; }
}

/* ---- v1.0.0 additions ---- */

/* Menus from Appearance > Menus. */
.pm-header-nav a[aria-current="page"],
.pm-nav-dropdown__panel a[aria-current="page"] { color: var(--pm-gold); }
.pm-nav-dropdown__toggle[data-current="true"] { color: var(--pm-gold); }
.pm-footer-links a { font-size: 12px; }

/* Full-width pages (homepage and the "Full width" template): each section brings its own container. */
.pm-full > .wp-block-group,
.pm-full > section,
.pm-full > div { margin-block: 0; }
.pm-full > p:empty { display: none; }
.pm-hero__image--css { background-position: 68% center; background-size: cover; background-repeat: no-repeat; }
.pm-sri__image--css { background-position: center; background-size: cover; background-repeat: no-repeat; }
.pm-special__media--photo { background-image: none; }
.pm-special__media--photo img { width: 100%; height: 100%; object-fit: cover; }
.pm-page-cta .pm-contact__links { margin-top: 18px; }
.pm-page-content .pm-page-cta { margin-block: 48px 0; padding: 40px 34px; border-radius: 14px; }
.pm-page-content > ul, .pm-page-content > ol { max-width: 760px; color: #4f5c6c; line-height: 1.75; }
.pm-page-content a { color: var(--pm-navy); text-decoration-color: var(--pm-gold); text-underline-offset: 3px; }
.pm-page-content .pm-contact__link,
.pm-page-content .pm-inline-button { text-decoration: none; }
.pm-page-content .pm-page-cta .pm-contact__link { color: #fff; }
.pm-page-content .pm-page-cta .pm-contact__link--primary { color: var(--pm-navy); }
.pm-notice { max-width: 760px; margin-block: 28px; padding: 16px 20px; border-left: 3px solid var(--pm-gold); background: var(--pm-ivory); color: var(--pm-ink); font-size: 14px; line-height: 1.6; }

/* Posts and simple lists. */
.pm-post-list { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.pm-post-list li { padding: 20px 0; border-bottom: 1px solid var(--pm-line); }
.pm-post-list h2 { margin: 0 0 6px; font-size: 26px; }
.pm-post-list a { color: var(--pm-navy); text-decoration: none; }
.pm-post-meta { color: var(--pm-muted); font-size: 13px; }
.pm-pagination { margin-top: 30px; }
.pm-pagination .page-numbers { display: inline-block; margin-right: 8px; color: var(--pm-navy); }

/* The banner's paragraph style was overriding the small gold label above page titles. */
.pm-page-hero .pm-kicker { color: #9a7535; font-size: 11px; line-height: 1.4; }

/* Arrow spacing in buttons and links. */
.pm-contact__link span[aria-hidden="true"], .pm-inline-button span[aria-hidden="true"] { margin-left: 8px; }

/* Call button at the foot of the phone menu (the header phone number is hidden at that size). */
.pm-nav-call { display: none; }

@media (max-width: 1000px) {
  .pm-header-nav > a.pm-nav-call { display: flex; justify-content: center; margin-top: 16px; padding: 12px 18px; border: 1px solid var(--pm-gold); border-radius: 7px; background: var(--pm-gold); color: var(--pm-navy); font-weight: 800; text-align: center; }
}
@media (max-width: 800px) {
  .pm-page-content .pm-page-cta { padding: 30px 20px; }
}

/* =====================================================================
   v1.1.0: inner page redesign
   ===================================================================== */

/* Banner: navy, like the homepage, with breadcrumb and contact buttons. */
.pm-page-hero { padding-block: 56px 52px; background: var(--pm-navy); color: #fff; }
.pm-page-hero h1 { max-width: 900px; margin: 16px 0 14px; color: #fff; font-size: clamp(38px, 4.4vw, 56px); line-height: 1.04; }
.pm-page-hero .pm-page-intro { max-width: 720px; margin: 0; color: #ffffffd9; font-family: var(--pm-sans); font-size: clamp(17px, 1.6vw, 19px); line-height: 1.6; }
.pm-breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: #ffffff99; font-size: 13px; line-height: 1.4; }
.pm-breadcrumb a { color: #e1c17f; font-weight: 700; text-decoration: none; }
.pm-breadcrumb a:hover, .pm-breadcrumb a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.pm-breadcrumb [aria-current] { color: #ffffffcc; }
.pm-page-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.pm-page-hero .pm-contact__link { min-height: 46px; padding: 11px 18px; font-size: 15px; }

/* Layout: content column plus a side panel that stays in view. */
.pm-page-layout { padding-block: 56px 80px; }
.pm-page-layout.has-aside { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 64px; align-items: start; }
.pm-page-layout.is-simple .pm-page-content { max-width: 820px; }
.pm-page-layout .pm-page-content { min-height: 0; padding: 0; width: auto; margin: 0; }
.pm-page-aside { position: sticky; top: 28px; display: grid; gap: 18px; }
.admin-bar .pm-page-aside { top: 60px; }

.pm-aside-card { padding: 26px 24px; border: 1px solid var(--pm-line); border-top: 3px solid var(--pm-gold); border-radius: 12px; background: var(--pm-ivory); }
.pm-aside-card .pm-kicker { margin: 0 0 10px; }
.pm-aside-card__title { margin: 0 0 8px; color: var(--pm-navy); font-family: var(--pm-serif); font-size: 24px; line-height: 1.2; }
.pm-aside-card p:not(.pm-kicker):not(.pm-aside-card__title) { margin: 0 0 18px; color: var(--pm-muted); font-size: 14px; line-height: 1.6; }
.pm-aside-card__button { display: flex; min-height: 46px; align-items: center; justify-content: center; padding: 11px 16px; border-radius: 8px; background: var(--pm-gold); color: var(--pm-navy); font-weight: 800; text-decoration: none; }
.pm-aside-card__button:hover { background: #e1bd78; color: var(--pm-navy); }
.pm-aside-card__link { display: block; margin-top: 12px; color: var(--pm-navy); font-size: 14px; font-weight: 700; text-align: center; text-decoration: underline; text-decoration-color: var(--pm-gold); text-underline-offset: 4px; overflow-wrap: anywhere; }
.pm-aside-links { padding: 20px 24px; border: 1px solid var(--pm-line); border-radius: 12px; background: #fff; }
.pm-aside-links__title { margin: 0 0 10px; color: #9a7535; font-size: 11px; font-weight: 800; letter-spacing: .19em; text-transform: uppercase; }
.pm-aside-links ul { margin: 0; padding: 0; list-style: none; }
.pm-aside-links li + li { border-top: 1px solid #efe9de; }
.pm-aside-links a { display: block; padding: 10px 0; color: var(--pm-navy); font-size: 14px; text-decoration: none; }
.pm-aside-links a:hover, .pm-aside-links a:focus-visible { color: #9a7535; }
.pm-aside-links a[aria-current="page"] { color: #9a7535; font-weight: 700; }

/* Content: one width, calmer type, tighter rhythm. */
.pm-page-content > p,
.pm-page-content > ul,
.pm-page-content > ol { max-width: none; margin: 0 0 16px; color: #3f4b5c; font-size: 16.5px; line-height: 1.75; }
.pm-page-content > .wp-block-heading,
.pm-page-content > h2 { margin: 52px 0 14px; color: var(--pm-navy); font-size: clamp(26px, 2.4vw, 32px); line-height: 1.15; }
.pm-page-content > .wp-block-heading:first-child,
.pm-page-content > h2:first-child { margin-top: 0; }
.pm-page-content > h3 { margin: 32px 0 10px; font-family: var(--pm-sans); font-size: 19px; font-weight: 700; }
.pm-page-content .pm-page-lead { margin: 0 0 8px; padding-left: 20px; border-left: 3px solid var(--pm-gold); color: var(--pm-navy); font-family: var(--pm-serif); font-size: clamp(19px, 1.8vw, 22px); line-height: 1.55; }
.pm-page-content a:not([class]) { color: var(--pm-navy); font-weight: 600; text-decoration: underline; text-decoration-color: var(--pm-gold); text-underline-offset: 3px; }

/* "Who it is for" list as a card. */
.pm-page-content .pm-checks { margin: 8px 0 0; padding: 22px 24px; border: 1px solid var(--pm-line); border-radius: 12px; background: #fbfaf7; gap: 12px 28px; }
.pm-page-content .pm-checks li { font-size: 15px; }

/* "What lenders look at". */
.pm-page-content .pm-service-factors { margin-block: 44px 0; padding: 30px; }
.pm-page-content .pm-service-factors > .wp-block-heading { margin: 0 0 18px; font-size: 26px; }
.pm-service-factors.is-layout-constrained > * { max-width: none; }
.pm-page-content .wp-block-columns.pm-service-factor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.pm-page-content .wp-block-columns.pm-service-factor-grid > .wp-block-column { flex-basis: auto; margin: 0; }
.pm-page-content .pm-service-factors .wp-block-heading { margin: 0 0 18px; font-size: 26px; }
.pm-page-content :is(.pm-service-factors, .pm-page-cta, .pm-notice) > .wp-block-group__inner-container { max-width: none; }
.pm-page-content :is(.pm-service-factors, .pm-page-cta, .pm-notice) > .wp-block-group__inner-container > * { max-width: none; }
.pm-page-content .wp-block-columns.pm-service-steps { display: grid; }
.pm-page-content .pm-service-factor { padding: 18px 20px; }

/* "How we help": a numbered list rather than three narrow boxes. */
.pm-page-content .pm-service-steps { display: grid; grid-template-columns: 1fr; gap: 0; margin: 8px 0 0; border-top: 1px solid var(--pm-line); }
.pm-page-content .pm-service-step { display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 16px; align-items: start; height: auto; padding: 20px 0; border-top: 0; border-bottom: 1px solid var(--pm-line); background: none; }
.pm-page-content .pm-service-step > * { grid-column: 2; }
.pm-page-content .pm-service-step .pm-process__number { grid-column: 1; grid-row: 1 / span 2; margin: 0; color: #a98545; font-size: 32px; line-height: 1; }
.pm-page-content .pm-service-step h3 { margin: 2px 0 6px; font-size: 17px; }
.pm-page-content .pm-service-step p:last-child { margin: 0; }

/* FAQs: cards with a +/- marker. */
.pm-page-content .wp-block-details,
.pm-page-content .wp-block-details:first-of-type { max-width: none; margin: 0 0 10px; padding: 0; border: 1px solid var(--pm-line); border-radius: 10px; background: #fff; }
.pm-page-content .wp-block-details[open] { border-color: #d9cdb3; background: #fffdf9; }
.pm-page-content .wp-block-details summary { position: relative; padding: 17px 60px 17px 20px; color: var(--pm-navy); font-size: 16px; font-weight: 700; line-height: 1.45; list-style: none; cursor: pointer; }
.pm-page-content .wp-block-details summary::-webkit-details-marker { display: none; }
.pm-page-content .wp-block-details summary::after { position: absolute; top: 50%; right: 18px; display: grid; width: 26px; height: 26px; place-items: center; transform: translateY(-50%); border: 1px solid var(--pm-gold); border-radius: 50%; color: #9a7535; font-size: 18px; font-weight: 400; line-height: 1; content: "+"; }
.pm-page-content .wp-block-details[open] summary::after { content: "\2013"; }
.pm-page-content .wp-block-details summary:focus-visible { outline: 2px solid var(--pm-gold); outline-offset: 2px; border-radius: 10px; }
.pm-page-content .wp-block-details > :not(summary) { margin: 0; padding: 0 20px 18px; color: #4f5c6c; font-size: 15.5px; line-height: 1.7; }

/* Risk notice and closing call to action. */
.pm-page-content .pm-notice { max-width: none; margin: 36px 0 0; padding: 16px 20px; font-size: 14.5px; }
.pm-page-content .pm-notice p { margin: 0; }
.pm-page-content .pm-notice p + p { margin-top: 6px; }
.pm-page-content .pm-page-cta { margin: 28px 0 0; padding: 34px 32px; }
.pm-page-content .pm-page-cta h2 { margin: 0 0 8px; font-size: clamp(26px, 2.4vw, 30px); }
.pm-page-content .pm-page-cta p { margin: 0; }
.pm-page-cta.is-layout-constrained > * { max-width: none; }
.pm-page-content .pm-page-cta .pm-contact__links { margin-top: 20px; }

/* Service cards inside a page (Mortgages overview): three across in the content column. */
.pm-page-content .pm-service-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 1100px) {
  .pm-page-layout.has-aside { grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; }
}
@media (max-width: 1000px) {
  .pm-page-layout.has-aside { grid-template-columns: 1fr; gap: 0; }
  .pm-page-aside { display: none; } /* The banner buttons and the closing call to action cover this on smaller screens. */
  .pm-page-content .pm-service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .pm-page-content .wp-block-columns.pm-service-factor-grid { grid-template-columns: 1fr; }
  .pm-page-hero { padding-block: 40px 36px; }
  .pm-page-hero h1 { font-size: 38px; }
  .pm-page-layout { padding-block: 36px 56px; }
  .pm-page-content > .wp-block-heading, .pm-page-content > h2 { margin-top: 40px; font-size: 26px; }
  .pm-page-content .pm-service-factors { padding: 22px 16px; }
  .pm-page-content .pm-checks { padding: 18px; }
  .pm-page-content .pm-page-cta { padding: 28px 20px; }
  .pm-page-hero__actions .pm-contact__link { flex: 1 1 auto; justify-content: center; }
}
@media (max-width: 420px) {
  .pm-page-content .pm-service-grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   v1.2.0: photo banners on service pages, photo service cards
   ===================================================================== */

/* Banner with the page's featured image across the right-hand half, fading into the navy. */
.pm-page-hero--image { position: relative; overflow: hidden; padding-block: 76px 68px; }
.pm-page-hero__media { position: absolute; top: 0; right: 0; bottom: 0; width: 52%; }
.pm-page-hero__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pm-page-hero__media::after { position: absolute; inset: 0; background: linear-gradient(90deg, var(--pm-navy) 0%, #0b1f3bd1 20%, #0b1f3b52 55%, #0b1f3b1f 100%); content: ""; }
.pm-page-hero--image > .pm-container { position: relative; z-index: 1; }
.pm-page-hero--image h1 { max-width: 600px; }
.pm-page-hero--image .pm-page-intro { max-width: 540px; }

/* Service cards with a photo on top. */
.pm-service-card--image { display: flex; flex-direction: column; min-height: 0; padding: 0; overflow: hidden; background: #fff; }
.pm-service-card__media { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--pm-ivory); }
.pm-service-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.pm-service-card--image:hover .pm-service-card__media img,
.pm-service-card--image:focus-visible .pm-service-card__media img { transform: scale(1.05); }
.pm-service-card__body { position: relative; display: block; flex: 1; padding: 18px 20px 42px; }
.pm-service-card--image h3 { margin: 0 0 6px; }
.pm-service-card--image .pm-service-card__arrow { right: 18px; bottom: 14px; }

@media (max-width: 1000px) {
  /* Photo as a strip above the banner text. */
  .pm-page-hero--image { padding-top: 0; }
  .pm-page-hero__media { position: relative; width: 100%; height: clamp(190px, 42vw, 300px); margin-bottom: 4px; }
  .pm-page-hero__media::after { background: linear-gradient(180deg, #0b1f3b00 45%, var(--pm-navy) 100%); }
  .pm-page-hero--image h1, .pm-page-hero--image .pm-page-intro { max-width: none; }
}
@media (max-width: 800px) {
  .pm-service-card--image { min-height: 0; padding: 0; }
  .pm-service-card__body { padding: 14px 15px 38px; }
}
@media (max-width: 600px) {
  .pm-service-card--image { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pm-service-card__media img { transition: none; }
}

/* =====================================================================
   v1.3.0: homepage sections
   ===================================================================== */

/* Image + copy band, mirrored: copy on the left, image on the right (desktop only). */
.pm-special--reverse { background: #fff; }
.pm-special--reverse .pm-special__media { order: 2; }
.pm-special--reverse .pm-special__copy { justify-content: flex-end; }
@media (max-width: 800px) {
  .pm-special--reverse .pm-special__media { order: 0; }
  .pm-special--reverse .pm-special__copy { justify-content: flex-start; }
}

/* Homepage FAQs: ivory band so it does not run into the white "How it works" section. */
.pm-faqs { background: var(--pm-ivory); }
.pm-faqs .pm-page-content { max-width: 860px; min-height: 0; padding-inline: 0; }
.pm-faqs .pm-page-content .wp-block-details { background: #fff; }
.pm-faqs .pm-page-content .wp-block-details > :not(summary) a { color: var(--pm-navy); font-weight: 600; text-decoration: underline; text-decoration-color: var(--pm-gold); text-underline-offset: 3px; }

/* Space between the risk notice and any paragraph that follows it. */
.pm-page-content .pm-notice { margin-bottom: 24px; }
.pm-page-content .pm-notice + .pm-page-cta { margin-top: 28px; }
