/**
 * DRD Engineers Header & Navigation Component
 * WPWeb style clean navigation, topbar, Make in India badge, Desktop 2-panel Mega & Mobile 3-Level Accordion Tree & Multi-Step Slider Form
 */

/* Topbar - No border lines above/below */
.site-topbar {
  background-color: var(--color-primary-container); /* Industrial Orange */
  color: #ffffff;
  padding: 6px 0;
  font-size: 13px;
  font-family: 'Poppins', sans-serif !important;
  border: none !important;
  box-shadow: none !important;
}

.topbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-contact {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.topbar-link {
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  transition: opacity var(--transition-fast);
  font-family: 'Poppins', sans-serif !important;
}

.topbar-link:hover {
  color: #ffffff;
  opacity: 0.85;
}

.topbar-socials {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-socials a {
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
  text-decoration: none;
}

.topbar-socials a:hover {
  opacity: 1;
  transform: translateY(-1px);
  background-color: rgba(255, 255, 255, 0.2);
}

.topbar-socials a svg {
  width: 15px;
  height: 15px;
  display: block;
}

.topbar-socials a img {
  width: 15px;
  height: 15px;
  display: block;
  object-fit: contain;
}

/* Site Header - No border lines above/below */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: #ffffff; /* Clean white background initially */
  border-top: none !important;
  border-bottom: none !important;
  padding: 12px 0;
  transition: all var(--transition-normal);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  font-family: 'Poppins', sans-serif !important;
}

.site-header * {
  font-family: 'Poppins', sans-serif !important;
}

.site-header.is-scrolled {
  background-color: var(--color-inverse-surface); /* Midnight Carbon on scroll */
  border-bottom: none !important;
  padding: 8px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.site-logo {
  display: flex;
  align-items: center;
}

.site-logo img,
.site-logo svg {
  height: 46px;
  width: auto;
  transition: height var(--transition-fast);
}

.site-header.is-scrolled .site-logo img {
  height: 40px;
}

/* Header Right Actions (Make in India logo + Mobile Toggle) */
.header-right-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.make-in-india-badge {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

@media (min-width: 993px) {
  .mobile-menu-toggle {
    display: none !important;
  }

  .mobile-drawer-header {
    display: none !important;
  }

  .mobile-accordion-toggle {
    display: none !important;
  }

  .mobile-only-accordion {
    display: none !important;
  }

  .centered-nav-wrapper {
    flex-grow: 1;
    justify-content: center;
  }

  .centered-menu {
    justify-content: center;
  }
}

/* Primary Navigation Menu */
.primary-nav-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.primary-menu {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-menu > li {
  position: relative;
}

.primary-menu > li > a {
  color: var(--color-on-surface); /* Dark text on white header */
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 12px 0;
  display: block;
  transition: color var(--transition-fast);
  font-family: 'Poppins', sans-serif !important;
}

.site-header.is-scrolled .primary-menu > li > a {
  color: #ffffff; /* White text on dark scrolled header */
}

.primary-menu > li:hover > a,
.primary-menu > li.current-menu-item > a {
  color: var(--color-primary-container) !important;
}

.nav-arrow {
  font-size: 12px;
  display: inline-block;
  transition: transform 0.2s;
  margin-left: 2px;
}

.primary-menu > li:hover .nav-arrow {
  transform: rotate(180deg);
}

/* Standard Submenu Dropdowns */
.primary-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 240px;
  background-color: #ffffff;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-default);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  list-style: none;
  padding: 8px 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-fast);
  z-index: 1002;
}

.primary-menu li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Suppress standard narrow WP sub-menu when Mega Menu is active */
.has-mega-menu > .sub-menu {
  display: none !important;
}

/* Desktop 2-Panel Mega Dropdown Menu */
.has-mega-menu {
  position: static !important;
}

.drd-mega-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 960px;
  max-width: 95vw;
  background-color: #ffffff;
  border: 1px solid #e1e3e4;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  z-index: 1005;
  overflow: hidden;
  font-family: 'Poppins', sans-serif !important;
}

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

.mega-dropdown-inner {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 380px;
}

/* Mega Sidebar (Categories List) */
.mega-sidebar {
  background-color: #f8fafb;
  border-right: 1px solid #e1e3e4;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
}

.mega-sidebar-title {
  font-size: 15px;
  color: #954a00;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #fff0e5;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mega-category-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-grow: 1;
}

/* Product Dropdown - Display all categories together without internal scrolling */
.internal-scroll-category-list {
  max-height: none !important;
  overflow-y: visible !important;
  padding-right: 0 !important;
}

.mega-cat-item {
  border-radius: 6px;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}

.mega-cat-item.is-active,
.mega-cat-item:hover {
  background-color: #fff0e5;
  border-left-color: #f4821f;
}

.mega-cat-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  color: #191c1d;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
}

.mega-cat-item.is-active .mega-cat-link,
.mega-cat-item:hover .mega-cat-link {
  color: #954a00 !important;
  font-weight: 600;
}

.cat-icon {
  color: #5c5f5e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.cat-icon svg {
  width: 18px !important;
  height: 18px !important;
  display: block;
}

.mega-cat-item.is-active .cat-icon,
.mega-cat-item:hover .cat-icon {
  color: #f4821f;
}

.cat-name {
  flex-grow: 1;
  line-height: 1.3;
}

.cat-arrow {
  font-size: 16px;
  color: #5c5f5e;
}

.mega-cat-item.is-active .cat-arrow {
  color: #f4821f;
}

/* Mega Content Panel (Right Side) */
.mega-content-panel {
  padding: 24px 28px;
}

.mega-cat-panel {
  display: none;
}

.mega-cat-panel.is-active {
  display: block;
}

.mega-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  border-bottom: 1px solid #f2f4f5;
  padding-bottom: 14px;
}

.panel-cat-title {
  font-size: 20px;
  color: #191c1d;
  margin-bottom: 4px;
}

.panel-cat-desc {
  font-size: 13px;
  color: #5c5f5e;
  margin: 0;
}

.mega-product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.mega-product-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid #e1e3e4;
  border-radius: 8px;
  background-color: #ffffff;
  text-decoration: none;
  min-height: 62px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.mega-product-card:hover {
  border-color: #f4821f;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(244, 130, 31, 0.12);
}

.card-icon-box {
  width: 38px;
  height: 38px;
  background-color: #fff0e5;
  color: #f4821f;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.2s, color 0.2s;
}

.card-icon-box svg {
  width: 20px;
  height: 20px;
  display: block;
}

.mega-product-card:hover .card-icon-box {
  background-color: #f4821f;
  color: #ffffff;
}

.card-info {
  flex-grow: 1;
}

.product-card-title {
  font-size: 13.5px;
  color: #191c1d;
  font-weight: 600;
  margin: 0;
  line-height: 1.35;
  transition: color 0.2s;
}

.mega-product-card:hover .product-card-title {
  color: #954a00;
}

.product-card-desc {
  font-size: 12px;
  line-height: 17px;
  color: #5c5f5e;
  margin: 0;
}

.product-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  margin-top: 6px;
  letter-spacing: 0.03em;
}

.badge-orange {
  background-color: #fff0e5;
  color: #954a00;
}

.badge-blue {
  background-color: #e6f7ff;
  color: #00875a;
}

/* WPWeb Style Mobile Navigation Drawer (Max-width 992px) */
@media (max-width: 992px) {
  .site-topbar {
    display: none;
  }

  .desktop-only-mega {
    display: none !important;
  }

  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #191c1d;
    cursor: pointer;
  }

  .primary-nav-wrapper {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100vw;
    height: 100vh;
    background-color: #ffffff !important;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    transition: right 0.3s ease;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.2);
    z-index: 10010;
    overflow-y: auto;
  }

  .primary-nav-wrapper.is-open {
    right: 0;
  }

  .mobile-drawer-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e1e3e4;
    background-color: #ffffff;
  }

  .mobile-drawer-actions {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .mobile-drawer-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #00A3E0;
    line-height: 1;
    cursor: pointer;
  }

  .primary-menu {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0;
  }

  .primary-menu > li {
    width: 100%;
    border-bottom: 1px solid #e1e3e4;
    position: relative;
  }

  .primary-menu > li > a {
    color: #191c1d !important;
    font-size: 16px;
    font-weight: 700;
    padding: 16px 20px;
    text-transform: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .mobile-accordion-toggle {
    position: absolute;
    right: 20px;
    top: 16px;
    font-size: 18px;
    color: #5c5f5e;
    cursor: pointer;
    transition: transform 0.2s ease;
    padding: 4px 8px;
    display: block !important;
  }

  .primary-menu > li.is-accordion-open > .mobile-accordion-toggle {
    transform: rotate(180deg);
    color: #00A3E0;
  }

  /* Level 1 Accordion Panel */
  .primary-menu > li > .mobile-only-accordion {
    display: none;
    background-color: #f8fafb !important;
    padding: 0 !important;
  }

  .primary-menu > li.is-accordion-open > .mobile-only-accordion {
    display: block !important;
  }

  /* 3-Level Mobile Accordion Tree Styling */
  .mobile-cat-tree {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .mobile-cat-node {
    border-bottom: 1px solid #e9ecef;
  }

  .mobile-cat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
  }

  .mobile-cat-title-link {
    color: #00A3E0 !important;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
  }

  .mobile-sub-accordion-toggle {
    font-size: 16px;
    color: #5c5f5e;
    cursor: pointer;
    padding: 4px 8px;
    transition: transform 0.2s ease;
  }

  .mobile-cat-node.is-sub-open > .mobile-cat-row .mobile-sub-accordion-toggle {
    transform: rotate(180deg);
    color: #00A3E0;
  }

  /* Level 3 Product Names List Card Box */
  .mobile-sub-products-panel {
    display: none;
    padding: 12px 24px 20px 24px;
    background-color: #ffffff;
  }

  .mobile-cat-node.is-sub-open > .mobile-sub-products-panel {
    display: block !important;
  }

  .mobile-products-card-box {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e1e3e4;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .mobile-product-text-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #191c1d !important;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
  }

  .prod-bullet-icon {
    color: #00A3E0;
    flex-shrink: 0;
  }

  .header-cta {
    display: none;
  }
}

/* Modal Popup Overlay */
.drd-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

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

.drd-modal-container {
  background-color: #ffffff;
  width: 90%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-subtle);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  transform: translateY(-20px);
  transition: transform var(--transition-normal);
}

.drd-modal-overlay.is-active .drd-modal-container {
  transform: translateY(0);
}

.drd-modal-header {
  background-color: var(--color-inverse-surface);
  color: #ffffff;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header-title-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.step-indicator-text {
  font-size: 12px;
  color: #e1e3e4;
  font-weight: 500;
}

.drd-modal-close {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.drd-modal-close:hover {
  color: var(--color-primary-container);
}

.drd-modal-body {
  padding: 24px 28px;
}

/* ============================================================
   Engineering Requirement Builder Modal — Complete CSS
   ============================================================ */

/* Wider modal for the builder */
.req-builder-modal {
  max-width: 780px !important;
  font-family: 'Poppins', sans-serif;
}

/* Sub-heading below modal title */
.builder-sub-text {
  font-size: 13px;
  color: #b0b4b6;
  font-weight: 400;
  font-family: 'Poppins', sans-serif;
}

/* Talk to an Engineer quick bar */
.builder-engineer-bar {
  background-color: var(--color-primary-container, #F26522);
  color: #ffffff;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
  font-family: 'Poppins', sans-serif;
}

.engineer-contact-link {
  color: #ffffff;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: underline;
  transition: opacity 0.2s;
}

.engineer-contact-link:hover {
  opacity: 0.85;
}

/* Summary pills bar (for edit/back navigation) */
.builder-summary-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 24px;
  background: #f8fafb;
  border-bottom: 1px solid #e1e3e4;
  font-family: 'Poppins', sans-serif;
}

.builder-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #ffffff;
  border: 1px solid #dde0e2;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #191c1d;
}

.pill-label {
  color: #8a8e90;
  font-size: 11px;
}

.pill-edit-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-primary-container, #F26522);
  font-size: 11px;
  font-weight: 600;
  padding: 0 0 0 4px;
  font-family: 'Poppins', sans-serif;
  line-height: 1;
}

.pill-edit-btn:hover {
  text-decoration: underline;
}

/* Builder Sections — progressive disclosure */
.builder-section {
  display: none;
  animation: builderFadeIn 0.25s ease;
}

.builder-section.active {
  display: block;
}

@keyframes builderFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Section question headings */
.builder-question-heading {
  font-size: 20px;
  font-weight: 700;
  color: #191c1d;
  margin: 0 0 6px 0;
  font-family: 'Poppins', sans-serif;
}

.builder-question-sub {
  font-size: 14px;
  color: #5c5f5e;
  margin: 0 0 20px 0;
  font-family: 'Poppins', sans-serif;
}

/* Grid layout for card-style options (Section 1) */
.builder-options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 600px) {
  .builder-options-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Individual option card (grid) */
.builder-opt-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 16px 12px;
  border: 1.5px solid #dde0e2;
  border-radius: 10px;
  background-color: #ffffff;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  font-family: 'Poppins', sans-serif;
}

.builder-opt-card:hover {
  border-color: var(--color-primary-container, #F26522);
  background-color: #fff7f2;
  box-shadow: 0 2px 10px rgba(242, 101, 34, 0.12);
}

.builder-opt-card.selected {
  border-color: var(--color-primary-container, #F26522);
  background-color: #fff0e5;
  box-shadow: 0 2px 12px rgba(242, 101, 34, 0.18);
}

.builder-opt-card.opt-not-sure {
  border-style: dashed;
  border-color: #b0b4b6;
  background-color: #fafbfc;
}

.builder-opt-card.opt-not-sure:hover,
.builder-opt-card.opt-not-sure.selected {
  border-color: var(--color-primary-container, #F26522);
  background-color: #fff7f2;
}

/* Icon inside card */
.opt-icon {
  color: var(--color-primary-container, #F26522);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.opt-title {
  font-size: 13px;
  font-weight: 600;
  color: #191c1d;
  line-height: 1.3;
}

.opt-sub {
  font-size: 11px;
  color: #7a7f82;
  line-height: 1.3;
}

/* List layout for row-style options (Sections 2 & 3) */
.builder-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Individual row option */
.builder-opt-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 14px 18px;
  border: 1.5px solid #dde0e2;
  border-radius: 8px;
  background-color: #ffffff;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  font-family: 'Poppins', sans-serif;
  width: 100%;
}

.builder-opt-row:hover {
  border-color: var(--color-primary-container, #F26522);
  background-color: #fff7f2;
}

.builder-opt-row.selected {
  border-color: var(--color-primary-container, #F26522);
  background-color: #fff0e5;
}

.builder-opt-row.opt-not-sure {
  border-style: dashed;
  border-color: #b0b4b6;
}

.builder-opt-row.opt-not-sure:hover,
.builder-opt-row.opt-not-sure.selected {
  border-color: var(--color-primary-container, #F26522);
  background-color: #fff7f2;
}

.opt-row-title {
  font-size: 14px;
  font-weight: 600;
  color: #191c1d;
}

.opt-row-sub {
  font-size: 12px;
  color: #7a7f82;
}

/* Final actions row (Section 4 bottom) */
.builder-final-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e1e3e4;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 500px) {
  .builder-final-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .builder-final-actions .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .req-builder-modal {
    max-width: 100% !important;
  }
}
