/*
 * Small site-wide fixes on top of dist/styles/main.css. Plain CSS: the theme's gulp
 * build has not run since 2017.
 */

/*
 * Long words break instead of widening the page: on a phone the German features
 * heading "Lebensmittelmarkt" made the home page 448px wide on a 390px screen.
 * Hyphenation follows the page's lang attribute; overflow-wrap is the fallback.
 */
h1, h2, h3, h4 { overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }

/* The co-funding bar in the footer (templates/footer.php): on white, centred, above the copyright. */
.mp-cofund { padding: 24px 20px; background: #fff; text-align: center; }
.mp-cofund img { display: block; width: 100%; max-width: 500px; height: auto; margin: 0 auto; }
.mp-cofund .mp-legal { margin: 12px 0 0; font-size: 13px; line-height: 1.4; color: #555; }
.mp-cofund .mp-legal span { white-space: nowrap; } /* on a phone it wraps at the dot, not inside the name */

/*
 * Property cards (home and related apartments: a.card; Apartments listing:
 * .card-large): lift a little on hover, on a desktop with a mouse only.
 */
@media (hover: hover) and (pointer: fine) and (min-width: 992px) {
  a.card, .card-large { transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s cubic-bezier(.2, .7, .2, 1); will-change: transform; }
  a.card:hover, a.card:focus-visible { transform: translateY(-6px); box-shadow: 0 14px 28px rgba(0, 0, 0, .18), 0 4px 8px rgba(0, 0, 0, .08); }
  .card-large:hover { transform: translateY(-6px); }
  .card-large .card-col img { transition: box-shadow .35s; }
  .card-large:hover .card-col img { box-shadow: 0 14px 28px rgba(0, 0, 0, .18); }
}
@media (prefers-reduced-motion: reduce) { a.card, .card-large { transition: none; } a.card:hover, .card-large:hover { transform: none; } }

/* The phone number is a tel: link (MPA-9); it keeps the footer's text colour. */
a.mp-tel, a.mp-tel:visited { color: inherit; text-decoration: none; }
a.mp-tel:hover, a.mp-tel:focus { color: #F3BB00; text-decoration: underline; }

/* MPA-12: Montserrat from the theme (variable font, 300-700), no Google font loader. */
@font-face {
  font-family: 'Montserrat'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(../fonts/montserrat-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Montserrat'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(../fonts/montserrat-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Contact form consent (MPA-13): a quiet line with a real-size checkbox, not a field label. */
.mp-consent .wpcf7-list-item { margin: 0; }
.mp-consent label {
  display: flex; align-items: flex-start; gap: 10px; margin: 0;
  font-size: 13px; font-weight: 400; line-height: 1.5; text-transform: none; letter-spacing: 0; color: #666; cursor: pointer;
}
.mp-consent input[type="checkbox"] { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: #F3BB00; cursor: pointer; }
.mp-consent a { text-decoration: underline; }

/* Email links (lib/forms.php email_link()): the only place the @ exists before JS. */
.mp-at::after { content: "@"; }

/*
 * Contrast (WCAG 2.2 AA, 4.5:1 for text). The theme's yellow #F3BB00 is 1.76:1 on
 * white, so it cannot be text on a light background, and white on yellow is the same
 * 1.76:1. Text links on light backgrounds are dark (#2C2C2C, 14:1) and keep the yellow as
 * their underline; on the dark cards they stay yellow (7.9:1 on #2C2C2C); text on a
 * yellow button is black (11.9:1).
 */
.wrap :is(p, li, dd, td, small, label, .form-group, .wpcf7-list-item-label, .entry-content) a:not(.btn):not(.nav-link) {
  color: #2C2C2C; text-decoration: underline; text-decoration-color: #F3BB00; text-decoration-thickness: 2px; text-underline-offset: 3px;
}
.wrap :is(p, li, dd, td, small, label, .form-group, .wpcf7-list-item-label, .entry-content) a:not(.btn):not(.nav-link):hover,
.wrap :is(p, li, dd, td, small, label, .form-group, .wpcf7-list-item-label, .entry-content) a:not(.btn):not(.nav-link):focus {
  color: #000; text-decoration-thickness: 3px;
}
.wrap :is(.facility-section-description, .reception-block, .mp-contact__card) a:not(.btn):not(.nav-link) { color: #F3BB00; text-decoration-color: currentColor; }
.wrap :is(.facility-section-description, .reception-block, .mp-contact__card) a:not(.btn):not(.nav-link):hover { color: #fff; }
.btn-primary, .btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active,
input.btn-primary, .wpcf7-submit.btn-primary { color: #000; }

/*
 * Complianz placeholder for blocked embeds (the Get Directions map until Marketing is
 * accepted): no stock picture (it showed an unrelated map), a light frame the size of
 * the map, the accept button in the theme's style. Two classes, because Complianz
 * injects its background-image rule at runtime, later in the cascade
 * (complianz-consent skill).
 */
.cmplz-blocked-content-container.cmplz-placeholder-parent {
  background: #EDEDED none !important; background-image: none !important;
  aspect-ratio: 2 / 1; max-height: 370px; width: 100%; display: flex; align-items: center; justify-content: center;
}
.cmplz-blocked-content-container.cmplz-placeholder-parent { position: relative; }
.cmplz-blocked-content-container.cmplz-placeholder-parent iframe { visibility: hidden; position: absolute; inset: 0; width: 100%; height: 100%; }
.cmplz-blocked-content-container.cmplz-placeholder-parent .cmplz-blocked-content-notice {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: max-content; max-width: min(320px, 90%); padding: 14px 20px; border-radius: 4px;
  background: #2C2C2C; color: #fff; font-family: 'Montserrat', sans-serif; font-size: 13px; line-height: 1.5; text-align: center;
}
.cmplz-blocked-content-container.cmplz-placeholder-parent .cmplz-blocked-content-notice:hover { background: #000; }

/*
 * Apartments listing (MPA-24): side by side, the text column is taller than the photo's
 * 16:9, which left a white bar under it. The photo fills its column instead, cropped.
 * Stacked (under 992px) it keeps its own ratio.
 */
@media (min-width: 992px) {
  .card-large .card-col > a { display: block; height: 100%; }
  .card-large .card-col img { display: block; width: 100%; height: 100%; object-fit: cover; }
}
