/* remfinance.com static rebuild: the only additions to the recovered theme CSS.
   Every rule is listed in build-report.md. Loaded after the theme's style.css. */

/* 1. Property page photo narrower than the content column: show at its own pixel size,
      centred, instead of the theme's .gallery img {width:100%} stretch. */
.gallery img.rem-native { width: auto; max-width: 100%; height: auto; display: block; margin: 0 auto; }

/* 2. Listing thumbnail that exists only at 245x161: keep the card the same height as its
      neighbours (the theme stretches thumbnails to the column width) without stretching
      the picture; it sits centred in a box of the same 245:161 shape. */
a.propertyImgLink.rem-native-box { display: flex; align-items: center; justify-content: center; aspect-ratio: 245 / 161; margin-bottom: 15px; background: #f8f8f8; overflow: hidden; }
a.propertyImgLink.rem-native-box img.tk_portfolio_img { width: auto; max-width: 100%; height: auto; margin-bottom: 0; }

/* 3. Contact form: the old page styled its Gravity Form with Gravity Forms' own CSS, which
      is not loaded any more. These rules give the new form (form/contact-form.html, not
      edited) the measurements the old form had in the Apr 2025 capture: heading without
      the theme's underline bar, one field per row, inputs half the column wide, red
      asterisks, a grey bordered Submit button; full width below 641px. */
.gform_heading { margin: 16px 0 18px; }
.gform_heading h3.gform_title { border: none; font-size: 18.75px; font-weight: 700; line-height: 20.625px; margin: 10px 0 6px; }
.rem-contact-form .rem-contact-form__form { max-width: none; }
.rem-contact-form .rem-contact-form__row { display: block; }
.rem-contact-form .rem-contact-form__field { margin: 16px 0 0; }
.rem-contact-form .rem-contact-form__field label { display: block; font-size: 15px; font-weight: 700; margin: 0 0 5px; }
.rem-contact-form .rem-contact-form__field label span { color: #790000; }
.rem-contact-form .rem-contact-form__field input { width: calc(50% - 16px); padding: 5px 4px; }
.rem-contact-form .rem-contact-form__field textarea { width: calc(100% - 16px) !important; height: 160px; padding: 6px 8px; }
.rem-contact-form .rem-contact-form__actions { margin: 16px 0 0; padding: 16px 0 10px; }
.rem-contact-form button[type="submit"] { padding: 8px; margin: 0 16px 0 0; border: 1px solid #c9c9c9; border-radius: 3px; background: #efefef; color: #000; font-size: 15px; line-height: 21.4286px; }
@media (max-width: 640px) {
  .rem-contact-form .rem-contact-form__field input,
  .rem-contact-form .rem-contact-form__field textarea { width: 100% !important; }
  .rem-contact-form .rem-contact-form__field textarea { height: 120px; }
  .rem-contact-form button[type="submit"] { width: 100%; margin: 0 0 16px; }
}

/* 4. Logo: the build adds width="162" height="52" to the logo <img> (layout stability).
      With Bootstrap's border-box sizing and the theme's padding-bottom:3px, a fixed height
      squeezed the picture into 49px and moved it up. height:auto gives the old 52px picture
      plus 3px padding again (same box as the archive: 162x55). */
.navbar-brand img { height: auto; }

/* 5. News sub-menu reachable without a mouse (QA Q1, Q9).
      a) Keyboard, every width: the sub-menu opens while focus is inside it (the theme opens
         it on :hover only). Mouse look and behaviour unchanged.
      b) Phone width (<=767px, the theme's mobile breakpoint): the theme makes "News" untappable
         (pointer-events:none) and opens its sub-menu on :hover only, which touch screens do not
         give. Show the three sub-items as a plain list under "News" in the opened mobile menu,
         and make "News" itself a normal link. */
.nav.navbar-nav li.menu-item-has-children:focus-within > .sub-menu { display: block; }
@media only screen and (max-width: 767px) {
  .nav.navbar-nav li.menu-item-has-children > .sub-menu { display: block; position: static; float: none; width: 100%; margin: 0; padding: 0; border: none; box-shadow: none; background: #f8f8f8; }
  .nav.navbar-nav li.menu-item-has-children > .sub-menu li:last-child { border-bottom: none; }
  .nav.navbar-nav li.menu-item-has-children > .sub-menu a { padding-left: 30px; }
}

/* 6. News sub-menu by touch and mouse up to 1200px, and by touch above (audit findings 4 and 5,
      QA Q17, Q18).
      a) Through 1200px the theme's responsive.css sets pointer-events:none on the "News" link,
         so /news/ could not be clicked or tapped from 768 to 1200. Make it (and its sub-items)
         a normal link again at every width up to 1200px.
      b) .rem-open is set by /assets/rem-menu.js on a touch tap: the first tap on "News" opens
         the sub-menu, a second tap opens /news/ (touch screens have no hover).
      c) Keyboard focus on a sub-item: Bootstrap paints the focused item #428bca behind the
         theme's #868686 text (1.0:1). Keyboard focus only (:focus-visible): white on #2a6496
         (6.25:1) with a dotted white ring inside the item. Mouse hover look unchanged. */
@media only screen and (max-width: 1200px) {
  .nav.navbar-nav li.menu-item-has-children > a,
  .nav.navbar-nav li.menu-item-has-children > .sub-menu a { pointer-events: auto; }
}
.nav.navbar-nav li.menu-item-has-children.rem-open > .sub-menu { display: block; }
.nav.navbar-nav li.menu-item-has-children > .sub-menu > li > a:focus-visible { color: #fff; background-color: #2a6496; outline: 2px dotted #fff; outline-offset: -4px; }
