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
Undo revision 347 by Eloise Zomia (talk)
Tag: Undo
No edit summary
Line 1: Line 1:
/* ================================
/* ============================================ */
  FeaturedRegionCard — TemplateStyles-safe CSS
/* HOME GRID LAYOUT */
  ================================ */
/* ============================================ */


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


/* Card shell */
/* ============================================ */
.fa-card {
/* BASE HOME CARD STYLES */
  display: flex;
/* ============================================ */
  flex-direction: column;
 
  background: #ffffff;
.home-card {
  border: 1px solid #e5e7eb;
    position: relative;
  border-radius: 12px;
    padding: 20px;
  overflow: hidden;
    background: #ffffff;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
    border-radius: 8px;
  transition: box-shadow .2s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.04), 0 3px 6px rgba(0, 0, 0, 0.0575);
  height: 100%;
    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 --- */
.home-card--col2 {
.fa-media {
    grid-column: span 2;
  position: relative;
  overflow: hidden;
  background: #f3f4f6;
  line-height: 0;      /* remove inline-img baseline gap */
  border-bottom: 1px solid #eef2f7;
}
}
.fa-media::before {
 
  content: "";
.home-card:hover {
  display: block;
    transform: translateY(-2px);
  width: 100%;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08), 0 6px 12px rgba(0, 0, 0, 0.115);
  padding-top: 56.25%; /* 16:9 ratio */
}
}


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


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


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


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


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


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


/* Province line (avoid redundant country) */
.home-card__links a {
.fa-sub { margin: 0 0 6px 0; color: #6b7280; }
    color: #2d5016;
    text-decoration: none;
    font-weight: 500;
}


/* Meta (dot-separated) */
.home-card__links a:hover {
.fa-provenance {
    text-decoration: underline;
  margin: 0 0 8px 0;
  color: #64748b;
  font-size: .88rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.fa-provenance .pv-item {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.fa-provenance .pv-item + .pv-item::before {
  content: "•";
  padding: 0 6px;
  color: #9ca3af;
}
}


/* Hook (one-line pitch) */
/* ============================================ */
.fa-hook { margin: 0; color: #334155; font-size: .95rem; }
/* IMAGE HEADER CARDS - EXACT CLONE OF .fa-card */
/* ============================================ */


/* Footer (pinned) */
/* Card shell - exactly like .fa-card */
.fa-foot {
.home-card--image-header {
  margin-top: auto;               /* push footer to bottom */
    display: flex;
  border-top: 1px solid #e5e7eb;
    flex-direction: column;
  padding-top: 10px;
    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;
}
}
/* Statusline holds three pills in a row (wraps on mobile) */
 
.fa-statusline {
.home-card--image-header:hover {
  display: flex;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 6px 0;
  font-weight: 600;
}
}
.fa-foot-sep { height: 1px; background: #e5e7eb; margin: 8px 0; }


/* CTA */
/* Image wrapper - exactly like .fa-media */
.fa-cta { margin: 0; font-weight: 600; }
.home-card__image-link {
.fa-cta a {
    position: relative;
  color: #2d5016;
    overflow: hidden;
  text-decoration: none;
    background: #f3f4f6;
  border-bottom: 1px solid rgba(45,80,22,.3);
    line-height: 0;
  padding-bottom: 1px;
    border-bottom: 1px solid #eef2f7;
    display: block;
    text-decoration: none;
}
}
.fa-cta a:hover { border-bottom-color: rgba(45,80,22,.6); }
.fa-cta .fa-missing { color: #6b7280; }


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


/* ---------- Conservation status (colored) ---------- */
.home-card__image-header-bg,
.status-pill {
.home-card__image-header-bg a,
  background: #f3f4f6;
.home-card__image-link .image,
  color: #374151;
.home-card__image-link .mw-file-description {
    display: block;
    width: 100%;
    height: 100%;
}
}
.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; }
/* Actual <img> element - exactly like .fa-media img */
.sp--vulnerable .pill-dot { background: #b45309; }
.home-card__image-link img,
.sp--endangered .pill-dot { background: #b91c1c; }
.home-card__image-link .mw-file-element {
.sp--critical .pill-dot  { background: #991b1b; }
    display: block;
.sp--extinct .pill-dot    { background: #111827; }
    width: 100% !important;
.sp--unknown .pill-dot    { background: #9ca3af; }
    height: 100% !important;
    max-width: none !important;
    object-fit: cover;
    object-position: center center;
}


/* ---------- Growing area (neutral) ---------- */
/* Text overlay on image (not in region cards, but needed for home cards) */
.pill--area {
.home-card__image-overlay {
  background: #f8fafc;           /* light neutral */
    position: absolute;
  border-color: #e5e7eb;
    top: 0;
  color: #1f2937;
    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) ---------- */
/* Content section - exactly like .fa-body */
.pill--access {
.home-card__content {
  background: #eff6ff;          /* light blue */
    padding: 14px 16px 16px 16px;
  border-color: #dbeafe;         /* blue-100 */
    display: flex;
  color: #1f2937;
    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;
}
}


/* Small screens */
/* Hard cap the media height - exactly like .fa-media */
@media (max-width: 480px) {
.home-card__image-link {
  .fa-body { padding: 12px 14px 14px 14px; gap: 6px; }
    max-height: 300px;
  .fa-title { font-size: 1.05rem; }
  .fa-provenance { font-size: .86rem; }
}
}


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


/* ==== Featured Region Cards: tighten copy + spacing ==== */
@media (max-width: 1024px) {
    .home-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}


/* small gap below the "Featured Growing Regions" heading */
@media (max-width: 768px) {
.mw-parser-output h2 + .fa-grid,
    .home-grid {
.mw-parser-output h2 + .fr-grid { margin-top: 10px; }
        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;
    }
}


/* make the card’s content pack tighter */
@media (max-width: 600px) {
.mw-parser-output .fa-card,
    .home-card__image-link {
.mw-parser-output .fr-card {
        max-height: 180px;
  display: flex;
    }
  flex-direction: column;
   
    .home-card__content {
        padding: 12px 14px 14px 14px;
        gap: 6px;
    }
}
}


/* reduce inner padding a touch */
@media (max-width: 480px) {
.mw-parser-output .fa-card .fa-content,
    .home-grid {
.mw-parser-output .fr-card .fr-content { padding: 14px 16px; }
        grid-template-columns: 1fr;
 
        gap: 0.5rem;
/* tighter body text: slightly smaller + shorter leading + trimmed margins */
    }
.mw-parser-output .fa-card .fa-body,
   
.mw-parser-output .fr-card .fr-body {
    .home-card--col2 {
  font-size: .95rem;
        grid-column: span 1;
  line-height: 1.45;
    }
  color: #495057;
   
  margin: 6px 0 6px 0;
    .home-card {
        padding: 15px;
    }
   
    .home-card__image-link {
        max-height: 160px;
    }
   
    .home-card__image-overlay {
        font-size: 1rem;
        padding: 0 12px;
    }
}
}
.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; }

Revision as of 07:07, 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;
    }
}