/* Modern CSS for CVE Database Dashboard - Fonts handled via preload in HTML */

/* Enhanced Modern CSS for CVE Database Dashboard */

/* Enhanced CSS Variables */
:root {
  --primary: #2196f3;
  --primary-dark: #1976d2;
  --primary-light: #42a5f5;
  --secondary: #64b5f6;
  --accent: #ff9800;
  --neutral: #f5f5f5;
  --background: #fafafa;
  --surface: #ffffff;
  --surface-elevated: #f8f9fa;
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --text-muted: #868e96;
  --border: #dee2e6;
  --border-light: #e9ecef;
  --success: #28a745;
  --warning: #ffc107;
  --error: #dc3545;
  --gradient-primary: linear-gradient(135deg, #2196f3 0%, #64b5f6 100%);
  --gradient-secondary: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
  --shadow-xl: 0 1.5rem 4rem rgba(0, 0, 0, 0.2);
  --border-radius: 0.5rem;
  --border-radius-sm: 0.375rem;
  --border-radius-lg: 0.75rem;
  --border-radius-xl: 1rem;
  --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;
  --line-height-tight: 1.25;
  --line-height-base: 1.5;
  --line-height-relaxed: 1.625;
}

* {
  box-sizing: border-box;
}

html,
body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  background: var(--background);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

h1,
.main-title {
  font-size: var(--font-size-h1);
  font-weight: 700;

  html,
  body {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(120deg, #f7fafd 0%, #eaf3ff 100%);
    color: #23272f;
    margin: 0;
    padding: 0;
    min-height: 100vh;
  }

  header,
  nav,
  main,
  footer {
    margin: 0 auto;
    max-width: 1200px;
    padding: 1.5rem 1.5rem 1.5rem 1.5rem;
  }

  header {
    background: linear-gradient(90deg, #1a2a3a 60%, #0078d7 100%);
    color: #fff;
    border-radius: 0 0 18px 18px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.10);
    margin-bottom: 2.5rem;
    letter-spacing: 0.5px;
  }

  nav {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.2rem;
    font-size: 1.13rem;
    flex-wrap: wrap;
  }

  nav a {
    color: #0078d7;
    text-decoration: none;
    padding: 0.5rem 1.1rem;
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
  }

  /* Focus styles for accessibility */
  a:focus,
  button:focus,
  .button:focus {
    outline: 2px solid #0078d7;
    outline-offset: 2px;
  }

  nav a:focus {
    background: #dbefff;
    color: #005fa3;
    box-shadow: 0 2px 8px rgba(0, 120, 215, 0.08);
  }

  main {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.09);
    padding: 2.2rem 2rem 2.5rem 2rem;
    margin-bottom: 2.5rem;
    min-height: 60vh;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-weight: 700;
    color: #1a2a3a;
    margin-top: 0;
    letter-spacing: 0.2px;
  }

  table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.7rem 0;
    background: #fafdff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  }

  th,
  td {
    padding: 0.85rem 1.1rem;
    text-align: left;
  }

  th {
    background: #eaf3ff;
    color: #1a2a3a;
    font-weight: 700;
    letter-spacing: 0.1px;
  }

  tr:nth-child(even) {
    background: #f3f8fd;
  }

  tr:hover {
    background: #e0f0ff;
    transition: background 0.15s;
  }

  button,
  .button {
    background: linear-gradient(90deg, #0078d7 60%, #005fa3 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.7rem 1.4rem;
    font-size: 1.05rem;
    cursor: pointer;
    transition: background 0.18s, box-shadow 0.18s, transform 0.12s;
    box-shadow: 0 2px 8px rgba(0, 120, 215, 0.08);
    font-weight: 600;
  }

  button:focus,
  .button:focus {
    outline: 2px solid #0078d7;
    outline-offset: 2px;
    background: linear-gradient(90deg, #005fa3 60%, #0078d7 100%);
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 4px 16px rgba(0, 120, 215, 0.13);
  }

  footer {
    color: #7a8599;
    font-size: 1.01rem;
    text-align: center;
    margin-top: 2.5rem;
    padding: 1.7rem 0 0.7rem 0;
    letter-spacing: 0.1px;
  }

  /* Card styles for summary/info blocks */
  .card,
  .summary-card,
  .info-card {
    background: #fafdff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 120, 215, 0.07);
    padding: 1.5rem 1.3rem;
    margin-bottom: 1.5rem;
    border: 1px solid #eaf3ff;
  }

  /* Utility classes */
  .text-center {
    text-align: center;
  }

  .mt-2 {
    margin-top: 2rem;
  }

  .mb-2 {
    margin-bottom: 2rem;
  }

  .fw-bold {
    font-weight: 700;
  }

  .fw-semi {
    font-weight: 500;
  }

  .rounded {
    border-radius: 12px;
  }

  .shadow {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  }

  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  padding: var(--spacing-sm) var(--spacing-md);
  border-bottom: 2px solid transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--border-light);
}

.nav-link-external svg {
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.nav-link-external:hover svg {
  opacity: 1;
}

/* Main Content */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 4rem 0 6rem 0;
  background: var(--gradient-subtle);
  margin: 2rem -2rem 4rem -2rem;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border);
}

.hero-content {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 2rem;
}

.hero-content h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin: 0 0 1.5rem 0;
  color: var(--text-primary);
  letter-spacing: -0.025em;
}

.hero-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin: 0 0 3rem 0;
  line-height: 1.7;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn,
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--primary-dark);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--surface);
  color: var(--primary);
  border-color: var(--border);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background: var(--border-light);
  border-color: var(--primary);
}

/* Section Styles */
section {
  margin-bottom: 4rem;
}

section h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
  letter-spacing: -0.025em;
}

.section-intro {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin: 0 0 3rem 0;
  max-width: 600px;
}

/* Data Sources Grid */
.sources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.source-card {
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.source-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.source-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}

.source-card h3 {
  margin: 0 0 1rem 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.source-card h3 a {
  color: var(--text-primary);
  text-decoration: none;
}

.source-card h3 a:hover {
  color: var(--primary);
}

.source-card p {
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

/* About Section */
.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  margin: 0 0 1.5rem 0;
  line-height: 1.7;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
  background: var(--gradient-subtle);
  border-radius: var(--border-radius);
  border: 1px solid var(--border);
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Contact Section */
.contact-section {
  text-align: center;
  padding: 3rem 0;
}

.contact-section p {
  color: var(--text-secondary);
  margin: 0 0 3rem 0;
  font-size: 1.125rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.contact-link:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  color: var(--primary);
}

.contact-icon {
  font-size: 1.25rem;
}

/* Footer */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 2rem 0;
  margin-top: 4rem;
  color: var(--text-muted);
}

/* Link Styles */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover,
a:focus {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Card Section and Card Styles */
.card,
.feature-section.card,
.about-section.card,
.contact-section.card,
.hero-section.card {
  background: var(--surface);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  padding: var(--spacing-lg) var(--spacing-md);
  margin: 0 auto var(--spacing-lg) auto;
  max-width: 900px;
  width: 100%;
  box-sizing: border-box;
}

.card-section {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  margin: var(--spacing-md) 0;
}

ul,
ol {
  padding-left: 2rem;
  margin-bottom: var(--spacing-xs);
}

li {
  margin-bottom: 0.5rem;
}

/* Intelligence Grid Layout Fix */
.intelligence-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 2.5rem 0;
}

.intelligence-card {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  background: var(--surface);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  padding: 1.5rem 2rem;
  transition: box-shadow 0.2s, border-color 0.2s;
  text-align: left;
}

.intelligence-card>div {
  text-align: left;
}

.card,
.feature-section.card,
.about-section.card,
.contact-section.card {
  text-align: left;
}

.intelligence-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.intelligence-card .feature-icon {
  font-size: 2.2rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.intelligence-card h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.intelligence-card p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.center-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
  text-align: center;
  flex-wrap: wrap;
}

.center-meta span {
  font-size: 1rem;
  color: var(--text-secondary);
}

@media (max-width: 950px) {

  .card,
  .feature-section.card,
  .about-section.card,
  .contact-section.card,
  .hero-section.card {
    max-width: 100%;
    padding: 2rem 0.5rem;
  }
}

@media (max-width: 700px) {
  .intelligence-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem 1rem;
  }

  .intelligence-card .feature-icon {
    margin-bottom: 0.5rem;
  }
}

  /* Enhanced mobile responsiveness */
  @media (max-width: 768px) {
    header {
      padding: 2rem 1rem 1.5rem 1rem;
    }

    .header-title {
      font-size: 2rem;
    }

    .header-subtitle {
      font-size: 1rem;
    }

    nav {
      gap: 1rem;
      flex-wrap: wrap;
      justify-content: center;
    }

    nav a {
      padding: 0.75rem 1rem;
      font-size: 1rem;
      min-width: 44px;
      text-align: center;
    }

    main {
      padding: 1.5rem 1rem;
    }

    .welcome-title {
      font-size: 1.4rem;
    }

    .welcome-text {
      font-size: 1rem;
    }

    .quick-links-title {
      font-size: 1.1rem;
    }

    .quick-links-list {
      flex-direction: column;
      gap: 1rem;
    }

    .button {
      padding: 0.875rem 1.5rem;
      font-size: 1rem;
      min-height: 44px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .card {
      padding: 1.25rem;
    }
  }

  @media (max-width: 480px) {
    .header-title {
      font-size: 1.8rem;
    }

    .header-subtitle {
      font-size: 0.9rem;
    }

    nav a {
      padding: 0.625rem 0.875rem;
      font-size: 0.9rem;
    }

    .welcome-title {
      font-size: 1.3rem;
    }

    .welcome-text {
      font-size: 0.95rem;
    }

    .button {
      padding: 0.75rem 1.25rem;
      font-size: 0.95rem;
    }
  }

  /* Touch-friendly interactions */
  @media (hover: none) and (pointer: coarse) {
    /* Increase touch targets for mobile devices */
    nav a {
      min-height: 48px;
      min-width: 48px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .button {
      min-height: 48px;
      min-width: 48px;
    }

    /* Add touch feedback */
    a:active,
    button:active,
    .button:active {
      transform: scale(0.98);
      transition: transform 0.1s ease;
    }
  }

/* Remove forced left alignment for all text inside cards, except where needed */
.hero-section.card,
.hero-content,
.hero-section.card * {
  text-align: inherit !important;
}

.card,
.feature-section.card,
.about-section.card,
.contact-section.card,
.hero-section.card {
  text-align: inherit;
}

/* For .card-section and .card, use default text alignment (left for LTR, but allow override) */
.card-section,
.card {
  text-align: initial;
}

/* If you want to center only specific elements, add a class or selector for those */

/* Make hero-section and hero-content match other cards' padding and alignment */
.hero-section.card {
  padding: var(--spacing-lg) var(--spacing-md) !important;
  margin: 0 auto var(--spacing-lg) auto;
  max-width: 900px;
  width: 100%;
  box-sizing: border-box;
  background: var(--surface);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.hero-content {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.hero-section.card * {
  text-align: left;
}

  /* Header specific styles */
  .header-title {
    font-size: 2.3rem;
    margin-bottom: 0.3em;
    letter-spacing: 0.5px;
  }

  .header-subtitle {
    font-size: 1.15rem;
    color: #dbefff;
    margin-top: 0;
    font-weight: 400;
    letter-spacing: 0.1px;
  }

  .welcome-title {
    font-size: 1.6rem;
    margin-bottom: 0.7em;
  }

  .welcome-text {
    font-size: 1.13rem;
    color: #3a4a5a;
    max-width: 700px;
  }

  .quick-links-title {
    font-size: 1.18rem;
    margin-bottom: 0.6em;
  }

  .quick-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
  }