/* RESET & BASE */
html,
body {
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif;
}

/* HEADER */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.25s ease;
  /* allow dropdowns to overflow outside header */
  overflow: visible;
}
.header {
  position: relative !important;
  z-index: 99999 !important;
}
.hero-section,
.overlay {
  z-index: 1 !important;
}
.header-auth-box {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: auto !important;
  height: auto !important;
  min-width: 40px;
}

/* TOP BAR */
.top-bar {
  background: #000;
  text-align: center;
  padding: 4px 0;
  display: flex;
  justify-content: center;
  align-items: center;
}
.bar-logo {
  height: 18px;
}

/* NAV WRAPPER */
.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 5%;
  gap: 1rem;
  background-color: #fff;
}

/* BRAND */
.brand-logo {
  height: 36px;
  cursor: pointer;
  transition: transform 0.25s ease;
}
.brand-logo:hover {
  transform: scale(1.05);
}

/* NAVIGATION */
.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a,
.nav button {
  background: none;
  border: none;
  color: #1f2937;
  font-size: 14px;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav a:hover,
.nav button:hover {
  color: #2563eb;
}

/* MENU ITEMS + DROPDOWNS */
.menu-item {
  position: relative;
}

.menu-item > button {
  position: relative;
  z-index: 10;
}

/* Dropdown core */
.dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translate(-50%, 8px);
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(2, 6, 23, 0.16);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 99999; /* ensure above everything */
  min-width: 360px;
}
.dropdown.wide {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  width: auto;
  min-width: 420px;
}
/* Support explicit open state from JS as well as hover */
.menu-item:hover .dropdown,
.menu-item.open .dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Invisible hover bridge to prevent dropdown flicker */
.menu-item::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 28px;
  background: transparent;
}

/* DROPDOWN CARDS */
/* Dropdown core FIX */

.menu-item:hover .dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
.dropdown-card img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.25s ease;
}
/* Ensure text appears below image */
.dropdown-card img {
  display: block;
  margin: 0 auto 8px;
}
.dropdown-card span {
  display: block;
  margin-top: 6px;
  text-align: center;
}
.dropdown-card span {
  font-size: 13px;
  font-weight: 500;
  color: #1f2937;
}

/* 🔥 Make the box itself grow when hovered */
/* Hover Animation Fixed */
.dropdown-card:hover {
  transform: translateY(-4px) scale(1.08);
  border-color: #3b82f6;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.18);
}

.dropdown-card:hover img {
  transform: scale(1.06);
}

.dropdown-card:hover span {
  color: #2563eb;
}

/* ACTIONS (RIGHT SIDE) */
.actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* DEMO BUTTON */
.demo-btn {
  background: #000;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 11px 22px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 6px;
  white-space: nowrap; /* forces same line */
  clip-path: polygon(
    10px 0,
    100% 0,
    100% calc(100% - 8px),
    calc(100% - 12px) 100%,
    0 100%,
    0 8px
  );
  transition: all 0.25s ease;
}

.demo-btn:hover {
  background: #111827;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.demo-btn:active {
  transform: translateY(-1px) scale(0.98);
}

.demo-btn .arrow {
  font-size: 14px;
  margin-left: 2px;
}

.demo-btn:hover {
  background: #111827;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

/* LANGUAGE SELECT (optional) */
#language {
  background: #111;
  color: #fff;
  border: 1px solid #222;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 12px;
}

/* MOBILE MENU TOGGLE */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
}

/* MOBILE MENU */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: #111;
  position: absolute;
  top: 100%;
  width: 100%;
}
.mobile-menu a {
  color: rgb(12, 12, 12);
  padding: 12px;
  text-align: center;
  text-decoration: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.mobile-menu a:hover {
  background: #8e8a8a;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .nav {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
  .dropdown {
    left: 8px;
    right: 8px;
    width: auto;
    grid-template-columns: repeat(2, 1fr);
  }
  .actions {
    gap: 8px;
  }
}

/* MOBILE HEADER RESPONSIVE */
@media (max-width: 768px) {
  .nav-wrapper {
    padding: 10px 14px;
  }

  nav.nav {
    display: none;
  }

  .menu-toggle {
    display: block;
    font-size: 26px;
    background: none;
    border: none;
    cursor: pointer;
  }

  .actions {
    gap: 10px;
  }

  #language {
    display: none;
  }

  /* brand logo small */
  .brand-logo {
    width: 110px;
  }

  /* demo button smaller */
  .demo-btn {
    padding: 6px 12px;
    font-size: 13px;
  }

  /* mobile slide menu */
  .mobile-menu {
    position: fixed;
    top: 70px;
    right: 0;
    width: 70%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 18px;
    transform: translateX(100%);
    transition: 0.3s ease;
    z-index: 999;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
  }
  .mobile-menu.active {
    transform: translateX(0);
  }
  .mobile-menu a {
    font-size: 17px;
    padding: 8px 0;
  }
}

/* Demo modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 24px;
  background: rgba(0, 0, 0, 0.65);
  z-index: 100000;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  box-sizing: border-box;
}

.modal-content {
  position: relative;
  width: min(720px, 100%);
  background: #fff;
  color: #111;
  border-radius: 16px;
  padding: 28px 28px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
}

.modal h2 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
}

.modal-subtitle {
  margin: 0 0 18px;
  font-size: 15px;
  color: #4a5568;
}

.close-modal {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f2f2f2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #111;
  cursor: pointer;
  border: 1px solid #e5e7eb;
  transition: background 0.2s ease, transform 0.2s ease;
}

.close-modal:hover {
  background: #e5e7eb;
  transform: scale(1.05);
}

.modal .form-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.modal input,
.modal select,
.modal textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 15px;
  box-sizing: border-box;
  background: #fff;
  color: #111;
}

.modal input::placeholder,
.modal textarea::placeholder {
  color: #8a8f9c;
}

.modal .phone-wrapper {
  display: flex;
  gap: 10px;
  width: 100%;
  flex-wrap: wrap;
}

.modal .phone-wrapper select {
  min-width: 170px;
  flex: 0 0 auto;
}

.modal .phone-wrapper input {
  flex: 1 1 240px;
  min-width: 200px;
}

.modal textarea {
  min-height: 110px;
  resize: vertical;
}

.modal .submit-btn {
  width: 100%;
  margin-top: 6px;
  background: #111827;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

.modal .submit-btn:hover {
  background: #0f172a;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.modal .submit-btn .arrow {
  font-weight: 700;
}

.modal .form-note {
  margin-top: 10px;
  font-size: 13px;
  color: #6b7280;
  text-align: center;
}

.modal .form-note a {
  color: #2563eb;
  text-decoration: none;
}

.modal .form-note a:hover {
  text-decoration: underline;
}

@media (max-width: 540px) {
  .modal-content {
    padding: 22px 18px 18px;
  }

  .modal h2 {
    font-size: 22px;
  }

  .modal .phone-wrapper {
    flex-direction: column;
  }

  .modal .phone-wrapper select,
  .modal .phone-wrapper input {
    width: 100%;
    min-width: 100%;
  }
}

/* PROFILE DROPDOWN */
.profile-icon {
  font-size: 24px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s ease;
}

.profile-icon:hover {
  transform: scale(1.1);
}

.profile-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  min-width: 200px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  display: none;
  flex-direction: column;
  z-index: 10000;
  margin-top: 8px;
}

.profile-dropdown a {
  padding: 12px 16px;
  color: #1f2937;
  text-decoration: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  background: none;
  text-align: left;
  width: 100%;
  display: block;
}

.profile-dropdown a:first-child {
  border-bottom: 1px solid #e5e7eb;
  color: #111;
  font-weight: 600;
  cursor: default;
}

.profile-dropdown a:not(:first-child):hover {
  background: #f3f4f6;
  color: #2563eb;
}

.header-auth-box {
  position: relative;
}
