/* ============================================================
   AYX 爱游戏 — Homepage Stylesheet  v2.0
   Classes match page-homepage.php exactly
   ============================================================ */

/* ── Global box-sizing ── */
*, *::before, *::after { box-sizing: border-box; }

/* ── Inner container ── */
.ayx-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ── Section title (shared) ── */
.ayx-section-title {
  font-size: 26px;
  font-weight: 800;
  color: #0d2461;
  margin: 0 0 32px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ayx-section-title i { color: #1565c0; }
.ayx-section-title small {
  font-size: 14px;
  font-weight: 400;
  color: #78909c;
  margin-left: 8px;
}

/* ============================================================
   HERO
   ============================================================ */
.ayx-hero {
  background: linear-gradient(135deg, #0a2461 0%, #1a4bb8 55%, #1565c0 100%);
  padding: 60px 0 52px;
  color: #fff;
  /* breakout of any Astra max-width wrapper */
  width: 100%;
}

.ayx-hero .ayx-container {
  display: flex;
  align-items: stretch;
  gap: 40px;
}

/* ── Left column ── */
.ayx-hero-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.ayx-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 20px;
  padding: 5px 16px;
  font-size: 13px;
  color: #b3d4ff;
  margin-bottom: 18px;
  width: fit-content;
}

.ayx-hero-title {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 14px;
  color: #fff;
}

.ayx-hero-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.78);
  margin: 0 0 28px;
  line-height: 1.65;
}

/* Download buttons */
.ayx-download-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.ayx-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.18s ease;
  border: 2px solid transparent;
  white-space: nowrap;
}

.ayx-btn-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.ayx-btn strong { display: block; font-size: 14px; }
.ayx-btn small  { display: block; font-size: 11px; opacity: 0.8; font-weight: 400; }

.ayx-btn-android {
  background: #2e7d32;
  color: #fff !important;
}
.ayx-btn-android:hover { background: #1b5e20; }

.ayx-btn-ios {
  background: #37474f;
  color: #fff !important;
}
.ayx-btn-ios:hover { background: #263238; }

.ayx-btn-web {
  background: transparent;
  color: #fff !important;
  border-color: rgba(255,255,255,0.4);
}
.ayx-btn-web:hover { background: rgba(255,255,255,0.1); }

.ayx-hero-notice {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.ayx-hero-notice i { color: #ffb300; }

/* ── Right column (feature cards) ── */
.ayx-hero-right {
  flex: 0 0 380px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 16px;
  padding: 24px 20px;
  display: flex;
  align-items: center;
}

.ayx-feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.ayx-feature-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 14px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.18s;
  cursor: default;
}
.ayx-feature-card:hover { background: rgba(255,255,255,0.15); }

.ayx-fc-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.ayx-fc-icon.sport   { background: #1565c0; color: #90caf9; }
.ayx-fc-icon.esports { background: #4a148c; color: #ce93d8; }
.ayx-fc-icon.slots   { background: #e65100; color: #ffcc80; }
.ayx-fc-icon.chess   { background: #1a237e; color: #9fa8da; }
.ayx-fc-icon.lottery { background: #880e4f; color: #f48fb1; }
.ayx-fc-icon.live    { background: #004d40; color: #80cbc4; }

.ayx-fc-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ayx-fc-text strong {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ayx-fc-text span {
  font-size: 11px;
  color: rgba(255,255,255,0.58);
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ============================================================
   INSTALL SECTION
   ============================================================ */
.ayx-install-section {
  background: #e8f0fa;
  padding: 56px 0;
}

.ayx-install-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 20px;
}

.ayx-install-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.ayx-install-header {
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}
.ayx-install-header.android { background: #2e7d32; }
.ayx-install-header.ios     { background: #37474f; }
.ayx-install-header i       { font-size: 17px; }

.ayx-install-steps {
  list-style: none;
  padding: 16px 20px;
  margin: 0;
  counter-reset: step;
}
.ayx-install-steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #edf3fc;
  font-size: 14px;
  color: #37474f;
  line-height: 1.5;
  counter-increment: step;
}
.ayx-install-steps li:last-child { border-bottom: none; }
.ayx-install-steps li::before {
  content: counter(step);
  min-width: 22px;
  height: 22px;
  background: #1565c0;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.ayx-install-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0 20px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #1565c0;
  text-decoration: none;
}
.ayx-install-more:hover { text-decoration: underline; }

.ayx-web-note {
  background: #fff;
  border: 1px solid #c8dff7;
  border-radius: 8px;
  padding: 14px 20px;
  font-size: 14px;
  color: #37474f;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ============================================================
   EVENTS SECTION
   ============================================================ */
.ayx-events-section {
  background: #fff;
  padding: 56px 0;
}

.ayx-events-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.ayx-event-card {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e3eaf5;
}
.ayx-event-card.football { border-top: 3px solid #1565c0; }
.ayx-event-card.basketball { border-top: 3px solid #e65100; }
.ayx-event-card.esports { border-top: 3px solid #4a148c; }

.ayx-event-type {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  color: #546e7a;
  background: #f7f9fc;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid #edf3fc;
}
.ayx-event-card.football .ayx-event-type i   { color: #1565c0; }
.ayx-event-card.basketball .ayx-event-type i { color: #e65100; }
.ayx-event-card.esports .ayx-event-type i    { color: #4a148c; }

.ayx-match-row {
  padding: 14px 14px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.ayx-team {
  font-size: 14px;
  font-weight: 700;
  color: #0d2461;
  flex: 1;
  text-align: center;
}
.ayx-vs {
  font-size: 11px;
  font-weight: 700;
  color: #90a4ae;
  padding: 0 4px;
  flex-shrink: 0;
}
.ayx-match-meta {
  padding: 0 14px 14px;
  font-size: 12px;
  color: #78909c;
  text-align: center;
}

.ayx-events-note {
  font-size: 12px;
  color: #90a4ae;
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
}
.ayx-events-note i { color: #90a4ae; }

/* ============================================================
   NEWS SECTION
   ============================================================ */
.ayx-news-section {
  background: #edf3fc;
  padding: 56px 0;
}

.ayx-news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.ayx-news-col {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.05);
}

.ayx-news-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid #1565c0;
}
.ayx-news-col-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: #0d2461;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}
.ayx-news-col-header h3 i { color: #1565c0; }

.ayx-more-link {
  font-size: 12px;
  color: #1565c0;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ayx-more-link:hover { text-decoration: underline; }

.ayx-news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ayx-news-item {
  padding: 10px 0;
  border-bottom: 1px solid #f0f4fb;
}
.ayx-news-item:last-child { border-bottom: none; }
.ayx-news-item.ayx-no-post { font-size: 13px; color: #90a4ae; }

.ayx-news-link {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  text-decoration: none;
}
.ayx-news-title {
  font-size: 13px;
  color: #37474f;
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ayx-news-link:hover .ayx-news-title { color: #1565c0; }
.ayx-news-date {
  font-size: 11px;
  color: #90a4ae;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ============================================================
   LATEST ARTICLES
   ============================================================ */
.ayx-latest-section {
  background: #fff;
  padding: 56px 0;
}

.ayx-latest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.ayx-latest-card {
  border: 1px solid #e3eaf5;
  border-radius: 10px;
  padding: 20px;
  transition: box-shadow 0.2s, transform 0.18s;
  display: flex;
  flex-direction: column;
}
.ayx-latest-card:hover {
  box-shadow: 0 6px 24px rgba(21,101,192,0.11);
  transform: translateY(-2px);
}

.ayx-latest-cat {
  font-size: 11px;
  font-weight: 700;
  color: #1565c0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.ayx-latest-title {
  font-size: 15px;
  font-weight: 700;
  color: #0d2461;
  margin: 0 0 10px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ayx-latest-title a {
  color: inherit;
  text-decoration: none;
}
.ayx-latest-title a:hover { color: #1565c0; }

.ayx-latest-excerpt {
  font-size: 13px;
  color: #546e7a;
  line-height: 1.65;
  margin: 0 0 auto;
  padding-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ayx-latest-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #90a4ae;
  padding-top: 14px;
  border-top: 1px solid #edf3fc;
  margin-top: auto;
}
.ayx-latest-meta i { margin-right: 4px; }

.ayx-read-more {
  font-size: 12px;
  font-weight: 600;
  color: #1565c0;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}
.ayx-read-more:hover { text-decoration: underline; }

/* ============================================================
   FAQ SECTION
   ============================================================ */
.ayx-faq-section {
  background: #edf3fc;
  padding: 56px 0;
}

.ayx-faq-list {
  max-width: 820px;
  margin: 0 auto;
}

.ayx-faq-item {
  background: #fff;
  border-radius: 10px;
  margin-bottom: 10px;
  border: 1px solid #dde6f4;
  overflow: hidden;
}

.ayx-faq-q {
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 700;
  color: #0d2461;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}
.ayx-faq-q:hover { background: #f5f8ff; }

.ayx-faq-num {
  min-width: 32px;
  height: 32px;
  background: #1565c0;
  color: #fff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.ayx-faq-arrow {
  margin-left: auto;
  color: #90a4ae;
  font-size: 13px;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.ayx-faq-a {
  font-size: 14px;
  color: #546e7a;
  line-height: 1.75;
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, padding 0.25s ease;
}

/* Open state */
.ayx-faq-item.ayx-open .ayx-faq-a {
  max-height: 200px;
  padding: 4px 20px 18px;
}
.ayx-faq-item.ayx-open .ayx-faq-arrow {
  transform: rotate(180deg);
}
.ayx-faq-item.ayx-open .ayx-faq-q {
  background: #f0f6ff;
}

/* ============================================================
   DISCLAIMER
   ============================================================ */
.ayx-disclaimer {
  background: #0d2461;
  padding: 20px 0;
  text-align: center;
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  line-height: 1.7;
}
.ayx-disclaimer .ayx-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.ayx-disclaimer i { color: #64b5f6; flex-shrink: 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .ayx-hero-right { flex: 0 0 320px; }
  .ayx-events-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .ayx-hero .ayx-container { flex-direction: column; }
  .ayx-hero-right { flex: none; width: 100%; }
  .ayx-hero-title { font-size: 30px; }
  .ayx-install-grid { grid-template-columns: 1fr; }
  .ayx-events-grid { grid-template-columns: 1fr 1fr; }
  .ayx-news-grid,
  .ayx-latest-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .ayx-container { padding: 0 16px; }
  .ayx-download-btns { flex-direction: column; }
  .ayx-btn { justify-content: center; }
  .ayx-feature-grid { grid-template-columns: 1fr; }
  .ayx-events-grid { grid-template-columns: 1fr; }
}
