/* Colour palette inspired by the Experience4Grads logo */
:root {
  --primary-blue: #2f6fb7;
  --secondary-orange: #f48a5b;
  --accent-teal: #4ab099;
  --light-gray: #f8fbff;
  --dark-gray: #1f3453;
  --white: #ffffff;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Arial', sans-serif;
  color: var(--dark-gray);
  background-color: var(--light-gray);
  scroll-behavior: smooth;
}

/* Navbar */
.navbar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.65rem 2rem;
  min-height: 72px;
  background: linear-gradient(120deg, rgba(47, 111, 183, 0.95), rgba(244, 138, 91, 0.9));
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 8px 20px rgba(47, 111, 183, 0.18);
}
.logo-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.nav-logo {
  height: 64px;
  width: 64px;
  object-fit: contain;
}
  .nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.75rem;
    margin: 0 auto;
    padding: 0;
    pointer-events: auto;
  }
.nav-auth {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--white);
  font-size: 0.95rem;
}
.nav-auth-link {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
}
.nav-auth-link:hover {
  text-decoration: underline;
}
.nav-auth-divider {
  opacity: 0.7;
}
.nav-auth-status {
  font-weight: 600;
}
.nav-auth-logout {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  color: var(--white);
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease;
}
.nav-auth-logout:hover {
  background: rgba(255, 255, 255, 0.35);
}
.nav-links li {
  list-style: none;
}
.nav-links li a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: opacity 0.3s ease;
}
.nav-links li a:hover {
  opacity: 0.8;
}
.nav-links li a.is-active,
.nav-links li a[aria-current="page"] {
  opacity: 1;
  position: relative;
}
.nav-links li a.is-active::after,
.nav-links li a[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
}
.nav-links .nav-cta a {
  display: inline-flex;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(47, 111, 183, 0.95), rgba(244, 138, 91, 0.92));
  color: var(--white);
}
.nav-account {
  position: relative;
  margin-left: auto;
}
.account-btn {
  background: var(--secondary-orange);
  border: none;
  color: var(--white);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: transform 0.2s ease;
}
.account-btn:hover {
  transform: translateY(-2px);
}
.nav-account-menu {
  position: absolute;
  top: 110%;
  right: 0;
  background-color: var(--white);
  color: var(--dark-gray);
  border: 1px solid rgba(47, 111, 183, 0.12);
  border-radius: 12px;
  min-width: 220px;
  padding: 0.6rem 0;
  box-shadow: 0 14px 28px rgba(28, 52, 88, 0.16);
  display: none;
  z-index: 200;
}
.nav-account-menu a,
.nav-account-menu button.menu-btn {
  display: block;
  width: 100%;
  padding: 0.6rem 0.9rem;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  font-size: 0.92rem;
  text-decoration: none;
  color: inherit;
}
.nav-account-menu a:hover,
.nav-account-menu button.menu-btn:hover {
  background-color: rgba(47, 111, 183, 0.08);
}
.nav-toggle {
  display: none;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  padding: 0.55rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  transition: background 0.3s ease;
}
.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.3);
}
.nav-toggle-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-toggle-inner span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--white);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
body.nav-open .nav-toggle-inner span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
body.nav-open .nav-toggle-inner span:nth-child(2) {
  opacity: 0;
}
body.nav-open .nav-toggle-inner span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 29, 52, 0.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 200;
}
body.nav-open {
  overflow: hidden;
}
body.nav-open .nav-overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Hero section */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(70vh, 620px);
  padding: clamp(3rem, 6vw, 5rem) 2.5rem;
  background: linear-gradient(135deg, rgba(47, 111, 183, 0.94), rgba(47, 111, 183, 0.86) 55%, rgba(244, 138, 91, 0.56));
  color: var(--white);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 138, 91, 0.22), transparent 70%);
  top: -220px;
  right: -180px;
  pointer-events: none;
}
.hero-content {
  position: relative;
  max-width: 780px;
  text-align: left;
  z-index: 1;
}
.hero-content h1 {
  font-size: clamp(2.6rem, 4.6vw, 3.6rem);
  margin-bottom: 1rem;
  line-height: 1.2;
}
.hero-content p {
  font-size: 1.15rem;
  line-height: 1.6;
  margin: 0;
}
.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}
.hero-points {
  list-style: none;
  margin: 1.75rem 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}
.hero-points li {
  display: flex;
  gap: 0.75rem;
  font-size: 1.02rem;
  line-height: 1.4;
}
.hero-points span {
  font-size: 1.2rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.btn-primary {
  background-color: var(--secondary-orange);
  color: var(--white);
  box-shadow: 0 14px 28px rgba(244, 138, 91, 0.26);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(244, 138, 91, 0.3);
}
.btn-secondary {
  background-color: var(--accent-teal);
  color: var(--white);
  border: none;
  box-shadow: 0 14px 28px rgba(74, 176, 153, 0.22);
}
.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(74, 176, 153, 0.28);
}
.btn-ghost {
  background-color: rgba(255, 255, 255, 0.14);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.btn-ghost:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(47, 111, 183, 0.2);
}
.btn-outline {
  border: 2px solid var(--secondary-orange);
  background-color: transparent;
  color: var(--secondary-orange);
}
.btn-outline:hover {
  transform: translateY(-2px);
  background-color: var(--secondary-orange);
  color: var(--white);
  box-shadow: 0 16px 30px rgba(244, 138, 91, 0.22);
}

/* Sections */
section {
  padding: clamp(3rem, 6vw, 4.5rem) 2rem;
}
section h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--primary-blue);
  font-size: clamp(2rem, 3vw, 2.6rem);
}

/* Services */
.services-section {
  background-color: var(--light-gray);
}
.service-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}
.card {
  background-color: var(--white);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  max-width: 320px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.card h3 {
  margin-top: 0;
  color: var(--primary-blue);
}
.card p {
  flex-grow: 1;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* About */
.about-section p {
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Contact */
.contact-section p {
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}
.contact-section a {
  color: var(--secondary-orange);
  text-decoration: none;
  font-weight: 600;
}
.contact-section a:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  background-color: var(--primary-blue);
  color: var(--white);
  text-align: center;
  padding: 1rem 2rem;
}

/* Responsive design */
@media (max-width: 768px) {
  .service-cards {
    flex-direction: column;
    align-items: center;
  }
  .navbar {
    padding: 1rem 1.5rem;
  }
  .nav-links {
    gap: 1.1rem;
  }
  .hero {
    min-height: unset;
  }
  .hero-content {
    text-align: center;
  }
  .hero-points {
    justify-items: center;
  }
  .hero-points li {
    justify-content: center;
  }
  .hero-cta-row {
    justify-content: center;
  }
}

.options-section {
  background-color: var(--light-gray);
}
.option-cards {
  margin: 2rem auto 0;
  max-width: 1140px;
}
.option-card {
  position: relative;
  padding: 1.75rem;
  border-radius: 18px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.98), rgba(253, 248, 241, 0.92));
  color: var(--dark-gray);
  box-shadow: 0 16px 34px rgba(47, 111, 183, 0.14);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* Homepage CV pathway tiles */
#choose-path-grid {
  display: grid;
  gap: 1.35rem;
  /* Responsive 4x2 grid: auto-fit columns, min width 250px */
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Ensure exactly 4 columns on wider screens for a consistent first row */
@media (min-width: 1024px) {
  #choose-path-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Tablet: 2 columns */
@media (min-width: 641px) and (max-width: 1023px) {
  #choose-path-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile: 1 column */
@media (max-width: 640px) {
  #choose-path-grid { grid-template-columns: 1fr; }
}

#choose-path-grid .card {
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid rgba(15, 31, 60, 0.08);
  box-shadow: 0 12px 24px rgba(10, 36, 80, 0.08);
  padding: 1.3rem 1.4rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  text-align: center;
}

#choose-path-grid .card-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  color: rgba(28, 52, 88, 0.9);
}

#choose-path-grid .icon-circle {
  margin: 0 auto 0.6rem;
}

#choose-path-grid .card-footer {
  margin-top: auto;
  display: flex;
}

#choose-path-grid .card[data-requires-sub].is-locked .card-body {
  position: relative;
  overflow: hidden;
}

#choose-path-grid .card[data-requires-sub].is-locked .card-body::before {
  content: '🔒';
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  z-index: 2;
  font-size: 1.1rem;
}

#choose-path-grid .card[data-requires-sub].is-locked .card-body::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(8, 20, 48, 0.25), rgba(15, 34, 75, 0.4));
  border-radius: 16px;
  z-index: 1;
  pointer-events: none;
}

#choose-path-grid .card[data-requires-sub].is-locked .card-body > * {
  filter: blur(4px);
  opacity: 0.55;
}

#choose-path-grid .card-footer .btn {
  width: 100%;
  justify-content: center;
  background: #dceaff;
  color: #0f1f3c;
  border: 1px solid rgba(47, 111, 183, 0.45);
  border-radius: 16px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

#choose-path-grid .card-footer .btn:hover {
  transform: translateY(-1px);
  background: #f48a5b;
  color: #ffffff;
}

#choose-path-grid .card-footer .btn[disabled] {
  background: #edf4ff;
  color: rgba(15, 31, 60, 0.55);
  border-color: rgba(47, 111, 183, 0.28);
  cursor: not-allowed;
  transform: none;
}

#choose-path-grid .card-footer .btn[disabled]:hover {
  background: #edf4ff;
  color: rgba(15, 31, 60, 0.55);
}

/* --------------------------------------------------------------
   Homepage animated backdrop (body.has-animated-bg)
   - Adjust animation duration or colour stops below as needed.
   - Keeps motion subtle and behind all content layers.
--------------------------------------------------------------- */
body.has-animated-bg::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(125deg, rgba(13, 71, 161, 0.85), rgba(25, 118, 210, 0.65), rgba(100, 181, 246, 0.75));
  background-size: 220% 220%;
  animation: e4gHomeBackDrop 40s ease-in-out infinite;
  will-change: background-position;
  transform: translateZ(0);
}

/* Optional accent glow with a hint of orange; tweak opacity to taste */
body.has-animated-bg::after {
  content: '';
  position: fixed;
  inset: -10%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle at 70% 30%, rgba(255, 140, 0, 0.12), transparent 60%),
              radial-gradient(circle at 20% 80%, rgba(100, 181, 246, 0.25), transparent 65%);
  animation: e4gHomeBackDrop 42s ease-in-out reverse infinite;
  background-size: 160% 160%, 180% 180%;
  will-change: transform;
  transform: translateZ(0);
}

@keyframes e4gHomeBackDrop {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Keep page content above the animated layers */
body.has-animated-bg > * {
  position: relative;
  z-index: 1;
}

/* Reduced motion: freeze the gradient for accessibility */
@media (prefers-reduced-motion: reduce) {
  body.has-animated-bg::before,
  body.has-animated-bg::after {
    animation: none;
    background-position: 50% 50%;
  }
}
.icon-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  background: linear-gradient(135deg, rgba(47, 111, 183, 0.14), rgba(244, 138, 91, 0.18));
  border: 1px solid rgba(47, 111, 183, 0.22);
}
.option-card h3 {
  margin: 0;
  font-size: 1.28rem;
  color: var(--primary-blue);
}
.option-card p {
  margin: 0;
  line-height: 1.5;
  color: rgba(28, 52, 88, 0.72);
}
.option-card .btn {
  align-self: flex-start;
  background: rgba(47, 111, 183, 0.12);
  color: var(--primary-blue);
  border: 1px solid rgba(47, 111, 183, 0.22);
}
.option-card .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(47, 111, 183, 0.2);
  background: var(--white);
  color: var(--secondary-orange);
}

@media (max-width: 640px) {
  .option-cards {
    grid-template-columns: 1fr;
  }
  .option-card {
    padding: 2rem;
  }
}

/* Mobile refinements (≤820px) */
@media (max-width: 820px) {
  .navbar {
    flex-wrap: wrap;
    padding: 0.6rem 1.25rem;
    gap: 0.65rem;
    min-height: 68px;
  }
  .nav-logo {
    height: 56px;
    width: 56px;
  }
  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
    order: 2;
    position: relative;
    top: 0;
    left: 0;
    transform: none;
  }
  .nav-links {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 1rem;
    right: 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(47, 111, 183, 0.97), rgba(244, 138, 91, 0.92));
    border-radius: 18px;
    box-shadow: 0 18px 36px rgba(10, 36, 80, 0.25);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-0.5rem);
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 300;
    pointer-events: none;
  }
  .nav-links li {
    width: 100%;
  }
  .nav-links li a {
    display: block;
    width: 100%;
    padding: 0.4rem 0;
    font-size: 1.02rem;
  }
  body.nav-open .nav-links {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .nav-account {
    order: 3;
    width: 100%;
    margin-left: 0;
    margin-top: 0.4rem;
    display: flex;
    justify-content: flex-end;
  }
  .nav-auth {
    order: 4;
    width: 100%;
    justify-content: flex-end;
  }
  .nav-account-menu {
    right: 1rem;
  }
  img {
    max-width: 100%;
    height: auto;
  }
  .hero {
    padding: 2.4rem 1.2rem 2rem;
    min-height: unset;
  }
  .hero-inner {
    margin-top: -1rem;
    gap: 1.2rem;
  }
  .hero-content {
    text-align: center;
  }
  .hero-content h1 {
    font-size: clamp(1.75rem, 7.2vw, 2.35rem);
    line-height: 1.2;
  }
  .hero-content p {
    font-size: 1rem;
    line-height: 1.5;
  }
  .hero-points {
    justify-items: center;
    gap: 0.4rem;
  }
  .hero-points li {
    font-size: 0.96rem;
    justify-content: center;
  }
  .path-panel {
    padding: 1.25rem;
    margin-top: 0;
  }
  .cards-grid,
  #choose-path-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .option-card,
  #choose-path-grid .card {
    padding: 1.2rem 1.1rem;
    text-align: left;
  }
  #choose-path-grid .card-footer {
    flex-direction: column;
  }
  .btn,
  #choose-path-grid .card-footer .btn,
  .site-cta .cta-actions a,
  .site-cta .cta-actions button,
  .quiz-cta .btn,
  .job-actions .btn,
  .job-actions button {
    width: 100%;
    justify-content: center;
  }
  .site-cta .cta-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  .career-quiz,
  .testimonials,
  .about-section,
  .contact-section {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }
  .career-quiz .quiz-cta {
    flex-direction: column;
    gap: 0.75rem;
  }
  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .testimonial-card {
    padding: 1.1rem;
  }
  .testimonial-header {
    align-items: flex-start;
  }
  footer {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
  }
}

.locked-content {
  position: relative;
  min-height: 300px;
}
.locked-content .real-content.blur {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
}
.locked-content--unlocked .real-content {
  filter: none;
  pointer-events: auto;
  user-select: auto;
}
.blur-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 20, 45, 0.85);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: 18px;
  z-index: 10;
}
.blur-overlay p {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}
.blur-overlay a {
  color: var(--white);
  font-weight: 700;
  text-decoration: underline;
}
