/* ============================================
   style.css — Main styles for FreePaystubGenerators.com
   Inspired by ThePayStubs clean professional look
   Color palette: Navy #1B2A4A, White, Blue #2196F3, Green accents
   ============================================ */

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #333;
  background: #fff;
  line-height: 1.5;
}

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

a {
  color: #2196F3;
  text-decoration: none;
}

a:hover {
  color: #1976D2;
  text-decoration: underline;
}

/* ---- Container ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  color: #1B2A4A;
  line-height: 1.3;
  font-weight: 700;
}

h1 { font-size: 2rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.75rem; margin-bottom: 1rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }

.section-sub {
  color: #666;
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

/* ---- Buttons ---- */
.btn-primary {
  display: inline-block;
  background: #2196F3;
  color: #fff;
  padding: 12px 28px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  text-align: center;
  text-decoration: none;
}

.btn-primary:hover {
  background: #1976D2;
  color: #fff;
  text-decoration: none;
}

.btn-large {
  padding: 14px 40px;
  font-size: 1.1rem;
}

/* ---- Header ---- */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 12px 0;
  position: relative;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.site-header .logo img {
  height: 36px;
  width: auto;
}

.site-header .tagline {
  color: #2196F3;
  font-weight: 600;
  font-size: 0.8rem;
  display: none;
}

.main-nav {
  margin-left: auto;
  display: flex;
  gap: 20px;
  align-items: center;
}

.main-nav a {
  color: #333;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}

.main-nav a:hover {
  color: #2196F3;
  text-decoration: none;
}

/* ---- Mobile Hamburger ---- */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #1B2A4A;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---- States Dropdown ---- */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  background: none;
  border: none;
  color: #333;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  font-family: inherit;
}

.nav-dropdown-toggle:hover {
  color: #2196F3;
}

.nav-dropdown-toggle svg {
  transition: transform 0.2s;
}

.nav-dropdown.open .nav-dropdown-toggle svg {
  transform: rotate(180deg);
}

/* Mega Menu */
.nav-mega-menu {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  z-index: 1000;
  width: 720px;
  max-height: 80vh;
  overflow-y: auto;
}

.nav-dropdown.open .nav-mega-menu {
  display: block;
  animation: menuFadeIn 0.2s ease;
}

@keyframes menuFadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.mega-menu-inner {
  padding: 24px;
}

.mega-menu-title {
  font-size: 0.85rem;
  color: #999;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
}

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

.mega-menu-state {
  display: block;
  padding: 8px 12px;
  font-size: 0.85rem;
  color: #333;
  font-weight: 500;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.mega-menu-state:hover {
  background: #f0f4ff;
  color: #1B2A4A;
  text-decoration: none;
}

/* ---- Nav Auth Buttons ---- */
.nav-auth {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}

.btn-nav-ghost {
  display: inline-block;
  padding: 7px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #333;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.btn-nav-ghost:hover {
  background: #f5f7fa;
  color: #1B2A4A;
  text-decoration: none;
}

.btn-nav-primary {
  display: inline-block;
  padding: 7px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: #2196F3;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-nav-primary:hover {
  background: #1976D2;
  color: #fff;
  text-decoration: none;
}

.btn-nav-outline {
  display: inline-block;
  padding: 7px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #2196F3;
  border: 1px solid #2196F3;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.btn-nav-outline:hover {
  background: #2196F3;
  color: #fff;
  text-decoration: none;
}

/* ---- Hero / Create Your Stub Banner ---- */
.hero {
  background: #1B2A4A;
  color: #fff;
  padding: 24px 0 32px;
}

.hero h1 {
  color: #fff;
  font-size: 1.6rem;
  margin-bottom: 4px;
}

.hero-sub {
  color: #a0b4cc;
  font-size: 0.95rem;
  margin-bottom: 20px;
}

/* Step Progress Indicator */
.step-progress {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 24px;
  justify-content: center;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #a0b4cc;
}

.step-item.active {
  color: #fff;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.step-item.active .step-num {
  background: #2196F3;
  color: #fff;
}

.step-connector {
  width: 60px;
  height: 2px;
  background: rgba(255,255,255,0.2);
  margin: 0 8px;
}

/* ---- Form Area (white background below hero) ---- */
.form-area {
  background: #fff;
  padding: 32px 0 48px;
}

/* ---- Form + Preview Wrapper ---- */
.form-preview-wrapper {
  display: flex;
  gap: 28px;
  align-items: stretch;
  margin-top: -8px;
}

.form-column {
  flex: 0 0 58%;
  max-width: 58%;
}

.preview-column {
  flex: 0 0 40%;
  max-width: 40%;
}

/* ---- How It Works ---- */
.how-it-works {
  padding: 56px 0;
  background: #f8f9fb;
  text-align: center;
}

.steps-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  list-style: none;
  margin-top: 32px;
}

.steps-list li {
  text-align: center;
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #1B2A4A;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.steps-list h3 {
  color: #1B2A4A;
  font-size: 1rem;
}

.steps-list p {
  color: #666;
  font-size: 0.9rem;
}

/* ---- Pricing ---- */
.pricing {
  padding: 56px 0;
  background: #fff;
  text-align: center;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.pricing-grid.pricing-grid-3 {
  grid-template-columns: repeat(3, 1fr);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.pricing-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 24px 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: box-shadow 0.2s;
}

.pricing-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.pricing-card.free {
  border-color: #2196F3;
  border-width: 2px;
}

.pricing-card.popular {
  border-color: #1B2A4A;
  border-width: 2px;
}

.popular-tag {
  position: absolute;
  top: -11px;
  background: #1B2A4A;
  color: #fff;
  padding: 3px 14px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pricing-badge {
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 6px;
}

.pricing-amount {
  font-size: 1.75rem;
  font-weight: 800;
  color: #1B2A4A;
}

.pricing-per {
  color: #999;
  font-size: 0.8rem;
  margin-bottom: 16px;
}

.pricing-features {
  list-style: none;
  margin-bottom: 20px;
  flex-grow: 1;
}

.pricing-features li {
  padding: 3px 0;
  font-size: 0.85rem;
  color: #555;
}

.pricing-card .btn-primary {
  width: 100%;
  font-size: 0.9rem;
  padding: 10px 16px;
}

/* ---- Features ---- */
.features {
  padding: 56px 0;
  background: #f8f9fb;
  text-align: center;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.feature-card {
  padding: 24px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #eee;
  text-align: center;
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.feature-card p {
  color: #666;
  font-size: 0.9rem;
}

/* ---- State Pages Grid ---- */
.state-pages {
  padding: 56px 0;
  background: #fff;
  text-align: center;
}

.states-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 24px;
}

.state-link {
  display: block;
  padding: 8px 6px;
  background: #f5f7fa;
  border: 1px solid #eee;
  border-radius: 4px;
  font-size: 0.8rem;
  color: #1B2A4A;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.state-link:hover,
.state-link.active {
  background: #1B2A4A;
  color: #fff;
  text-decoration: none;
}

/* ---- Paystub Helpful Tips ---- */
.paystub-tips {
  padding: 56px 0;
  background: #fff;
}

.paystub-tips h2 {
  text-align: center;
  margin-bottom: 40px;
}

.tip-block {
  max-width: 860px;
  margin: 0 auto 36px;
}

.tip-block h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1B2A4A;
  margin-bottom: 10px;
}

.tip-block p {
  color: #555;
  line-height: 1.7;
  margin-bottom: 10px;
}

.tip-block ul {
  color: #555;
  line-height: 1.7;
  padding-left: 22px;
  margin-bottom: 10px;
}

.tip-block ul li {
  margin-bottom: 6px;
}

/* ---- FAQ ---- */
.faq {
  padding: 56px 0;
  background: #f8f9fb;
}

.faq h2 {
  text-align: center;
  margin-bottom: 36px;
}

.faq-item {
  max-width: 860px;
  margin: 0 auto 28px;
}

.faq-item h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1B2A4A;
  margin-bottom: 8px;
}

.faq-item p {
  color: #555;
  line-height: 1.7;
}

.faq-item p a {
  color: #2196F3;
}

.faq details {
  text-align: left;
  max-width: 780px;
  margin: 0 auto 6px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.faq details summary {
  padding: 14px 18px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
  list-style: none;
}

.faq details summary::-webkit-details-marker {
  display: none;
}

.faq details summary::before {
  content: '+';
  display: inline-block;
  width: 18px;
  font-weight: 700;
  color: #2196F3;
  margin-right: 8px;
}

.faq details[open] summary::before {
  content: '\2212';
}

.faq details summary:hover {
  background: #f5f7fa;
}

.faq details p {
  padding: 0 18px 14px;
  color: #666;
  line-height: 1.6;
  font-size: 0.9rem;
}

.faq details p a {
  color: #2196F3;
}

/* ---- Footer ---- */
.site-footer {
  background: #1B2A4A;
  color: #fff;
  padding: 32px 0;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand p {
  color: #8899aa;
  font-size: 0.8rem;
  margin-top: 6px;
}

.footer-brand img {
  height: 28px;
  width: auto;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: #a0b4cc;
  font-size: 0.85rem;
  text-decoration: none;
}

.footer-links a:hover {
  color: #fff;
}

/* ---- Paid Badge ---- */
.paid-badge {
  display: inline-block;
  background: #FFC107;
  color: #333;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  vertical-align: middle;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .states-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .form-preview-wrapper {
    flex-direction: column;
  }

  .form-column,
  .preview-column {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .preview-column {
    position: static;
    order: -1;
    margin-bottom: 16px;
  }

  .steps-list {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .states-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .site-header .container {
    flex-wrap: nowrap;
  }

  .nav-toggle {
    display: flex;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    flex-direction: column;
    padding: 16px 20px;
    gap: 0;
    z-index: 999;
  }

  .main-nav.nav-open {
    display: flex;
  }

  .main-nav a,
  .nav-dropdown-toggle {
    padding: 10px 0;
    font-size: 1rem;
  }

  .nav-dropdown {
    position: static;
  }

  .nav-mega-menu {
    position: static;
    transform: none;
    width: 100%;
    border: none;
    box-shadow: none;
    border-radius: 0;
    max-height: 300px;
  }

  .nav-dropdown.open .nav-mega-menu {
    animation: none;
  }

  .mega-menu-inner {
    padding: 12px 0;
  }

  .mega-menu-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-auth {
    margin-left: 0;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid #eee;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.35rem; }
}

@media (max-width: 480px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }

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

  .states-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps-list {
    grid-template-columns: 1fr;
  }
}
