:root {
  --tc-primary: #005B6F;
  --tc-primary-dark: #004555;
  --tc-bg: transparent;
  --tc-card: #ffffff;
  --tc-text: #1a2832;
  --tc-muted: #5c6f7d;
  --tc-border: #d4dee6;
  --tc-radius: 16px;
  --tc-shadow: 0 8px 28px rgba(0, 45, 55, 0.08);
  --tc-font: 'Noto Sans Arabic', Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }

.tc-embed-body {
  margin: 0;
  padding: 0;
  background: var(--tc-bg);
  color: var(--tc-text);
  font-family: var(--tc-font);
  line-height: 1.6;
  overflow-x: hidden;
}

.tc-embed-root {
  width: 100%;
  max-width: 100%;
}

.tc-embed-empty {
  margin: 0;
  padding: 20px;
  text-align: center;
  color: var(--tc-muted);
  background: var(--tc-card);
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius);
}

.tc-embed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.tc-embed-carousel {
  display: flex;
  align-items: stretch;
  gap: 10px;
  width: 100%;
}

.tc-embed-carousel__viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.tc-embed-track {
  display: flex;
  flex-direction: row;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 2px 8px;
}

.tc-embed-track::-webkit-scrollbar {
  display: none;
}

.tc-embed-track .tc-embed-card {
  flex: 0 0 calc((100% - 48px) / 4);
  min-width: calc((100% - 48px) / 4);
  max-width: calc((100% - 48px) / 4);
  scroll-snap-align: start;
}

.tc-embed-carousel__nav {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  align-self: center;
  border: 1px solid var(--tc-border);
  border-radius: 50%;
  background: var(--tc-card);
  color: var(--tc-primary-dark);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--tc-shadow);
  transition: opacity 0.15s ease, background 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.tc-embed-carousel__nav:hover:not(:disabled) {
  background: #eef3f6;
}

.tc-embed-carousel__nav:disabled {
  opacity: 0.35;
  cursor: default;
}

@media (max-width: 900px) {
  .tc-embed-card__body {
    padding: 9px 10px 11px;
    gap: 6px;
  }

  .tc-embed-card__title {
    font-size: 0.76rem;
    min-height: 2.45em;
  }

  .tc-embed-meta {
    padding: 6px 7px;
  }

  .tc-embed-meta__item {
    font-size: 0.58rem;
  }

  .tc-embed-chip {
    font-size: 0.62rem;
  }

  .tc-embed-btn {
    padding: 8px 10px;
    font-size: 0.74rem;
  }
}

@media (max-width: 639px) {
  .tc-embed-track .tc-embed-card {
    flex: 0 0 calc((100% - 16px) / 2);
    min-width: calc((100% - 16px) / 2);
    max-width: calc((100% - 16px) / 2);
  }
}

@media (max-width: 480px) {
  .tc-embed-carousel__nav {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    font-size: 1.35rem;
  }

  .tc-embed-track .tc-embed-card {
    flex: 0 0 calc(85% - 8px);
    min-width: calc(85% - 8px);
    max-width: calc(85% - 8px);
  }
}

.tc-embed-card {
  display: flex;
  flex-direction: column;
  background: var(--tc-card);
  border: 1px solid rgba(212, 222, 230, 0.9);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 45, 55, 0.07);
  overflow: hidden;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tc-embed-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0, 45, 55, 0.11);
}

.tc-embed-card__media {
  position: relative;
  overflow: hidden;
}

.tc-embed-card__img {
  display: block;
  aspect-ratio: 16 / 10;
  background: linear-gradient(145deg, #e8eef2, #dce8ee);
  overflow: hidden;
}

.tc-embed-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.tc-embed-card:hover .tc-embed-card__img img {
  transform: scale(1.03);
}

.tc-embed-card__img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  background: linear-gradient(135deg, #eef3f6, #d4dee6);
}

.tc-embed-card__body {
  padding: 11px 12px 13px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 7px;
}

.tc-embed-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tc-embed-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.25;
  border: 1px solid transparent;
  white-space: nowrap;
}

.tc-embed-chip--free {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: #065f46;
  border-color: #6ee7b7;
}

.tc-embed-chip--price {
  background: linear-gradient(135deg, #eef8fa, #dceef2);
  color: var(--tc-primary-dark);
  border-color: #9ec5d0;
}

.tc-embed-chip--remote {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: #1e40af;
  border-color: #93c5fd;
}

.tc-embed-chip--intl {
  width: 100%;
  justify-content: center;
  padding: 5px 8px;
  background: linear-gradient(135deg, #fff9e6, #f5efd4);
  color: #6b5a12;
  border-color: #c5b358;
  font-size: 0.64rem;
  line-height: 1.35;
  text-align: center;
}

.tc-embed-card__title {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.38;
  min-height: 2.65em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tc-embed-card__title a {
  color: var(--tc-primary-dark);
  text-decoration: none;
  font-weight: 700;
}

.tc-embed-card__title a:hover {
  color: var(--tc-primary);
}

.tc-embed-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 7px 8px;
  border-radius: 10px;
  background: #f7fafb;
  border: 1px solid #e8eef2;
}

.tc-embed-meta__item {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 4px 5px;
  font-size: 0.62rem;
  color: var(--tc-muted);
  min-width: 0;
}

.tc-embed-meta__ico {
  font-size: 0.72rem;
  line-height: 1;
}

.tc-embed-meta__lbl {
  font-weight: 600;
  flex-shrink: 0;
}

.tc-embed-meta__val {
  color: var(--tc-text);
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tc-embed-meta__item--time .tc-embed-meta__val {
  letter-spacing: 0.02em;
}

.tc-embed-card__sub {
  margin: 0;
  font-size: 0.68rem;
  color: var(--tc-muted);
  line-height: 1.35;
}

.tc-embed-btn {
  display: block;
  width: 100%;
  margin-top: auto;
  padding: 9px 12px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--tc-primary), var(--tc-primary-dark));
  color: #fff !important;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.78rem;
  box-shadow: 0 6px 16px rgba(0, 91, 111, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.tc-embed-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 91, 111, 0.28);
  text-decoration: none;
  opacity: 1;
}

.tc-embed-loading,
.tc-embed-error {
  margin: 0;
  padding: 20px;
  text-align: center;
  color: var(--tc-muted);
}

.tc-embed-error {
  color: #b91c1c;
}

@media (max-width: 480px) {
  .tc-embed-grid {
    grid-template-columns: 1fr;
  }
}
