/* ESGov - Custom Styles */

:root {
  --navy: #1B2A4A;
  --navy-light: #2C3E6B;
  --gold: #C9A84C;
  --gold-light: #E8D48B;
  --white: #FFFFFF;
  --gray-50: #F8F9FA;
  --gray-100: #F1F3F5;
  --gray-200: #E9ECEF;
  --gray-300: #DEE2E6;
  --gray-400: #CED4DA;
  --gray-500: #ADB5BD;
  --gray-600: #6C757D;
  --gray-700: #495057;
  --gray-800: #343A40;
  --gray-900: #212529;
  --success: #2B8A3E;
  --danger: #C92A2A;
  --warning: #E67700;
}

/* Base */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Noto Sans TC', system-ui, -apple-system, sans-serif;
  color: var(--gray-900);
  background: var(--gray-50);
}

/* Typography */
.gov-heading {
  color: var(--navy);
  font-weight: 700;
  line-height: 1.3;
}

.gov-subtitle {
  color: var(--gray-600);
  font-size: 1.1rem;
}

/* Gold accent */
.gov-gold {
  color: var(--gold);
}

.gov-gold-bg {
  background: var(--gold);
}

.gov-gold-border {
  border-color: var(--gold);
}

/* Navy accent */
.gov-navy {
  color: var(--navy);
}

.gov-navy-bg {
  background: var(--navy);
}

/* ─── Buttons ─────────────────────────────── */
.btn-gov {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.9rem 2.2rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  text-decoration: none;
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
}

/* 🔥 Purchase button — super prominent */
.btn-gov-buy {
  background: linear-gradient(135deg, #D4A843 0%, #F0D78C 50%, #C9A84C 100%);
  color: #1B2A4A;
  font-weight: 800;
  font-size: 1.15rem;
  padding: 1rem 2.4rem;
  box-shadow: 0 6px 24px rgba(201, 168, 76, 0.5);
  border: 2px solid rgba(255, 215, 100, 0.3);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
  transform: scale(1);
}

.btn-gov-buy:hover {
  background: linear-gradient(135deg, #E0BC60 0%, #F8E4A0 50%, #D4B254 100%);
  box-shadow: 0 8px 32px rgba(201, 168, 76, 0.65);
  transform: translateY(-3px) scale(1.02);
}

.btn-gov-buy:active {
  transform: translateY(-1px) scale(0.98);
}

/* 📖 Preview button — solid navy */
.btn-gov-preview {
  background: #1B2A4A;
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(27, 42, 74, 0.25);
}

.btn-gov-preview:hover {
  background: #2C3E6B;
  box-shadow: 0 6px 20px rgba(27, 42, 74, 0.35);
  transform: translateY(-2px);
}

/* Gold primary (general use) */
.btn-gov-primary {
  background: linear-gradient(135deg, var(--gold), #D4B254);
  color: var(--navy);
  box-shadow: 0 4px 14px rgba(201, 168, 76, 0.35);
}

.btn-gov-primary:hover {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.45);
}

/* Outline on navy bg */
.btn-gov-outline {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  border: 2.5px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
}

.btn-gov-outline:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
}

.btn-gov-dark {
  background: var(--navy);
  color: var(--white);
  border: 2px solid var(--navy);
}

.btn-gov-dark:hover {
  background: var(--navy-light);
  border-color: var(--navy-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(27, 42, 74, 0.35);
}

.btn-gov-success {
  background: linear-gradient(135deg, var(--success), #2F9E4A);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(43, 138, 62, 0.35);
}

.btn-gov-success:hover {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(43, 138, 62, 0.45);
}

/* Gumroad attention pulse */
.btn-gov-pulse {
  position: relative;
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 4px 14px rgba(201, 168, 76, 0.35); }
  50% { box-shadow: 0 4px 24px rgba(201, 168, 76, 0.6); }
}

/* Process Cards */
.process-card {
  background: var(--white);
  border-radius: 1rem;
  border: 1px solid var(--gray-200);
  transition: all 0.3s ease;
  overflow: hidden;
}

.process-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(27, 42, 74, 0.08);
  border-color: var(--gold);
}

/* Step Navigator */
.step-nav-item {
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.step-nav-item:hover {
  background: var(--gray-100);
}

.step-nav-item.active {
  background: var(--navy);
  color: var(--white);
}

.step-nav-item.locked {
  opacity: 0.7;
}

.step-nav-item.completed {
  border-left: 3px solid var(--success);
}

/* Lock overlay */
.lock-overlay {
  position: relative;
}

.lock-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(2px);
  border-radius: 0.75rem;
  z-index: 1;
}

.lock-content {
  position: relative;
  z-index: 2;
}

/* Document Cards */
.doc-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 0.75rem;
  padding: 1rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.doc-card:hover {
  border-color: var(--gold);
  box-shadow: 0 4px 12px rgba(27, 42, 74, 0.06);
  transform: translateY(-2px);
}

/* Progress bar */
.progress-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--gray-200);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* Risk Callout */
.risk-callout {
  background: #FFF4E6;
  border-left: 4px solid var(--warning);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
}

/* Step divider */
.step-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--gray-500);
}

.step-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-300);
}

/* Mobile scrollable tabs */
.step-tabs {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.step-tabs::-webkit-scrollbar {
  display: none;
}

/* Sticky header */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
  animation: fadeInUp 0.4s ease forwards;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.25rem;
}

/* Modal / Overlay */
.doc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.doc-overlay-content {
  background: var(--white);
  border-radius: 1rem;
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: fadeInUp 0.3s ease;
}

/* Footer */
.gov-footer {
  background: var(--navy);
  color: var(--gray-400);
}

.gov-footer a {
  color: var(--gold);
  transition: color 0.2s;
}

.gov-footer a:hover {
  color: var(--gold-light);
}

/* Responsive tweaks */
@media (max-width: 640px) {
  .btn-gov {
    width: 100%;
    justify-content: center;
  }
  
  .process-card {
    margin: 0 -1rem;
    border-radius: 0;
  }
}

/* Print */
@media print {
  .sticky-header { position: static; }
  .lock-overlay::after { display: none; }
  .btn-gov { display: none; }
}
