/* =========================================
   Bitcrack Cyber Security — Navbar (Light Theme v1)
   Corporate with dropdown + incident CTA
   ========================================= */

.bc-navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition: background 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

.bc-navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 20px rgba(0,0,0,0.06);
}

/* Container */
.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 72px;
  display: flex;
  align-items: center;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  margin-right: 2rem;
  flex-shrink: 0;
  min-width: 0;
  max-width: 60%;
}

.nav-logo img {
  height: 48px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  transition: opacity 0.2s ease;
}

.nav-logo:hover img {
  opacity: 0.85;
}

/* Light theme logo */
.nav-logo-light {
  height: 48px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  transition: opacity 0.2s ease;
}

.nav-logo:hover .nav-logo-light {
  opacity: 0.85;
}

/* Nav Links */
.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  flex: 1;
}

.nav-link {
  position: relative;
  color: #404040;
  font-size: 0.84rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.nav-link:hover {
  color: #111111;
  background: rgba(0,0,0,0.04);
}

.nav-link.active {
  color: #111111;
  border-bottom: 2px solid #dc2626;
  border-radius: 6px 6px 0 0;
}

.nav-chevron {
  font-size: 0.55rem;
  margin-left: 0.3rem;
  transition: transform 0.2s ease;
  opacity: 0.6;
}


/* ---- Services Dropdown ---- */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: 520px;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 12px;
  padding: 0.75rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 100;
}

/* Invisible bridge between trigger and dropdown */
.nav-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 0;
  width: 100%;
  height: 16px;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown:hover .nav-chevron {
  transform: rotate(180deg);
}

/* Narrow variant for About dropdown */
.nav-dropdown-menu--narrow {
  width: 300px;
}

.dropdown-list {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.dropdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.dropdown-item:hover {
  background: rgba(0,0,0,0.04);
}

.dropdown-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
  font-size: 0.9rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.dropdown-title {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #111111;
  margin-bottom: 0.15rem;
}

.dropdown-desc {
  display: block;
  font-size: 0.72rem;
  color: #737373;
  line-height: 1.3;
}


/* ---- Right Section ---- */
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
}

/* Incident Response — prominent, corporate */
.nav-incident {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #dc2626;
  border: 1px solid #dc2626;
  border-radius: 6px;
  text-decoration: none;
  background: transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-incident:hover {
  background: #dc2626;
  color: #ffffff;
}

/* Floating theme pill — fixed top-right */
.theme-pill {
  position: fixed;
  top: 80px;
  right: 1.5rem;
  z-index: 9998;
  display: flex;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  overflow: hidden;
}

.theme-pill-btn {
  background: transparent;
  border: none;
  color: #a3a3a3;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.theme-pill-label {
  font-size: 0.68rem;
  font-weight: 600;
  font-family: "Inter", system-ui, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.theme-pill-btn:hover {
  color: #111111;
}

.theme-pill-btn.active {
  color: #111111;
  background: rgba(0,0,0,0.06);
}

/* Logo visibility — controlled by JS */
.nav-logo-light { display: block; }
.nav-logo-dark { display: none; }

/* Contact CTA — quieter, secondary */
.nav-cta {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: #404040;
  padding: 0.45rem 1rem;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.12);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-cta:hover {
  color: #111111;
  border-color: rgba(0,0,0,0.3);
  background: rgba(0,0,0,0.04);
}


/* ---- Mobile Toggle ---- */
.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 6px;
  color: #111111;
  font-size: 1.1rem;
  padding: 0.4rem 0.55rem;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.menu-toggle:hover {
  border-color: rgba(0,0,0,0.25);
}


/* ---- Mobile Menu ---- */
.mobile-menu {
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  height: calc(100vh - 72px);
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-top: 1px solid rgba(0,0,0,0.06);
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform 0.25s ease, visibility 0s linear 0.25s;
  will-change: transform;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.mobile-menu.open {
  transform: translateY(0);
  visibility: visible;
  transition: transform 0.25s ease, visibility 0s linear 0s;
}

/* Lock background scroll while mobile menu is open */
body.menu-open {
  overflow: hidden;
}

.mobile-menu ul {
  list-style: none;
  margin: 0;
  padding: 1rem 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.mobile-menu .nav-link {
  display: block;
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
}

.mobile-menu .nav-link--sub {
  padding-left: 1.75rem;
  font-size: 0.82rem;
  color: #737373;
}

.mobile-menu .nav-link--sub:hover {
  color: #111111;
}

.mobile-section-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #dc2626;
  padding: 0.75rem 0.85rem 0.25rem;
}

.mobile-incident {
  display: flex;
  justify-content: center;
  margin-top: 0.5rem;
}

.mobile-cta {
  display: block;
  text-align: center;
  margin-top: 0.25rem;
}

/* Theme toggle inside the mobile drawer (visible only on mobile) */
.mobile-theme-row {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0.85rem 0.25rem;
  margin-top: 1rem;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.mobile-theme-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #737373;
}

.mobile-theme-pill {
  display: flex;
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 999px;
  overflow: hidden;
}

.mobile-theme-btn {
  background: transparent;
  border: none;
  color: #737373;
  padding: 0.4rem 0.95rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: "Inter", system-ui, sans-serif;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.mobile-theme-btn:hover {
  color: #111111;
}

.mobile-theme-btn.active {
  color: #111111;
  background: rgba(0,0,0,0.08);
}


/* ---- Responsive ---- */
@media (max-width: 960px) {
  .nav-links {
    display: none;
  }
  .menu-toggle {
    display: inline-flex;
  }
  .nav-container {
    padding: 0 1.25rem;
  }
  .nav-right .nav-incident {
    font-size: 0.72rem;
    padding: 0.4rem 0.7rem;
  }
  .nav-right .nav-cta {
    display: none;
  }
  .nav-logo {
    margin-right: 1rem;
  }
  .nav-logo img,
  .nav-logo-light {
    height: 40px;
  }
  /* Hide the floating theme pill on mobile — drawer has its own toggle */
  .theme-pill {
    display: none;
  }
  .mobile-theme-row {
    display: flex;
  }
}

@media (max-width: 600px) {
  .nav-right {
    gap: 0.4rem;
  }
  .nav-right .nav-incident {
    font-size: 0.68rem;
    padding: 0.35rem 0.6rem;
  }
  .nav-logo img,
  .nav-logo-light {
    height: 36px;
    width: auto;
  }
  .logo-text {
    font-size: 0.9rem;
  }
}

@media (max-width: 380px) {
  .nav-container {
    padding: 0 0.9rem;
  }
  .nav-right .nav-incident {
    font-size: 0.62rem;
    padding: 0.3rem 0.5rem;
  }
  .nav-logo img,
  .nav-logo-light {
    height: 32px;
  }
}


/* =========================================================
   INCIDENT RESPONSE MODAL
   ========================================================= */
.ir-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ir-modal.open {
  opacity: 1;
  visibility: visible;
}

.ir-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
}

.ir-modal-dialog {
  position: relative;
  width: 95%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 12px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.15);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
}

.ir-modal.open .ir-modal-dialog {
  transform: translateY(0);
}

/* Header */
.ir-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 2rem 2rem 0;
}

.ir-modal-header h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #111111;
}

.ir-modal-header p {
  margin: 0.3rem 0 0;
  font-size: 0.88rem;
  color: #404040;
}

.ir-modal-close {
  background: transparent;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 6px;
  color: #737373;
  font-size: 1rem;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ir-modal-close:hover {
  color: #111111;
  border-color: rgba(0,0,0,0.25);
}

/* Urgency call-out */
.ir-modal-urgency {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1.5rem 2rem;
  padding: 1rem 1.25rem;
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.15);
  border-radius: 8px;
}

.ir-modal-urgency i {
  color: #dc2626;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.ir-modal-urgency span {
  font-size: 0.82rem;
  color: #404040;
}

.ir-modal-urgency a {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111111;
  text-decoration: none;
  display: block;
  margin-top: 0.15rem;
}

.ir-modal-urgency a:hover {
  color: #dc2626;
}

/* Form */
.ir-form {
  padding: 0.5rem 2rem 2rem;
}

.ir-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.ir-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.ir-form-row .ir-field {
  margin-bottom: 0;
}

.ir-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #404040;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ir-required {
  color: #dc2626;
}

.ir-field input,
.ir-field select,
.ir-field textarea {
  background: #f8f8f8;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 6px;
  color: #111111;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.88rem;
  padding: 0.7rem 0.85rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  width: 100%;
}

.ir-field input::placeholder,
.ir-field textarea::placeholder {
  color: #a3a3a3;
}

.ir-field input:focus,
.ir-field select:focus,
.ir-field textarea:focus {
  border-color: rgba(220, 38, 38, 0.5);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.ir-field 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='%23737373' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.5rem;
}

.ir-field select option {
  background: #ffffff;
  color: #111111;
}

.ir-field textarea {
  resize: vertical;
  min-height: 100px;
}

/* Footer */
.ir-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.5rem;
}

.ir-disclaimer {
  font-size: 0.72rem;
  color: #a3a3a3;
  line-height: 1.4;
}

.ir-disclaimer strong {
  color: #737373;
}

.ir-submit {
  flex-shrink: 0;
}

/* Success state — hidden by default; JS sets style.display="block" to show */
.ir-success {
  display: none;
  padding: 3rem 2rem;
  text-align: center;
}

.ir-success i {
  font-size: 3rem;
  color: #22c55e;
  margin-bottom: 1rem;
}

.ir-success h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #111111;
}

.ir-success p {
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
  color: #404040;
}

/* Responsive */
@media (max-width: 600px) {
  .ir-modal-dialog {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .ir-modal-header,
  .ir-form,
  .ir-modal-urgency {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .ir-modal-urgency {
    margin-left: 1.25rem;
    margin-right: 1.25rem;
  }

  .ir-form-row {
    grid-template-columns: 1fr;
  }

  .ir-form-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .ir-disclaimer {
    text-align: center;
  }
}

/* Utility class for CSP-compliant hidden state. JS should toggle this
   class (not element.style.display) since !important would beat inline. */
.is-hidden { display: none !important; }

/* Inline form error message (hidden by default; JS sets style.display="flex") */
.form-error {
  display: none;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  margin: 0 0 1rem;
  border: 1px solid rgba(220, 38, 38, 0.35);
  background: rgba(220, 38, 38, 0.06);
  border-radius: 6px;
  color: #b91c1c;
  font-size: 0.88rem;
  line-height: 1.5;
}
.form-error i {
  font-size: 1rem;
  color: #dc2626;
  margin-top: 0.1rem;
  flex-shrink: 0;
}
