feat: complete Changan digital manuals web application with mobile layout fix
This commit is contained in:
@@ -0,0 +1,726 @@
|
||||
/* ==========================================================================
|
||||
CHANGAN DIGITAL MANUALS — HOME PORTAL STYLESHEET
|
||||
Clean, modern automotive design system with dark/light harmony & RTL support
|
||||
========================================================================== */
|
||||
|
||||
:root {
|
||||
--primary: #2787A6;
|
||||
--primary-hover: #1f6d87;
|
||||
--primary-light: rgba(39, 135, 166, 0.12);
|
||||
--primary-border: rgba(39, 135, 166, 0.35);
|
||||
--accent: #E0533C;
|
||||
--accent-gold: #f59e0b;
|
||||
--bg-page: #f8fafc;
|
||||
--bg-card: #ffffff;
|
||||
--bg-card-alt: #f1f5f9;
|
||||
--text-main: #0f172a;
|
||||
--text-muted: #64748b;
|
||||
--border-color: #e2e8f0;
|
||||
--header-bg: rgba(255, 255, 255, 0.94);
|
||||
--shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
|
||||
--shadow-md: 0 6px 16px -2px rgba(15, 23, 42, 0.08);
|
||||
--shadow-lg: 0 16px 32px -4px rgba(15, 23, 42, 0.12);
|
||||
--radius-sm: 8px;
|
||||
--radius-md: 14px;
|
||||
--radius-lg: 20px;
|
||||
--font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
}
|
||||
|
||||
[dir="rtl"] {
|
||||
--font-family: "Vazirmatn", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: var(--font-family);
|
||||
background-color: var(--bg-page);
|
||||
color: var(--text-main);
|
||||
line-height: 1.6;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------
|
||||
HEADER
|
||||
-------------------------------------------------------------------------- */
|
||||
.home-header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
background: var(--header-bg);
|
||||
backdrop-filter: blur(12px);
|
||||
-webkit-backdrop-filter: blur(12px);
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
padding: 0 24px;
|
||||
height: 72px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
|
||||
.brand-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.brand-logo-icon {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
border-radius: 10px;
|
||||
background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #ffffff;
|
||||
font-size: 22px;
|
||||
box-shadow: var(--shadow-sm);
|
||||
border: 1px solid rgba(255, 255, 255, 0.15);
|
||||
}
|
||||
|
||||
.brand-text-col {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.brand-title-main {
|
||||
font-size: 19px;
|
||||
font-weight: 800;
|
||||
letter-spacing: -0.02em;
|
||||
color: var(--text-main);
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.brand-title-sub {
|
||||
font-size: 12px;
|
||||
color: var(--text-muted);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* Language Dropdown in Header */
|
||||
.header-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
.lang-dropdown-wrapper {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.lang-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 9px 16px;
|
||||
background: var(--bg-card);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--radius-sm);
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: var(--text-main);
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
font-family: inherit;
|
||||
}
|
||||
|
||||
.lang-btn:hover {
|
||||
background: var(--bg-card-alt);
|
||||
border-color: var(--primary);
|
||||
}
|
||||
|
||||
.lang-menu {
|
||||
position: absolute;
|
||||
top: calc(100% + 8px);
|
||||
right: 0;
|
||||
background: var(--bg-card);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--radius-md);
|
||||
box-shadow: var(--shadow-lg);
|
||||
min-width: 170px;
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
[dir="rtl"] .lang-menu {
|
||||
right: auto;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.lang-menu.open {
|
||||
display: flex;
|
||||
animation: dropdownFadeIn 0.18s ease;
|
||||
}
|
||||
|
||||
@keyframes dropdownFadeIn {
|
||||
from { opacity: 0; transform: translateY(-6px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
.lang-option-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 12px 18px;
|
||||
background: none;
|
||||
border: none;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: var(--text-main);
|
||||
cursor: pointer;
|
||||
text-align: left;
|
||||
transition: background 0.15s ease;
|
||||
width: 100%;
|
||||
font-family: inherit;
|
||||
}
|
||||
|
||||
[dir="rtl"] .lang-option-btn {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.lang-option-btn:hover {
|
||||
background: var(--bg-card-alt);
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
.lang-option-btn.active {
|
||||
font-weight: 700;
|
||||
color: var(--primary);
|
||||
background: var(--primary-light);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------
|
||||
HERO SECTION
|
||||
-------------------------------------------------------------------------- */
|
||||
.home-hero-section {
|
||||
padding: 56px 24px 36px;
|
||||
text-align: center;
|
||||
background: radial-gradient(circle at 50% 20%, rgba(39, 135, 166, 0.08) 0%, transparent 70%);
|
||||
}
|
||||
|
||||
.hero-content-wrap {
|
||||
max-width: 820px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.hero-pill-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 6px 16px;
|
||||
border-radius: 999px;
|
||||
background: var(--primary-light);
|
||||
border: 1px solid var(--primary-border);
|
||||
color: var(--primary);
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
margin-bottom: 20px;
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
|
||||
.hero-heading {
|
||||
font-size: 38px;
|
||||
font-weight: 800;
|
||||
line-height: 1.25;
|
||||
color: var(--text-main);
|
||||
letter-spacing: -0.025em;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.hero-description {
|
||||
font-size: 18px;
|
||||
color: var(--text-muted);
|
||||
line-height: 1.6;
|
||||
font-weight: 400;
|
||||
max-width: 700px;
|
||||
margin: 0 auto 30px;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------
|
||||
VEHICLES CATALOG GRID
|
||||
-------------------------------------------------------------------------- */
|
||||
.vehicles-section {
|
||||
max-width: 960px;
|
||||
margin: 0 auto;
|
||||
padding: 20px 24px 60px;
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.section-header-row {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 32px;
|
||||
border-bottom: 2px solid var(--border-color);
|
||||
padding-bottom: 16px;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 24px;
|
||||
font-weight: 800;
|
||||
color: var(--text-main);
|
||||
}
|
||||
|
||||
.section-counter {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: var(--primary);
|
||||
background: var(--primary-light);
|
||||
padding: 4px 12px;
|
||||
border-radius: 999px;
|
||||
}
|
||||
|
||||
.vehicles-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
|
||||
gap: 32px;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------
|
||||
CAR CARD
|
||||
-------------------------------------------------------------------------- */
|
||||
.car-card {
|
||||
background: var(--bg-card);
|
||||
border-radius: var(--radius-lg);
|
||||
border: 1px solid var(--border-color);
|
||||
overflow: hidden;
|
||||
box-shadow: var(--shadow-sm);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.car-card:hover {
|
||||
transform: translateY(-6px);
|
||||
box-shadow: var(--shadow-lg);
|
||||
border-color: var(--primary-border);
|
||||
}
|
||||
|
||||
.car-card.active-model {
|
||||
border-color: var(--primary);
|
||||
box-shadow: 0 8px 24px -4px rgba(39, 135, 166, 0.2);
|
||||
}
|
||||
|
||||
/* Photo Container */
|
||||
.car-photo-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 230px;
|
||||
background: #0f172a;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.car-photo-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
transition: transform 0.4s ease;
|
||||
}
|
||||
|
||||
.car-card:hover .car-photo-img {
|
||||
transform: scale(1.04);
|
||||
}
|
||||
|
||||
.car-status-badge {
|
||||
position: absolute;
|
||||
top: 14px;
|
||||
right: 14px;
|
||||
padding: 6px 12px;
|
||||
border-radius: 999px;
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
backdrop-filter: blur(8px);
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.25);
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
[dir="rtl"] .car-status-badge {
|
||||
right: auto;
|
||||
left: 14px;
|
||||
}
|
||||
|
||||
.badge-active {
|
||||
background: rgba(34, 197, 94, 0.92);
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.badge-upcoming {
|
||||
background: rgba(100, 116, 139, 0.92);
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
/* Car Details under Photo */
|
||||
.car-card-body {
|
||||
padding: 24px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.car-name-title {
|
||||
font-size: 22px;
|
||||
font-weight: 800;
|
||||
color: var(--text-main);
|
||||
margin-bottom: 6px;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.car-sub-label {
|
||||
font-size: 14px;
|
||||
color: var(--primary);
|
||||
font-weight: 600;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
.car-specs-chips {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
margin-bottom: 22px;
|
||||
}
|
||||
|
||||
.spec-chip {
|
||||
background: var(--bg-card-alt);
|
||||
color: var(--text-muted);
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
padding: 4px 10px;
|
||||
border-radius: var(--radius-sm);
|
||||
border: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.car-card-actions {
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
/* BIG SELECTION BUTTON */
|
||||
.btn-car-select {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 12px;
|
||||
width: 100%;
|
||||
padding: 16px 24px; /* Big button */
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
border-radius: var(--radius-md);
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
transition: all 0.22s ease;
|
||||
font-family: inherit;
|
||||
border: none;
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
|
||||
.btn-car-select.btn-primary {
|
||||
background: linear-gradient(135deg, var(--primary) 0%, #1d728e 100%);
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.btn-car-select.btn-primary:hover {
|
||||
background: linear-gradient(135deg, #1f6d87 0%, #17576d 100%);
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 8px 18px -2px rgba(39, 135, 166, 0.4);
|
||||
}
|
||||
|
||||
.btn-car-select.btn-disabled {
|
||||
background: var(--bg-card-alt);
|
||||
color: var(--text-muted);
|
||||
border: 1px dashed var(--border-color);
|
||||
cursor: not-allowed;
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------
|
||||
FEATURES ROW
|
||||
-------------------------------------------------------------------------- */
|
||||
.features-section {
|
||||
background: var(--bg-card);
|
||||
border-top: 1px solid var(--border-color);
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
padding: 48px 24px;
|
||||
}
|
||||
|
||||
.features-wrap {
|
||||
max-width: 1280px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.features-title {
|
||||
text-align: center;
|
||||
font-size: 24px;
|
||||
font-weight: 800;
|
||||
margin-bottom: 36px;
|
||||
}
|
||||
|
||||
.features-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
|
||||
gap: 24px;
|
||||
}
|
||||
|
||||
.feature-box {
|
||||
padding: 24px;
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--bg-page);
|
||||
border: 1px solid var(--border-color);
|
||||
text-align: center;
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
.feature-box:hover {
|
||||
transform: translateY(-4px);
|
||||
border-color: var(--primary-border);
|
||||
}
|
||||
|
||||
.feature-icon {
|
||||
font-size: 32px;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
.feature-heading {
|
||||
font-size: 17px;
|
||||
font-weight: 700;
|
||||
color: var(--text-main);
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.feature-desc {
|
||||
font-size: 14px;
|
||||
color: var(--text-muted);
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------
|
||||
FOOTER
|
||||
-------------------------------------------------------------------------- */
|
||||
.home-footer {
|
||||
background: #0f172a;
|
||||
color: #94a3b8;
|
||||
padding: 36px 24px;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.footer-inner {
|
||||
max-width: 1000px;
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.footer-hotline {
|
||||
color: #38bdf8;
|
||||
font-weight: 600;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------
|
||||
FIRST-TIME VISITOR LANGUAGE MODAL
|
||||
Requirement:
|
||||
- Question must be in English
|
||||
- 3 options: Chinese, English, Persian
|
||||
- Modal pops up for first time visitors
|
||||
-------------------------------------------------------------------------- */
|
||||
.lang-modal-backdrop {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(15, 23, 42, 0.72);
|
||||
backdrop-filter: blur(8px);
|
||||
-webkit-backdrop-filter: blur(8px);
|
||||
z-index: 9999;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 20px;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
|
||||
.lang-modal-backdrop.open {
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.lang-modal-dialog {
|
||||
background: var(--bg-card);
|
||||
border-radius: var(--radius-lg);
|
||||
width: 100%;
|
||||
max-width: 520px;
|
||||
padding: 36px 32px;
|
||||
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
|
||||
border: 1px solid var(--border-color);
|
||||
text-align: center;
|
||||
transform: translateY(20px) scale(0.96);
|
||||
transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
|
||||
}
|
||||
|
||||
.lang-modal-backdrop.open .lang-modal-dialog {
|
||||
transform: translateY(0) scale(1);
|
||||
}
|
||||
|
||||
.lang-modal-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
background: var(--primary-light);
|
||||
color: var(--primary);
|
||||
padding: 6px 14px;
|
||||
border-radius: 999px;
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
margin-bottom: 16px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
|
||||
/* English question as strictly required by prompt */
|
||||
.lang-modal-question {
|
||||
font-size: 26px;
|
||||
font-weight: 800;
|
||||
color: var(--text-main);
|
||||
margin-bottom: 8px;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.lang-modal-subtext {
|
||||
font-size: 15px;
|
||||
color: var(--text-muted);
|
||||
margin-bottom: 28px;
|
||||
}
|
||||
|
||||
.lang-modal-options-grid {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 14px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.lang-choice-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 16px 20px;
|
||||
background: var(--bg-card-alt);
|
||||
border: 2px solid var(--border-color);
|
||||
border-radius: var(--radius-md);
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
font-family: inherit;
|
||||
}
|
||||
|
||||
.lang-choice-btn:hover {
|
||||
border-color: var(--primary);
|
||||
background: #ffffff;
|
||||
transform: translateY(-2px);
|
||||
box-shadow: var(--shadow-md);
|
||||
}
|
||||
|
||||
.lang-choice-btn.selected {
|
||||
border-color: var(--primary);
|
||||
background: var(--primary-light);
|
||||
}
|
||||
|
||||
.lang-choice-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
.lang-flag {
|
||||
font-size: 28px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.lang-names-col {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.lang-name-en {
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
color: var(--text-main);
|
||||
}
|
||||
|
||||
.lang-name-native {
|
||||
font-size: 13px;
|
||||
color: var(--text-muted);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.lang-choice-check {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
border-radius: 50%;
|
||||
border: 2px solid var(--border-color);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 12px;
|
||||
color: transparent;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.lang-choice-btn:hover .lang-choice-check,
|
||||
.lang-choice-btn.selected .lang-choice-check {
|
||||
border-color: var(--primary);
|
||||
background: var(--primary);
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.lang-modal-footer-note {
|
||||
font-size: 12px;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------
|
||||
RESPONSIVE DESIGN
|
||||
-------------------------------------------------------------------------- */
|
||||
@media (max-width: 768px) {
|
||||
.home-header {
|
||||
padding: 0 16px;
|
||||
height: 64px;
|
||||
}
|
||||
|
||||
.brand-title-main {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.hero-heading {
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.hero-description {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.vehicles-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.lang-modal-dialog {
|
||||
padding: 28px 20px;
|
||||
}
|
||||
|
||||
.lang-modal-question {
|
||||
font-size: 22px;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user