/* Global Styles */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-gray: #f5f6fa;
    --dark-gray: #2d3436;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
}

/* Navigation */
header {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary-color);
    margin-left: 2rem;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--secondary-color);
}

/* Add responsive navigation */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        padding: 1rem;
    }
    
    .nav-links {
        margin-top: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-links a {
        margin: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .logo {
        margin-bottom: 0.5rem;
    }
}

/* Main content spacing fix */
main {
    padding-top: 80px; /* Adjust based on header height */
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(44, 62, 80, 0.9), rgba(44, 62, 80, 0.9)), url('https://images.unsplash.com/photo-1486312338219-ce68d2c6f44d') center/cover;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 2rem 1rem;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1.5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

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

/* Buttons */
.cta-button {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #2980b9;
}

/* Services Section */
.services {
    padding: 5rem 1rem;
    background-color: var(--light-gray);
}

.services h2, .process h2, .pricing h2, .contact h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--primary-color);
}

.service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

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

.service-card i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.service-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: clamp(1.1rem, 2vw, 1.3rem);
}

.service-card p {
    color: var(--dark-gray);
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    line-height: 1.6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .service-cards {
        grid-template-columns: 1fr;
        padding: 0 0.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .services, .process, .pricing {
        padding: 3rem 1rem;
    }
}

/* Process Section */
.process {
    padding: 5rem 1rem;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.step {
    text-align: center;
    padding: 2rem;
}

.step-number {
    width: 50px;
    height: 50px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

/* Pricing Section */
.pricing {
    padding: 5rem 1rem;
    background-color: var(--light-gray);
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 2rem;
    padding: 0 1rem;
}

.pricing-card {
    background: white;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    height: 100%;
    display: block;
}

.pricing-card .card-content {
    padding: 2rem;
    border: 2px solid transparent;
    border-radius: 10px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.plan-radio {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.pricing-card:hover .card-content {
    border-color: var(--secondary-color);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.pricing-card .plan-radio:checked + .card-content {
    border-color: var(--secondary-color);
    background-color: rgba(52, 152, 219, 0.05);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.pricing-card.featured .card-content {
    background: linear-gradient(to bottom right, #ffffff, #f8f9fa);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.pricing-card.featured:hover .card-content {
    border-color: var(--secondary-color);
}

.pricing-card.featured .plan-radio:checked + .card-content {
    border-color: var(--secondary-color);
    background: linear-gradient(to bottom right, #ffffff, rgba(52, 152, 219, 0.05));
}

.pricing-card .selected-text {
    display: none;
    color: var(--secondary-color);
    font-weight: bold;
    margin-top: 1rem;
    text-align: center;
}

.pricing-card .plan-radio:checked + .card-content .selected-text {
    display: block;
}

.pricing-action {
    text-align: center;
    margin-top: 2rem;
}

.continue-button {
    font-size: 1.1rem;
    padding: 1rem 2rem;
    opacity: 0.7;
    cursor: not-allowed;
    transition: all 0.3s ease;
}

.continue-button:not([disabled]) {
    opacity: 1;
    cursor: pointer;
}

.pricing-card h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.price {
    font-size: 2.5rem;
    color: var(--primary-color);
    font-weight: bold;
    margin: 1rem 0;
}

.price .currency-en,
.price .currency-zh,
.price .currency-ja {
    font-size: 1.5rem;
    vertical-align: super;
}

.pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    flex-grow: 1;
}

.pricing-card li {
    padding: 0.5rem 0;
    color: var(--dark-gray);
    display: flex;
    align-items: center;
}

.pricing-card li:before {
    content: "✓";
    color: var(--secondary-color);
    margin-right: 0.5rem;
    font-weight: bold;
}

@media (max-width: 768px) {
    .pricing-cards {
        grid-template-columns: 1fr;
        padding: 0 0.5rem;
    }
    
    .pricing-card {
        margin-bottom: 1rem;
    }
    
    .price {
        font-size: 2rem;
    }
}

/* Contact Section */
.contact {
    padding: 5rem 1rem;
    background-color: white;
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--light-gray);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 1rem;
}

.form-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    color: var(--dark-gray);
    transition: all 0.3s ease;
    background-color: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-input::placeholder {
    color: #a0aec0;
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5rem;
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

.submit-button {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    margin-top: 1rem;
    background-color: var(--secondary-color);
    transition: all 0.3s ease;
}

.submit-button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .contact-container {
        padding: 1.5rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-input {
        padding: 0.7rem 0.9rem;
        font-size: 0.95rem;
    }
}

/* Loading state for submit button */
.submit-button.loading {
    position: relative;
    color: transparent;
}

.submit-button.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Language Switcher */
.language-switch {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

#languageSelect {
    border: none;
    background: transparent;
    font-size: 14px;
    cursor: pointer;
    padding-right: 16px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

#languageSelect:focus {
    outline: none;
}

/* Responsive Text Sizes for Different Languages */
[lang="ja"] {
    /* Slightly larger font size for Japanese characters */
    font-size: 16px;
    line-height: 1.6;
}

[lang="ja"] h1,
[lang="ja"] h2,
[lang="ja"] h3 {
    /* Adjust heading sizes for Japanese */
    line-height: 1.4;
}

/* Ensure sufficient space for Japanese characters in buttons */
[lang="ja"] .cta-button {
    padding: 12px 24px;
    min-width: 160px;
}

/* Language text visibility */
html[lang="en"] .lang-zh,
html[lang="zh"] .lang-en,
html[lang="ja"] .lang-en,
html[lang="ja"] .lang-zh {
    display: none;
}

html[lang="en"] .lang-en,
html[lang="zh"] .lang-zh,
html[lang="ja"] .lang-ja {
    display: inline;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 3rem 1rem 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section h4 {
    margin-bottom: 1rem;
}

.social-links a {
    color: white;
    margin-right: 1rem;
    font-size: 1.5rem;
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .pricing-card.featured {
        transform: none;
    }

    .language-switch {
        top: 10px;
        right: 10px;
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}
