/**
 * Shared by multiple TAS Elementor widgets (section head, buttons).
 * Loaded only when a widget that depends on tas-blocks-common is on the page.
 */

.tas-section-head {
  text-align: center;
  margin: 0 0 35px;
}

.tas-section-head__title {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--primary);
}

.tas-section-head__desc {
  margin: 0 auto;
  max-width: 720px;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.tas-section-head__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.tas-section-head__divider::before,
.tas-section-head__divider::after {
  content: "";
  width: 72px;
  height: 1px;
  background: var(--accent);
  opacity: 0.65;
}

.tas-section-head__divider span {
  width: 8px;
  height: 8px;
  border: 1px solid var(--accent);
  transform: rotate(45deg);
  background: transparent;
}

/* Left-aligned section head — Case study detail blocks, etc. */
.tas-section-head--left {
  text-align: left;
  margin-bottom: clamp(28px, 3.5vw, 40px);
}

.tas-section-head--left .tas-section-head__title {
  font-weight: 600;
}

.tas-section-head--left .tas-section-head__desc {
  margin-left: 0;
  margin-right: auto;
}

.tas-section-head--left .tas-section-head__divider {
  justify-content: flex-start;
  margin-top: 14px;
}

.tas-section-head--left .tas-section-head__divider::before {
  width: 56px;
}

.tas-section-head--left .tas-section-head__divider::after,
.tas-section-head--left .tas-section-head__divider span {
  display: none;
}

.tas-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none !important;
  border-radius: 8px;
  border: 2px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.tas-btn__icon,
.tas-btn__icon svg,
.tas-btn .e-font-icon-svg {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  font-size: 0.875rem;
  line-height: 1;
  fill: currentColor;
}

.tas-btn--primary .tas-btn__icon,
.tas-btn--primary .tas-btn__icon svg {
  color: var(--white);
}

.tas-btn--outline .tas-btn__icon,
.tas-btn--outline .tas-btn__icon svg {
  color: var(--accent);
}

.tas-btn--primary {
  color: var(--white) !important;
  background: var(--primary);
  border-color: var(--primary);
}

.tas-btn--primary:hover {
  background: var(--primary-active);
  border-color: var(--primary-active);
  color: var(--white) !important;
}

.tas-btn--outline {
  color: var(--accent) !important;
  background: transparent;
  border-color: var(--accent);
}

.tas-btn--outline:hover {
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--primary) !important;
}

.tas-btn--gold {
  color: var(--primary) !important;
  background: var(--accent);
  border-color: var(--accent);
}

.tas-btn--gold:hover {
  filter: brightness(1.05);
  color: var(--primary) !important;
}

.tas-btn--outline-light {
  color: var(--white) !important;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.85);
}

.tas-btn--outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white) !important;
}

/*
 * Decorative water patterns — opt-in via widget setting (show_water_deco).
 *
 * Per-widget tuning lives in that widget’s CSS (e.g. tas-cta-banner.css), not here.
 * Horizontal alignment: set --tas-content-gutter on the block (same value as
 *   width: min(100% - 2 * gutter, …)), or override with --tas-deco-inset.
 */
.tas-deco {
  position: relative;
  overflow: hidden;
  --tas-content-gutter: 20px;
  --tas-water-max: 280px;
  --tas-water-overlap: 30%;
  --tas-water-inset: var(--tas-deco-inset, var(--tas-content-gutter, clamp(28px, 3.2vw + 14px, 52px)));
}

.tas-deco > * {
  position: relative;
  z-index: 1;
}

.tas-deco--water-sides::before,
.tas-deco--water-sides::after,
.tas-deco--water-top::before,
.tas-deco--water-top::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 50%;
  pointer-events: none;
  height: min(100%, var(--tas-water-max));
  width: auto;
  aspect-ratio: 1;
  max-width: min(42vw, var(--tas-water-max));
  background-image: url("../../images/water.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.tas-deco--water-top::before,
.tas-deco--water-sides::before {
  left: var(--tas-water-inset);
  transform: translate(calc(-1 * var(--tas-water-overlap)), -50%) scaleX(-1);
}

.tas-deco--water-top::after,
.tas-deco--water-sides::after {
  right: var(--tas-water-inset);
  transform: translate(var(--tas-water-overlap), -50%);
}

@media (max-width: 767px) {
  .tas-deco {
    --tas-water-max: 160px;
    --tas-water-overlap: 22%;
    --tas-water-inset: var(--tas-deco-inset, var(--tas-content-gutter, clamp(12px, 4vw, 28px)));
  }
}

/**
 * Bootstrap .container fallback for TCS / Index blocks when Bootstrap CSS
 * is delayed or missing — keeps preview layout aligned with Elementor editor.
 */
.tcs-trusted-bar > .container,
.tcs-capabilities > .container,
.tcs-features-strip > .container,
.tcs-service-cards > .container,
.tcs-info-columns > .container,
.tcs-content-image-cards > .container,
.tcs-wl-practice > .container,
.tcs-wl-framework > .container,
.tcs-wl-compare > .container,
.tcs-wl-audience > .container,
.tcs-what-we-handle > .container,
.tcs-mice-ps > .container,
.tcs-mice-work-principles > .container,
.tcs-mice-quote-banner > .container,
.tcs-mice-partner-section > .container,
.tcs-b2b-panels > .container,
.tcs-ground-features-panel > .container,
.tcs-partner-cta > .container,
.tcs-hero-value-bar > .container,
.new-operational-areas > .container,
.dmc-trust-badges-section > .container,
.dmc-index-cta-section > .container,
.dmc-cta-section > .container {
  width: min(100% - 40px, var(--layout-max-width, 1320px));
  max-width: var(--layout-max-width, 1320px);
  margin-left: auto;
  margin-right: auto;
  padding-left: 12px;
  padding-right: 12px;
  box-sizing: border-box;
}

/**
 * Golden arch hero — shared right alignment (Dest Region, Tour Line, Tour Packages, TCS Ground Hero).
 * Adjust --tas-arch-visual-shift on any hero root to move all arch blocks together.
 */
.tas-tour-pkg-hero,
.tas-dest-region-hero,
.tas-tour-hero,
.tcs-ground-hero--arch {
  --tas-arch-max-width: 480px;
  --tas-arch-visual-shift: calc(-2 * var(--tas-content-gutter, 20px) - 16px);
}

.tas-tour-pkg-hero__visual,
.tas-dest-region-hero__visual,
.tas-tour-hero__visual,
.tcs-ground-hero--arch .tcs-ground-hero__visual {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  overflow: visible;
  margin-right: var(--tas-arch-visual-shift);
}

.tas-tour-pkg-hero__arch,
.tas-dest-region-hero__arch,
.tas-tour-hero__arch,
.tcs-ground-hero--arch .tcs-ground-hero__arch {
  width: min(100%, var(--tas-arch-max-width));
}

@media (max-width: 991px) {
  .tas-tour-pkg-hero__visual,
  .tas-dest-region-hero__visual,
  .tas-tour-hero__visual,
  .tcs-ground-hero--arch .tcs-ground-hero__visual {
    justify-content: center;
    margin-right: 0;
  }

  .tas-tour-pkg-hero__arch,
  .tas-dest-region-hero__arch,
  .tas-tour-hero__arch,
  .tcs-ground-hero--arch .tcs-ground-hero__arch {
    width: min(100%, 380px);
  }
}

@media (max-width: 767px) {
  .tas-tour-pkg-hero__arch,
  .tas-dest-region-hero__arch,
  .tas-tour-hero__arch,
  .tcs-ground-hero--arch .tcs-ground-hero__arch {
    width: min(100%, 320px);
  }
}

/**
 * 用户上传 SVG（Elementor 媒体库）
 * 仅用于 span 且 class 以 __icon 结尾的包裹层：1em 跟随父级 font-size。
 * 各块 __icon-wrap / 固定 px 容器由各块 CSS 控制，此处不覆盖尺寸。
 */
span[class*="tas-"][class$="__icon"] > svg:not(.e-font-icon-svg) {
  display: block;
  flex-shrink: 0;
  width: 1em;
  height: 1em;
}

span[class*="tas-"][class$="__icon"] svg:not(.e-font-icon-svg) :where(path, circle, rect, polygon, polyline, ellipse) {
  fill: currentColor;
}

/*
 * Raster / SVG-wrapped bitmap icons are rendered as <img.tas-icon-img>.
 * Keep them the same box as FA icons; do not CSS-mask (that flattens detail).
 */
img.tas-icon-img {
  display: block;
  flex-shrink: 0;
  width: 1em;
  height: 1em;
  object-fit: contain;
  object-position: center;
}

/* 各块 __icon-wrap 内上传 SVG：仅继承颜色，尺寸由块内已有 px 规则决定 */
[class*="tas-"][class*="__icon-wrap"] svg:not(.e-font-icon-svg) :where(path, circle, rect, polygon, polyline, ellipse) {
  fill: currentColor;
}
