/*
Theme Name: AE Broker
Theme URI: https://example.com/
Author: Brokerforex
Description: UAE / Gulf 阿语 Broker 结构化页面主题（演示骨架）
Version: 0.1.0
Text Domain: ae-broker
Requires at least: 6.0
Requires PHP: 7.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
  --ae-container-max: 1100px;
  --ae-text: #111827;
  --ae-muted: #6b7280;
  --ae-border: rgba(17, 24, 39, 0.12);
  --ae-bg: #ffffff;
  --ae-link: #2563eb;
}

html {
  background: var(--ae-bg);
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--ae-text);
  direction: rtl;
  background: var(--ae-bg);
}

a {
  color: var(--ae-link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: var(--ae-container-max);
  margin: 0 auto;
  padding: 0 16px;
}

.menu,
.menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.menu a {
  display: inline-flex;
  padding: 6px 8px;
  border-radius: 8px;
}

.menu .current-menu-item > a,
.menu .current_page_item > a {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
}

.menu-item-has-children {
  position: relative;
}

.menu-item-has-children > .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid var(--ae-border);
  border-radius: 10px;
  padding: 8px;
  z-index: 30;
}

.menu-item-has-children:hover > .sub-menu {
  display: block;
}

.site-nav--footer .menu,
.site-nav--legal .menu {
  justify-content: center;
  margin-top: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--ae-border);
  font-weight: 600;
}

.btn-primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.btn-secondary {
  background: #fff;
  border-color: var(--ae-border);
  color: #111827;
}

.section-heading .section-title {
  margin: 0;
  font-size: 24px;
}

.section-heading .section-text {
  margin: 8px 0 0;
  color: var(--ae-muted);
  line-height: 1.7;
}

/* 轻量布局：让模块在没有完整 UI 的情况下也能“像样” */
section.ranking-section,
section.review-section,
section.safety-section {
  padding: 48px 0;
}

.risk-card {
  border: 1px solid var(--ae-border);
  border-radius: 16px;
  padding: 16px;
  background: rgba(37, 99, 235, 0.03);
}

.risk-card--higher-risk {
  background: rgba(239, 68, 68, 0.03);
}

.risk-card--needs-verification {
  background: rgba(245, 158, 11, 0.03);
}

.risk-card--incomplete-info {
  background: rgba(148, 163, 184, 0.06);
}

.broker-cards-grid,
.top-picks-grid,
.guide-grid,
.info-grid,
.faq-list,
.related-grid {
  display: grid;
  gap: 16px;
}

/* 默认：移动优先 */
.broker-cards-grid {
  grid-template-columns: 1fr;
}

.top-picks-grid,
.platforms-grid,
.uae-grid,
.support-grid,
.verification-grid,
.protection-grid,
.support-grid,
.fee-grid,
.instruments-grid,
.islamic-grid {
  grid-template-columns: 1fr;
}

.related-grid {
  grid-template-columns: 1fr 1fr;
}

.broker-ranking-card,
.top-pick-card,
.info-card,
.review-score-card,
.stat-card,
.fit-card,
.fee-card,
.platform-card,
.summary-box,
.risk-box {
  border: 1px solid var(--ae-border);
  border-radius: 16px;
  padding: 16px;
  background: #fff;
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--ae-border);
}

.ranking-table th,
.ranking-table td {
  border-bottom: 1px solid var(--ae-border);
  border-left: 1px solid var(--ae-border);
  padding: 12px 10px;
  text-align: right;
  vertical-align: top;
}

.ranking-table th:first-child,
.ranking-table td:first-child {
  border-left: 0;
}

.ranking-table thead th {
  background: rgba(17, 24, 39, 0.03);
  font-weight: 700;
}

@media (min-width: 900px) {
  .broker-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .top-picks-grid,
  .platforms-grid,
  .uae-grid,
  .support-grid,
  .verification-grid,
  .protection-grid,
  .fee-grid,
  .instruments-grid,
  .islamic-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .guide-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

