/* ============================================
   Sky Shield Hub - Main Stylesheet
   Reference: UST (Unmanned Systems Technology)
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  --primary: #0a2540;
  --primary-light: #1a3a5c;
  --accent: #e63946;
  --accent-hover: #c1121f;
  --blue: #0057b8;
  --blue-hover: #003d82;
  --bg: #ffffff;
  --bg-light: #f7f8fa;
  --bg-dark: #f0f2f5;
  --text: #1a1a2e;
  --text-secondary: #555770;
  --text-muted: #8b8da3;
  --border: #e2e4ea;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --max-width: 1280px;
  --transition: all 0.3s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ---------- Utility ---------- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section-alt { background: var(--bg-light); }
.section-title {
  font-size: 28px; font-weight: 700; color: var(--primary);
  margin-bottom: 8px; letter-spacing: -0.02em;
}
.section-subtitle {
  font-size: 16px; color: var(--text-secondary);
  margin-bottom: 40px;
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 600; transition: var(--transition);
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-outline {
  border: 2px solid var(--blue); color: var(--blue); background: transparent;
}
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-white { background: #fff; color: var(--primary); }
.btn-white:hover { background: #f0f0f0; transform: translateY(-1px); }

/* ---------- Header / Navigation ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: #fff; border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 20px; font-weight: 800; color: var(--primary);
  letter-spacing: -0.03em;
}
.logo-icon {
  width: 36px; height: 36px; background: var(--primary);
  border-radius: var(--radius-sm); display: flex; align-items: center;
  justify-content: center; color: #fff; font-size: 18px;
}
.nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 8px 16px; font-size: 14px; font-weight: 500;
  color: var(--text-secondary); border-radius: var(--radius-sm);
  transition: var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--primary); background: var(--bg-light); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.lang-toggle {
  display: flex; align-items: center; gap: 2px;
  padding: 4px 8px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border); color: var(--text-secondary);
}
.lang-toggle span { padding: 2px 4px; border-radius: 3px; }
.lang-toggle span.active { background: var(--primary); color: #fff; }
.header-search {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 20px;
  background: var(--bg-light); border: 1px solid var(--border);
  width: 240px; transition: var(--transition);
}
.header-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,87,184,0.1); }
.header-search input {
  border: none; background: none; outline: none;
  font-size: 14px; color: var(--text); width: 100%;
}
.search-icon { color: var(--text-muted); flex-shrink: 0; }

/* Mobile menu */
.mobile-toggle { display: none; font-size: 24px; color: var(--primary); }

/* ---------- Hero Section ---------- */
.hero {
  background: linear-gradient(135deg, #0a2540 0%, #1a3a5c 50%, #0d2e4a 100%);
  color: #fff; padding: 80px 0; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner { display: flex; align-items: center; gap: 60px; position: relative; z-index: 1; }
.hero-content { flex: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 20px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  font-size: 13px; font-weight: 500; margin-bottom: 24px;
}
.hero-badge-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; }
.hero h1 { font-size: 48px; font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 20px; }
.hero p { font-size: 18px; color: rgba(255,255,255,0.8); line-height: 1.7; margin-bottom: 32px; max-width: 540px; }
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; margin-top: 48px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.15); }
.hero-stat-value { font-size: 32px; font-weight: 800; }
.hero-stat-label { font-size: 14px; color: rgba(255,255,255,0.6); margin-top: 2px; }
.hero-visual { flex: 0 0 420px; }
.hero-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hero-grid-item {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md); padding: 20px; text-align: center;
  transition: var(--transition);
}
.hero-grid-item:hover { background: rgba(255,255,255,0.12); transform: translateY(-2px); }
.hero-grid-item.large { grid-column: span 2; }
.hero-grid-icon { font-size: 32px; margin-bottom: 8px; }
.hero-grid-label { font-size: 12px; color: rgba(255,255,255,0.7); font-weight: 500; }

/* ---------- Category Grid ---------- */
.category-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
.category-card {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 24px 16px; border-radius: var(--radius-md);
  background: #fff; border: 1px solid var(--border);
  transition: var(--transition); cursor: pointer;
}
.category-card:hover { border-color: var(--blue); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.category-icon {
  width: 52px; height: 52px; border-radius: var(--radius-md);
  background: #fef2f2; display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: var(--accent);
}
.category-name { font-size: 14px; font-weight: 600; text-align: center; color: var(--text); }
.category-count { font-size: 12px; color: var(--text-muted); }

/* ---------- Supplier Carousel ---------- */
.carousel-section { position: relative; }
.carousel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.carousel-nav { display: flex; gap: 8px; }
.carousel-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: #fff; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition); font-size: 18px; color: var(--text-secondary);
}
.carousel-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.carousel-track {
  display: flex; gap: 20px; overflow-x: auto;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; padding-bottom: 8px;
}
.carousel-track::-webkit-scrollbar { display: none; }

.supplier-card {
  flex: 0 0 300px; scroll-snap-align: start;
  background: #fff; border-radius: var(--radius-md);
  border: 1px solid var(--border); overflow: hidden;
  transition: var(--transition);
}
.supplier-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.supplier-card-cover {
  height: 160px; background: var(--bg-light);
  background-size: cover; background-position: center;
  position: relative;
}
.supplier-card-cover .placeholder {
  width: 100%; height: 100%; display: flex;
  align-items: center; justify-content: center;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  font-size: 40px; color: var(--text-muted);
}
.supplier-card-body { padding: 20px; }
.supplier-card-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.supplier-card-country { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.supplier-card-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.supplier-card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; border-top: 1px solid var(--border); }
.supplier-card-logo {
  height: 24px; width: 80px; background: var(--bg-light);
  border-radius: 4px; display: flex; align-items: center;
  justify-content: center; font-size: 11px; color: var(--text-muted);
  font-weight: 600; overflow: hidden;
}
.supplier-card-logo img { height: 100%; width: auto; }
.supplier-card-link { font-size: 13px; font-weight: 600; color: var(--blue); display: flex; align-items: center; gap: 4px; }
.supplier-card-link:hover { color: var(--blue-hover); }

/* ---------- Featured Product Grid ---------- */
.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.product-card {
  background: #fff; border-radius: var(--radius-md);
  border: 1px solid var(--border); overflow: hidden;
  transition: var(--transition);
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.product-card-image {
  height: 200px; background: var(--bg-light);
  position: relative; overflow: hidden;
}
.product-card-image .placeholder {
  width: 100%; height: 100%; display: flex;
  align-items: center; justify-content: center;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  font-size: 48px; color: var(--text-muted);
}
.product-card-category {
  position: absolute; top: 12px; left: 12px;
  padding: 4px 10px; border-radius: 4px;
  background: rgba(10,37,64,0.85); color: #fff;
  font-size: 11px; font-weight: 600;
}
.product-card-body { padding: 20px; }
.product-card-name { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.product-card-specs { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 16px; }
.product-card-spec-item { display: flex; justify-content: space-between; padding: 3px 0; }
.product-card-spec-item .label { color: var(--text-muted); }
.product-card-spec-item .value { font-weight: 500; color: var(--text); }
.product-card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; border-top: 1px solid var(--border); }
.product-card-supplier { font-size: 13px; color: var(--text-muted); }
.product-card-btn { font-size: 13px; font-weight: 600; color: var(--blue); display: flex; align-items: center; gap: 4px; }
.product-card-btn:hover { color: var(--blue-hover); }

/* ---------- News / Articles ---------- */
.news-grid { display: flex; gap: 24px; }
.news-featured { flex: 0 0 420px; }
.news-list { flex: 1; display: flex; flex-direction: column; gap: 16px; }
.news-featured-card {
  background: #fff; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border); transition: var(--transition);
}
.news-featured-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.news-featured-image { height: 240px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); position: relative; display: flex; align-items: center; justify-content: center; }
.news-featured-image .placeholder-icon { font-size: 64px; opacity: 0.3; }
.news-featured-tag {
  position: absolute; top: 16px; left: 16px;
  padding: 4px 12px; border-radius: 4px;
  background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 600;
}
.news-featured-body { padding: 24px; }
.news-featured-title { font-size: 20px; font-weight: 700; line-height: 1.4; margin-bottom: 12px; }
.news-featured-excerpt { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 16px; }

.news-item {
  display: flex; gap: 16px; padding: 16px;
  background: #fff; border-radius: var(--radius-md);
  border: 1px solid var(--border); transition: var(--transition);
}
.news-item:hover { border-color: var(--blue); box-shadow: var(--shadow-sm); }
.news-item-image {
  flex: 0 0 120px; height: 90px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: var(--text-muted);
}
.news-item-content { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.news-item-tag { font-size: 11px; font-weight: 600; color: var(--accent); margin-bottom: 4px; }
.news-item-title { font-size: 15px; font-weight: 600; line-height: 1.4; margin-bottom: 4px; }
.news-item-date { font-size: 12px; color: var(--text-muted); }

/* ---------- Events ---------- */
.events-grid { display: flex; flex-direction: column; gap: 16px; }
.event-card {
  display: flex; gap: 20px; padding: 24px;
  background: #fff; border-radius: var(--radius-md);
  border: 1px solid var(--border); transition: var(--transition);
}
.event-card:hover { box-shadow: var(--shadow-md); border-color: var(--blue); }
.event-date-block {
  flex: 0 0 72px; text-align: center;
  padding: 12px; border-radius: var(--radius-sm);
  background: var(--bg-light);
}
.event-date-day { font-size: 28px; font-weight: 800; color: var(--primary); line-height: 1; }
.event-date-month { font-size: 13px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; }
.event-content { flex: 1; }
.event-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.event-meta { font-size: 13px; color: var(--text-muted); display: flex; gap: 16px; }
.event-meta-item { display: flex; align-items: center; gap: 4px; }
.event-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 600;
}
.event-badge.expo { background: #dbeafe; color: #1d4ed8; }
.event-badge.conference { background: #fef3c7; color: #92400e; }

/* ---------- Footer CTA ---------- */
.footer-cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff; padding: 64px 0;
}
.footer-cta-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
}
.footer-cta h2 { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.footer-cta p { font-size: 16px; color: rgba(255,255,255,0.7); }
.footer-cta-buttons { display: flex; gap: 12px; }

/* ---------- Footer ---------- */
.footer { background: #0d1b2a; color: rgba(255,255,255,0.7); padding: 48px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand { }
.footer-brand-name { font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 12px; }
.footer-brand-desc { font-size: 14px; line-height: 1.7; max-width: 320px; }
.footer-column h4 { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-column a { display: block; font-size: 14px; color: rgba(255,255,255,0.6); padding: 4px 0; transition: var(--transition); }
.footer-column a:hover { color: #fff; }
.footer-bottom {
  padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px;
}

/* ---------- Inquiry Modal ---------- */
.modal-overlay {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5); z-index: 200;
  align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius-lg);
  padding: 32px; width: 90%; max-width: 520px;
  box-shadow: var(--shadow-lg); position: relative;
  animation: modalIn 0.3s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--text-muted); transition: var(--transition);
}
.modal-close:hover { background: var(--bg-light); color: var(--text); }
.modal h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.modal p.subtitle { font-size: 14px; color: var(--text-secondary); margin-bottom: 24px; }
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-input {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px; color: var(--text);
  transition: var(--transition); outline: none;
}
.form-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,87,184,0.1); }
textarea.form-input { resize: vertical; min-height: 80px; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }
.form-submit { width: 100%; margin-top: 8px; justify-content: center; }

/* ---------- Loading / Empty States ---------- */
.loading {
  display: flex; align-items: center; justify-content: center;
  padding: 48px; color: var(--text-muted); font-size: 14px;
}
.loading-spinner {
  width: 24px; height: 24px; border: 3px solid var(--border);
  border-top-color: var(--blue); border-radius: 50%;
  animation: spin 0.8s linear infinite; margin-right: 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state {
  text-align: center; padding: 48px; color: var(--text-muted);
}
.empty-state-icon { font-size: 48px; margin-bottom: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-inner { flex-direction: column; text-align: center; }
  .hero p { margin: 0 auto 32px; }
  .hero-buttons { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { flex: none; width: 100%; max-width: 420px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav { display: none; }
  .mobile-toggle { display: block; }
  .header-search { width: 180px; }
  .hero { padding: 48px 0; }
  .hero h1 { font-size: 32px; }
  .hero-stats { flex-direction: column; gap: 16px; align-items: center; }
  .section { padding: 40px 0; }
  .section-title { font-size: 22px; }
  .category-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
  .news-grid { flex-direction: column; }
  .news-featured { flex: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-cta-inner { flex-direction: column; text-align: center; }
  .footer-cta-buttons { justify-content: center; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .form-row { flex-direction: column; gap: 0; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 15px; }
  .product-grid { grid-template-columns: 1fr; }
  .supplier-card { flex: 0 0 260px; }
}
