/* ============================================
   PAT Wise — Custom Styles
   ============================================ */

@font-face {
  font-family: 'TheSignature';
  src: url('../fonts/Thesignature.otf') format('opentype'),
       url('../fonts/Thesignature.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary: #1e3a5f;
  --secondary: #2a6496;
  --accent: #f0a500;
  --accent-hover: #d4920a;
  --light-bg: #f8f9fa;
  --text: #333333;
  --white: #ffffff;
}

/* ---- Base ---- */
html {
  scroll-behavior: smooth;
}
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  line-height: 1.6;
}

/* ---- Hero gradient + circuit pattern ---- */
.hero-gradient {
  background: linear-gradient(135deg, #0f2744 0%, var(--primary) 40%, var(--secondary) 100%);
  position: relative;
  overflow: hidden;
}
.hero-gradient::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(255,255,255,0.03) 1px, transparent 1px),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, transparent 49.5%, rgba(255,255,255,0.02) 49.5%, rgba(255,255,255,0.02) 50.5%, transparent 50.5%),
    linear-gradient(0deg, transparent 49.5%, rgba(255,255,255,0.02) 49.5%, rgba(255,255,255,0.02) 50.5%, transparent 50.5%);
  background-size: 60px 60px, 80px 80px, 40px 40px, 40px 40px;
  pointer-events: none;
}
.hero-gradient::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 80%, rgba(42,100,150,0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 20%, rgba(240,165,0,0.08) 0%, transparent 40%);
  pointer-events: none;
}

/* ---- Navigation ---- */
.nav-sticky {
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}
.nav-sticky.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}
.nav-link {
  position: relative;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}
.nav-link.active {
  color: var(--accent);
}

/* ---- Mobile menu ---- */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.mobile-menu.open {
  max-height: 500px;
}

/* ---- Buttons ---- */
.btn-primary {
  background: var(--accent);
  color: var(--primary);
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  display: inline-block;
  text-decoration: none;
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(240,165,0,0.3);
}
.btn-secondary {
  border: 2px solid var(--secondary);
  color: var(--secondary);
  background: var(--white);
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  display: inline-block;
  text-decoration: none;
}
.btn-secondary:hover {
  background: var(--secondary);
  color: var(--white);
}

/* ---- Cards ---- */
.card {
  background: var(--white);
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
}
.card:hover {
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transform: translateY(-4px);
}

/* ---- Trust bar ---- */
.trust-bar {
  background: var(--white);
  border-bottom: 3px solid var(--accent);
}

/* ---- Accordion ---- */
.accordion-item {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.accordion-header {
  width: 100%;
  text-align: left;
  padding: 1rem 1.25rem;
  background: var(--white);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: none;
  font-size: 1rem;
  color: var(--text);
  transition: background 0.2s;
}
.accordion-header:hover {
  background: var(--light-bg);
}
.accordion-header .icon {
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 1rem;
}
.accordion-item.open .accordion-header .icon {
  transform: rotate(180deg);
}
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.accordion-item.open .accordion-body {
  max-height: 500px;
  padding: 0 1.25rem 1rem;
}

/* ---- Back to top ---- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 50;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}
.back-to-top:hover {
  background: var(--secondary);
  transform: translateY(-2px);
}

/* ---- Stars ---- */
.stars {
  color: var(--accent);
}

/* ---- Section divider ---- */
.section-divider {
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}

/* ---- Pricing table ---- */
.pricing-card {
  border: 2px solid #e5e7eb;
  border-radius: 1rem;
  transition: all 0.3s ease;
}
.pricing-card:hover {
  border-color: var(--secondary);
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}
.pricing-card.featured {
  border-color: var(--accent);
  position: relative;
}
.pricing-card.featured::before {
  content: 'Most Popular';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--primary);
  padding: 0.25rem 1rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 700;
}

/* ---- Contact form ---- */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.form-input:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(42,100,150,0.15);
}

/* ---- Certificate Styles ---- */
/* Certificate uses inline styles for reliable html2canvas PDF rendering */

/* ---- Admin Styles ---- */
.admin-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0f2744 0%, var(--primary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.admin-login-card {
  background: var(--white);
  padding: 2.5rem;
  border-radius: 1rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  width: 90%;
  max-width: 400px;
  text-align: center;
}
.admin-tab {
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-size: 0.95rem;
  color: #6b7280;
}
.admin-tab.active {
  color: var(--primary);
  border-bottom-color: var(--accent);
}
.admin-tab:hover {
  color: var(--primary);
}

/* ---- Responsive fixes ---- */

/* ---- Industry grid icons ---- */
.industry-icon {
  width: 64px;
  height: 64px;
  background: var(--light-bg);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

/* ---- Step number ---- */
.step-number {
  width: 56px;
  height: 56px;
  background: var(--accent);
  color: var(--primary);
  font-weight: 800;
  font-size: 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---- Testimonial card ---- */
.testimonial-card {
  border-left: 4px solid var(--accent);
}

/* Print styles for certificate */
@media print {
  .no-print { display: none !important; }
  .certificate-wrapper {
    box-shadow: none;
    margin: 0;
  }
}

/* ---- Loading spinner ---- */
.spinner {
  border: 3px solid #e5e7eb;
  border-top-color: var(--secondary);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---- Success animation ---- */
.success-check {
  animation: scaleIn 0.3s ease;
}
@keyframes scaleIn {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
