/* ==========================================================
   index_v2.css — ZTE · nubia · REDMAGIC 开发者平台首页样式
   ========================================================== */

/* 1. CSS 变量 + 全局重置 */
:root {
  --blue: #0072f0;
  --deep: #061729;
  --deep-2: #071d34;
  --text: #101827;
  --muted: #66758b;
  --line: #e5ebf3;
  --soft: #f4f8fd;
  --white: #ffffff;
  --red: #ed1b35;
  --content: 1200px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  background: #fff;
  font-size: 15px;
  letter-spacing: 0;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }

/* 2. Site Header */
.site-header {
  height: 68px;
  background: #fff;
  border-bottom: 1px solid #edf1f6;
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  max-width: var(--content);
  height: 68px;
  margin: 0 auto;
  padding: 0 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand-lockup {
  width: 242px;
  height: 22px;
  object-fit: contain;
  object-position: left center;
  display: block;
  flex: 0 0 auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-left: auto;
  font-size: 14px;
  color: #1f2c3d;
  white-space: nowrap;
}

.main-nav a {
  line-height: 68px;
  transition: color .18s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--blue);
  font-weight: 700;
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  white-space: nowrap;
}

/* 3. Country Switcher */
.country {
  position: relative;
  padding: 8px 14px 8px 8px;
  cursor: pointer;
  color: #202b3c;
}

.country::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1px solid #1f2c3d;
  border-bottom: 1px solid #1f2c3d;
  transform: translateY(-62%) rotate(45deg);
}

.country-menu {
  position: absolute;
  top: 36px;
  right: -16px;
  min-width: 96px;
  padding: 8px 0;
  background: #fff;
  border: 1px solid #e4ebf5;
  box-shadow: 0 12px 28px rgba(20, 45, 80, .12);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: all .18s ease;
}

.country.open .country-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.country-menu a {
  display: block;
  padding: 9px 16px;
  color: #3b4759;
}

.country-menu a:hover {
  color: var(--blue);
  background: #f5f9ff;
}

/* 4. Buttons */
.btn {
  height: 32px;
  min-width: 53px;
  padding: 0 16px;
  border: 1px solid var(--blue);
  background: #fff;
  color: var(--blue);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  cursor: pointer;
}

.btn.primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 5px 14px rgba(0, 114, 240, .22);
}

/* 5. Hero Section */
.hero {
  height: 430px;
  background: #04152a;
  overflow: hidden;
  position: relative;
}

/* 6. Hero FlexSlider 覆盖样式 */
.hero .flexslider {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  z-index: 0;
}

.hero .flexslider .slides {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  height: 100% !important;
  width: 100% !important;
}

.hero .flexslider .slides > li {
  list-style: none;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
}

.hero .flexslider .slides li a {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero .flexslider .slides li img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
  position: absolute;
  inset: 0;
  margin: 0 !important;
}

/* 方向箭头导航 */
.hero .flex-direction-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.hero .flex-direction-nav li {
  list-style: none;
}

.hero .flex-direction-nav a {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s, background 0.3s;
  pointer-events: auto;
  text-decoration: none;
}

.hero .flex-direction-nav a::before {
  font-size: 20px;
  line-height: 1;
}

.hero .flex-direction-nav .flex-prev {
  left: 20px;
}

.hero .flex-direction-nav .flex-prev::before {
  content: "\2039";
}

.hero .flex-direction-nav .flex-next {
  right: 20px;
}

.hero .flex-direction-nav .flex-next::before {
  content: "\203A";
}

.hero .flex-direction-nav a:hover {
  background: rgba(255,255,255,.3);
}

.hero .flexslider:hover .flex-direction-nav a {
  opacity: 1;
}

.hero .flex-direction-nav .flex-disabled {
  opacity: 0 !important;
  pointer-events: none;
}

/* 分页圆点指示器 */
.hero .flex-control-nav {
  position: absolute;
  bottom: 20px;
  z-index: 6;
  width: auto;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.hero .flex-control-nav li {
  list-style: none;
}

.hero .flex-control-paging li a {
  width: 10px;
  height: 10px;
  display: block;
  background: rgba(255,255,255,.4);
  box-shadow: none;
  border-radius: 50%;
  text-indent: -9999px;
  overflow: hidden;
  cursor: pointer;
  transition: background 0.3s;
}

.hero .flex-control-paging li a.flex-active {
  background: var(--blue);
}

.hero .flex-control-paging li a:hover {
  background: rgba(255,255,255,.7);
}

/* 7. Services Section */
.services {
  height: 242px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.service-grid {
  max-width: var(--content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 242px;
  padding: 25px 36px;
}

.service-item {
  padding: 6px 30px 0;
  border-left: 1px solid #e4eaf2;
}

.service-item:last-child {
  border-right: 1px solid #e4eaf2;
}

.icon40 {
  width: 40px;
  height: 40px;
  display: block;
  margin-bottom: 14px;
}

.overline {
  margin: 0 0 4px;
  font-size: 10px;
  color: #96a4b6;
  letter-spacing: 0;
}

.service-item h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 800;
}

.service-item p {
  margin: 0;
  min-height: 52px;
  font-size: 13px;
  line-height: 1.8;
  color: #697789;
}

.link-blue {
  display: inline-block;
  margin-top: 18px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

/* 8. Brand Section */
.brand-section {
  background: linear-gradient(180deg, #f6f9fd 0%, #f5f8fc 100%);
  height: 476px;
  border-bottom: 1px solid #eef3f8;
}

.section-inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: 56px 48px 0;
}

.section-kicker {
  margin: 0 0 24px;
  color: var(--blue);
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 2.6px;
  text-transform: uppercase;
}

.section-row {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 72px;
  align-items: start;
}

.section-title {
  margin: 0;
  font-size: 32px;
  line-height: 1.4;
  font-weight: 850;
}

.section-desc {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 2;
  color: #5f6d81;
}

.brand-cards {
  margin-top: 33px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.brand-card {
  height: 240px;
  background: #fff;
  border: 1px solid #dfe6ef;
  padding: 30px 26px;
}

.brand-card.dark {
  background: #fff;
  color: var(--text);
  border-color: #dfe6ef;
}

.wordmark {
  display: block;
  margin-bottom: 31px;
  height: 37px;
  object-fit: contain;
  object-position: left center;
}

.wordmark.text-zte {
  color: #16aeea;
  font-size: 39px;
  line-height: 37px;
  font-weight: 600;
}

.wordmark.text-nubia {
  color: #e60723;
  font-size: 32px;
  line-height: 37px;
  font-weight: 700;
}

.brand-card p {
  margin: 0;
  min-height: 58px;
  font-size: 13px;
  line-height: 1.9;
  color: #66758a;
}

.brand-card.dark p {
  color: #66758a;
}

.brand-card .link-blue {
  margin-top: 35px;
}

/* 9. Support Section */
.support {
  min-height: 306px;
  background: #fff;
  padding-bottom: 40px;
}

.support .section-inner {
  padding-top: 42px;
  display: grid;
  grid-template-columns: 260px repeat(3, 1fr);
  gap: 48px;
}

.support h2 {
  margin: 18px 0 0;
  font-size: 30px;
  line-height: 1.45;
  font-weight: 850;
}

.support-group img {
  width: 36px;
  height: 36px;
  margin-bottom: 17px;
}

.support-group h3 {
  margin: 0 0 20px;
  font-size: 17px;
  font-weight: 800;
}

.support-group a {
  display: block;
  margin-bottom: 13px;
  font-size: 13px;
  color: #66748a;
}

.support-group a:hover {
  color: var(--blue);
}

.support-group .link-blue {
  display: inline-block;
  margin-top: 10px;
  color: var(--blue);
}

.support-articles {
  list-style: none;
  padding: 0;
  margin: 0 0 10px 0;
}

.support-articles li {
  margin-bottom: 13px;
}

.support-articles li a {
  display: block;
  margin-bottom: 0;
  font-size: 13px;
  color: #66748a;
}

.support-articles li a:hover {
  color: var(--blue);
}

/* 10. Footer */
.footer {
  background: radial-gradient(circle at 11% 3%, rgba(0,104,229,.18), transparent 32%), #051423;
  color: #d8e3f0;
  min-height: 320px;
}

.footer-inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: 43px 44px 30px;
}

.footer-top {
  display: grid;
  grid-template-columns: 290px repeat(4, 1fr);
  gap: 42px;
}

.footer-logo {
  width: 233px;
  height: 23px;
  object-fit: contain;
  object-position: left center;
}

.footer-brand p {
  margin: 31px 0 26px;
  font-size: 13px;
  line-height: 2;
  color: #d1ddeb;
}

.socials {
  display: flex;
  gap: 12px;
}

.socials img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.footer-col h4 {
  margin: 0 0 19px;
  color: #fff;
  font-size: 16px;
  font-weight: 850;
}

.footer-col a {
  display: block;
  margin-bottom: 13px;
  font-size: 13px;
  color: #9eafc4;
}

.footer-col a:hover {
  color: #d8e3f0;
}

.footer-bottom {
  margin-top: 33px;
  padding-top: 24px;
  border-top: 1px solid rgba(216,227,240,.13);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: #7f8ea2;
}

.legal {
  display: flex;
  gap: 22px;
}

.legal a + a {
  position: relative;
}

.legal a + a::before {
  content: "";
  position: absolute;
  left: -11px;
  top: 2px;
  width: 1px;
  height: 12px;
  background: rgba(216,227,240,.35);
}

/* 11. 响应式 */
@media (max-width: 760px) {
  .site-header { height: auto; position: relative; }
  .header-inner { height: auto; padding: 18px 20px; flex-wrap: wrap; gap: 16px; }
  .main-nav { order: 3; width: 100%; overflow: auto; gap: 22px; }
  .actions { margin-left: auto; }

  .hero { height: 520px; }

  .services, .brand-section, .support { height: auto; }

  .service-grid,
  .brand-cards,
  .support .section-inner,
  .footer-top,
  .section-row {
    grid-template-columns: 1fr;
  }

  .service-grid { height: auto; padding: 20px; }
  .service-item { border-left: 0; border-bottom: 1px solid var(--line); padding: 22px 4px; }
  .service-item:last-child { border-right: 0; }

  .section-inner,
  .support .section-inner,
  .footer-inner { padding-left: 24px; padding-right: 24px; }

  .footer-bottom { align-items: flex-start; gap: 18px; flex-direction: column; }
}
