/* ============================================================
   US Testing Center — Global Stylesheet
   ustestingcenter.com
   Palette: Royal Purple #4A0E78 · Gold #C9A227 · White
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --purple:       #4A0E78;
  --purple-dark:  #2D0A4E;
  --purple-light: #6B2FA0;
  --gold:         #C9A227;
  --gold-light:   #E2C97E;
  --gold-bg:      #FDF8EC;
  --white:        #FFFFFF;
  --text:         #1a1a2e;
  --text-light:   #666666;
  --bg:           #FFFFFF;
  --radius:       8px;
  --shadow:       0 2px 12px rgba(0,0,0,.08);
  --shadow-lg:    0 8px 32px rgba(0,0,0,.12);
  --transition:   .25s ease;
  --max-width:    1200px;
  --font:         -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Typography --- */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.1rem; }
p  { margin-bottom: 1rem; }

.section-title {
  text-align: center;
  margin-bottom: .5rem;
  color: var(--purple-dark);
}
.section-subtitle {
  text-align: center;
  color: var(--text-light);
  max-width: 640px;
  margin: 0 auto 2.5rem;
  font-size: 1.05rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-gold {
  background: var(--gold);
  color: var(--purple-dark);
}
.btn-gold:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(201,162,39,.35);
}
.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 2px solid var(--gold);
}
.btn-outline:hover {
  background: var(--gold);
  color: var(--purple-dark);
}
.btn-white {
  background: var(--white);
  color: var(--purple);
}
.btn-white:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}
.btn-sm { padding: 10px 22px; font-size: .9rem; }
.btn-lg { padding: 18px 40px; font-size: 1.1rem; }

/* ============================================================
   Credential Banner
   ============================================================ */
.credential-banner {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--purple-dark);
  text-align: center;
  padding: 10px 16px;
  font-size: .82rem;
  font-weight: 500;
  line-height: 1.5;
}
.credential-banner strong { font-weight: 700; }
.credential-banner .cb-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; }
.credential-banner .cb-sep { opacity: .5; }

/* ============================================================
   Header & Navigation
   ============================================================ */
.site-header {
  background: var(--purple);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  height: 64px;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: .3px;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo svg { width: 36px; height: 36px; }

/* Desktop Nav */
.main-nav { display: flex; align-items: center; gap: 0; }
.main-nav > li { position: relative; }
.main-nav > li > a {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 20px 16px;
  color: var(--white);
  font-size: .92rem;
  font-weight: 500;
  transition: color var(--transition);
  white-space: nowrap;
}
.main-nav > li > a:hover,
.main-nav > li:hover > a { color: var(--gold); }

.nav-arrow {
  width: 10px; height: 10px;
  transition: transform var(--transition);
}
.main-nav > li:hover .nav-arrow { transform: rotate(180deg); }

/* Mega-menu dropdown */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 240px;
  padding: 12px 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
  z-index: 900;
}
.main-nav > li:hover .mega-menu {
  opacity: 1;
  visibility: visible;
}
.mega-menu a {
  display: block;
  padding: 10px 24px;
  color: var(--text);
  font-size: .9rem;
  transition: background var(--transition), color var(--transition);
}
.mega-menu a:hover {
  background: var(--gold-bg);
  color: var(--purple);
}

/* Nav action buttons */
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-resume {
  background: var(--gold);
  color: var(--purple-dark);
  padding: 8px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .9rem;
  transition: all var(--transition);
}
.nav-resume:hover { background: var(--gold-light); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 1100;
}
.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  transition: all var(--transition);
}
.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ============================================================
   Hero Section
   ============================================================ */
.hero {
  background: linear-gradient(160deg, var(--purple-dark) 0%, var(--purple) 50%, var(--purple-light) 100%);
  color: var(--white);
  padding: 80px 20px 90px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 80%, rgba(201,162,39,.08) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(201,162,39,.06) 0%, transparent 50%);
}
.hero-content { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }
.hero h1 { margin-bottom: 20px; font-size: clamp(2.2rem, 5.5vw, 3.6rem); }
.hero .gold-text { color: var(--gold); }
.hero p {
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  opacity: .92;
  max-width: 640px;
  margin: 0 auto 32px;
  line-height: 1.7;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 48px;
  flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
}
.hero-stat-label {
  font-size: .85rem;
  opacity: .8;
  margin-top: 4px;
}

/* ============================================================
   Featured Tests Grid
   ============================================================ */
.section { padding: 80px 20px; }
.section-alt { background: #f9f7fc; }

.tests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 24px;
}

.test-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.test-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.test-card-icon {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
  color: var(--gold);
  padding: 28px 24px;
  font-size: 2.2rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.test-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.test-card-body h3 { margin-bottom: 8px; color: var(--purple-dark); }
.test-card-body p {
  color: var(--text-light);
  font-size: .92rem;
  flex: 1;
}
.test-card-footer {
  padding: 0 24px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.test-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--purple);
}

/* ============================================================
   Category Grid
   ============================================================ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 36px 20px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  text-align: center;
  transition: all var(--transition);
  text-decoration: none;
  border: 2px solid transparent;
}
.category-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.category-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--gold);
}
.category-card h3 { font-size: 1.05rem; color: var(--purple-dark); }
.category-card p { font-size: .85rem; color: var(--text-light); margin: 0; }

/* ============================================================
   How It Works
   ============================================================ */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 32px;
  counter-reset: step;
}
.step-card {
  text-align: center;
  padding: 24px;
  position: relative;
}
.step-number {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--purple);
  color: var(--gold);
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.step-card h3 { color: var(--purple-dark); margin-bottom: 10px; }
.step-card p { color: var(--text-light); font-size: .92rem; margin: 0; }

/* ============================================================
   Features List
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.feature-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}
.feature-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--gold-bg);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}
.feature-item h4 { color: var(--purple-dark); margin-bottom: 4px; }
.feature-item p { color: var(--text-light); font-size: .88rem; margin: 0; }

/* ============================================================
   Trust Section
   ============================================================ */
.trust-section {
  background: linear-gradient(160deg, var(--purple-dark) 0%, var(--purple) 100%);
  color: var(--white);
  padding: 80px 20px;
  text-align: center;
}
.trust-section .section-title { color: var(--gold); }
.trust-section .section-subtitle { color: rgba(255,255,255,.8); }

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 32px;
  margin-top: 40px;
}
.trust-item { text-align: center; }
.trust-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  color: var(--gold);
}
.trust-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold);
  display: block;
}
.trust-label {
  font-size: .9rem;
  opacity: .85;
  margin-top: 6px;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--purple-dark);
  color: var(--white);
  padding: 60px 20px 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 40px;
  max-width: var(--max-width);
  margin: 0 auto 48px;
}
.footer-col h4 {
  color: var(--gold);
  font-size: .95rem;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.footer-col a {
  display: block;
  padding: 4px 0;
  color: rgba(255,255,255,.75);
  font-size: .88rem;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--gold); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px;
  text-align: center;
  max-width: var(--max-width);
  margin: 0 auto;
}
.footer-bottom p {
  color: rgba(255,255,255,.55);
  font-size: .82rem;
}
.footer-bottom a { color: rgba(255,255,255,.55); }
.footer-bottom a:hover { color: var(--gold); }

/* ============================================================
   Responsive Breakpoints
   ============================================================ */

/* Mobile first: base styles are mobile */

@media (max-width: 640px) {
  .hero { padding: 60px 16px 70px; }
  .hero-stats { gap: 24px; }
  .hero-stat-number { font-size: 1.5rem; }
  .section { padding: 56px 16px; }
  .tests-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: 1fr; gap: 20px; }
  .features-grid { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

@media (max-width: 768px) {
  .main-nav { display: none; }
  .nav-actions .nav-all-tests { display: none; }
  .hamburger { display: flex; }

  /* Mobile menu */
  .main-nav.mobile-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--purple-dark);
    padding: 80px 24px 24px;
    z-index: 1050;
    overflow-y: auto;
    gap: 0;
  }
  .main-nav.mobile-open > li > a {
    padding: 16px 0;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .main-nav.mobile-open .mega-menu {
    position: static;
    transform: none;
    background: rgba(255,255,255,.05);
    box-shadow: none;
    border-radius: var(--radius);
    padding: 4px 0;
    display: none;
    opacity: 1;
    visibility: visible;
  }
  .main-nav.mobile-open .mega-menu.mobile-sub-open { display: block; }
  .main-nav.mobile-open .mega-menu a {
    color: rgba(255,255,255,.8);
    padding: 10px 20px;
  }
  .main-nav.mobile-open .mega-menu a:hover {
    background: rgba(255,255,255,.08);
    color: var(--gold);
  }
}

@media (min-width: 769px) {
  .hamburger { display: none !important; }
}

@media (min-width: 1024px) {
  .tests-grid { grid-template-columns: repeat(4, 1fr); }
  .category-grid { grid-template-columns: repeat(4, 1fr); }
  .steps-grid { grid-template-columns: repeat(4, 1fr); }
  .features-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1200px) {
  .container { padding: 0 32px; }
}

/* ============================================================
   Utility classes
   ============================================================ */
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-purple { color: var(--purple); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}
