/* CareerPivoting.com – shared styles for /roles/ and /guides/ index pages */
* { box-sizing: border-box; }

:root {
  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --text-tertiary: #6b7280;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --border-color: #e2e8f0;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-tertiary: #9ca3af;
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --border-color: #4b5563;
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  margin: 0;
  background: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 16px;
}

/* Layout */
.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  padding-top: 96px;
  padding-bottom: 80px;
}

/* Main nav */
.main-nav {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

@media (prefers-color-scheme: dark) {
  .main-nav { background: rgba(17, 24, 39, 0.95); }
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item { position: relative; }

.nav-link {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-link:hover { color: var(--text-primary); }

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  list-style: none;
  margin: 0;
}

.dropdown-wide { min-width: 260px; }

.has-dropdown:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown li a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
}

.dropdown li a:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.dropdown-header {
  font-weight: 600;
  color: var(--text-primary) !important;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0.5rem;
  padding-bottom: 0.75rem !important;
}

.dropdown-category {
  padding: 0.75rem 1rem 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  list-style: none;
}

.nav-button {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff !important;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-button:hover { background: var(--accent-hover); }

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
}

@media (max-width: 900px) {
  .mobile-menu-toggle { display: flex; }

  .nav-menu {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: auto;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    background: var(--bg-primary);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 0;
    transform: translateX(-100%);
    transition: transform 0.3s;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-menu.active { transform: translateX(0); }

  .dropdown {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    max-height: 0;
    overflow: hidden;
  }

  .has-dropdown.active .dropdown {
    display: block;
    max-height: 600px;
  }

  .nav-item { border-bottom: 1px solid var(--border-color); }
  .nav-item:last-child { border-bottom: none; }
}

/* Breadcrumb */
.breadcrumb {
  padding: 1rem 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumb li { display: flex; align-items: center; }

.breadcrumb li:not(:last-child)::after {
  content: "›";
  margin-left: 0.5rem;
  color: var(--text-tertiary);
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.breadcrumb a:hover { text-decoration: underline; }

.breadcrumb li:last-child span { color: var(--text-secondary); }

/* Roles index */
.lead {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin: 0 0 2.5rem 0;
}

.role-category { margin: 3rem 0; }

.role-category h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

.category-intro {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.role-card {
  display: block;
  padding: 1.5rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.role-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.role-card h3 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
}

.role-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0 0 0.75rem 0;
}

.role-card .salary {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #059669;
  background: #d1fae5;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
}

@media (prefers-color-scheme: dark) {
  .role-card .salary { background: rgba(5, 150, 105, 0.2); color: #34d399; }
}

/* Guide list */
.guide-list { display: flex; flex-direction: column; gap: 2rem; }

.guide-card {
  padding: 2rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.guide-card h2 { font-size: 1.5rem; margin: 0 0 1rem 0; }

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

.guide-card h2 a:hover { color: var(--accent); }

.guide-card > p {
  color: var(--text-secondary);
  margin: 0 0 1rem 0;
}

.guide-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

@media (max-width: 768px) {
  .guide-meta { flex-direction: column; gap: 0.5rem; }
}

/* CTA section */
.cta-section {
  margin: 4rem 0 0;
  padding: 2rem;
  background: #1e293b;
  border-radius: 8px;
  text-align: center;
  color: #f8fafc;
}

.cta-section h2 { color: #f8fafc; margin: 0 0 0.5rem 0; }

.cta-section p {
  color: #94a3b8;
  margin: 0 0 1.5rem 0;
}

.cta-button {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
}

.cta-button:hover { background: var(--accent-hover); }

/* Mobile */
@media (max-width: 768px) {
  .role-grid { grid-template-columns: 1fr; }
  .page-container { padding-top: 88px; }
}

/* Site footer (shared across all pages) */
.site-footer {
  background: #1e293b;
  color: #94a3b8;
  padding: 3rem 1rem;
  margin-top: 4rem;
}

.site-footer .footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.site-footer .footer-main {
  text-align: center;
  margin-bottom: 2rem;
}

.site-footer .footer-main p {
  margin: 0;
  color: #94a3b8;
}

.site-footer .footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.site-footer .footer-col h4 {
  color: #f8fafc;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.site-footer .footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.site-footer .footer-col a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
}

.site-footer .footer-col a:hover {
  color: #f8fafc;
}

.site-footer .footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #334155;
  font-size: 0.85rem;
  color: #94a3b8;
}

.site-footer .footer-bottom p {
  margin: 0;
}

@media (max-width: 768px) {
  .site-footer .footer-links {
    grid-template-columns: 1fr;
    text-align: center;
  }
}
