/* HowToLogistics & Apprise Consulting Modern Brand Styling */

:root {
  --brand-navy: #0f2b48;
  --brand-navy-dark: #091a2c;
  --brand-navy-light: #1b4977;
  --brand-teal: #5e9b91;
  --brand-teal-dark: #467971;
  --brand-teal-light: #e6f3f1;
  --brand-gold: #f59e0b;
  --brand-gold-hover: #d97706;
  --brand-blue: #1e73be;
  --brand-bg-alt: #f0f7fa;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border-light: #e2e8f0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-primary);
  background-color: #f8fafc;
  overflow-x: hidden;
}

/* Brand Header Strip */
.header-top-bar {
  background-color: #0b1f35;
  color: #94a3b8;
  font-size: 0.8125rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-top-bar a {
  color: #cbd5e1;
  transition: color 0.15s ease;
}

.header-top-bar a:hover {
  color: #ffffff;
}

/* Header Gradient with Logistics Motif */
.site-main-header {
  background: linear-gradient(135deg, #0f2b48 0%, #163e66 50%, #205386 100%);
  border-bottom: 3px solid var(--brand-teal);
  position: relative;
}

.site-main-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

/* Nav links */
.nav-link {
  color: #e2e8f0;
  font-weight: 500;
  font-size: 0.8125rem;
  padding: 0.4rem 0.55rem;
  border-radius: 0.375rem;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
  flex-shrink: 0;
}

@media (min-width: 1280px) {
  .nav-link {
    font-size: 0.8125rem;
    padding: 0.35rem 0.55rem;
  }
}

@media (min-width: 1440px) {
  .nav-link {
    font-size: 0.875rem;
    padding: 0.45rem 0.75rem;
  }
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.14);
}

.nav-dropdown {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
}

.nav-dropdown a {
  color: #334155;
  font-size: 0.875rem;
  padding: 0.625rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.15s ease;
}

.nav-dropdown a:hover {
  background-color: #f1f5f9;
  color: var(--brand-blue);
  padding-left: 1.25rem;
}

/* Buttons */
.btn-primary {
  background-color: var(--brand-gold);
  color: #0f172a;
  font-weight: 600;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}

.btn-primary:hover {
  background-color: var(--brand-gold-hover);
  color: #0f172a;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.3);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--brand-navy);
  border: 1px solid #cbd5e1;
  font-weight: 600;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  background-color: #f8fafc;
  border-color: #94a3b8;
  color: var(--brand-navy-dark);
}

.btn-teal {
  background-color: var(--brand-teal);
  color: #ffffff;
  font-weight: 600;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-teal:hover {
  background-color: var(--brand-teal-dark);
  color: #ffffff;
}

/* Cards */
.card-item {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 0.75rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.card-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  border-color: #cbd5e1;
}

.card-item:nth-child(even) {
  background-color: var(--brand-bg-alt);
}

/* Badges */
.badge-excel {
  background-color: #dcfce7;
  color: #166534;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-word {
  background-color: #dbeafe;
  color: #1e40af;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-pdf {
  background-color: #fee2e2;
  color: #991b1b;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-audit {
  background-color: #fef3c7;
  color: #92400e;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
}

/* Rich Content Styling */
.prose-content {
  line-height: 1.75;
  color: #334155;
}

.prose-content h1, .prose-content h2, .prose-content h3 {
  color: #0f2b48;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.prose-content h2 {
  font-size: 1.5rem;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0.5rem;
}

.prose-content h3 {
  font-size: 1.25rem;
}

.prose-content p {
  margin-bottom: 1.25rem;
}

.prose-content ul, .prose-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.prose-content ul {
  list-style-type: disc;
}

.prose-content ol {
  list-style-type: decimal;
}

.prose-content li {
  margin-bottom: 0.375rem;
}

.prose-content a {
  color: var(--brand-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose-content a:hover {
  color: #0f2b48;
}

.prose-content a.btn-primary, .prose-content a.btn-primary:hover { color: #0f172a; text-decoration: none; }

.prose-content img {
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  margin: 1.5rem auto;
  max-width: 100%;
  height: auto;
}

/* SaaS Gateway Notice Box */
.saas-notice-banner {
  background: linear-gradient(to right, #eff6ff, #f0fdf4);
  border: 1px solid #bfdbfe;
  border-radius: 0.75rem;
  padding: 1rem 1.5rem;
}

/* Footer */
.site-footer {
  background-color: #0a1b2d;
  color: #94a3b8;
  border-top: 4px solid var(--brand-teal);
}

.site-footer a {
  color: #cbd5e1;
  transition: color 0.15s ease;
}

.site-footer a:hover {
  color: #ffffff;
}

/* Admin Styles */
.admin-sidebar {
  background-color: #0f2b48;
  color: #e2e8f0;
}

.admin-nav-item {
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.15s ease;
  font-weight: 500;
  font-size: 0.875rem;
}

.admin-nav-item:hover, .admin-nav-item.active {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* WYSIWYG & Raw HTML Editor Toggle Support */
.tox-tinymce:not(.tinymce-offscreen) {
  display: flex !important;
  visibility: visible !important;
  width: 100% !important;
}

.tinymce-offscreen {
  position: absolute !important;
  left: -99999px !important;
  top: -99999px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  z-index: -999 !important;
}

.raw-html-editor {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
  tab-size: 2 !important;
  min-height: 520px !important;
  background-color: #0f172a !important; /* dark slate-900 code editor background */
  color: #f8fafc !important; /* crisp light code text */
  border: 1px solid #334155 !important;
  border-radius: 0.5rem !important;
  padding: 1rem !important;
}

/* ---- Accessibility and contrast (NFR-7, WCAG 2.2 AA) ---- */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: #fff; color: #0f2b48; padding: .75rem 1rem; font-weight: 700; border: 3px solid #0f2b48; }
.skip-link:focus { left: .5rem; top: .5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #1e73be !important; outline-offset: 2px !important; box-shadow: 0 0 0 5px #fff;
}
.site-main-header :focus-visible, .header-top-bar :focus-visible, .site-footer :focus-visible, .bg-brand-navydark :focus-visible, .bg-slate-900 :focus-visible {
  outline-color: #fbbf24 !important; box-shadow: none;
}
main:focus { outline: none; }
/* 4.5:1 text contrast on light backgrounds */
.btn-teal { background-color: #2f6b62 !important; color: #fff !important; }
.btn-teal:hover { background-color: #245850 !important; }
.text-teal-600 { color: #0f766e !important; }
.bg-white .text-slate-400, .bg-slate-50 .text-slate-400, .card-item .text-slate-400 { color: #64748b !important; }
.text-brand-teal { color: #2f6b62; }
.prose-content a { text-decoration: underline; }
.badge-excel { color: #14532d; }
/* status labels on listing cards and pages */
.status-badge { display: inline-block; font-size: .6875rem; font-weight: 700; padding: .15rem .6rem; border-radius: 9999px; border: 1px solid transparent; }
.status-soon { background: #f1f5f9; color: #334155; border-color: #94a3b8; }
.status-free { background: #dcfce7; color: #14532d; border-color: #86efac; }
.status-priced { background: #e0f2fe; color: #0c4a6e; border-color: #7dd3fc; }
.coming-soon-label { display: block; text-align: center; font-weight: 700; padding: .75rem 1rem; border-radius: .5rem; background: #f1f5f9; color: #334155; border: 2px dashed #94a3b8; cursor: not-allowed; }
/* contact form honeypot: hidden from people and assistive technology */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } .card-item:hover, .btn-primary:hover { transform: none !important; } }
