/* Magis TV landing page — cloned from maglstv-ys.pages.dev, i18n ready (es/en/ar/zh) */

:root {
  --orange: #ff652c;
  --deep: #ee4f22;
  --ink: #272727;
  --muted: #666;
  --line: #ffd0be;
  --soft: #fff3ed;
  --soft2: #fff6f1;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.65;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--deep); }

.wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- language switch ---------- */

.lang-switch {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 60;
  display: flex;
  gap: 2px;
  padding: 4px 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 6px 18px rgba(255, 101, 44, .18);
}

.lang-switch a {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 16px;
  color: var(--orange);
  font-size: 12px;
  font-weight: bold;
  line-height: 1.4;
  text-decoration: none;
}

.lang-switch a:hover { background: #fff3ed; }

.lang-switch a[aria-current="true"] {
  background: var(--orange);
  color: #fff;
}

html[dir="rtl"] .lang-switch { right: auto; left: 12px; }

/* ---------- header ---------- */

.top {
  background: linear-gradient(160deg, var(--orange), var(--deep));
  color: #fff;
  padding: 46px 0 64px;
  clip-path: polygon(0 0, 100% 0, 100% 91%, 50% 100%, 0 91%);
  text-align: center;
}

.top .wrap { padding-top: 8px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 22px;
  font-weight: bold;
  letter-spacing: .3px;
  text-decoration: none;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  margin-right: 10px;
}

html[dir="rtl"] .brand-logo { margin-right: 0; margin-left: 10px; }

.top small {
  display: block;
  font-size: 12px;
  letter-spacing: .5px;
  opacity: .92;
  text-transform: uppercase;
}

.top h1 {
  margin: 14px 0 10px;
  font-size: 30px;
  line-height: 1.3;
  letter-spacing: -.2px;
}

/* ---------- sections ---------- */

.section { padding: 26px 0; }

.section > h2,
.hero h2 {
  font-size: 22px;
  line-height: 1.35;
  margin: 0 0 12px;
}

.section > h2 + h2 { margin-top: 26px; }

p { margin: 0 0 12px; }

.intro {
  text-align: center;
  color: var(--muted);
  margin-bottom: 18px;
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  padding: 34px 0 26px;
}

.hero p { color: var(--muted); }

.check {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}

.check li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 7px;
}

.check li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--orange);
  font-weight: bold;
}

html[dir="rtl"] .check li { padding-left: 0; padding-right: 24px; }
html[dir="rtl"] .check li::before { left: auto; right: 0; }

.phones { display: flex; justify-content: center; }

.hero-original {
  max-height: 370px;
  width: auto;
  object-fit: contain;
}

/* ---------- cta buttons ---------- */

.cta,
.dock-btn {
  display: inline-block;
  background: linear-gradient(160deg, var(--orange), var(--deep));
  color: #fff;
  font-size: 15px;
  font-weight: bold;
  padding: 13px 30px;
  border-radius: 30px;
  box-shadow: 0 8px 20px rgba(238, 79, 34, .28);
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.cta:hover,
.dock-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(238, 79, 34, .34); }

.cta:active,
.dock-btn:active { transform: translateY(0); }

.wide-cta { text-align: center; margin: 24px 0 6px; }

/* ---------- tables ---------- */

.table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.table th,
.table td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.table th { width: 38%; font-weight: bold; }

.table tr:last-child td,
.table tr:last-child th { border-bottom: 0; }

.table tr:nth-child(odd) td,
.table tr:nth-child(odd) th { background: var(--soft); }

.table .bar th {
  background: linear-gradient(160deg, var(--orange), var(--deep));
  color: #fff;
  width: 50%;
}

html[dir="rtl"] .table th,
html[dir="rtl"] .table td { text-align: right; }

/* ---------- gallery ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.photo,
.showcase-item {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff1e9;
  padding: 8px;
}

.photo img {
  height: 180px;
  width: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.photo figcaption,
.showcase-item figcaption {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding-top: 6px;
}

.original-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.showcase-item img {
  height: 370px;
  width: 100%;
  object-fit: contain;
  border-radius: 6px;
}

/* ---------- features ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 20px;
  margin-top: 26px;
}

.feature {
  position: relative;
  border: 1px solid #ffbda6;
  border-radius: 10px;
  padding: 30px 16px 14px;
}

.feature h3 { margin: 0 0 6px; font-size: 15px; }
.feature p { margin: 0; color: var(--muted); }

.feature-icon {
  position: absolute;
  top: -18px;
  left: 16px;
  width: 37px;
  height: 37px;
  line-height: 37px;
  text-align: center;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--orange), var(--deep));
  color: #fff;
  font-size: 16px;
}

html[dir="rtl"] .feature-icon { left: auto; right: 16px; }

/* ---------- install steps ---------- */

.step-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 8px;
}

.step {
  background: var(--soft2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 14px;
}

.step h3 { margin: 8px 0 6px; font-size: 15px; }
.step p { color: var(--muted); margin: 0 0 10px; }

.step-number {
  display: inline-block;
  width: 26px;
  height: 26px;
  line-height: 26px;
  text-align: center;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--orange), var(--deep));
  color: #fff;
  font-weight: bold;
  font-size: 13px;
}

.install-shot {
  max-height: 260px;
  width: auto;
  margin: 0 auto;
  background: #ff6530;
  border-radius: 8px;
}

/* ---------- pros / cons ---------- */

.pros {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.pros article {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}

.pros h3 { margin: 0 0 8px; font-size: 15px; }
.pros ul { margin: 0; padding-left: 18px; color: var(--muted); }
.pros li { margin-bottom: 5px; }
html[dir="rtl"] .pros ul { padding-left: 0; padding-right: 18px; }

/* ---------- faq ---------- */

details {
  border: 1px solid #ffd4c5;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 9px;
  background: #fff;
}

details[open] { background: #fffaf7; }

summary {
  cursor: pointer;
  font-weight: bold;
  outline: none;
}

details p { margin: 8px 0 2px; color: var(--muted); }

/* ---------- notice + footer ---------- */

.notice {
  background: #fff6ed;
  border-left: 4px solid var(--orange);
  color: #784b35;
  border-radius: 6px;
  padding: 11px 14px;
  font-size: 13px;
  margin-top: 18px;
}

html[dir="rtl"] .notice {
  border-left: 0;
  border-right: 4px solid var(--orange);
}

.footer {
  background: linear-gradient(160deg, var(--orange), var(--deep));
  color: #fff;
  margin-top: 30px;
  padding: 20px 0 26px;
  text-align: center;
  font-size: 13px;
}

.footer p { margin: 0; }

/* ---------- sticky download dock ---------- */

.download-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 12px 10px;
  background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 18px rgba(255, 101, 44, .14);
  backdrop-filter: blur(6px);
}

.dock-btn {
  padding: 11px 34px;
  font-size: 14px;
  border-radius: 26px;
}

.download-dock p {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .3px;
}

body { padding-bottom: 78px; }

/* ---------- loading mask ---------- */

#loading-mask {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .78);
}

#loading-mask.show { display: flex; }

.spinner {
  width: 42px;
  height: 42px;
  border: 4px solid var(--line);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: lp-spin .8s linear infinite;
}

@keyframes lp-spin { to { transform: rotate(360deg); } }

/* ---------- language specific typography ---------- */

html[lang="zh"] body,
html[lang="zh"] .cta,
html[lang="zh"] .dock-btn,
html[lang="zh"] .brand {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  line-height: 1.75;
}

html[lang="ar"] body,
html[lang="ar"] .cta,
html[lang="ar"] .dock-btn,
html[lang="ar"] .brand {
  font-family: "Segoe UI", Tahoma, "Noto Naskh Arabic", "Arabic Typesetting", Arial, sans-serif;
  line-height: 1.9;
}

html[lang="ar"] .top small { letter-spacing: 0; text-transform: none; }
html[lang="ar"] .top h1 { line-height: 1.5; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .step-grid { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  body { font-size: 14px; }
  .wrap { padding: 0 16px; }
  .top { padding: 40px 0 56px; }
  .top h1 { font-size: 22px; }
  .hero { grid-template-columns: 1fr; gap: 20px; }
  .phones { order: -1; }
  .hero-original { max-height: 260px; }
  .feature-grid, .original-showcase, .pros { grid-template-columns: 1fr; }
  .step-grid { grid-template-columns: 1fr; }
  .showcase-item img { height: 280px; }
  .photo img { height: 150px; }
  .section > h2 { font-size: 19px; }
  .table th { width: 42%; }
}
