/* Navigation Dropdown Styles
 * Global styles for navigation dropdowns to ensure proper rendering
 * Note: text-decoration rules are in app/layout.tsx as inline styles for higher specificity
 */

/* Base dropdown menu styles */
.dropdown-menu {
  position: absolute;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  padding: 16px;
  margin-top: 0;
  z-index: 100000;
  animation: fadeIn 0.15s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Platform dropdown */
.dropdown-menu.platform-dropdown {
  top: 100% !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  min-width: 680px !important;
  max-width: 680px !important;
  width: 680px !important;
  padding: 24px !important;
  animation: fadeInPlatform 0.15s ease-in !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-top: 0 !important;
}

@keyframes fadeInPlatform {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-4px) !important;
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) !important;
  }
}

.platform-dropdown .platform-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 24px;
  width: 100%;
}

.platform-dropdown .platform-column {
  min-width: 200px;
  display: block;
}

/* Workflows dropdown */
.dropdown-menu.workflows-dropdown {
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 680px;
  padding: 24px;
  animation: fadeInCenterWorkflows 0.15s ease-in;
}

@keyframes fadeInCenterWorkflows {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.workflows-dropdown .dropdown-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 20px;
  letter-spacing: 0.08em;
  padding-left: 4px;
}

.workflows-dropdown ul.dropdown-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.workflows-dropdown ul.dropdown-links li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.workflows-dropdown ul.dropdown-links li a.dropdown-link {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.15s;
}

.workflows-dropdown ul.dropdown-links li a.dropdown-link:hover {
  background-color: #f3f4f6;
}

.workflows-dropdown .dropdown-link-content {
  display: flex;
  flex-direction: column;
}

.workflows-dropdown .dropdown-link-label {
  font-size: 14px;
  font-weight: 500;
  color: #111827;
  margin-bottom: 2px;
}

.workflows-dropdown .dropdown-link-description {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
}

/* Special styling for the "Browse All" link - spans full width */
.workflows-dropdown ul.dropdown-links li:last-child {
  grid-column: 1 / -1;
  margin-top: 8px;
}

.workflows-dropdown ul.dropdown-links li:last-child a.dropdown-link {
  padding: 20px 24px;
  margin-top: 8px;
  background: linear-gradient(135deg, #5b5fef 0%, #4338ca 100%);
  border: 2px solid #5b5fef;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(91, 95, 239, 0.25);
}

.workflows-dropdown ul.dropdown-links li:last-child a.dropdown-link:hover {
  background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
  border-color: #4338ca;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(91, 95, 239, 0.4);
}

.workflows-dropdown ul.dropdown-links li:last-child .dropdown-link-content {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.workflows-dropdown ul.dropdown-links li:last-child .dropdown-link-label {
  font-size: 17px;
  font-weight: 700;
  color: white;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.workflows-dropdown ul.dropdown-links li:last-child .dropdown-link-label::after {
  content: "→";
  font-size: 22px;
  transition: transform 0.2s ease;
  font-weight: 400;
}

.workflows-dropdown ul.dropdown-links li:last-child a.dropdown-link:hover .dropdown-link-label::after {
  transform: translateX(8px);
}

.workflows-dropdown ul.dropdown-links li:last-child .dropdown-link-description {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  margin-left: auto;
  text-align: right;
  font-size: 14px;
}

/* Responsive adjustment */
@media (max-width: 768px) {
  .workflows-dropdown {
    min-width: auto;
    max-width: 90vw;
  }

  .workflows-dropdown .dropdown-links {
    grid-template-columns: 1fr;
  }
}

/* Tools dropdown */
.dropdown-menu.tools-dropdown {
  top: 100% !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  min-width: 420px !important;
  max-width: 420px !important;
  width: 420px !important;
  padding: 24px !important;
  animation: fadeInTools 0.15s ease-in !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-top: 0 !important;
}

@keyframes fadeInTools {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-4px) !important;
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) !important;
  }
}

/* Resources dropdown */
.dropdown-menu.resources-dropdown {
  top: 100% !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  min-width: 520px !important;
  max-width: 520px !important;
  width: 520px !important;
  padding: 24px !important;
  animation: fadeInResources 0.15s ease-in !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-top: 0 !important;
}

@keyframes fadeInResources {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-4px) !important;
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) !important;
  }
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Solutions mega menu */
.solutions-mega-menu {
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 720px;
}

@keyframes fadeInCenter {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.solutions-mega-menu {
  animation: fadeInCenter 0.15s ease-in;
}

.mega-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.mega-menu-column {
  min-width: 200px;
}

/* Dropdown content styles */
.dropdown-section-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.dropdown-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dropdown-links li {
  margin-bottom: 4px;
}

.dropdown-link {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.15s;
  color: inherit;
}

.dropdown-link:hover {
  background-color: #f3f4f6;
}

.dropdown-link-content {
  display: flex;
  flex-direction: column;
}

.dropdown-link-label {
  font-size: 14px;
  font-weight: 500;
  color: #111827;
  margin-bottom: 2px;
  white-space: normal;
  word-wrap: break-word;
}

.dropdown-link-description {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
  white-space: normal;
  word-wrap: break-word;
}

/* Responsive styles */
@media (max-width: 768px) {
  .platform-dropdown {
    min-width: auto;
    max-width: 90vw;
    left: 50%;
    transform: translateX(-50%);
  }

  .platform-dropdown .platform-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  .tools-dropdown {
    min-width: auto !important;
    max-width: 90vw !important;
    width: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  .resources-dropdown {
    min-width: auto !important;
    max-width: 90vw !important;
    width: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  .resources-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .solutions-mega-menu {
    min-width: auto;
    max-width: 90vw;
  }

  .mega-menu-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
