/* ============================================
   SAM & SONS V3 — Components
   "INDUSTRIAL BRUTALIST TECH"
   Side Navigation / Bottom Nav / Brutalist UI
   ============================================ */


/* ═══════════════════════════════════════════
   1. SIDE NAVIGATION — Desktop
   Fixed left rail, expands on hover
   ═══════════════════════════════════════════ */
.sidenav {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidenav-width);
  height: 100vh;
  background: var(--color-bg-elevated);
  border-right: 1px solid var(--color-border);
  z-index: var(--z-sidenav);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-lg) 0;
  transition: width 0.4s var(--ease-out-expo);
  overflow: hidden;
}

.sidenav:hover,
.sidenav.expanded {
  width: var(--sidenav-width-expanded);
}

/* ─── Sidenav Logo ─── */
.sidenav-logo {
  width: 36px;
  height: 36px;
  margin-bottom: var(--space-3xl);
  transition: all 0.4s var(--ease-out-expo);
  object-fit: contain;
}

.sidenav:hover .sidenav-logo {
  width: 80px;
  height: auto;
}

/* ─── Sidenav Links ─── */
.sidenav-links {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}

.sidenav-link {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition: all var(--transition-fast);
  border-left: 2px solid transparent;
  text-decoration: none;
}

.sidenav-link:hover {
  color: var(--color-cyan);
  background: var(--color-cyan-glass);
}

.sidenav-link.active {
  color: var(--color-cyan);
  border-left-color: var(--color-cyan);
}

/* ─── Sidenav Icons ─── */
.sidenav-link svg,
.sidenav-link .sidenav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
}

/* ─── Sidenav Labels (hidden when collapsed) ─── */
.sidenav-label {
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.sidenav:hover .sidenav-label,
.sidenav.expanded .sidenav-label {
  opacity: 1;
  transform: translateX(0);
}

/* ─── Sidenav Bottom Section ─── */
.sidenav-bottom {
  margin-top: auto;
  padding: var(--space-lg);
  width: 100%;
}

/* ─── Sidenav CTA Button ─── */
.sidenav-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  transition: all var(--transition-normal);
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.sidenav:hover .sidenav-cta,
.sidenav.expanded .sidenav-cta {
  width: 100%;
  height: auto;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
}

/* ─── Sidenav Dropdown ─── */
.sidenav-dropdown {
  position: relative;
  width: 100%;
}

.sidenav-dropdown-toggle {
  width: 100%;
  cursor: pointer;
}

.sidenav-dropdown-toggle svg.chevron {
  width: 12px;
  height: 12px;
  margin-left: auto;
  transition: transform var(--transition-fast);
  opacity: 0;
}

.sidenav:hover .sidenav-dropdown-toggle svg.chevron,
.sidenav.expanded .sidenav-dropdown-toggle svg.chevron {
  opacity: 1;
}

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

.sidenav-dropdown-menu {
  display: none;
  flex-direction: column;
  padding-left: calc(var(--space-lg) + 20px + var(--space-md));
  background: rgba(0, 0, 0, 0.04);
}

.sidenav-dropdown.open .sidenav-dropdown-menu {
  display: flex;
}

.sidenav-dropdown-menu a {
  display: block;
  padding: var(--space-sm) var(--space-md);
  color: var(--color-text-muted);
  font-size: var(--fs-xxs);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  transition: color var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.sidenav-dropdown-menu a:hover,
.sidenav-dropdown-menu a.active {
  color: var(--color-cyan);
}

/* ─── Hide sidenav on tablet/mobile ─── */
@media (max-width: 1024px) {
  .sidenav {
    display: none;
  }
}


/* ═══════════════════════════════════════════
   2. BOTTOM NAVIGATION — Mobile
   Fixed bottom bar with bottom sheet menu
   ═══════════════════════════════════════════ */
.bottomnav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--color-bg-elevated);
  border-top: 1px solid var(--color-border);
  z-index: var(--z-fixed);
  padding: var(--space-xs) 0 env(safe-area-inset-bottom, var(--space-xs));
}

.bottomnav-icons {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.bottomnav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-xs) var(--space-sm);
  color: var(--color-text-muted);
  font-size: 9px;
  letter-spacing: 0.05em;
  font-weight: var(--fw-semibold);
  transition: color var(--transition-fast);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
}

.bottomnav-link.active {
  color: var(--color-cyan);
}

.bottomnav-link:hover {
  color: var(--color-cyan);
}

.bottomnav-link svg {
  width: 22px;
  height: 22px;
}

/* ─── Bottom Sheet (mobile submenu) ─── */
.bottomsheet {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  max-height: 85vh;
  background: var(--color-bg-elevated);
  border-top: 1px solid var(--color-border);
  border-radius: 20px 20px 0 0;
  transform: translateY(100%);
  transition: transform 0.5s var(--ease-out-expo);
  z-index: var(--z-bottomsheet);
  overflow-y: auto;
  padding: var(--space-xl) var(--space-lg) var(--space-3xl);
}

.bottomsheet.open {
  transform: translateY(0);
}

.bottomsheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: calc(var(--z-bottomsheet) - 1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.bottomsheet-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.bottomsheet-handle {
  width: 40px;
  height: 4px;
  background: var(--color-border-hover);
  border-radius: 2px;
  margin: 0 auto var(--space-xl);
}

.bottomsheet-title {
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
}

.bottomsheet-link {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  color: var(--color-text-secondary);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  border-bottom: 1px solid var(--color-border);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.bottomsheet-link:last-child {
  border-bottom: none;
}

.bottomsheet-link:hover,
.bottomsheet-link.active {
  color: var(--color-cyan);
}

.bottomsheet-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ─── Show bottomnav on tablet/mobile ─── */
@media (max-width: 1024px) {
  .bottomnav {
    display: flex;
    justify-content: space-around;
    align-items: center;
  }
}


/* ═══════════════════════════════════════════
   3. BUTTONS — Brutalist Style
   Sharp edges, fill-from-bottom hover
   ═══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.85rem 2rem;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  border: 1.5px solid var(--color-cyan);
  color: var(--color-cyan);
  background: transparent;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  line-height: 1.2;
}

/* Hover glow pseudo-element */
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-cyan);
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.btn:hover::before {
  opacity: 1;
}

.btn:hover {
  color: var(--color-bg);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-cyan);
}

.btn:active {
  transform: scale(0.97);
}

/* ─── Button: Primary — Brand Red ─── */
.btn-primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}

.btn-primary::before {
  background: var(--color-primary-dark);
}

.btn-primary:hover {
  color: var(--color-white);
}

/* ─── Button: Secondary — Cyan fill on hover ─── */
.btn-secondary {
  border-color: var(--color-cyan);
  color: var(--color-cyan);
  background: transparent;
}

.btn-secondary::before {
  background: var(--color-cyan);
}

.btn-secondary:hover {
  color: var(--color-bg);
}

/* ─── Button: Outline — Subtle border ─── */
.btn-outline {
  border-color: var(--color-border-hover);
  color: var(--color-text);
}

.btn-outline::before {
  background: var(--color-surface);
}

.btn-outline:hover {
  color: var(--color-text);
}

/* ─── Button: Glass — Glassmorphism ─── */
.btn-glass {
  border-color: var(--color-border);
  color: var(--color-text-secondary);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-glass::before {
  background: var(--color-surface);
}

.btn-glass:hover {
  color: var(--color-text);
  border-color: var(--color-border-hover);
}

/* ─── Button: Ghost — No border, minimal ─── */
.btn-ghost {
  border-color: transparent;
  color: var(--color-text-secondary);
  background: transparent;
}

.btn-ghost::before {
  background: var(--color-cyan-glass);
}

.btn-ghost:hover {
  color: var(--color-cyan);
  border-color: transparent;
}

/* ─── Button: Danger — Destructive actions ─── */
.btn-danger {
  border-color: var(--color-error);
  color: var(--color-error);
  background: transparent;
}

.btn-danger::before {
  background: var(--color-error);
}

.btn-danger:hover {
  color: var(--color-white);
}

/* ─── Button Sizes ─── */
.btn-lg {
  padding: 1.1rem 2.5rem;
  font-size: var(--fs-sm);
}

.btn-sm {
  padding: 0.5rem 1.2rem;
  font-size: var(--fs-xxs);
}

.btn-xs {
  padding: 0.35rem 0.8rem;
  font-size: var(--fs-xxs);
  letter-spacing: var(--ls-wide);
}

/* ─── Button: Icon Only ─── */
.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
}

.btn-icon svg {
  width: 20px;
  height: 20px;
}

.btn-icon.btn-sm {
  width: 36px;
  height: 36px;
}

.btn-icon.btn-sm svg {
  width: 16px;
  height: 16px;
}

.btn-icon.btn-lg {
  width: 52px;
  height: 52px;
}

.btn-icon.btn-lg svg {
  width: 24px;
  height: 24px;
}

/* ─── Button: Full Width ─── */
.btn-block {
  width: 100%;
}

/* ─── Button Group ─── */
.btn-group {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.btn-group .btn {
  flex-shrink: 0;
}

/* ─── Button with icon + label ─── */
.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ─── Button loading state ─── */
.btn.loading {
  pointer-events: none;
  opacity: 0.6;
}

.btn.loading::after {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
}

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


/* ═══════════════════════════════════════════
   4. FORMS — Dark Industrial
   Flat inputs, cyan focus glow
   ═══════════════════════════════════════════ */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-xs);
  color: var(--color-text-secondary);
  letter-spacing: 0.02em;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.9rem 1.2rem;
  font-size: var(--fs-sm);
  color: var(--color-text);
  background-color: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  font-family: var(--font-body);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-muted);
}

/* ─── Focus State — Cyan glow ─── */
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-cyan);
  box-shadow: 0 0 0 3px var(--color-cyan-glow);
  background: rgba(226, 5, 18, 0.02);
}

/* ─── Error State ─── */
.form-input.error,
.form-textarea.error,
.form-select.error {
  border-color: var(--color-error);
}

.form-input.error:focus,
.form-textarea.error:focus {
  box-shadow: 0 0 0 3px rgba(255, 68, 68, 0.15);
}

.form-error {
  display: none;
  font-size: var(--fs-xs);
  color: var(--color-error);
  margin-top: var(--space-xs);
}

.form-group.has-error .form-error {
  display: block;
}

/* ─── Success State ─── */
.form-input.success,
.form-textarea.success {
  border-color: var(--color-green);
}

.form-input.success:focus,
.form-textarea.success:focus {
  box-shadow: 0 0 0 3px var(--color-green-glow);
}

.form-success {
  display: none;
  font-size: var(--fs-xs);
  color: var(--color-green);
  margin-top: var(--space-xs);
}

.form-group.has-success .form-success {
  display: block;
}

/* ─── Textarea ─── */
.form-textarea {
  min-height: 130px;
  resize: vertical;
}

/* ─── Select ─── */
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23E20512' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-select option {
  background: var(--color-bg-elevated);
  color: var(--color-text);
}

/* ─── Checkbox / Radio ─── */
.form-check {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-cyan);
  cursor: pointer;
}

/* ─── Form Hint / Helper Text ─── */
.form-hint {
  font-size: var(--fs-xxs);
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}

/* ─── Input Group (input + button side by side) ─── */
.input-group {
  display: flex;
  gap: 0;
}

.input-group .form-input {
  flex: 1;
  border-right: none;
}

.input-group .btn {
  flex-shrink: 0;
  border-left: none;
}

/* ─── Form Row (side by side fields) ─── */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

@media (max-width: 767px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}


/* ═══════════════════════════════════════════
   5. FOOTER — Minimal Industrial
   Flat, utility-driven, cyan accent line
   ═══════════════════════════════════════════ */
.footer {
  background: var(--color-bg-elevated);
  border-top: 1px solid var(--color-border);
  padding: var(--space-3xl) 0 var(--space-xl);
  position: relative;
}

/* Cyan gradient line at top */
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-cyan), transparent);
  opacity: 0.4;
}

/* ─── Footer Layout ─── */
.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3xl);
}

/* ─── Footer Brand ─── */
.footer-brand {
  flex-shrink: 0;
}

.footer-brand img {
  height: 50px;
  width: auto;
  margin-bottom: var(--space-md);
  opacity: 0.7;
}

.footer-brand p {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  max-width: 250px;
  line-height: var(--lh-relaxed);
}

/* ─── Footer Nav (flat link list in footer) ─── */
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer-nav a {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
  text-decoration: none;
  letter-spacing: var(--ls-wide);
  font-weight: var(--fw-medium);
}

.footer-nav a:hover {
  color: var(--color-cyan);
}

/* ─── Footer Contact Info ─── */
.footer-contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-contact-info a,
.footer-contact-info span {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-contact-info a:hover {
  color: var(--color-cyan);
}

/* ─── Footer Links (legacy group) ─── */
.footer-links-group {
  display: flex;
  gap: var(--space-3xl);
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  color: var(--color-text);
  margin-bottom: var(--space-md);
  letter-spacing: var(--ls-wider);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col a {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--color-cyan);
}

/* ─── Footer Contact ─── */
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

.footer-contact-item svg {
  width: 14px;
  height: 14px;
  color: var(--color-cyan);
  flex-shrink: 0;
}

.footer-contact-item a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-contact-item a:hover {
  color: var(--color-cyan);
}

/* ─── Footer Social — Brutalist squares ─── */
.footer-social {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.footer-social a {
  width: 32px;
  height: 32px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.footer-social a:hover {
  border-color: var(--color-cyan);
  color: var(--color-cyan);
  background: var(--color-cyan-glass);
}

.footer-social a svg {
  width: 14px;
  height: 14px;
}

/* ─── Footer Bottom Bar ─── */
.footer-bottom {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-xxs);
  color: var(--color-text-muted);
  letter-spacing: var(--ls-wider);
}

.footer-bottom a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-bottom a:hover {
  color: var(--color-cyan);
}

.footer-bottom-links {
  display: flex;
  gap: var(--space-lg);
}

/* ─── Footer Watermark ─── */
.footer-watermark {
  position: absolute;
  bottom: var(--space-xl);
  left: 0;
  right: 0;
  font-family: var(--font-heading);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  color: rgba(226, 5, 18, 0.03);
  line-height: 1;
  text-align: center;
  pointer-events: none;
  overflow: hidden;
  white-space: nowrap;
}

/* ─── Footer Responsive ─── */
@media (max-width: 1024px) {
  .footer-inner {
    flex-wrap: wrap;
  }

  .footer-links-group {
    flex-wrap: wrap;
    gap: var(--space-2xl);
  }
}

@media (max-width: 767px) {
  .footer-inner {
    flex-direction: column;
    gap: var(--space-2xl);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }

  .footer-bottom-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
  }

  .footer {
    padding-bottom: calc(var(--space-xl) + 60px);
  }
}


/* ═══════════════════════════════════════════
   6. COOKIE BANNER — Dark Glass, Cyan accent
   ═══════════════════════════════════════════ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  color: var(--color-text);
  padding: var(--space-lg) var(--space-xl);
  z-index: var(--z-modal);
  transform: translateY(100%);
  transition: transform var(--transition-slow);
  border-top: 1px solid var(--color-border);
}

.cookie-banner.visible {
  transform: translateY(0);
}

.cookie-banner .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
}

.cookie-banner p {
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  margin: 0;
}

.cookie-banner p a {
  color: var(--color-cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition-fast);
}

.cookie-banner p a:hover {
  color: var(--color-cyan-light);
}

.cookie-banner-actions {
  display: flex;
  gap: var(--space-md);
  flex-shrink: 0;
}

/* Mobile cookie banner */
@media (max-width: 767px) {
  .cookie-banner .container {
    flex-direction: column;
    text-align: center;
  }

  .cookie-banner-actions {
    width: 100%;
    justify-content: center;
  }
}


/* ═══════════════════════════════════════════
   7. STAT ITEMS — Cyan Numbers
   Industrial counters
   ═══════════════════════════════════════════ */
.stat-item {
  text-align: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  color: var(--color-cyan);
  display: block;
  line-height: 1;
}

.stat-label {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  margin-top: var(--space-sm);
  display: block;
}

/* Stat with divider line below number */
.stat-number-lined::after {
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  background: var(--color-cyan);
  margin: var(--space-sm) auto 0;
  opacity: 0.5;
}

/* Stat group row */
.stats-row {
  display: flex;
  justify-content: space-around;
  gap: var(--space-xl);
}

@media (max-width: 767px) {
  .stats-row {
    flex-wrap: wrap;
    gap: var(--space-lg);
  }

  .stats-row .stat-item {
    flex: 1 1 45%;
  }
}


/* ═══════════════════════════════════════════
   8. TESTIMONIALS — Cyan Border + Quote Mark
   Industrial card with left accent
   ═══════════════════════════════════════════ */
.testimonial-card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-cyan);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  position: relative;
}

.testimonial-quote-mark {
  font-family: var(--font-heading);
  font-size: 5rem;
  line-height: 1;
  color: var(--color-cyan);
  opacity: 0.15;
  position: absolute;
  top: var(--space-md);
  right: var(--space-xl);
  pointer-events: none;
}

.testimonial-text {
  font-size: var(--fs-lg);
  font-style: italic;
  color: var(--color-text);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--space-xl);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.testimonial-avatar {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--color-cyan);
}

.testimonial-info {
  display: flex;
  flex-direction: column;
}

.testimonial-name {
  font-weight: var(--fw-semibold);
  color: var(--color-white);
  font-size: var(--fs-sm);
}

.testimonial-role {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

/* Testimonial grid for multiple cards */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-xl);
}

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

  .testimonial-card {
    padding: var(--space-xl);
  }
}


/* ═══════════════════════════════════════════
   9. BADGE / TAG — Cyan accented
   ═══════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.35rem 1rem;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  border-radius: 100px;
  border: 1px solid var(--color-border-cyan);
  color: var(--color-cyan);
  background: var(--color-cyan-glass);
}

.badge-primary {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(226, 5, 18, 0.08);
}

.badge-green {
  border-color: var(--color-green);
  color: var(--color-green);
  background: var(--color-green-glow);
}

.badge-muted {
  border-color: var(--color-border);
  color: var(--color-text-muted);
  background: transparent;
}

.badge-sm {
  padding: 0.2rem 0.6rem;
  font-size: var(--fs-xxs);
}

/* Badge with dot indicator */
.badge-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}


/* ═══════════════════════════════════════════
   10. MODAL / DIALOG — Industrial overlay
   ═══════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  z-index: calc(var(--z-modal) + 1);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s var(--ease-out-expo);
}

.modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-xl);
  border-bottom: 1px solid var(--color-border);
}

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  margin: 0;
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  border-color: var(--color-cyan);
  color: var(--color-cyan);
}

.modal-close svg {
  width: 16px;
  height: 16px;
}

.modal-body {
  padding: var(--space-xl);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-xl);
  border-top: 1px solid var(--color-border);
}


/* ═══════════════════════════════════════════
   11. TOOLTIPS
   ═══════════════════════════════════════════ */
.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--fs-xxs);
  font-weight: var(--fw-medium);
  padding: var(--space-xs) var(--space-sm);
  white-space: nowrap;
  border: 1px solid var(--color-border);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
  z-index: var(--z-dropdown);
}

.tooltip:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}


/* ═══════════════════════════════════════════
   12. DIVIDERS & SEPARATORS
   ═══════════════════════════════════════════ */
.divider {
  height: 1px;
  background: var(--color-border);
  border: none;
  margin: var(--space-xl) 0;
}

.divider-cyan {
  background: linear-gradient(90deg, transparent, var(--color-cyan), transparent);
  opacity: 0.3;
}

.divider-vertical {
  width: 1px;
  height: 100%;
  background: var(--color-border);
}


/* ═══════════════════════════════════════════
   13. LOADING / SKELETON STATES
   ═══════════════════════════════════════════ */
.skeleton {
  background: var(--color-surface);
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 0, 0, 0.04) 50%,
    transparent 100%
  );
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.skeleton-text {
  height: 14px;
  margin-bottom: var(--space-sm);
  width: 80%;
}

.skeleton-text:last-child {
  width: 60%;
}

.skeleton-heading {
  height: 24px;
  width: 50%;
  margin-bottom: var(--space-md);
}

.skeleton-image {
  width: 100%;
  height: 200px;
}


/* ═══════════════════════════════════════════
   14. PROGRESS BAR
   ═══════════════════════════════════════════ */
.progress {
  width: 100%;
  height: 4px;
  background: var(--color-surface);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--color-cyan);
  transition: width 0.6s var(--ease-out-expo);
}

.progress-bar-primary {
  background: var(--color-primary);
}

.progress-bar-green {
  background: var(--color-green);
}

/* Animated indeterminate progress */
.progress-indeterminate .progress-bar {
  width: 30%;
  animation: progress-slide 1.5s var(--ease-in-out) infinite;
}

@keyframes progress-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}


/* ═══════════════════════════════════════════
   15. SCROLL PROGRESS BAR (fixed top bar)
   ═══════════════════════════════════════════ */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--color-cyan);
  z-index: calc(var(--z-sidenav) + 1);
  transition: width 0.1s linear;
}


/* ═══════════════════════════════════════════
   16. TOAST NOTIFICATIONS
   ═══════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  z-index: var(--z-modal);
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-cyan);
  color: var(--color-text);
  font-size: var(--fs-sm);
  min-width: 280px;
  max-width: 400px;
  transform: translateX(120%);
  transition: transform 0.4s var(--ease-out-expo);
}

.toast.visible {
  transform: translateX(0);
}

.toast-success {
  border-left-color: var(--color-green);
}

.toast-error {
  border-left-color: var(--color-error);
}

.toast-warning {
  border-left-color: var(--color-warning);
}

.toast-close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: var(--space-xs);
  transition: color var(--transition-fast);
}

.toast-close:hover {
  color: var(--color-text);
}

@media (max-width: 767px) {
  .toast-container {
    left: var(--space-md);
    right: var(--space-md);
    bottom: calc(60px + var(--space-md));
  }

  .toast {
    min-width: 0;
    max-width: 100%;
    transform: translateY(120%);
  }

  .toast.visible {
    transform: translateY(0);
  }
}


/* ═══════════════════════════════════════════
   17. TABS — Industrial style
   ═══════════════════════════════════════════ */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--color-border);
}

.tab {
  padding: var(--space-md) var(--space-lg);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider);
  color: var(--color-text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: -1px;
}

.tab:hover {
  color: var(--color-text);
}

.tab.active {
  color: var(--color-cyan);
  border-bottom-color: var(--color-cyan);
}

.tab-panel {
  display: none;
  padding: var(--space-xl) 0;
}

.tab-panel.active {
  display: block;
}


/* ═══════════════════════════════════════════
   18. ACCORDION
   ═══════════════════════════════════════════ */
.accordion-item {
  border-bottom: 1px solid var(--color-border);
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-lg) 0;
  background: none;
  border: none;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  text-align: left;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.accordion-header:hover {
  color: var(--color-cyan);
}

.accordion-header svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
  color: var(--color-text-muted);
}

.accordion-item.open .accordion-header svg {
  transform: rotate(180deg);
  color: var(--color-cyan);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-out-expo);
}

.accordion-item.open .accordion-body {
  max-height: 500px;
}

.accordion-content {
  padding: 0 0 var(--space-lg);
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  line-height: var(--lh-relaxed);
}


/* ═══════════════════════════════════════════
   19. BREADCRUMBS
   ═══════════════════════════════════════════ */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--fs-xxs);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
}

.breadcrumbs a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumbs a:hover {
  color: var(--color-cyan);
}

.breadcrumbs-separator {
  color: var(--color-text-muted);
  opacity: 0.5;
}

.breadcrumbs-current {
  color: var(--color-text);
  font-weight: var(--fw-semibold);
}


/* ═══════════════════════════════════════════
   20. BACK TO TOP BUTTON
   ═══════════════════════════════════════════ */
.back-to-top {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-normal);
  z-index: var(--z-sticky);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  border-color: var(--color-cyan);
  color: var(--color-cyan);
  background: var(--color-cyan-glass);
}

.back-to-top svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 1024px) {
  .back-to-top {
    bottom: calc(60px + var(--space-md));
  }
}


/* ═══════════════════════════════════════════
   21. UTILITY COMPONENT HELPERS
   ═══════════════════════════════════════════ */

/* ─── Glass panel ─── */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
}

/* ─── Cyan glow border effect ─── */
.glow-border {
  border: 1px solid var(--color-border-cyan);
  box-shadow: var(--shadow-glow-cyan);
}

/* ─── Scanline overlay (decorative) ─── */
.scanlines::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
  z-index: 1;
}

/* ─── Monospace label (tech readout) ─── */
.mono-label {
  font-family: 'Courier New', monospace;
  font-size: var(--fs-xxs);
  color: var(--color-cyan);
  text-transform: uppercase;
  letter-spacing: var(--ls-widest);
}

/* ─── Section eyebrow text ─── */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--ls-widest);
  color: var(--color-cyan);
  margin-bottom: var(--space-md);
  display: block;
}

/* ─── Section heading style ─── */
.section-title {
  font-family: var(--font-heading);
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  color: var(--color-text);
  line-height: var(--lh-heading);
  text-transform: uppercase;
  letter-spacing: var(--ls-tight);
}

.section-subtitle {
  font-size: var(--fs-md);
  color: var(--color-text-secondary);
  line-height: var(--lh-relaxed);
  max-width: 600px;
}

/* ─── Truncate text ─── */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
