/* index.css - Root Page Styling for web-tools */

/* Main Container: 820px Max Width Centered on PC */
.idx-container {
  max-width: 820px;
  margin: 0 auto;
  padding: 16px 16px 40px 16px;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #1e293b;
}

/* Global Header & Navigation Harmony when on index.php */
#HeaderLogo {
  background-color: #649AFC;
  background: #649AFC;
  padding: 12px 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

#TopMenu, #FootMenu {
  max-width: 820px;
  margin: 0 auto;
  background-color: #f8fafc;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  border: 1px solid #e2e8f0;
}

#TopMenu a, #FootMenu a {
  color: #2563eb;
  font-weight: 500;
}

/* Hero Intro Card - Refreshing Business Style */
.idx-hero {
  background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 50%, #e0f2fe 100%);
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-left: 5px solid #2563eb;
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px -2px rgba(37, 99, 235, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
}

.idx-hero::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -30px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
  border-radius: 50%;
}

.idx-hero-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
}

.idx-hero-icon-box {
  width: 48px;
  height: 48px;
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.1);
}

.idx-hero-icon-box img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.idx-hero-titles {
  flex-grow: 1;
}

.idx-hero-badge-group {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}

.idx-hero-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 2px 9px;
  border-radius: 20px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  display: inline-block;
}

.idx-hero-title {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.idx-hero-desc {
  font-size: 13.5px;
  line-height: 1.6;
  color: #334155;
  margin: 0;
}

/* Search & Filter Bar */
.idx-controls {
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.idx-search-box {
  position: relative;
  width: 100%;
}

.idx-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.idx-search-input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  font-size: 15px;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  background-color: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
  box-sizing: border-box;
  outline: none;
}

.idx-search-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
  background-color: #ffffff;
}

.idx-search-input::placeholder {
  color: #94a3b8;
}

.idx-search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
  font-size: 12px;
}

.idx-search-clear:hover {
  background: #e2e8f0;
  color: #1e293b;
}

/* Category Filter Chips */
.idx-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.idx-chips::-webkit-scrollbar {
  height: 4px;
}

.idx-chips::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.idx-chip {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 20px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  user-select: none;
}

.idx-chip:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.idx-chip.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

/* Category Section */
.idx-section {
  margin-bottom: 42px;
}

.idx-section.hidden {
  display: none;
}

.idx-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.idx-section-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.idx-section-icon {
  color: #2563eb;
  display: flex;
  align-items: center;
}

.idx-section-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.idx-section-badge {
  font-size: 12px;
  font-weight: 600;
  background: #eff6ff;
  color: #2563eb;
  padding: 2px 8px;
  border-radius: 12px;
}

/* Cards Grid */
.idx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

/* Tool Card Item */
.idx-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
}

.idx-card.hidden {
  display: none !important;
}

.idx-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 6px 16px -2px rgba(37, 99, 235, 0.12), 0 2px 6px -1px rgba(37, 99, 235, 0.08);
  transform: translateY(-2px);
  background: #ffffff;
}

.idx-card:active {
  transform: translateY(0);
}

.idx-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.2s ease;
}

.idx-card:hover .idx-card-icon {
  background: #eff6ff;
  border-color: #dbeafe;
}

.idx-card-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.idx-card-content {
  flex-grow: 1;
  min-width: 0;
}

.idx-card-name {
  font-size: 14.5px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.35;
  margin-bottom: 3px;
  word-break: break-word;
  transition: color 0.2s ease;
}

.idx-card:hover .idx-card-name {
  color: #2563eb;
}

.idx-card-desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Empty search result state */
.idx-empty-state {
  display: none;
  text-align: center;
  padding: 40px 20px;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  margin-top: 16px;
}

.idx-empty-state.show {
  display: block;
}

.idx-empty-icon {
  color: #94a3b8;
  margin-bottom: 8px;
}

.idx-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 4px;
}

.idx-empty-desc {
  font-size: 13px;
  color: #64748b;
}

/* Mobile & Tablet Responsiveness */
@media (max-width: 640px) {
  .idx-container {
    padding: 12px 12px 32px 12px;
  }

  .idx-hero {
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 20px;
  }

  .idx-hero-header {
    gap: 12px;
  }

  .idx-hero-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 10px;
  }

  .idx-hero-icon-box img {
    width: 28px;
    height: 28px;
  }

  .idx-hero-title {
    font-size: 19px;
  }

  .idx-hero-desc {
    font-size: 12.5px;
  }

  .idx-controls {
    margin-bottom: 24px;
  }

  .idx-section {
    margin-bottom: 32px;
  }

  .idx-grid {
    grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    gap: 10px;
  }

  .idx-card {
    padding: 10px 12px;
    border-radius: 10px;
  }

  .idx-card-icon {
    width: 36px;
    height: 36px;
  }

  .idx-card-icon img {
    width: 24px;
    height: 24px;
  }

  .idx-card-name {
    font-size: 14px;
  }
}

