/* ==========================================================================
   Printer Driver Support - Modern, Responsive Homepage
   ========================================================================== */

/* Reset & Base Variables */
:root {
  --primary: #0066cc;
  --primary-dark: #004c99;
  --primary-card: #4361ee;
  --primary-card-dark: #3b50d9;
  --bg-light: #f4f7fa;
  --text-dark: #1e293b;
  --text-muted: #475569;
  --border-color: #cbd5e1;
  --white: #ffffff;
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 30px rgba(15, 23, 42, 0.14);
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Roboto Slab', Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-family);
  color: var(--text-dark);
  background-color: var(--white);
  line-height: 1.6;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

button {
  font: inherit;
}

.section-width {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ==========================================================================
   Site Header
   ========================================================================== */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 99;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 12px 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-dark);
}

.logo-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.15);
  border: 1px solid #e2e8f0;
}

.header-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-title {
  display: flex;
  flex-direction: column;
}

.site-title strong {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
}

.site-title span {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.header-nav a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
}

.header-nav a:hover {
  color: var(--primary);
  text-decoration: none;
}

.header-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #eaf3fd;
  color: var(--primary);
  border: 1px solid #bfdbfe;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.header-contact-btn:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* ==========================================================================
   Hero Section with Brand Grid
   ========================================================================== */
.home-hero {
  position: relative;
  background-image: url("Images/backgroundimage.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  color: var(--white);
  padding: 4.5rem 1.25rem;
  text-align: center;
}

.home-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(15, 23, 42, 0.45), rgba(15, 23, 42, 0.65));
  pointer-events: none;
}

.home-hero-content {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto;
}

.hero-title {
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 2rem;
  letter-spacing: -0.5px;
}

.brand-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  max-width: 860px;
  margin: 0 auto;
}

.brand-link-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: none;
  border-radius: 10px;
  padding: 1.4rem 1rem;
  height: 120px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
  text-decoration: none;
}

.brand-link-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.brand-img {
  max-height: 52px;
  max-width: 130px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.brand-helper {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 0.45rem;
}

/* ==========================================================================
   Driver Search Section
   ========================================================================== */
.driver-section {
  background-color: var(--bg-light);
  padding: 3.5rem 1.25rem;
  text-align: center;
}

.driver-section h2 {
  max-width: 720px;
  margin: 0 auto 1.75rem;
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--text-dark);
}

.driver-card {
  max-width: 860px;
  margin: 0 auto;
  background: var(--white);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
  text-align: left;
}

.driver-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 1.25rem;
  align-items: end;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.form-field strong {
  color: #dc2626;
}

.form-field input {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.12);
}

.form-action {
  display: flex;
  flex-direction: column;
}

.driver-result {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: 6px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  font-size: 0.95rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--primary);
  color: var(--white);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.78rem 1.6rem;
  border: none;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  background-color: var(--primary-dark);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-square {
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.btn-pill {
  border-radius: 999px;
  padding: 0.8rem 2rem;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.25);
}

/* ==========================================================================
   Three Support Action Cards (Vibrant Indigo/Blue)
   ========================================================================== */
.support-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.support-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.2rem 1.5rem;
  background: var(--primary-card);
  border: none;
  border-radius: 10px;
  color: var(--white);
  box-shadow: 0 6px 18px rgba(67, 97, 238, 0.28);
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
}

.support-card:hover {
  background: var(--primary-card-dark);
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(67, 97, 238, 0.38);
}

.support-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1rem;
}

.circle-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
  font-size: 1.4rem;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease;
}

.support-card:hover .circle-arrow {
  background: #ffffff;
  color: var(--primary-card);
  transform: scale(1.1);
}

/* ==========================================================================
   Setup Section
   ========================================================================== */
.setup-section {
  background-color: var(--bg-light);
  padding: 3.5rem 0;
}

.setup-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.setup-copy h2 {
  font-size: 1.85rem;
  margin-bottom: 0.9rem;
  font-weight: 700;
  color: var(--text-dark);
}

.setup-copy p {
  color: var(--text-muted);
  margin-bottom: 1.4rem;
  font-size: 1rem;
  line-height: 1.6;
}

.setup-copy .assistance {
  margin-top: 1.25rem;
  font-size: 0.95rem;
}

.setup-copy .assistance a {
  font-weight: 700;
}

.setup-image img {
  border-radius: 10px;
  box-shadow: var(--shadow);
  width: 100%;
  object-fit: cover;
}

/* ==========================================================================
   Support Copy Articles
   ========================================================================== */
.support-copy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  padding-top: 3.5rem;
  padding-bottom: 4.5rem;
}

.support-copy h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
  color: var(--text-dark);
}

.support-copy p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.96rem;
  line-height: 1.65;
}

/* ==========================================================================
   Site Footer
   ========================================================================== */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 2rem 1.25rem;
  text-align: center;
  font-size: 0.88rem;
  margin-top: auto;
}

.site-footer .disclaimer {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 0.5rem;
}

/* ==========================================================================
   Setup & Diagnostic Modal Wizard
   ========================================================================== */
.wizard-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.25rem;
}

.wizard-modal-overlay.open {
  display: flex;
}

.wizard-modal-box {
  background: var(--white);
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalPop 0.3s ease;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.wizard-close-btn {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  font-size: 1.75rem;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
}

.wizard-close-btn:hover {
  color: var(--text-dark);
}

.wizard-step {
  display: none;
}

.wizard-step.active {
  display: block;
}

.wizard-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.wizard-step-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--primary);
  background: #eaf3fd;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

.wizard-header h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.35rem;
}

.wizard-header p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.wizard-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.wizard-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: left;
}

.wizard-field label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-dark);
}

.wizard-field input {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
}

.wizard-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.12);
}

.wizard-chips-wrap {
  text-align: left;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.model-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.model-chip-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s ease;
}

.model-chip-btn:hover {
  background: #e0f2fe;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-wizard-primary {
  background: var(--primary);
  color: var(--white);
  border-radius: 8px;
  padding: 0.9rem;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-wizard-primary:hover {
  background: var(--primary-dark);
}

/* Modal Selection Grids */
.modal-selection-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.modal-card {
  padding: 18px 14px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  background: var(--white);
  color: var(--text-dark);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.modal-card i {
  font-size: 24px;
  color: var(--primary);
}

.modal-card:hover {
  border-color: var(--primary);
  background: #f0f7ff;
  transform: translateY(-2px);
}

/* Modal Scanning Spinner */
.modal-spinner-box {
  text-align: center;
  padding: 1.5rem 0;
}

.modal-spinner {
  width: 65px;
  height: 65px;
  border: 5px solid #e0f2fe;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.modal-percent {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.modal-progress-bar {
  max-width: 420px;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin: 0 auto 1rem;
}

.modal-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--primary);
  transition: width 0.2s linear;
}

.modal-scan-status {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
}

/* Modal Error View */
.modal-error-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 1rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.modal-error-banner i {
  font-size: 2rem;
  color: #dc2626;
  flex-shrink: 0;
}

.error-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: #dc2626;
  background: #fee2e2;
  padding: 2px 8px;
  border-radius: 4px;
}

.modal-error-banner h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #991b1b;
  margin-top: 4px;
}

.modal-warning-text {
  font-size: 0.88rem;
  color: #7f1d1d;
  background: #fff5f5;
  border-left: 3px solid #dc2626;
  padding: 10px 14px;
  border-radius: 0 6px 6px 0;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.modal-specs-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.88rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.modal-specs-summary span {
  color: var(--text-muted);
}

.modal-specs-summary strong {
  color: var(--text-dark);
}

.modal-actions-row {
  display: flex;
  gap: 10px;
}

.btn-chat-action {
  flex: 2;
  background: #0066cc;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s ease;
}

.btn-chat-action:hover {
  background: #004c99;
}

.btn-retry-action {
  flex: 1;
  background: #f1f5f9;
  color: var(--text-dark);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-retry-action:hover {
  background: #e2e8f0;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 900px) {
  .brand-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .support-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-nav {
    display: none;
  }
  .driver-form {
    grid-template-columns: 1fr;
  }
  .setup-inner,
  .support-copy {
    grid-template-columns: 1fr;
  }
  .modal-selection-grid {
    grid-template-columns: 1fr;
  }
  .modal-actions-row {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .brand-grid {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 1.5rem;
  }
}
