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
Created page with "============================================: HOME GRID LAYOUT: ============================================: .home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); grid-gap: 0.625rem; margin-top: 2.4rem; } ============================================: BASE HOME CARD STYLES: ============================================: .home-card { position: relative; padding: 20px; background..."
 
No edit summary
Line 5: Line 5:
.home-grid {
.home-grid {
     display: grid;
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
     grid-template-columns: repeat(6, 1fr); /* Fixed: explicit 6 columns */
     grid-gap: 0.625rem;
     grid-gap: 0.625rem;
     margin-top: 2.4rem;
     margin-top: 2.4rem;
    width: 100%;
}
}


Line 72: Line 73:
     border-top: 1px solid #dee2e6;
     border-top: 1px solid #dee2e6;
     padding-top: 0.75rem;
     padding-top: 0.75rem;
    margin-top: 0.75rem;
}
}


Line 89: Line 91:


.home-card--image-header {
.home-card--image-header {
     padding: 0;
     padding: 0 !important; /* Force zero padding */
     overflow: hidden;
     overflow: hidden;
    display: flex;
    flex-direction: column;
}
}


Line 103: Line 107:
     line-height: 0;
     line-height: 0;
     font-size: 0;
     font-size: 0;
    flex-shrink: 0; /* Prevent image from shrinking */
}
}


Line 161: Line 166:
.home-card__content {
.home-card__content {
     padding: 20px;
     padding: 20px;
    background: #f8f9fa; /* Match card background */
    flex-grow: 1; /* Allow content to take remaining space */
    display: block !important; /* Force display */
    visibility: visible !important; /* Force visibility */
}
}


Line 194: Line 203:
     border-top: 1px solid #dee2e6;
     border-top: 1px solid #dee2e6;
     padding-top: 0.75rem;
     padding-top: 0.75rem;
    margin-top: 0.75rem;
}
}


Line 209: Line 219:
/* MOBILE RESPONSIVENESS */
/* MOBILE RESPONSIVENESS */
/* ============================================ */
/* ============================================ */
@media (max-width: 1024px) {
    .home-grid {
        grid-template-columns: repeat(4, 1fr); /* 4 columns on tablets */
    }
}


@media (max-width: 768px) {
@media (max-width: 768px) {
    .home-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
        grid-gap: 0.5rem;
    }
   
    .home-card--col2 {
        grid-column: span 2; /* Each card spans full width */
    }
   
     .home-card__image-link {
     .home-card__image-link {
         height: 150px;
         height: 150px;
Line 227: Line 252:
@media (max-width: 480px) {
@media (max-width: 480px) {
     .home-grid {
     .home-grid {
        grid-template-columns: 1fr; /* Single column on small mobile */
         grid-gap: 0.5rem;
         grid-gap: 0.5rem;
    }
   
    .home-card--col2 {
        grid-column: span 1;
     }
     }
      
      

Revision as of 06:54, 19 November 2025

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

.home-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* Fixed: explicit 6 columns */
    grid-gap: 0.625rem;
    margin-top: 2.4rem;
    width: 100%;
}

/* ============================================ */
/* BASE HOME CARD STYLES */
/* ============================================ */

.home-card {
    position: relative;
    padding: 20px;
    background: #f8f9fa;
    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 (Integrated Design) */
/* ============================================ */

.home-card--image-header {
    padding: 0 !important; /* Force zero padding */
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Image header link wrapper */
.home-card__image-link {
    display: block;
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    text-decoration: none;
    line-height: 0;
    font-size: 0;
    flex-shrink: 0; /* Prevent image from shrinking */
}

/* Image background container */
.home-card__image-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    line-height: 0;
    font-size: 0;
}

.home-card__image-header-bg * {
    display: block;
    line-height: 0;
}

.home-card__image-header-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
    vertical-align: top;
    transition: transform 0.3s ease;
}

/* Hover effect on image */
.home-card__image-link:hover .home-card__image-header-bg img {
    transform: scale(1.05);
}

/* Text overlay on image */
.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 below image */
.home-card__content {
    padding: 20px;
    background: #f8f9fa; /* Match card background */
    flex-grow: 1; /* Allow content to take remaining space */
    display: block !important; /* Force display */
    visibility: visible !important; /* Force visibility */
}

/* Nested label in content section */
.home-card__content .home-card__label {
    color: #6c757d;
    font-size: 0.8125rem;
    letter-spacing: 0.75px;
    text-transform: uppercase;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Nested header in content section */
.home-card__content .home-card__header {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    color: #2d5016;
    font-weight: 600;
}

/* Nested body in content section */
.home-card__content .home-card__body {
    color: #495057;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Nested links in content section */
.home-card__content .home-card__links {
    font-size: 0.8125rem;
    color: #6c757d;
    border-top: 1px solid #dee2e6;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
}

.home-card__content .home-card__links a {
    color: #2d5016;
    text-decoration: none;
    font-weight: 500;
}

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

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

@media (max-width: 1024px) {
    .home-grid {
        grid-template-columns: repeat(4, 1fr); /* 4 columns on tablets */
    }
}

@media (max-width: 768px) {
    .home-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
        grid-gap: 0.5rem;
    }
    
    .home-card--col2 {
        grid-column: span 2; /* Each card spans full width */
    }
    
    .home-card__image-link {
        height: 150px;
    }
    
    .home-card__image-overlay {
        font-size: 1.1rem;
        padding: 0 15px;
    }
    
    .home-card__content {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .home-grid {
        grid-template-columns: 1fr; /* Single column on small mobile */
        grid-gap: 0.5rem;
    }
    
    .home-card--col2 {
        grid-column: span 1;
    }
    
    .home-card {
        padding: 15px;
    }
    
    .home-card__image-link {
        height: 120px;
    }
    
    .home-card__image-overlay {
        font-size: 1rem;
        padding: 0 12px;
    }
    
    .home-card__content {
        padding: 12px;
    }
}