/* AllFunApps homepage additions (loaded after templatemo-style.css) */

.afa-home-intro { padding: 0 16px; }
.afa-home-intro h1 { font-size: clamp(1.6rem, 5.5vw, 2.2rem); line-height: 1.2; margin-bottom: 12px; }
.afa-home-intro p { font-size: 1.05rem; line-height: 1.55; color: #333; }

/* Cards: whole card is one large tap target */
.afa-card-link { display: block; height: 100%; padding: 12px 12px 18px; border-radius: 12px; color: inherit; text-decoration: none; text-align: center; transition: box-shadow .15s, transform .15s; }
.afa-card-link:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, .14); transform: translateY(-2px); }
.afa-card-link:focus-visible { outline: 3px solid #f0a500; outline-offset: 2px; }
.afa-card .tm-gallery-img { display: block; margin: 0 auto 12px; width: 100%; max-width: 250px; height: auto; border-radius: 8px; }
.afa-card .tm-gallery-title { margin-bottom: 8px; }
.afa-card .tm-gallery-description { margin-bottom: 14px; color: #444; }
.afa-subject { display: inline-block; margin-bottom: 6px; padding: 2px 10px; border-radius: 999px; background: #eef4fa; color: #1a6692; font-size: .8rem; font-weight: 600; letter-spacing: .02em; }
.afa-play { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 22px; border-radius: 999px; background: #e8590c; color: #fff; font-weight: 600; }
.afa-card-link:hover .afa-play { background: #c94b08; }

.afa-home-info { max-width: 760px; margin: 10px auto 34px; padding: 0 16px; font-size: 1rem; line-height: 1.6; color: #333; }
.afa-home-info h2 { font-size: 1.4rem; margin-bottom: 12px; text-align: center; }
.afa-home-points { margin: 0 0 14px; padding-left: 1.2em; }
.afa-home-points li { margin-bottom: 8px; }
.afa-home-info a { color: #0b62b0; }

.afa-footer-links a { display: inline-block; padding: 6px 0; }

/* Facebook page plugin can be wider than a small phone */
.fb-page, .fb-page span, .fb-page iframe { max-width: 100% !important; }

.tm-gallery-page { justify-content: center; }
/* Phones: two cards per row instead of one long column */
@media (max-width: 575px) {
  .tm-gallery-page { max-width: none; padding: 0 6px; }
  .afa-card { flex: 0 0 50%; max-width: 50%; padding-left: 4px; padding-right: 4px; }
  .afa-card-link { padding: 8px 4px 14px; }
  .afa-card .tm-gallery-title { font-size: 1.05rem; }
  .afa-card .tm-gallery-description { font-size: .88rem; line-height: 1.45; }
  .afa-play { padding: 8px 16px; font-size: .95rem; }
}
