/* BYD CRM Website Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8fafc;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 8px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e40af;
    font-size: 1.2rem;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background-color 0.3s;
}

nav a:hover, nav a.active {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Main Content */
main {
    margin-top: 80px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #fff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.cta-button {
    background: #ef4444;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.3s;
    text-decoration: none;
    display: inline-block;
}

.cta-button:hover {
    background: #dc2626;
}

.demo-button {
    background: #1e40af;
    color: white;
    padding: 10px 25px;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    margin-top: 1rem;
    transition: background 0.3s;
}

.demo-button:hover {
    background: #1e3a8a;
}

/* Features Section */
.features {
    padding: 4rem 0;
    background: white;
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #1e40af;
    font-size: 2.5rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    background: #f8fafc;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #e2e8f0;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: #1e40af;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.feature-card h3 {
    color: #1e40af;
    margin-bottom: 1rem;
}

/* Demos Section */
.demos {
    padding: 4rem 0;
    background: #f1f5f9;
}

.demos h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #1e40af;
    font-size: 2.5rem;
}

.demo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.demo-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.demo-card:hover {
    transform: translateY(-5px);
}

.demo-card h3 {
    color: #1e40af;
    margin-bottom: 1rem;
}

/* Contact Form */
.contact-form {
    background: white;
    padding: 4rem 0;
}

.contact-form h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #1e40af;
    font-size: 2.5rem;
}

.form-container {
    max-width: 600px;
    margin: 0 auto;
    background: #f8fafc;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: #374151;
    font-weight: 500;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: inherit;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

textarea {
    height: 120px;
    resize: vertical;
}

.submit-btn {
    background: #1e40af;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s;
    font-family: inherit;
}

.submit-btn:hover {
    background: #1e3a8a;
}

.submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Messages */
.success-message {
    background: #10b981;
    color: white;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    display: none;
}

.error-message {
    background: #ef4444;
    color: white;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    display: none;
}

/* Footer */
footer {
    background: #1f2937;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #60a5fa;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    line-height: 1.8;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #60a5fa;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1rem;
    text-align: center;
    color: #9ca3af;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    nav ul {
        display: none;
    }
    
    .form-container {
        padding: 2rem;
        margin: 0 1rem;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .demo-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 0;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .features, .demos, .contact-form {
        padding: 2rem 0;
    }
    
    .form-container {
        padding: 1.5rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .logo-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* Animation for smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading state for buttons */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Hover effects for interactive elements */
.feature-card, .demo-card {
    cursor: default;
}

.demo-card:hover .demo-button {
    background: #1e3a8a;
}

/* Focus styles for accessibility */
button:focus, input:focus, select:focus, textarea:focus, a:focus {
    outline: 2px solid #1e40af;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    header, footer {
        display: none;
    }
    
    main {
        margin-top: 0;
    }
    
    .cta-button, .demo-button, .submit-btn {
        display: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .feature-card, .demo-card {
        border: 2px solid #000;
    }
    
    .hero {
        background: #000;
    }
    
    header {
        background: #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}