/* Apps & Platforms hub — mobile-first, social-bio style, dark/light aware.
   Uses Bootstrap theme vars (--bs-body-bg / --bs-body-color) as a base and
   layers a small set of local tokens so it works in both themes. */

.apps-hub {
  --ah-radius: 16px;
  --ah-gap: 14px;
  --ah-maxw: 640px;
  --ah-card-bg: #ffffff;
  --ah-card-border: rgba(0, 0, 0, 0.08);
  --ah-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --ah-muted: rgba(0, 0, 0, 0.6);
  --ah-accent: #0d6efd;
  --ah-accent-contrast: #ffffff;
  --ah-btn-secondary-bg: rgba(13, 110, 253, 0.08);

  box-sizing: border-box;
  width: 100%;
  max-width: var(--ah-maxw);
  margin: 0 auto;
  padding: 20px 16px 40px;
  overflow-x: hidden;
}

.apps-hub *,
.apps-hub *::before,
.apps-hub *::after {
  box-sizing: border-box;
}

[data-bs-theme="dark"] .apps-hub {
  --ah-card-bg: #141a26;
  --ah-card-border: rgba(255, 255, 255, 0.12);
  --ah-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  --ah-muted: rgba(255, 255, 255, 0.65);
  --ah-accent: #4c8dff;
  --ah-accent-contrast: #0b0f19;
  --ah-btn-secondary-bg: rgba(76, 141, 255, 0.14);
}

/* Header */
.apps-hub__header {
  text-align: center;
  margin-bottom: 22px;
}

.apps-hub__heading {
  font-size: 1.7rem;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.2;
}

.apps-hub__tagline {
  margin: 0 auto;
  max-width: 34ch;
  color: var(--ah-muted);
  font-size: 1rem;
  line-height: 1.4;
}

/* Sections */
.apps-hub__featured {
  margin-bottom: var(--ah-gap);
}

.apps-hub__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ah-gap);
}

/* Cards */
.apps-hub-card {
  background: var(--ah-card-bg);
  border: 1px solid var(--ah-card-border);
  border-radius: var(--ah-radius);
  box-shadow: var(--ah-shadow);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.apps-hub-card--featured {
  border-width: 2px;
  border-color: var(--ah-accent);
}

.apps-hub-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.apps-hub-card__logo {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ah-btn-secondary-bg);
  color: var(--ah-accent);
  font-size: 1.5rem;
  overflow: hidden;
}

.apps-hub-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.apps-hub-card__titles {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.apps-hub-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.25;
  word-break: break-word;
}

.apps-hub-badge {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--ah-btn-secondary-bg);
  color: var(--ah-accent);
  white-space: nowrap;
}

.apps-hub-badge--live {
  background: rgba(25, 135, 84, 0.14);
  color: #198754;
}

[data-bs-theme="dark"] .apps-hub-badge--live {
  color: #4ade80;
}

.apps-hub-card__desc {
  margin: 0;
  color: var(--ah-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.apps-hub-card__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

/* Buttons — large & tap-friendly */
.apps-hub-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.apps-hub-btn:hover {
  opacity: 0.92;
  text-decoration: none;
}

.apps-hub-btn:focus-visible {
  outline: 2px solid var(--ah-accent);
  outline-offset: 2px;
}

.apps-hub-btn--primary {
  background: var(--ah-accent);
  color: var(--ah-accent-contrast);
}

.apps-hub-btn--secondary {
  background: var(--ah-btn-secondary-bg);
  color: var(--ah-accent);
  border-color: var(--ah-card-border);
}

.apps-hub-btn--disabled {
  background: var(--ah-btn-secondary-bg);
  color: var(--ah-muted);
  cursor: not-allowed;
  opacity: 0.7;
}

.apps-hub-btn--wide {
  max-width: 320px;
  margin: 0 auto;
}

/* Contact & footer */
.apps-hub__contact {
  text-align: center;
  margin-top: 28px;
  padding: 22px 16px;
  border-radius: var(--ah-radius);
  border: 1px solid var(--ah-card-border);
  background: var(--ah-card-bg);
}

.apps-hub__contact-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.apps-hub__contact-text {
  margin: 0 auto 16px;
  max-width: 42ch;
  color: var(--ah-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.apps-hub__footer {
  margin-top: 28px;
  text-align: center;
}

.apps-hub__footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin-bottom: 12px;
}

.apps-hub__footer-links a {
  color: var(--ah-accent);
  text-decoration: none;
  font-size: 0.9rem;
}

.apps-hub__footer-links a:hover {
  text-decoration: underline;
}

.apps-hub__copyright {
  margin: 0;
  color: var(--ah-muted);
  font-size: 0.85rem;
}

/* Responsive grid on wider viewports */
@media (min-width: 560px) {
  .apps-hub__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Interest form (upcoming-product update pages) */
.apps-hub-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.apps-hub-form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.apps-hub-form__label {
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 6px;
}

.apps-hub-form__input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--ah-card-border);
  background: var(--ah-card-bg);
  color: inherit;
  font-size: 1rem;
}

textarea.apps-hub-form__input {
  min-height: 88px;
  resize: vertical;
}

.apps-hub-form__input:focus-visible {
  outline: 2px solid var(--ah-accent);
  outline-offset: 1px;
}

.apps-hub-form__consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 10px 0 4px;
  font-size: 0.9rem;
  color: var(--ah-muted);
  line-height: 1.4;
}

.apps-hub-form__consent input {
  margin-top: 3px;
  flex: 0 0 auto;
}
