/* DROPDOWN STYLES */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  cursor: pointer;
  position: relative;
  padding-right: 20px;
  display: inline-block; /* Ensures clickability */
}

.dropdown-toggle::after {
  content: '▼';
  font-size: 10px;
  margin-left: 5px;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #c9a86a;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  
  /* CENTER ALIGNMENT FIX */
  left: 18%;
  transform: translateX(-50%);
  
  background: linear-gradient(135deg, #1a1a1a, #0b0b0b);
  
  /* RESPONSIVE WIDTH FIX */
  width: 1017px; /* Target width */
  max-width: 92vw; /* Never wider than 90% of screen */
  
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  border: 1px solid #333;
  border-top: 3px solid #c9a86a;
  border-radius: 0 0 8px 8px;
  z-index: 1000;
  padding: 25px;
  
  /* Updated Animation */
  animation: dropdownFade 0.3s ease;
  overflow: hidden;
  transition: display 0.2s ease;
}

/* Show dropdown on hover (Desktop) OR when active class is added (Mobile) */
.dropdown:hover .dropdown-content,
.dropdown.active .dropdown-content {
  display: block;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 10px;
  z-index: 999;
}

.dropdown-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

.dropdown-column {
  padding: 0 10px;
  position: relative;
}

/* Vertical divider lines */
.dropdown-column:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -12px;
  top: 0;
  height: 100%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, #333, transparent);
}

.dropdown-section {
  margin-bottom: 25px;
}

.dropdown-section h4 {
  color: #c9a86a;
  font-size: 14px;
  text-transform: none;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #333;
  letter-spacing: 0.5px;
}

.dropdown-section a {
  display: block;
  color: #ddd;
  text-decoration: none;
  font-size: 13px;
  padding: 7px 0;
  transition: all 0.2s ease;
  position: relative;
  padding-left: 12px;
  border-radius: 3px;
}

.dropdown-section a::before {
  content: none !important; /* Forces the arrow to disappear */
  display: none !important;
}

.dropdown-section a:hover {
  color: #c9a86a;
  background: rgba(201, 168, 106, 0.1);
  transform: translateX(5px);
  padding-left: 5px;
}

/* ANIMATION FIX: Must include translateX(-50%) to keep it centered */
@keyframes dropedownFade {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* HOVER EFFECT ON TOGGLE */
.dropdown:hover .dropdown-toggle,
.dropdown.active .dropdown-toggle {
  color: #c9a86a;
}

/* --- RESPONSIVE STYLES (Mobile doesn't work)--- */

/* Tablet (1100px) */
@media (max-width: 1100px) {
  .dropdown-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .dropdown-column:nth-child(3)::after {
    display: none; /* Hide divider after 3rd column */
  }
}

/* Small Tablet (850px) */
@media (max-width: 850px) {
  .dropdown-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dropdown-column:nth-child(2)::after {
    display: none;
  }
}

/* Mobile (900px and below) - Matches your mobile breakpoint */
@media (max-width: 900px) {
  
  /* Mobile Menu Container Styles are in mainHome.css, 
     here we fix the Dropdown inside the Mobile Menu */

  .dropdown-content {
    position: static; /* Stack naturally in the mobile menu */
    display: none;    /* Hidden by default */
    
    /* Reset Desktop Styles */
    transform: none;
    width: 130%;
    max-width: 100vw;
    min-width: auto;
    
    background: transparent;
    box-shadow: none;
    border: none;
    border-left: 2px solid #333; /* Visual indent guide */
    border-radius: 0;
    padding: 10px 0 10px 15px;
    margin-top: 10px;
    
    /* Remove animation on mobile for snappier feel */
    animation: none;
  }

  /* When active (clicked via JS), show it */
  .dropdown.active .dropdown-content {
    display: block;
  }

  .dropdown-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
  }
  
  .dropdown-column {
    padding: 0;
  }
  
  .dropdown-column::after {
    display: none; /* No vertical lines on mobile */
  }
  
  /* Adjust headers for mobile */
  .dropdown-section h4 {
    font-size: 13px;
    border-bottom: none;
    margin-bottom: 5px;
    color: #fff;
  }
}