Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Home/FeaturedRegionCard/styles.css

Template page
/* FeaturedRegionCard — TemplateStyles-safe (strict) */

/* Grid on main page */
.fr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  grid-gap: 1rem;            /* use grid-gap (no 'gap') */
  align-items: stretch;
}

/* Card */
.fr-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.fr-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); }

/* Media */
.fr-media {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: #fff;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}
.fr-img { width: 100%; height: 100%; display: block; }
.fr-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;       /* keep; if rejected, swap to height:auto */
}

/* Bottom gradient for badge readability */
.fr-media::after {
  content: "";
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background: linear-gradient(to top, rgba(0,0,0,.22) 0%, rgba(0,0,0,0) 35%);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  z-index: 0;
}

/* Placeholder */
.fr-img--placeholder {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  color: #6b7280;
  font-size: .9rem;
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

/* Make whole image clickable (template adds the link) */
.fr-media-link,
.fr-media-link a {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  display: block;
  z-index: 1;
}
.fr-media-link a { text-decoration: none; }
.fr-media-link a:focus { outline: 2px solid #059669; outline-offset: 2px; border-radius: 8px; }

/* Badge (status + accessions) */
.fr-badge {
  position: absolute; left: 16px; bottom: 10px;
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.96);
  border: 1px solid #e6e6e6;
  font-size: .85rem; font-weight: 600; color: #374151;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  z-index: 2;
  white-space: nowrap;
}
.fr-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: middle; }
.fr-badgelabel { vertical-align: middle; }
.fr-badge .fr-sep { color: #9ca3af; margin: 0 6px; }
.fr-badge .fr-acc { color: #6b7280; font-weight: 600; }

/* Dot colors by status */
.fr--status-stable .fr-dot { background: #16a34a; }
.fr--status-vulnerable .fr-dot { background: #ca8a04; }
.fr--status-endangered .fr-dot { background: #f97316; }
.fr--status-critical .fr-dot { background: #ef4444; }
.fr--status-extinct .fr-dot { background: #6b7280; }
.fr--status-unknown .fr-dot { background: #9ca3af; }

/* Body */
.fr-body {
  padding: 12px 16px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Title (reserve two lines for even stacks) */
.fr-title {
  margin: .05rem 0 .3rem;
  font-size: 1.15rem;
  line-height: 1.25;
  color: #1f2937;
  font-weight: 600;
  min-height: 2.5em;
}
.fr-title a { color: #1f2937; text-decoration: none; }
.fr-title a:hover { color: #059669; text-decoration: underline; }

/* Subtitle (single line, ellipsized) */
.fr-sub {
  margin: 0 0 .45rem;
  font-size: .85rem;
  color: #6b7280;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 1.2em;
}

/* Hook (3-line clamp via max-height) */
.fr-hook {
  margin: 0 0 .6rem;
  font-size: .95rem;
  color: #374151;
  line-height: 1.35;
  max-height: 4.05em;
  overflow: hidden;
  flex: 1;
}

/* CTA */
.fr-cta { margin: 0; margin-top: auto; }
.fr-cta a {
  display: inline-block;         /* no inline-flex */
  color: #059669;
  font-weight: 600;
  text-decoration: none;
  font-size: .9rem;
  padding: 4px 0;
}
.fr-cta a:hover { color: #047857; text-decoration: underline; }
.fr-missing { color: #9ca3af; font-style: normal; font-size: .9rem; }

/* Responsive */
@media (min-width: 960px) { .fr-media { height: 210px; } }
@media (max-width: 480px) {
  .fr-grid { grid-gap: 1rem; }
  .fr-media { height: 170px; }
  .fr-body { padding: 10px 14px 14px; }
  .fr-title { font-size: 1.1rem; }
  .fr-sub { font-size: .8rem; }
  .fr-hook { font-size: .9rem; }
}