/* 字体、语言下拉、阿语从右往左、紫黑金。布局和断点仍用 assets/css/main.css。 */

:root {
  --color-primary: #8b6ff7;
  --color-gold: #d4b06a;
  --color-gold-deep: #1a1020;
  --color-bg: #0c0912;
  --color-surface: #16111f;
  --color-text: #f6f1e7;
  --color-text-soft: #cbbfae;
  --color-border: rgba(212, 176, 106, 0.28);
}

[hidden] {
  display: none !important;
}

body, input, select, textarea {
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Source Sans Pro", Helvetica, sans-serif;
}

html[lang="ar"] body,
html[lang="ar"] input,
html[lang="ar"] select,
html[lang="ar"] textarea {
  font-family: "SF Arabic", "Geeza Pro", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

html[lang="zh"] #header,
html[lang="ar"] #header {
  letter-spacing: 0;
  text-transform: none;
}

#header .logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
}

#header .logo strong,
#header.alt .logo strong {
  background-color: transparent !important;
  color: var(--color-text) !important;
  margin-right: 0;
  padding: 0;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

@media screen and (max-width: 736px) {
  #header .logo strong,
  #header.alt .logo strong {
    font-size: 20px;
  }
}

#header .logo:hover strong,
#header .logo:active strong {
  background-color: transparent !important;
  color: var(--color-gold) !important;
}

#header,
#header.alt {
  height: 64px;
  line-height: 64px;
}

#header .brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(212, 176, 106, 0.45);
}

#wrapper {
  padding-top: 64px;
}

#banner {
  top: -64px;
  margin-bottom: -64px;
}

@media screen and (max-width: 736px) {
  #header,
  #header.alt {
    height: 56px;
    line-height: 56px;
  }

  #header .brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  #wrapper {
    padding-top: 56px;
  }

  #banner {
    top: -56px;
    margin-bottom: -56px;
  }
}

#header .brand-logo[hidden] {
  display: none;
}

#header nav a[href="#menu"] {
  overflow: hidden;
  width: 3.25em;
  padding: 0 1.15em 0 0 !important;
  text-indent: 0;
}

#header nav a.nav-toggle {
  display: none;
}

#header.is-nav-collapsed nav a.nav-toggle {
  display: block;
}

#header .header-links {
  display: flex;
  align-items: center;
  height: 100%;
  margin: 0 0.25em 0 0;
  padding: 0;
  list-style: none;
}

#header.is-nav-collapsed .header-links {
  display: none;
}

#header .header-links li {
  margin: 0;
  padding: 0;
}

#header .header-links a {
  display: inline-flex;
  align-items: center;
  height: auto;
  margin: 0;
  padding: 0 0.75em;
  border-bottom: 0;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: none;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
}

#header .header-links a:hover {
  color: var(--color-gold);
}

#header nav a[href="#menu"] .menu-label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#header nav a[href="#menu"]:before,
#header nav a[href="#menu"]:after,
#header nav a[href="#menu"]:last-child:before,
#header nav a[href="#menu"]:last-child:after {
  right: 1.15em;
  width: 24px;
}

.lang-switch {
  position: relative;
  align-self: center;
  direction: ltr;
  margin: 0 0.75em 0 0;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
  z-index: 2;
}

#header .lang-current,
#header .lang-option {
  box-shadow: none;
  height: auto;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: none;
  white-space: nowrap;
}

#header .lang-current {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  max-width: 8.5em;
  height: 2em;
  margin: 0;
  padding: 0 0.75em;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 12px;
  font-weight: 600;
}

#header .lang-current:hover,
#header .lang-current:active,
#header .lang-current[aria-expanded="true"] {
  box-shadow: none;
  border-color: var(--color-gold);
  color: var(--color-gold);
}

.lang-current-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.lang-chevron {
  flex: none;
  width: 0.4em;
  height: 0.4em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-0.1em) rotate(45deg);
}

.lang-switch.is-open .lang-chevron {
  transform: translateY(0.1em) rotate(225deg);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 0.4em);
  right: 0;
  width: max-content;
  min-width: 100%;
  max-width: 14em;
  max-height: 240px;
  margin: 0;
  padding: 0.25em;
  overflow: auto;
  list-style: none;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.6em;
  box-shadow: 0 0.6em 1.4em rgba(0, 0, 0, 0.35);
}

.lang-menu[hidden] {
  display: none;
}

.lang-menu li {
  margin: 0;
  padding: 0;
}

#header .lang-option {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.55em 0.7em;
  border: 0;
  border-radius: 0.4em;
  background: transparent;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 600;
  text-align: start;
  overflow: hidden;
  text-overflow: ellipsis;
}

#header .lang-option:hover,
#header .lang-option:active {
  box-shadow: none;
  background: rgba(212, 176, 106, 0.14);
  color: var(--color-gold);
}

#header .lang-option[aria-selected="true"],
#header .lang-option[aria-selected="true"]:hover,
#header .lang-option[aria-selected="true"]:active {
  box-shadow: none;
  background: var(--color-gold);
  color: var(--color-gold-deep);
}

#footer .icons {
  margin: 0 0 1.25em;
}

#footer .social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25em;
  height: 2.25em;
  border-radius: 100%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-gold);
  text-decoration: none;
}

#footer a.social {
  transition: background-color 0.2s ease-in-out;
}

#footer a.social:hover {
  background: var(--color-gold);
  color: var(--color-gold-deep);
}

#footer .social svg {
  display: block;
  width: 1.05em;
  height: 1.05em;
  fill: currentColor;
}

#footer span.social {
  cursor: default;
}

html[dir="rtl"] #banner .content,
html[dir="rtl"] #two .inner,
html[dir="rtl"] #contact .inner,
html[dir="rtl"] .tiles article header {
  text-align: right;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
}

h1, h2, h3, h4, h5, h6,
strong, b {
  color: var(--color-text);
}

p {
  color: var(--color-text-soft);
}

a:hover {
  color: var(--color-gold) !important;
}

header.major > :first-child:after {
  background-color: var(--color-gold);
}

#header,
#header.alt {
  background-color: rgba(12, 9, 18, 0.78);
  box-shadow: 0 1px 0 var(--color-border);
  backdrop-filter: blur(12px);
}

#header nav a[href="#menu"]:before,
#header nav a[href="#menu"]:after {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='32' viewBox='0 0 24 32' preserveAspectRatio='none'%3E%3Cstyle%3Eline %7B stroke-width: 2px%3B stroke: %23F6F1E7%3B %7D%3C/style%3E%3Cline x1='0' y1='11' x2='24' y2='11' /%3E%3Cline x1='0' y1='21' x2='24' y2='21' /%3E%3Cline x1='0' y1='16' x2='24' y2='16' /%3E%3C/svg%3E");
}

#header nav a[href="#menu"]:hover:after,
#header nav a[href="#menu"]:active:after {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='32' viewBox='0 0 24 32' preserveAspectRatio='none'%3E%3Cstyle%3Eline %7B stroke-width: 2px%3B stroke: %23D4B06A%3B %7D%3C/style%3E%3Cline x1='0' y1='11' x2='24' y2='11' /%3E%3Cline x1='0' y1='21' x2='24' y2='21' /%3E%3Cline x1='0' y1='16' x2='24' y2='16' /%3E%3C/svg%3E");
}

#banner {
  background-image: url("images/banner.webp");
  background-position: center 42%;
}

#banner:after,
body.is-preload #banner:after {
  background-color: rgba(12, 9, 18, 0.62);
  background-image: none;
  opacity: 1;
}

#banner.major {
  min-height: 78vh;
}

#banner > .inner {
  width: min(40rem, calc(100% - 3rem));
  max-width: 40rem;
  margin-inline-start: clamp(1.25rem, 5vw, 4rem);
  margin-inline-end: auto;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0 !important;
}

#banner header.major > :first-child:after {
  width: 4.5rem;
}

@media screen and (max-width: 736px) {
  #banner.major {
    min-height: 72vh;
  }
}

#banner h1 {
  color: var(--color-text);
}

#banner > .inner .content {
  display: block;
}

#banner > .inner .content > * {
  margin-right: 0;
  margin-bottom: 1.25rem;
}

#banner > .inner .content p {
  color: var(--color-text-soft);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

#banner .button,
#banner .button:hover,
#banner .button:active {
  background: var(--color-gold);
  box-shadow: none;
  border-radius: 999px;
  color: var(--color-gold-deep) !important;
  letter-spacing: 0.04em;
}

#banner .button:hover,
#banner .button:active {
  background: #e3c27a;
}

#banner .button.next:before,
#banner .button.next:after {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='24' viewBox='0 0 36 24'%3E%3Cstyle%3Eline %7B stroke: %231A1020%3B stroke-width: 2px%3B %7D%3C/style%3E%3Cline x1='0' y1='12' x2='34' y2='12' /%3E%3Cline x1='25' y1='4' x2='34' y2='12.5' /%3E%3Cline x1='25' y1='20' x2='34' y2='11.5' /%3E%3C/svg%3E");
}

#banner .button.next:after {
  opacity: 0;
}

#main {
  background: var(--color-bg);
}

#main > * {
  border-top-color: var(--color-border);
}

.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  max-width: 78rem;
  margin: 0 auto;
  padding: 3.5rem clamp(1.25rem, 4vw, 3rem);
}

.tiles article,
.tiles article:nth-child(4n - 1),
.tiles article:nth-child(4n - 2) {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  border-radius: 16px;
  border: 1px solid rgba(212, 176, 106, 0.24);
  background: var(--color-surface) !important;
  background-image: none !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.tiles article:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 176, 106, 0.58);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.6), 0 0 24px rgba(212, 176, 106, 0.12);
}

.tiles article:before,
.tiles article:after,
.tiles article:nth-child(6n):before,
.tiles article:nth-child(6n - 1):before,
.tiles article:nth-child(6n - 2):before,
.tiles article:nth-child(6n - 3):before,
.tiles article:nth-child(6n - 4):before,
.tiles article:nth-child(6n - 5):before {
  display: none !important;
}

.tiles article .image {
  display: block !important;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #08060c;
  border-bottom: 1px solid rgba(212, 176, 106, 0.16);
}

.tiles article .image:after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(12, 9, 18, 0) 55%,
    rgba(22, 17, 31, 0.85) 100%
  );
  pointer-events: none;
}

.tiles article .image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
  transition: transform 0.45s ease;
}

.tiles article[data-tile="0"] .image img {
  object-position: center 36%;
}

.tiles article[data-tile="1"] .image img {
  object-position: center 42%;
}

.tiles article[data-tile="2"] .image img {
  object-position: center 38%;
}

.tiles article[data-tile="3"] .image img,
.tiles article[data-tile="4"] .image img,
.tiles article[data-tile="5"] .image img {
  object-position: center 48%;
}

.tiles article:hover .image img {
  transform: scale(1.04);
}

.tiles article header.major {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 1.4rem 1.5rem 1.6rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tiles article header.major > :first-child {
  width: auto;
  max-width: 100%;
}

.tiles article header.major > :first-child:after {
  width: 2.5rem;
  height: 2px;
  margin: 0.55rem 0 0.7rem;
  background: linear-gradient(90deg, var(--color-gold), rgba(212, 176, 106, 0.2));
}

html[dir="rtl"] .tiles article header.major > :first-child:after {
  margin-left: auto;
  margin-right: 0;
  background: linear-gradient(270deg, var(--color-gold), rgba(212, 176, 106, 0.2));
}

.tiles article h3 {
  color: var(--color-text);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.tiles article header.major > p,
.tiles article p {
  color: var(--color-text-soft);
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0.01em;
  text-transform: none;
  margin-bottom: 0;
}

@media screen and (max-width: 1024px) {
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    padding: 2.75rem 1.5rem;
  }
}

@media screen and (max-width: 640px) {
  .tiles {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.15rem;
    padding: 2rem 1.15rem;
  }

  .tiles article header.major {
    padding: 1.25rem 1.25rem 1.4rem;
  }

  .tiles article h3 {
    font-size: 1.15rem;
  }
}

#contact,
#contact > .inner > :nth-child(2n - 1) {
  border-color: var(--color-border);
}

#contact > .inner > .split > *:before {
  border-top-color: var(--color-border);
}

#footer .copyright li {
  color: var(--color-text-soft);
  border-left-color: var(--color-border);
}

#footer .legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.4rem;
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
}

#footer .legal-links li {
  margin: 0;
  padding: 0;
}

#footer .legal-links a {
  border-bottom: 1px solid rgba(212, 176, 106, 0.25);
  color: var(--color-text-soft);
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

#footer .legal-links a:hover,
#footer .legal-links a[aria-current="page"] {
  color: var(--color-gold) !important;
  border-bottom-color: var(--color-gold);
}

.legal-main {
  max-width: 60rem;
  margin: 0 auto;
  padding: 2.5rem clamp(1.25rem, 4vw, 3rem) 4rem;
}

.legal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
}

.legal-tabs li {
  margin: 0;
  padding: 0;
}

.legal-tabs a {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-soft);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.legal-tabs a:hover {
  border-color: var(--color-gold);
  color: var(--color-gold) !important;
}

.legal-tabs a[aria-current="page"] {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-gold-deep) !important;
}

.legal-card {
  direction: ltr;
  text-align: left;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.legal-card h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.35rem;
  line-height: 1.3;
}

.legal-meta {
  color: var(--color-gold);
  font-size: 0.85rem;
  margin: 0 0 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

.legal-card h2,
.legal-card h3 {
  color: var(--color-text);
  font-size: 1.15rem;
  margin: 1.75rem 0 0.65rem;
  line-height: 1.4;
}

.legal-card p,
.legal-card li {
  color: var(--color-text-soft);
  font-size: 0.95rem;
  line-height: 1.75;
}

.legal-card p {
  margin: 0 0 1rem;
}

.legal-card ul,
.legal-card ol {
  margin: 0 0 1.15rem 1.25rem;
  padding: 0;
}

.legal-card li {
  margin-bottom: 0.45rem;
}

.legal-card a {
  color: var(--color-gold);
  border-bottom: 1px dotted rgba(212, 176, 106, 0.5);
}

.legal-toc {
  background: rgba(12, 9, 18, 0.55);
  border: 1px solid rgba(212, 176, 106, 0.2);
  border-radius: 12px;
  padding: 1.1rem 1.35rem;
  margin: 1.25rem 0 1.75rem;
}

.legal-toc strong {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--color-gold);
}

.legal-toc ol {
  margin: 0 0 0 1.2rem;
  columns: 2;
  column-gap: 1.5rem;
}

@media screen and (max-width: 640px) {
  .legal-toc ol {
    columns: 1;
  }
}

.legal-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.88rem;
}

.legal-table th,
.legal-table td {
  border: 1px solid rgba(212, 176, 106, 0.24);
  padding: 0.7rem 0.85rem;
  vertical-align: top;
  text-align: left;
  color: var(--color-text-soft);
}

.legal-table th {
  background: rgba(212, 176, 106, 0.12);
  color: var(--color-text);
  font-weight: 700;
}

#menu {
  background: rgba(12, 9, 18, 0.96);
  color: var(--color-text);
}

#menu ul.links > li > a:not(.button) {
  color: var(--color-text);
  border-top-color: var(--color-border);
}

#menu .close:before,
#menu .close:after {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cstyle%3Eline %7B stroke: %23F6F1E7%3B stroke-width: 2%3B %7D%3C/style%3E%3Cline x1='0' y1='0' x2='20' y2='20' /%3E%3Cline x1='20' y1='0' x2='0' y2='20' /%3E%3C/svg%3E");
}

#menu .close:hover:after,
#menu .close:active:after {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cstyle%3Eline %7B stroke: %23D4B06A%3B stroke-width: 2%3B %7D%3C/style%3E%3Cline x1='0' y1='0' x2='20' y2='20' /%3E%3Cline x1='20' y1='0' x2='0' y2='20' /%3E%3C/svg%3E");
}
