Template:Home/FeaturedRegionCard/styles.css: Difference between revisions
Template page
More actions
Eloise Zomia (talk | contribs) No edit summary |
Eloise Zomia (talk | contribs) No edit summary |
||
| (7 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
/* ================================ | /* ============================================ */ | ||
/* 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; | |||
} | } | ||
/* | |||
.fa- | |||
.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%; | |||
} | } | ||
.fa- | |||
/* 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) { | @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;
}
}