Toggle menu
17
24
14
1.7K
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
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* ================================
/* ============================================ */
  FeaturedRegionCard — TemplateStyles-safe CSS
 
  ================================ */
/* HOME GRID LAYOUT */
 
/* ============================================ */
 
 
 
 
 
.home-grid {
 
    display: grid;
 
    grid-template-columns: repeat(6, 1fr);
 
    gap: 0.625rem;
 
    margin-top: 2.4rem;
 
    width: 100%;


/* Grid wrapper (used on Main Page) */
.fa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  align-items: stretch;
  max-width: 1200px;
  margin: 0 auto;
}
}


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


/* --- 16:9 banner with cover --- */
 
.fa-media {
 
  position: relative;
 
  overflow: hidden;
 
  background: #f3f4f6;
.home-card--col2 {
  line-height: 0;       /* remove inline-img baseline gap */
 
  border-bottom: 1px solid #eef2f7;
    grid-column: span 2;
 
}
}
.fa-media::before {
 
  content: "";
 
  display: block;
 
  width: 100%;
 
  padding-top: 56.25%; /* 16:9 ratio */
 
.home-card:hover {
 
    transform: translateY(-2px);
 
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08), 0 6px 12px rgba(0, 0, 0, 0.115);
 
}
}


/* Fill the box */
 
.fa-img { position: absolute; inset: 0; }
 
.fa-img,
 
.fa-img a,
 
.fa-media .image,
/* Card sub-elements */
.fa-media .mw-file-description {
 
  display: block;
.home-card__label {
  width: 100%;
 
  height: 100%;
    color: #6c757d;
 
    font-size: 0.8125rem;
 
    letter-spacing: 0.75px;
 
    text-transform: uppercase;
 
    font-weight: 500;
 
    margin-bottom: 0.5rem;
 
}
}


/* Actual <img> element */
 
.fa-media img,
 
.fa-media .mw-file-element {
 
  display: block;
 
  width: 100% !important;
.home-card__header {
  height: 100% !important;
 
  max-width: none !important;
    margin: 0 0 1rem 0;
  object-fit: cover;
 
  object-position: center center;
    font-size: 1.1rem;
 
    color: #2d5016;
 
    font-weight: 600;
 
}
}


/* Placeholder */
 
.fa-img--placeholder {
 
  display: flex;
 
  align-items: center;
 
  justify-content: center;
.home-card__header a {
  color: #9ca3af;
 
  font-size: .9rem;
    color: inherit;
 
    text-decoration: none;
 
}
}


/* Body */
 
.fa-body {
 
  padding: 14px 16px 16px 16px;
 
  display: flex;
 
  flex-direction: column;
.home-card__header a:hover {
  gap: 8px;
 
    color: #3d6b1f;
 
}
}


/* Title (now directly under image) */
 
.fa-title {
 
  margin: 8px 0 2px 0;
 
  line-height: 1.2;
 
  font-size: 1.125rem; /* 18px */
.home-card__body {
  color: #1f2937;
 
    color: #495057;
 
    line-height: 1.6;
 
    margin-bottom: 1rem;
 
}
}
.fa-title a { color: inherit; text-decoration: none; }
.fa-title a:hover { text-decoration: underline; }


/* Kicker (path) */
 
.fa-kicker {
 
  margin: 0 0 8px 0;
 
  color: #6b7280;
 
  font-size: .88rem;
.home-card__links {
  line-height: 1.3;
 
  display: flex;
    font-size: 0.8125rem;
  flex-wrap: wrap;
 
  gap: 6px 10px;
    color: #6c757d;
 
    border-top: 1px solid #dee2e6;
 
    padding-top: 0.75rem;
 
    margin-top: 0.75rem;
 
}
}
.k-item { display: inline-flex; align-items: center; gap: 4px; }


/* Province line (avoid redundant country) */
.fa-sub { margin: 0 0 6px 0; color: #6b7280; }


/* Meta (dot-separated) */
 
.fa-provenance {
 
  margin: 0 0 8px 0;
 
  color: #64748b;
.home-card__links a {
  font-size: .88rem;
 
  display: flex;
    color: #2d5016;
  flex-wrap: wrap;
 
  align-items: center;
    text-decoration: none;
 
    font-weight: 500;
 
}
}
.fa-provenance .pv-item {
 
  display: inline-flex;
 
  align-items: center;
 
  white-space: nowrap;
 
 
.home-card__links a:hover {
 
    text-decoration: underline;
 
}
}
.fa-provenance .pv-item + .pv-item::before {
 
  content: "•";
 
  padding: 0 6px;
 
  color: #9ca3af;
 
 
/* ============================================ */
 
/* IMAGE HEADER CARDS - EXACT CLONE OF .fa-card */
 
/* ============================================ */
 
 
 
 
 
/* Card shell - exactly like .fa-card */
 
.home-card--image-header {
 
    display: flex;
 
    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;
 
}
}


/* Hook (one-line pitch) */
.fa-hook { margin: 0; color: #334155; font-size: .95rem; }


/* Footer (pinned) */
 
.fa-foot {
 
  margin-top: auto;              /* push footer to bottom */
 
  border-top: 1px solid #e5e7eb;
.home-card--image-header:hover {
  padding-top: 10px;
 
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
 
}
}
/* Statusline holds three pills in a row (wraps on mobile) */
 
.fa-statusline {
 
  display: flex;
 
  align-items: center;
 
  flex-wrap: wrap;
 
  gap: 8px;
/* Image wrapper - exactly like .fa-media */
  margin: 0 0 6px 0;
 
  font-weight: 600;
.home-card__image-link {
 
    position: relative;
 
    overflow: hidden;
 
    background: #f3f4f6;
 
    line-height: 0;
 
    border-bottom: 1px solid #eef2f7;
 
    display: block;
 
    text-decoration: none;
 
}
}
.fa-foot-sep { height: 1px; background: #e5e7eb; margin: 8px 0; }


/* CTA */
 
.fa-cta { margin: 0; font-weight: 600; }
 
.fa-cta a {
 
  color: #2d5016;
 
  text-decoration: none;
/* 16:9 ratio - exactly like .fa-media::before */
  border-bottom: 1px solid rgba(45,80,22,.3);
 
  padding-bottom: 1px;
.home-card__image-link::before {
 
    content: "";
 
    display: block;
 
    width: 100%;
 
    padding-top: 56.25%;
 
}
}
.fa-cta a:hover { border-bottom-color: rgba(45,80,22,.6); }
.fa-cta .fa-missing { color: #6b7280; }


/* ---------- Pills (shared base) ---------- */
 
.pill,
 
.status-pill {
 
  display: inline-flex;
 
  align-items: center;
/* Image container - exactly like .fa-img */
  gap: 6px;
 
  padding: 6px 10px;
.home-card__image-header-bg {
  border-radius: 999px;
 
  font-weight: 600;
    position: absolute;
  font-size: .9rem;
 
  line-height: 1;
    inset: 0;
  border: 1px solid #e5e7eb;
 
  background: #f3f4f6;
  color: #1f2937;
}
}
/* Tiny dot (used by status + area) */
 
.pill-dot {
 
  width: 8px;
 
  height: 8px;
 
  border-radius: 999px;
 
  background: #9ca3af;
.home-card__image-header-bg,
 
.home-card__image-header-bg a,
 
.home-card__image-link .image,
 
.home-card__image-link .mw-file-description {
 
    display: block;
 
    width: 100%;
 
    height: 100%;
 
}
}


/* ---------- Conservation status (colored) ---------- */
 
.status-pill {
 
  background: #f3f4f6;
 
  color: #374151;
 
/* Actual <img> element - exactly like .fa-media img */
 
.home-card__image-link img,
 
.home-card__image-link .mw-file-element {
 
    display: block;
 
    width: 100% !important;
 
    height: 100% !important;
 
    max-width: none !important;
 
    object-fit: cover;
 
    object-position: center center;
 
}
}
.sp--stable    { background: #e8f5e9; color: #1b5e20; border-color: #c8e6c9; }
.sp--vulnerable { background: #fff7ed; color: #7c2d12; border-color: #fed7aa; }
.sp--endangered { background: #fff1f2; color: #7f1d1d; border-color: #fecdd3; }
.sp--critical  { background: #fee2e2; color: #7f1d1d; border-color: #fecaca; }
.sp--extinct    { background: #f3f4f6; color: #111827; border-color: #e5e7eb; }
.sp--unknown    { background: #f3f4f6; color: #374151; border-color: #e5e7eb; }


.sp--stable .pill-dot    { background: #2e7d32; }
.sp--vulnerable .pill-dot { background: #b45309; }
.sp--endangered .pill-dot { background: #b91c1c; }
.sp--critical .pill-dot  { background: #991b1b; }
.sp--extinct .pill-dot    { background: #111827; }
.sp--unknown .pill-dot    { background: #9ca3af; }


/* ---------- Growing area (neutral) ---------- */
 
.pill--area {
 
  background: #f8fafc;           /* light neutral */
 
  border-color: #e5e7eb;
/* Text overlay on image (not in region cards, but needed for home cards) */
  color: #1f2937;
 
.home-card__image-overlay {
 
    position: absolute;
 
    top: 0;
 
    left: 0;
 
    right: 0;
 
    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;
 
}
}
/* keep the dot visible but neutral */
.pill--area .pill-dot { background: #6b7280; }


/* ---------- Accessions (neutral number + label) ---------- */
 
.pill--access {
 
  background: #eff6ff;           /* light blue */
 
  border-color: #dbeafe;         /* blue-100 */
 
  color: #1f2937;
/* Content section - exactly like .fa-body */
 
.home-card__content {
 
    padding: 14px 16px 16px 16px;
 
    display: flex;
 
    flex-direction: column;
 
    gap: 8px;
 
}
}
.pill--access .pill-dot { display: none; }
 
.pill--access .pill-num { font-weight: 700; }
 
.pill--access .pill-label {
 
  font-weight: 600;
 
  color: #6b7280;
 
  font-size: .9rem;
/* Hard cap the media height - exactly like .fa-media */
 
.home-card__image-link {
 
    max-height: 300px;
 
}
}


/* Small screens */
 
@media (max-width: 480px) {
 
  .fa-body { padding: 12px 14px 14px 14px; gap: 6px; }
 
  .fa-title { font-size: 1.05rem; }
 
  .fa-provenance { font-size: .86rem; }
/* ============================================ */
 
/* MOBILE RESPONSIVENESS */
 
/* ============================================ */
 
 
 
 
 
@media (max-width: 1024px) {
 
    .home-grid {
 
        grid-template-columns: repeat(4, 1fr);
 
    }
 
}
}


/* Hard cap the media height so wide screens don't blow it up */
.fa-media { max-height: 420px; }
@media (max-width: 600px) { .fa-media { max-height: 240px; } }


/* ==== Featured Region Cards: tighten copy + spacing ==== */


/* small gap below the "Featured Growing Regions" heading */
.mw-parser-output h2 + .fa-grid,
.mw-parser-output h2 + .fr-grid { margin-top: 10px; }


/* make the card’s content pack tighter */
 
.mw-parser-output .fa-card,
@media (max-width: 768px) {
.mw-parser-output .fr-card {
 
  display: flex;
    .home-grid {
  flex-direction: column;
 
        grid-template-columns: repeat(2, 1fr);
 
        gap: 0.5rem;
 
    }
 
   
 
    .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;
 
    }
 
}
}


/* reduce inner padding a touch */
.mw-parser-output .fa-card .fa-content,
.mw-parser-output .fr-card .fr-content { padding: 14px 16px; }


/* tighter body text: slightly smaller + shorter leading + trimmed margins */
 
.mw-parser-output .fa-card .fa-body,
 
.mw-parser-output .fr-card .fr-body {
 
  font-size: .95rem;
@media (max-width: 600px) {
  line-height: 1.45;
 
  color: #495057;
    .home-card__image-link {
  margin: 6px 0 6px 0;
 
        max-height: 180px;
 
    }
 
   
 
    .home-card__content {
 
        padding: 12px 14px 14px 14px;
 
        gap: 6px;
 
    }
 
}
}
.mw-parser-output .fa-card .fa-body p,
.mw-parser-output .fr-card .fr-body p { margin: 0; }


/* keep pills/footnote pinned to the bottom without leaving excess gap */
.mw-parser-output .fa-card .fa-pills,
.mw-parser-output .fr-card .fr-pills,
.mw-parser-output .fa-card .fa-meta,
.mw-parser-output .fr-card .fr-meta,
.mw-parser-output .fa-card .fa-footer,
.mw-parser-output .fr-card .fr-footer { margin-top: auto; }


/* optional: shave a bit of vertical space on the pills row */
.mw-parser-output .fa-card .fa-pills,
.mw-parser-output .fr-card .fr-pills { gap: 6px; }


/* keep card heights reasonable (remove if you want fully auto heights) */
 
.mw-parser-output .fa-card,
 
.mw-parser-output .fr-card { min-height: 0; }
@media (max-width: 480px) {
 
    .home-grid {
 
        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 11:34, 19 November 2025

/* ============================================ */

/* HOME GRID LAYOUT */

/* ============================================ */





.home-grid {

    display: grid;

    grid-template-columns: repeat(6, 1fr);

    gap: 0.625rem;

    margin-top: 2.4rem;

    width: 100%;

}





/* ============================================ */

/* BASE HOME CARD STYLES */

/* ============================================ */





.home-card {

    position: relative;

    padding: 20px;

    background: #ffffff;

    border-radius: 8px;

    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.04), 0 3px 6px rgba(0, 0, 0, 0.0575);

    font-size: 0.875rem;

    transition: transform 0.2s ease, box-shadow 0.2s ease;

    border: 1px solid #dee2e6;

    min-height: 120px;

}





.home-card--col2 {

    grid-column: span 2;

}





.home-card:hover {

    transform: translateY(-2px);

    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08), 0 6px 12px rgba(0, 0, 0, 0.115);

}





/* Card sub-elements */

.home-card__label {

    color: #6c757d;

    font-size: 0.8125rem;

    letter-spacing: 0.75px;

    text-transform: uppercase;

    font-weight: 500;

    margin-bottom: 0.5rem;

}





.home-card__header {

    margin: 0 0 1rem 0;

    font-size: 1.1rem;

    color: #2d5016;

    font-weight: 600;

}





.home-card__header a {

    color: inherit;

    text-decoration: none;

}





.home-card__header a:hover {

    color: #3d6b1f;

}





.home-card__body {

    color: #495057;

    line-height: 1.6;

    margin-bottom: 1rem;

}





.home-card__links {

    font-size: 0.8125rem;

    color: #6c757d;

    border-top: 1px solid #dee2e6;

    padding-top: 0.75rem;

    margin-top: 0.75rem;

}





.home-card__links a {

    color: #2d5016;

    text-decoration: none;

    font-weight: 500;

}





.home-card__links a:hover {

    text-decoration: underline;

}





/* ============================================ */

/* IMAGE HEADER CARDS - EXACT CLONE OF .fa-card */

/* ============================================ */





/* Card shell - exactly like .fa-card */

.home-card--image-header {

    display: flex;

    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 {

    box-shadow: 0 8px 24px rgba(0,0,0,.12);

}





/* Image wrapper - exactly like .fa-media */

.home-card__image-link {

    position: relative;

    overflow: hidden;

    background: #f3f4f6;

    line-height: 0;

    border-bottom: 1px solid #eef2f7;

    display: block;

    text-decoration: none;

}





/* 16:9 ratio - exactly like .fa-media::before */

.home-card__image-link::before {

    content: "";

    display: block;

    width: 100%;

    padding-top: 56.25%;

}





/* Image container - exactly like .fa-img */

.home-card__image-header-bg {

    position: absolute;

    inset: 0;

}





.home-card__image-header-bg,

.home-card__image-header-bg a,

.home-card__image-link .image,

.home-card__image-link .mw-file-description {

    display: block;

    width: 100%;

    height: 100%;

}





/* Actual <img> element - exactly like .fa-media img */

.home-card__image-link img,

.home-card__image-link .mw-file-element {

    display: block;

    width: 100% !important;

    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) */

.home-card__image-overlay {

    position: absolute;

    top: 0;

    left: 0;

    right: 0;

    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 */

.home-card__content {

    padding: 14px 16px 16px 16px;

    display: flex;

    flex-direction: column;

    gap: 8px;

}





/* Hard cap the media height - exactly like .fa-media */

.home-card__image-link {

    max-height: 300px;

}





/* ============================================ */

/* MOBILE RESPONSIVENESS */

/* ============================================ */





@media (max-width: 1024px) {

    .home-grid {

        grid-template-columns: repeat(4, 1fr);

    }

}





@media (max-width: 768px) {

    .home-grid {

        grid-template-columns: repeat(2, 1fr);

        gap: 0.5rem;

    }

    

    .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) {

    .home-card__image-link {

        max-height: 180px;

    }

    

    .home-card__content {

        padding: 12px 14px 14px 14px;

        gap: 6px;

    }

}





@media (max-width: 480px) {

    .home-grid {

        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;

    }

}