/* Whole-card links retain normal browser link behavior and one keyboard stop. */
.card-surface {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: inherit;
}
.linked-card::after { display: none; }
.card-surface::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #19181205 20%, #191812dc 100%);
  pointer-events: none;
  content: '';
}
.linked-card { transition: box-shadow .2s ease, border-color .2s ease; }
.linked-card:focus-within { outline: 3px solid var(--sand); outline-offset: 4px; }
.card-surface:focus-visible { outline: none; }
.linked-card .card-link { text-decoration: underline; text-underline-offset: 5px; text-decoration-color: #ffffff70; }
.linked-card:hover .card-link, .linked-card:focus-within .card-link { text-decoration-color: currentColor; }

/* Cards with separate actions keep those actions independent. */
.info-card .card-image-link {
  display: block;
  overflow: hidden;
  margin: -26px -26px 22px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.info-card .card-image-link picture { margin: 0; border-radius: 0; }
.card-image-link img { transition: transform .3s ease; }
.card-image-link:focus-visible { outline-offset: -4px; }
.tour-card .tour-card__media {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--stone-100);
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.tour-card__media img { transition: transform .3s ease; }
.tour-card__media:focus-visible { outline-offset: -4px; }
.tour-card__media:focus-visible img { filter: brightness(.9); }
html { scroll-padding-top: calc(var(--header-height) + 20px); }
.field :is(input, select, textarea)[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.button--secondary:hover { background: var(--stone-50); }
.button--ghost:hover { background: #ffffff14; border-color: #fff; }
.footer-links a { display: inline-flex; align-items: center; min-height: 36px; text-underline-offset: 4px; }
.footer-links a:hover, .footer-legal a:hover { text-decoration: underline; }
.icon-button:hover { border-color: var(--sand); }

/* Keep Latin contact details readable within Arabic layouts. */
.contact-option > div > span { direction: ltr; unicode-bidi: isolate; }
input[type="email"], input[type="date"] { direction: ltr; }
.site-footer .brand-copy strong { max-width: none; white-space: normal; overflow: visible; text-overflow: clip; }
html:lang(ar) :is(.hero-copy h1, .page-hero h1, .dialog__header h2) { line-height: 1.3; }
html:lang(ru) :is(h1, h2, h3) { letter-spacing: -.02em; }

@media (min-width: 768px) {
  html:is(:lang(it), :lang(ru)) .home-page .hero-copy h1 {
    max-width: 790px;
    font-size: clamp(2.65rem, 5.4vw, 4.5rem);
    line-height: 1.12;
  }
}
@media (max-width: 760px) {
  .dialog__header h2 { font-size: clamp(1.35rem, 5.8vw, 1.8rem); line-height: 1.25; }
  .dialog__header > div { min-width: 0; }
  .tour-card__actions .button { max-width: 100%; }
}

@media (max-width: 767px) {
  .home-page .linked-card .card-surface {
    position: relative;
    inset: auto;
    display: flex;
    flex: 1;
    flex-direction: column;
  }
  .home-page .linked-card .card-surface::after { display: none; }
  .home-page .linked-card .card-link { color: var(--sand-dark); text-decoration-color: currentColor; }
}

@media (hover: hover) {
  .linked-card:hover { box-shadow: 0 16px 40px #28251f26; }
  .card-image-link:hover img, .tour-card__media:hover img { transform: scale(1.035); }
}
@media (prefers-reduced-motion: reduce) {
  .linked-card, .card-image-link img, .tour-card__media img { transition: none; }
  .card-image-link:hover img, .tour-card__media:hover img { transform: none; }
}
