/* ── Index page styles ────────────────────────────────────────────────────── */

body.page-body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Layout ───────────────────────────────────────────────────────────────── */

.ix-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* ── Top: hero + download merged ──────────────────────────────────────────── */

.ix-top {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 0.5rem;
}

.ix-hero {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.ix-hero__icon {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.ix-hero__name {
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 0.15rem;
  line-height: 1.1;
}

.ix-hero__desc {
  font-size: 1rem;
  color: #555;
  margin: 0;
}

.ix-download {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.ix-dl-btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
}

.ix-dl-btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.ix-dl-badge {
  height: 44px;
  width: auto;
  display: block;
}

/* ── App description ──────────────────────────────────────────────────────── */

.ix-desc {
}

.ix-desc h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 0.6rem;
}

.ix-desc p {
  font-size: 0.95rem;
  line-height: 1.65;
  color: #444;
  margin: 0 0 1rem;
}

.ix-desc ul {
  padding-left: 0;
  margin: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ix-desc ul li {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #444;
}

.ix-desc__footer {
  margin-top: 0.5rem !important;
  font-style: italic;
  color: #666 !important;
}

/* ── Platforms section ────────────────────────────────────────────────────── */

.ix-platforms {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ix-platforms h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
}

/* ── Tab bar ──────────────────────────────────────────────────────────────── */

.ix-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ix-tab {
  appearance: none;
  border: 1.5px solid #d1d5db;
  background: #fff;
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: #444;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.ix-tab:not(.ix-tab--active):hover:not([disabled]) {
  border-color: #0B7138;
  color: #0B7138;
}

.ix-tab--active {
  background: #0B7138;
  border-color: #0B7138;
  color: #fff;
}

.ix-tab--active:hover {
  color: #fff;
}

.ix-tab--empty {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Panels ───────────────────────────────────────────────────────────────── */

.ix-panel {
  display: none;
}

.ix-panel--active {
  display: block;
}

.ix-panel__desc {
  font-size: 0.95rem;
  color: #555;
  margin: 0 0 0.875rem;
  line-height: 1.55;
}

/* ── Screenshot carousel ──────────────────────────────────────────────────── */

.ix-carousel {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}

.ix-carousel::-webkit-scrollbar {
  display: none;
}

.ix-carousel-card {
  flex: 0 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform 0.15s, box-shadow 0.15s;
  background: #fff;
}

.ix-carousel-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.13);
}

.ix-carousel-card img {
  width: 100%;
  height: auto;
  display: block;
}

/* Portrait: iPhone (1170×2532), Android (1080×2400) */
.ix-panel--portrait .ix-carousel-card {
  width: 148px;
  aspect-ratio: 9 / 19.5;
}

/* Landscape: CarPlay/AAOS (1280×720, 1408×792), Chinese cars (1280×720) */
.ix-panel--landscape .ix-carousel-card {
  width: min(350px, 90vw);
  aspect-ratio: 16 / 9;
}

/* Android Auto: 800×480 = 5:3 */
.ix-panel[data-platform="androidauto"] .ix-carousel-card {
  aspect-ratio: 5 / 3;
}

/* ── Lightbox ─────────────────────────────────────────────────────────────── */

.ix-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ix-lightbox--open {
  display: flex;
}

.ix-lightbox__img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  display: block;
  cursor: default;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

/* ── Reviews section ──────────────────────────────────────────────────────── */

.ix-reviews {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ix-reviews h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
}

.ix-reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.ix-review-card {
  background: #fff;
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ix-review-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ix-review-card__name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a1a1a;
}

.ix-review-card__source {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.ix-badge--appstore {
  background: #e8f0fe;
  color: #1a73e8;
}

.ix-badge--playmarket {
  background: #e6f4ea;
  color: #1e8e3e;
}

/* ── Stars ────────────────────────────────────────────────────────────────── */

.ix-stars {
  display: flex;
  gap: 0.1rem;
}

.ix-star {
  font-size: 1rem;
  color: #d1d5db;
}

.ix-star--filled {
  color: #f5a623;
}

.ix-review-card__text {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #444;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ix-review-card__reply {
  background: #f0faf0;
  border-left: 3px solid #0B7138;
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ix-review-card__reply-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #0B7138;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ix-review-card__reply-text {
  font-size: 0.82rem;
  line-height: 1.5;
  color: #444;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ix-review-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.ix-review-card__date {
  font-size: 0.8rem;
  color: #999;
}

.ix-review-card__expand {
  appearance: none;
  border: none;
  background: none;
  font-size: 0.75rem;
  color: #aaa;
  cursor: pointer;
  padding: 0.1rem 0.3rem;
  letter-spacing: 0.1em;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}

.ix-review-card__expand:hover {
  color: #0B7138;
  background: #f0faf0;
}

/* ── Partners section ────────────────────────────────────────────────────── */

.ix-partners {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ix-partners h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
}

.ix-partners-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.ix-partner-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
}

/* ── Contact section ─────────────────────────────────────────────────────── */

.ix-contact {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ix-contact h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
}

.ix-contact__sub {
  font-size: 0.9rem;
  color: #666;
  margin: 0;
}

.ix-contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 520px;
}

.ix-contact-input,
.ix-contact-textarea {
  font-family: inherit;
  font-size: 0.9rem;
  color: #1a1a1a;
  background: #fff;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  outline: none;
  resize: vertical;
  transition: border-color 0.15s;
}

.ix-contact-input:focus,
.ix-contact-textarea:focus {
  border-color: #0B7138;
}

.ix-contact-btn {
  appearance: none;
  background: #0B7138;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.7rem 1.5rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  align-self: flex-start;
  transition: background 0.15s;
}

.ix-contact-btn:hover:not(:disabled) {
  background: #085a2c;
}

.ix-contact-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ix-contact-status {
  font-size: 0.85rem;
  margin: 0;
  min-height: 1.2em;
}

.ix-contact-status--ok  { color: #0B7138; }
.ix-contact-status--err { color: #c0392b; }

/* ── Language toggle (in page-header nav) ────────────────────────────────── */

.ix-lang-toggle {
  appearance: none;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  border-radius: 6px;
  padding: 0.3rem 0.65rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  letter-spacing: 0.04em;
}

.ix-lang-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.8);
}

/* ── Footer ──────────────────────────────────────────────────────────────── */

.ix-footer {
  text-align: center;
  font-size: 0.8rem;
  color: #aaa;
  padding: 0.5rem 0 1.5rem;
}

/* ── Review detail modal ──────────────────────────────────────────────────── */

.ix-review-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  cursor: pointer;
}

.ix-review-modal--open {
  display: flex;
}

.ix-review-modal__card {
  background: #fff;
  border-radius: 18px;
  padding: 1.75rem;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  cursor: default;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 85vh;
  overflow-y: auto;
}

.ix-review-modal__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.ix-review-modal__name {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 0.35rem;
}

.ix-review-modal__stars {
  gap: 0.15rem;
}

.ix-review-modal__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.ix-review-modal__text {
  font-size: 0.95rem;
  line-height: 1.65;
  color: #333;
  margin: 0;
  white-space: pre-wrap;
}

.ix-review-modal__reply .ix-review-card__reply-text {
  -webkit-line-clamp: unset;
}

/* ── Mobile ───────────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
  .ix-main {
    padding: 1.25rem 1rem 3rem;
    gap: 1.5rem;
  }

  .ix-hero__icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
  }

  .ix-hero__name {
    font-size: 1.6rem;
  }

  .ix-dl-badge {
    height: 38px;
  }

  .ix-reviews-grid {
    grid-template-columns: 1fr;
  }

  .ix-tabs {
    gap: 0.4rem;
  }

  .ix-tab {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
}
