/* ===================================
   STACK PAGE STYLES - MINIMALIST DESIGN
   Using existing design tokens from /assets/css/style.css
   =================================== */

/* ===== LAYOUT CONTAINERS ===== */
.stack-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md);
}

.stack-header {
  text-align: center;
  margin-bottom: var(--space-xl);
  padding-top: var(--space-xl);
}

.stack-header h1 {
  font-family: var(--font-family-sans);
  font-size: 2.5rem;
  font-weight: var(--font-weight-semibold);
  line-height: var(--lh-tight);
  color: #0b0b0b;
  margin-bottom: var(--space-sm);
}

.stack-header p {
  font-family: var(--font-family-ui);
  font-size: var(--fs-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--lh-body);
  color: #3c4149;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== CATEGORY BAR ===== */
.stack-category-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  gap: var(--space-md);
}

.stack-categories {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* Category Pills - Using company pill design */
.category-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 50px;
  padding: 8px 18px;
  white-space: nowrap;
  font-family: var(--font-family-ui);
  font-size: var(--fs-sm);
  font-weight: var(--font-weight-medium);
  color: #3c4149;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.category-pill:hover {
  background-color: #faf8f2;
  border-color: #d0d0d0;
}

.category-pill.active {
  background-color: #0b0b0b;
  border-color: #0b0b0b;
  color: #ffffff;
}

.tools-count {
  font-family: var(--font-family-ui);
  font-size: var(--fs-sm);
  font-weight: var(--font-weight-regular);
  color: #787e87;
}

/* ===== TOOL CARDS GRID ===== */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

@media (max-width: 1024px) {
  .stack-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .stack-grid {
    grid-template-columns: 1fr;
  }
}

/* Tool Card */
.tool-card {
  background: #ffffff;
  border-radius: 16px;
  padding: var(--space-md);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  text-decoration: none !important;
  display: block;
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 8px 24px rgba(0, 0, 0, 0.08);
}

.tool-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  margin-top: var(--space-xs) !important;
  margin-bottom: 0;
  object-fit: cover;
}

.tool-card-title {
  font-family: var(--font-family-sans);
  font-size: var(--fs-md);
  font-weight: var(--font-weight-medium);
  line-height: var(--lh-snug);
  color: #0b0b0b;
  margin-bottom: var(--space-xs);
}

.tool-card-description {
  font-family: var(--font-family-ui);
  font-size: var(--fs-xs);
  font-weight: var(--font-weight-regular);
  line-height: var(--lh-body);
  color: #3c4149;
  margin-bottom: var(--space-md);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3em;
}

.tool-card-platforms {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

/* Platform Tags */
.platform-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 0px 10px;
  font-family: var(--font-family-ui);
  font-size: 0.8125rem;
  font-weight: var(--font-weight-regular);
  color: #2a2a2a;
  white-space: nowrap;
}

/* ===== BREADCRUMB ===== */
.stack-breadcrumbs {
  text-align: center;
  padding-top: var(--space-md);
}

.stack-breadcrumbs ol {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: var(--font-family-ui);
  font-size: var(--fs-sm);
  color: #787e87;
}

.stack-breadcrumbs li {
  display: inline;
}

.stack-breadcrumbs li:not(:last-child)::after {
  content: " / ";
  color: #c0c0c0;
}

.stack-breadcrumbs a {
  color: #787e87;
  text-decoration: none;
  transition: color 0.2s ease;
}

.stack-breadcrumbs a:hover {
  color: #BE3455;
}

.stack-breadcrumbs li[aria-current="page"] {
  color: #787e87;
}

/* ===== INDIVIDUAL TOOL PAGE ===== */
.tool-detail-container {
  max-width: var(--measure);
  max-width: 960px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md);
}

.tool-header {
  text-align: center;
  margin-bottom: var(--space-xl);
  padding: var(--space-xl) 0;
}

.tool-header-icon {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  margin: 0 auto var(--space-md);
  object-fit: cover;
}

.tool-header h1 {
  font-family: var(--font-family-sans);
  font-size: 2.5rem;
  font-weight: var(--font-weight-bold);
  line-height: var(--lh-tight);
  color: #0b0b0b;
  margin-bottom: var(--space-sm);
}

.tool-header-tagline {
  font-family: var(--font-family-ui);
  font-size: var(--fs-lg);
  font-weight: var(--font-weight-regular);
  line-height: var(--lh-body);
  color: #3c4149;
  margin-bottom: var(--space-lg);
}

.tool-header-cta {
  display: inline-block;
  background-color: #0b0b0b;
  color: #ffffff;
  font-family: var(--font-family-sans);
  font-size: var(--fs-base);
  font-weight: var(--font-weight-semibold);
  padding: 14px 32px;
  border-radius: 50px;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.tool-header-cta:hover {
  color: #ffffff !important;
  background-color: #323030;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Tool Metadata */
.tool-metadata {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  padding: var(--space-lg);
  background-color: #fafafa;
  border-radius: 12px;
}

.tool-metadata-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.tool-metadata-label {
  font-family: var(--font-family-ui);
  font-size: var(--fs-sm);
  font-weight: var(--font-weight-semibold);
  color: #787e87;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tool-metadata-value {
  font-family: var(--font-family-sans);
  font-size: var(--fs-base);
  font-weight: var(--font-weight-medium);
  color: #0b0b0b;
}

/* Preview Section */
.tool-preview {
  margin-bottom: var(--space-xl);
}

.tool-preview h2 {
  font-family: var(--font-family-sans);
  font-size: var(--fs-xl);
  font-weight: var(--font-weight-semibold);
  line-height: var(--lh-tight);
  color: #0b0b0b;
  margin-bottom: var(--space-lg);
}

.tool-screenshots {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  width: 100%;
}

.tool-screenshots > img {
  flex: 0 0 auto;
  display: block;
  width: 100%;
  max-width: 100%;
}

/* Two-column layout for specific tools */
.tool-screenshots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.tool-screenshots-grid > img {
  flex: none;
  width: 100%;
}

@media (max-width: 768px) {
  .tool-screenshots-grid {
    grid-template-columns: 1fr;
  }
}

.tool-screenshot {
  display: block !important;
  width: 100% !important;
  max-width: 100%;
  border-radius: 12px;
  margin-bottom: 0 !important;
}

/* Video mockups */
.tool-screenshots video {
  display: block;
  width: 100%;
  max-width: 100%;
  border-radius: 12px;
  background: #000;
}

/* Description Section */
.tool-description {
  margin-bottom: var(--space-xl);
}

.tool-description h2 {
  font-family: var(--font-family-sans);
  font-size: var(--fs-xl);
  font-weight: var(--font-weight-semibold);
  line-height: var(--lh-tight);
  color: #0b0b0b;
  margin-bottom: var(--space-lg);
}

.tool-description p {
  font-family: var(--font-family-ui);
  font-size: var(--fs-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--lh-body);
  color: #3c4149;
  margin-bottom: var(--space-md);
}

.tool-description a {
  color: #3c4149;
  box-shadow: inset 0 -2px 0 0 #BE3455;
  display: inline;
  padding: 3px 3px;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

.tool-description a:hover {
  color: #ffffff;
  box-shadow: inset 0 -2em 0 0 #BE3455;
}

/* More Apps Section */
.more-apps {
  margin-top: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 1px solid #e5e5e5;
}

.more-apps-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.more-apps h2 {
  font-family: var(--font-family-sans);
  font-size: var(--fs-lg);
  font-weight: var(--font-weight-semibold);
  line-height: var(--lh-tight);
  color: #0b0b0b;
}

.browse-all-link {
  font-family: var(--font-family-ui);
  font-size: var(--fs-sm);
  font-weight: var(--font-weight-medium);
  color: #3c4149;
  text-decoration: none;
  transition: color 0.2s ease;
}

.browse-all-link:hover {
  color: #BE3455;
}

.more-apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}

/* Small Tool Card for More Apps */
.tool-card-small {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: var(--space-md);
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.tool-card-small:hover {
  border-color: #d0d0d0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tool-card-small-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.tool-card-small-content {
  flex: 1;
}

.tool-card-small-title {
  font-family: var(--font-family-sans);
  font-size: var(--fs-base);
  font-weight: var(--font-weight-semibold);
  line-height: var(--lh-snug);
  color: #0b0b0b;
  margin-bottom: 4px;
}

.tool-card-small-tagline {
  font-family: var(--font-family-ui);
  font-size: var(--fs-sm);
  font-weight: var(--font-weight-regular);
  line-height: var(--lh-snug);
  color: #787e87;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
  .stack-header h1,
  .tool-header h1 {
    font-size: 2rem;
  }

  .stack-container,
  .tool-detail-container {
    padding: var(--space-lg) var(--space-md);
  }

  .tool-metadata {
    grid-template-columns: 1fr;
  }

  .more-apps-grid {
    grid-template-columns: 1fr;
  }
}

