/* ================================================================
   APPS PAGE — Chrome Extension / iOS App teaser page
   Styles for layouts/_default/apps.html. Only loaded on /apps/.
   ================================================================ */

/* ── Header padding: theme.scss's ".page-template .post-header" rule
   gives every post-header 60px top+bottom padding — same fix as
   vocab-page.css/reader.css's copy of this override. ── */

#apps-page-header {
  padding: 1.1rem 0 0.8rem;
}

/* ── Back link + language menu share one row, same pattern as
   vocab-page.css's #vocab-page-topbar / reader.css's #reader-page-topbar.
   Previously two stacked blocks (site-languages, then back-to-main-page
   below it) rendering as two header rows — merged into one flex row. ── */

#apps-page-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* ── Language menu — same pill-button look as the homepage's
   #site-languages (theme.scss), which is scoped to #site-head and so
   doesn't reach this standalone page on its own. apps.html renders the
   identical markup; this just re-supplies the visual rules — same fix
   as reader.css's copy of this block. ── */

#site-languages {
  position: relative;
  text-align: right;
}

#site-languages .btn-lang {
  text-decoration: none;
  background-color: #FFFF33;
  color: #3333FF;
  border-radius: 5px;
  -webkit-border-radius: 5px;
  display: inline-block;
  font-size: 70%;
  line-height: 1;
  margin: 0 0 0 0.7rem;
  padding: 0.3rem 0.7rem;
  position: relative;
  text-transform: uppercase;
  font-family: "Oswald", sans-serif;
}

#site-languages .btn-lang.active {
  color: #D4FF00;
  background-color: #2B00FF;
}

#site-languages .btn-lang:hover {
  color: #D4FF00;
  background-color: #2B00FF;
}

/* ── Collapsed dropdown trigger — same pattern as reader.css/vocab-page.css:
   inert above the MOBILE breakpoint below, where #lang-dropdown instead
   renders flat as the plain pill row (the original look). Below it, this
   becomes the only visible piece and #lang-dropdown becomes an
   absolutely-positioned panel toggled by it. ── */

#lang-trigger {
  display: none;
}

#lang-dropdown {
  display: contents;
}

@media only screen and (max-width: 640px) {
  #lang-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background-color: #FFFF33;
    color: #3333FF;
    border: none;
    border-radius: 5px;
    box-sizing: content-box;
    height: 1em;
    line-height: 1;
    padding: 0.3rem 0.7rem;
    font-size: 70%;
    font-family: "Oswald", sans-serif;
    text-transform: uppercase;
    cursor: pointer;
  }

  #lang-trigger .lang-trigger-icon-svg {
    width: 1.5em;
    height: 1.5em;
    flex-shrink: 0;
  }

  #lang-trigger .lang-trigger-caret {
    font-size: 0.8em;
    transition: transform 0.2s ease;
  }

  #site-languages.open #lang-trigger {
    color: #D4FF00;
    background-color: #2B00FF;
  }

  #site-languages.open #lang-trigger .lang-trigger-caret {
    transform: rotate(180deg);
  }

  #lang-dropdown {
    display: none;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
    z-index: 1000;
  }

  #site-languages.open #lang-dropdown {
    display: flex;
  }

  #lang-dropdown .btn-lang {
    margin: 0;
  }
}

#back-to-main-page {
  font-family: "Lexend", sans-serif;
  white-space: nowrap;
  text-decoration: none;
}

.apps-page .post-title {
  text-align: center;
}

.apps-intro {
  max-width: 640px;
  margin: 0 auto 2.5rem;
  text-align: center;
  color: #555;
  font-size: 1.15rem;
  line-height: 1.6;
}

.apps-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.apps-card {
  flex: 1 1 320px;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.apps-card__icon {
  width: 84px;
  height: 84px;
  border-radius: 18px;
  margin-bottom: 1.2rem;
}

.apps-card__title {
  margin: 0 0 0.6rem;
  font-size: 1.5rem;
}

.apps-card__desc {
  margin: 0 0 1.2rem;
  color: #555;
  font-size: 1rem;
  line-height: 1.5;
}

.apps-card__tag {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.6;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
}
