/* Google Apps Menu Style */
.apps-menu-button {
  position: relative;
  display: inline-block;
  margin-right: 15px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background-color 0.2s;
  z-index: 1040;
  flex-shrink: 0;
}

.apps-menu-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Mobile: Hacer el botón más visible y táctil */
@media (max-width: 991px) {
  .apps-menu-button {
    padding: 12px;
    margin-right: 10px;
    margin-left: auto;
    order: 1 !important;
  }

  .apps-icon {
    width: 24px !important;
    height: 24px !important;
    gap: 4px !important;
  }

  .apps-icon-dot {
    width: 6px !important;
    height: 6px !important;
  }
}

.apps-icon {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  width: 20px;
  height: 20px;
}

.apps-icon-dot {
  width: 5px;
  height: 5px;
  background-color: white;
  border-radius: 50%;
}

/* Dropdown Menu */
.apps-dropdown {
  display: none;
  position: absolute;
  top: 50px;
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  width: 360px;
  max-height: 500px;
  overflow-y: auto;
  z-index: 9999;
  padding: 20px;
}

.apps-dropdown.show {
  display: block;
  animation: fadeInDown 0.3s ease;
}

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

.apps-dropdown-header {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.apps-category {
  margin-bottom: 20px;
}

.apps-category-title {
  font-size: 12px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.app-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  transition: all 0.2s;
  cursor: pointer;
  min-height: 90px;
}

.app-item:hover {
  background-color: #f1f3f4;
  text-decoration: none;
  color: #1a73e8;
  transform: translateY(-2px);
}

.app-item i {
  font-size: 28px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.app-item.ia i {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.app-item.software i {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.app-item.servicios i {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.app-item.hardware i {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.app-item-name {
  font-size: 11px;
  text-align: center;
  line-height: 1.2;
  font-weight: 500;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Mobile responsive */
@media (max-width: 991px) {
  .apps-dropdown {
    position: fixed !important;
    top: 76px !important;
    left: 5vw !important;
    right: 5vw !important;
    width: 90vw;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
  }

  .apps-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .app-item {
    padding: 10px 5px;
    min-height: 80px;
  }

  .app-item i {
    font-size: 24px;
  }

  .app-item-name {
    font-size: 10px;
  }
}

/* Overlay */
.apps-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 9998;
}

.apps-overlay.show {
  display: block;
}
