* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #1a365d;
  --primary-light: #2d5a8c;
  --accent: #0066cc;
  --accent-light: #3399ff;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gray-100: #f9fafb;
  --gray-200: #f3f4f6;
  --gray-300: #e5e7eb;
  --gray-400: #d1d5db;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --border-radius: 8px;
  --transition: 0.3s ease;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--gray-800);
  background: #ffffff;
  line-height: 1.6;
}

html, body {
  height: 100%;
}

/* Header */
header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  padding: 2rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo span {
  color: var(--accent-light);
}

nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

nav a {
  color: white;
  text-decoration: none;
  font-size: 0.95rem;
  opacity: 0.9;
  transition: opacity var(--transition);
}

nav a:hover {
  opacity: 1;
}

/* Dropdown Menu */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  color: white;
  background: none;
  border: none;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  opacity: 0.9;
  transition: all var(--transition);
  border-radius: var(--border-radius);
}

.dropdown-toggle:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  min-width: 240px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all var(--transition);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  margin-top: 0.5rem;
}

.nav-dropdown:hover .dropdown-menu {
  max-height: 500px;
  opacity: 1;
}

.dropdown-menu a {
  display: block;
  padding: 0.75rem 1.2rem;
  color: var(--gray-800);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all var(--transition);
  border-left: 3px solid transparent;
  margin: 0;
  opacity: 1;
}

.dropdown-menu a:hover {
  background: var(--gray-100);
  color: var(--primary);
  border-left-color: var(--accent);
  padding-left: 1.5rem;
}

.dropdown-menu a:first-child {
  border-top-left-radius: var(--border-radius);
  border-top-right-radius: var(--border-radius);
}

.dropdown-menu a:last-child {
  border-bottom-left-radius: var(--border-radius);
  border-bottom-right-radius: var(--border-radius);
}

/* Main Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  padding: 4rem 2rem;
  text-align: center;
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.6rem 1.2rem;
  border: 2px solid var(--gray-300);
  background: white;
  color: var(--gray-700);
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Company Grid */
.companies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.company-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.company-card:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
  border-color: var(--accent);
}

.company-header {
  background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
  padding: 1.5rem;
  border-bottom: 1px solid var(--gray-300);
}

.priority-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.priority-1 {
  background: #dbeafe;
  color: #1e40af;
}

.priority-2 {
  background: #fef3c7;
  color: #92400e;
}

.priority-3 {
  background: #dbeafe;
  color: #0c4a6e;
}

.company-card h3 {
  font-size: 1.3rem;
  margin: 0.5rem 0;
  color: var(--primary);
}

.company-type {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
}

.company-tagline {
  font-size: 0.9rem;
  color: var(--gray-600);
  font-style: italic;
  margin-top: 0.5rem;
}

.company-body {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.company-description {
  font-size: 0.9rem;
  color: var(--gray-700);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.strength-list {
  margin-bottom: 1rem;
}

.strength-list strong {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--gray-500);
  display: block;
  margin-bottom: 0.5rem;
}

.strength-list li {
  font-size: 0.85rem;
  color: var(--gray-700);
  margin-left: 1.2rem;
  margin-bottom: 0.3rem;
}

.company-footer {
  padding: 1rem 1.5rem;
  background: var(--gray-100);
  border-top: 1px solid var(--gray-200);
  margin-top: auto;
}

.view-btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: var(--accent);
  color: white;
  text-decoration: none;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
  text-align: center;
}

.view-btn:hover {
  background: #0052a3;
  text-decoration: none;
}

/* Detail Page */
.detail-container {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.detail-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  margin-bottom: 2rem;
}

.detail-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.detail-header .type {
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.detail-header .tagline {
  font-size: 1.1rem;
  font-style: italic;
  opacity: 0.85;
}

.detail-section {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin-bottom: 2rem;
}

.detail-section h2 {
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-light);
}

.detail-section h3 {
  font-size: 1.1rem;
  color: var(--gray-800);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.detail-section ul {
  list-style-position: inside;
  color: var(--gray-700);
}

.detail-section ul li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.detail-section p {
  color: var(--gray-700);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.highlight-box {
  background: var(--gray-100);
  border-left: 4px solid var(--accent);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  margin: 1.5rem 0;
}

.highlight-box h4 {
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.highlight-box p {
  color: var(--gray-700);
  margin: 0;
  line-height: 1.6;
}

/* Back Button */
.back-link {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 2rem;
  font-weight: 600;
  transition: all var(--transition);
}

.back-link:hover {
  gap: 0.5rem;
}

.back-link::before {
  content: '←';
  margin-right: 0.5rem;
}

/* Footer */
footer {
  background: var(--gray-900);
  color: white;
  padding: 2rem 0;
  margin-top: 3rem;
  text-align: center;
}

footer p {
  opacity: 0.8;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 1rem;
  }

  nav {
    display: flex;
    gap: 1rem;
  }

  nav a {
    margin: 0;
    font-size: 0.85rem;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .companies-grid {
    grid-template-columns: 1fr;
  }

  .detail-header h1 {
    font-size: 1.5rem;
  }

  .detail-section {
    padding: 1.5rem;
  }

  .filter-bar {
    flex-direction: column;
  }

  .filter-btn {
    width: 100%;
  }
}

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

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.text-muted {
  color: var(--gray-500);
}

.text-small {
  font-size: 0.85rem;
}

/* Case Study Cards */
.case-study-card {
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-left: 4px solid var(--accent);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: all var(--transition);
}

.case-study-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.case-study-card h4 {
  color: var(--primary);
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
}

.case-study-meta {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: var(--accent-light);
  color: white;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge.duration {
  background: var(--success);
}

.case-study-content h5 {
  color: var(--gray-700);
  font-size: 0.95rem;
  margin-top: 1rem;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.case-study-content p {
  color: var(--gray-700);
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.6;
}

/* Resource Cards */
.resource-card {
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1.2rem;
  transition: all var(--transition);
}

.resource-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.1);
}

.resource-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.resource-type {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  border-radius: var(--border-radius);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.resource-card h4 {
  color: var(--primary);
  font-size: 1rem;
  margin: 0;
  flex-grow: 1;
  line-height: 1.4;
}

.resource-description {
  color: var(--gray-700);
  font-size: 0.9rem;
  margin: 0.8rem 0;
  line-height: 1.6;
}

.resource-link {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
  margin-top: 0.5rem;
}

.resource-link:hover {
  color: var(--primary);
  transform: translateX(4px);
}

/* Search Input */
input[type="text"] {
  transition: all var(--transition);
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

input[type="text"]::placeholder {
  color: var(--gray-400);
}

/* Quick Navigation Section */
.quick-nav-section {
  background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
  padding: 3rem 0;
  margin: 2rem 0;
}

.quick-nav-section h2 {
  color: var(--primary);
  margin-bottom: 2rem;
  text-align: center;
  font-size: 1.5rem;
}

.quick-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.quick-nav-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  background: white;
  border: 2px solid var(--gray-300);
  border-radius: var(--border-radius);
  text-decoration: none;
  text-align: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.quick-nav-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.quick-nav-card:hover::before {
  transform: scaleX(1);
}

.quick-nav-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
  transform: translateY(-2px);
}

.nav-number {
  display: inline-block;
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.quick-nav-card h4 {
  color: var(--primary);
  font-size: 0.95rem;
  margin: 0.5rem 0 0.3rem;
  line-height: 1.3;
  font-weight: 600;
}

.quick-nav-card p {
  color: var(--gray-500);
  font-size: 0.75rem;
  margin: 0;
  font-style: italic;
}

.quick-nav-card.priority-1 {
  border-left: 4px solid #3b82f6;
}

.quick-nav-card.priority-2 {
  border-left: 4px solid #f59e0b;
}

.quick-nav-card.priority-3 {
  border-left: 4px solid #10b981;
}

/* Responsive */
@media (max-width: 768px) {
  .quick-nav-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.8rem;
  }

  .quick-nav-card {
    padding: 1rem 0.7rem;
  }

  .quick-nav-card h4 {
    font-size: 0.85rem;
  }

  .quick-nav-card p {
    font-size: 0.7rem;
  }

  .nav-number {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }
}

/* Related Companies Grid */
.related-companies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.related-company-card {
  background: white;
  border: 2px solid var(--gray-300);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  text-decoration: none;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.related-company-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.related-company-card:hover::before {
  transform: scaleX(1);
}

.related-company-card:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 16px rgba(0, 102, 204, 0.12);
  transform: translateY(-4px);
}

.related-company-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: var(--accent-light);
  color: white;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.related-company-card h4 {
  color: var(--primary);
  font-size: 1.1rem;
  margin: 0.5rem 0;
  line-height: 1.3;
}

.related-company-card p {
  color: var(--gray-500);
  font-size: 0.85rem;
  margin: 0;
  font-style: italic;
}

/* Company Stats Section (NEW) */
.company-stats-section {
  margin: 2rem 0;
}

.company-stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  padding: 1.5rem 1rem;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
  transition: all var(--transition);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 102, 204, 0.25);
}

.stat-icon {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0.5rem 0;
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Tech Skills Section */
.company-tech-skills {
  background: var(--gray-100);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--accent);
}

.company-tech-skills h3 {
  color: var(--primary);
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
}

.skills-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.skill-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: default;
}

.skill-badge:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.05);
}

/* Industries Section */
.company-industries {
  background: var(--gray-100);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--success);
}

.company-industries h3 {
  color: var(--primary);
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
}

.industry-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.industry-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
  color: white;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: default;
}

.industry-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Company Info Bar */
.company-info-bar {
  background: white;
  border: 2px solid var(--gray-300);
  border-radius: var(--border-radius);
  padding: 1rem;
  display: flex;
  justify-content: space-around;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
  text-align: center;
}

.company-info-bar span {
  color: var(--gray-700);
  font-size: 0.9rem;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .company-stats-cards {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  }

  .stat-card {
    padding: 1rem 0.7rem;
  }

  .stat-icon {
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
  }

  .stat-value {
    font-size: 1.2rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  .company-tech-skills,
  .company-industries {
    padding: 1rem;
  }

  .company-info-bar {
    flex-direction: column;
    gap: 0.5rem;
  }

  .skills-badges,
  .industry-badges {
    gap: 0.5rem;
  }

  .skill-badge,
  .industry-badge {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
  }
}

/* Page Navigation */
.page-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  margin: 3rem 0 2rem 0;
  padding: 2rem;
  background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
  border-radius: var(--border-radius);
  border: 2px solid var(--gray-300);
}

.nav-btn {
  flex: 1;
  padding: 1rem;
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  transition: all var(--transition);
  font-size: 0.95rem;
}

.nav-btn:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.2);
}

.nav-btn.prev-btn {
  order: 1;
}

.nav-btn.next-btn {
  order: 3;
}

.page-indicator {
  order: 2;
  text-align: center;
  flex: 0.5;
}

.current-page {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.page-progress {
  display: block;
  width: 100px;
  height: 4px;
  background: var(--gray-300);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
  transition: width 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
  .page-navigation {
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
  }

  .nav-btn {
    order: unset;
    width: 100%;
  }

  .page-indicator {
    order: unset;
    width: 100%;
  }

  .current-page {
    font-size: 1rem;
  }
}
