/* The Career DB - Modern, Premium CSS Stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

:root {
  /* HSL Color System - Branco & Off White with Azul & Jeans Blue accents */
  --bg-main: hsl(210, 20%, 98%);
  --bg-card: hsl(0, 0%, 100%);
  --bg-card-hover: hsl(210, 20%, 95%);
  --border-color: hsl(210, 15%, 88%);
  --border-glow: hsla(215, 90%, 35%, 0.25);
  
  --text-primary: hsl(220, 50%, 15%);
  --text-secondary: hsl(220, 15%, 38%);
  --text-muted: hsl(220, 10%, 58%);
  
  --primary: hsl(215, 90%, 35%);
  --primary-gradient: linear-gradient(135deg, hsl(215, 90%, 35%), hsl(210, 80%, 45%));
  --accent: hsl(212, 45%, 48%);
  --accent-gradient: linear-gradient(135deg, hsl(212, 45%, 48%), hsl(205, 55%, 70%));
  --warning: hsl(36, 95%, 45%);
  --danger: hsl(354, 75%, 45%);

  --shadow-sm: 0 2px 8px rgba(0, 62, 155, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 62, 155, 0.07);
  --shadow-lg: 0 16px 40px rgba(0, 62, 155, 0.1);
  --glass-blur: blur(16px);
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* Background Glowing Accents */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 50%;
  background: radial-gradient(circle, hsla(215, 90%, 35%, 0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

body::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 50%;
  height: 50%;
  background: radial-gradient(circle, hsla(212, 45%, 48%, 0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  color: var(--text-primary);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition-smooth);
}

a:hover {
  filter: brightness(1.2);
}

/* Header & Navigation Styling */
header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-img {
  height: 70px;
  width: auto;
  object-fit: contain;
}

/* Navigation Hamburger Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 101;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-secondary);
  position: relative;
  transition: background 0.2s ease-in-out;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--text-secondary);
  transition: transform 0.2s ease-in-out, top 0.2s ease-in-out;
}

.hamburger::before {
  top: -6px;
}

.hamburger::after {
  top: 6px;
}

/* Toggle Active State Animations */
.nav-toggle.active .hamburger {
  background: transparent;
}

.nav-toggle.active .hamburger::before {
  transform: rotate(45deg);
  top: 0;
}

.nav-toggle.active .hamburger::after {
  transform: rotate(-45deg);
  top: 0;
}

.logo-text {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-smooth);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: hsl(210, 20%, 94%);
  box-shadow: inset 0 0 0 1px var(--border-color);
}

/* Footer Styling */
footer {
  background-color: hsl(210, 20%, 95%);
  border-top: 1px solid var(--border-color);
  padding: 3rem 2rem 1.5rem 2rem;
  margin-top: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-about h3, .footer-links h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  position: relative;
}

.footer-about p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--text-primary);
  padding-left: 4px;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid hsla(220, 20%, 20%, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Main Layout container */
main {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  flex: 1;
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 3rem 1.5rem;
  background: radial-gradient(circle at center, hsla(222, 100%, 60%, 0.1) 0%, transparent 60%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  margin-bottom: 3rem;
  backdrop-filter: var(--glass-blur);
}

.hero-section h1 {
  font-size: 3rem;
  letter-spacing: -1px;
  margin-bottom: 1rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-section p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 2rem auto;
}

/* Interactive Search Portal */
.search-container {
  display: flex;
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 0.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  max-width: 800px;
  margin: 0 auto;
  gap: 0.5rem;
}

.search-box {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: transparent;
  border: none;
  padding: 0.8rem 1rem 0.8rem 2.5rem;
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
  font-family: inherit;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.filter-select {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.8rem 1.5rem 0.8rem 1rem;
  border-radius: var(--radius-sm);
  outline: none;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='hsl(220, 15%, 38%)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
}

.search-btn {
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  padding: 0.8rem 1.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px hsla(215, 90%, 35%, 0.25);
}

/* Category Grid & Cards */
.section-title {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary-gradient);
  opacity: 0;
  transition: var(--transition-smooth);
}

.card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-glow);
}

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

.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.card-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.card-stat {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 1rem;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid hsla(220, 20%, 20%, 0.4);
  padding-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-primary {
  background: hsla(215, 90%, 35%, 0.1);
  color: hsl(215, 90%, 35%);
}

.badge-accent {
  background: hsla(212, 45%, 48%, 0.1);
  color: hsl(212, 45%, 48%);
}

.badge-warning {
  background: hsla(36, 95%, 45%, 0.1);
  color: hsl(36, 95%, 45%);
}

/* Timelines (for Companies / Startups) */
.timeline {
  position: relative;
  padding-left: 2rem;
  margin: 1.5rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -29px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg-main);
  box-shadow: 0 0 8px var(--primary);
}

.timeline-year {
  font-weight: 800;
  color: var(--primary);
  font-size: 1rem;
}

.timeline-content {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Detail view styling */
.detail-view {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  backdrop-filter: var(--glass-blur);
}

.detail-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
}

.detail-header h2 {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
}

.meta-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.meta-info-item {
  background: hsl(210, 20%, 96%);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.meta-info-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.meta-info-value {
  font-weight: 600;
  font-size: 1.05rem;
}

/* Tables styling */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
}

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

th, td {
  padding: 1rem;
}

th {
  background: hsl(210, 20%, 95%);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}

tr:not(:last-child) {
  border-bottom: 1px solid var(--border-color);
}

tr:hover {
  background: hsla(220, 20%, 15%, 0.3);
}

/* Dynamic Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.form-input {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  outline: none;
  font-family: inherit;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.4s ease forwards;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  /* Header & Navigation */
  .header-container {
    padding: 0.75rem 1.25rem;
  }

  .logo-img {
    height: 45px; /* Fits mobile screens beautifully */
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: hsl(210, 20%, 96%);
    border-radius: 50%;
    border: 1px solid var(--border-color);
  }

  #nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 2px solid var(--primary);
    box-shadow: var(--shadow-lg);
    padding: 1rem 1.25rem;
    z-index: 999;
    animation: fadeInSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  #nav-menu.active {
    display: block;
  }

  .nav-links {
    flex-direction: column;
    width: 100%;
    gap: 0.25rem;
  }

  .nav-links a {
    display: block;
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
  }
  
  .nav-links a:hover,
  .nav-links a.active {
    background: hsl(210, 20%, 95%);
    border-color: var(--border-color);
  }

  /* Hero Section */
  .hero-section {
    padding: 2rem 1rem;
    margin-bottom: 2rem;
  }

  .hero-section h1 {
    font-size: 2rem;
    line-height: 1.2;
  }

  .hero-section p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }

  /* Search & Filter Inputs */
  .search-container {
    flex-direction: column;
    padding: 0.75rem;
    gap: 0.5rem;
    box-shadow: var(--shadow-sm);
  }

  .search-input {
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
  }

  .filter-select {
    width: 100%;
    border-radius: var(--radius-sm);
  }

  .search-btn {
    width: 100%;
    padding: 0.9rem;
    font-size: 1rem;
  }

  /* Main Layout & Grids */
  main {
    padding: 1.5rem 1rem;
  }

  .grid-layout {
    grid-template-columns: 1fr !important; /* Stack all cards cleanly */
    gap: 1.25rem;
    margin-bottom: 2rem;
  }

  .card {
    padding: 1.25rem;
  }

  /* Detail Pages */
  .detail-view {
    padding: 1.25rem;
    border-radius: var(--radius-md);
  }

  .detail-header h1 {
    font-size: 1.6rem !important;
    line-height: 1.3;
  }

  .meta-info-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }

  .meta-info-item {
    padding: 0.75rem;
  }

  .meta-info-value {
    font-size: 1.15rem !important;
  }

  /* Split grids stack vertically on mobile */
  .detail-view .grid-layout {
    grid-template-columns: 1fr !important;
  }

  /* Responsive Tables styling */
  .table-wrapper {
    margin-bottom: 1.5rem;
    border: none;
  }

  .responsive-table, 
  .responsive-table thead, 
  .responsive-table tbody, 
  .responsive-table th, 
  .responsive-table td, 
  .responsive-table tr {
    display: block;
    width: 100%;
  }

  .responsive-table thead {
    display: none; /* Hide standard headers on mobile */
  }

  .responsive-table tr {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
  }

  .responsive-table td {
    border: none !important;
    padding: 0.5rem 0 !important;
    text-align: right;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
  }

  .responsive-table td:not(:last-child) {
    border-bottom: 1px solid #f1f5f9 !important;
  }

  .responsive-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--text-secondary);
    text-align: left;
    margin-right: 1rem;
  }
}

@keyframes fadeInSlide {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
