/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0066cc;
    --secondary-color: #00a8e8;
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --success-color: #28a745;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    touch-action: none !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu-buttons {
    display: none !important;
}

.btn-mobile {
    display: none !important;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100% !important;
    left: 0;
    background-color: var(--white);
    box-shadow: var(--shadow-lg);
    min-width: 250px;
    list-style: none;
    padding: 0.5rem 0;
    border-radius: 4px;
    margin-top: 0;
    z-index: 1001;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: background-color 0.3s;
}

.dropdown-menu a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

/* Scrollable Dropdown Menu for Services */
.dropdown-menu-scrollable {
    max-height: 500px;
    overflow-y: scroll !important;
    min-width: 280px;
    scrollbar-width: auto;
    scrollbar-color: #888 #e0e0e0;
    scrollbar-gutter: stable;
}

/* Webkit scrollbar styling - always visible */
.dropdown-menu-scrollable::-webkit-scrollbar {
    width: 8px;
    background-color: #e0e0e0;
}

.dropdown-menu-scrollable::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 4px;
}

.dropdown-menu-scrollable::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
    min-height: 40px;
}

.dropdown-menu-scrollable::-webkit-scrollbar-thumb:hover {
    background: #666;
}


/* Multi-column Dropdown for Services */
.dropdown-menu-multi-column {
    min-width: 300px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    margin: 3px 0;
    transition: 0.3s;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #0052a3;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.nav-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
    order: 3;
}

.nav-buttons-mobile {
    display: none;
}

/* Language Selector */
.lang-selector {
    position: relative;
    margin-left: 10px;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Language Buttons */
.lang-btn {
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    background-color: var(--white);
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s;
    cursor: pointer;
    display: inline-block;
    min-width: 50px;
    text-align: center;
}

/* Language Buttons */
.lang-btn-jp {
    padding: 0.3rem 0.3rem;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    background-color: var(--white);
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s;
    cursor: pointer;
    display: inline-block;
    min-width: 50px;
    text-align: center;
}

.lang-btn:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.lang-btn-active {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 600;
}

.btn-quote2 {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-quote2:hover {
    background-color: #0091cc;
    transform: translateY(-2px);
}

.btn-quote {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-quote:hover {
    background-color: #0091cc;
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    background: transparent;
    color: var(--text-dark);
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.hero-content {
    background: transparent;
    padding-bottom: 7rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-image {
    width: calc(100% - 40px);
    max-width: 1200px;
    aspect-ratio: 16 / 9;
    margin: -5% auto 0 auto;
    overflow: hidden;
    position: relative;
    border-radius: 8px;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    display: block;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-buttons .btn {
    flex: 1;
    min-width: 150px;
    max-width: 150px;
    text-align: center;
}

/* Welcome Section */
.welcome {
    padding: 1rem 0 0 0;
}

.welcome h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.welcome p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

/* Features Grid */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.feature {
    text-align: center;
    padding: 1.5rem 1.5rem 0 1.5rem;
    background-color: var(--bg-light);
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.feature p {
    color: var(--text-light);
}

/* Hospital Image Banner */
.hospital-image-banner {
    width: 70%;
    margin: auto;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.hospital-image-banner img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 8px;
}

.hospital-image-inline {
    width: 100%;
    max-width: 600px;
    margin: 1.5rem auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.hospital-image-inline img {
    width: 100%;
    height: auto;
    display: block;
}

/* Section Styles */
.section {
    padding: 2rem 0 0 0;
}

.section h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.section-intro {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-light);
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

/* Accordion */
.accordion {
    max-width: 900px;
    margin: 2rem auto;
}

.accordion-item {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    background: none;
    border: none;
    padding: 1.5rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
}

.accordion-header:hover {
    background-color: var(--bg-light);
}

.accordion-header h3 {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin: 0;
}

.accordion-icon {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    transition: transform 0.3s;
}

.accordion-item.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-item.active .accordion-content {
    max-height: 1000px;
    transition: max-height 0.5s ease-in;
}

.accordion-content p {
    padding: 0 1.5rem 1.5rem;
    line-height: 1.8;
    color: var(--text-light);
}

.accordion-content ul {
    padding: 0 1.5rem 1.5rem 3rem;
    color: var(--text-light);
}

.accordion-content ul li {
    margin-bottom: 0.5rem;
}

.accordion-content strong {
    color: var(--primary-color);
}

/* Content Section (Expanded Accordion Style) */
.content-section {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
}

.content-section h3 {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.content-section p {
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.content-section ul {
    padding-left: 2rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.content-section ul li {
    margin-bottom: 0.5rem;
}

.content-section strong {
    color: var(--primary-color);
}

/* CTA Button Container */
.cta-button-container {
    text-align: center;
    padding: 0;
}

/* CTA Box */
.cta-box {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 3rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 3rem;
}

.cta-box h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-box p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

/* Contact Form */
.contact-container {
    max-width: 600px;
    margin: 2rem auto;
}

.contact-form {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group-center {
    text-align: center;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
}

.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
    background-color: var(--white);
    cursor: pointer;
}

.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Partner Note */
.partner-note {
    display: flex;
    align-items: flex-start;
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.note-star {
    margin-right: 4px;
    line-height: 1.9;
}

/* Form Description - Larger and Darker */
.form-description {
    font-size: 1.1rem;
    color: var(--text-dark);
    line-height: 1.8;
    text-align: center;
}

.form-note {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 1rem;
    text-align: center;
}

.contact-info {
    text-align: center;
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: var(--bg-light);
    border-radius: 8px;
}

.contact-info-text {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.contact-email {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.contact-email a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-email a:hover {
    color: var(--secondary-color);
}

/* Footer */
.footer {
    background-color: var(--text-dark);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-brand-link {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-brand-link:hover {
    color: var(--white);
}

.footer-section p {
    color: #ccc;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #555;
    color: #ccc;
}

/* Social Media Links */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    color: var(--white);
    font-size: 1.5rem;
    transition: color 0.3s, transform 0.3s;
    text-decoration: none;
}

.social-links a:hover {
    color: var(--secondary-color);
    transform: scale(1.1);
}

/* Footer Legal Links */
.footer-legal-links {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.footer-legal-links li {
    margin-bottom: 0.5rem;
}

.footer-legal-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-legal-links a:hover {
    color: var(--white);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        right: 0;
        width: 55%; /* Reduced from 70% - less space needed without long text */
        background-color: var(--white);
        box-shadow: var(--shadow-lg);
        padding: 1rem 0 0 0; /* Remove bottom padding - buttons have their own padding */
        gap: 0;
        overflow-x: hidden;
        overflow-y: auto;
        max-height: calc(100vh - 140px); /* More conservative for mobile browser UI (address bar, status bar) */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        overscroll-behavior: contain; /* Prevent scroll chaining to body */
        /* Custom scrollbar for navigation menu */
        scrollbar-width: thin; /* Firefox - thin scrollbar */
        scrollbar-color: rgba(0, 0, 0, 0.3) rgba(0, 0, 0, 0.1); /* Firefox */
    }

    /* Webkit scrollbar for navigation menu */
    .nav-menu::-webkit-scrollbar {
        width: 6px;
    }

    .nav-menu::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.05);
        border-radius: 3px;
    }

    .nav-menu::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.3);
        border-radius: 3px;
    }

    .nav-menu::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 0, 0, 0.5);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
        overflow: visible; /* Allow dropdown content to show */
    }

    .nav-menu li.dropdown {
        overflow: visible; /* Ensure dropdown menus are not clipped */
    }

    .nav-menu-buttons {
        width: 100%;
        gap: 0.5rem;
        padding: 1rem 20px 1.2rem 20px; /* Add extra bottom padding */
        margin-top: 0.5rem; /* Small top margin instead of auto */
        border-top: 1px solid var(--border-color);
        display: flex !important;
        flex-direction: column;
        flex-shrink: 0; /* Prevent shrinking */
        background-color: var(--white); /* Ensure buttons have background */
    }

    .btn-mobile {
        display: inline-block !important;
    }

    .nav-menu-buttons .btn-mobile {
        width: 100%;
        padding: 0.4rem 0.8rem;
        text-align: center;
        border-radius: 4px;
        background-color: var(--primary-color);
        color: var(--white);
        text-decoration: none;
        font-weight: 500;
        font-size: 0.9rem;
        transition: background-color 0.3s;
    }

    .nav-menu-buttons .btn-mobile:hover {
        background-color: var(--secondary-color);
    }

    .nav-menu a {
        display: block;
        padding: 1rem 15px; /* Reduced padding from 20px to 15px */
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        font-size: 0.95rem; /* Slightly smaller for better fit */
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        display: none;
        background-color: var(--bg-light);
        overflow-x: hidden;
    }

    .dropdown-menu a {
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
    }

    .dropdown.active .dropdown-menu {
        display: block;
        /* Smooth animation using max-height for better mobile performance */
        animation: dropdownFadeIn 0.2s ease-out;
    }

    @keyframes dropdownFadeIn {
        from {
            opacity: 0;
            transform: translateY(-5px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Add space at top to prevent accidental touch on first item */
    .dropdown-menu li:first-child a {
        margin-top: 8px;
    }

    /* Add space at bottom to ensure last item is fully visible */
    .dropdown-menu-scrollable li:last-child a {
        margin-bottom: 16px; /* Increased from 8px for better visibility */
    }

    /* Mobile specific styles for scrollable dropdown */
    .dropdown-menu-scrollable {
        max-height: 200px; /* Reduced to fit within smaller mobile viewport */
        overflow-y: scroll !important;
        overflow-x: hidden !important;
        overscroll-behavior: contain;
        position: relative;
        z-index: auto !important; /* Override .dropdown-menu z-index: 1001 to prevent hiding scroll-track */
        /* Hide native scrollbar on mobile - use custom scrollbar instead */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
        /* Prevent accidental clicks during scroll */
        touch-action: pan-y; /* Allow vertical scrolling only */
        padding-bottom: 10px; /* Extra padding at bottom for last item */
    }

    /* Hide webkit scrollbar on mobile - use custom scrollbar instead */
    .dropdown-menu-scrollable::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
    }

    /* Re-enable tap on links when not scrolling */
    .dropdown-menu-scrollable a {
        touch-action: manipulation; /* Allow tap on links */
    }

    /* Scroll wrapper for custom indicator */
    .scroll-wrapper {
        position: relative;
        /* Remove flex layout on mobile - not needed and causes sizing issues */
        overflow: visible; /* Ensure wrapper doesn't clip content */
        max-height: none; /* No height restriction */
    }

    /* No flex: 1 needed on mobile */

    /* Custom scroll indicator for mobile */
    .scroll-track {
        position: absolute;
        right: 2px;
        top: 0px; /* Start from top to match dropdown-menu-scrollable */
        bottom: 0px; /* End at bottom to match dropdown-menu-scrollable */
        width: 8px;
        background: rgba(0, 0, 0, 0.15);
        border-radius: 4px;
        pointer-events: none; /* Critical: prevents blocking clicks on menu items */
        z-index: 10; /* Higher z-index to appear above menu items */
        display: none; /* Hidden by default */
        visibility: hidden;
        opacity: 0;
        transition: opacity 0.2s ease;
    }

    .scroll-thumb {
        position: absolute;
        top: 0;
        width: 8px;
        background: #666;
        border-radius: 4px;
        min-height: 40px;
        pointer-events: none; /* Prevents blocking clicks */
    }

    /* Show scroll track ONLY when dropdown is active */
    .dropdown.active .scroll-track {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .dropdown.active .scroll-thumb {
        display: block !important;
        visibility: visible !important;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-right {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .nav-buttons {
        display: none;
    }

    .nav-buttons-mobile {
        display: flex;
        flex-direction: row;
        position: static;
        background-color: transparent;
        padding: 0;
        margin: 0;
        gap: 0.5rem;
        z-index: 999;
        border: none;
    }

    .btn-quote,
    .btn-quote2 {
        display: none;
    }

    .lang-selector {
        padding: 0;
        border: none;
        display: flex;
        align-items: center;
        width: auto;
        gap: 0.3rem;
        margin-left: 0;
    }

    .lang-btn {
        padding: 0.3rem 0.5rem;
        font-size: 0.8rem;
        min-width: 45px;
    }

    .hero-content {
        padding-bottom: 3rem;
    }

    .hero h1 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }

    .hero-buttons {
        flex-direction: row;
        justify-content: center;
        gap: 0.5rem;
    }

    .hero-buttons .btn {
        flex: 1;
        min-width: 0;
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }

    .hero-image {
        width: calc(100% - 20px);
        height: 50vh;
        max-height: 300px;
        margin: -3% auto 0 auto;
    }

    .section h2 {
        font-size: 1.75rem;
    }

    .welcome h2 {
        font-size: 1.6rem;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .feature h3 {
        font-size: 1.25rem;
    }

    /* Japanese Language - Smaller Font for Mobile */
    html[lang="ja"] .welcome h2 {
        font-size: 1.4rem;
    }

    html[lang="ja"] .welcome p {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    html[lang="ja"] .feature h3 {
        font-size: 1.1rem;
    }

    html[lang="ja"] .feature p {
        font-size: 0.9rem;
    }

    html[lang="ja"] .hero h1 {
        font-size: 1.7rem;
    }

    html[lang="ja"] .hero-subtitle {
        font-size: 1rem;
    }

    html[lang="ja"] .section h2 {
        font-size: 1.5rem;
    }

    html[lang="ja"] .section-intro {
        font-size: 0.95rem;
    }

    html[lang="ja"] .hero-buttons {
        gap: 0.3rem;
    }

    html[lang="ja"] .hero-buttons .btn {
        font-size: 0.75rem;
        padding: 0.6rem 0.3rem;
        white-space: nowrap;
    }

    /* Japanese Language - Nav Brand and Language Button for Mobile */
    html[lang="ja"] .nav-brand a {
        font-size: 0.9rem;
        white-space: nowrap;
    }

    html[lang="ja"] .lang-btn,
    html[lang="ja"] .lang-btn-jp {
        font-size: 0.7rem;
        padding: 0.25rem 0.4rem;
        white-space: nowrap;
        min-width: 40px;
    }
}

/* Japanese Language Navigation - Smaller Font */
html[lang="ja"] .nav-menu {
    gap: 1.2rem;
}

html[lang="ja"] .nav-menu a {
    font-size: 0.85rem;
}

html[lang="ja"] .nav-brand a {
    font-size: 1.1rem;
}

html[lang="ja"] .btn-quote,
html[lang="ja"] .btn-quote2 {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

html[lang="ja"] .btn-large {
    font-size: 0.95rem;
    padding: 0.9rem 1.8rem;
}

/* No Wrap for Brand Name */
.nowrap {
    white-space: nowrap;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Scroll Offset for Fixed Navbar */
section {
    scroll-margin-top: 80px;
}

/* Scroll Offset for Content Section Headings */
.content-section h2,
.content-section h3 {
    scroll-margin-top: 100px;
}

/* Scroll Buttons */
.scroll-btn {
    position: fixed;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
}

.scroll-btn.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-btn:hover {
    background-color: #0052a3;
    transform: scale(1.1);
}

.scroll-to-top {
    bottom: 95px;
}

.scroll-to-bottom {
    bottom: 30px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background-color: var(--white);
    margin: 20px;
    padding: 2rem;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-content h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
}

.modal-body {
    margin-bottom: 2rem;
}

.modal-body p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--text-dark);
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-buttons .btn {
    min-width: 100px;
    padding: 0.75rem 1.5rem;
}

@media (max-width: 768px) {
    .modal-content {
        margin: 10px;
        padding: 1.5rem;
        max-height: 85vh;
    }

    .modal-content h3 {
        font-size: 1.25rem;
    }

    .modal-buttons {
        flex-direction: column;
    }

    .modal-buttons .btn {
        width: 100%;
    }
}