/**
 * IVK Comparison Card — Base styles
 *
 * Card structure: single <a> wraps entire card (whole card clickable).
 * Layouts:
 *   .ivk-cc-card-horizontal — image left, content right
 *   .ivk-cc-card-vertical   — image top, content below
 *
 * Responsive: horizontal collapses to vertical below 768px.
 */

/* ── Container ───────────────────────────────────────────── */

.ivk-cc-container {
  margin: 24px 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ivk-cc-container.ivk-cc-layout-vertical {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.ivk-cc-container.ivk-cc-layout-horizontal {
  display: block;
}


/* ── Card base (single anchor) ───────────────────────────── */

.ivk-cc-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.ivk-cc-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}


/* ── Horizontal layout (single card) ─────────────────────── */

.ivk-cc-card-horizontal {
  flex-direction: row;
  align-items: stretch;
}

.ivk-cc-card-horizontal .ivk-cc-image {
  flex: 0 0 320px;
  position: relative;
  background: #f3f4f6;
}

.ivk-cc-card-horizontal .ivk-cc-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ivk-cc-card-horizontal .ivk-cc-body {
  flex: 1;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}


/* ── Vertical layout (grid card) ─────────────────────────── */

.ivk-cc-card-vertical {
  flex-direction: column;
}

.ivk-cc-card-vertical .ivk-cc-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  background: #f3f4f6;
}

.ivk-cc-card-vertical .ivk-cc-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ivk-cc-card-vertical .ivk-cc-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}


/* ── Image overlay badge ─────────────────────────────────── */

.ivk-cc-image {
  display: block;
  position: relative;
}

.ivk-cc-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0,0,0,0.7);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 4px;
}

.ivk-cc-image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}


/* ── Text content ────────────────────────────────────────── */

.ivk-cc-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  color: #111827;
  transition: color 0.15s ease;
}

.ivk-cc-card:hover .ivk-cc-title {
  color: #fb501b;
}

.ivk-cc-subtitle {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

.ivk-cc-description {
  font-size: 14px;
  color: #374151;
  line-height: 1.5;
  margin: 4px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* ── OTA pills ───────────────────────────────────────────── */

.ivk-cc-ota-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}

.ivk-cc-ota-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.4;
}

.ivk-cc-ota-klook        { background: #fb501b; }
.ivk-cc-ota-viator       { background: #008e6f; }
.ivk-cc-ota-kkday        { background: #ff5b00; }
.ivk-cc-ota-getyourguide { background: #2563eb; }
.ivk-cc-ota-civitatis    { background: #ff6b35; }
.ivk-cc-ota-headout      { background: #7c3aed; }
.ivk-cc-ota-trazy        { background: #6b7280; }
.ivk-cc-ota-generic      { background: #9ca3af; }


/* ── Meta line ───────────────────────────────────────────── */

.ivk-cc-meta {
  font-size: 13px;
  color: #4b5563;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.ivk-cc-rating { color: #f59e0b; font-weight: 600; }
.ivk-cc-price  { font-weight: 700; color: #111827; }
.ivk-cc-duration { color: #6b7280; }
.ivk-cc-sep { color: #d1d5db; }


/* ── Picks badge ─────────────────────────────────────────── */

.ivk-cc-picks-badge {
  font-size: 12px;
  color: #92400e;
  background: #fef3c7;
  padding: 4px 10px;
  border-radius: 4px;
  display: inline-block;
  font-weight: 600;
  align-self: flex-start;
}


/* ── CTA button (span, NOT anchor — whole card is anchor) ─ */

.ivk-cc-cta {
  display: block;
  margin-top: auto;
  padding: 10px 16px;
  background: #f3f4f6;
  color: #111827;
  border-radius: 6px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}

.ivk-cc-card:hover .ivk-cc-cta {
  background: #fb501b;
  color: #ffffff;
}

.ivk-cc-arrow {
  display: inline-block;
  transition: transform 0.15s ease;
}

.ivk-cc-card:hover .ivk-cc-arrow {
  transform: translateX(3px);
}


/* ── Responsive — horizontal collapses to vertical ──────── */

@media (max-width: 768px) {
  .ivk-cc-card-horizontal {
      flex-direction: column;
  }
  .ivk-cc-card-horizontal .ivk-cc-image {
      flex: 0 0 auto;
      aspect-ratio: 16 / 9;
  }
  .ivk-cc-card-horizontal .ivk-cc-description {
      display: none;  /* Mobile horizontal-fallback: hide description */
  }
}