Template:Home/Cards - styles/styles.css
Template page
More actions
/* ============================================ */
/* HOME GRID LAYOUT */
/* ============================================ */
.home-grid {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 0.75rem;
margin-top: 0;
width: 100%;
align-items: stretch;
}
/* ============================================ */
/* BASE HOME CARD STYLES */
/* ============================================ */
.home-card {
position: relative;
padding: 12px;
background: #ffffff;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.0575);
font-size: 0.8125rem;
transition: transform 0.2s ease, box-shadow 0.2s ease;
border: 1px solid #dee2e6;
min-height: 100px;
height: 100%;
display: flex;
flex-direction: column;
}
.home-card--col2 {
grid-column: span 2;
}
.home-card--col3 {
grid-column: span 3;
}
.home-card--col6 {
grid-column: span 6;
}
.home-card:hover {
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.115);
}
/* ============================================ */
/* CARD SUB-ELEMENTS */
/* ============================================ */
.home-card__label {
color: #6c757d;
font-size: 0.6875rem;
letter-spacing: 0.5px;
text-transform: uppercase;
font-weight: 500;
margin-bottom: 0.25rem;
}
.home-card__header {
margin: 0 0 0.5rem 0;
font-size: 0.95rem;
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.4;
margin-bottom: 0.1rem;
flex-grow: 1;
}
.home-card__body a:hover {
text-decoration: underline;
}
.home-card__links {
font-size: 0.75rem;
color: #6c757d;
border-top: 1px solid #dee2e6;
padding-top: 0.5rem;
margin-top: auto;
}
.home-card__links a {
color: #2d5016;
text-decoration: none;
font-weight: 500;
}
.home-card__links a:hover {
text-decoration: underline;
}
/* ============================================ */
/* MEDIAWIKI PARAGRAPH WRAPPING FIXES */
/* ============================================ */
/* MediaWiki wraps stray text/links in <p> tags with default margins.
These rules neutralise that inside cards so layout is predictable. */
.home-card p {
margin: 0;
}
.home-card p:empty {
display: none;
}
/* ============================================ */
/* HERO SPLIT (used in --col6 hero card) */
/* ============================================ */
.home-hero-split {
display: grid;
grid-template-columns: 1fr 2fr;
column-gap: 24px;
flex-grow: 1;
}
.home-hero-split__left,
.home-hero-split__right {
display: flex;
flex-direction: column;
min-width: 0;
}
/* ============================================ */
/* FACET ROWS (Browse Accessions) */
/* ============================================ */
.home-facets-grid {
display: flex;
flex-direction: column;
margin: 0.5rem 0 0 0;
/* Fill the left column so footer aligns with Featured's footer */
flex-grow: 1;
}
.home-facet-row {
border-bottom: 1px solid #f0ede5;
}
.home-facet-row:last-child {
border-bottom: none;
}
.home-facet-row a {
display: flex;
align-items: center;
padding: 10px 0;
color: #6c757d !important;
text-decoration: none !important;
font-size: 0.8125rem;
transition: color 0.15s ease, padding-left 0.15s ease;
}
.home-facet-row a:hover {
color: #2d5016 !important;
padding-left: 4px;
}
.home-facet-row a::after {
content: "→";
margin-left: auto;
color: #2d5016;
font-weight: 500;
opacity: 0.45;
transition: opacity 0.15s ease, transform 0.15s ease;
}
.home-facet-row a:hover::after {
opacity: 1;
transform: translateX(2px);
}
/* ============================================ */
/* FEATURED ACCESSION */
/* ============================================ */
.home-featured__image-wrap {
aspect-ratio: 16 / 10;
background-color: #d4ddc6;
border-radius: 6px;
overflow: hidden;
margin: 0 0 16px 0;
position: relative;
}
.home-featured__image-wrap p {
margin: 0;
height: 100%;
}
.home-featured__image-wrap a {
display: block;
width: 100%;
height: 100%;
}
.home-featured__image-wrap img {
width: 100% !important;
height: 100% !important;
object-fit: cover;
display: block;
transition: transform 0.4s ease;
}
.home-featured__image-wrap:hover img {
transform: scale(1.02);
}
.home-featured__title {
margin: 0 0 4px 0;
font-size: 1.15rem;
line-height: 1.3;
}
.home-featured__breadcrumb {
font-size: 0.75rem;
color: #6c757d;
margin-bottom: 16px;
line-height: 1.5;
}
.home-featured__breadcrumb a {
color: #495057;
text-decoration: none;
}
.home-featured__breadcrumb a:hover {
color: #2d5016;
text-decoration: underline;
}
.home-featured__breadcrumb-sep {
margin: 0 6px;
color: #adb5bd;
}
.home-featured__desc {
font-size: 0.8125rem;
color: #495057;
line-height: 1.55;
margin-bottom: 0;
flex-grow: 1;
}
/* ============================================ */
/* 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;
}
.home-card--col6 {
grid-column: span 4;
}
}
@media (max-width: 768px) {
.home-grid {
grid-template-columns: repeat(2, 1fr);
gap: 0.625rem;
}
.home-card--col2,
.home-card--col3,
.home-card--col6 {
grid-column: span 2;
}
.home-card {
padding: 10px;
}
.home-hero-split {
grid-template-columns: 1fr;
row-gap: 1rem;
}
.home-featured__image-wrap {
aspect-ratio: 16 / 9;
}
}
@media (max-width: 480px) {
.home-grid {
grid-template-columns: 1fr;
gap: 0.5rem;
}
.home-card--col2,
.home-card--col3,
.home-card--col6 {
grid-column: span 1;
}
.home-card {
padding: 10px;
}
}