/* =========================================
   1. GLOBAL VARIABLES & RESET
   ========================================= */
:root {
  --primary: #2563eb; /* Blue */
  --primary-dark: #1e40af; /* Dark Blue */
  --secondary: #64748b; /* Slate Grey */
  --accent: #f59e0b; /* Amber/Gold */
  --bg-light: #f8fafc; /* Light Background */
  --text-dark: #0f172a; /* Dark Text */
  --text-gray: #475569; /* Gray Text */
  --white: #ffffff;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

body {
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}

ul {
  list-style: none;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.hidden {
  display: none !important;
}

/* =========================================
   2. HEADER & NAVBAR
   ========================================= */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0.8rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  font-weight: 800;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dark);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--secondary);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.hamburger {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-dark);
}

/* =========================================
   3. MODERN HERO SECTION (Homepage)
   ========================================= */
.hero-modern {
  position: relative;
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
  padding: 4rem 0 5rem;
  text-align: center;
  overflow: hidden;
}

.hero-background-shape {
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(37, 99, 235, 0.05) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  z-index: 0;
}

.hero-container {
  position: relative;
  z-index: 1;
}

/* Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #dbeafe;
  color: #1e40af;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 0 rgba(37, 99, 235, 0.4);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

/* Typography */
.hero-title {
  font-size: 3rem;
  line-height: 1.1;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -1px;
  color: var(--text-dark);
}

.text-gradient {
  background: linear-gradient(to right, #2563eb, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-gray);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

/* Floating Search Bar */
.search-wrapper-modern {
  max-width: 600px;
  margin: 0 auto;
}

.search-bar {
  background: var(--white);
  padding: 8px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
  transition: transform 0.2s;
}

.search-bar:focus-within {
  transform: translateY(-2px);
  border-color: #93c5fd;
}

.search-icon {
  color: #94a3b8;
  margin-left: 15px;
}

.search-bar input {
  border: none;
  outline: none;
  flex: 1;
  padding: 12px;
  font-size: 1rem;
  color: var(--text-dark);
}

.btn-search {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
}

.btn-search:hover {
  background: var(--primary-dark);
}

.search-tags {
  margin-top: 15px;
  font-size: 0.9rem;
  color: var(--text-gray);
}

.search-tags button {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  text-decoration: underline;
  margin-left: 5px;
  font-weight: 500;
}

/* =========================================
   4. WIZARD & SEGMENT SECTION
   ========================================= */
.segment-section {
  margin-top: -30px;
  position: relative;
  z-index: 2;
  padding-bottom: 4rem;
}

.segment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.segment-card {
  background: var(--white);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 15px;
  cursor: pointer;
  transition: 0.3s;
}

.segment-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
}

.segment-card.active {
  border-color: var(--primary);
  background-color: #eff6ff;
  transform: translateY(-3px);
}

.card-icon-bg {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: white;
  flex-shrink: 0;
}

.card-icon-bg.blue {
  background: #3b82f6;
}
.card-icon-bg.green {
  background: #10b981;
}
.card-icon-bg.orange {
  background: #f59e0b;
}

.card-text h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.card-text p {
  font-size: 0.85rem;
  color: var(--text-gray);
}

/* Inline Wizard */
.wizard-container {
  margin-top: 20px;
  position: relative;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wizard-arrow {
  position: absolute;
  top: -8px;
  left: 50%; /* JS will update this */
  width: 16px;
  height: 16px;
  background: white;
  transform: rotate(45deg) translateX(-50%);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  z-index: 10;
}

.wizard-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
  box-shadow: var(--shadow);
}

.wizard-options-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 25px 0;
}

.wizard-btn {
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-light);
  cursor: pointer;
  font-weight: 500;
  transition: 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wizard-btn:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.wizard-btn.selected {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

/* =========================================
   5. JOB LIST SECTION
   ========================================= */
.jobs-section {
  padding: 4rem 0;
  background: var(--white);
  border-top: 1px solid var(--border);
}

.section-header {
  text-align: center;
  margin-bottom: 30px;
}

.filter-scroll-container {
  overflow-x: auto;
  padding-bottom: 10px;
  text-align: center;
  white-space: nowrap;
}

.filter-buttons {
  display: inline-flex;
  gap: 10px;
}

.btn-filter {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: white;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-gray);
  transition: 0.2s;
}

.btn-filter:hover,
.btn-filter.active {
  background: var(--text-dark);
  color: white;
  border-color: var(--text-dark);
}

.job-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.job-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: 0.3s;
  cursor: pointer;
  position: relative;
  overflow: visible;
}

.job-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: #cbd5e1;
}

.match-badge {
  position: absolute;
  top: -10px;
  right: -10px;
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 10;
  animation: popIn 0.3s ease-out;
}

@keyframes popIn {
  0% {
    transform: scale(0);
  }
  80% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.card-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.category-text {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--secondary);
  font-weight: 600;
}

.job-card h3 {
  font-size: 1.2rem;
  margin: 5px 0 10px;
  color: var(--text-dark);
}

.tags-wrapper {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.tag {
  font-size: 0.75rem;
  background: #f1f5f9;
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--text-gray);
}

.salary-preview {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.no-result-box {
  text-align: center;
  padding: 40px;
  color: var(--secondary);
}

/* =========================================
   6. MODAL & INTERACTIVE ELEMENTS
   ========================================= */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(2px);
}

.modal-window {
  background: white;
  width: 90%;
  max-width: 650px;
  border-radius: 16px;
  padding: 30px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #94a3b8;
  line-height: 1;
}

.modal-header {
  text-align: center;
  margin-bottom: 20px;
}

.badge-category {
  background: #dbeafe;
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.modal-header h2 {
  margin: 15px 0 10px;
  font-size: 1.8rem;
  color: var(--text-dark);
}

.modal-salary {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

/* --- DEEP DIVE BUTTON (Action Bar) --- */
.action-bar {
  margin-top: 20px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.btn-deep-dive {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  color: white;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
  transition: all 0.3s ease;
  border: 2px solid white;
  outline: 2px solid #2563eb;
}

.btn-deep-dive:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.5);
  background: linear-gradient(135deg, #1e40af 0%, #172554 100%);
}

.btn-deep-dive i {
  animation: bounceRight 1.5s infinite;
}

@keyframes bounceRight {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(5px);
  }
}

/* Tabs */
.modal-tabs {
  display: flex;
  border-bottom: 2px solid #f1f5f9;
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  padding: 15px;
  background: none;
  border: none;
  font-weight: 600;
  color: var(--secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: 0.3s;
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-pane {
  display: none;
}
.tab-pane.active {
  display: block;
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.info-block {
  background: #f8fafc;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 15px;
}

.info-block h4 {
  margin-bottom: 10px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dark);
}

.info-block.warning {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #ffedd5;
}

/* Roadmap Timeline */
.timeline {
  border-left: 2px solid #e2e8f0;
  margin-left: 10px;
  padding-left: 25px;
  margin-top: 10px;
}

.timeline-item {
  position: relative;
  margin-bottom: 25px;
}

.timeline-marker {
  position: absolute;
  left: -34px;
  top: 2px;
  width: 18px;
  height: 18px;
  background: var(--primary);
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 0 0 1px #e2e8f0;
  color: transparent;
}

.timeline-content h5 {
  font-size: 0.9rem;
  color: var(--secondary);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.timeline-content p {
  font-weight: 600;
  color: var(--text-dark);
}

/* University Suggestions */
.uni-suggestion-box {
  margin-top: 30px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  padding: 20px;
}

.uni-suggestion-box h4 {
  color: #0369a1;
  margin-bottom: 15px;
  font-size: 1rem;
}

.uni-group {
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.uni-group strong {
  display: block;
  color: #334155;
  margin-bottom: 2px;
}

.disclaimer {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 10px;
  font-style: italic;
}

/* =========================================
   7. FOOTER
   ========================================= */
.site-footer {
  background: #1e293b;
  color: #cbd5e1;
  padding: 60px 0 20px;
  margin-top: 60px;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
}

.footer-col h3 {
  color: white;
  margin-bottom: 15px;
  font-size: 1.4rem;
}

.footer-col h4 {
  color: white;
  margin-bottom: 15px;
  font-size: 1.1rem;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col a:hover {
  color: var(--primary);
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  margin-top: 50px;
  padding-top: 20px;
  border-top: 1px solid #334155;
  font-size: 0.9rem;
}

/* =========================================
   8. ARTICLE PAGES (e.g. peguam.html)
   ========================================= */
.article-hero {
  background: var(--text-dark);
  color: white;
  padding: 60px 0;
}

.hero-layout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
}

.hero-text {
  flex: 2;
  min-width: 300px;
}

.hero-text h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin: 15px 0;
}

.category-tag {
  background: var(--primary);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.hero-stats {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  padding: 25px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px 0;
}
.stat-row:last-child {
  border: none;
}

.stat-row .value {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fbbf24;
}

.article-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  gap: 40px;
  padding: 40px 20px;
}

.sidebar {
  width: 250px;
  position: sticky;
  top: 100px;
  height: fit-content;
}

.toc {
  background: #f8fafc;
  padding: 20px;
  border-radius: 10px;
  border-left: 4px solid var(--primary);
}

.content {
  flex: 1;
  font-family: "Merriweather", serif;
  line-height: 1.8;
  color: #334155;
}

.content h2 {
  font-family: "Inter", sans-serif;
  font-size: 1.8rem;
  color: var(--text-dark);
  margin-top: 40px;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 10px;
}

.salary-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
}

.salary-table th {
  background: var(--primary);
  color: white;
  padding: 12px;
  text-align: left;
}

.salary-table td {
  border-bottom: 1px solid #e2e8f0;
  padding: 12px;
}

/* =========================================
   9. RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  .nav-links {
    display: none;
  }
  .hamburger {
    display: block;
  }

  .segment-section {
    margin-top: 0;
  }

  .search-bar {
    flex-direction: column;
    padding: 15px;
    border-radius: 20px;
    gap: 10px;
  }
  .search-bar input {
    width: 100%;
    text-align: center;
  }
  .btn-search {
    width: 100%;
  }
  .search-icon {
    display: none;
  }

  .article-container {
    flex-direction: column;
  }
  .sidebar {
    display: none;
  }

  .wizard-options-grid {
    grid-template-columns: 1fr 1fr;
  }
}
