/* NASE V339-R104: responsive AC template only. Original Normal remains untouched.
   All selectors are scoped to the explicit AC mode marker. No content/data changes. */
html[data-ac104-mode="ac"] {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html[data-ac104-mode="ac"],
html[data-ac104-mode="ac"] body { max-width:100%; }
html[data-ac104-mode="ac"] body { overflow-x:clip; }
html[data-ac104-mode="ac"] img, html[data-ac104-mode="ac"] video,
html[data-ac104-mode="ac"] iframe { max-width:100%; }
html[data-ac104-mode="ac"] .container { max-width:100%; }

/* Homepage header: do not allow the legacy fixed search widths to break the form. */
html[data-ac104-mode="ac"] #background {
  background-size:cover !important;
  background-position:center center !important;
  height:auto !important;
  min-height:500px;
}
html[data-ac104-mode="ac"] #background .dir-ho-t-sp,
html[data-ac104-mode="ac"] #background .dir-ho-t-sp > .row {
  width:100% !important;
  max-width:100% !important;
  margin-left:auto !important;
  margin-right:auto !important;
  min-width:0;
}
html[data-ac104-mode="ac"] #background .dir-hr1 {
  width:min(100%,880px) !important;
  max-width:100% !important;
  margin:0 auto !important;
  float:none !important;
  min-width:0 !important;
}
html[data-ac104-mode="ac"] #background .dir-ho-t-tit h1 {
  font-size:clamp(29px,4.7vw,64px) !important;
  line-height:1.14 !important;
  max-width:100%;
  overflow-wrap:break-word;
  text-wrap:balance;
  text-align:center;
}
html[data-ac104-mode="ac"] #background form.filter_form {
  display:grid !important;
  grid-template-columns:minmax(0,1fr) minmax(150px,180px) minmax(100px,134px) !important;
  align-items:stretch !important;
  width:100% !important;
  max-width:880px !important;
  gap:10px !important;
  margin:0 auto !important;
  float:none !important;
}
html[data-ac104-mode="ac"] #background form.filter_form > .input-field {
  display:block !important;
  float:none !important;
  width:100% !important;
  min-width:0 !important;
  max-width:none !important;
  height:auto !important;
  margin:0 !important;
  padding:0 !important;
  flex:none !important;
}
html[data-ac104-mode="ac"] #background form.filter_form > .input-field input,
html[data-ac104-mode="ac"] #background form.filter_form > .input-field select {
  box-sizing:border-box !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  height:54px !important;
  margin:0 !important;
  padding-left:14px !important;
  padding-right:14px !important;
}
html[data-ac104-mode="ac"] #background form.filter_form > .input-field input[type="submit"] {
  min-width:0 !important;
  padding:0 12px !important;
  text-align:center !important;
  white-space:normal !important;
  cursor:pointer;
}
html[data-ac104-mode="ac"] #background form.filter_form .select-wrapper { width:100% !important; max-width:100% !important; min-width:0 !important; }
html[data-ac104-mode="ac"] #background form.filter_form .search-hotel-type { max-width:100%; }

/* Bootstrap row clearfix pseudo-elements would otherwise become empty grid cells. */
html[data-ac104-mode="ac"] section.proj > .container > .row::before,
html[data-ac104-mode="ac"] section.proj > .container > .row::after,
html[data-ac104-mode="ac"] section.ho-bg-white.com-padd-redu-top > .container > .row::before,
html[data-ac104-mode="ac"] section.ho-bg-white.com-padd-redu-top > .container > .row::after {
  content:none !important;
  display:none !important;
}

/* Four matching link cards, with consistent rows and balanced text. */
html[data-ac104-mode="ac"] section.proj > .container > .row {
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:20px !important;
  width:100% !important;
  max-width:100% !important;
  margin-left:auto !important;
  margin-right:auto !important;
}
html[data-ac104-mode="ac"] section.proj > .container > .row > [class*="col-"] {
  float:none !important;
  width:auto !important;
  max-width:none !important;
  min-width:0 !important;
  margin:0 !important;
  padding:0 !important;
}
html[data-ac104-mode="ac"] section.proj .hom-pro {
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  height:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  padding:20px 14px !important;
  overflow-wrap:anywhere;
}
html[data-ac104-mode="ac"] section.proj .hom-pro img {
  width:auto !important;
  max-width:min(100%,140px) !important;
  height:auto !important;
  max-height:100px !important;
  object-fit:contain !important;
}
html[data-ac104-mode="ac"] section.proj .hom-pro h4 {
  max-width:100% !important;
  font-size:clamp(16px,1.5vw,20px) !important;
  line-height:1.3 !important;
  overflow-wrap:break-word;
  text-align:center !important;
}
html[data-ac104-mode="ac"] section.proj .hom-pro p {
  max-width:100% !important;
  overflow-wrap:break-word;
  line-height:1.5 !important;
  text-align:center;
}
html[data-ac104-mode="ac"] section.proj .hom-pro a {
  margin-top:auto !important;
  align-self:center !important;
  max-width:100%;
}

/* Homepage sections: legacy floats must not strand the fifth category in column 4. */
html[data-ac104-mode="ac"] .dir-hli > ul {
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:22px 26px !important;
  padding-left:0 !important;
  padding-right:0 !important;
  margin-left:0 !important;
  margin-right:0 !important;
  width:100% !important;
  min-width:0 !important;
}
html[data-ac104-mode="ac"] .dir-hli > ul > li {
  float:none !important;
  clear:none !important;
  display:block !important;
  width:auto !important;
  max-width:none !important;
  min-width:0 !important;
  padding:0 !important;
  margin:0 !important;
}
html[data-ac104-mode="ac"] .dir-hli > ul > li > a,
html[data-ac104-mode="ac"] .dir-hli .dir-hli-5 { display:block; min-width:0; max-width:100%; }
html[data-ac104-mode="ac"] .dir-hli .dir-hli-5 img {max-width:100%;}
html[data-ac104-mode="ac"] .dir-hli .dir-hli-2 h4 {
  font-size:clamp(14px,1.45vw,19px) !important;
  line-height:1.35 !important;
  overflow-wrap:anywhere;
}
html[data-ac104-mode="ac"] .com-title h2 {
  font-size:clamp(26px,3.3vw,44px) !important;
  line-height:1.2 !important;
  overflow-wrap:break-word;
}
html[data-ac104-mode="ac"] .com-title p { font-size:clamp(15px,1.55vw,20px); line-height:1.55; }

/* City cards and service cards retain original content/links, with adaptive grid. */
html[data-ac104-mode="ac"] section.ho-bg-white.com-padd-redu-top > .container > .row {
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:20px !important;
}
html[data-ac104-mode="ac"] section.ho-bg-white.com-padd-redu-top > .container > .row > .com-title {grid-column:1/-1;}
html[data-ac104-mode="ac"] section.ho-bg-white.com-padd-redu-top > .container > .row > .col-md-6 {grid-column:span 2;}
html[data-ac104-mode="ac"] section.ho-bg-white.com-padd-redu-top > .container > .row > [class*="col-md-"] {
  float:none !important;
  width:auto !important;
  min-width:0 !important;
  margin:0 !important;
  padding:0 !important;
}
html[data-ac104-mode="ac"] .pg-list-ser ul {display:grid !important;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px;padding:0;}
html[data-ac104-mode="ac"] .pg-list-ser ul > a {min-width:0;}
html[data-ac104-mode="ac"] .pg-list-ser ul li {width:100% !important;float:none !important;min-width:0;}
html[data-ac104-mode="ac"] .home-dis h2 {font-size:clamp(21px,3vw,36px);line-height:1.4;overflow-wrap:break-word;}

@media (max-width:1050px) {
  html[data-ac104-mode="ac"] section.proj > .container > .row,
  html[data-ac104-mode="ac"] .dir-hli > ul,
  html[data-ac104-mode="ac"] .pg-list-ser ul {
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
  html[data-ac104-mode="ac"] section.ho-bg-white.com-padd-redu-top > .container > .row {
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
  html[data-ac104-mode="ac"] section.ho-bg-white.com-padd-redu-top > .container > .row > .col-md-6 {grid-column:span 2;}
  html[data-ac104-mode="ac"] #background .dir-hr1 {width:min(100%,740px) !important;}
}
@media (max-width:680px) {
  html[data-ac104-mode="ac"] #background {min-height:480px !important;}
  html[data-ac104-mode="ac"] #background .dir-ho-t-sp {padding-left:12px !important;padding-right:12px !important;}
  html[data-ac104-mode="ac"] #background .dir-hr1 {width:100% !important;}
  html[data-ac104-mode="ac"] #background .dir-ho-t-tit h1 {font-size:clamp(29px,8vw,45px) !important;}
  html[data-ac104-mode="ac"] #background form.filter_form {
    grid-template-columns:minmax(0,1fr) !important;
    gap:10px !important;
    width:min(100%,420px) !important;
  }
  html[data-ac104-mode="ac"] #background form.filter_form > .input-field {width:100% !important;}
  html[data-ac104-mode="ac"] section.proj > .container > .row,
  html[data-ac104-mode="ac"] .dir-hli > ul,
  html[data-ac104-mode="ac"] .pg-list-ser ul {
    grid-template-columns:minmax(0,1fr) !important;
    gap:16px !important;
  }
  html[data-ac104-mode="ac"] section.proj .hom-pro {padding:18px 14px !important;}
  html[data-ac104-mode="ac"] section.ho-bg-white.com-padd-redu-top > .container > .row {
    grid-template-columns:minmax(0,1fr) !important;
  }
  html[data-ac104-mode="ac"] section.ho-bg-white.com-padd-redu-top > .container > .row > .col-md-6 {grid-column:span 1;}
  html[data-ac104-mode="ac"] .com-title {max-width:100%;}
  html[data-ac104-mode="ac"] .container {padding-left:14px !important;padding-right:14px !important;}
  html[data-ac104-mode="ac"] .spa-top-bar .v3-top-menu .row {display:flex !important;flex-wrap:wrap;justify-content:center;gap:5px;}
  html[data-ac104-mode="ac"] .spa-top-bar .v3-top-menu .row > [class*="col-"] {
    width:100% !important;float:none !important;text-align:center;min-width:0;
  }
  html[data-ac104-mode="ac"] .dir-ho-tr ul {display:flex;justify-content:center;flex-wrap:wrap;gap:5px;max-width:100%;}
  html[data-ac104-mode="ac"] .dir-ho-tr ul > li {float:none !important;max-width:100%;}
}
@media (max-width:380px) {
  html[data-ac104-mode="ac"] .com-title h2 {font-size:25px !important;}
  html[data-ac104-mode="ac"] #background .dir-ho-t-tit h1 {font-size:29px !important;}
  html[data-ac104-mode="ac"] #background form.filter_form > .input-field input,
  html[data-ac104-mode="ac"] #background form.filter_form > .input-field select {height:50px !important;}
}
