/* ==========================================================================
   BANNER LAYOUT + MOBILE EXTRAS   (loaded after style.css and project.css, so it wins)

   1. Desktop banner  - fills exactly one screen; text at the left edge, enquiry form at the right edge
   2. Mobile banner   - photo + configurations & pricing visible on the first screen
   3. Mobile          - on-page forms hidden (the pop-up form is used instead) + "Get a callback" card
   4. Mobile          - "Read more / Read less" (assets/js/read-more.js)
   ========================================================================== */

:root {
  --edge: clamp(24px, 4.2vw, 84px);   /* space at the left / right edge of the banner and header on desktop */
}

/* ---------- 1. DESKTOP BANNER (992px and up) ---------- */
@media (min-width: 992px) {
  /* exactly one screen tall, so the offer strip below starts under the fold */
  body .hero {
    min-height: 100vh !important;
    min-height: 100svh !important;
    padding-top: calc(var(--header-h) + 30px) !important;
    padding-bottom: 40px !important;
  }

  /* full-width banner: text at the left edge, form at the right edge */
  body .hero > .container {
    max-width: none !important;
    margin: 0 !important;
    padding-left: var(--edge) !important;
    padding-right: var(--edge) !important;
    grid-template-columns: minmax(0, 1fr) 380px !important;
  }

  /* header lines up with the banner */
  body .header > .container {
    max-width: none;
    padding-left: var(--edge);
    padding-right: var(--edge);
  }
}

/* ---------- 2 + 3. PHONES (767px and below) ---------- */
/* First screen = 60% photo + 40% banner content.
   "visible" = the screen minus the header (74px) and the bottom Call / Enquire / WhatsApp bar (52px).
   Very short screens (under 600px tall, e.g. old small phones) give the content more room so nothing is cut off. */
:root { --hero-visible: calc(100vh - 126px); --img-share: .6; }
@supports (height: 100svh) { :root { --hero-visible: calc(100svh - 126px); } }
@media (max-width: 767px) and (max-height: 600px) { :root { --img-share: .42; } }

.phone-visit-cta { display: none; }
.hero-badge { display: none; }

@media (max-width: 767px) {

  /* no on-page forms on phones: the pop-up form does the job */
  body .hero .hero-form,
  body .footer .form-card:not(.phone-visit-cta) {
    display: none !important;
  }

  body .footer .phone-visit-cta { display: block; }
  .phone-visit-cta .btn { display: flex; width: 100%; justify-content: center; margin-top: 14px; }

  body .hero { position: relative; padding-bottom: 14px !important; }
  body .hero > .container { gap: 0 !important; padding-top: 0 !important; }
  .hero-mob { padding-top: 0; min-width: 0; }   /* min-width: stops the swipeable tag row from widening the page */

  /* 60%: the photo */
  body .hero .hero-mobile-img {
    height: max(150px, calc(var(--hero-visible) * var(--img-share))) !important;
    object-fit: cover;
    object-position: center;
  }

  /* "New Launch" badge on the photo */
  body .hero .hero-badge {
    display: inline-flex;
    position: absolute;
    z-index: 2;
    left: 16px;
    top: calc(74px + max(150px, calc(var(--hero-visible) * var(--img-share))) - 40px);
    padding: 7px 13px;
    border-radius: 50px;
    background: var(--gold);
    box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .45);
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #14213d;
  }

  /* 40%: title, location, starting price, configurations, button */
  .hm-first {
    min-height: calc(var(--hero-visible) * (1 - var(--img-share)));
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8px 0 10px;
  }
  .mobile-title { font-size: 30px; margin: 0 0 2px; line-height: 1.15; }
  .hm-meta {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: .02em;
    color: var(--muted);
  }
  .hm-meta i { color: #176962; font-size: 12px; }

  body .hm-price {
    display: block;
    margin: 0;
    padding: 10px 14px !important;
    border: 1px solid #e5d7b7;
    border-radius: 14px;
    background: linear-gradient(180deg, #fffdf6 0%, #fff 100%);
    box-shadow: 0 10px 26px -18px rgba(24, 62, 58, .5);
  }
  body .hm-price small {
    display: block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--muted);
  }
  body .hm-price strong {
    display: block;
    margin: 0 0 6px;
    font-family: var(--serif);
    font-size: 30px !important;
    line-height: 1.1;
    color: #176962;
  }
  body .hm-price strong span {
    font-family: var(--sans);
    font-size: 13px !important;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--muted);
  }
  .hm-price-cfg {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 9px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.35;
    color: #183e3a;
  }
  .hm-price-cfg i { color: #176962; font-size: 14px; }
  .hm-price .btn { display: flex; width: 100%; justify-content: center; margin: 0; padding-top: 11px; padding-bottom: 11px; }

  /* below the first screen: tags (swipeable row) and the facts */
  .hm-tags {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    margin: 6px -20px 0;
    padding: 2px 20px 6px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .hm-tags::-webkit-scrollbar { display: none; }
  .hm-tag { flex: none; white-space: nowrap; }
  .hm-grid { margin: 10px 0 4px; }
}

/* ---------- 4. READ MORE / READ LESS (phones only) ---------- */
.readmore__btn { display: none; }

@media (max-width: 767px) {
  .readmore.is-clamped {
    overflow: hidden;
    max-height: var(--rm-max);
    -webkit-mask-image: linear-gradient(#000 calc(100% - 26px), transparent);
    mask-image: linear-gradient(#000 calc(100% - 26px), transparent);
  }

  .readmore__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;                 /* comfortable tap size */
    margin-top: 2px;
    padding: 0;
    border: 0;
    background: none;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #176962;
    cursor: pointer;
  }
  .readmore__btn[hidden] { display: none; }
  .readmore__btn::after { content: "\F282"; font-family: "bootstrap-icons"; font-size: 11px; }   /* chevron down */
  .readmore__btn[aria-expanded="true"]::after { content: "\F286"; }                              /* chevron up */

  /* on the dark footer */
  .footer .readmore__btn { color: var(--gold); }
}

/* ---------- 5. ENQUIRY POP-UP (phones): compact, so most of the page stays visible behind it ---------- */
@media (max-width: 767px) {
  body .form-popup-bg { padding: 12px; }

  body .popup-box {
    max-width: 340px;
    max-height: 90vh;
    max-height: 90dvh;
  }

  body .popup-box .form-card { padding: 14px 14px 12px; }
  body .popup-box .eyebrow { font-size: 9.5px; letter-spacing: .16em; }
  body .popup-box .form-card h3 { margin: 6px 0 0; font-size: 20px; line-height: 1.2; }
  body .popup-box .form-card .form-note { margin: 4px 0 10px; font-size: 11.5px; line-height: 1.45; }

  body .popup-box .enquiry-form { gap: 7px; margin-top: 0; }
  body .popup-box .ef-field input { height: 40px; }            /* 16px text is kept: smaller text makes iPhones zoom in */
  body .popup-box .ef-field textarea { height: 44px; min-height: 44px; padding-top: 9px; padding-bottom: 9px; resize: none; }
  body .popup-box .ef-message i { top: 11px; }
  body .popup-box .consent { font-size: 9.5px; line-height: 1.45; gap: 6px; }
  body .popup-box .ef-submit { height: 42px; padding-top: 0; padding-bottom: 0; font-size: 12px; }

  body .popup-box .btnCloseForm { top: 8px; right: 8px; width: 30px; height: 30px; font-size: 16px; }
}

/* short phones: drop the one-line intro under the pop-up title to save space */
@media (max-width: 767px) and (max-height: 700px) {
  body .popup-box .form-card .form-note { display: none; }
  body .popup-box .form-card h3 { margin-bottom: 10px; }
}
