Files
school_compare/nextjs-app/components/SchoolCard.module.css

200 lines
3.5 KiB
CSS
Raw Normal View History

.card {
background: var(--bg-card, white);
border: 1px solid var(--border-color, #e5dfd5);
border-left: 3px solid transparent;
border-radius: 12px;
padding: 1.5rem;
transition: all 0.3s ease;
}
.card:hover {
border-left-color: var(--accent-coral, #e07256);
box-shadow: var(--shadow-medium, 0 4px 20px rgba(26, 22, 18, 0.1));
transform: translateY(-2px);
}
.header {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 1rem;
margin-bottom: 0.75rem;
}
.title {
margin: 0;
font-size: 1.125rem;
font-weight: 600;
line-height: 1.4;
font-family: var(--font-playfair), 'Playfair Display', serif;
}
.title a {
color: var(--text-primary, #1a1612);
text-decoration: none;
transition: color 0.2s ease;
}
.title a:hover {
color: var(--accent-coral, #e07256);
}
.distance {
font-size: 0.875rem;
color: var(--accent-teal, #2d7d7d);
white-space: nowrap;
background: rgba(45, 125, 125, 0.1);
padding: 0.25rem 0.75rem;
border-radius: 20px;
font-weight: 500;
}
.meta {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
margin-bottom: 1rem;
}
.metaItem {
font-size: 0.875rem;
color: var(--text-secondary, #5c564d);
padding: 0.25rem 0.75rem;
background: var(--bg-secondary, #f3ede4);
border-radius: 4px;
}
.metrics {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
gap: 1rem;
margin-bottom: 1.5rem;
padding: 1rem;
background: var(--bg-secondary, #f3ede4);
border-radius: 8px;
border: 1px solid var(--border-color, #e5dfd5);
}
.metric {
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.metricLabel {
font-size: 0.75rem;
color: var(--text-muted, #8a847a);
text-transform: uppercase;
letter-spacing: 0.05em;
}
.metricValue {
display: flex;
align-items: center;
gap: 0.5rem;
}
.metricValue strong {
font-size: 1.125rem;
color: var(--text-primary, #1a1612);
font-weight: 700;
}
.trend {
display: inline-flex;
align-items: center;
justify-content: center;
width: 20px;
height: 20px;
border-radius: 4px;
cursor: help;
transition: transform 0.2s ease;
}
.trend:hover {
transform: scale(1.15);
}
.trendIcon {
width: 12px;
height: 12px;
}
.trendUp {
color: var(--accent-teal, #2d7d7d);
background: rgba(45, 125, 125, 0.15);
}
.trendDown {
color: var(--accent-coral, #e07256);
background: rgba(224, 114, 86, 0.15);
}
.trendStable {
color: var(--text-muted, #8a847a);
background: rgba(138, 132, 122, 0.15);
}
.actions {
display: flex;
gap: 0.75rem;
}
.btnSecondary,
.btnPrimary {
flex: 1;
padding: 0.625rem 1rem;
font-size: 0.875rem;
font-weight: 600;
border-radius: 8px;
border: none;
cursor: pointer;
text-align: center;
text-decoration: none;
transition: all 0.2s ease;
}
.btnSecondary {
background: var(--bg-card, white);
color: var(--accent-teal, #2d7d7d);
border: 2px solid var(--accent-teal, #2d7d7d);
}
.btnSecondary:hover {
background: var(--accent-teal, #2d7d7d);
color: white;
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(45, 125, 125, 0.3);
}
.btnPrimary {
background: var(--accent-coral, #e07256);
color: white;
}
.btnPrimary:hover {
background: var(--accent-coral-dark, #c45a3f);
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(224, 114, 86, 0.3);
}
.btnPrimary:active {
transform: translateY(0);
}
@media (max-width: 640px) {
.card {
padding: 1rem;
border-radius: 8px;
}
.metrics {
grid-template-columns: 1fr;
gap: 0.75rem;
}
.actions {
flex-direction: column;
}
}