/* Special offers strip (site/ads.js). Sits in .discover between the search
 * panel and the business rows; tokens and the row header follow
 * site/directory.css. */

.ad-strip { max-width: 1200px; margin: 0 auto; padding: 1.6rem 2rem 0; }

/* Room for the cards before they arrive, so the rows below do not jump. */
.ad-strip.is-loading { min-height: 318px; }
.ad-strip.is-loading .ad-skel { height: 236px; border-radius: 18px; background: linear-gradient(90deg, #E3EBED 0%, #EEF3F4 50%, #E3EBED 100%); background-size: 200% 100%; animation: ad-shimmer 1.4s linear infinite; }
.ad-strip.is-loading .ad-skel-head { width: 200px; height: 22px; border-radius: 6px; background: #E3EBED; margin: 0 0 1.2rem; }
@keyframes ad-shimmer { to { background-position: -200% 0; } }

.ad-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: .7rem; }
.ad-head h2 { font-size: 1.45rem; font-weight: 800; color: #1A1A2E; margin: 0; display: flex; align-items: center; gap: .5rem; letter-spacing: -.01em; }
.ad-head-icon { width: 34px; height: 34px; border-radius: 10px; background: #E0F7FA; color: #00BCD4; display: inline-grid; place-items: center; font-size: .95rem; flex: none; }
.ad-head p { margin: .15rem 0 0; font-size: .86rem; color: #5F6E72; }
.ad-nav { display: flex; gap: .4rem; flex: none; }
.ad-arrow { width: 40px; height: 40px; border-radius: 50%; border: 1px solid #E3EBED; background: #fff; color: #1A1A2E; cursor: pointer; display: grid; place-items: center; transition: background .15s, border-color .15s; }
.ad-arrow:hover { background: #E0F7FA; border-color: #B2EBF2; }
.ad-arrow:focus-visible, .ad-dot:focus-visible, .ad-card:focus-visible { outline: 3px solid #00BCD4; outline-offset: 2px; }
.ad-static .ad-nav { display: none; }

.ad-viewport { margin: -.5rem -2rem -1.1rem; }
.ad-track {
  /* The scroller clips whatever leaves it, the cards' shadow included: the
     padding leaves the shadow room (else its cut edge reads as a line under
     the cards), and the viewport's negative margins give that room back. */
  list-style: none; margin: 0; padding: .85rem 2rem 2rem;
  display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-padding: 0 2rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.ad-track::-webkit-scrollbar { display: none; }
/* Two cards side by side on a wide screen, one with the next peeking on a phone (the app's 82 %). */
.ad-slide { flex: 0 0 calc((100% - 1rem) / 2); scroll-snap-align: start; min-width: 0; }
.ad-static .ad-slide:only-child { flex-basis: min(100%, 720px); }

.ad-card {
  position: relative; display: flex; align-items: flex-end; height: 236px; border-radius: 18px; overflow: hidden;
  background: linear-gradient(135deg, #00838F, #1A1A2E); color: #fff; text-decoration: none;
  box-shadow: 0 8px 20px rgba(10, 30, 35, .13); transition: transform .2s, box-shadow .2s;
}
.ad-card.is-link:hover { transform: translateY(-3px); box-shadow: 0 12px 22px rgba(10, 30, 35, .18); }
.ad-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.ad-card.is-link:hover .ad-img { transform: scale(1.04); }
.ad-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 18, 30, .05) 10%, rgba(10, 18, 30, .55) 48%, rgba(10, 18, 30, .9) 100%); }
.ad-card.no-img .ad-shade { background: radial-gradient(circle at 85% 15%, rgba(127, 227, 239, .25), transparent 55%); }
.ad-badge { position: absolute; top: 12px; left: 12px; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: rgba(255, 255, 255, .92); color: #1A1A2E; padding: .25rem .55rem; border-radius: 999px; }
.ad-body { position: relative; display: flex; flex-direction: column; gap: .3rem; width: 100%; padding: 1rem 1.1rem 1rem; }
.ad-biz { font-size: .8rem; font-weight: 700; color: #7FE3EF; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-biz i { font-size: .72rem; margin-right: .15rem; }
.ad-title { font-size: 1.22rem; font-weight: 800; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ad-desc { font-size: .88rem; line-height: 1.4; color: rgba(255, 255, 255, .85); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ad-foot { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .25rem; }
.ad-meta { display: flex; flex-wrap: wrap; gap: .3rem .7rem; min-width: 0; overflow: hidden; }
.ad-meta-item { font-size: .76rem; font-weight: 600; color: rgba(255, 255, 255, .85); white-space: nowrap; }
.ad-meta-item i { color: #7FE3EF; font-size: .7rem; margin-right: .15rem; }
.ad-meta-item .fa-star { color: #FFC107; }
.ad-cta { flex: none; display: inline-flex; align-items: center; gap: .4rem; background: #00BCD4; color: #fff; font-size: .84rem; font-weight: 800; padding: .5rem .9rem; border-radius: 999px; white-space: nowrap; transition: background .15s; }
.ad-card.is-link:hover .ad-cta { background: #00A5BA; }
.ad-cta i { font-size: .74rem; }

.ad-dots { position: relative; display: flex; justify-content: center; gap: .4rem; margin-top: .35rem; }
.ad-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: #CBD8DB; cursor: pointer; transition: width .2s, background .2s; }
.ad-dot[aria-current="true"] { width: 22px; background: #00BCD4; }
.ad-static .ad-dots { display: none; }

@media (max-width: 760px) {
  .ad-strip { padding: 1.3rem 1rem 0; }
  .ad-strip.is-loading { min-height: 300px; }
  .ad-viewport { margin: -.5rem -1rem -1.1rem; }
  .ad-track { padding: .85rem 1rem 2rem; gap: .75rem; scroll-padding: 0 1rem; }
  .ad-slide { flex-basis: 86%; }
  .ad-static .ad-slide:only-child { flex-basis: 100%; }
  .ad-nav { display: none; }
  .ad-head h2 { font-size: 1.2rem; }
  .ad-card { height: 220px; }
  .ad-title { font-size: 1.08rem; -webkit-line-clamp: 3; }
  /* The headline matters more than the blurb on a phone: three lines for it, one for this. */
  .ad-desc { -webkit-line-clamp: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .ad-card, .ad-img, .ad-dot { transition: none; }
  .ad-card.is-link:hover, .ad-card.is-link:hover .ad-img { transform: none; }
  .ad-strip.is-loading .ad-skel { animation: none; }
}
.ad-strip[hidden] { display: none; }

/* Cards with a phone number: the card's link is stretched over it and the
   phone link sits above, so both can be tapped. */
.ad-cover { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.ad-cover:focus-visible { outline: 3px solid #00BCD4; outline-offset: 2px; }
.ad-body { pointer-events: none; }
.ad-phone { position: relative; z-index: 2; pointer-events: auto; color: #fff; text-decoration: none; white-space: normal; }
.ad-phone strong { font-weight: 800; color: #fff; }
.ad-phone:hover strong, .ad-phone:focus-visible strong { text-decoration: underline; }
.ad-phone:focus-visible { outline: 2px solid #7FE3EF; outline-offset: 2px; border-radius: 4px; }
.ad-phone .fa-phone { color: #7FE3EF; }
/* Phones: the card keeps just the icon and the number; the label is in the detail sheet. */
@media (max-width: 760px) {
  .ad-phone-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ad-phone { white-space: nowrap; }
}

/* ---------------------------------------------------------------- */
/* Detail dialog: a centred card on wide screens, a bottom sheet on  */
/* phones (site/ads.js openDialog).                                  */
/* ---------------------------------------------------------------- */
html.ad-dialog-open { overflow: hidden; }
.ad-dialog {
  /* The site's reset zeroes margins, which undoes <dialog>'s own centring. */
  position: fixed; inset: 0; margin: auto; height: fit-content;
  width: min(560px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 48px);
  padding: 0; border: 0; border-radius: 22px; background: transparent; overflow: visible; color: #1A1A2E;
}
.ad-dialog::backdrop { background: rgba(10, 18, 30, .55); backdrop-filter: blur(2px); }
.ad-dialog[open] { animation: ad-dlg-in .22s ease-out; }
@keyframes ad-dlg-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.ad-dlg-panel {
  position: relative; display: flex; flex-direction: column; max-height: calc(100vh - 48px);
  background: #fff; border-radius: 22px; overflow: auto; overscroll-behavior: contain;
  box-shadow: 0 30px 70px rgba(10, 18, 30, .35); transition: transform .2s ease-out;
}
.ad-dlg-handle { display: none; }
.ad-dlg-close {
  position: absolute; top: 12px; right: 12px; z-index: 2; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .92); color: #1A1A2E; font-size: 1.05rem; cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 2px 10px rgba(10, 18, 30, .18);
}
.ad-dlg-close:hover { background: #fff; }
.ad-dlg-close:focus-visible, .ad-dlg-cta:focus-visible, .ad-dlg-phone:focus-visible { outline: 3px solid #00BCD4; outline-offset: 2px; }
.ad-dlg-media { flex: none; aspect-ratio: 2 / 1; background: #F1F5F6; border-bottom: 1px solid #EEF2F3; }
.ad-dlg-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ad-dlg-body { padding: 1.1rem 1.4rem .4rem; }
.ad-dlg-badge { display: inline-block; font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #5F6E72; background: #F1F5F6; padding: .22rem .55rem; border-radius: 999px; }
.ad-dlg-biz { margin: .7rem 0 0; font-size: .88rem; font-weight: 700; color: #00747F; }
.ad-dlg-biz i { font-size: .8rem; margin-right: .2rem; }
.ad-dlg-title { margin: .45rem 0 0; font-size: 1.4rem; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; color: #1A1A2E; }
.ad-dlg-desc { margin: .6rem 0 0; font-size: 1rem; line-height: 1.55; color: #3C4A4E; white-space: pre-line; }
.ad-dlg-meta { list-style: none; margin: .9rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.ad-dlg-meta li { font-size: .82rem; font-weight: 600; color: #1A1A2E; background: #F1F5F6; padding: .35rem .7rem; border-radius: 999px; }
.ad-dlg-meta li i { color: #00BCD4; font-size: .76rem; margin-right: .15rem; }
.ad-dlg-meta li .fa-star { color: #FFC107; }
.ad-dlg-phone {
  display: flex; align-items: center; gap: .8rem; margin: 1rem 0 0; padding: .75rem .9rem;
  border: 1px solid #E3EBED; border-radius: 16px; text-decoration: none; color: #1A1A2E; transition: background .15s, border-color .15s;
}
.ad-dlg-phone:hover { background: #F4FBFC; border-color: #B2EBF2; }
.ad-dlg-phone-icon { flex: none; width: 40px; height: 40px; border-radius: 12px; background: #E0F7FA; color: #00838F; display: grid; place-items: center; }
.ad-dlg-phone > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ad-dlg-phone small { font-size: .78rem; color: #5F6E72; }
.ad-dlg-phone strong { font-size: 1.08rem; font-weight: 800; letter-spacing: .01em; }
.ad-dlg-phone-go { flex: none; font-size: .84rem; font-weight: 800; color: #00838F; }
.ad-dlg-actions { position: sticky; bottom: 0; padding: .9rem 1.4rem 1.2rem; background: linear-gradient(180deg, rgba(255,255,255,0), #fff 30%); }
.ad-dlg-cta {
  display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 50px; border-radius: 999px;
  background: #00BCD4; color: #fff; font-weight: 800; font-size: 1rem; text-decoration: none;
  box-shadow: 0 10px 24px rgba(0, 188, 212, .3); transition: background .15s;
}
.ad-dlg-cta:hover { background: #00A5BA; }

@media (max-width: 760px) {
  .ad-dialog {
    width: 100vw; max-height: 88vh; margin: auto 0 0; inset: auto 0 0 0; border-radius: 22px 22px 0 0;
  }
  .ad-dialog[open] { animation: ad-sheet-in .26s cubic-bezier(.2, .8, .2, 1); }
  @keyframes ad-sheet-in { from { transform: translateY(100%); } to { transform: none; } }
  .ad-dlg-panel { max-height: 88vh; border-radius: 22px 22px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .ad-dlg-handle { display: block; position: absolute; top: 8px; left: 50%; z-index: 2; width: 44px; height: 5px; margin-left: -22px; border-radius: 999px; background: rgba(255, 255, 255, .85); box-shadow: 0 1px 4px rgba(0,0,0,.25); }
  .ad-dlg-media { aspect-ratio: 16 / 9; }
  .ad-dlg-body { padding: 1rem 1.1rem .3rem; }
  .ad-dlg-title { font-size: 1.22rem; }
  .ad-dlg-desc { font-size: .95rem; }
  .ad-dlg-actions { padding: .8rem 1.1rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ad-dialog[open], .ad-dlg-panel { animation: none; transition: none; }
}
.ad-dlg-panel:focus { outline: none; }
