/*
 * IT-Krug.de — Light Modern Theme
 * (c) 2026 snxRCS / IT Service Tobias Krug
 *
 * Scoped under body.nxd-website (Jinja templates) and
 * unscoped overrides for Frappe Website Builder pages.
 */

/* ================================================================
   1. Design Tokens
   ================================================================ */
:root {
  /* Backgrounds */
  --nxd-bg:          #ffffff;
  --nxd-bg-alt:      #f8fafc;
  --nxd-bg-muted:    #f1f5f9;
  --nxd-bg-dark:     #0f172a;
  --nxd-bg-dark-alt: #1e293b;

  /* Accent — Teal/Cyan */
  --nxd-accent:       #06b6d4;
  --nxd-accent-hover: #0891b2;
  --nxd-accent-light: #ecfeff;
  --nxd-accent-ring:  rgba(6,182,212,0.25);
  --nxd-accent-glow:  rgba(6,182,212,0.35);

  /* Status */
  --nxd-success:     #10b981;
  --nxd-success-bg:  #ecfdf5;
  --nxd-success-fg:  #065f46;
  --nxd-warning:     #f59e0b;
  --nxd-warning-bg:  #fffbeb;
  --nxd-warning-fg:  #92400e;
  --nxd-error:       #ef4444;
  --nxd-error-bg:    #fef2f2;
  --nxd-error-fg:    #991b1b;
  --nxd-info:        #06b6d4;
  --nxd-info-bg:     #ecfeff;
  --nxd-info-fg:     #155e75;

  /* Text */
  --nxd-text:        #0f172a;
  --nxd-text-body:   #334155;
  --nxd-text-muted:  #64748b;
  --nxd-text-faint:  #94a3b8;
  --nxd-text-inv:    #ffffff;
  --nxd-text-link:   #0e7490;

  /* Borders */
  --nxd-border:       #e2e8f0;
  --nxd-border-light: #f1f5f9;

  /* Shadows */
  --nxd-shadow-xs:  0 1px 2px rgba(0,0,0,0.05);
  --nxd-shadow-sm:  0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --nxd-shadow-md:  0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --nxd-shadow-lg:  0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --nxd-shadow-xl:  0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);

  /* Radii */
  --nxd-radius-sm:   6px;
  --nxd-radius-md:   8px;
  --nxd-radius-lg:   12px;
  --nxd-radius-xl:   16px;
  --nxd-radius-2xl:  24px;
  --nxd-radius-full: 9999px;

  /* Transition */
  --nxd-ease: cubic-bezier(.4,0,.2,1);
  --nxd-dur:  0.25s;

  /* Typography */
  --nxd-font:      'Inter', system-ui, -apple-system, sans-serif;
  --nxd-font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Layout */
  --nxd-max-w:    1200px;
  --nxd-nav-h:    72px;

  /* Aliases (used in templates) */
  --nxd-text-primary:   var(--nxd-text);
  --nxd-text-secondary: var(--nxd-text-muted);
  --nxd-border-color:   var(--nxd-border);
  --nxd-accent-muted:   rgba(6, 182, 212, 0.15);
}


/* ================================================================
   2. Global Body + Typography
   ================================================================ */
body.nxd-website {
  margin: 0; padding: 0;
  font-family: var(--nxd-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--nxd-text-body);
  background: var(--nxd-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.nxd-website *, body.nxd-website *::before, body.nxd-website *::after {
  box-sizing: border-box;
}

body.nxd-website h1, body.nxd-website h2, body.nxd-website h3,
body.nxd-website h4, body.nxd-website h5, body.nxd-website h6 {
  color: var(--nxd-text);
  line-height: 1.25;
  font-weight: 700;
}

body.nxd-website a {
  color: var(--nxd-text-link);
  text-decoration: none;
  transition: color var(--nxd-dur) var(--nxd-ease);
}
body.nxd-website a:hover { color: var(--nxd-accent); }


/* ================================================================
   3. Frappe Reset — Hide defaults, neutralize spacing
   ================================================================ */

/* Hide Frappe navbar/footer on Jinja pages (we use our own) */
body.nxd-website .navbar.navbar-default,
body.nxd-website .web-footer,
body.nxd-website footer.web-footer,
body.nxd-website .footer-info,
body.nxd-website [data-page-container] > .container > nav.navbar {
  display: none !important;
}
body.nxd-website .page-container,
body.nxd-website [data-page-container] {
  padding-top: 0 !important;
}

/* Hide "Powered by" everywhere */
.footer-powered { display: none !important; }

/* Neutralize Frappe page wrappers */
.page-content-wrapper { padding: 0; }
.page_content > .section:first-child { margin-top: 0; }


/* ================================================================
   4. Navbar — Frappe Override + Custom (.nxd-navbar)
   ================================================================ */

/* --- Frappe WB Navbar Override --- */
.navbar.navbar-light {
  background: rgba(255,255,255,0.8) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  box-shadow: none;
  transition: box-shadow var(--nxd-dur) var(--nxd-ease),
              border-color var(--nxd-dur) var(--nxd-ease);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.navbar.navbar-light.scrolled {
  box-shadow: var(--nxd-shadow-sm);
  border-bottom-color: var(--nxd-border);
}
.navbar .navbar-brand {
  font-weight: 700;
  color: var(--nxd-text) !important;
  font-size: 1.1rem;
}
.navbar .nav-link {
  color: var(--nxd-text-body) !important;
  font-weight: 500;
  font-size: 0.9rem;
  position: relative;
  transition: color var(--nxd-dur) var(--nxd-ease);
}
.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: var(--nxd-accent) !important;
}
/* Animated underline on nav links (exclude dropdown toggles + login button) */
.navbar .nav-link:not(.dropdown-toggle):not(.btn-login-area)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--nxd-accent);
  transition: width 0.3s var(--nxd-ease), left 0.3s var(--nxd-ease);
}
.navbar .nav-link:not(.dropdown-toggle):not(.btn-login-area):hover::after {
  width: 100%;
  left: 0;
}
/* Login/Portal button in Frappe navbar */
.navbar .btn-login-area,
.navbar .nav-link.btn-login-area {
  background: var(--nxd-accent) !important;
  color: var(--nxd-text-inv) !important;
  border-radius: var(--nxd-radius-full);
  padding: 0.4rem 1.2rem !important;
  font-weight: 600;
  font-size: 0.85rem;
  transition: background var(--nxd-dur) var(--nxd-ease), transform var(--nxd-dur) var(--nxd-ease);
}
.navbar .btn-login-area::after { display: none; }
.navbar .btn-login-area:hover {
  background: var(--nxd-accent-hover) !important;
  transform: scale(1.02);
}
/* Dropdown styling */
.navbar .dropdown-menu {
  border: 1px solid var(--nxd-border);
  border-radius: var(--nxd-radius-md);
  box-shadow: var(--nxd-shadow-lg);
  padding: 0.5rem;
  background: var(--nxd-bg);
}
.navbar .dropdown-item {
  border-radius: var(--nxd-radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  color: var(--nxd-text-body);
  transition: background var(--nxd-dur) var(--nxd-ease);
}
.navbar .dropdown-item:hover {
  background: var(--nxd-bg-alt);
  color: var(--nxd-accent);
}

/* --- Custom Jinja Navbar (.nxd-navbar) --- */
.nxd-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nxd-nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--nxd-dur) var(--nxd-ease),
              border-color var(--nxd-dur) var(--nxd-ease);
}
.nxd-navbar.scrolled {
  box-shadow: var(--nxd-shadow-sm);
  border-bottom-color: var(--nxd-border);
}
.nxd-navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.nxd-navbar-brand:hover { text-decoration: none; }
.nxd-brand-icon { height: 44px; width: auto; }
.nxd-brand-text-group {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.nxd-brand-name {
  font-family: var(--nxd-font);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  color: var(--nxd-text);
}
.nxd-brand-tagline {
  font-family: var(--nxd-font);
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  color: var(--nxd-text-muted);
}

/* Icon/logo visibility: blue on light bg, white on dark bg */
.nxd-logo-dark { display: none; }
.nxd-logo-light { display: inline-block; }
body.nxd-website .nxd-logo-light { display: none; }
body.nxd-website .nxd-logo-dark { display: inline-block; }
.nxd-navbar-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0; padding: 0;
}
.nxd-navbar-links a {
  color: var(--nxd-text-body);
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  transition: color var(--nxd-dur) var(--nxd-ease);
}
.nxd-navbar-links a:hover,
.nxd-navbar-links a.active {
  color: var(--nxd-accent);
}
.nxd-navbar-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--nxd-accent);
  transition: width 0.3s var(--nxd-ease), left 0.3s var(--nxd-ease);
}
.nxd-navbar-links a:hover::after,
.nxd-navbar-links a.active::after {
  width: 100%;
  left: 0;
}
.nxd-navbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.nxd-navbar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--nxd-text);
  font-size: 1.5rem;
  cursor: pointer;
}


/* ================================================================
   5. Hero Sections — Frappe Override
   ================================================================ */
.hero-with-right-image {
  background: var(--nxd-bg) !important;
  padding: 5rem 0 !important;
}
.hero-with-right-image .hero-content {
  padding-right: 2rem;
}
.hero-title {
  font-size: 3rem !important;
  font-weight: 800 !important;
  color: var(--nxd-text) !important;
  line-height: 1.15 !important;
}
.hero-subtitle {
  font-size: 1.125rem !important;
  color: var(--nxd-text-body) !important;
  line-height: 1.7 !important;
}
.hero-image,
.image-with-blur.hero-image {
  border-radius: var(--nxd-radius-xl) !important;
  box-shadow: var(--nxd-shadow-lg) !important;
}
/* Hero with simple (no image) */
.section .hero-content {
  text-align: center;
}


/* ================================================================
   6. Sections — Frappe Override
   ================================================================ */
.section {
  background: var(--nxd-bg);
}
.section.section-padding-top { padding-top: 5rem; }
.section.section-padding-bottom { padding-bottom: 5rem; }

/* Alternate section backgrounds */
.section:nth-child(even) {
  background: var(--nxd-bg-alt);
}

.section-title {
  font-size: 2.25rem !important;
  font-weight: 800 !important;
  color: var(--nxd-text) !important;
}
.section-description,
.subtitle {
  font-size: 1.05rem !important;
  color: var(--nxd-text-muted) !important;
}


/* ================================================================
   7. Cards — Frappe Override
   ================================================================ */
.card, .card.card-sm {
  background: var(--nxd-bg) !important;
  border: 1px solid var(--nxd-border) !important;
  border-radius: var(--nxd-radius-lg) !important;
  box-shadow: var(--nxd-shadow-xs);
  transition: transform 0.3s var(--nxd-ease), box-shadow 0.3s var(--nxd-ease) !important;
  overflow: hidden;
}
.card:hover, .card.card-sm:hover {
  transform: translateY(-4px);
  box-shadow: var(--nxd-shadow-md);
}
.card .card-body {
  padding: 1.25rem !important;
}
.card .card-title {
  font-size: 1.05rem !important;
  font-weight: 600 !important;
  color: var(--nxd-text) !important;
}
.card .card-text {
  font-size: 0.9rem !important;
  color: var(--nxd-text-muted) !important;
}
.card .card-img-top,
.image-with-blur.card-img-top {
  border-radius: 0 !important;
  height: 180px;
  object-fit: cover;
}
/* Section with cards container */
.section-with-cards .card {
  height: 100%;
}


/* ================================================================
   8. Features + Split Section — Frappe Override
   ================================================================ */
.section-with-features {
  background: var(--nxd-bg-alt);
}
.section-feature {
  text-align: center;
  padding: 1.5rem;
}
.section-feature .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--nxd-radius-lg);
  background: var(--nxd-accent-light);
  color: var(--nxd-accent);
  margin-bottom: 1rem;
}
.feature-title {
  font-size: 1.05rem !important;
  font-weight: 600 !important;
  color: var(--nxd-text) !important;
}
.feature-content {
  font-size: 0.9rem !important;
  color: var(--nxd-text-muted) !important;
  line-height: 1.6;
}

/* Split section with image */
.split-section-with-image {
  align-items: center !important;
}
.split-section-content .title {
  font-size: 2rem !important;
  font-weight: 800 !important;
  color: var(--nxd-text) !important;
}
.split-section-content p,
.split-section-content .subtitle {
  color: var(--nxd-text-body) !important;
}
.split-section-image,
.image-with-blur.split-section-image {
  border-radius: var(--nxd-radius-xl) !important;
  box-shadow: var(--nxd-shadow-lg) !important;
}


/* ================================================================
   9. Buttons — Frappe Override + Custom
   ================================================================ */
.btn.btn-primary, .btn-primary, .btn.btn-lg.btn-primary {
  background: var(--nxd-accent) !important;
  border-color: var(--nxd-accent) !important;
  color: var(--nxd-text-inv) !important;
  font-weight: 600;
  border-radius: var(--nxd-radius-md);
  box-shadow: 0 4px 14px var(--nxd-accent-glow);
  transition: all var(--nxd-dur) var(--nxd-ease);
}
.btn.btn-primary:hover, .btn-primary:hover {
  background: var(--nxd-accent-hover) !important;
  border-color: var(--nxd-accent-hover) !important;
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 6px 20px var(--nxd-accent-glow);
}
.btn.btn-primary-light, .btn-primary-light, .btn.btn-lg.btn-primary-light {
  background: transparent !important;
  border: 1.5px solid var(--nxd-accent) !important;
  color: var(--nxd-accent) !important;
  font-weight: 600;
  border-radius: var(--nxd-radius-md);
  transition: all var(--nxd-dur) var(--nxd-ease);
}
.btn.btn-primary-light:hover, .btn-primary-light:hover {
  background: var(--nxd-accent-light) !important;
  transform: translateY(-1px);
}
/* Custom buttons */
.btn-nxd-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--nxd-text-inv);
  background: var(--nxd-accent);
  border: none;
  border-radius: var(--nxd-radius-md);
  cursor: pointer;
  box-shadow: 0 4px 14px var(--nxd-accent-glow);
  transition: all var(--nxd-dur) var(--nxd-ease);
}
.btn-nxd-primary:hover {
  background: var(--nxd-accent-hover);
  color: var(--nxd-text-inv);
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 6px 20px var(--nxd-accent-glow);
}
.btn-nxd-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--nxd-accent);
  background: transparent;
  border: 1.5px solid var(--nxd-accent);
  border-radius: var(--nxd-radius-md);
  cursor: pointer;
  transition: all var(--nxd-dur) var(--nxd-ease);
}
.btn-nxd-outline:hover {
  background: var(--nxd-accent-light);
  color: var(--nxd-accent);
  transform: translateY(-1px);
}


/* ================================================================
   10. CTA Section — Frappe Override
   ================================================================ */
.section-cta {
  background: linear-gradient(135deg, var(--nxd-bg-dark) 0%, var(--nxd-bg-dark-alt) 100%) !important;
  position: relative;
  overflow: hidden;
}
.section-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 600px 400px at 30% 50%, rgba(6,182,212,0.12), transparent 70%);
  pointer-events: none;
}
.section-cta .section-cta-container {
  position: relative;
  z-index: 1;
}
.section-cta .title,
.section-cta h2 {
  color: var(--nxd-text-inv) !important;
}
.section-cta .subtitle,
.section-cta p {
  color: #94a3b8 !important;
}
.section-cta .btn-primary {
  background: var(--nxd-accent) !important;
}


/* ================================================================
   11. WB Footer — Dark style (matching Jinja .nxd-footer)
   ================================================================ */

/* Footer link columns — clean equal-width grid */
.footer-grouped-links {
  padding: 0;
  max-width: 800px;
  margin: 0 auto;
}
.footer-grouped-links .row {
  display: flex !important;
  justify-content: center;
  gap: 3rem;
}
/* Override Frappe's uneven col-sm-2/col-sm-4 with equal flex */
.footer-grouped-links .footer-group {
  flex: 1 1 0 !important;
  max-width: none !important;
  width: auto !important;
  margin-bottom: 0;
  padding: 0 !important;
}
.footer-group-label {
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--nxd-text) !important;
  margin-bottom: 0.75rem !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  display: block;
}
.footer-group-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: block !important;
  height: auto !important;
  max-height: none !important;
  flex-wrap: nowrap !important;
}
.footer-group-links li,
.footer-group-links .footer-child-item {
  display: block !important;
  margin-bottom: 0.25rem;
}
.footer-group-links a {
  color: var(--nxd-text-muted) !important;
  font-size: 0.875rem !important;
  transition: color var(--nxd-dur) var(--nxd-ease);
  display: block;
  padding: 0.2rem 0;
  text-decoration: none !important;
}
.footer-group-links a:hover,
.footer-child-item:hover {
  color: var(--nxd-accent) !important;
}
/* Remove white gap before footer */
.page_content > .section:last-child {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
.footer-powered { display: none !important; }

/* Custom Jinja footer (.nxd-footer) */
.nxd-footer {
  background: var(--nxd-bg-dark);
  border-top: none;
  padding: 4rem 2rem 2rem;
}
.nxd-footer-inner {
  max-width: var(--nxd-max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 3rem;
}
.nxd-footer-brand {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--nxd-text-inv);
  margin-bottom: 0.75rem;
}
.nxd-footer-brand p {
  color: #94a3b8;
  font-size: 0.9rem;
  font-weight: 400;
}
/* Force white icon + text on dark footer background */
.nxd-footer .nxd-logo-light { display: none !important; }
.nxd-footer .nxd-logo-dark { display: inline-block !important; }
.nxd-footer .nxd-brand-name { color: var(--nxd-text-inv); }
.nxd-footer .nxd-brand-tagline { color: #94a3b8; }
.nxd-footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--nxd-text-inv);
  margin: 0 0 1rem;
}
.nxd-footer-col ul { list-style: none; margin: 0; padding: 0; }
.nxd-footer-col ul li { margin-bottom: 0.5rem; }
.nxd-footer-col ul a {
  color: #94a3b8;
  font-size: 0.875rem;
  transition: color var(--nxd-dur) var(--nxd-ease);
}
.nxd-footer-col ul a:hover { color: var(--nxd-text-inv); }
.nxd-footer-bottom {
  max-width: var(--nxd-max-w);
  margin: 3rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #64748b;
  font-size: 0.8rem;
}
.nxd-footer-bottom a { color: #64748b; }
.nxd-footer-bottom a:hover { color: #94a3b8; }

footer.web-footer,
.web-footer {
  display: block !important;
  flex-shrink: 0 !important;
  height: auto !important;
  background: var(--nxd-bg-dark) !important;
  color: #94a3b8;
  padding: 7rem 0 0 !important;
  margin-top: 0 !important;
  border-top: none !important;
}
footer.web-footer .container,
.web-footer .container { max-width: var(--nxd-max-w); }
footer.web-footer .footer-logo-extension,
.web-footer .footer-logo-extension { margin-bottom: 1.5rem; display: block !important; }
footer.web-footer .footer-logo,
.web-footer .footer-logo { display: inline-block !important; height: 44px; width: auto; margin-bottom: 0.75rem; }
footer.web-footer .footer-group-label,
.web-footer .footer-group-label {
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--nxd-text-inv) !important;
  margin: 0 0 1rem !important;
}
footer.web-footer .footer-group-links a,
.web-footer .footer-group-links a {
  color: #94a3b8 !important;
  font-size: 0.875rem;
}
footer.web-footer .footer-group-links a:hover,
.web-footer .footer-group-links a:hover { color: var(--nxd-text-inv) !important; }
footer.web-footer .footer-child-item,
.web-footer .footer-child-item { margin-bottom: 0.5rem; }
footer.web-footer .footer-info,
.web-footer .footer-info {
  display: block !important;
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid #1e293b !important;
  color: #64748b !important;
  font-size: 0.8rem;
}
footer.web-footer .footer-powered,
.web-footer .footer-powered { color: #64748b !important; }
footer.web-footer .footer-powered a,
.web-footer .footer-powered a { color: #64748b !important; }
footer.web-footer .footer-links,
.web-footer .footer-links { display: none !important; }

/* Section with CTA — seamless dark transition to footer */
section:has(.section-cta-container) {
  background: var(--nxd-bg-dark) !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* Section with CTA — link readability */
.section-cta .action a {
  color: var(--nxd-accent, #22d3ee) !important;
  font-weight: 600;
}
.section-cta .action a:hover {
  color: #fff !important;
}
.section-cta .action .icon {
  stroke: var(--nxd-accent, #22d3ee);
}
.section-cta .action a:hover .icon {
  stroke: #fff;
}

/* ================================================================
   11b. Hide Frappe Avatar Dropdown (global)
   ================================================================ */
#website-post-login { display: none !important; }


/* ================================================================
   12. Form Controls — Frappe Override
   ================================================================ */
.form-control {
  background: var(--nxd-bg) !important;
  border: 1px solid var(--nxd-border) !important;
  border-radius: var(--nxd-radius-md) !important;
  color: var(--nxd-text) !important;
  font-family: var(--nxd-font) !important;
  font-size: 0.9rem !important;
  padding: 0.7rem 1rem !important;
  transition: border-color var(--nxd-dur) var(--nxd-ease),
              box-shadow var(--nxd-dur) var(--nxd-ease) !important;
}
.form-control:focus {
  border-color: var(--nxd-accent) !important;
  box-shadow: 0 0 0 3px var(--nxd-accent-ring) !important;
  outline: none !important;
}
.form-control::placeholder {
  color: var(--nxd-text-faint) !important;
}
.form-label {
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  color: var(--nxd-text) !important;
  margin-bottom: 0.4rem !important;
}
.form-check-input {
  border-color: var(--nxd-border) !important;
  background-color: var(--nxd-bg) !important;
}
.form-check-input:checked {
  background-color: var(--nxd-accent) !important;
  border-color: var(--nxd-accent) !important;
}
.form-check-label {
  color: var(--nxd-text-body) !important;
  font-size: 0.85rem;
}

/* Jinja form overrides */
body.nxd-website .nxd-form input[type="text"],
body.nxd-website .nxd-form input[type="email"],
body.nxd-website .nxd-form input[type="password"],
body.nxd-website .nxd-form input[type="number"],
body.nxd-website .nxd-form input[type="tel"],
body.nxd-website .nxd-form input[type="url"],
body.nxd-website .nxd-form textarea,
body.nxd-website .nxd-form select {
  width: 100%;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  font-family: var(--nxd-font);
  color: var(--nxd-text);
  background: var(--nxd-bg);
  border: 1px solid var(--nxd-border);
  border-radius: var(--nxd-radius-md);
  transition: border-color var(--nxd-dur) var(--nxd-ease), box-shadow var(--nxd-dur) var(--nxd-ease);
  outline: none;
}

body.nxd-website .nxd-form input:focus,
body.nxd-website .nxd-form textarea:focus,
body.nxd-website .nxd-form select:focus {
  border-color: var(--nxd-accent);
  box-shadow: 0 0 0 3px var(--nxd-accent-ring);
}

body.nxd-website .nxd-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--nxd-text);
  margin-bottom: 0.4rem;
}

body.nxd-website .nxd-form .form-group {
  margin-bottom: 1.25rem;
}

body.nxd-website .nxd-form ::placeholder {
  color: var(--nxd-text-faint);
}


/* ================================================================
   13. Breadcrumbs + Page Headers
   ================================================================ */
/* Hide breadcrumbs on Jinja pages (redundant with H1 headings) */
body.nxd-website .page-breadcrumbs { display: none !important; }

/* Breadcrumbs on WB/Frappe pages — clean styling */
.page-breadcrumbs {
  padding: 0.75rem 0 !important;
}
.page-breadcrumbs .breadcrumb {
  font-size: 0.8rem;
  color: var(--nxd-text-muted);
}
.page-breadcrumbs a {
  color: var(--nxd-text-muted) !important;
}
.page-breadcrumbs a:hover {
  color: var(--nxd-accent) !important;
}
.page-header h2 {
  font-size: 2.25rem !important;
  font-weight: 800 !important;
  color: var(--nxd-text) !important;
}


/* ================================================================
   14. Frappe Dialog/Toast Override
   ================================================================ */
.modal-content {
  border-radius: var(--nxd-radius-lg) !important;
  border: 1px solid var(--nxd-border) !important;
  box-shadow: var(--nxd-shadow-xl) !important;
}
.modal-header {
  border-bottom: 1px solid var(--nxd-border) !important;
}
.modal-footer {
  border-top: 1px solid var(--nxd-border) !important;
}
.msgprint {
  font-family: var(--nxd-font) !important;
}
.alert-warning { background: var(--nxd-warning-bg) !important; color: var(--nxd-warning-fg) !important; border-color: #fde68a !important; }
.alert-danger  { background: var(--nxd-error-bg) !important;   color: var(--nxd-error-fg) !important;   border-color: #fecaca !important; }
.alert-success { background: var(--nxd-success-bg) !important; color: var(--nxd-success-fg) !important; border-color: #a7f3d0 !important; }
.alert-info    { background: var(--nxd-info-bg) !important;    color: var(--nxd-info-fg) !important;    border-color: #a5f3fc !important; }


/* ================================================================
   15. Portal Layout + Sidebar
   ================================================================ */
.nxd-portal-container {
  display: flex;
  min-height: calc(100vh - var(--nxd-nav-h));
  max-width: var(--nxd-max-w);
  margin: 0 auto;
  padding: 2rem;
  gap: 2rem;
}
.nxd-portal-sidebar {
  width: 260px;
  flex-shrink: 0;
}
.nxd-portal-sidebar nav {
  position: sticky;
  top: calc(var(--nxd-nav-h) + 2rem);
}

/* Sidebar section label */
.sidebar-section {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--nxd-text-muted);
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.25rem;
}
.sidebar-section ~ .sidebar-section {
  margin-top: 1rem;
}

/* Sidebar toggle — hidden on desktop, shown in mobile media query */
.nxd-sidebar-toggle { display: none; }

/* Sidebar items */
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--nxd-radius-md);
  color: var(--nxd-text-body);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
}
.sidebar-item:hover {
  background: var(--nxd-bg-alt);
  color: var(--nxd-accent);
}
.sidebar-item.active {
  background: var(--nxd-accent-light);
  color: var(--nxd-accent);
  font-weight: 600;
}

/* Portal sidebar nav links (fallback for direct <a> tags) */
.nxd-portal-sidebar nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--nxd-radius-md);
  color: var(--nxd-text-body);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background var(--nxd-dur) var(--nxd-ease), color var(--nxd-dur) var(--nxd-ease);
}
.nxd-portal-sidebar nav a:hover {
  background: var(--nxd-bg-alt);
  color: var(--nxd-accent);
}
.nxd-portal-sidebar nav a.active {
  background: var(--nxd-accent-light);
  color: var(--nxd-accent);
  font-weight: 600;
}

.nxd-portal-main {
  flex: 1;
  min-width: 0;
}
.nxd-portal-main h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 1.5rem;
}


/* ================================================================
   16. Stat Cards (Dashboard)
   ================================================================ */
.nxd-stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.nxd-stat-card {
  background: var(--nxd-bg);
  border: 1px solid var(--nxd-border);
  border-radius: var(--nxd-radius-lg);
  padding: 1.5rem;
  transition: transform 0.3s var(--nxd-ease), box-shadow 0.3s var(--nxd-ease);
}
.nxd-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--nxd-shadow-md);
}
.nxd-stat-card .stat-value,
.nxd-stat-card .value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--nxd-accent);
  line-height: 1.2;
}
.nxd-stat-card .stat-label,
.nxd-stat-card .label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--nxd-text-muted);
  margin-top: 0.25rem;
}
.nxd-stat-card .trend {
  font-size: 0.8rem;
  margin-top: 0.25rem;
}
.nxd-stat-card .trend.up   { color: var(--nxd-success); }
.nxd-stat-card .trend.down { color: var(--nxd-error); }


/* ================================================================
   17. Tables
   ================================================================ */
.nxd-table-wrapper {
  background: var(--nxd-bg);
  border: 1px solid var(--nxd-border);
  border-radius: var(--nxd-radius-lg);
  overflow: hidden;
}
.nxd-table {
  width: 100%;
  border-collapse: collapse;
}
.nxd-table thead {
  background: var(--nxd-bg-alt);
}
.nxd-table th {
  padding: 0.85rem 1.25rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--nxd-text-muted);
  border-bottom: 1px solid var(--nxd-border);
}
.nxd-table td {
  padding: 0.85rem 1.25rem;
  font-size: 0.875rem;
  color: var(--nxd-text-body);
  border-bottom: 1px solid var(--nxd-border-light);
}
.nxd-table tbody tr:last-child td { border-bottom: none; }
.nxd-table tbody tr:hover { background: var(--nxd-bg-alt); }
.nxd-table code {
  font-family: var(--nxd-font-mono);
  font-size: 0.8rem;
  background: var(--nxd-bg-muted);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  color: var(--nxd-text);
}
/* Bootstrap table override */
.table { color: var(--nxd-text-body); }
.table thead th { background: var(--nxd-bg-alt); color: var(--nxd-text-muted); border-color: var(--nxd-border); }
.table td { border-color: var(--nxd-border-light); }
.table-hover tbody tr:hover { background: var(--nxd-bg-alt); }


/* ================================================================
   18. Status Badges
   ================================================================ */
[class*="nxd-badge-"] {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--nxd-radius-full);
  white-space: nowrap;
}
.nxd-badge-active, .nxd-badge-paid    { background: var(--nxd-success-bg); color: var(--nxd-success-fg); }
.nxd-badge-expired, .nxd-badge-unpaid,
.nxd-badge-suspended                  { background: var(--nxd-error-bg);   color: var(--nxd-error-fg); }
.nxd-badge-pending                    { background: var(--nxd-warning-bg); color: var(--nxd-warning-fg); }
.nxd-badge-trial                      { background: var(--nxd-info-bg);    color: var(--nxd-info-fg); }
.nxd-badge-info                       { background: rgba(6, 182, 212, 0.15); color: var(--nxd-accent); }
.nxd-badge-neutral                    { background: rgba(100, 116, 139, 0.15); color: #94a3b8; }


/* ================================================================
   18b. Utility Classes
   ================================================================ */
.nxd-text-sm { font-size: 0.875rem; }
.nxd-text-xs { font-size: 0.75rem; }
.nxd-section-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem; }
.nxd-mb-3 { margin-bottom: 1rem; }
.nxd-card--static:hover { transform: none; box-shadow: none; border-color: var(--nxd-border); }

/* Info table for detail pages (license, contracts, support) */
.nxd-info-table { width: 100%; border-collapse: collapse; }
.nxd-info-table td { padding: 0.5rem 0; border-bottom: 1px solid var(--nxd-border-light); vertical-align: top; color: var(--nxd-text-body); }
.nxd-info-table td:first-child { color: var(--nxd-text-muted); width: 40%; }
.nxd-info-table th { color: var(--nxd-text-muted); font-weight: 600; padding: 0.5rem 0; border-bottom: 1px solid var(--nxd-border); text-align: left; }

/* Empty state pattern */
.nxd-empty-state { text-align: center; padding: 3rem 2rem; color: var(--nxd-text-muted); }
.nxd-empty-state .nxd-empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.nxd-empty-state h4 { font-size: 1.1rem; font-weight: 600; color: var(--nxd-text-body); margin-bottom: 0.5rem; }
.nxd-empty-state p { font-size: 0.9rem; margin-bottom: 1rem; }


/* ================================================================
   19. NXD Cards (Portal Quick-Access)
   ================================================================ */
.nxd-card {
  background: var(--nxd-bg);
  border: 1px solid var(--nxd-border);
  border-radius: var(--nxd-radius-lg);
  padding: 2rem;
  transition: transform var(--nxd-dur) var(--nxd-ease), border-color var(--nxd-dur) var(--nxd-ease), box-shadow var(--nxd-dur) var(--nxd-ease);
}
.nxd-card:hover {
  transform: translateY(-3px);
  border-color: var(--nxd-accent);
  box-shadow: var(--nxd-shadow-lg);
}
.nxd-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--nxd-radius-md);
  background: var(--nxd-accent-light);
  color: var(--nxd-accent);
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
}
.nxd-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: var(--nxd-text);
}
.nxd-card p {
  color: var(--nxd-text-muted);
  margin: 0;
  font-size: 0.95rem;
}


/* ================================================================
   20. Custom Sections (Jinja)
   ================================================================ */
.nxd-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem 5rem;
  background: linear-gradient(135deg, var(--nxd-bg-alt) 0%, var(--nxd-bg) 50%, var(--nxd-bg-alt) 100%);
  overflow: hidden;
}
.nxd-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 30% 20%, rgba(6,182,212,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 500px 350px at 70% 60%, rgba(6,182,212,0.05) 0%, transparent 70%);
  pointer-events: none;
}
.nxd-hero > * {
  position: relative;
  z-index: 1;
}
.nxd-hero h1 {
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 1.25rem;
  max-width: 800px;
  color: var(--nxd-text);
}
.nxd-hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--nxd-accent), var(--nxd-accent-hover));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nxd-hero .subtitle {
  font-size: 1.2rem;
  color: var(--nxd-text-muted);
  max-width: 640px;
  margin: 0 0 2.5rem;
}
.nxd-hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.nxd-section {
  padding: 5rem 2rem;
  max-width: var(--nxd-max-w);
  margin: 0 auto;
}
.nxd-section-alt {
  padding: 5rem 2rem;
  background: var(--nxd-bg-alt);
}
.nxd-section-alt > .nxd-section-inner {
  max-width: var(--nxd-max-w);
  margin: 0 auto;
}
.nxd-section-title {
  text-align: center;
  margin-bottom: 3.5rem;
}
.nxd-section-title h2 {
  font-size: 2.25rem;
  font-weight: 800;
  margin: 0 0 0.75rem;
  color: var(--nxd-text);
}
.nxd-section-title p {
  color: var(--nxd-text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}
.nxd-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.75rem; }
.nxd-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.nxd-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }


/* ================================================================
   21. Service Page Header
   ================================================================ */
.nxd-service-header {
  padding: 4rem 2rem 3rem;
  text-align: center;
  background: var(--nxd-bg-alt);
  border-bottom: 1px solid var(--nxd-border);
}
.nxd-service-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 1rem;
  color: var(--nxd-text);
}
.nxd-service-header p {
  color: var(--nxd-text-muted);
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto;
}


/* ================================================================
   22. Trust Badges
   ================================================================ */
.nxd-trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 3rem;
}
.nxd-trust-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--nxd-text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}
.nxd-trust-badge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--nxd-accent-light);
  color: var(--nxd-accent);
  font-size: 1.2rem;
}


/* ================================================================
   23. Pricing Cards
   ================================================================ */
.nxd-pricing-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  align-items: start;
}
.nxd-pricing-card {
  background: var(--nxd-bg);
  border: 1px solid var(--nxd-border);
  border-radius: var(--nxd-radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  transition: transform var(--nxd-dur) var(--nxd-ease), border-color var(--nxd-dur) var(--nxd-ease), box-shadow var(--nxd-dur) var(--nxd-ease);
  position: relative;
}
.nxd-pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--nxd-shadow-lg);
}
.nxd-pricing-card.featured {
  border-color: var(--nxd-accent);
  box-shadow: 0 0 0 1px var(--nxd-accent), var(--nxd-shadow-lg);
  transform: scale(1.04);
}
.nxd-pricing-card.featured:hover {
  transform: scale(1.04) translateY(-4px);
}
.nxd-pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.3rem 1rem;
  background: var(--nxd-accent);
  color: var(--nxd-text-inv);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 20px;
}
.nxd-pricing-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--nxd-text);
}
.nxd-pricing-card .price {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--nxd-text);
  margin: 1rem 0 0.25rem;
}
.nxd-pricing-card .price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--nxd-text-muted);
}
.nxd-pricing-card .price-period {
  font-size: 0.85rem;
  color: var(--nxd-text-muted);
  margin-bottom: 1.5rem;
}
.nxd-pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  text-align: left;
}
.nxd-pricing-features li {
  padding: 0.5rem 0;
  color: var(--nxd-text-body);
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}
.nxd-pricing-features li::before {
  content: '\2713';
  color: var(--nxd-success);
  font-weight: 700;
  flex-shrink: 0;
}


/* ================================================================
   24. USP List
   ================================================================ */
.nxd-usp-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}
.nxd-usp-list li {
  position: relative;
  padding: 0.75rem 0 0.75rem 2rem;
  color: var(--nxd-text-body);
  font-size: 1rem;
}
.nxd-usp-list li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  top: 0.75rem;
  color: var(--nxd-success);
  font-weight: 700;
  font-size: 1.1rem;
}


/* ================================================================
   25. Timeline
   ================================================================ */
.nxd-timeline {
  position: relative;
  padding-left: 2rem;
  margin: 1.5rem 0;
}
.nxd-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--nxd-border);
}
.nxd-timeline-item {
  position: relative;
  padding-bottom: 1.75rem;
}
.nxd-timeline-item:last-child {
  padding-bottom: 0;
}
.nxd-timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--nxd-bg);
  border: 2px solid var(--nxd-accent);
  z-index: 1;
}
.nxd-timeline-item .time {
  font-size: 0.8rem;
  color: var(--nxd-text-muted);
  margin-bottom: 0.25rem;
}
.nxd-timeline-item .content {
  font-size: 0.9rem;
  color: var(--nxd-text-body);
}
.nxd-timeline-item .content * {
  color: inherit !important;
}
.nxd-timeline-item .content strong {
  color: var(--nxd-text) !important;
}
.nxd-timeline-item .content a {
  color: var(--nxd-text-link) !important;
}


/* ================================================================
   26. Legal Pages
   ================================================================ */
.nxd-legal {
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}
.nxd-legal h1 {
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
  color: var(--nxd-text);
}
.nxd-legal .last-updated {
  font-size: 0.85rem;
  color: var(--nxd-text-muted);
  margin-bottom: 2.5rem;
}
.nxd-legal h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 2.5rem 0 0.75rem;
  color: var(--nxd-text);
}
.nxd-legal h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.75rem 0 0.5rem;
  color: var(--nxd-text);
}
.nxd-legal p,
.nxd-legal li {
  color: var(--nxd-text-body);
  font-size: 0.95rem;
  line-height: 1.75;
}
.nxd-legal ul,
.nxd-legal ol {
  padding-left: 1.5rem;
  margin: 0.75rem 0;
}
.nxd-legal li {
  margin-bottom: 0.35rem;
}
.nxd-legal a {
  text-decoration: underline;
  text-underline-offset: 2px;
}


/* ================================================================
   27. Signature Pad
   ================================================================ */
.nxd-signature-container {
  border: 1px dashed var(--nxd-border);
  border-radius: var(--nxd-radius-md);
  background: var(--nxd-bg-alt);
  margin-bottom: 1rem;
  position: relative;
}
.nxd-signature-container canvas {
  width: 100%;
  height: 200px;
  display: block;
  touch-action: none;
  cursor: crosshair;
}


/* ================================================================
   28. Utility Classes
   ================================================================ */
.nxd-text-center  { text-align: center; }
.nxd-text-muted   { color: var(--nxd-text-muted) !important; }
.nxd-mt-1         { margin-top: 0.5rem; }
.nxd-mt-2         { margin-top: 1rem; }
.nxd-mt-3         { margin-top: 1.5rem; }
.nxd-mt-4         { margin-top: 2rem; }
.nxd-mb-1         { margin-bottom: 0.5rem; }
.nxd-mb-2         { margin-bottom: 1rem; }
.nxd-mb-3         { margin-bottom: 1.5rem; }
.nxd-mb-4         { margin-bottom: 2rem; }
.nxd-container {
  max-width: var(--nxd-max-w);
  margin: 0 auto;
  padding: 0 2rem;
}


/* ================================================================
   29. Animations
   ================================================================ */

/* Scroll-reveal: elements start hidden, become visible */
.nxd-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--nxd-ease), transform 0.6s var(--nxd-ease);
}
.nxd-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays for children */
.nxd-stagger > *:nth-child(1) { transition-delay: 0s; }
.nxd-stagger > *:nth-child(2) { transition-delay: 0.1s; }
.nxd-stagger > *:nth-child(3) { transition-delay: 0.1s; }
.nxd-stagger > *:nth-child(4) { transition-delay: 0.15s; }
.nxd-stagger > *:nth-child(5) { transition-delay: 0.2s; }
.nxd-stagger > *:nth-child(6) { transition-delay: 0.25s; }
.nxd-stagger > *:nth-child(7) { transition-delay: 0.3s; }
.nxd-stagger > *:nth-child(8) { transition-delay: 0.35s; }

/* Auto-reveal: Frappe WB sections get scroll-reveal automatically */
.section-with-cards .card,
.section-with-features .section-feature,
.split-section-with-image > .col-12 {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--nxd-ease), transform 0.6s var(--nxd-ease);
}
.section-with-cards .card.is-visible,
.section-with-features .section-feature.is-visible,
.split-section-with-image > .col-12.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .nxd-reveal, .section-with-cards .card, .section-with-features .section-feature,
  .split-section-with-image > .col-12 {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}


/* ================================================================
   30. Responsive — Tablet (max-width: 992px)
   ================================================================ */
@media (max-width: 992px) {
  .nxd-hero h1 { font-size: 2.5rem; }
  .hero-title { font-size: 2.25rem !important; }

  .nxd-grid-3,
  .nxd-pricing-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .nxd-grid-4,
  .nxd-stat-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .nxd-footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .footer-grouped-links {
    flex-wrap: wrap;
  }

  .nxd-pricing-card.featured {
    transform: scale(1);
  }
  .nxd-pricing-card.featured:hover {
    transform: translateY(-4px);
  }

  .nxd-portal-sidebar {
    width: 200px;
  }
}


/* ================================================================
   31. Responsive — Mobile (max-width: 768px)
   ================================================================ */
@media (max-width: 768px) {
  .nxd-hero {
    padding: 4rem 1.5rem 3.5rem;
  }
  .nxd-hero h1 { font-size: 2rem; }
  .nxd-hero .subtitle { font-size: 1rem; }
  .hero-title { font-size: 1.75rem !important; }
  .hero-subtitle { font-size: 1rem !important; }

  .hero-with-right-image {
    padding: 3rem 0 !important;
  }
  .hero-with-right-image .hero-content {
    padding-right: 0;
    text-align: center;
  }

  .section-title { font-size: 1.75rem !important; }

  .nxd-section,
  .nxd-section-alt {
    padding: 3rem 1.25rem;
  }
  .nxd-section-title h2 { font-size: 1.75rem; }

  .nxd-grid-2,
  .nxd-grid-3,
  .nxd-grid-4,
  .nxd-pricing-cards,
  .nxd-stat-cards {
    grid-template-columns: 1fr;
  }

  .nxd-footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-grouped-links {
    flex-direction: column;
    gap: 2rem;
  }

  /* Navbar: mobile collapse */
  .nxd-navbar {
    flex-wrap: wrap;
    height: auto;
    padding: 0.75rem 1.25rem;
  }
  .nxd-navbar-toggle { display: block; }
  .nxd-navbar-links {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    padding: 0.75rem 0;
    border-top: 1px solid var(--nxd-border);
  }
  .nxd-navbar-links.open { display: flex; }
  .nxd-navbar-links a { padding: 0.6rem 0; font-size: 0.95rem; }
  .nxd-navbar-actions { display: none; }
  .nxd-navbar-actions.open {
    display: flex;
    width: 100%;
    padding-top: 0.5rem;
  }

  /* Frappe navbar mobile — hamburger icon */
  .navbar-toggler {
    border: 1px solid var(--nxd-border) !important;
    padding: 0.35rem 0.6rem !important;
  }
  .navbar-toggler .icon {
    stroke: var(--nxd-text) !important;
    stroke-width: 2;
    width: 22px;
    height: 22px;
  }

  .navbar .navbar-collapse {
    background: var(--nxd-bg);
    border-top: 1px solid var(--nxd-border);
  }

  /* Portal: stack sidebar on mobile */
  .nxd-portal-container {
    flex-direction: column;
    padding: 1.25rem;
  }
  .nxd-portal-sidebar { width: 100%; }
  .nxd-sidebar-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--nxd-bg);
    border: 1px solid var(--nxd-border);
    border-radius: var(--nxd-radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--nxd-text-body);
    margin-bottom: 0.5rem;
  }
  .nxd-portal-sidebar nav {
    display: none;
    position: static;
    flex-direction: column;
    border-bottom: 1px solid var(--nxd-border);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
  }
  .nxd-portal-sidebar.open nav { display: flex; }

  /* Table horizontal scroll */
  .nxd-table-wrapper { overflow-x: auto; }

  .nxd-service-header h1 { font-size: 1.75rem; }

  .nxd-legal {
    padding: 2rem 1.25rem 4rem;
  }
  .nxd-legal h1 { font-size: 1.6rem; }

  .nxd-hero-actions {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
  }

  .nxd-trust-badges { gap: 1.5rem; }

  .split-section-content .title { font-size: 1.5rem !important; }
}


/* ================================================================
   32. Login Page — IT-Krug Branding
   ================================================================ */
.page-card {
  border: 1px solid var(--nxd-border, #e2e8f0) !important;
  border-radius: var(--nxd-radius-lg, 12px) !important;
}
.page-card-head {
  font-family: 'Inter', -apple-system, sans-serif;
}
.page-card-head h4 {
  color: var(--nxd-text, #0f172a);
  font-weight: 600;
}
.btn-login, .btn-forgot, .btn-login-with-email-link {
  background: var(--nxd-accent, #06b6d4) !important;
  border-color: var(--nxd-accent, #06b6d4) !important;
  font-weight: 600 !important;
}
.btn-login:hover, .btn-forgot:hover, .btn-login-with-email-link:hover {
  background: var(--nxd-accent-hover, #0891b2) !important;
  border-color: var(--nxd-accent-hover, #0891b2) !important;
}
.forgot-password-message a,
.sign-up-message a {
  color: var(--nxd-accent, #06b6d4) !important;
}
.nxd-login-footer a {
  color: var(--nxd-text-muted, #64748b);
  text-decoration: none;
}
.nxd-login-footer a:hover {
  color: var(--nxd-accent, #06b6d4);
}


/* ================================================================
   30. Homepage — Hero Section
   ================================================================ */
.nxd-hero {
  padding: 5rem 0 4rem;
  background: linear-gradient(135deg, var(--nxd-bg) 0%, var(--nxd-accent-light) 100%);
}
.nxd-hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}
.nxd-hero-title .nxd-accent {
  color: var(--nxd-accent);
}
.nxd-hero-subtitle {
  font-size: 1.15rem;
  color: var(--nxd-text-body);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 540px;
}
.nxd-hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.nxd-hero-actions .btn-lg {
  padding: 0.85rem 2rem;
  font-size: 1rem;
  font-weight: 600;
}
.nxd-hero-visual {
  opacity: 0.85;
}

/* ================================================================
   31. Homepage — Service Cards
   ================================================================ */
.nxd-service-icon {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: var(--nxd-radius-lg);
  background: var(--nxd-accent-light);
}
.nxd-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}
.nxd-card p {
  color: var(--nxd-text-body);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ================================================================
   32. Homepage — Values
   ================================================================ */
.nxd-value-icon {
  margin-bottom: 1rem;
}
.nxd-text-muted {
  color: var(--nxd-text-muted);
}

/* ================================================================
   33. Homepage — CTA Section
   ================================================================ */
.nxd-cta-section {
  background: var(--nxd-bg-dark);
  color: var(--nxd-text-inv);
  padding: 4rem 0;
}
.nxd-cta-section h2 {
  color: var(--nxd-text-inv);
  font-size: 2rem;
  margin-bottom: 0.75rem;
}
.nxd-cta-section .nxd-section-subtitle {
  color: var(--nxd-text-faint);
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* ================================================================
   34. Leistungen Page
   ================================================================ */
.nxd-service-badge {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--nxd-accent);
  background: var(--nxd-accent-light);
  border-radius: var(--nxd-radius-full);
  margin-bottom: 0.75rem;
}
.nxd-feature-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}
.nxd-feature-list li {
  position: relative;
  padding: 0.4rem 0 0.4rem 1.75rem;
  color: var(--nxd-text-body);
  font-size: 0.95rem;
}
.nxd-feature-list li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--nxd-accent);
  font-weight: 700;
}
.nxd-service-illustration {
  padding: 2rem;
}
.nxd-sla-response {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--nxd-text);
  line-height: 1;
  margin: 1rem 0 0.25rem;
}

/* ================================================================
   35. Section generics
   ================================================================ */
.nxd-section-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.nxd-section-subtitle {
  font-size: 1.05rem;
  color: var(--nxd-text-muted);
  line-height: 1.7;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.nxd-section {
  padding: 4rem 0;
}
@media (max-width: 768px) {
  .nxd-section { padding: 2.5rem 0; }
  .nxd-hero { padding: 3rem 0 2.5rem; }
  .nxd-hero-actions { flex-direction: column; }
  .nxd-hero-actions .btn-lg { width: 100%; text-align: center; }
}
