Files
ridebus-website/modules/home/citiesCard/citiesCard.module.scss
2026-10-02 20:31:49 +03:00

214 lines
3.5 KiB
SCSS

.card {
--on-background: #122f60;
--on-background-secondary: #2c4678;
--background: #d8e2ff;
width: 100%;
min-width: 0;
min-height: 580px;
position: relative;
}
.content {
margin-top: 32px;
justify-content: center;
}
.backdrop {
position: absolute;
width: 640px;
height: 640px;
bottom: -140px;
right: -140px;
pointer-events: none;
svg {
width: 100%;
height: 100%;
}
}
.catalog {
position: relative;
display: flex;
flex-direction: column;
gap: 28px;
align-items: flex-start;
z-index: 1;
}
.count {
display: flex;
align-items: center;
gap: 16px;
padding: 16px 24px;
border-radius: 24px;
background: #fff;
color: var(--on-background);
transform: rotate(-4deg);
strong {
font-size: 3.5rem;
line-height: 1;
font-weight: 800;
}
span {
font-size: 1rem;
line-height: 1.5;
font-weight: 700;
}
}
.marquee {
width: calc(100% + 72px);
margin-left: -36px;
padding: 20px 0;
transform: rotate(-4deg);
}
.marqueeTrack {
display: flex;
width: max-content;
animation: citiesScroll 32s linear infinite;
}
.cities {
display: flex;
flex-shrink: 0;
gap: 12px;
list-style: none;
padding: 0 12px 0 0;
}
.cityBadge {
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
min-width: 120px;
padding: 12px 20px;
border-radius: 40px;
background: #fff;
color: #122f60;
font-size: 1.2rem;
font-weight: 800;
white-space: nowrap;
transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
&:nth-child(even) {
background: #122f60;
color: #fff;
}
&:hover {
transform: rotate(3deg);
}
}
@keyframes citiesScroll {
to {
transform: translateX(-50%);
}
}
.contribute {
max-width: 100%;
margin-top: 4px;
a {
display: flex;
align-items: center;
gap: 12px;
padding: 12px 16px;
border-radius: 16px;
background: #d8e2ff;
color: #122f60;
font-size: 0.9rem;
font-weight: 700;
line-height: 1.5;
svg {
width: 20px;
height: 20px;
flex-shrink: 0;
}
}
}
.status {
min-height: 180px;
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
gap: 20px;
font-size: 1rem;
line-height: 1.6;
font-weight: 600;
color: #2c4678;
button {
padding: 14px 18px;
border: 0;
border-radius: 16px;
font: inherit;
font-weight: 700;
color: #122f60;
background: #fff;
}
}
.contribute a:focus-visible,
.status button:focus-visible {
outline: 3px solid #122f60;
outline-offset: 3px;
}
@media (max-width: 1180px) {
.card {
min-height: 490px;
}
.backdrop {
width: 440px;
height: 440px;
bottom: -70px;
right: -110px;
}
.catalog {
gap: 24px;
}
.cityBadge {
font-size: 1.05rem;
padding: 10px 16px;
}
}
@media (max-width: 800px) {
.card {
min-height: 430px;
}
}
@media (max-width: 500px) {
.card {
padding: 24px;
}
.content {
margin-top: 28px;
}
.count strong {
font-size: 3rem;
}
.cityBadge {
font-size: 1rem;
}
.marquee {
width: calc(100% + 48px);
margin-left: -24px;
}
}
@media (prefers-reduced-motion: reduce) {
.backdrop {
transform: none !important;
}
.cityBadge {
transition: none;
}
.marquee {
width: 100%;
margin-left: 0;
padding: 0;
transform: none;
}
.marqueeTrack {
width: 100%;
animation: none;
}
.cities {
width: 100%;
flex-wrap: wrap;
padding: 0;
}
.cities[aria-hidden='true'],
.cityBadge[aria-hidden='true'] {
display: none;
}
}