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: Difference between revisions

Template page
No edit summary
No edit summary
Line 234: Line 234:
     transition: none;
     transition: none;
   }
   }
}
/* Badge overlay */
.fr-badge{
  position:absolute; left:12px; bottom:12px;
  display:inline-flex; align-items:center; gap:6px;
  padding:4px 8px; border-radius:999px;
  background:rgba(255,255,255,.92); border:1px solid #e5e7eb;
  font-size:.85rem; font-weight:600; color:#374151;
  box-shadow:0 1px 2px rgba(0,0,0,.06);
}
.fr-dot{ width:8px; height:8px; border-radius:50%; display:inline-block; }
.fr-badgelabel{ line-height:1; }
.fr-badge .fr-sep{ color:#9ca3af; margin:0 .25rem; }
.fr-badge .fr-acc{ color:#6b7280; font-weight:600; }
/* Map dot color by status (no CSS vars) */
.fr--status-stable .fr-dot{ background:#16a34a; }      /* green 600 */
.fr--status-vulnerable .fr-dot{ background:#ca8a04; }  /* amber 600 */
.fr--status-endangered .fr-dot{ background:#f97316; }  /* orange 500 */
.fr--status-critical .fr-dot{ background:#ef4444; }    /* red 500 */
.fr--status-extinct .fr-dot{ background:#6b7280; }      /* gray 500 */
.fr--status-unknown .fr-dot{ background:#9ca3af; }
/* Tighten body now that kicker is gone */
.fr-body{ padding:12px 16px 14px; }
.fr-title{ margin:.1rem 0 .35rem; }
.fr-sub{ margin:0 0 .5rem; }
.fr-hook{ margin:0 0 .6rem; }
/* Focus states */
.fr-title a:focus{ outline:2px solid #059669; outline-offset:2px; border-radius:6px; }
/* Optional: a touch more image presence */
@media (min-width: 960px){
  .fr-media{ height:196px; } /* was 180px */
}
}

Revision as of 06:23, 25 August 2025

/* TemplateStyles-Safe Enhanced FeaturedRegionCard CSS */
/* Removes webkit properties and other unsupported features */

/* Grid container - enhanced with better mobile handling */
.fr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  align-items: stretch;
}

/* Card shell - enhanced with hover states and flex layout */
.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%;
  transition: all 0.2s ease;
}
.fr-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  transform: translateY(-1px);
}

/* Media section - enhanced with consistent aspect ratio */
.fr-media {
  background: #f3f4f6;
  position: relative;
  height: 180px;
  overflow: hidden;
  flex-shrink: 0;
}
.fr-img {
  width: 100%;
  height: 100%;
  display: block;
}
.fr-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.fr-img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #6b7280;
  font-size: .9rem;
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

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

/* Kicker line - enhanced spacing */
.fr-kicker {
  margin: 0 0 .25rem;
  font-size: .85rem;
  color: #374151;
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.fr-status {
  font-weight: 600;
}
.fr-sep {
  color: #9ca3af;
  margin: 0 .25rem;
}
.fr-acc {
  color: #6b7280;
  font-weight: 500;
}

/* Title - enhanced hover states */
.fr-title {
  margin: .15rem 0 .35rem;
  font-size: 1.15rem;
  line-height: 1.25;
  color: #1f2937;
  font-weight: 600;
}
.fr-title a {
  color: inherit;
  text-decoration: none;
}
.fr-title a:hover {
  color: #059669;
  text-decoration: underline;
}

/* Subtitle - enhanced readability */
.fr-sub {
  margin: 0 0 .5rem;
  font-size: .85rem;
  color: #6b7280;
  line-height: 1.3;
}

/* Hook - enhanced with height control (no webkit properties) */
.fr-hook {
  margin: 0 0 .75rem;
  font-size: .95rem;
  color: #374151;
  line-height: 1.4;
  flex: 1;
  
  /* Alternative to webkit-line-clamp using max-height */
  max-height: 5.6em; /* 4 lines at 1.4 line-height */
  overflow: hidden;
}

/* CTA - enhanced with better button styling */
.fr-cta {
  margin: 0;
  margin-top: auto;
}
.fr-cta a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #059669;
  font-weight: 600;
  text-decoration: none;
  font-size: .9rem;
  padding: 4px 0;
  transition: color 0.2s ease;
}
.fr-cta a:hover {
  color: #047857;
  text-decoration: underline;
}
.fr-missing {
  color: #9ca3af;
  font-style: italic;
  font-size: .9rem;
}

/* Mobile responsive enhancements */
@media (max-width: 768px) {
  .fr-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .fr-grid {
    gap: 1rem;
  }
  
  .fr-media {
    height: 160px;
  }
  
  .fr-body {
    padding: 10px 14px 14px;
  }
  
  .fr-kicker {
    font-size: .8rem;
    gap: .4rem;
  }
  
  .fr-title {
    font-size: 1.1rem;
    margin: .1rem 0 .3rem;
  }
  
  .fr-sub {
    font-size: .8rem;
  }
  
  .fr-hook {
    font-size: .9rem;
    max-height: 4.05em; /* 3 lines at 1.35 line-height */
    line-height: 1.35;
  }
}

@media (max-width: 360px) {
  .fr-grid {
    grid-template-columns: minmax(260px, 1fr);
  }
  
  .fr-media {
    height: 140px;
  }
  
  .fr-body {
    padding: 8px 12px 12px;
  }
  
  .fr-kicker {
    font-size: .75rem;
  }
  
  .fr-title {
    font-size: 1rem;
  }
  
  .fr-sub {
    font-size: .75rem;
  }
  
  .fr-hook {
    font-size: .85rem;
    line-height: 1.3;
    max-height: 3.3em; /* ~3 lines */
  }
}

/* Accessibility improvements - TemplateStyles safe */
@media (prefers-reduced-motion: reduce) {
  .fr-card:hover {
    transform: none;
  }
  .fr-card,
  .fr-cta a {
    transition: none;
  }
}

/* Badge overlay */
.fr-badge{
  position:absolute; left:12px; bottom:12px;
  display:inline-flex; align-items:center; gap:6px;
  padding:4px 8px; border-radius:999px;
  background:rgba(255,255,255,.92); border:1px solid #e5e7eb;
  font-size:.85rem; font-weight:600; color:#374151;
  box-shadow:0 1px 2px rgba(0,0,0,.06);
}
.fr-dot{ width:8px; height:8px; border-radius:50%; display:inline-block; }
.fr-badgelabel{ line-height:1; }
.fr-badge .fr-sep{ color:#9ca3af; margin:0 .25rem; }
.fr-badge .fr-acc{ color:#6b7280; font-weight:600; }

/* Map dot color by status (no CSS vars) */
.fr--status-stable .fr-dot{ background:#16a34a; }       /* green 600 */
.fr--status-vulnerable .fr-dot{ background:#ca8a04; }   /* amber 600 */
.fr--status-endangered .fr-dot{ background:#f97316; }   /* orange 500 */
.fr--status-critical .fr-dot{ background:#ef4444; }     /* red 500 */
.fr--status-extinct .fr-dot{ background:#6b7280; }      /* gray 500 */
.fr--status-unknown .fr-dot{ background:#9ca3af; }

/* Tighten body now that kicker is gone */
.fr-body{ padding:12px 16px 14px; }
.fr-title{ margin:.1rem 0 .35rem; }
.fr-sub{ margin:0 0 .5rem; }
.fr-hook{ margin:0 0 .6rem; }

/* Focus states */
.fr-title a:focus{ outline:2px solid #059669; outline-offset:2px; border-radius:6px; }

/* Optional: a touch more image presence */
@media (min-width: 960px){
  .fr-media{ height:196px; } /* was 180px */
}