/* Phase 21 refinement of Phase 20 — faithful editorial card treatment.
   HOME PAGE Tours + Stays ONLY. No navbar, footer, search, checkout or API changes.
   Labels, prices, reviews and amenities continue to come solely from actual records. */
body.ui-home .ms18-tour-cards,
body.ui-home .ms18-stay-cards {
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
  align-items:stretch;
}
/* Section identity from the approved mockup; nothing is appended to site navigation. */
body.ui-home .ms18-tours .ms18-band-intro h2,
body.ui-home .ms18-stays .ms18-band-intro h2 {
  width:max-content;max-width:100%;position:relative;
  padding-bottom:15px;
  font-family:'Playfair Display',Georgia,serif;
  font-size:clamp(28px,2.8vw,42px);
  font-weight:700;font-style:italic;line-height:1.04;letter-spacing:-.048em;
}
body.ui-home .ms18-tours .ms18-band-intro h2::after,
body.ui-home .ms18-stays .ms18-band-intro h2::after {
  content:"";position:absolute;left:2px;bottom:3px;width:71px;height:9px;
  border-top:3px solid #f27760;border-radius:56% 55% 0 0;
  transform:rotate(-3deg);pointer-events:none;
}
body.ui-home .ms18-tours .ms18-band-intro p,
body.ui-home .ms18-stays .ms18-band-intro p {font-size:12.5px;line-height:1.55;}

body.ui-home .ms20-card {
  --ms21-paper:#fff9f3;
  position:relative;min-width:0;
  border:1px solid rgba(221,207,195,.7);
  border-radius:23px;
  background:var(--ms21-paper);
  box-shadow:0 12px 24px rgba(64,51,40,.11),0 2px 5px rgba(46,50,42,.045);
  isolation:isolate;
  transition:box-shadow .22s ease,transform .22s ease;
}
body.ui-home .ms18-stays .ms20-card {--ms21-paper:#fbfaf3;border-color:rgba(183,213,197,.8);}
body.ui-home .ms20-card:hover,body.ui-home .ms20-card:focus-within {
  transform:translateY(-3px);
  box-shadow:0 19px 33px rgba(43,52,45,.16),0 3px 9px rgba(43,52,45,.06);
}
body.ui-home .ms20-photo {
  position:relative;aspect-ratio:1.69;overflow:hidden;
  background:linear-gradient(135deg,#98cec0,#e3e1c5);
}
body.ui-home .ms20-photo img {object-fit:cover;transition:transform .42s ease;}
body.ui-home .ms20-card:hover .ms20-photo img {transform:scale(1.05);}
body.ui-home .ms20-photo::before {
  content:"";position:absolute;inset:50% 0 0;z-index:1;
  background:linear-gradient(0deg,rgba(22,40,36,.12),transparent);pointer-events:none;
}
/* SVG alpha mask makes the curved photo edge scale correctly at every card width. */
body.ui-home .ms20-photo::after {
  content:"";position:absolute;bottom:-1px;left:0;width:100%;height:43px;
  background:var(--ms21-paper);pointer-events:none;z-index:1;
  -webkit-mask:url('../images/home/marsata-card-wave.svg') center bottom / 100% 100% no-repeat;
  mask:url('../images/home/marsata-card-wave.svg') center bottom / 100% 100% no-repeat;
}
body.ui-home .ms20-card .ms20-kind {
  z-index:2;top:13px;left:14px;max-width:calc(100% - 75px);
  padding:7px 12px;border-radius:99px;
  background:rgba(255,249,225,.97);color:#17493b;
  border:1px solid rgba(255,255,255,.75);
  font-size:11px;line-height:1.25;font-weight:800;
  box-shadow:0 2px 9px rgba(9,52,41,.15);
}
body.ui-home .ms20-card .heart {
  z-index:3;top:12px;right:13px;
  width:37px;height:37px;border:1px solid rgba(255,255,255,.8);
  font-size:22px;background:#fff;box-shadow:0 3px 12px rgba(5,34,27,.15);
}
body.ui-home .ms20-card .heart:focus-visible,
body.ui-home .ms20-footer .ms18-card-open:focus-visible {
  outline:3px solid #ed7258;outline-offset:3px;
}
/* The card body is genuinely warm cream, not the previous flat white panel. */
body.ui-home .ms20-body {
  position:relative;z-index:2;
  padding:0 17px 14px;gap:9px;min-height:194px;
  background:linear-gradient(150deg,var(--ms21-paper) 0%,#fff7ef 69%,#fcf2e8 100%);
}
body.ui-home .ms18-stays .ms20-body {
  background:linear-gradient(150deg,var(--ms21-paper) 0%,#f9faf2 58%,#eef6ee 100%);
}
body.ui-home .ms20-body h3 {
  margin:0;font-family:'Playfair Display',Georgia,serif;font-style:italic;
  font-size:clamp(20px,1.95vw,28px);font-weight:700;
  letter-spacing:-.04em;line-height:1.15;color:#103b30;
  min-height:1.15em;max-height:2.3em;
}
body.ui-home .ms20-meta {
  display:flex;align-items:center;gap:6px 9px;flex-wrap:wrap;
  color:#32584e;font-size:11px;min-height:23px;
}
body.ui-home .ms20-meta span:not(.ms20-rating) {
  display:inline-flex;align-items:center;gap:5px;
  padding:3px 6px;border:1px solid #e7e8dc;
  border-radius:999px;background:rgba(255,255,255,.65);
  white-space:nowrap;max-width:100%;min-width:0;
}
body.ui-home .ms20-meta svg {height:13px;width:13px;flex:none;stroke-width:1.9;}
body.ui-home .ms20-meta .ms20-rating {
  display:inline-flex;align-items:center;gap:4px;margin-left:auto;
  color:#253f36;font-weight:750;font-size:11px;white-space:nowrap;
}
body.ui-home .ms20-meta .ms20-rating svg {color:#efa500;stroke:none;}
body.ui-home .ms20-excerpt {
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden;min-height:2.85em;margin:0;
  color:#516760;font-size:11.6px;line-height:1.43;
}
/* The reference's actual cream footer and rounded *dark green price capsule*. */
body.ui-home .ms20-footer {
  margin-top:auto;min-height:49px;
  padding:6px 8px 6px 10px;
  display:flex;align-items:center;justify-content:space-between;gap:7px;
  border:0;border-radius:13px;
  background:linear-gradient(108deg,#f8eadd,#fff7ec 66%,#faeee1);
}
body.ui-home .ms18-stays .ms20-footer {background:linear-gradient(100deg,#edf4e8,#fbf7ed 72%,#e4f3e9);}
body.ui-home .ms20-footer .ms18-card-from {
  display:inline-flex;align-items:center;align-content:center;flex-wrap:wrap;
  gap:3px 5px;min-width:0;line-height:1.2;
  color:#32584d;font-size:11px;
}
body.ui-home .ms20-footer .ms18-card-from strong {
  display:inline-block;max-width:100%;
  padding:6px 11px;border-radius:999px;
  background:linear-gradient(160deg,#24734d,#0c4733);
  color:#fff;font-size:clamp(12px,1.11vw,16px);font-weight:800;
  font-family:'Playfair Display',Georgia,serif;
  line-height:1.2;letter-spacing:-.015em;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22),0 2px 4px rgba(11,75,55,.11);
  white-space:nowrap;
}
body.ui-home .ms20-footer .ms18-card-from small {font-size:10px;color:#52665f;}
body.ui-home .ms20-footer .ms18-card-open {
  width:37px;height:37px;min-width:37px;flex:none;
  border:1px solid #edf1e3;
  background:linear-gradient(155deg,#27795b,#0d4c39);
  box-shadow:0 2px 6px rgba(8,66,45,.19);
  color:#fff;
}
body.ui-home .ms20-footer .ms18-card-open:hover,
body.ui-home .ms20-footer .ms18-card-open:focus-visible {
  background:#e86d53;color:#fff;
}
body.ui-home .ms20-footer .ms18-card-open svg {width:20px;height:20px;stroke:#fff;}
body.ui-home .ms18-stays {
  background:linear-gradient(107deg,#eff9f5 0%,#e3f5ee 100%);
  border-radius:24px;
}

@media(max-width:1150px) {
  body.ui-home .ms18-tour-cards,body.ui-home .ms18-stay-cards {gap:13px;}
  body.ui-home .ms20-body {padding:0 12px 12px;min-height:200px;gap:7px;}
  body.ui-home .ms20-body h3 {font-size:clamp(19px,2.15vw,24px);}
  body.ui-home .ms20-footer {padding:6px 7px;}
  body.ui-home .ms20-footer .ms18-card-from strong {font-size:clamp(11px,1.23vw,15px);padding:6px 8px;}
}
@media(max-width:960px) {
  body.ui-home .ms18-tour-cards,body.ui-home .ms18-stay-cards {grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:760px) {
  body.ui-home .ms18-tour-cards,body.ui-home .ms18-stay-cards {grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
  body.ui-home .ms18-stays {margin-inline:-14px;padding-inline:14px;}
  body.ui-home .ms20-card {border-radius:18px;}
  body.ui-home .ms20-photo::after {height:33px;}
  body.ui-home .ms20-body {padding:0 12px 12px;min-height:185px;gap:7px;}
  body.ui-home .ms20-body h3 {font-size:20px;}
}
@media(max-width:480px) {
  body.ui-home .ms18-stays {margin-inline:0;}
  body.ui-home .ms18-tour-cards,body.ui-home .ms18-stay-cards {
    display:grid;grid-template-columns:none;grid-auto-flow:column;
    grid-auto-columns:min(80vw,280px);gap:12px;
    overflow-x:auto;scroll-snap-type:x mandatory;
  }
  body.ui-home .ms20-card {scroll-snap-align:start;}
  body.ui-home .ms20-photo {aspect-ratio:1.61;}
  body.ui-home .ms20-body {min-height:192px;}
  body.ui-home .ms20-body h3 {font-size:21px;}
  body.ui-home .ms20-footer .ms18-card-from strong {font-size:12px;}
}
@media(prefers-reduced-motion:reduce) {
  body.ui-home .ms20-card,body.ui-home .ms20-photo img {transition:none;}
}
