.ttar-section {
  font-family: "Kanit", sans-serif;
  box-sizing: border-box;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

.ttar-dot,
.ttar-arrow {
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.ttar-section[data-ttar-slider] {
  --ttar-accent: #f80000;
  --ttar-accent-hover: #f80000;
  --ttar-text-dark: #111111;
  --ttar-border: #d7d7d7;
  --ttar-dot: rgba(74, 64, 56, 0.18);
  --ttar-badge: #35b879;
  --ttar-first-card-inset: max(0px, calc((100vw - var(--container-max-width, 1920px)) / 2));
  --ttar-gap: 15px;
  --ttar-slides-per-view: 4.2;
  --ttar-accentdot: #f80000;
}

.ttar-shell {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  font-family: inherit;
}

.ttar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 30px;
  padding-left: var(--ttar-first-card-inset);
  padding-right: var(--ttar-first-card-inset);
}

.ttar-title {
  margin: 0;
  color: var(--ttar-text-dark);
  font-family: inherit;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0;
}

.ttar-view-all,
.ttar-view-all:visited {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ttar-accent) !important;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none !important;
  box-shadow: none !important;
  border-bottom: 0 !important;
  background: transparent !important;
  align-self: center;
}

.ttar-view-all:hover,
.ttar-view-all:focus {
  color: var(--ttar-accent-hover) !important;
  text-decoration: none !important;
  box-shadow: none !important;
  border-bottom: 0 !important;
  background: transparent !important;
}

.ttar-view-all-icon {
  font-size: 24px;
  line-height: 1;
}

.ttar-preview-note {
  margin-bottom: 18px;
  padding: 12px 16px;
  border: 1px dashed #f0b6a2;
  border-radius: 16px;
  background: #fff7f3;
  color: #9b3a17;
  font-size: 14px;
  line-height: 1.5;
}

.ttar-track-wrap {
  overflow: hidden;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.ttar-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc(
    (100% - (var(--ttar-gap) * (var(--ttar-slides-per-view) - 1))) /
      var(--ttar-slides-per-view)
  );
  gap: var(--ttar-gap);
  overflow-x: scroll;
  padding: 6px 0 14px var(--ttar-first-card-inset);
  scroll-padding-left: var(--ttar-first-card-inset);
  scroll-padding-right: 0;
  scroll-snap-type: none;
  scrollbar-width: none;
  overscroll-behavior-x: auto;
  touch-action: auto;
  user-select: none;
}

@media (max-width: 767px) {
  .ttar-track {
    overflow-x: scroll !important;
    overscroll-behavior-x: auto !important;
    scroll-snap-type: none !important;
    touch-action: pan-y !important;
    -webkit-overflow-scrolling: touch;
  }

  .ttar-track-wrap {
    overflow-x: visible;
  }

  .ttar-card,
  .ttar-card-link,
  .ttar-image-link,
  .ttar-image {
    touch-action: pan-y;
  }
}

.ttar-track img {
  -webkit-user-drag: none;
  user-select: none;
}

.ttar-track::-webkit-scrollbar {
  display: none;
}

.ttar-card {
  display: grid;
  grid-template-rows: auto 1fr;
  background: #fff;
  border: 1.5px solid var(--ttar-border);
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 18px rgba(17, 24, 39, 0.04);
  scroll-snap-align: none;
  scroll-snap-stop: normal;
}

.ttar-card-link {
  inset: 0;
  position: absolute;
  text-decoration: none;
  z-index: 20;
}

.ttar-image-link {
  position: relative;
  display: block;
  aspect-ratio: 1 / 0.92;
  background: linear-gradient(180deg, #f8f8f8 0%, #ededed 100%);
  overflow: hidden;
  z-index: 21;
}

@media (min-width: 768px) {
  .ttar-track {
    cursor: grab;
  }

  .ttar-track.is-dragging,
  .ttar-track.is-momentum-scrolling,
  .ttar-track.is-dragging * {
    cursor: grabbing !important;
    -webkit-user-select: none;
    user-select: none;
  }
}

.ttar-image {
  width: 100%;
  height: 100% !important;
  display: block;
  object-fit: cover;
}

.ttar-image--placeholder {
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.82), transparent 22%),
    linear-gradient(135deg, #fcfcfc, #f2f2f2 55%, #e7e7e7);
}

.ttar-image-link--missing .ttar-image--placeholder {
  display: flex;
}

.ttar-image-fallback {
  display: grid;
  justify-items: center;
  gap: 14px;
  width: 100%;
  position: relative;
}

.ttar-image-fallback-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #6b7280;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.ttar-image-fallback-box {
  width: min(154px, 70%);
  aspect-ratio: 1 / 1;
  margin-top: 18px;
  border: 3px solid rgba(156, 163, 175, 0.22);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.8), rgba(255,255,255,.35)),
    linear-gradient(135deg, #f5f5f5, #ececec);
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}

.ttar-image-fallback-box::before {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 20px;
  border: 2px dashed rgba(156, 163, 175, 0.36);
}

.ttar-image-fallback-lines {
  display: grid;
  gap: 8px;
  width: min(170px, 76%);
}

.ttar-image-fallback-lines span {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: rgba(156, 163, 175, 0.24);
}

.ttar-image-fallback-lines span:nth-child(2) {
  width: 78%;
  justify-self: center;
}

.ttar-image-fallback-lines span:nth-child(3) {
  width: 54%;
  justify-self: center;
}

.ttar-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  pointer-events: none;
  display: block;
  box-sizing: border-box;
  min-width: 44px;
  max-width: calc(100% - 24px);
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--ttar-badge);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ttar-content {
  display: flex;
  flex-direction: column;
  padding: 14px 16px 16px;
  align-content: space-between;
  /* min-height: 120px; */
}

.ttar-article-title {
  margin: 0;
  color: #5a5a5a;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.02em;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ttar-button,
.ttar-button:link,
.ttar-button:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  margin-top: 10px;
  color: var(--ttar-accent) !important;
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none !important;
  box-shadow: none !important;
  border-bottom: 0 !important;
  background: transparent !important;
  position: relative;
  z-index: 21;
}

.ttar-button:hover,
.ttar-button:focus {
  color: var(--ttar-accent-hover) !important;
  text-decoration: none !important;
  box-shadow: none !important;
  border-bottom: 0 !important;
  background: transparent !important;
}

.ttar-button-arrow {
  width: 17px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 17px;
  margin-top: 5px;
}

.ttar-button-arrow svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ttar-button-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  line-height: 1;
  text-align: center;
}

.ttar-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
  flex-wrap: nowrap;
  max-width: 100%;
  box-sizing: border-box;
}

.ttar-pagination {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.ttar-dot {
  width: 30px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  flex: 0 0 30px;
  padding: 0;
  cursor: pointer;
  position: relative;
}

.ttar-dot.is-hidden {
  display: none;
}

.ttar-dot::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--ttar-dot);
  transform: translate(-50%, -50%);
  transition:
    background-color .18s ease,
    width .22s cubic-bezier(0.22, 0.61, 0.36, 1);
}


.ttar-dot:hover{
  background-color: transparent;
}

.ttar-section[data-ttar-slider] .ttar-dot,
.ttar-section[data-ttar-slider] .ttar-dot:hover,
.ttar-section[data-ttar-slider] .ttar-dot:focus,
.ttar-section[data-ttar-slider] .ttar-dot:focus-visible,
.ttar-section[data-ttar-slider] .ttar-dot:active {
  -webkit-appearance: none !important;
  appearance: none !important;
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  color: transparent !important;
  outline: 0 !important;
  text-decoration: none !important;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.ttar-section[data-ttar-slider] .ttar-dot::-moz-focus-inner {
  border: 0;
  padding: 0;
}

.ttar-dot:hover::before{
  background-color: var(--ttar-accentdot) !important;
}

.ttar-dot.is-active::before {
  width: 28px;
  background: var(--ttar-accent);
}

.ttar-arrows {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.ttar-arrow {
  -webkit-appearance: none;
  appearance: none;
  align-items: center;
  background: #fff;
  border: 1px solid rgba(63, 53, 45, 0.14);
  border-radius: 999px;
  box-shadow: none;
  color: #39322d;
  cursor: pointer;
  display: inline-flex;
  font-size: 1.8rem;
  justify-content: center;
  width: 50px;
  height: 50px;
  min-width: 50px;
  min-height: 50px;
  line-height: 1;
  padding: 0;
  text-decoration: none;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
  vertical-align: middle;
}

.ttar-arrow:hover,
.ttar-arrow:active {
  background: var(--ttar-accent) !important;
  border-color: var(--ttar-accent) !important;
  color: #fff !important;
}

.ttar-arrow:focus,
.ttar-arrow:focus-visible {
  background: #fff !important;
  border-color: rgba(63, 53, 45, 0.14) !important;
  color: #39322d !important;
  outline: 0 !important;
}

.ttar-arrow:focus:hover,
.ttar-arrow:focus-visible:hover,
.ttar-arrow:focus:active,
.ttar-arrow:focus-visible:active {
  background: var(--ttar-accent) !important;
  border-color: var(--ttar-accent) !important;
  color: #fff !important;
}

.ttar-arrow svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 767px) {
  .ttar-controls {
    gap: 12px;
  }

  .ttar-pagination {
    flex: 0 1 auto;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .ttar-section[data-ttar-slider] {
    --ttar-gap: 18px;
    --ttar-slides-per-view: 3.25;
  }

  .ttar-track-wrap {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .ttar-track {
    padding-left: 24px;
    padding-right: 24px;
    scroll-padding-left: 24px;
    scroll-padding-right: 24px;
  }

  .ttar-controls {
    justify-content: space-between;
    width: 100%;
    margin-inline: 0;
    padding-inline: 24px;
  }

  .ttar-pagination {
    flex: 1 1 auto;
    overflow: hidden;
  }
}

@media (max-width: 767px) {
  .ttar-header {
    margin-bottom: 20px;
    padding: 0 15px;
  }

  .ttar-title {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.08;
  }

  .ttar-view-all {
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
  }

  .ttar-view-all-icon {
    font-size: 20px;
  }

  .ttar-track {
    grid-auto-columns: calc(
      (var(--ttar-viewport-width, 100%) - 30px - (var(--ttar-gap) * (var(--ttar-slides-per-view) - 1))) /
        var(--ttar-slides-per-view)
    );
    padding-inline: 15px;
    scroll-padding-inline: 15px;
  }

  .ttar-track-wrap {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .ttar-section[data-ttar-slider] {
    --ttar-gap: 10px;
    --ttar-slides-per-view: 2.2;
  }

  .ttar-article-title {
    font-size: 16px;
  }

  .ttar-button {
    gap: 6px;
    margin-top: 8px;
    font-size: 14px;
  }

  .ttar-button-label {
    font-size: 14px;
    line-height: 1;
  }

  .ttar-button-arrow {
    width: 15px;
    height: 15px;
    flex-basis: 15px;
    margin-top: 3px;
  }

  .ttar-card {
    border-radius: 18px;
  }

  .ttar-image-link {
    border-radius: 18px 18px 0 0;
  }

  .ttar-controls {
    gap: 16px;
  }

  .ttar-arrow {
    width: 50px;
    height: 50px;
  }
}

@media (min-width: 1025px) {
  .ttar-section[data-ttar-slider] {
    --ttar-slides-per-view: 4.2 !important;
  }

  .ttar-section[data-ttar-slider] .ttar-track {
    grid-auto-columns: calc(
      (100% - (var(--ttar-gap) * (4.2 - 1))) /
        4.2
    ) !important;
  }

  .ttar-section[data-ttar-slider] .ttar-track a,
  .ttar-section[data-ttar-slider] .ttar-track img {
    -webkit-user-drag: none;
  }
}
