/* Navigation and Dropdown Styles */

/* Dropdown structure */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #fff;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 100;
  border-radius: 8px;
  padding: 8px;
  left: -550px;
  width: 900px;
  top: 100%;
  margin-top: 5px;
  box-sizing: border-box;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* Add transition for smoother dropdown experience */
.dropdown {
  position: relative;
  display: inline-block;
  padding-bottom: 5px; /* Reduced padding as requested */
}

.dropdown > a:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 15px; /* Invisible area to maintain hover */
  background: transparent;
}

/* Fixed vertical alignment for OTHER AI TOOLS */
.dropbtn {
  line-height: 1.4;
  display: inline-flex;
  align-items: center;
  position: relative;
  top: 2px; /* Move OTHER AI TOOLS down a bit */
}

.nav-links > li.dropdown {
  display: flex;
  align-items: flex-start; /* Align to the top */
  padding-top: 0;
  margin-top: 0;
}

.dropdown-columns {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 5px;
  width: 100%;
}

.dropdown-column {
  flex: 1;
  width: 210px;
  min-width: 0;
  padding-right: 5px;
  padding-left: 5px;
  border-right: 1px solid #eee;
}

/* Make second column wider for longer text */
.dropdown-column:nth-child(2) {
  width: 240px;
}

.dropdown-column:last-child {
  border-right: none;
}

.dropdown-column h4 {
  color: #333;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #eee;
  font-size: 15px;
}

.dropdown-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.dropdown-column ul li {
  margin-bottom: 10px;
}

.dropdown-column ul li a {
  color: #444;
  text-decoration: none;
  font-size: 13px;
  display: block;
  padding: 5px 0;
  transition: color 0.2s ease;
  white-space: normal; /* Allow text to wrap to next line */
  word-break: break-word;
  line-height: 1.3;
}

.dropdown-column ul li a:hover {
  color: var(--primary-color);
}

/* Badge styles */
.new-badge, .free-badge {
  display: inline-block;
  padding: 1px 4px;
  border-radius: 8px;
  font-size: 9px;
  margin-left: 3px;
  text-transform: uppercase;
  font-weight: 600;
  line-height: 1;
  vertical-align: middle;
}

.new-badge {
  background-color: #ff6b6b;
  color: white;
}

.free-badge {
  background-color: #4ecdc4;
  color: white;
}

/* Dropdown button */
.dropbtn {
  cursor: pointer;
  display: flex;
  align-items: center;
}

.dropbtn .fa-caret-down {
  margin-left: 5px;
  transition: transform 0.3s;
}

.dropdown:hover .dropbtn .fa-caret-down {
  transform: rotate(180deg);
}

/* Adjust main navigation */
.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: space-between;
}

.nav-links > li {
  position: relative;
  margin-right: 5px;
}

.nav-links > li > a {
  font-weight: 500;
  font-size: 14px;
  padding: 8px 6px;
  white-space: nowrap;
}

/* Responsive adjustments */
@media screen and (max-width: 1200px) {
  .dropdown-content {
    width: 800px;
    left: -400px;
  }
  
  .dropdown-column {
    min-width: 150px;
    max-width: 170px;
  }
}

@media screen and (max-width: 992px) {
  .dropdown-content {
    width: 90vw;
    left: 0;
    right: auto;
    transform: none;
  }
  
  .dropdown-columns {
    flex-direction: column;
  }
  
  .dropdown-column {
    max-width: 100%;
    border-right: none;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px;
  }
  
  .dropdown-column:last-child {
    border-bottom: none;
  }
}

@media screen and (max-width: 768px) {
  .dropdown-content {
    position: static;
    box-shadow: none;
    width: 100%;
  }
  
  .nav-links {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .nav-links > li {
    width: 100%;
    margin-right: 0;
    margin-bottom: 10px;
  }
}
