Toggle menu
648
116
71
6.9K
Landrace.Wiki - The Landrace Cannabis Wiki
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
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
/* ============================================ */
/* Featured Region Cards (Home) */
/* HOME GRID LAYOUT */
/* ============================================ */


.home-grid {
.fa-grid{
    display: grid;
  display:grid;
    grid-template-columns: repeat(6, 1fr);
  grid-template-columns:repeat(3, minmax(0,1fr));
    gap: 0.625rem;
  gap:16px;
    margin-top: 2.4rem;
  margin:12px 0 24px;
    width: 100%;
}
}


/* ============================================ */
@media (max-width: 1024px){
/* BASE HOME CARD STYLES */
  .fa-grid{ grid-template-columns:repeat(2, minmax(0,1fr)); }
/* ============================================ */
}
@media (max-width: 600px){
  .fa-grid{ grid-template-columns:1fr; }
}


.home-card {
/* Card */
    position: relative;
.fa-card{
    padding: 20px;
  display:flex;
    background: #ffffff;
  flex-direction:column;
    border-radius: 8px;
  background:#fff;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.04), 0 3px 6px rgba(0, 0, 0, 0.0575);
  border:1px solid #e5e7eb;
    font-size: 0.875rem;
  border-radius:14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow:hidden;
    border: 1px solid #dee2e6;
  box-shadow:0 1px 2px rgba(0,0,0,.04);
    min-height: 120px;
  transition:transform .15s ease, box-shadow .2s ease;
  height:100%;
}
}


.home-card--col2 {
.fa-card:hover{
    grid-column: span 2;
  transform:translateY(-2px);
  box-shadow:0 10px 28px rgba(0,0,0,.12);
}
}


.home-card:hover {
/* Media */
    transform: translateY(-2px);
.fa-media{
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08), 0 6px 12px rgba(0, 0, 0, 0.115);
  position:relative;
  background:#f3f4f6;
  border-bottom:1px solid #eef2f7;
}
}


/* Card sub-elements */
/* 16:9 ratio */
.home-card__label {
.fa-media::before{
    color: #6c757d;
  content:"";
    font-size: 0.8125rem;
  display:block;
    letter-spacing: 0.75px;
  width:100%;
    text-transform: uppercase;
  padding-top:56.25%;
    font-weight: 500;
    margin-bottom: 0.5rem;
}
}


.home-card__header {
.fa-img{
    margin: 0 0 1rem 0;
  position:absolute;
    font-size: 1.1rem;
  inset:0;
    color: #2d5016;
  display:block;
    font-weight: 600;
  width:100%;
  height:100%;
}
}


.home-card__header a {
/* MediaWiki file wrapper quirks */
    color: inherit;
.fa-img a,
    text-decoration: none;
.fa-img .image,
.fa-img .mw-file-element,
.fa-img img{
  display:block;
  width:100% !important;
  height:100% !important;
  max-width:none !important;
  object-fit:cover;
  object-position:center;
}
}


.home-card__header a:hover {
/* Placeholder that still looks designed */
    color: #3d6b1f;
.fa-img--placeholder{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:.95rem;
  color:#6b7280;
  background:
    radial-gradient(1200px 300px at 10% 0%, rgba(45,106,79,.18), transparent 60%),
    radial-gradient(900px 260px at 90% 10%, rgba(16,185,129,.14), transparent 55%),
    #f3f4f6;
}
}


.home-card__body {
/* Body */
    color: #495057;
.fa-body{
    line-height: 1.6;
  display:flex;
    margin-bottom: 1rem;
  flex-direction:column;
  gap:10px;
  padding:14px 16px 16px;
  min-height:0;
}
}


.home-card__links {
/* Title */
    font-size: 0.8125rem;
.fa-title{
    color: #6c757d;
  margin:0;
    border-top: 1px solid #dee2e6;
  font-size:1.05rem;
    padding-top: 0.75rem;
  font-weight:700;
    margin-top: 0.75rem;
  line-height:1.25;
}
}


.home-card__links a {
.fa-title a{
    color: #2d5016;
  color:#1f4d36; /* brand-ish green */
    text-decoration: none;
  text-decoration:none;
    font-weight: 500;
}
}


.home-card__links a:hover {
.fa-title a:hover{
    text-decoration: underline;
  text-decoration:underline;
}
}


/* ============================================ */
/* Kicker */
/* IMAGE HEADER CARDS - EXACT CLONE OF .fa-card */
.fa-kicker{
/* ============================================ */
  margin:0;
  font-size:.85rem;
  color:#6b7280;
}


/* Card shell - exactly like .fa-card */
.k-item{
.home-card--image-header {
  display:inline-block;
    display: flex;
  line-height:1.35;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
    transition: box-shadow .2s ease;
    height: 100%;
    padding: 0;
}
}


.home-card--image-header:hover {
.fa-hook{
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
  margin:0;
  color:#374151;
  font-size:.93rem;
  line-height:1.5;
 
  /* 3-line clamp without webkit */
  display:block;
  max-height:4.5em;  /* 1.5 * 3 lines */
  overflow:hidden;
}
}


/* Image wrapper - exactly like .fa-media */
/* Footer pinned to bottom */
.home-card__image-link {
.fa-foot{
    position: relative;
  margin-top:auto;
    overflow: hidden;
  display:flex;
    background: #f3f4f6;
  flex-direction:column;
    line-height: 0;
  gap:10px;
    border-bottom: 1px solid #eef2f7;
  padding-top:4px;
    display: block;
    text-decoration: none;
}
}


/* 16:9 ratio - exactly like .fa-media::before */
.fa-foot-sep{
.home-card__image-link::before {
  height:1px;
    content: "";
  background:#eef2f7;
    display: block;
    width: 100%;
    padding-top: 56.25%;
}
}


/* Image container - exactly like .fa-img */
/* Status line */
.home-card__image-header-bg {
.fa-statusline{
    position: absolute;
  margin:0;
    inset: 0;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}
}


.home-card__image-header-bg,
/* Pills */
.home-card__image-header-bg a,
.status-pill,
.home-card__image-link .image,
.pill{
.home-card__image-link .mw-file-description {
  display:inline-flex;
    display: block;
  align-items:center;
    width: 100%;
  gap:8px;
    height: 100%;
  border-radius:999px;
  padding:6px 10px;
  font-size:.82rem;
  border:1px solid #e5e7eb;
  background:#f9fafb;
  color:#374151;
  line-height:1;
}
}


/* Actual <img> element - exactly like .fa-media img */
.pill-dot{
.home-card__image-link img,
  width:8px;
.home-card__image-link .mw-file-element {
  height:8px;
    display: block;
  border-radius:999px;
    width: 100% !important;
  background:#9ca3af;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover;
    object-position: center center;
}
}


/* Text overlay on image (not in region cards, but needed for home cards) */
/* Status variants */
.home-card__image-overlay {
.sp--endangered{ background:rgba(239,68,68,.08); border-color:rgba(239,68,68,.25); }
    position: absolute;
.sp--endangered .pill-dot{ background:#ef4444; }
    top: 0;
 
    left: 0;
.sp--vulnerable{ background:rgba(245,158,11,.10); border-color:rgba(245,158,11,.28); }
    right: 0;
.sp--vulnerable .pill-dot{ background:#f59e0b; }
    bottom: 0;
    display: flex;
    align-items: center;
    padding: 0 20px;
    color: #fff;
    font-weight: 700;
    font-size: 1.3rem;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.9);
    background: linear-gradient(to right, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
    z-index: 1;
}


/* Content section - exactly like .fa-body */
.sp--near\ threatened,
.home-card__content {
.sp--near-threatened{ background:rgba(234,179,8,.10); border-color:rgba(234,179,8,.28); }
    padding: 14px 16px 16px 16px;
.sp--near\ threatened .pill-dot,
    display: flex;
.sp--near-threatened .pill-dot{ background:#eab308; }
    flex-direction: column;
    gap: 8px;
}


/* Hard cap the media height - exactly like .fa-media */
.sp--least\ concern,
.home-card__image-link {
.sp--least-concern{ background:rgba(16,185,129,.10); border-color:rgba(16,185,129,.28); }
    max-height: 300px;
.sp--least\ concern .pill-dot,
}
.sp--least-concern .pill-dot{ background:#10b981; }


/* ============================================ */
.sp--unknown{ background:#f3f4f6; border-color:#e5e7eb; }
/* MOBILE RESPONSIVENESS */
.sp--unknown .pill-dot{ background:#9ca3af; }
/* ============================================ */


@media (max-width: 1024px) {
.pill--access .pill-num{
    .home-grid {
  font-weight:800;
        grid-template-columns: repeat(4, 1fr);
  font-variant-numeric:tabular-nums;
    }
}
}


@media (max-width: 768px) {
/* CTA */
    .home-grid {
.fa-cta{
        grid-template-columns: repeat(2, 1fr);
  margin:0;
        gap: 0.5rem;
  font-size:.9rem;
    }
   
    .home-card--col2 {
        grid-column: span 2;
    }
   
    .home-card__image-link {
        max-height: 200px;
    }
   
    .home-card__image-overlay {
        font-size: 1.1rem;
        padding: 0 15px;
    }
}
}


@media (max-width: 600px) {
.fa-cta a{
    .home-card__image-link {
  color:#1f4d36;
        max-height: 180px;
  text-decoration:none;
    }
  font-weight:600;
   
    .home-card__content {
        padding: 12px 14px 14px 14px;
        gap: 6px;
    }
}
}


@media (max-width: 480px) {
.fa-cta a:hover{
    .home-grid {
  text-decoration:underline;
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
   
    .home-card--col2 {
        grid-column: span 1;
    }
   
    .home-card {
        padding: 15px;
    }
   
    .home-card__image-link {
        max-height: 160px;
    }
   
    .home-card__image-overlay {
        font-size: 1rem;
        padding: 0 12px;
    }
}
}

Latest revision as of 22:57, 19 January 2026

/* Featured Region Cards (Home) */

.fa-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:16px;
  margin:12px 0 24px;
}

@media (max-width: 1024px){
  .fa-grid{ grid-template-columns:repeat(2, minmax(0,1fr)); }
}
@media (max-width: 600px){
  .fa-grid{ grid-template-columns:1fr; }
}

/* Card */
.fa-card{
  display:flex;
  flex-direction:column;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 1px 2px rgba(0,0,0,.04);
  transition:transform .15s ease, box-shadow .2s ease;
  height:100%;
}

.fa-card:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 28px rgba(0,0,0,.12);
}

/* Media */
.fa-media{
  position:relative;
  background:#f3f4f6;
  border-bottom:1px solid #eef2f7;
}

/* 16:9 ratio */
.fa-media::before{
  content:"";
  display:block;
  width:100%;
  padding-top:56.25%;
}

.fa-img{
  position:absolute;
  inset:0;
  display:block;
  width:100%;
  height:100%;
}

/* MediaWiki file wrapper quirks */
.fa-img a,
.fa-img .image,
.fa-img .mw-file-element,
.fa-img img{
  display:block;
  width:100% !important;
  height:100% !important;
  max-width:none !important;
  object-fit:cover;
  object-position:center;
}

/* Placeholder that still looks designed */
.fa-img--placeholder{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:.95rem;
  color:#6b7280;
  background:
    radial-gradient(1200px 300px at 10% 0%, rgba(45,106,79,.18), transparent 60%),
    radial-gradient(900px 260px at 90% 10%, rgba(16,185,129,.14), transparent 55%),
    #f3f4f6;
}

/* Body */
.fa-body{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:14px 16px 16px;
  min-height:0;
}

/* Title */
.fa-title{
  margin:0;
  font-size:1.05rem;
  font-weight:700;
  line-height:1.25;
}

.fa-title a{
  color:#1f4d36; /* brand-ish green */
  text-decoration:none;
}

.fa-title a:hover{
  text-decoration:underline;
}

/* Kicker */
.fa-kicker{
  margin:0;
  font-size:.85rem;
  color:#6b7280;
}

.k-item{
  display:inline-block;
  line-height:1.35;
}

.fa-hook{
  margin:0;
  color:#374151;
  font-size:.93rem;
  line-height:1.5;

  /* 3-line clamp without webkit */
  display:block;
  max-height:4.5em;   /* 1.5 * 3 lines */
  overflow:hidden;
}

/* Footer pinned to bottom */
.fa-foot{
  margin-top:auto;
  display:flex;
  flex-direction:column;
  gap:10px;
  padding-top:4px;
}

.fa-foot-sep{
  height:1px;
  background:#eef2f7;
}

/* Status line */
.fa-statusline{
  margin:0;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}

/* Pills */
.status-pill,
.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border-radius:999px;
  padding:6px 10px;
  font-size:.82rem;
  border:1px solid #e5e7eb;
  background:#f9fafb;
  color:#374151;
  line-height:1;
}

.pill-dot{
  width:8px;
  height:8px;
  border-radius:999px;
  background:#9ca3af;
}

/* Status variants */
.sp--endangered{ background:rgba(239,68,68,.08); border-color:rgba(239,68,68,.25); }
.sp--endangered .pill-dot{ background:#ef4444; }

.sp--vulnerable{ background:rgba(245,158,11,.10); border-color:rgba(245,158,11,.28); }
.sp--vulnerable .pill-dot{ background:#f59e0b; }

.sp--near\ threatened,
.sp--near-threatened{ background:rgba(234,179,8,.10); border-color:rgba(234,179,8,.28); }
.sp--near\ threatened .pill-dot,
.sp--near-threatened .pill-dot{ background:#eab308; }

.sp--least\ concern,
.sp--least-concern{ background:rgba(16,185,129,.10); border-color:rgba(16,185,129,.28); }
.sp--least\ concern .pill-dot,
.sp--least-concern .pill-dot{ background:#10b981; }

.sp--unknown{ background:#f3f4f6; border-color:#e5e7eb; }
.sp--unknown .pill-dot{ background:#9ca3af; }

.pill--access .pill-num{
  font-weight:800;
  font-variant-numeric:tabular-nums;
}

/* CTA */
.fa-cta{
  margin:0;
  font-size:.9rem;
}

.fa-cta a{
  color:#1f4d36;
  text-decoration:none;
  font-weight:600;
}

.fa-cta a:hover{
  text-decoration:underline;
}