/* ================================
   VHC TALENT ADVISORY - MASTER CSS
   Mobile-First Responsive Design
   ================================ */

/* ========== RESET & BASE ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: #111827;
}

a {
  text-decoration: none;
  transition: all 0.3s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========== VIEW SWITCH ========== */
.view-switch-container {
  background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
  padding: 12px 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.view-switch {
  display: flex;
  background: rgba(255,255,255,0.1);
  border-radius: 30px;
  padding: 4px;
}

.view-switch button {
  padding: 10px 24px;
  border: none;
  border-radius: 26px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.view-switch button.active {
  background: #9acd32;
  color: #111827;
}

.view-switch button:not(.active) {
  background: transparent;
  color: white;
}

.view-switch button:not(.active):hover {
  background: rgba(255,255,255,0.15);
}

/* ========== HEADER & NAVIGATION ========== */
.header {
  padding: 16px 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo-link {
  text-decoration: none;
  margin-left: 16px;
  flex-shrink: 0;
}

.logo-img {
  height: 56px;
  width: auto;
}

.nav {
  display: flex;
  gap: 24px;
  align-items: center;
  font-weight: 600;
}

.nav a {
  color: #111827;
  text-decoration: none;
  white-space: nowrap;
}

.nav a:hover {
  color: #9acd32;
}

.nav-active {
  color: #9acd32 !important;
}

/* Login Dropdown */
.login-dropdown {
  position: relative;
}

.login-btn {
  background: #111827;
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14px;
  white-space: nowrap;
}

.login-btn:hover {
  background: #1f2937;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  min-width: 200px;
  margin-top: 8px;
  overflow: hidden;
  z-index: 200;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 14px 20px;
  color: #111827;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid #f0f0f0;
}

.dropdown-menu a:last-child {
  border-bottom: none;
}

.dropdown-menu a:hover {
  background: #f0fdf4;
  color: #9acd32;
}

.dropdown-menu .role-icon {
  margin-right: 10px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #111827;
  padding: 4px 8px;
  line-height: 1;
  z-index: 1001;
}

/* ========== BUTTONS ========== */
.btn-primary {
  background: #9acd32;
  color: #111827;
  padding: 8px 20px;
  border-radius: 6px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
}

.btn-primary:hover {
  background: #8bbd2a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(154,205,50,0.3);
}

.btn-secondary {
  border: 2px solid #ffffff;
  color: #ffffff;
  padding: 12px 30px;
  border-radius: 8px;
  font-weight: 600;
  display: inline-block;
  text-decoration: none;
}

.btn-secondary:hover {
  background: white;
  color: #111827;
}

.btn-large {
  padding: 16px 40px;
  font-size: 18px;
}

/* ========== HERO SECTIONS ========== */
.hero {
  background-size: cover;
  background-position: center;
  padding: 100px 24px;
  text-align: center;
  color: white;
  position: relative;
}

.hero h1 {
  font-size: 56px;
  font-weight: 800;
  margin-bottom: 16px;
  animation: fadeInUp 0.8s ease;
}

.hero p {
  font-size: 20px;
  max-width: 800px;
  margin: 0 auto 32px;
  animation: fadeInUp 1s ease;
}

/* ========== SECTIONS ========== */
.section {
  padding: 80px 24px;
}

.section-gray {
  background: #f9fafb;
}

.section-dark {
  background: #111827;
  color: white;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
}

.container-medium {
  max-width: 1100px;
  margin: 0 auto;
}

.container-small {
  max-width: 900px;
  margin: 0 auto;
}

/* ========== GRID LAYOUTS ========== */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* ========== CARDS ========== */
.card {
  background: white;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.card-border {
  border: 2px solid #e5e7eb;
}

/* ========== TYPOGRAPHY ========== */
h1 {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.2;
}

h2 {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 24px;
  color: #111827;
}

h3 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 16px;
  color: #111827;
}

h4 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
}

p {
  font-size: 18px;
  line-height: 1.8;
  color: #4b5563;
}

/* ========== FOOTER ========== */
.footer {
  background: #111827;
  color: white;
  padding: 60px 24px 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px;
  margin-bottom: 48px;
}

.footer a {
  color: #9ca3af;
}

.footer a:hover {
  color: #9acd32;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 24px;
  text-align: center;
  color: #9ca3af;
}

/* ========== FORMS ========== */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #111827;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: #9acd32;
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeInUp 0.8s ease;
}

/* ========== SCROLL ANIMATIONS ========== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger children - each child gets a progressive delay */
.stagger-children > .reveal:nth-child(1) { transition-delay: 0s; }
.stagger-children > .reveal:nth-child(2) { transition-delay: 0.1s; }
.stagger-children > .reveal:nth-child(3) { transition-delay: 0.2s; }
.stagger-children > .reveal:nth-child(4) { transition-delay: 0.3s; }
.stagger-children > .reveal:nth-child(5) { transition-delay: 0.4s; }
.stagger-children > .reveal:nth-child(6) { transition-delay: 0.5s; }

/* ========== MICRO-INTERACTIONS ========== */
/* Card hover lift */
[style*="border-radius"][style*="box-shadow"],
[style*="border-left: 4px"],
[style*="border-radius:16px"],
[style*="border-radius: 16px"] {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

[style*="border-radius"][style*="box-shadow"]:hover,
[style*="border-left: 4px"]:hover,
[style*="border-radius:16px"]:hover,
[style*="border-radius: 16px"]:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 16px 40px rgba(0,0,0,0.12) !important;
}

/* Button hover micro-interactions */
.btn-primary,
[style*="background:#9acd32"],
[style*="background: #9acd32"] {
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease !important;
}

.btn-primary:hover,
[style*="background:#9acd32"]:hover,
[style*="background: #9acd32"]:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(154, 205, 50, 0.35) !important;
}

/* Link underline animation */
.nav a::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: #9acd32;
  transition: width 0.3s ease;
}

.nav a:hover::after,
.nav a.nav-active::after {
  width: 100%;
}

/* Image hover zoom */
[style*="border-radius"] img,
.card img {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

[style*="border-radius"]:hover img,
.card:hover img {
  transform: scale(1.04) !important;
}

/* ========== BACK TO TOP BUTTON ========== */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #111827;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
  z-index: 900;
  pointer-events: none;
}

.back-to-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: #9acd32;
  color: #111827;
  transform: translateY(-3px);
}

/* ========== HERO ENTRANCE ========== */
.hero h1,
[style*="font-size:56px"],
[style*="font-size:52px"],
[style*="font-size:48px"] {
  animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero p,
.hero + * p:first-of-type {
  animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

/* Section heading entrance */
section h2,
[style*="text-align:center"] h2 {
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* ========== SMOOTH SCROLL BEHAVIOR ========== */
html {
  scroll-behavior: smooth;
}

/* ========== UTILITIES ========== */
.text-center {
  text-align: center;
}

.mb-16 {
  margin-bottom: 16px;
}

.mb-24 {
  margin-bottom: 24px;
}

.mb-40 {
  margin-bottom: 40px;
}

.mb-60 {
  margin-bottom: 60px;
}

/* ========== RESPONSIVE - TABLETS (768px and below) ========== */
@media (max-width: 768px) {
  /* Disable nav link underline animation on mobile */
  .nav a::after {
    display: none;
  }

  /* Back to top button */
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    font-size: 18px;
  }

  .header {
    padding: 12px 16px;
  }

  .logo-img {
    height: 40px;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    background: white;
    width: 75%;
    max-width: 320px;
    height: 100vh;
    flex-direction: column;
    padding: 80px 24px 40px;
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    transition: right 0.3s ease;
    gap: 0;
    align-items: stretch;
    z-index: 1000;
    overflow-y: auto;
  }

  .nav.active {
    right: 0;
  }

  .nav a {
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 16px;
  }

  .nav .login-dropdown {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid #e5e7eb;
  }

  .nav .login-btn {
    width: 100%;
    justify-content: center;
  }

  .nav .dropdown-menu {
    position: static;
    box-shadow: none;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-top: 8px;
  }

  /* Mobile overlay when menu is open */
  .mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
  }

  .mobile-overlay.active {
    display: block;
  }

  /* View Switch */
  .view-switch-container {
    padding: 8px 16px;
  }

  .view-switch button {
    padding: 8px 16px;
    font-size: 13px;
  }

  /* Hero */
  .hero {
    padding: 60px 16px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero p {
    font-size: 16px;
  }

  /* Typography */
  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 28px;
  }

  h3 {
    font-size: 22px;
  }

  h4 {
    font-size: 18px;
  }

  p {
    font-size: 16px;
  }

  /* Grids */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  /* Sections */
  .section {
    padding: 48px 16px;
  }

  /* Cards */
  .card {
    padding: 24px;
  }

  /* Inline grid overrides for pages with inline styles */
  [style*="grid-template-columns: repeat(2"],
  [style*="grid-template-columns:repeat(2"],
  [style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns:repeat(3"],
  [style*="grid-template-columns: repeat(4"],
  [style*="grid-template-columns:repeat(4"],
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  [style*="grid-template-columns: 2fr 1fr 1fr 1fr"],
  [style*="grid-template-columns:2fr 1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  /* Inline flex row overrides */
  [style*="display:flex"][style*="gap:60px"],
  [style*="display: flex"][style*="gap: 60px"],
  [style*="display:flex"][style*="gap:40px"],
  [style*="display: flex"][style*="gap: 40px"] {
    flex-direction: column !important;
    gap: 24px !important;
  }

  /* Inline hero overrides */
  [style*="font-size:56px"],
  [style*="font-size: 56px"],
  [style*="font-size:52px"],
  [style*="font-size: 52px"],
  [style*="font-size:48px"],
  [style*="font-size: 48px"] {
    font-size: 32px !important;
  }

  /* Inline section padding overrides */
  [style*="padding:120px"],
  [style*="padding: 120px"],
  [style*="padding:100px"],
  [style*="padding: 100px"] {
    padding: 60px 16px !important;
  }

  /* Inline h2 size overrides */
  section h2[style*="font-size:42px"],
  section h2[style*="font-size: 42px"],
  section h2[style*="font-size:36px"],
  section h2[style*="font-size: 36px"] {
    font-size: 28px !important;
  }
}

/* ========== RESPONSIVE - MOBILE (480px and below) ========== */
@media (max-width: 480px) {
  .hero {
    padding: 48px 16px;
  }

  .hero h1 {
    font-size: 26px;
  }

  .hero p {
    font-size: 14px;
  }

  h1 {
    font-size: 26px;
  }

  h2 {
    font-size: 24px;
  }

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

  .btn-primary,
  .btn-secondary {
    padding: 10px 20px;
    font-size: 14px;
  }

  .view-switch button {
    padding: 6px 12px;
    font-size: 12px;
  }

  /* More aggressive inline overrides for small screens */
  [style*="font-size:56px"],
  [style*="font-size: 56px"],
  [style*="font-size:52px"],
  [style*="font-size: 52px"],
  [style*="font-size:48px"],
  [style*="font-size: 48px"] {
    font-size: 26px !important;
  }

  section h2[style*="font-size:42px"],
  section h2[style*="font-size: 42px"],
  section h2[style*="font-size:36px"],
  section h2[style*="font-size: 36px"] {
    font-size: 24px !important;
  }

  [style*="font-size:28px"],
  [style*="font-size: 28px"] {
    font-size: 20px !important;
  }

  section[style*="padding:80px"],
  section[style*="padding: 80px"] {
    padding: 40px 16px !important;
  }
}

/* ========== LARGE SCREENS ========== */
@media (min-width: 1400px) {
  .container {
    max-width: 1400px;
  }
}
