/* ==========================================================================
   江门港总体规划 — 台山港口专题网站 (广海湾港区 & 台山港区)
   Modern Deep-Tech & Maritime Dark Design System
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-dark: #070a13;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(26, 40, 71, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 242, 254, 0.3);
  
  --primary: #0284c7;
  --primary-glow: #00f2fe;
  --accent: #38bdf8;
  --gold: #fbbf24;
  --gold-glow: #f59e0b;
  --emerald: #10b981;
  --purple: #a855f7;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  /* Fonts & Shadows */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px rgba(0, 242, 254, 0.15);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-family);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(2, 132, 199, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 85% 65%, rgba(0, 242, 254, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(245, 158, 11, 0.05) 0%, transparent 50%);
  background-attachment: fixed;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #090d16;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(7, 10, 19, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  padding: 0.85rem 0;
  transition: var(--transition);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.2rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-logo i {
  color: var(--primary-glow);
  font-size: 1.4rem;
}

.nav-links {
  display: flex;
  gap: 0.75rem;
  list-style: none;
  flex-wrap: nowrap;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  transition: var(--transition);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.nav-links a:hover, .nav-links a.active {
  color: #fff;
  background: rgba(2, 132, 199, 0.2);
  border: 1px solid rgba(0, 242, 254, 0.3);
}

/* Hero Section */
.hero {
  padding: 9rem 0 5rem;
  position: relative;
  text-align: center;
  overflow: hidden;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.2rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 50px;
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.1);
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, var(--primary-glow) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  max-width: 800px;
  margin: 0 auto 2.5rem;
  color: var(--text-muted);
  font-size: 1.15rem;
}

/* Key Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  text-align: center;
  backdrop-filter: blur(12px);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-glow));
  opacity: 0;
  transition: var(--transition);
}

.metric-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

.metric-card:hover::before {
  opacity: 1;
}

.metric-num {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary-glow);
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.metric-card.gold .metric-num {
  color: var(--gold);
}

.metric-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

/* Section Common */
.section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 3.5rem;
}

.section-subtitle {
  color: var(--primary-glow);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Grid & Cards */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.75rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(12px);
  transition: var(--transition);
  position: relative;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.card-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  background: rgba(2, 132, 199, 0.15);
  border: 1px solid rgba(0, 242, 254, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary-glow);
  margin-bottom: 1.25rem;
}

.card-icon.gold {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--gold);
}

.card-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
}

.card-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.card-list {
  list-style: none;
}

.card-list li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}

.card-list li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--primary-glow);
  font-size: 0.8rem;
}

/* Port Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-primary {
  background: rgba(2, 132, 199, 0.2);
  color: var(--accent);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-gold {
  background: rgba(245, 158, 11, 0.2);
  color: var(--gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-emerald {
  background: rgba(16, 185, 129, 0.2);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Map Gallery Section */
.gallery-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.tab-btn {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 0.6rem 1.4rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.tab-btn:hover, .tab-btn.active {
  background: linear-gradient(135deg, var(--primary), #0369a1);
  color: #fff;
  border-color: var(--primary-glow);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}

.map-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.map-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-lg);
}

.map-thumb-wrap {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #020617;
  cursor: pointer;
}

.map-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.map-card:hover .map-thumb-wrap img {
  transform: scale(1.06);
}

.map-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(7, 10, 19, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  opacity: 0;
  transition: var(--transition);
}

.map-thumb-wrap:hover .map-overlay {
  opacity: 1;
}

.btn-icon-action {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition);
  text-decoration: none;
}

.btn-icon-action:hover {
  background: var(--primary-glow);
  color: #000;
  transform: scale(1.1);
}

.map-info {
  padding: 1.25rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.map-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.map-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}

/* Interactive Modal Lightbox */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  background: rgba(3, 7, 18, 0.94);
  backdrop-filter: blur(16px);
  display: none;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-header {
  padding: 1rem 1.5rem;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.modal-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-ctrl {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  white-space: nowrap;
}

.btn-ctrl:hover {
  background: var(--primary);
  border-color: var(--primary-glow);
}

.btn-close-modal {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.btn-close-modal:hover {
  background: #ef4444;
  color: #fff;
}

.modal-body {
  flex-grow: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
}

.modal-body:active {
  cursor: grabbing;
}

.modal-img-container {
  transform-origin: center center;
  transition: transform 0.1s ease-out;
}

.modal-img-container img {
  max-width: 90vw;
  max-height: 82vh;
  object-fit: contain;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
  border-radius: 6px;
  pointer-events: none;
}

/* Comparison Table */
.table-wrap {
  overflow-x: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
}

.comp-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.comp-table th {
  background: rgba(15, 23, 42, 0.9);
  padding: 1.25rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid var(--border-glass);
  white-space: nowrap;
}

.comp-table td {
  padding: 1.1rem 1.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-glass);
}

.comp-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  color: #fff;
}

/* Footer */
.footer {
  background: #030712;
  border-top: 1px solid var(--border-glass);
  padding: 3rem 0 2rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.footer-logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
}

.footer-desc {
  max-width: 600px;
  margin: 0 auto 1.5rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 992px) {
  .hero h1 { font-size: 2.25rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .nav-links { overflow-x: auto; padding-bottom: 0.25rem; }
}

@media (max-width: 600px) {
  .hero h1 { font-size: 1.75rem; }
  .section-title { font-size: 1.75rem; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
}
