/* Mobile layout for huahinthaiproperty.com - only applies on screens up to 760px wide.
   Desktop (wider screens) is not affected. Works together with mobile.js. */
.m-bar { display: none; }

/* ---- promo boxes (replace the old Flash adverts) and slogan in the green bar ---- */
.hp-slogan { font: italic bold 16px Tahoma, Arial, sans-serif; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.45); letter-spacing: .3px; line-height: 39px; }
.hp-box { width: 200px; margin: 10px auto; border: 1px solid #5AD30C; background: #fff; text-align: left; font-family: Tahoma, Arial, sans-serif; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.hp-head { background: #5AD30C; color: #fff; font-weight: bold; font-size: 13px; padding: 6px 8px; text-shadow: 0 1px 1px rgba(0,0,0,.3); }
.hp-card { display: block; padding: 7px; color: #333; text-decoration: none; border-bottom: 1px dashed #cfe8b8; }
.hp-card:last-child { border-bottom: 0; }
.hp-card:hover { background: #f3ffe8; }
.hp-card img { display: block; width: 100%; height: 125px; object-fit: cover; border: 0; }
.hp-type { display: block; margin-top: 5px; font-size: 12px; font-weight: bold; color: #0D5300; }
.hp-price { display: block; font-size: 14px; font-weight: bold; color: #E02020; }
.hp-loc { display: block; font-size: 11px; color: #777; }
.hp-more { display: block; padding: 7px 8px; font-size: 12px; font-weight: bold; color: #006699; text-align: right; text-decoration: none; background: #f3ffe8; }
.hp-cta p { margin: 8px; font-size: 12px; line-height: 1.5; color: #333; }
.hp-btn { display: block; margin: 0 8px 8px; padding: 8px; background: #2E7D0B; color: #fff !important; font-size: 13px; font-weight: bold; text-align: center; text-decoration: none; border-radius: 4px; }
.hp-btn.hp-call { background: #F28C00; }
/* homepage video (random listing video) */
.hp-video { max-width: 480px; margin: 0 auto 10px; text-align: left; }
.hp-video-frame { position: relative; padding-top: 56.25%; background: #000; border: 1px solid #5AD30C; }
.hp-video-frame iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.hp-video-cap { display: block; padding: 8px 10px; background: #fff; border: 1px solid #5AD30C; border-top: 0; font: bold 13px Tahoma, Arial, sans-serif; color: #0D5300; text-decoration: none; }
.hp-video-cap span { color: #E02020; }
.hp-video-cap em { display: block; margin-top: 3px; text-align: right; font-style: normal; color: #006699; }
.hp-video-cap:hover { background: #f3ffe8; }
/* Facebook link (the only link to another website) */
a.hp-fb { color: inherit; font-weight: bold; text-decoration: none; white-space: nowrap; }
a.hp-fb:hover { text-decoration: underline; }
a.hp-fb:before { content: "f"; display: inline-block; width: 14px; height: 14px; margin-right: 4px; border-radius: 3px; background: #1877F2; color: #fff; font: bold 12px/15px Arial, sans-serif; text-align: center; vertical-align: -2px; }
.hp-btn.hp-fbbtn { background: #1877F2; }
a.m-tel { color: inherit; text-decoration: none; cursor: text; }   /* desktop: phone numbers look exactly as before */

@media screen and (max-width: 760px) {
  html.hhtp-m body { margin: 0; padding: 0 0 56px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

  /* outer frame: full width, natural height */
  .hhtp-m .m-outer { width: 100% !important; height: auto !important; border: 0; }
  .hhtp-m .m-outer img { max-width: 100%; height: auto; }
  .hhtp-m .m-outer table { max-width: 100%; }

  /* header: logo + phone line only */
  .hhtp-m .m-header td[width="236"] { width: 40% !important; }
  .hhtp-m .m-header td[width="733"] { width: 60% !important; }
  .hhtp-m .m-header td[height="105"] { height: 70px !important; background-size: cover; background-position: center; }
  .hhtp-m .m-header td[height="30"] { height: auto !important; background-size: cover; padding: 4px !important; }
  .hhtp-m .m-header .content_black_11 { font-size: 12px; line-height: 1.5; }

  /* broken Flash banner: hide on phones */
  .hhtp-m .m-flash, .hhtp-m object, .hhtp-m embed { display: none !important; }

  /* news ticker: hidden on phones (items overlap on narrow screens) */
  .hhtp-m .m-ticker { display: none; }

  /* three columns -> one column: content, then search; menu opens from the button */
  .hhtp-m .m-cols, .hhtp-m .m-cols > tbody, .hhtp-m .m-cols > tbody > tr { display: block; width: 100% !important; }
  .hhtp-m .m-cols > tbody > tr > td { display: block; width: auto !important; }
  .hhtp-m .m-cols > tbody > tr > td.m-menu { display: none; }
  .hhtp-m.m-menu-open .m-cols > tbody > tr > td.m-menu { display: block; }
  .hhtp-m .m-menu #menu { width: 100% !important; }
  .hhtp-m .m-menu #menu td { padding: 9px 10px !important; font-size: 15px; }

  /* content and search: tables shrink to the screen */
  .hhtp-m .m-content table, .hhtp-m .m-side table { width: 100% !important; }
  .hhtp-m .m-content td, .hhtp-m .m-side td { width: auto !important; }
  .hhtp-m .m-content { padding: 0 6px; word-wrap: break-word; overflow-wrap: break-word; }
  .hhtp-m .m-content p, .hhtp-m .m-content td { font-size: 14px; line-height: 1.5; }
  .hhtp-m .m-side { border-top: 3px solid #5AD30C; margin-top: 10px; padding: 6px; }
  .hhtp-m .m-side select, .hhtp-m .m-side input[type="text"] { width: 100%; font-size: 16px; padding: 6px; box-sizing: border-box; }
  .hhtp-m .m-side input[type="submit"] { font-size: 16px; padding: 8px 18px; }
  .hhtp-m .m-content iframe { width: 100% !important; height: auto !important; aspect-ratio: 16 / 9; }
  .hhtp-m .m-content input[type="text"], .hhtp-m .m-content textarea, .hhtp-m .m-content select { width: 100% !important; max-width: 100%; box-sizing: border-box; font-size: 16px; }
  .hhtp-m .m-content a.content_blue_13 { display: inline-block; padding: 8px 4px; font-size: 15px; }

  /* footer */
  .hhtp-m .m-footer td { display: block; width: auto !important; height: auto !important; text-align: center; padding: 8px; }
  .hhtp-m .m-footer div[align="right"] { text-align: center; }

  /* top bar with Menu / Search / Call */
  .hhtp-m .m-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; background: #2E7D0B; box-shadow: 0 -2px 6px rgba(0,0,0,.25); }
  .hhtp-m .m-btn { flex: 1; border: 0; background: transparent; color: #fff; font: bold 15px Tahoma, sans-serif; padding: 14px 4px; text-align: center; text-decoration: none; border-right: 1px solid rgba(255,255,255,.25); }
  .hhtp-m .m-btn:last-child { border-right: 0; background: #F28C00; }
  .hhtp-m a.m-tel { color: inherit; text-decoration: underline; }
  .hhtp-m .hp-box { width: auto; max-width: 420px; }
  .hhtp-m .hp-card img { height: 190px; }
  .hhtp-m .m-content .hp-video-frame iframe { height: 100% !important; aspect-ratio: auto; }
  .hhtp-m .hp-video-cap em { text-align: left; }
}
