/* --- Global Styles & Variables --- */
:root {
    --primary-color: #0a2540;
    /* Dark Navy Blue */
    --secondary-color: #007bff;
    /* Bright Blue */
    --accent-color: #6772e5;
    /* Indigo */
    --text-color: #333;
    --light-gray: #f6f9fc;
    --white: #ffffff;
    --font-body: 'Noto Sans', 'Noto Sans SC', 'Noto Sans JP', sans-serif;
    --font-display: 'Roboto', sans-serif;
}

body {
    font-family: var(--font-body);
    margin: 0;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--white);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    color: var(--primary-color);
    font-weight: 700;
}

section {
    padding: 5rem 0;
}

/* --- Header --- */
.site-header {
    background: var(--white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex; /* 画像とテキストを横に並べる */
    align-items: center; /* 上下中央に揃える */
    gap: 0.75rem; /* 画像とテキストの間隔 */
}

/* 以下の新しいスタイルを追記 */
.logo img {
    height: 50px; /* ロゴの高さを指定 */
    width: auto;
}

.main-nav>ul {
    /* Changed from .main-nav ul */
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.main-nav ul li {
    margin-left: 2rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 700;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: var(--secondary-color);
}

/* --- Language Switcher --- */
.language-switcher {
    position: relative;
}

.language-menu-button {
    cursor: pointer;
    padding: 0.5rem;
    /* Add padding for easier clicking */
}

.language-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--white);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    list-style: none;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    min-width: 160px;
    z-index: 1001;
}

.language-switcher:hover .language-dropdown {
    display: block;
}

.language-dropdown li a {
    display: block;
    padding: 0.75rem 1rem;
    white-space: nowrap;
}

/* --- Hero Section --- */
.hero {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 6rem 0;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--white);
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    max-width: 650px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

.cta-button {
    background: var(--secondary-color);
    color: var(--white);
    padding: 1rem 2.5rem;
    text-decoration: none;
    font-weight: 700;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-block;
}

.cta-button:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

/* --- Section Styles --- */
.section-title {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 4rem;
}

.bg-light {
    background-color: var(--light-gray);
}

/* --- Product Section --- */
.product-card {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 2.5rem;
    align-items: center;
    background: var(--white);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
}

.product-icon {
    width: 150px;
    height: 150px;
    background-size: cover;
    background-position: center;
    border-radius: 25px;
}

.product-info h3 {
    margin-top: 0;
    font-size: 2rem;
}

.product-buttons {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    /* Allow buttons to wrap on smaller screens */
    gap: 1rem;
}

.product-buttons a {
    flex: 1;
    /* Make buttons equal width */
    padding: 0.75rem 1rem;
    /* Adjust padding for smaller text */
    text-decoration: none;
    font-weight: 700;
    border-radius: 5px;
    transition: all 0.3s ease;
    text-align: center;
}

.details-button {
    background-color: var(--light-gray);
    color: var(--primary-color);
}

.details-button:hover {
    background-color: #e2e6ea;
}

.download-button {
    background-color: #000;
    color: #fff;
    display: inline-flex;
    /* Use flexbox for alignment */
    align-items: center;
    /* Vertical centering */
    justify-content: center;
    /* Horizontal centering */
}

.download-button:hover {
    opacity: 0.8;
}

/* --- Sample Video Section (Updated) --- */
.video-section-description {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.video-comparison-wrapper {
    display: flex;
    flex-direction: column;
    /* Mobile-first: stack vertically */
    gap: 2rem;
}

.video-container {
    flex: 1;
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    text-align: center;
}

.video-container h3 {
    margin-top: 0;
    font-size: 1.5rem;
}

.video-container video {
    width: 100%;
    border-radius: 8px;
    margin-top: 1rem;
}

.download-actions {
    margin-top: 1.5rem;
}

.sample-download-button {
    background: #28a745;
    /* Green color for download */
    color: var(--white);
    padding: 0.8rem 2rem;
    text-decoration: none;
    font-weight: 700;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    display: inline-block;
}

.sample-download-button:hover {
    background-color: #218838;
}

.download-note {
    margin-top: 1rem;
    font-size: 0.9em;
    color: #6c757d;
}

/* --- Concept Section --- */
.concept-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.tech-image {
    display: block;
    width: 100%;
    max-width: 700px;
    height: auto; /* 高さを自動にすることでアスペクト比を維持 */
    margin: 2rem auto 0;
    border-radius: 8px;
}

/* --- New Dev Room Section --- */
.dev-room-description {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.social-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.social-link {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.social-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.social-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.social-text h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    color: var(--primary-color);
}

.social-text p {
    margin: 0;
    font-size: 0.95rem;
    color: #555;
}

/* --- Links Section (New) --- */
/* パートナーセクションの上下左右の余白を調整 */
#links .partner-section {
    padding: 0;
    margin: 0;
    border-bottom: none; /* フッターにあった下線を削除 */
}

/* メッセージ付きパートナーの背景と影を調整 */
#links .partner-promo {
    background-color: var(--white); /* 背景を白に変更 */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07); /* 他のカードと影を合わせる */
}

/* メッセージの文字色を濃くする */
#links .promo-text p {
    color: var(--text-color); /* 文字色を通常色に */
    opacity: 1; /* 透明度をなくす */
}

/* --- Footer --- */
.site-footer {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 3rem 0;
    /* Increased padding */
}

.site-footer p {
    margin: 0.5rem 0;
    opacity: 0.8;
}

.site-footer a {
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* New styles for the partner link */
.partner-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.partner-section h4 {
    font-family: var(--font-body);
    font-weight: normal;
    font-size: 1rem;
    color: var(--white);
    opacity: 0.8;
    margin-bottom: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.partner-link a {
    display: inline-block;
    transition: transform 0.3s ease;
}

.partner-link a:hover {
    transform: scale(1.05);
}

/* 上段：メッセージ付きパートナー */
.partner-promo {
    display: flex;
    flex-direction: row; /* PCでは横並び */
    align-items: center;
    gap: 1.5rem;
    background-color: rgba(255, 255, 255, 0.05); /* 背景を少し明るく */
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2.5rem; /* 下段との余白 */
}

.promo-logo {
    flex-shrink: 0; /* ロゴが縮まないように */
}

.promo-logo img {
    max-width: 150px; /* ロゴの最大幅を指定 */
    height: auto;
}

.promo-text p {
    margin: 0;
    font-size: 0.95rem;
    font-style: italic;
    line-height: 1.6;
    opacity: 0.9;
}

/* スマホ表示用の調整 */
@media (max-width: 768px) {
    .partner-promo {
        flex-direction: column; /* スマホでは縦並び */
        text-align: center;
    }
}

.partner-group-card {
    background-color: var(--white);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    padding: 2rem;
    border-radius: 8px;
    text-align: center; /* 中身を中央揃え */
    margin-top: 2rem; /* 上のカードとの余白 */
}

.partner-group-card h4 {
    color: var(--primary-color);
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 2rem; /* タイトルとロゴの間の余白 */
}

/* 既存のロゴスタイルを再利用 */
.partner-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.partner-item img {
    max-height: 40px;
    width: auto;
}

/* --- Animation --- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}


/* --- Responsive Design --- */
@media (min-width: 992px) {

    /* For Desktops */
    .video-comparison-wrapper {
        flex-direction: row;
        /* On desktop, show side-by-side */
        align-items: flex-start;
    }
}

@media (max-width: 768px) {

    /* For Mobiles */
    /* Hide all nav links EXCEPT for the language switcher */
    .main-nav>ul>li:not(.language-switcher) {
        display: none;
    }

    /* Reset margin for the language switcher on mobile */
    .main-nav ul li.language-switcher {
        margin-left: 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .product-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .product-icon {
        margin: 0 auto 1.5rem;
    }

    .product-buttons {
        justify-content: center;
    }
}