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/Cards - styles/styles.css: Difference between revisions

Template page
No edit summary
Tag: Reverted
No edit summary
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* ============================================ */
/* ============================================ */
/* HOME GRID LAYOUT (MAIN CONTENT) */
/* HOME GRID LAYOUT */
/* ============================================ */
/* ============================================ */


.home-grid {
.home-grid {
     display: grid;
     display: grid;
     grid-template-columns: repeat(6, minmax(0, 1fr));
     grid-template-columns: repeat(6, 1fr);
     gap: 0.75rem;
     gap: 1rem;
     margin-top: 2.4rem;
     margin-top: 2.4rem;
     width: 100%;
     width: 100%;
     align-items: stretch;
     align-items: stretch;
}
.home-card--col2 {
    grid-column: span 2;
}
}


/* ============================================ */
/* ============================================ */
/* BASE HOME CARD STYLES – ALIGNED WITH FEATURED CARDS */
/* BASE HOME CARD STYLES */
/* ============================================ */
/* ============================================ */


.home-card {
.home-card {
     position: relative;
     position: relative;
     display: flex;
     padding: 20px;
    flex-direction: column;
     background: #ffffff;
     background: #ffffff;
    border: 1px solid #e5e7eb;
     border-radius: 8px;
     border-radius: 12px;
     box-shadow: 0 3px 6px rgba(0, 0, 0, 0.04), 0 3px 6px rgba(0, 0, 0, 0.0575);
     box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    padding: 16px 18px 18px;
     font-size: 0.875rem;
     font-size: 0.875rem;
     color: #374151;
     transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #dee2e6;
     min-height: 120px;
     min-height: 120px;
     transition: box-shadow 0.18s ease, transform 0.18s ease;
     height: 100%;
    display: flex;
    flex-direction: column;
}
 
.home-card--col2 {
    grid-column: span 2;
}
 
.home-card--col3 {
    grid-column: span 3;
}
}


.home-card:hover {
.home-card:hover {
     transform: translateY(-1px);
     transform: translateY(-2px);
     box-shadow: 0 8px 24px rgba(0,0,0,0.12);
     box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08), 0 6px 12px rgba(0, 0, 0, 0.115);
}
}


/* Text hierarchy */
/* ============================================ */
 
/* CARD SUB-ELEMENTS */
/* ============================================ */
.home-card__label {
.home-card__label {
     color: #6b7280;
     color: #6c757d;
     font-size: 0.78rem;
     font-size: 0.8125rem;
     letter-spacing: 0.08em;
     letter-spacing: 0.75px;
     text-transform: uppercase;
     text-transform: uppercase;
     font-weight: 600;
     font-weight: 500;
     margin-bottom: 0.4rem;
     margin-bottom: 0.5rem;
}
}
.home-card__header {
.home-card__header {
     margin: 0.1rem 0 0.6rem 0;
     margin: 0 0 1rem 0;
     font-size: 1.08rem;
     font-size: 1.1rem;
     color: #1f2937;
     color: #2d5016;
     font-weight: 600;
     font-weight: 600;
}
}
.home-card__header a {
.home-card__header a {
     color: inherit;
     color: inherit;
     text-decoration: none;
     text-decoration: none;
}
}
.home-card__header a:hover {
.home-card__header a:hover {
     color: #2d5016;
     color: #3d6b1f;
}
}
.home-card__body {
.home-card__body {
     color: #4b5563;
     color: #495057;
     line-height: 1.5;
     line-height: 1.6;
     margin-bottom: 0.7rem;
     margin-bottom: 1rem;
    flex-grow: 1;
}
/* Removed all the forced color overrides - let MediaWiki handle it */
.home-card__body a:hover {
    text-decoration: underline;
}
}
.home-card__links {
.home-card__links {
     font-size: 0.8rem;
     font-size: 0.8125rem;
     color: #6b7280;
     color: #6c757d;
     border-top: 1px solid #e5e7eb;
     border-top: 1px solid #dee2e6;
     padding-top: 0.6rem;
     padding-top: 0.75rem;
     margin-top: auto;
     margin-top: auto;
}
}
.home-card__links a {
.home-card__links a {
     color: #2d5016;
     color: #2d5016;
Line 86: Line 90:
     font-weight: 500;
     font-weight: 500;
}
}
.home-card__links a:hover {
.home-card__links a:hover {
     text-decoration: underline;
     text-decoration: underline;
Line 92: Line 95:


/* ============================================ */
/* ============================================ */
/* IMAGE HEADER VARIANT */
/* MOBILE RESPONSIVENESS */
/* ============================================ */
 
.home-card--image-header {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    height: 100%;
}
 
.home-card--image-header:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
 
/* Image wrapper – 16:9 */
 
.home-card__image-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #f3f4f6;
    line-height: 0;
    border-bottom: 1px solid #eef2f7;
}
 
.home-card__image-link::before {
    content: "";
    display: block;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
}
 
/* Image container */
 
.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> */
 
.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;
}
 
/* Overlay text */
 
.home-card__image-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: 0 20px;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.25rem;
    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 under image */
 
.home-card__content {
    padding: 14px 16px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}
 
/* Inherit label/body styles inside image header cards */
 
.home-card__content .home-card__label {
    margin-bottom: 0.3rem;
}
 
.home-card__content .home-card__body {
    margin-bottom: 0.7rem;
}
 
/* Limit media height on wide screens */
 
.home-card__image-link {
    max-height: 300px;
}
 
/* ============================================ */
/* RESPONSIVE BREAKPOINTS */
/* ============================================ */
/* ============================================ */


@media (max-width: 1024px) {
@media (max-width: 1024px) {
     .home-grid {
     .home-grid {
         grid-template-columns: repeat(4, minmax(0, 1fr));
         grid-template-columns: repeat(4, 1fr);
     }
     }
}
      
 
@media (max-width: 768px) {
     .home-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }
 
     .home-card--col2 {
     .home-card--col2 {
         grid-column: span 2;
         grid-column: span 2;
     }
     }
 
   
     .home-card__image-link {
     .home-card--col3 {
        max-height: 220px;
         grid-column: span 4;
    }
 
    .home-card__image-overlay {
         font-size: 1.1rem;
        padding: 0 15px;
    }
 
    .home-card,
    .home-card__content {
        padding: 14px 14px 16px;
     }
     }
}
}


@media (max-width: 600px) {
@media (max-width: 768px) {
     .home-card__image-link {
     .home-grid {
         max-height: 190px;
         grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
     }
     }
 
   
     .home-card__content {
    .home-card--col2,
         padding: 12px 14px 14px 14px;
     .home-card--col3 {
        gap: 6px;
         grid-column: span 2;
     }
     }
}
}
Line 255: Line 129:
         gap: 0.5rem;
         gap: 0.5rem;
     }
     }
 
   
     .home-card--col2 {
     .home-card--col2,
    .home-card--col3 {
         grid-column: span 1;
         grid-column: span 1;
     }
     }
 
   
     .home-card {
     .home-card {
         padding: 14px 14px 16px;
         padding: 15px;
    }
 
    .home-card__image-link {
        max-height: 170px;
    }
 
    .home-card__image-overlay {
        font-size: 1rem;
        padding: 0 12px;
     }
     }
}
}

Latest revision as of 10:16, 20 November 2025

/* ============================================ */
/* HOME GRID LAYOUT */
/* ============================================ */

.home-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    margin-top: 2.4rem;
    width: 100%;
    align-items: stretch;
}

/* ============================================ */
/* 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;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.home-card--col2 {
    grid-column: span 2;
}

.home-card--col3 {
    grid-column: span 3;
}

.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;
    flex-grow: 1;
}
/* Removed all the forced color overrides - let MediaWiki handle it */
.home-card__body a:hover {
    text-decoration: underline;
}
.home-card__links {
    font-size: 0.8125rem;
    color: #6c757d;
    border-top: 1px solid #dee2e6;
    padding-top: 0.75rem;
    margin-top: auto;
}
.home-card__links a {
    color: #2d5016;
    text-decoration: none;
    font-weight: 500;
}
.home-card__links a:hover {
    text-decoration: underline;
}

/* ============================================ */
/* MOBILE RESPONSIVENESS */
/* ============================================ */

@media (max-width: 1024px) {
    .home-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .home-card--col2 {
        grid-column: span 2;
    }
    
    .home-card--col3 {
        grid-column: span 4;
    }
}

@media (max-width: 768px) {
    .home-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .home-card--col2,
    .home-card--col3 {
        grid-column: span 2;
    }
}

@media (max-width: 480px) {
    .home-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .home-card--col2,
    .home-card--col3 {
        grid-column: span 1;
    }
    
    .home-card {
        padding: 15px;
    }
}