Template:MaRDI Services/styles.css
From MaRDI portal
/* ── Service Card Grid ─────────────────────────────────────── */
.mardi-service-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
gap: 20px;
padding: 10px;
}
/* ── Individual Card ───────────────────────────────────────── */
.mardi-service-card {
border: 1px solid #ddd;
border-radius: 5px;
padding: 15px;
background-color: #fff;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
overflow-wrap: break-word;
word-break: break-word;
}
/* ── Card inner layout (image + text side by side) ─────────── */
.mardi-card-inner {
display: flex;
flex-direction: row;
gap: 15px;
align-items: flex-start;
}
/* ── Image column ──────────────────────────────────────────── */
.mardi-card-image {
flex: 0 0 200px;
padding-top: 18px;
}
.mardi-card-image img,
.mardi-card-image a img {
max-width: 100%;
height: auto;
display: block;
}
/* ── Text column ───────────────────────────────────────────── */
.mardi-card-body {
flex: 1 1 0;
min-width: 0; /* prevents flex child overflow */
}
.mardi-card-body h3 {
font-weight: bold;
margin: 0;
}
.mardi-card-subtitle {
font-weight: bold;
margin: 2px 0 0 0;
}
.mardi-card-description {
margin: 10px 0;
}
.mardi-card-maintainer {
font-size: 12px;
color: #888;
}
.mardi-card-more {
margin-top: 15px;
text-align: right;
}
.mardi-card-more a,
.mardi-card-more a:visited {
display: inline-block;
padding: 10px 20px;
background-color: #D0662B;
color: #fff !important;
text-decoration: none;
font-weight: bold;
border-radius: 5px;
}
.mardi-card-more a:hover {
background-color: #b8541f;
}
/* ── Narrow screens: stack image above text ────────────────── */
@media screen and (max-width: 540px) {
.mardi-service-grid {
grid-template-columns: 1fr;
}
.mardi-card-inner {
flex-direction: column;
}
.mardi-card-image {
flex: 0 0 auto;
width: 100%;
max-width: 200px;
padding-top: 0;
}
}