/* =========================================================
   WEB APPS — PLAY STORE STYLE
========================================================= */

.web-app-grid {
  display: grid;

  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));

  gap: 14px 10px;
  
}

/* =========================================================
   APP CARD
========================================================= */

.web-app-card {
  min-width: 0;

  display: flex;

  flex-direction: column;

  align-items: flex-start;

  padding: 8px;

  color: var(--text-main);

  background: var(--bg-surface);

  border: 1px solid var(--border-color);

  border-radius: var(--radius-md);

  text-decoration: none;

  overflow: hidden;
  

  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background-color 0.16s ease;
}

.web-app-card:hover {
  transform: translateY(-2px);

  border-color: var(--accent);

  box-shadow: var(--shadow-md);
}

/* =========================================================
   ICON CONTAINER
========================================================= */

.web-app-icon {
  width: 100% !important;
  height: auto !important;

  aspect-ratio: 1 / 1;

  min-width: 0;
  min-height: 0;

  max-width: none;
  max-height: none;

  flex: none;

  display: block;

  object-fit: cover;

  margin: 0;

  border: 1px solid var(--border-color);

  border-radius: 10px;

  background: var(--bg-base);

  transition:
    transform 0.16s ease,
    border-color 0.16s ease;
}

.web-app-card:hover .web-app-icon {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border-color));
}

/* =========================================================
   INFO
========================================================= */

.web-app-info {
  width: 100%;

  min-width: 0;

  display: flex;

  flex-direction: column;

  align-items: flex-start;

  margin-top: 8px;
}

/* =========================================================
   APP NAME
========================================================= */

.web-app-name {
  width: 100%;

  display: -webkit-box;

  overflow: hidden;

  color: var(--text-main);

  font-size: 12px;

  line-height: 1.35;

  font-weight: 600;

  text-align: left;

  white-space: normal;

  -webkit-line-clamp: 2;

  -webkit-box-orient: vertical;
}

/* =========================================================
   DESCRIPTION
========================================================= */

.web-app-description {
  width: 100%;

  display: block;

  overflow: hidden;

  margin-top: 3px;

  color: var(--text-muted);

  font-size: 9px;

  line-height: 1.3;

  white-space: nowrap;

  text-overflow: ellipsis;

  opacity: 0;

  max-height: 0;

  transform: translateY(-3px);

  transition:
    opacity 0.16s ease,
    max-height 0.16s ease,
    transform 0.16s ease;
}

/* Show description on hover */

.web-app-card:hover .web-app-description {
  opacity: 1;

  max-height: 20px;

  transform: translateY(0);
}
.web-apps-section {
  margin-bottom: 20px;
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {
  .web-app-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 12px 8px;
  }

  .web-app-card {
    padding: 6px;
  }

  .web-app-info {
    margin-top: 6px;
  }

  .web-app-name {
    font-size: 10.5px;
  }

  /*
       Descriptions are normally hidden on mobile
       because there is no hover.
    */

  .web-app-description {
    display: none;
  }
}

/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {
  .web-app-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 10px 6px;
  }

  .web-app-card {
    padding: 5px;
  }

  .web-app-icon {
    border-radius: 8px;
  }

  .web-app-info {
    margin-top: 5px;
  }

  .web-app-name {
    font-size: 10px;

    line-height: 1.3;
  }
}
