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 1: Line 1:
/* FeaturedRegionCard — TemplateStyles-safe (strict) */
/* FeaturedRegionCard — TemplateStyles-safe (strict) — FIXED VERSION */


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


Line 13: Line 15:
   background: #fff;
   background: #fff;
   border: 1px solid #e5e7eb;
   border: 1px solid #e5e7eb;
   border-radius: 12px;
   border-radius: 16px;
   overflow: hidden;
   overflow: hidden;
   box-shadow: 0 1px 2px rgba(0,0,0,.03);
   box-shadow: 0 2px 8px rgba(0,0,0,.06);
   display: flex;
   display: flex;
   flex-direction: column;
   flex-direction: column;
   height: 100%;
   height: 100%;
  transition: all 0.2s ease;
  position: relative;
}
.fr-card:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,.12);
}
}
.fr-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); }


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


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


Line 55: Line 73:
   align-items: center;
   align-items: center;
   height: 100%;
   height: 100%;
   color: #6b7280;
   color: #9ca3af;
   font-size: .9rem;
   font-size: 1rem;
   background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  font-weight: 500;
   background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}
}


/* Make whole image clickable (template adds the link) */
/* Make whole image clickable */
.fr-media-link,
.fr-media-link,
.fr-media-link a {
.fr-media-link a {
   position: absolute; top: 0; right: 0; bottom: 0; left: 0;
   position: absolute;  
  top: 0; right: 0; bottom: 0; left: 0;
   display: block;
   display: block;
   z-index: 1;
   z-index: 2;
}
.fr-media-link a {
  text-decoration: none;
}
.fr-media-link a:focus {
  outline: 3px solid #059669;
  outline-offset: 2px;
  border-radius: 12px;  
}
}
.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) */
/* Badge (status + accessions) - MAJOR IMPROVEMENTS */
.fr-badge {
.fr-badge {
   position: absolute; left: 16px; bottom: 10px;
   position: absolute;  
   display: inline-block;
  left: 16px;  
   padding: 4px 10px;
   bottom: 16px;
   border-radius: 999px;
   padding: 8px 14px;
   background: rgba(255,255,255,.96);
   border-radius: 24px;
   border: 1px solid #e6e6e6;
   background: rgba(255,255,255,.95);
   font-size: .85rem; font-weight: 600; color: #374151;
   border: 1px solid rgba(255,255,255,.3);
   box-shadow: 0 2px 8px rgba(0,0,0,.12);
   font-size: .875rem;  
   z-index: 2;
  font-weight: 600;  
  color: #374151;
   box-shadow: 0 4px 12px rgba(0,0,0,.15);
   z-index: 3;
   white-space: nowrap;
   white-space: nowrap;
  line-height: 1;
}
.fr-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
  flex-shrink: 0;
}
.fr-badgelabel {
  margin-right: 2px;
}
.fr-badge .fr-sep {
  color: #9ca3af;
  margin: 0 8px;
  font-weight: 400;
}
.fr-badge .fr-acc {
  color: #6b7280;
  font-weight: 500;
  font-size: .8rem;
}
}
.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 */
/* Enhanced dot colors by status */
.fr--status-stable .fr-dot { background: #16a34a; }
.fr--status-stable .fr-dot { background: #22c55e; }
.fr--status-vulnerable .fr-dot { background: #ca8a04; }
.fr--status-vulnerable .fr-dot { background: #eab308; }
.fr--status-endangered .fr-dot { background: #f97316; }
.fr--status-endangered .fr-dot { background: #f97316; }
.fr--status-critical .fr-dot { background: #ef4444; }
.fr--status-critical .fr-dot { background: #ef4444; }
Line 96: Line 147:
.fr--status-unknown .fr-dot { background: #9ca3af; }
.fr--status-unknown .fr-dot { background: #9ca3af; }


/* Body */
/* Body - IMPROVED SPACING */
.fr-body {
.fr-body {
   padding: 12px 16px 14px;
   padding: 20px 20px 24px;
   flex: 1;
   flex: 1;
   display: flex;
   display: flex;
Line 104: Line 155:
}
}


/* Title (reserve two lines for even stacks) */
/* Title - BETTER LINE HEIGHT AND SPACING */
.fr-title {
.fr-title {
   margin: .05rem 0 .3rem;
   margin: 0 0 12px;
   font-size: 1.15rem;
   font-size: 1.25rem;
   line-height: 1.25;
   line-height: 1.3;
   color: #1f2937;
   color: #1f2937;
   font-weight: 600;
   font-weight: 700;
   min-height: 2.5em;
   overflow: hidden;
}
.fr-title a {
  color: #1f2937;
  text-decoration: none;
  transition: color 0.15s ease;
}
.fr-title a:hover {
  color: #059669;
  text-decoration: underline;  
}
}
.fr-title a { color: #1f2937; text-decoration: none; }
.fr-title a:hover { color: #059669; text-decoration: underline; }


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


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


/* CTA */
/* CTA - IMPROVED STYLING */
.fr-cta { margin: 0; margin-top: auto; }
.fr-cta {  
  margin: 0;  
  margin-top: auto;  
  padding-top: 4px;
}
.fr-cta a {
.fr-cta a {
  display: inline-block;        /* no inline-flex */
   color: #059669;
   color: #059669;
   font-weight: 600;
   font-weight: 600;
   text-decoration: none;
   text-decoration: none;
   font-size: .9rem;
   font-size: .95rem;
   padding: 4px 0;
   padding: 8px 0;
  transition: all 0.15s ease;
}
.fr-cta a:hover {
  color: #047857;
  text-decoration: underline;
}
.fr-missing {
  color: #9ca3af;
  font-style: italic;
  font-size: .9rem;
  font-weight: 500;
}
 
/* Responsive - ENHANCED BREAKPOINTS */
@media (min-width: 1024px) {
  .fr-media { height: 220px; }
  .fr-grid { grid-template-columns: repeat(3, 1fr); }
}
 
@media (min-width: 768px) and (max-width: 1023px) {
  .fr-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 1.25rem;
  }
  .fr-media { height: 190px; }
}
}
.fr-cta a:hover { color: #047857; text-decoration: underline; }
.fr-missing { color: #9ca3af; font-style: normal; font-size: .9rem; }


/* Responsive */
@media (max-width: 767px) {
@media (min-width: 960px) { .fr-media { height: 210px; } }
  .fr-grid {  
@media (max-width: 480px) {
    grid-template-columns: 1fr;
  .fr-grid { grid-gap: 1rem; }
    grid-gap: 1.25rem;
   .fr-media { height: 170px; }
    margin: 0 1rem;
   .fr-body { padding: 10px 14px 14px; }
  }
   .fr-title { font-size: 1.1rem; }
   .fr-media { height: 180px; }
   .fr-sub { font-size: .8rem; }
   .fr-body { padding: 16px 18px 20px; }
   .fr-hook { font-size: .9rem; }
   .fr-title { font-size: 1.125rem; }
   .fr-sub { font-size: .85rem; }
  .fr-hook { font-size: .95rem; }
  .fr-badge {
    left: 12px;
    bottom: 12px;
    padding: 6px 12px;
    font-size: .8rem;
  }
   .fr-badge .fr-acc { font-size: .75rem; }
}
}

Revision as of 07:17, 25 August 2025

/* FeaturedRegionCard — TemplateStyles-safe (strict) — FIXED VERSION */

/* Grid on main page */
.fr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  grid-gap: 1.5rem;
  align-items: stretch;
  margin: 0 auto;
  max-width: 1200px;
}

/* Card */
.fr-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: all 0.2s ease;
  position: relative;
}
.fr-card:hover { 
  box-shadow: 0 8px 25px rgba(0,0,0,.12);
}

/* Media */
.fr-media {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #f8fafc;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}
.fr-img { 
  width: 100%; 
  height: 100%; 
  display: block; 
  position: relative;
}
.fr-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Enhanced gradient overlay for better 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,.4) 0%, 
    rgba(0,0,0,.2) 25%,
    rgba(0,0,0,0) 50%
  );
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  z-index: 1;
}

/* Placeholder */
.fr-img--placeholder {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  color: #9ca3af;
  font-size: 1rem;
  font-weight: 500;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

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

/* Badge (status + accessions) - MAJOR IMPROVEMENTS */
.fr-badge {
  position: absolute; 
  left: 16px; 
  bottom: 16px;
  padding: 8px 14px;
  border-radius: 24px;
  background: rgba(255,255,255,.95);
  border: 1px solid rgba(255,255,255,.3);
  font-size: .875rem; 
  font-weight: 600; 
  color: #374151;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  z-index: 3;
  white-space: nowrap;
  line-height: 1;
}

.fr-dot { 
  width: 8px; 
  height: 8px; 
  border-radius: 50%; 
  display: inline-block; 
  margin-right: 8px; 
  flex-shrink: 0;
}

.fr-badgelabel { 
  margin-right: 2px;
}

.fr-badge .fr-sep { 
  color: #9ca3af; 
  margin: 0 8px;
  font-weight: 400;
}

.fr-badge .fr-acc { 
  color: #6b7280; 
  font-weight: 500;
  font-size: .8rem;
}

/* Enhanced dot colors by status */
.fr--status-stable .fr-dot { background: #22c55e; }
.fr--status-vulnerable .fr-dot { background: #eab308; }
.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 - IMPROVED SPACING */
.fr-body {
  padding: 20px 20px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Title - BETTER LINE HEIGHT AND SPACING */
.fr-title {
  margin: 0 0 12px;
  font-size: 1.25rem;
  line-height: 1.3;
  color: #1f2937;
  font-weight: 700;
  overflow: hidden;
}
.fr-title a { 
  color: #1f2937; 
  text-decoration: none; 
  transition: color 0.15s ease;
}
.fr-title a:hover { 
  color: #059669; 
  text-decoration: underline; 
}

/* Subtitle - IMPROVED TRUNCATION */
.fr-sub {
  margin: 0 0 16px;
  font-size: .9rem;
  color: #6b7280;
  line-height: 1.4;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hook - BETTER TEXT CLAMPING */
.fr-hook {
  margin: 0 0 20px;
  font-size: 1rem;
  color: #4b5563;
  line-height: 1.5;
  max-height: 4.5em;
  overflow: hidden;
  flex: 1;
}

/* CTA - IMPROVED STYLING */
.fr-cta { 
  margin: 0; 
  margin-top: auto; 
  padding-top: 4px;
}
.fr-cta a {
  color: #059669;
  font-weight: 600;
  text-decoration: none;
  font-size: .95rem;
  padding: 8px 0;
  transition: all 0.15s ease;
}
.fr-cta a:hover { 
  color: #047857; 
  text-decoration: underline;
}
.fr-missing { 
  color: #9ca3af; 
  font-style: italic; 
  font-size: .9rem; 
  font-weight: 500;
}

/* Responsive - ENHANCED BREAKPOINTS */
@media (min-width: 1024px) { 
  .fr-media { height: 220px; }
  .fr-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .fr-grid { 
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 1.25rem;
  }
  .fr-media { height: 190px; }
}

@media (max-width: 767px) {
  .fr-grid { 
    grid-template-columns: 1fr;
    grid-gap: 1.25rem;
    margin: 0 1rem;
  }
  .fr-media { height: 180px; }
  .fr-body { padding: 16px 18px 20px; }
  .fr-title { font-size: 1.125rem; }
  .fr-sub { font-size: .85rem; }
  .fr-hook { font-size: .95rem; }
  .fr-badge {
    left: 12px;
    bottom: 12px;
    padding: 6px 12px;
    font-size: .8rem;
  }
  .fr-badge .fr-acc { font-size: .75rem; }
}