/* ════════════════════════════════════════════════
   ACEM Aviation Chinese Platform — Stylesheet
   Palette:
     Navy      #1A3A5C  (primary deep)
     Sky       #2E6EA6  (mid tone)
     Cloud     #EDF2F7  (light bg)
     Gold      #C8A84B  (accent)
     Ink       #0D1F33  (text dark)
     Mist      #F7FAFC  (page bg)
════════════════════════════════════════════════ */

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  background: #F7FAFC;
  color: #0D1F33;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }

/* ════════════════════════════════════════════════
   HEADER
════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #1A3A5C;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  padding: 0 24px;
  height: 68px;
  gap: 16px;
}

/* Logo */
.logo-area {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-img {
  height: 52px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* Site title */
.site-title {
  flex: 1;
  text-align: center;
  font-size: clamp(0.78rem, 1.5vw, 1.05rem);
  font-weight: 600;
  color: #EDF2F7;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Nav toggle */
.nav-toggle {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: 1.5px solid rgba(200,168,75,0.6);
  border-radius: 6px;
  cursor: pointer;
  padding: 6px 7px;
  transition: border-color 0.2s;
}
.nav-toggle:hover { border-color: #C8A84B; }
.nav-toggle span {
  display: block;
  height: 2px;
  background: #C8A84B;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Dropdown nav */
.main-nav {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  background: #0D2744;
  border-top: 1px solid rgba(200,168,75,0.2);
}
.main-nav.open { max-height: 400px; }
.main-nav ul {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 8px 24px 12px;
  gap: 4px;
}
.main-nav ul li a {
  display: inline-block;
  padding: 7px 18px;
  color: #EDF2F7;
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}
.main-nav ul li a:hover {
  background: rgba(200,168,75,0.15);
  color: #C8A84B;
}

/* ════════════════════════════════════════════════
   CAROUSEL
════════════════════════════════════════════════ */
.carousel-section {
  width: 100%;
  background: #1A3A5C;
}

.carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 16 / 6;
  min-height: 260px;
  max-height: 520px;
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide {
  position: relative;
  min-width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Real images */
.slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Overlay text */
.slide-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 32px 48px;
  background: linear-gradient(to top, rgba(13,31,51,0.72) 0%, transparent 55%);
}

.slide-text { max-width: 560px; }

.slide-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #C8A84B;
  background: rgba(200,168,75,0.12);
  border: 1px solid rgba(200,168,75,0.4);
  border-radius: 3px;
  padding: 3px 10px;
  margin-bottom: 8px;
}

.slide-text h2 {
  font-size: clamp(1.3rem, 3vw, 2.1rem);
  font-weight: 700;
  color: #EDF2F7;
  line-height: 1.25;
  margin-bottom: 6px;
}

.slide-text p {
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  color: rgba(237,242,247,0.85);
}

/* Carousel buttons */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(13,31,51,0.5);
  border: 1px solid rgba(200,168,75,0.4);
  color: #C8A84B;
  font-size: 1.8rem;
  line-height: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
}
.carousel-btn:hover { background: rgba(200,168,75,0.25); }
.carousel-btn--prev { left: 16px; }
.carousel-btn--next { right: 16px; }

/* Dots */
.carousel-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(200,168,75,0.4);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  padding: 0;
}
.dot.active {
  background: #C8A84B;
  transform: scale(1.3);
}

/* ════════════════════════════════════════════════
   CARDS SECTION
════════════════════════════════════════════════ */
.cards-section {
  padding: 36px 24px 48px;
  background: #EDF2F7;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1280px;
  margin: 0 auto;
}

/* ── Shared card styles ── */
.card {
  background: #FFFFFF;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(26,58,92,0.08);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(26,58,92,0.14);
}

/* Label tags */
.card-label-tag {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2E6EA6;
  background: rgba(46,110,166,0.08);
  border-radius: 3px;
  padding: 2px 8px;
  margin-bottom: 8px;
}
.card-label-tag--gold {
  color: #9a7c28;
  background: rgba(200,168,75,0.1);
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1A3A5C;
  margin-bottom: 8px;
}

.card-body {
  font-size: 0.82rem;
  color: #4a5e72;
  line-height: 1.65;
  flex: 1;
}

.card-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #2E6EA6;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.card-link:hover { color: #C8A84B; }

.card-link--cta {
  color: #FFFFFF;
  background: #1A3A5C;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 0.8rem;
  transition: background 0.2s;
}
.card-link--cta:hover { background: #C8A84B; color: #0D1F33; }

/* Divider */
.card-divider {
  width: calc(100% - 32px);
  margin: 0 auto;
  height: 1px;
  background: linear-gradient(to right, transparent, #C8A84B50, transparent);
  flex-shrink: 0;
}

/* ── Card 1 & 4: text-only with two halves ── */
.card--text-only { min-height: 360px; }

.card-half {
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ── Cards 2 & 3: image top ── */
.card--img-top .card-img-area {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  flex-shrink: 0;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.card:hover .card-img { transform: scale(1.04); }

.card--img-top .card-content {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ════════════════════════════════════════════════
   FOOTER
════════════════════════════════════════════════ */
.site-footer {
  background: #0D2744;
  color: rgba(237,242,247,0.55);
  text-align: center;
  padding: 18px 24px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

/* ════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .site-title { font-size: 0.7rem; letter-spacing: 0; }
  .header-inner { padding: 0 14px; gap: 10px; }
  .logo-img { height: 38px; }
  .cards-grid { grid-template-columns: 1fr; }
  .cards-section { padding: 24px 16px 36px; }
  .carousel { aspect-ratio: 16 / 8; }
  .slide-overlay { padding: 20px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .carousel-track { transition: none; }
  .card { transition: none; }
  .card-img { transition: none; }
}
