<?php
/**
 * Nihongo Theme Functions
 * 
 * @package Nihongo
 * @version 1.0.0
 */

// Prevent direct access
if (!defined('ABSPATH')) {
    exit;
}

/**
 * Theme setup
 */
function nihongo_theme_setup() {
    // Add theme support for various features
    add_theme_support('title-tag');
    add_theme_support('post-thumbnails');
    add_theme_support('html5', array(
        'search-form',
        'comment-form',
        'comment-list',
        'gallery',
        'caption',
    ));
    add_theme_support('custom-logo');
    add_theme_support('customize-selective-refresh-widgets');
    
    // Add support for wide and full alignment
    add_theme_support('align-wide');
    
    // Add support for editor styles
    add_theme_support('editor-styles');
    add_editor_style('assets/css/editor-style.css');
    
    // Register navigation menus
    register_nav_menus(array(
        'primary' => __('Primary Menu', 'nihongo'),
        'footer' => __('Footer Menu', 'nihongo'),
    ));
    
    // Add image sizes
    add_image_size('course-thumbnail', 400, 300, true);
    add_image_size('testimonial-thumbnail', 300, 300, true);
    add_image_size('news-thumbnail', 600, 400, true);
    add_image_size('hero-image', 1920, 1080, true);
}
add_action('after_setup_theme', 'nihongo_theme_setup');

/**
 * Enqueue scripts and styles
 */
function nihongo_scripts() {
    $theme_version = '1.0.0';
    $template_dir = get_template_directory_uri();
    
    // ===== STYLES =====
    
    // Main theme stylesheet (required by WordPress)
    wp_enqueue_style('nihongo-style', get_stylesheet_uri(), array(), $theme_version);
    
    // Main CSS file
    wp_enqueue_style('nihongo-main-style', $template_dir . '/assets/css/style.css', array('nihongo-style'), $theme_version);
    
    // Google Fonts
    wp_enqueue_style('nihongo-fonts', 'https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+JP:wght@300;400;500;700;900&family=M+PLUS+Rounded+1c:wght@400;500;700;800&family=BIZ+UDGothic:wght@400;700&family=Noto+Serif+JP:wght@400;600;700;900&family=Hachi+Maru+Pop&display=swap', array(), null);
    
    // ===== SCRIPTS =====
    
    // Main JavaScript file
    wp_enqueue_script('nihongo-main-js', $template_dir . '/assets/js/main.js', array('jquery'), $theme_version, true);
    
    // Navigation JavaScript
    wp_enqueue_script('nihongo-navigation', $template_dir . '/assets/js/navigation.js', array('jquery'), $theme_version, true);
    
    // Localize script for AJAX and theme data
    wp_localize_script('nihongo-main-js', 'nihongo_ajax', array(
        'ajax_url' => admin_url('admin-ajax.php'),
        'nonce' => wp_create_nonce('nihongo_nonce'),
        'theme_url' => $template_dir,
        'current_lang' => nihongo_get_current_language(),
        'is_home' => is_front_page(),
        'is_courses' => is_page('courses') || is_post_type_archive('course'),
        'is_contact' => is_page('contact'),
        'is_j_bridge' => is_page('j-bridge'),
        'is_news' => is_page('news') || is_post_type_archive('news'),
        'is_voices' => is_page('voices') || is_post_type_archive('testimonial'),
    ));
    
    // ===== CONDITIONAL SCRIPTS =====
    
    // Hero slider script for home page
    if (is_front_page()) {
        wp_enqueue_script('nihongo-hero-slider', $template_dir . '/assets/js/hero-slider.js', array('jquery'), $theme_version, true);
    }
    
    // Contact form validation for contact page
    if (is_page('contact')) {
        wp_enqueue_script('nihongo-contact-form', $template_dir . '/assets/js/contact-form.js', array('jquery'), $theme_version, true);
    }
    
    // Course filtering for courses page
    if (is_page('courses') || is_post_type_archive('course')) {
        wp_enqueue_script('nihongo-course-filter', $template_dir . '/assets/js/course-filter.js', array('jquery'), $theme_version, true);
    }
    
    // Testimonial carousel for voices page
    if (is_page('voices') || is_post_type_archive('testimonial')) {
        wp_enqueue_script('nihongo-testimonial-carousel', $template_dir . '/assets/js/testimonial-carousel.js', array('jquery'), $theme_version, true);
    }
    
    // News carousel for news page
    if (is_page('news') || is_post_type_archive('news')) {
        wp_enqueue_script('nihongo-news-carousel', $template_dir . '/assets/js/news-carousel.js', array('jquery'), $theme_version, true);
    }
    
    // J-Bridge specific scripts
    if (is_page('j-bridge')) {
        wp_enqueue_script('nihongo-j-bridge', $template_dir . '/assets/js/j-bridge.js', array('jquery'), $theme_version, true);
    }
    
    // ===== WORDPRESS CORE SCRIPTS =====
    
    // Comment reply script
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    
    // ===== ADMIN SCRIPTS =====
    
    // Admin scripts for custom post types
    if (is_admin()) {
        wp_enqueue_script('nihongo-admin', $template_dir . '/assets/js/admin.js', array('jquery'), $theme_version, true);
        wp_enqueue_style('nihongo-admin-style', $template_dir . '/assets/css/admin.css', array(), $theme_version);
    }
}
add_action('wp_enqueue_scripts', 'nihongo_scripts');

/**
 * Enqueue admin scripts and styles
 */
function nihongo_admin_scripts($hook) {
    $theme_version = '1.0.0';
    $template_dir = get_template_directory_uri();
    
    // Admin styles
    wp_enqueue_style('nihongo-admin-style', $template_dir . '/assets/css/admin.css', array(), $theme_version);
    
    // Admin scripts
    wp_enqueue_script('nihongo-admin', $template_dir . '/assets/js/admin.js', array('jquery'), $theme_version, true);
    
    // Localize admin script
    wp_localize_script('nihongo-admin', 'nihongo_admin', array(
        'ajax_url' => admin_url('admin-ajax.php'),
        'nonce' => wp_create_nonce('nihongo_admin_nonce'),
        'theme_url' => $template_dir,
    ));
}
add_action('admin_enqueue_scripts', 'nihongo_admin_scripts');

/**
 * Add preload hints for critical resources
 */
function nihongo_preload_resources() {
    $template_dir = get_template_directory_uri();
    
    // Preload critical fonts
    echo '<link rel="preload" href="https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;900&display=swap" as="style" onload="this.onload=null;this.rel=\'stylesheet\'">';
    
    // Preload critical images for home page
    if (is_front_page()) {
        echo '<link rel="preload" href="' . $template_dir . '/assets/img/bg11.jpg" as="image">';
        echo '<link rel="preload" href="' . $template_dir . '/assets/img/logo.png" as="image">';
    }
}
add_action('wp_head', 'nihongo_preload_resources', 1);

/**
 * Add critical CSS inline for better performance
 */
function nihongo_critical_css() {
    if (is_front_page()) {
        ?>
        <style id="nihongo-critical-css">
        /* Critical CSS for above-the-fold content */
        .hero { min-height: 100vh; position: relative; }
        .hero-background { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
        .hero-content { position: relative; z-index: 2; }
        .header { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; }
        </style>
        <?php
    }
}
add_action('wp_head', 'nihongo_critical_css', 2);

/**
 * Optimize asset loading
 */
function nihongo_optimize_assets() {
    // Remove unnecessary WordPress assets
    if (!is_admin()) {
        wp_dequeue_style('wp-block-library');
        wp_dequeue_style('wp-block-library-theme');
        wp_dequeue_style('wc-block-style');
        wp_dequeue_style('global-styles');
    }
}
add_action('wp_enqueue_scripts', 'nihongo_optimize_assets', 100);

/**
 * Get asset version for cache busting
 */
function nihongo_get_asset_version($file_path) {
    $file_full_path = get_template_directory() . $file_path;
    
    if (file_exists($file_full_path)) {
        return filemtime($file_full_path);
    }
    
    return '1.0.0';
}

/**
 * Enqueue assets with automatic versioning
 */
function nihongo_enqueue_asset($type, $handle, $src, $deps = array(), $ver = null, $media = 'all') {
    $template_dir = get_template_directory_uri();
    $file_path = str_replace($template_dir, '', $src);
    
    if ($ver === null) {
        $ver = nihongo_get_asset_version($file_path);
    }
    
    if ($type === 'style') {
        wp_enqueue_style($handle, $src, $deps, $ver, $media);
    } elseif ($type === 'script') {
        wp_enqueue_script($handle, $src, $deps, $ver, true);
    }
}

/**
 * Add async/defer attributes to scripts
 */
function nihongo_add_script_attributes($tag, $handle, $src) {
    // Scripts to load with defer
    $defer_scripts = array(
        'nihongo-main-js',
        'nihongo-hero-slider',
        'nihongo-contact-form',
        'nihongo-course-filter',
        'nihongo-testimonial-carousel',
        'nihongo-news-carousel',
        'nihongo-j-bridge'
    );
    
    if (in_array($handle, $defer_scripts)) {
        return str_replace(' src', ' defer src', $tag);
    }
    
    return $tag;
}
add_filter('script_loader_tag', 'nihongo_add_script_attributes', 10, 3);

/**
 * Add loading="lazy" to images
 */
function nihongo_add_lazy_loading($content) {
    if (is_admin() || is_feed() || is_preview()) {
        return $content;
    }
    
    // Add lazy loading to images
    $content = preg_replace('/<img(.*?)src=/', '<img$1loading="lazy" src=', $content);
    
    return $content;
}
add_filter('the_content', 'nihongo_add_lazy_loading');
add_filter('post_thumbnail_html', 'nihongo_add_lazy_loading');

/**
 * Register widget areas
 */
function nihongo_widgets_init() {
    register_sidebar(array(
        'name'          => __('Sidebar', 'nihongo'),
        'id'            => 'sidebar-1',
        'description'   => __('Add widgets here.', 'nihongo'),
        'before_widget' => '<section id="%1$s" class="widget %2$s">',
        'after_widget'  => '</section>',
        'before_title'  => '<h2 class="widget-title">',
        'after_title'   => '</h2>',
    ));
    
    register_sidebar(array(
        'name'          => __('Footer Widgets', 'nihongo'),
        'id'            => 'footer-widgets',
        'description'   => __('Add widgets here to appear in footer.', 'nihongo'),
        'before_widget' => '<div id="%1$s" class="footer-widget %2$s">',
        'after_widget'  => '</div>',
        'before_title'  => '<h3 class="footer-widget-title">',
        'after_title'   => '</h3>',
    ));
}
add_action('widgets_init', 'nihongo_widgets_init');

/**
 * Custom Post Types
 */
function nihongo_register_post_types() {
    // Courses Post Type
    register_post_type('course', array(
        'labels' => array(
            'name' => __('Courses', 'nihongo'),
            'singular_name' => __('Course', 'nihongo'),
            'add_new' => __('Add New Course', 'nihongo'),
            'add_new_item' => __('Add New Course', 'nihongo'),
            'edit_item' => __('Edit Course', 'nihongo'),
            'new_item' => __('New Course', 'nihongo'),
            'view_item' => __('View Course', 'nihongo'),
            'search_items' => __('Search Courses', 'nihongo'),
            'not_found' => __('No courses found', 'nihongo'),
            'not_found_in_trash' => __('No courses found in trash', 'nihongo'),
        ),
        'public' => true,
        'has_archive' => true,
        'rewrite' => array('slug' => 'courses'),
        'supports' => array('title', 'editor', 'thumbnail', 'excerpt', 'custom-fields'),
        'menu_icon' => 'dashicons-book-alt',
        'show_in_rest' => true,
    ));
    
    // Testimonials Post Type
    register_post_type('testimonial', array(
        'labels' => array(
            'name' => __('Testimonials', 'nihongo'),
            'singular_name' => __('Testimonial', 'nihongo'),
            'add_new' => __('Add New Testimonial', 'nihongo'),
            'add_new_item' => __('Add New Testimonial', 'nihongo'),
            'edit_item' => __('Edit Testimonial', 'nihongo'),
            'new_item' => __('New Testimonial', 'nihongo'),
            'view_item' => __('View Testimonial', 'nihongo'),
            'search_items' => __('Search Testimonials', 'nihongo'),
            'not_found' => __('No testimonials found', 'nihongo'),
            'not_found_in_trash' => __('No testimonials found in trash', 'nihongo'),
        ),
        'public' => true,
        'has_archive' => true,
        'rewrite' => array('slug' => 'testimonials'),
        'supports' => array('title', 'editor', 'thumbnail', 'custom-fields'),
        'menu_icon' => 'dashicons-format-quote',
        'show_in_rest' => true,
    ));
    
    // News Post Type
    register_post_type('news', array(
        'labels' => array(
            'name' => __('News', 'nihongo'),
            'singular_name' => __('News Item', 'nihongo'),
            'add_new' => __('Add New News', 'nihongo'),
            'add_new_item' => __('Add New News', 'nihongo'),
            'edit_item' => __('Edit News', 'nihongo'),
            'new_item' => __('New News', 'nihongo'),
            'view_item' => __('View News', 'nihongo'),
            'search_items' => __('Search News', 'nihongo'),
            'not_found' => __('No news found', 'nihongo'),
            'not_found_in_trash' => __('No news found in trash', 'nihongo'),
        ),
        'public' => true,
        'has_archive' => true,
        'rewrite' => array('slug' => 'news'),
        'supports' => array('title', 'editor', 'thumbnail', 'excerpt', 'custom-fields'),
        'menu_icon' => 'dashicons-megaphone',
        'show_in_rest' => true,
    ));
}
add_action('init', 'nihongo_register_post_types');

/**
 * Custom Taxonomies
 */
function nihongo_register_taxonomies() {
    // Course Categories
    register_taxonomy('course_category', 'course', array(
        'labels' => array(
            'name' => __('Course Categories', 'nihongo'),
            'singular_name' => __('Course Category', 'nihongo'),
        ),
        'hierarchical' => true,
        'public' => true,
        'rewrite' => array('slug' => 'course-category'),
        'show_in_rest' => true,
    ));
    
    // Course Levels
    register_taxonomy('course_level', 'course', array(
        'labels' => array(
            'name' => __('Course Levels', 'nihongo'),
            'singular_name' => __('Course Level', 'nihongo'),
        ),
        'hierarchical' => true,
        'public' => true,
        'rewrite' => array('slug' => 'course-level'),
        'show_in_rest' => true,
    ));
}
add_action('init', 'nihongo_register_taxonomies');

/**
 * Custom Meta Boxes
 */
function nihongo_add_meta_boxes() {
    add_meta_box(
        'course_details',
        __('Course Details', 'nihongo'),
        'nihongo_course_details_callback',
        'course',
        'normal',
        'high'
    );
    
    add_meta_box(
        'testimonial_details',
        __('Testimonial Details', 'nihongo'),
        'nihongo_testimonial_details_callback',
        'testimonial',
        'normal',
        'high'
    );
}
add_action('add_meta_boxes', 'nihongo_add_meta_boxes');

/**
 * Course Details Meta Box Callback
 */
function nihongo_course_details_callback($post) {
    wp_nonce_field('nihongo_save_course_details', 'nihongo_course_details_nonce');
    
    $level = get_post_meta($post->ID, '_course_level', true);
    $duration = get_post_meta($post->ID, '_course_duration', true);
    $price = get_post_meta($post->ID, '_course_price', true);
    $features = get_post_meta($post->ID, '_course_features', true);
    
    echo '<table class="form-table">';
    echo '<tr><th><label for="course_level">' . __('Level', 'nihongo') . '</label></th>';
    echo '<td><input type="text" id="course_level" name="course_level" value="' . esc_attr($level) . '" /></td></tr>';
    
    echo '<tr><th><label for="course_duration">' . __('Duration', 'nihongo') . '</label></th>';
    echo '<td><input type="text" id="course_duration" name="course_duration" value="' . esc_attr($duration) . '" /></td></tr>';
    
    echo '<tr><th><label for="course_price">' . __('Price', 'nihongo') . '</label></th>';
    echo '<td><input type="text" id="course_price" name="course_price" value="' . esc_attr($price) . '" /></td></tr>';
    
    echo '<tr><th><label for="course_features">' . __('Features (one per line)', 'nihongo') . '</label></th>';
    echo '<td><textarea id="course_features" name="course_features" rows="5" cols="50">' . esc_textarea($features) . '</textarea></td></tr>';
    echo '</table>';
}

/**
 * Testimonial Details Meta Box Callback
 */
function nihongo_testimonial_details_callback($post) {
    wp_nonce_field('nihongo_save_testimonial_details', 'nihongo_testimonial_details_nonce');
    
    $name = get_post_meta($post->ID, '_testimonial_name', true);
    $country = get_post_meta($post->ID, '_testimonial_country', true);
    $course = get_post_meta($post->ID, '_testimonial_course', true);
    $rating = get_post_meta($post->ID, '_testimonial_rating', true);
    
    echo '<table class="form-table">';
    echo '<tr><th><label for="testimonial_name">' . __('Name', 'nihongo') . '</label></th>';
    echo '<td><input type="text" id="testimonial_name" name="testimonial_name" value="' . esc_attr($name) . '" /></td></tr>';
    
    echo '<tr><th><label for="testimonial_country">' . __('Country', 'nihongo') . '</label></th>';
    echo '<td><input type="text" id="testimonial_country" name="testimonial_country" value="' . esc_attr($country) . '" /></td></tr>';
    
    echo '<tr><th><label for="testimonial_course">' . __('Course', 'nihongo') . '</label></th>';
    echo '<td><input type="text" id="testimonial_course" name="testimonial_course" value="' . esc_attr($course) . '" /></td></tr>';
    
    echo '<tr><th><label for="testimonial_rating">' . __('Rating (1-5)', 'nihongo') . '</label></th>';
    echo '<td><input type="number" id="testimonial_rating" name="testimonial_rating" value="' . esc_attr($rating) . '" min="1" max="5" /></td></tr>';
    echo '</table>';
}

/**
 * Save Meta Box Data
 */
function nihongo_save_meta_boxes($post_id) {
    // Course details
    if (isset($_POST['nihongo_course_details_nonce']) && wp_verify_nonce($_POST['nihongo_course_details_nonce'], 'nihongo_save_course_details')) {
        if (isset($_POST['course_level'])) {
            update_post_meta($post_id, '_course_level', sanitize_text_field($_POST['course_level']));
        }
        if (isset($_POST['course_duration'])) {
            update_post_meta($post_id, '_course_duration', sanitize_text_field($_POST['course_duration']));
        }
        if (isset($_POST['course_price'])) {
            update_post_meta($post_id, '_course_price', sanitize_text_field($_POST['course_price']));
        }
        if (isset($_POST['course_features'])) {
            update_post_meta($post_id, '_course_features', sanitize_textarea_field($_POST['course_features']));
        }
    }
    
    // Testimonial details
    if (isset($_POST['nihongo_testimonial_details_nonce']) && wp_verify_nonce($_POST['nihongo_testimonial_details_nonce'], 'nihongo_save_testimonial_details')) {
        if (isset($_POST['testimonial_name'])) {
            update_post_meta($post_id, '_testimonial_name', sanitize_text_field($_POST['testimonial_name']));
        }
        if (isset($_POST['testimonial_country'])) {
            update_post_meta($post_id, '_testimonial_country', sanitize_text_field($_POST['testimonial_country']));
        }
        if (isset($_POST['testimonial_course'])) {
            update_post_meta($post_id, '_testimonial_course', sanitize_text_field($_POST['testimonial_course']));
        }
        if (isset($_POST['testimonial_rating'])) {
            update_post_meta($post_id, '_testimonial_rating', intval($_POST['testimonial_rating']));
        }
    }
}
add_action('save_post', 'nihongo_save_meta_boxes');

/**
 * Handle language switching
 */
function nihongo_handle_language_switch() {
    if (isset($_GET['lang'])) {
        $lang = $_GET['lang'];
        if (in_array($lang, ['jp', 'en'])) {
            nihongo_set_language($lang);
            // Redirect back to the same page without the lang parameter
            $redirect_url = strtok($_SERVER['REQUEST_URI'], '?');
            if (isset($_GET['id'])) {
                $redirect_url .= '?id=' . $_GET['id'];
            }
            wp_redirect($redirect_url);
            exit;
        }
    }
}
add_action('init', 'nihongo_handle_language_switch');

/**
 * Language Functions (WordPress compatible)
 */
function nihongo_get_current_language() {
    // Check if language is set in cookie
    if (isset($_COOKIE['nihongo_language'])) {
        return $_COOKIE['nihongo_language'];
    }
    
    // Check browser language preference
    if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
        $browser_lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
        if (in_array($browser_lang, ['en', 'ja'])) {
            $lang = ($browser_lang === 'ja') ? 'jp' : 'en';
            return $lang;
        }
    }
    
    // Default to Japanese
    return 'jp';
}

function nihongo_set_language($lang) {
    // Set cookie for 30 days
    setcookie('nihongo_language', $lang, time() + (30 * 24 * 60 * 60), '/');
    $_COOKIE['nihongo_language'] = $lang;
}

/**
 * Translation function
 */
function nihongo_translate($key, $default = '') {
    $lang = nihongo_get_current_language();
    $translations = nihongo_get_translations();
    
    if (isset($translations[$key][$lang])) {
        return $translations[$key][$lang];
    }
    
    return $default ?: $key;
}

/**
 * Get all translations
 */
// function nihongo_get_translations() {
//     return array(
//         // Page titles
//         'home_title' => array(
//             'jp' => 'nihongo.net - 日本語学習サービス',
//             'en' => 'nihongo.net - Japanese Learning Service'
//         ),
//         'courses_title' => array(
//             'jp' => 'コース紹介 - nihongo.net',
//             'en' => 'Course Introduction - nihongo.net'
//         ),
//         'j_bridge_title' => array(
//             'jp' => 'J-Bridge - 外国人材マッチング - nihongo.net',
//             'en' => 'J-Bridge - Foreign Talent Matching - nihongo.net'
//         ),
//         'contact_title' => array(
//             'jp' => 'お問い合わせ - nihongo.net',
//             'en' => 'Contact Us - nihongo.net'
//         ),
//         'news_title' => array(
//             'jp' => 'ニュース・ブログ - nihongo.net',
//             'en' => 'News & Blog - nihongo.net'
//         ),
//         'voices_title' => array(
//             'jp' => '受講生の声 - nihongo.net',
//             'en' => 'Student Voices - nihongo.net'
//         ),
        
//         // Navigation
//         'nav_home' => array(
//             'jp' => 'ホーム',
//             'en' => 'Home'
//         ),
//         'nav_courses' => array(
//             'jp' => 'コース',
//             'en' => 'Courses'
//         ),
//         'nav_j_bridge' => array(
//             'jp' => 'J-Bridge',
//             'en' => 'J-Bridge'
//         ),
//         'nav_contact' => array(
//             'jp' => 'お問い合わせ',
//             'en' => 'Contact'
//         ),
//         'nav_news' => array(
//             'jp' => 'ニュース',
//             'en' => 'News'
//         ),
//         'nav_voices' => array(
//             'jp' => '受講生の声',
//             'en' => 'Student Voices'
//         ),
        
//         // Hero sections
//         'hero_title' => array(
//             'jp' => '日本語で素晴らしいあなたを創る',
//             'en' => 'Create a wonderful you through Japanese'
//         ),
//         'hero_subtitle' => array(
//             'jp' => 'オンライン × 個別最適化 × 文化理解を通じて新しいあなたを創る日本語学習サービス',
//             'en' => 'A Japanese learning service that creates a new you through online × individual optimization × cultural understanding'
//         ),
//         'apply_counseling' => array(
//             'jp' => 'カウンセリング申込',
//             'en' => 'Apply for Counseling'
//         ),
//         'free_counseling' => array(
//             'jp' => '無料カウンセリング',
//             'en' => 'Free Counseling'
//         ),
        
//         // About section
//         'about_title' => array(
//             'jp' => 'nihongo.netとは？',
//             'en' => 'What is nihongo.net?'
//         ),
//         'about_description' => array(
//             'jp' => '創刊以来40年の実績を持つひらがなタイムズのコンテンツを使用し、個別最適化された指導で日本語学習をサポートします。文化理解を含む包括的な学習を通じて、あなたの日本語力を次のレベルへと導きます。',
//             'en' => 'We support Japanese language learning through individually optimized instruction using content from Hiragana Times, which has a 40-year track record since its founding. Through comprehensive learning that includes cultural understanding, we guide your Japanese language skills to the next level.'
//         ),
        
//         // Features
//         'features_title' => array(
//             'jp' => '私たちの日本語コースの特徴',
//             'en' => 'Features of Our Japanese Courses'
//         ),
//         'features_subtitle' => array(
//             'jp' => '安心、楽しさ、知識の拡大を重視する学習環境',
//             'en' => 'A learning environment that values safety, enjoyment, and expanding knowledge'
//         ),
//          // Feature panels
//          'feature_1_title' => [
//             'jp' => '① 40年の伝統があなたの味方！',
//             'en' => '① 40 Years of Tradition on Your Side!'
//         ],
//         'feature_1_text' => [
//             'jp' => '私たちの教材の基盤は「ひらがなタイムズ」です。創刊以来40年の信頼と豊富な記事があなたの日本語力を後押しします。歴史ある雑誌が今、あなたの教科書に変身します！',
//             'en' => 'The foundation of our materials is "Hiragana Times." 40 years of trust since its founding and abundant articles will boost your Japanese language skills. A magazine with history now transforms into your textbook!'
//         ],
//         'feature_2_title' => [
//             'jp' => '② あなただけのオーダーメイドクラス',
//             'en' => '② Your Exclusive, Custom-Made Classes'
//         ],
//         'feature_2_text' => [
//             'jp' => '「大人数クラスで取り残される心配はありません...」少人数クラス＆カスタムサポートで、まるでパーソナルトレーナーがいるような感覚です。あなたの弱点と強みをすべて明確に見ることができます。',
//             'en' => 'No worries about "getting lost in large classes..." Small class sizes & custom support mean it\'s like having a personal trainer. We can see all your weaknesses and strengths clearly.'
//         ],
//         'feature_3_title' => [
//             'jp' => '③ 日本語だけでなく「日本での生活スキル」も教えます',
//             'en' => '③ Not Just Japanese, "Japanese Living Skills" Also Taught'
//         ],
//         'feature_3_text' => [
//             'jp' => 'もちろん敬語の使い方も教えますが、「どこで靴を脱ぐの？」「飲み会の暗黙のルールって？」など文化的な習慣も教えます。この知識があれば、あなたに有利な内緒のコツがいくつか手に入ります！',
//             'en' => 'Of course, we teach keigo usage, but also "Where do you take off your shoes?" "What are the unspoken rules of drinking parties?" and other cultural customs. With this knowledge, you\'ll have some insider tips that give you an advantage!'
//         ],
//         'feature_4_title' => [
//             'jp' => '④ 学習の先にはキャリアの機会が待っています',
//             'en' => '④ Beyond Learning Lies Career Opportunities'
//         ],
//         'feature_4_text' => [
//             'jp' => '「日本語を学んで終わり」ではありません。J-Bridgeとの連携により、あなたの学習は次のステップ＝働く機会につながります。まさに「学習は未来を開くチケット」です！',
//             'en' => 'It\'s not just "learn Japanese and that\'s it." Through collaboration with J-Bridge, your learning leads to the next step = working opportunities. Truly "learning is the ticket that opens your future"!'
//         ],
        
//         // Feature panel alt texts
//         'feature_1_alt' => [
//             'jp' => 'グローバル人材発掘',
//             'en' => 'Global talent discovery'
//         ],
//         'feature_2_alt' => [
//             'jp' => 'オンデマンド人材獲得',
//             'en' => 'On-demand talent acquisition'
//         ],
//         'feature_3_alt' => [
//             'jp' => '日本語研修',
//             'en' => 'Japanese language training'
//         ],
//         'feature_4_alt' => [
//             'jp' => '日本語研修',
//             'en' => 'Japanese language training'
//         ],
        
//         // Hero and learning column image alt texts
//         'hero_image_alt' => [
//             'jp' => '日本語学習の学生たち',
//             'en' => 'Japanese learning students'
//         ],
//         'learning_column_1_alt' => [
//             'jp' => '日本語講師と学習者',
//             'en' => 'Japanese instructor and learner'
//         ],
//         'learning_column_2_alt' => [
//             'jp' => 'カフェでの日本語学習',
//             'en' => 'Japanese learning at cafe'
//         ],
//         'learning_column_3_alt' => [
//             'jp' => '日本の文化 夏祭り',
//             'en' => 'Japanese culture summer festival'
//         ],
//         'learning_column_4_alt' => [
//             'jp' => 'ひらがなタイムズを読む学習者',
//             'en' => 'Learner reading Hiragana Times'
//         ],
//         'learning_column_5_alt' => [
//             'jp' => '多国籍学習者のグループ写真',
//             'en' => 'Group photo of multinational learners'
//         ],
//          // News section
//          'news_title' => [
//             'jp' => 'ニュース・ブログ',
//             'en' => 'News & Blog'
//         ],
//         'news_subtitle' => [
//             'jp' => '最新の情報と学習コラムをお届けします',
//             'en' => 'Latest information and learning columns'
//         ],
        
//         // Testimonials
//         'testimonials_title' => [
//             'jp' => '受講生の声',
//             'en' => 'Student Voices'
//         ],
//         'testimonials_subtitle' => [
//             'jp' => '実際の受講生の体験談',
//             'en' => 'Experiences from actual students'
//         ],
//         'view_all_voices' => [
//             'jp' => 'すべての声を見る',
//             'en' => 'View All Voices'
//         ],
        
//         // CTA sections
//         'ready_start_title' => [
//             'jp' => '今すぐ始めませんか？',
//             'en' => 'Ready to Start Now?'
//         ],
//         'ready_start_subtitle' => [
//             'jp' => 'あなたに最適な学習プランをご提案する無料カウンセリング',
//             'en' => 'Free counseling to recommend the best learning plan for you'
//         ],
//         'view_courses' => [
//             'jp' => 'コースを見る',
//             'en' => 'View Courses'
//         ],
        
//         // Footer
//         'footer_description' => array(
//             'jp' => 'オンライン × 個別最適化 × 文化理解を通じて新しいあなたを創る日本語学習サービス',
//             'en' => 'A Japanese learning service that creates a new you through online × individual optimization × cultural understanding'
//         ),
//         'operated_by' => array(
//             'jp' => '運営：ひらがなタイムズ株式会社',
//             'en' => 'Operated by: Hiragana Times Co., Ltd.'
//         ),
//         'site_map' => array(
//             'jp' => 'サイトマップ',
//             'en' => 'Site Map'
//         ),
//         'services' => array(
//             'jp' => 'サービス',
//             'en' => 'Services'
//         ),
//         'sns' => array(
//             'jp' => 'SNS',
//             'en' => 'SNS'
//         ),
//         'copyright' => array(
//             'jp' => '© 2025 ひらがなタイムズ / nihongo.net All rights reserved.',
//             'en' => '© 2025 Hiragana Times / nihongo.net All rights reserved.'
//         ),
        
//         // Navigation and Links
//         'view_all_courses' => array(
//             'jp' => 'すべてのコースを見る',
//             'en' => 'View All Courses'
//         ),
//         'view_all_testimonials' => array(
//             'jp' => 'すべての受講生の声を見る',
//             'en' => 'View All Testimonials'
//         ),
//         'view_all_news' => array(
//             'jp' => 'すべてのニュースを見る',
//             'en' => 'View All News'
//         ),
//         'start_your_journey' => array(
//             'jp' => 'あなたの旅を始める',
//             'en' => 'Start Your Journey'
//         ),
//         'subscribe_newsletter' => array(
//             'jp' => 'ニュースレターを購読',
//             'en' => 'Subscribe Newsletter'
//         ),
//         'share_on_twitter' => array(
//             'jp' => 'Twitterでシェア',
//             'en' => 'Share on Twitter'
//         ),
//         'share_on_facebook' => array(
//             'jp' => 'Facebookでシェア',
//             'en' => 'Share on Facebook'
//         ),
//         'share_on_linkedin' => array(
//             'jp' => 'LinkedInでシェア',
//             'en' => 'Share on LinkedIn'
//         ),
//         'share_on_whatsapp' => array(
//             'jp' => 'WhatsAppでシェア',
//             'en' => 'Share on WhatsApp'
//         ),
        
//         // Contact form
//         'contact_title' => array(
//             'jp' => 'お問い合わせ',
//             'en' => 'Contact Us'
//         ),
//         'contact_subtitle' => array(
//             'jp' => 'ご質問やお問い合わせがございましたら、お気軽にお問い合わせください',
//             'en' => 'Feel free to contact us with any questions or inquiries'
//         ),
//         'get_in_touch' => array(
//             'jp' => 'お問い合わせ',
//             'en' => 'Get in Touch'
//         ),
//         'contact_description' => array(
//             'jp' => 'お客様からのお声をお待ちしております。メッセージを送信していただければ、できるだけ早くご返信いたします。',
//             'en' => 'We\'d love to hear from you. Send us a message and we\'ll respond as soon as possible.'
//         ),
//         'full_name' => array(
//             'jp' => '氏名',
//             'en' => 'Full Name'
//         ),
//         'email_address' => array(
//             'jp' => 'メールアドレス',
//             'en' => 'Email Address'
//         ),
//         'phone_number' => array(
//             'jp' => '電話番号（任意）',
//             'en' => 'Phone Number (Optional)'
//         ),
//         'inquiry_type' => array(
//             'jp' => 'お問い合わせ種別',
//             'en' => 'Inquiry Type'
//         ),
//         'subject' => array(
//             'jp' => '件名（任意）',
//             'en' => 'Subject (Optional)'
//         ),
//         'message' => array(
//             'jp' => 'メッセージ',
//             'en' => 'Message'
//         ),
//         'send_message' => array(
//             'jp' => 'メッセージを送信',
//             'en' => 'Send Message'
//         ),
        
//         // Common
//         'learn_more' => array(
//             'jp' => '詳しく見る',
//             'en' => 'Learn More'
//         ),
//         'view_details' => array(
//             'jp' => '詳細を見る',
//             'en' => 'View Details'
//         ),
//         'read_more' => array(
//             'jp' => '続きを読む',
//             'en' => 'Read More'
//         ),
        
//         // Logo alt text
//         'logo_alt' => array(
//             'jp' => 'nihongo',
//             'en' => 'nihongo'
//         ),
        
//         // Header content
//         'open_menu' => array(
//             'jp' => 'メニューを開く',
//             'en' => 'Open menu'
//         ),
        
//         // Footer content
//         'postal_code' => array(
//             'jp' => '郵便番号',
//             'en' => 'Postal Code'
//         ),
//         'postal_code_value' => array(
//             'jp' => '151-0062, 渋谷区, 東京',
//             'en' => '151-0062, Shibuya-ku, Tokyo'
//         ),
//         'telephone' => array(
//             'jp' => '電話',
//             'en' => 'TEL'
//         ),
//         'telephone_value' => array(
//             'jp' => '4010001160053',
//             'en' => '4010001160053'
//         ),
//     );
// }
function nihongo_get_translations() {
    return [
        // Page titles
        'home_title' => [
            'jp' => 'nihongo.net - 日本語学習サービス',
            'en' => 'nihongo.net - Japanese Learning Service'
        ],
        'courses_title' => [
            'jp' => 'コース紹介 - nihongo.net',
            'en' => 'Course Introduction - nihongo.net'
        ],
        'j_bridge_title' => [
            'jp' => 'J-Bridge - 外国人材マッチング - nihongo.net',
            'en' => 'J-Bridge - Foreign Talent Matching - nihongo.net'
        ],
        'contact_title' => [
            'jp' => 'お問い合わせ - nihongo.net',
            'en' => 'Contact Us - nihongo.net'
        ],
        'news_title' => [
            'jp' => 'ニュース・ブログ - nihongo.net',
            'en' => 'News & Blog - nihongo.net'
        ],
        'voices_title' => [
            'jp' => '受講生の声 - nihongo.net',
            'en' => 'Student Voices - nihongo.net'
        ],
        
        // Navigation
        'nav_home' => [
            'jp' => 'ホーム',
            'en' => 'Home'
        ],
        'nav_courses' => [
            'jp' => 'コース',
            'en' => 'Courses'
        ],
        'nav_j_bridge' => [
            'jp' => 'J-Bridge',
            'en' => 'J-Bridge'
        ],
        'nav_contact' => [
            'jp' => 'お問い合わせ',
            'en' => 'Contact'
        ],
        
        // Hero sections
        'hero_title' => [
            'jp' => '日本語で素晴らしいあなたを創る',
            'en' => 'Create a wonderful you through Japanese'
        ],
        'hero_subtitle' => [
            'jp' => 'オンライン × 個別最適化 × 文化理解を通じて新しいあなたを創る日本語学習サービス',
            'en' => 'A Japanese learning service that creates a new you through online × individual optimization × cultural understanding'
        ],
        'apply_counseling' => [
            'jp' => 'カウンセリング申込',
            'en' => 'Apply for Counseling'
        ],
        'free_counseling' => [
            'jp' => '無料カウンセリング',
            'en' => 'Free Counseling'
        ],
        
        // About section
        'about_title' => [
            'jp' => 'nihongo.netとは？',
            'en' => 'What is nihongo.net?'
        ],
        'about_description' => [
            'jp' => '創刊以来40年の実績を持つひらがなタイムズのコンテンツを使用し、個別最適化された指導で日本語学習をサポートします。文化理解を含む包括的な学習を通じて、あなたの日本語力を次のレベルへと導きます。',
            'en' => 'We support Japanese language learning through individually optimized instruction using content from Hiragana Times, which has a 40-year track record since its founding. Through comprehensive learning that includes cultural understanding, we guide your Japanese language skills to the next level.'
        ],
        
        // Features
        'features_title' => [
            'jp' => '私たちの日本語コースの特徴',
            'en' => 'Features of Our Japanese Courses'
        ],
        'features_subtitle' => [
            'jp' => '安心、楽しさ、知識の拡大を重視する学習環境',
            'en' => 'A learning environment that values safety, enjoyment, and expanding knowledge'
        ],
        
        // Feature panels
        'feature_1_title' => [
            'jp' => '① 40年の伝統があなたの味方！',
            'en' => '① 40 Years of Tradition on Your Side!'
        ],
        'feature_1_text' => [
            'jp' => '私たちの教材の基盤は「ひらがなタイムズ」です。創刊以来40年の信頼と豊富な記事があなたの日本語力を後押しします。歴史ある雑誌が今、あなたの教科書に変身します！',
            'en' => 'The foundation of our materials is "Hiragana Times." 40 years of trust since its founding and abundant articles will boost your Japanese language skills. A magazine with history now transforms into your textbook!'
        ],
        'feature_2_title' => [
            'jp' => '② あなただけのオーダーメイドクラス',
            'en' => '② Your Exclusive, Custom-Made Classes'
        ],
        'feature_2_text' => [
            'jp' => '「大人数クラスで取り残される心配はありません...」少人数クラス＆カスタムサポートで、まるでパーソナルトレーナーがいるような感覚です。あなたの弱点と強みをすべて明確に見ることができます。',
            'en' => 'No worries about "getting lost in large classes..." Small class sizes & custom support mean it\'s like having a personal trainer. We can see all your weaknesses and strengths clearly.'
        ],
        'feature_3_title' => [
            'jp' => '③ 日本語だけでなく「日本での生活スキル」も教えます',
            'en' => '③ Not Just Japanese, "Japanese Living Skills" Also Taught'
        ],
        'feature_3_text' => [
            'jp' => 'もちろん敬語の使い方も教えますが、「どこで靴を脱ぐの？」「飲み会の暗黙のルールって？」など文化的な習慣も教えます。この知識があれば、あなたに有利な内緒のコツがいくつか手に入ります！',
            'en' => 'Of course, we teach keigo usage, but also "Where do you take off your shoes?" "What are the unspoken rules of drinking parties?" and other cultural customs. With this knowledge, you\'ll have some insider tips that give you an advantage!'
        ],
        'feature_4_title' => [
            'jp' => '④ 学習の先にはキャリアの機会が待っています',
            'en' => '④ Beyond Learning Lies Career Opportunities'
        ],
        'feature_4_text' => [
            'jp' => '「日本語を学んで終わり」ではありません。J-Bridgeとの連携により、あなたの学習は次のステップ＝働く機会につながります。まさに「学習は未来を開くチケット」です！',
            'en' => 'It\'s not just "learn Japanese and that\'s it." Through collaboration with J-Bridge, your learning leads to the next step = working opportunities. Truly "learning is the ticket that opens your future"!'
        ],
        
        // Feature panel alt texts
        'feature_1_alt' => [
            'jp' => 'グローバル人材発掘',
            'en' => 'Global talent discovery'
        ],
        'feature_2_alt' => [
            'jp' => 'オンデマンド人材獲得',
            'en' => 'On-demand talent acquisition'
        ],
        'feature_3_alt' => [
            'jp' => '日本語研修',
            'en' => 'Japanese language training'
        ],
        'feature_4_alt' => [
            'jp' => '日本語研修',
            'en' => 'Japanese language training'
        ],
        
        // Hero and learning column image alt texts
        'hero_image_alt' => [
            'jp' => '日本語学習の学生たち',
            'en' => 'Japanese learning students'
        ],
        'learning_column_1_alt' => [
            'jp' => '日本語講師と学習者',
            'en' => 'Japanese instructor and learner'
        ],
        'learning_column_2_alt' => [
            'jp' => 'カフェでの日本語学習',
            'en' => 'Japanese learning at cafe'
        ],
        'learning_column_3_alt' => [
            'jp' => '日本の文化 夏祭り',
            'en' => 'Japanese culture summer festival'
        ],
        'learning_column_4_alt' => [
            'jp' => 'ひらがなタイムズを読む学習者',
            'en' => 'Learner reading Hiragana Times'
        ],
        'learning_column_5_alt' => [
            'jp' => '多国籍学習者のグループ写真',
            'en' => 'Group photo of multinational learners'
        ],
        
        // News section
        'news_title' => [
            'jp' => 'ニュース・ブログ',
            'en' => 'News & Blog'
        ],
        'news_subtitle' => [
            'jp' => '最新の情報と学習コラムをお届けします',
            'en' => 'Latest information and learning columns'
        ],
        
        // Testimonials
        'testimonials_title' => [
            'jp' => '受講生の声',
            'en' => 'Student Voices'
        ],
        'testimonials_subtitle' => [
            'jp' => '実際の受講生の体験談',
            'en' => 'Experiences from actual students'
        ],
        'view_all_voices' => [
            'jp' => 'すべての声を見る',
            'en' => 'View All Voices'
        ],
        
        // CTA sections
        'ready_start_title' => [
            'jp' => '今すぐ始めませんか？',
            'en' => 'Ready to Start Now?'
        ],
        'ready_start_subtitle' => [
            'jp' => 'あなたに最適な学習プランをご提案する無料カウンセリング',
            'en' => 'Free counseling to recommend the best learning plan for you'
        ],
        'view_courses' => [
            'jp' => 'コースを見る',
            'en' => 'View Courses'
        ],
        
        // Footer
        'footer_description' => [
            'jp' => 'オンライン × 個別最適化 × 文化理解を通じて新しいあなたを創る日本語学習サービス',
            'en' => 'A Japanese learning service that creates a new you through online × individual optimization × cultural understanding'
        ],
        'operated_by' => [
            'jp' => '運営：ひらがなタイムズ株式会社',
            'en' => 'Operated by: Hiragana Times Co., Ltd.'
        ],
        'site_map' => [
            'jp' => 'サイトマップ',
            'en' => 'Site Map'
        ],
        'services' => [
            'jp' => 'サービス',
            'en' => 'Services'
        ],
        'sns' => [
            'jp' => 'SNS',
            'en' => 'SNS'
        ],
        'copyright' => [
            'jp' => '© 2025 ひらがなタイムズ / nihongo.net All rights reserved.',
            'en' => '© 2025 Hiragana Times / nihongo.net All rights reserved.'
        ],
        
        // Contact form
        'contact_title' => [
            'jp' => 'お問い合わせ',
            'en' => 'Contact Us'
        ],
        'contact_subtitle' => [
            'jp' => 'ご質問やお問い合わせがございましたら、お気軽にお問い合わせください',
            'en' => 'Feel free to contact us with any questions or inquiries'
        ],
        'get_in_touch' => [
            'jp' => 'お問い合わせ',
            'en' => 'Get in Touch'
        ],
        'contact_description' => [
            'jp' => 'お客様からのお声をお待ちしております。メッセージを送信していただければ、できるだけ早くご返信いたします。',
            'en' => 'We\'d love to hear from you. Send us a message and we\'ll respond as soon as possible.'
        ],
        'full_name' => [
            'jp' => '氏名',
            'en' => 'Full Name'
        ],
        'email_address' => [
            'jp' => 'メールアドレス',
            'en' => 'Email Address'
        ],
        'phone_number' => [
            'jp' => '電話番号（任意）',
            'en' => 'Phone Number (Optional)'
        ],
        'inquiry_type' => [
            'jp' => 'お問い合わせ種別',
            'en' => 'Inquiry Type'
        ],
        'subject' => [
            'jp' => '件名（任意）',
            'en' => 'Subject (Optional)'
        ],
        'message' => [
            'jp' => 'メッセージ',
            'en' => 'Message'
        ],
        'send_message' => [
            'jp' => 'メッセージを送信',
            'en' => 'Send Message'
        ],
        'select_inquiry_type' => [
            'jp' => 'お問い合わせ種別を選択',
            'en' => 'Select Inquiry Type'
        ],
        'about_courses' => [
            'jp' => 'コースについて',
            'en' => 'About Courses'
        ],
        'j_bridge_companies' => [
            'jp' => 'J-Bridge（企業様）',
            'en' => 'J-Bridge (Companies)'
        ],
        'j_bridge_jobseekers' => [
            'jp' => 'J-Bridge（求職者様）',
            'en' => 'J-Bridge (Job Seekers)'
        ],
        'about_pricing' => [
            'jp' => '料金について',
            'en' => 'About Pricing'
        ],
        'other' => [
            'jp' => 'その他',
            'en' => 'Other'
        ],
        
        // Courses
        'level_beginner' => [
            'jp' => '初級',
            'en' => 'Beginner'
        ],
        'level_intermediate' => [
            'jp' => '中級',
            'en' => 'Intermediate'
        ],
        'level_upper_intermediate' => [
            'jp' => '中上級',
            'en' => 'Upper Intermediate'
        ],
        'level_advanced' => [
            'jp' => '上級',
            'en' => 'Advanced'
        ],
        'level_all' => [
            'jp' => '全レベル',
            'en' => 'All Levels'
        ],
        'duration_3m' => [
            'jp' => '3か月',
            'en' => '3 months'
        ],
        'duration_6m' => [
            'jp' => '6か月',
            'en' => '6 months'
        ],
        'duration_12m' => [
            'jp' => '12か月',
            'en' => '12 months'
        ],
        'duration_3_12m' => [
            'jp' => '3〜12か月',
            'en' => '3-12 months'
        ],
        
        // Course list item titles
        'course_list_title' => [
            'jp' => 'コース一覧',
            'en' => 'Course List'
        ],
        'course_list_subtitle' => [
            'jp' => 'あなたに最適なコースを選択してください',
            'en' => 'Choose the course that\'s perfect for you'
        ],
        
        // Course list descriptions
        'course_gateway_foundation_desc' => [
            'jp' => '日本語の基礎をしっかり学ぶためのコース',
            'en' => 'Course to learn the basics of Japanese'
        ],
        'course_news_review_desc' => [
            'jp' => '最新ニュースを通して日本語を学ぶコース',
            'en' => 'Learn Japanese through current news'
        ],
        'course_pros_cons_desc' => [
            'jp' => 'ディベートで日本語表現を身につけるコース',
            'en' => 'Acquire Japanese expressions through discussions'
        ],
        'course_job_in_japan_desc' => [
            'jp' => 'ビジネス日本語と就職活動を支援するコース',
            'en' => 'Business Japanese and job hunting'
        ],
        'course_diplomat_desc' => [
            'jp' => '外交・政治分野の専門日本語を学ぶコース',
            'en' => 'Specialized Japanese for diplomacy and politics'
        ],
        'course_jlpt_desc' => [
            'jp' => '日本語能力試験（JLPT）対策コース',
            'en' => 'Japanese Language Proficiency Test preparation'
        ],
        'enroll_now' => [
            'jp' => '今すぐ申込',
            'en' => 'Enroll Now'
        ],
        'back_to_courses' => [
            'jp' => '← すべてのコースに戻る',
            'en' => '← Back to All Courses'
        ],
        
        // J-Bridge
        'j_bridge_hero_title' => [
            'jp' => 'J-Bridgeを通じて外国人材と日本企業を繋ぐ',
            'en' => 'Connecting Foreign Talent with Japanese Companies through'
        ],
        'j_bridge_hero_subtitle' => [
            'jp' => 'グローバル人材と日本企業の架け橋',
            'en' => 'A Bridge Between Global Talent and Japanese Companies'
        ],
        'for_companies' => [
            'jp' => '企業様向け',
            'en' => 'For Companies'
        ],
        'for_jobseekers' => [
            'jp' => '求職者向け',
            'en' => 'For Job Seekers'
        ],
        'what_is_j_bridge' => [
            'jp' => 'J-Bridgeとは？',
            'en' => 'What is J-Bridge?'
        ],
        'j_bridge_description' => [
            'jp' => '日本語と文化を学んだ外国人学習者と企業を繋ぐ新しいマッチングプラットフォームです。学習者は自信を持ってスキルを活用でき、企業は即戦力となる人材を見つけることができます。',
            'en' => 'A new matching platform that connects foreign learners who have studied Japanese language and culture with companies. Learners can confidently utilize their skills, while companies can find ready-to-work talent.'
        ],
        
        // News
        'newsletter_title' => [
            'jp' => 'ニュースレター登録',
            'en' => 'Newsletter Registration'
        ],
        'newsletter_subtitle' => [
            'jp' => '最新のニュースと学習コラムをメールでお送りします',
            'en' => 'We\'ll send you the latest news and learning columns by email'
        ],
        'enter_email' => [
            'jp' => 'メールアドレスを入力',
            'en' => 'Enter your email address'
        ],
        'register' => [
            'jp' => '登録',
            'en' => 'Register'
        ],
        
        // Common
        'learn_more' => [
            'jp' => '詳しく見る',
            'en' => 'Learn More'
        ],
        'view_details' => [
            'jp' => '詳細を見る',
            'en' => 'View Details'
        ],
        'read_more' => [
            'jp' => '続きを読む',
            'en' => 'Read More'
        ],
        
        // Additional translations for better coverage
        'view_lesson_details' => [
            'jp' => 'レッスン詳細を見る',
            'en' => 'View Lesson Details'
        ],
        'about_j_bridge' => [
            'jp' => 'J-Bridgeについて',
            'en' => 'About J-Bridge'
        ],
        'free_counseling' => [
            'jp' => '無料カウンセリング',
            'en' => 'Free Counseling'
        ],
        
        // News flow cards content
        'event_information' => [
            'jp' => 'イベント情報',
            'en' => 'Event Information'
        ],
        'event_information_text' => [
            'jp' => '「次のイベントは何？」—日本語講師が笑顔でホワイトボードにスケジュールを書き、外国人学生が興味深そうにメモを取ります。ワークショップや特別クラスに参加して、日本語力とコミュニケーション能力を向上させましょう！',
            'en' => '"What\'s the next event?" — Japanese instructors write schedules on whiteboards with smiles, while foreign students take notes with great interest. Participate in workshops and special classes to boost your Japanese skills and communication abilities!'
        ],
        'class_cancellation_notice' => [
            'jp' => '休講のお知らせ',
            'en' => 'Class Cancellation Notice'
        ],
        'class_cancellation_text' => [
            'jp' => '急な休講でも事前に分かれば安心です。留学生はスマートフォンで情報を確認し「今日は自由時間！」と喜び、肩を落としてがっかりする学生もいます。',
            'en' => 'Even when classes are suddenly cancelled, knowing in advance brings peace of mind. International students check information on their smartphones and rejoice "Today is free time!" while some students look disappointed with slumped shoulders.'
        ],
        'new_course_information' => [
            'jp' => '新コース情報',
            'en' => 'New Course Information'
        ],
        'new_course_text' => [
            'jp' => '「もっと会話の練習がしたい！」そんな声から生まれた新コース。日本語講師と少人数グループが輪を作り、笑顔で会話の練習をします。新しい学習があなたの未来を広げます。',
            'en' => 'A new course born from such voices as "I want to practice more conversation!" Japanese instructors and small groups form circles, practicing conversation with smiles. New learning expands your future.'
        ],
        'course_application_deadline' => [
            'jp' => 'コース申込締切',
            'en' => 'Course Application Deadline'
        ],
        'course_application_text' => [
            'jp' => '締切を逃さないで！外国人学生は真剣な表情で申込書を記入します。日本語スタッフ（女性）が優しくサポートします。',
            'en' => 'Don\'t miss the deadline! Foreign students fill out application forms with serious expressions. Japanese staff (female) gently support them from the side.'
        ],
        'instructor_change_info' => [
            'jp' => '講師変更・代講情報',
            'en' => 'Instructor Change & Substitute Information'
        ],
        'instructor_change_text' => [
            'jp' => '「今日は先生が違う！」—代講の日本語男性講師が黒板に自己紹介を書きます。学生は少し驚きますが、新しい学習にワクワクします。',
            'en' => '"Today we have a different teacher!" — A substitute Japanese male instructor writes his self-introduction on the blackboard. Students are a bit surprised but excited about new learning.'
        ],
        'special_event_guide' => [
            'jp' => '特別イベント案内',
            'en' => 'Special Event Guide'
        ],
        'special_event_text' => [
            'jp' => '浴衣を着て盆踊りを体験、和菓子作りに挑戦！日本語女性スタッフが着付けを手伝い、外国人女性は鏡を見て笑顔になります。学習を超えた本物の文化体験が待っています。',
            'en' => 'Experience yukata and bon dance, try making Japanese sweets! Japanese female staff help with dressing, and foreign women smile as they look in the mirror. Beyond learning, real cultural experiences await.'
        ],
        'online_seminar_info' => [
            'jp' => 'オンラインセミナー情報',
            'en' => 'Online Seminar Information'
        ],
        'online_seminar_text' => [
            'jp' => '日本語講師がコンピューター画面を通じて説明し、海外の外国人女性が笑顔で参加します。「どこからでも学べる！」と実感する瞬間です。',
            'en' => 'Japanese instructors explain through computer screens, while foreign women from overseas attend with smiles. This is the moment you realize "You can learn from anywhere!"'
        ],
        'campaign_discount_info' => [
            'jp' => 'キャンペーン・割引情報',
            'en' => 'Campaign & Discount Information'
        ],
        'campaign_discount_text' => [
            'jp' => '「今がお得です！」日本語女性スタッフがポスターを指さします。外国人学生は驚きと喜びの表情を見せます。期間限定のお得な情報をお見逃しなく！',
            'en' => '"It\'s a good deal now!" Japanese female staff point to posters. Foreign students show expressions of surprise and joy. Don\'t miss the limited-time deals!'
        ],
        'facility_maintenance_info' => [
            'jp' => '施設メンテナンス情報',
            'en' => 'Facility Maintenance Information'
        ],
        'facility_maintenance_text' => [
            'jp' => '教室を快適に保つためのメンテナンスが行われています。日本語男性スタッフが工具を運び、外国人学生（女性）が「ありがとうございます！」とお辞儀をします。',
            'en' => 'Maintenance is being carried out to keep classrooms comfortable. Japanese male staff carry tools while foreign students (female) bow and say "Thank you very much!"'
        ],
        'emergency_contact_notices' => [
            'jp' => '緊急連絡・重要なお知らせ',
            'en' => 'Emergency Contact & Important Notices'
        ],
        'emergency_contact_text' => [
            'jp' => '台風などの自然災害やシステムトラブル時、日本語スタッフが真剣な表情で説明します。外国人女性は安心してうなずきます。',
            'en' => 'During natural disasters like typhoons or system troubles, Japanese staff explain with serious expressions. Foreign women nod reassuringly.'
        ],
        'student_survey_recruitment' => [
            'jp' => '学生アンケート・募集',
            'en' => 'Student Survey & Recruitment'
        ],
        'student_survey_text' => [
            'jp' => '外国人女性がクラスについての感想を書きます。「先生のレッスンが分かりやすい！」と嬉しそうに言います。日本語女性スタッフが集めながら「次回に活かします！」と笑顔で応答します。',
            'en' => 'Foreign women write their thoughts about classes. "The teacher\'s lessons are easy to understand!" they say happily. Japanese female staff collect them while responding with smiles, "We\'ll use this for next time!"'
        ],
        'media_coverage_info' => [
            'jp' => 'メディア掲載情報',
            'en' => 'Media Coverage Information'
        ],
        'media_coverage_text' => [
            'jp' => '新聞や雑誌に掲載され、日本語講師と外国人学生が記事を一緒に見て興奮します。「これが私たちの学校です！」と笑顔で言います。',
            'en' => 'Featured in newspapers and magazines, Japanese instructors and foreign students look at articles together and get excited. "This is our school!" they say with smiles.'
        ],
        
        // Learning columns content
        'learning_column_1_title' => [
            'jp' => '読むだけで「日本語脳」が育つ学習コラム',
            'en' => 'Learning Columns That Develop Your "Japanese Brain" Just by Reading'
        ],
        'learning_column_1_text' => [
            'jp' => '教科書だけの日本語学習って、ちょっと退屈に感じることありませんか？<br/>このコラムでは、日常会話のコツから文化ストーリーまで、週1回楽しい記事を更新しています。<br/>「へー、そうなんだ！」と思う瞬間が、自然と記憶に残る最高の学習タイミングです。<br/>忙しい日でも、3分で読める軽い内容なので続けやすいです。<br/>1つの記事から気軽に読んでみてください。',
            'en' => 'Don\'t you sometimes feel that studying Japanese with just textbooks is a bit boring?<br/>In this column, we update enjoyable articles weekly, from daily conversation tips to cultural stories.<br/>The moment you think "Oh really?" is the perfect learning timing that naturally stays in your memory.<br/>Even on busy days, it\'s easy to continue with light content that takes only 3 minutes to read.<br/>Start with one article and read it casually.'
        ],
        'learning_column_2_title' => [
            'jp' => '3分で分かる！日本語のコツ',
            'en' => 'Understand in 3 Minutes! Japanese Language Tips'
        ],
        'learning_column_2_text' => [
            'jp' => '「いただきます」と「ごちそうさま」の違いを正しく説明できますか？<br/>このTipsコーナーが、そんな小さな疑問をすっきり解決します。<br/>会話ですぐ使えるフレーズを紹介するので、学習効果も抜群です。<br/>「日本語らしい表現」をマスターすると、相手の笑顔が増える嬉しいポイントです。<br/>短い記事で、日本語力が自然と大きく向上します。',
            'en' => 'Can you correctly explain the difference between "itadakimasu" and "gochisousama"?<br/>This Tips corner clearly solves such small questions.<br/>We introduce phrases you can use immediately in conversation, so the study effect is excellent.<br/>When you master "Japanese-like expressions," it\'s a happy point that the other person\'s smiles increase.<br/>With short articles, your Japanese skills improve naturally and significantly.'
        ],
        'learning_column_3_title' => [
            'jp' => '文化を理解すると、言語がもっと楽しい',
            'en' => 'Understanding Culture Makes Language More Fun'
        ],
        'learning_column_3_text' => [
            'jp' => '日本語は言語だけでなく、文化と一緒に学ぶと理解が深まります。<br/>例えば「お疲れ様です」という表現には、日本の働き方や人間関係の文化が背景にあります。<br/>このコラムでは、マナーや季節の行事、生活習慣を優しく解説します。<br/>知識として面白いだけでなく、会話のきっかけになる情報も満載です。<br/>読むたびに、少しずつ「日本の心」が分かるようになります。',
            'en' => 'Japanese is not just about language; understanding deepens when you learn it together with culture.<br/>For example, the expression "otsukaresama desu" has Japanese work style and human relationship culture as its background.<br/>This column gently explains manners, seasonal events, and lifestyle habits.<br/>It\'s not just interesting as knowledge, but also packed with information that can be conversation starters.<br/>Each time you read, you\'ll gradually understand "Japanese feelings."'
        ],
        'learning_column_4_title' => [
            'jp' => 'ひらがなタイムズ × 学習コラム',
            'en' => 'Hiragana Times × Learning Columns'
        ],
        'learning_column_4_text' => [
            'jp' => '40年間発行されている信頼のひらがなタイムズの記事を、日本語学習者向けに読みやすく再編集しています。<br/>「ニュース + 日本語学習」を同時に体験できる、ちょっと贅沢な読み物です。<br/>記事には語彙や文法の解説も含まれているので、実用的なスキルも完璧です。<br/>最新の日本語ニュースを学びながら、日本語表現も更新できるのが特徴です。<br/>「情報を得ながら学ぶ」新しいスタイルをぜひ体験してください。',
            'en' => 'We have re-edited articles from the trusted Hiragana Times, which has been published for 40 years, to be easily readable for Japanese language learners.<br/>It\'s a slightly luxurious reading material where you can experience "News + Japanese Learning" simultaneously.<br/>Articles include vocabulary and grammar explanations, so practical skills are also perfect.<br/>The feature is that you can learn the latest Japanese news while updating Japanese expressions.<br/>Please experience the new style of "learning while gaining information."'
        ],
        'learning_column_5_title' => [
            'jp' => '今日の小さな学習が明日の大きな自信に',
            'en' => 'Today\'s Small Learning Becomes Tomorrow\'s Big Confidence'
        ],
        'learning_column_5_text' => [
            'jp' => '日本語は一度に全部覚えるよりも、毎日少しずつ積み重ねるのが一番です。<br/>このコラムは「1つの記事で成長できる」というコンセプトです。<br/>短時間で学んだことが、次の日の会話で役立ったら素晴らしいですよね？<br/>あなたの日本語生活を少しずつサポートするパートナーになりたいと思います。<br/>さあ、このコラムから次の一歩を踏み出しましょう。',
            'en' => 'Japanese is best learned by building up little by little every day rather than memorizing everything at once.<br/>This column is based on the concept that "you can grow with just one article."<br/>Wouldn\'t it be great if what you learned in a short time was useful in the next day\'s conversation?<br/>I hope to be a partner that supports your Japanese life little by little.<br/>Now, let\'s take the next step starting from this column.'
        ],
        
        // Video interview content
        'emily_from_america' => [
            'jp' => 'エミリー（アメリカ出身）',
            'en' => 'Emily (from America)'
        ],
        'qa_challenge_before_enrolling' => [
            'jp' => 'Q. 入学前に感じていた課題は？',
            'en' => 'Q. What challenges did you feel before enrolling?'
        ],
        'qa_challenge_answer' => [
            'jp' => '「旅行で少し話せればいいかなと思って始めましたが、レッスンが楽しくて、毎回成長を感じられます。」',
            'en' => '"I started thinking I just wanted to speak a little for travel, but the lessons are so fun and I can feel my growth every time."'
        ],
        'qa_good_about_course' => [
            'jp' => 'Q. 実際に受講して良かったことは？',
            'en' => 'Q. What was good about actually taking the course?'
        ],
        'qa_good_answer' => [
            'jp' => '「先生がとても親切で、間違えても気にせず質問できます。実用的な表現をたくさん学べて、すぐに使えます。」',
            'en' => '"The teacher is very kind and I can ask questions without worrying about making mistakes. I learned many practical expressions and can use them immediately."'
        ],
        'qa_message_for_considering' => [
            'jp' => 'Q. 日本語学習を検討している方へのメッセージ',
            'en' => 'Q. A word for those considering Japanese learning'
        ],
        'qa_message_answer' => [
            'jp' => '「最初は不安でしたが、先生と楽しく学べるので、ぜひ挑戦してみてください。毎回のレッスンが楽しみです。」',
            'en' => '"I was anxious at first, but you can learn happily with the teacher, so please give it a try. I look forward to every lesson."'
        ],
        
        // Carousel content translations
        'carousel_title_1' => [
            'jp' => '日本旅行がもっと楽しくなりました！',
            'en' => 'My Japan trip became much more enjoyable!'
        ],
        'carousel_description_1' => [
            'jp' => 'エミリー（アメリカ） - ゲートウェイ・ファンデーション',
            'en' => 'Emily (America) - Gateway Foundation'
        ],
        'carousel_comment_1' => [
            'jp' => '「基本的な会話を丁寧に教えてくれたので、東京旅行中に実際に日本語を使うことができました。お店のスタッフと日本語でコミュニケーションできたのは素晴らしかったです！次はJLPTに挑戦したいと思います。」',
            'en' => '"They taught me basic conversation politely, so I could actually use Japanese during my Tokyo trip. Being able to communicate with shop staff in Japanese was amazing! Next, I want to challenge the JLPT."'
        ],
        'carousel_title_2' => [
            'jp' => '仕事で日本語が役立ちます',
            'en' => 'Japanese useful for work'
        ],
        'carousel_description_2' => [
            'jp' => 'ジェームズ（オーストラリア） - ビジネス日本語',
            'en' => 'James (Australia) - Business Japanese'
        ],
        'carousel_comment_2' => [
            'jp' => '「日本のビジネスパートナーとメール交換する機会が増えたので、ビジネス日本語を学ぶために入学しました。すぐに使える実用的な表現がたくさんあります。先生が親切で、間違えても気にせず質問できるのも魅力です。」',
            'en' => '"I had more opportunities to exchange emails with Japanese business partners, so I enrolled to learn business Japanese. There are many practical expressions that are immediately useful. The teacher is kind, and I can ask questions with confidence, which is also appealing."'
        ],
        'carousel_title_3' => [
            'jp' => '日本文化への理解が深まりました',
            'en' => 'Deepened my understanding of Japanese culture'
        ],
        'carousel_description_3' => [
            'jp' => 'アユ（インドネシア） - ニュース・レビュー',
            'en' => 'Ayu (Indonesia) - News Review'
        ],
        'carousel_comment_3' => [
            'jp' => '「クラスでは言語だけでなく、日本の文化やマナーも学ぶのでとても面白いです。アニメや音楽の話題も出てくるので、勉強時間があっという間に過ぎます。」',
            'en' => '"In class, we learn not just language but also Japanese culture and manners, which is very interesting. Topics about anime and music also come up, so study time flies by."'
        ],
        'carousel_title_4' => [
            'jp' => '文法が分かりやすくなりました',
            'en' => 'Grammar became clear'
        ],
        'carousel_description_4' => [
            'jp' => 'ルイ（フランス） - ゲートウェイ・ファンデーション',
            'en' => 'Louis (France) - Gateway Foundation'
        ],
        'carousel_comment_4' => [
            'jp' => '「独学で文法を勉強するのは難しくて諦めかけていましたが、先生が分かりやすい例で説明してくれて理解が深まりました。徐々に日本語の新聞も読めるようになり、学習の成果を感じています。」',
            'en' => '"Self-study grammar was difficult and I was about to give up, but the teacher explained with clear examples and my understanding deepened. I can gradually read Japanese newspapers and feel the results of my learning."'
        ],
        'carousel_title_5' => [
            'jp' => '友達との会話がスムーズになりました！',
            'en' => 'Conversations with friends became smooth!'
        ],
        'carousel_description_5' => [
            'jp' => 'スジン（韓国） - ゲートウェイ・ファンデーション',
            'en' => 'Soo-jin (Korea) - Gateway Foundation'
        ],
        'carousel_comment_5' => [
            'jp' => '「日本人の友達がたくさんいますが、今までは英語でしか話せませんでした。クラスを受講してから、自然に日常会話ができるようになり、より深い関係を築けるようになりました。」',
            'en' => '"I have many Japanese friends, but until now I could only speak in English. Since taking classes, I can naturally have daily conversations and build deeper relationships."'
        ],
        'carousel_title_6' => [
            'jp' => '先生が明るくて学習が楽しいです！',
            'en' => 'The teacher is bright and learning is fun!'
        ],
        'carousel_description_6' => [
            'jp' => 'カルロス（ブラジル） - ニュース・レビュー',
            'en' => 'Carlos (Brazil) - News Review'
        ],
        'carousel_comment_6' => [
            'jp' => '「クラスはいつも明るい雰囲気で、間違えても笑って励ましてくれるので、安心して学習できます。スポーツの話題も日本語で話せるようになり、モチベーションが続いています。」',
            'en' => '"Classes always have a bright atmosphere, and even when I make mistakes, they laugh and encourage me, so I can learn comfortably. I can also discuss sports topics in Japanese, and my motivation continues."'
        ],
        
        // Course features content
        'online_learning_focus_title' => [
            'jp' => 'オンライン学習重視',
            'en' => 'Online Learning Focus'
        ],
        'online_learning_focus_subtitle' => [
            'jp' => 'オフラインオプションも希望者には利用可能',
            'en' => 'Offline options available for those who prefer them'
        ],
        'online_learning_focus_description' => [
            'jp' => '私たちのコースは、世界中のどこからでも受講できるオンラインレッスンが中心です。インターネット接続があれば、カフェや自宅があなたの教室になります。ライフスタイルに合わせて学習を続けられます—「今日は自宅、次はオフィスで。」日本に滞在している方や対面学習を希望する方には、一部オフラインクラスも利用可能です。柔軟性と利便性を兼ね備えた学習環境で、日本語を自然に習得できます。',
            'en' => 'Our courses are primarily online lessons that can be taken from anywhere in the world. With just an internet connection, cafes or homes become your classroom. You can continue learning according to your lifestyle - "today at home, next time at the office." For those staying in Japan or preferring face-to-face learning, some offline classes are available. With a learning environment that combines flexibility and convenience, you can acquire Japanese naturally.'
        ],
        'level_based_support_title' => [
            'jp' => '初級から上級までレベル別サポート',
            'en' => 'Level-Based Support from Beginner to Advanced'
        ],
        'level_based_support_subtitle' => [
            'jp' => 'あなたのレベルに最適化されたカリキュラム',
            'en' => 'Curriculum optimized for your level'
        ],
        'level_based_support_description' => [
            'jp' => '初めて日本語を学ぶ方から最高レベルのJLPTを目指す方まで、レベルに適したカリキュラムを提供します。初級者は「ひらがな・カタカナ」から始まり、スムーズな日常会話まで進歩します。中級者はニュース記事を使用して、現在の表現と自然なフレーズを習得します。上級者は、ビジネスや外交の場で適用できる日本語力を徹底的に開発します。あなたに最適なレベルから始められるので、自信を持って学習できます。',
            'en' => 'We provide level-appropriate curricula for everyone from first-time Japanese learners to those aiming for the highest JLPT level. Beginners start with "Hiragana and Katakana" and progress to smooth daily conversation. Intermediate learners use news articles to acquire current expressions and natural phrases. Advanced learners thoroughly develop Japanese language skills applicable in business and diplomatic settings. You can start at the optimal level for you, so you can feel confident.'
        ],
        'hiragana_times_materials_title' => [
            'jp' => 'ひらがなタイムズ教材で知的探究心を刺激',
            'en' => 'Stimulating Intellectual Curiosity with Hiragana Times Materials'
        ],
        'hiragana_times_materials_subtitle' => [
            'jp' => '本物の日本文化で学習',
            'en' => 'Learning with real Japanese culture'
        ],
        'hiragana_times_materials_description' => [
            'jp' => '日本語学習者向けに最適化された「ひらがなタイムズ」教材を使用します。実際の日本文化や社会を取り上げているため、単語を暗記するだけでなく、言語学習と一緒に本物の知識を吸収できます。「日本の四季」「食文化」「最新トレンド」に関する記事で学習が楽しくなります。読解力の向上を超えて、このコンテンツは会話の話題としても役立つので、すぐに使える日本語力を身につけます。知的に刺激的なコンテンツで、毎回の学習が楽しみになります。',
            'en' => 'We use "Hiragana Times" materials optimized for Japanese language learners. Since they feature actual Japanese culture and society, you can absorb real knowledge along with language learning, not just memorize words. Articles about "Japan\'s Four Seasons," "Food Culture," and "Latest Trends" make learning enjoyable. Beyond improving reading comprehension, this content is useful for conversation topics, so you develop Japanese skills you can use immediately. The intellectually stimulating content will make you look forward to each learning session.'
        ],
        
        // J-Bridge content
        'how_it_works_title' => [
            'jp' => 'どのように機能するか',
            'en' => 'How It Works'
        ],
        'how_it_works_subtitle' => [
            'jp' => 'J-Bridgeのプロセスフロー',
            'en' => 'The J-Bridge Process Flow'
        ],
        'foreign_learners_title' => [
            'jp' => '外国人学習者',
            'en' => 'Foreign Learners'
        ],
        'foreign_learners_description' => [
            'jp' => '日本語・文化を学ぶ学習者<br>年齢20-30歳',
            'en' => 'Learners studying Japanese<br>language & culture, ages 20-30'
        ],
        'matching_platform_title' => [
            'jp' => 'マッチング<br>プラットフォーム',
            'en' => 'Matching<br>Platform'
        ],
        'matching_platform_description' => [
            'jp' => '学習者と企業を<br>最適にマッチング',
            'en' => 'Optimally matching<br>learners with companies'
        ],
        'japanese_companies_title' => [
            'jp' => '日本企業',
            'en' => 'Japanese Companies'
        ],
        'japanese_companies_description' => [
            'jp' => '優秀な人材を<br>求める企業',
            'en' => 'Companies seeking<br>excellent talent'
        ],
        
        // News content
        'news_date_format' => [
            'jp' => 'Y年n月j日',
            'en' => 'F j, Y'
        ],
        'news_date_1' => [
            'jp' => '2025年8月20日',
            'en' => 'August 20, 2025'
        ],
        'news_date_2' => [
            'jp' => '2025年8月18日',
            'en' => 'August 18, 2025'
        ],
        'news_date_3' => [
            'jp' => '2025年8月15日',
            'en' => 'August 15, 2025'
        ],
        'news_date_4' => [
            'jp' => '2025年8月12日',
            'en' => 'August 12, 2025'
        ],
        'news_date_5' => [
            'jp' => '2025年8月10日',
            'en' => 'August 10, 2025'
        ],
        'news_date_6' => [
            'jp' => '2025年8月8日',
            'en' => 'August 8, 2025'
        ],
        'news_date_7' => [
            'jp' => '2025年8月5日',
            'en' => 'August 5, 2025'
        ],
        'news_date_8' => [
            'jp' => '2025年8月3日',
            'en' => 'August 3, 2025'
        ],
        'news_date_9' => [
            'jp' => '2025年8月1日',
            'en' => 'August 1, 2025'
        ],
        'news_date_10' => [
            'jp' => '2025年7月30日',
            'en' => 'July 30, 2025'
        ],
        'news_date_11' => [
            'jp' => '2025年7月28日',
            'en' => 'July 28, 2025'
        ],
        'news_date_12' => [
            'jp' => '2025年7月25日',
            'en' => 'July 25, 2025'
        ],
        
        // Course detail content
        'course_overview' => [
            'jp' => 'コース概要',
            'en' => 'Course Overview'
        ],
        'what_youll_learn' => [
            'jp' => '学習内容',
            'en' => 'What You\'ll Learn'
        ],
        'course_information' => [
            'jp' => 'コース情報',
            'en' => 'Course Information'
        ],
        'level_label' => [
            'jp' => 'レベル',
            'en' => 'Level'
        ],
        'duration_label' => [
            'jp' => '期間',
            'en' => 'Duration'
        ],
        'course_id_label' => [
            'jp' => 'コースID',
            'en' => 'Course ID'
        ],
        
        // Contact form validation messages
        'fill_required_fields' => [
            'jp' => '必須項目を入力してください。',
            'en' => 'Please fill in all required fields.'
        ],
        'enter_valid_email' => [
            'jp' => '有効なメールアドレスを入力してください。',
            'en' => 'Please enter a valid email address.'
        ],
        'thank_you_inquiry' => [
            'jp' => 'お問い合わせありがとうございます。3営業日以内にご連絡いたします。',
            'en' => 'Thank you for your inquiry. We will contact you within 3 business days.'
        ],
        'success' => [
            'jp' => '成功！',
            'en' => 'Success!'
        ],
        'error' => [
            'jp' => 'エラー',
            'en' => 'Error'
        ],
        'name_validation_text' => [
            'jp' => '2-50文字、文字とスペースのみ',
            'en' => '2-50 characters, letters and spaces only'
        ],
        'email_validation_text' => [
            'jp' => '標準的なメール形式（example@domain.com）',
            'en' => 'Standard email format (example@domain.com)'
        ],
        'phone_validation_text' => [
            'jp' => '任意、数字とハイフンのみ',
            'en' => 'Optional, numbers and hyphens only'
        ],
        'subject_validation_text' => [
            'jp' => '任意、100文字以内',
            'en' => 'Optional, up to 100 characters'
        ],
        'message_validation_text' => [
            'jp' => '10-1000文字',
            'en' => '10-1000 characters'
        ],
        'phone_validation_text_alt' => [
            'jp' => '10-20文字、国際形式（任意）',
            'en' => '10-20 characters, international format (optional)'
        ],
        'select_inquiry_type_text' => [
            'jp' => 'お問い合わせ種別を選択してください',
            'en' => 'Please select an inquiry type'
        ],
        'subject_validation_text_alt' => [
            'jp' => '5-100文字（任意）',
            'en' => '5-100 characters (optional)'
        ],
        'message_validation_text_alt' => [
            'jp' => '10-1000文字以上',
            'en' => '10-1000 characters minimum'
        ],
        'message_placeholder' => [
            'jp' => 'お問い合わせ内容をお聞かせください...',
            'en' => 'Tell us about your inquiry...'
        ],
        'character_count' => [
            'jp' => '文字数',
            'en' => 'characters'
        ],
        
        // Corporate information
        'corporate_information' => [
            'jp' => '企業情報',
            'en' => 'Corporate Information'
        ],
        'corporate_name' => [
            'jp' => '会社名',
            'en' => 'Corporate Name'
        ],
        'corporate_name_value' => [
            'jp' => 'ひらがなタイムズ株式会社',
            'en' => 'Hiragana Times, Inc.'
        ],
        'corporate_name_alt' => [
            'jp' => '[ひらがなタイムズ株式会社]',
            'en' => '[Hiragana Times Co., Ltd.]'
        ],
        
        // Header content
        'open_menu' => [
            'jp' => 'メニューを開く',
            'en' => 'Open menu'
        ],
        'japanese_language' => [
            'jp' => '日本語',
            'en' => 'Japanese'
        ],
        'english_language' => [
            'jp' => '英語',
            'en' => 'English'
        ],
        
        // Footer content
        'postal_code' => [
            'jp' => '郵便番号',
            'en' => 'Postal Code'
        ],
        'postal_code_value' => [
            'jp' => '151-0062, 渋谷区, 東京',
            'en' => '151-0062, Shibuya-ku, Tokyo'
        ],
        'telephone' => [
            'jp' => '電話',
            'en' => 'TEL'
        ],
        'telephone_value' => [
            'jp' => '4010001160053',
            'en' => '4010001160053'
        ],
        'x_twitter' => [
            'jp' => 'X (Twitter)',
            'en' => 'X (Twitter)'
        ],
        'instagram' => [
            'jp' => 'Instagram',
            'en' => 'Instagram'
        ],
        'facebook' => [
            'jp' => 'Facebook',
            'en' => 'Facebook'
        ],
        
        // Contact page additional translations
        'contact_background_alt' => [
            'jp' => 'お問い合わせ背景',
            'en' => 'Contact Background'
        ],
        'map_background_alt' => [
            'jp' => '地図背景',
            'en' => 'Map Background'
        ],
        'faq_question_image_alt' => [
            'jp' => 'FAQ質問画像',
            'en' => 'FAQ Question Image'
        ],
        'location' => [
            'jp' => '所在地',
            'en' => 'Location'
        ],
        'corporate_number' => [
            'jp' => '法人番号',
            'en' => 'Corporate Number'
        ],
        'editor_in_chief' => [
            'jp' => '編集長',
            'en' => 'Editor-in-Chief'
        ],
        'established' => [
            'jp' => '設立',
            'en' => 'Established'
        ],
        'frequently_asked_questions' => [
            'jp' => 'よくある質問',
            'en' => 'Frequently Asked Questions'
        ],
        'check_before_contacting' => [
            'jp' => 'お問い合わせ前にご確認ください',
            'en' => 'Please check before contacting us'
        ],
        'select_a_question' => [
            'jp' => '質問を選択してください',
            'en' => 'Select a question'
        ],
        'click_question_for_answer' => [
            'jp' => '左または右の質問をクリックすると、ここに答えが表示されます。',
            'en' => 'Click on any question from the left or right to see the answer here.'
        ],
        'faq_free_trial' => [
            'jp' => '無料体験レッスンはありますか？',
            'en' => 'Do you offer free trial lessons?'
        ],
        'faq_fee_structure' => [
            'jp' => '料金体系はどうなっていますか？',
            'en' => 'How are the fees structured?'
        ],
        'faq_online_only' => [
            'jp' => 'レッスンはオンラインのみですか？',
            'en' => 'Are lessons online only?'
        ],
        'faq_beginners_okay' => [
            'jp' => '初心者でも大丈夫ですか？',
            'en' => 'Is it okay for beginners?'
        ],
        'faq_j_bridge_fees' => [
            'jp' => 'J-Bridgeの利用料金はいくらですか？',
            'en' => 'What are the J-Bridge usage fees?'
        ],
        'faq_visa_support' => [
            'jp' => 'ビザサポートは利用できますか？',
            'en' => 'Is visa support available?'
        ],
        
        // J-Bridge page additional translations
        'j_bridge_background_alt' => [
            'jp' => 'J-Bridge背景',
            'en' => 'J-Bridge background'
        ],
        'hello_phrase' => [
            'jp' => 'こんにちは',
            'en' => 'Hello'
        ],
        'bridge_logo_text' => [
            'jp' => 'J-Bridge',
            'en' => 'J-Bridge'
        ],
        'learner_registration_alt' => [
            'jp' => '学習者登録',
            'en' => 'Learner Registration'
        ],
        'learner_registration_title' => [
            'jp' => '学習者登録（入力）',
            'en' => 'Learner Registration (Input)'
        ],
        'company_registration_alt' => [
            'jp' => '企業登録',
            'en' => 'Company Registration'
        ],
        'company_registration_title' => [
            'jp' => '企業登録（求人）',
            'en' => 'Company Registration (Job Opening)'
        ],
        'matching_interview_alt' => [
            'jp' => 'マッチング・面接',
            'en' => 'Matching/Interview'
        ],
        'matching_interview_title' => [
            'jp' => 'マッチング・面接',
            'en' => 'Matching/Interview'
        ],
        'recruitment_support_alt' => [
            'jp' => '採用・定着サポート',
            'en' => 'Recruitment/Retention Support'
        ],
        'recruitment_support_title' => [
            'jp' => '採用・定着サポート',
            'en' => 'Recruitment/Retention Support'
        ],
        'benefits_title' => [
            'jp' => 'メリット',
            'en' => 'Benefits'
        ],
        'benefits_subtitle' => [
            'jp' => 'J-Bridgeが提供する価値',
            'en' => 'Value Provided by J-Bridge'
        ],
        'conference_room_alt' => [
            'jp' => 'J-Bridge会議室の様子',
            'en' => 'J-Bridge Conference Room Scene'
        ],
        'talent_farm_alt' => [
            'jp' => '人材ファーム - 継続学習',
            'en' => 'Talent Farm - Continuous Learning'
        ],
        'talent_farm_title' => [
            'jp' => '人材ファーム',
            'en' => 'Talent Farm'
        ],
        'talent_farm_description' => [
            'jp' => '継続学習志望者',
            'en' => 'Continuous Learning Applicants'
        ],
        'reducing_mistakes_alt' => [
            'jp' => '採用ミスの削減',
            'en' => 'Reducing Hiring Mistakes'
        ],
        'reducing_mistakes_title' => [
            'jp' => '採用ミスの削減',
            'en' => 'Reducing Hiring Mistakes'
        ],
        'reducing_mistakes_description' => [
            'jp' => '厳選された候補者',
            'en' => 'Carefully vetted candidates'
        ],
        'immediate_skills_alt' => [
            'jp' => '即戦力スキル',
            'en' => 'Immediately Effective Skills'
        ],
        'immediate_skills_title' => [
            'jp' => '即戦力スキル',
            'en' => 'Immediately Effective Skills'
        ],
        'immediate_skills_description' => [
            'jp' => '初日から貢献可能',
            'en' => 'Ready to contribute from day one'
        ],
        'corporate_culture_alt' => [
            'jp' => '企業文化への適応',
            'en' => 'Adapting to Corporate Culture'
        ],
        'corporate_culture_title' => [
            'jp' => '企業文化への適応',
            'en' => 'Adapting to Corporate Culture'
        ],
        'corporate_culture_description' => [
            'jp' => 'シームレスな職場統合',
            'en' => 'Seamless workplace integration'
        ],
        'reducing_costs_alt' => [
            'jp' => '採用コストの削減',
            'en' => 'Reducing Recruitment Costs'
        ],
        'reducing_costs_title' => [
            'jp' => '採用コストの削減',
            'en' => 'Reducing Recruitment Costs'
        ],
        'reducing_costs_description' => [
            'jp' => '効率的な採用プロセス',
            'en' => 'Efficient hiring process'
        ],
        'learner_benefits_title' => [
            'jp' => '学習者向けメリット',
            'en' => 'Benefits for Learners'
        ],
        'learner_benefits_subtitle' => [
            'jp' => '日本での成功への道のり',
            'en' => 'Your Journey to Success in Japan'
        ],
        'international_learners_alt' => [
            'jp' => '国際学習者の準備',
            'en' => 'International Learners Preparing'
        ],
        'to_the_future' => [
            'jp' => '未来へ',
            'en' => 'To the Future'
        ],
        'lets_move_forward' => [
            'jp' => '前進しましょう',
            'en' => 'Let\'s move forward'
        ],
        'japanese_job_support_alt' => [
            'jp' => '日本の就職サポート',
            'en' => 'Japanese Job Support'
        ],
        'japanese_job_support_title' => [
            'jp' => '日本の就職サポート',
            'en' => 'Japanese Job Support'
        ],
        'japanese_job_support_description' => [
            'jp' => 'プロフェッショナルな履歴書指導と面接準備',
            'en' => 'Professional resume guidance and interview preparation'
        ],
        'cultural_understanding_alt' => [
            'jp' => '文化理解サポート',
            'en' => 'Cultural Understanding Support'
        ],
        'cultural_understanding_title' => [
            'jp' => '文化理解サポート',
            'en' => 'Cultural Understanding Support'
        ],
        'cultural_understanding_description' => [
            'jp' => '日本のマナーとビジネス文化を学ぶ',
            'en' => 'Learn Japanese etiquette and business culture'
        ],
        'trustworthy_companies_alt' => [
            'jp' => '信頼できる企業との出会い',
            'en' => 'Meeting with Trustworthy Companies'
        ],
        'trustworthy_companies_title' => [
            'jp' => '信頼できる企業との出会い',
            'en' => 'Meeting with Trustworthy Companies'
        ],
        'trustworthy_companies_description' => [
            'jp' => '信頼できる日本の雇用主とつながる',
            'en' => 'Connect with reliable Japanese employers'
        ],
        'career_ladder_alt' => [
            'jp' => '成功へのキャリアラダー',
            'en' => 'Career Ladder to Success'
        ],
        'connection_scene_alt' => [
            'jp' => 'J-Bridge接続シーン',
            'en' => 'J-Bridge Connection Scene'
        ],
        'company_application' => [
            'jp' => '企業申込',
            'en' => 'Company Application'
        ],
        'job_application' => [
            'jp' => '求職申込',
            'en' => 'Job Application'
        ],
        
        // J-Bridge step descriptions
        'learner_registration_description' => [
            'jp' => 'nihongo.netで日本語と文化を学びながら、ビジネススキルを身につけます。個別最適化された指導による効率的な成長。',
            'en' => 'Study Japanese language and culture at nihongo.net while developing business skills. Efficient growth through personalized, optimized instruction.'
        ],
        'company_registration_description' => [
            'jp' => '日本語能力、文化理解、ビジネススキルの総合的な評価。企業ニーズに合致する人材の選定。',
            'en' => 'Comprehensive evaluation of Japanese proficiency, cultural understanding, and business skills. Selection of talent that matches company needs.'
        ],
        'matching_interview_description' => [
            'jp' => '企業の要件と学習者のスキル・志望を調整し、最適なマッチングを実現。',
            'en' => 'Aligning company requirements with learner skills and aspirations to achieve optimal matching.'
        ],
        'recruitment_support_description' => [
            'jp' => '採用後の継続サポートにより、スムーズな職場適応と長期的な成功を支援。',
            'en' => 'Continuous support after hiring, assisting with smooth workplace adaptation and long-term success.'
        ],
        
        // Header additional translations
        'logo_alt' => [
            'jp' => 'nihongo',
            'en' => 'nihongo'
        ],
        
        // Footer additional translations
        'footer_title' => [
            'jp' => 'nihongo.net',
            'en' => 'nihongo.net'
        ],
        'gateway_foundation' => [
            'jp' => 'ゲートウェイ・ファンデーション',
            'en' => 'Gateway Foundation'
        ],
        'news_review' => [
            'jp' => 'ニュース・レビュー',
            'en' => 'News Review'
        ],
        'pros_and_cons' => [
            'jp' => 'プロス・アンド・コンス',
            'en' => 'Pros and Cons'
        ],
        'job_in_japan_course' => [
            'jp' => '日本就職コース',
            'en' => 'Job in Japan Course'
        ],
        'diplomat_japanese_course' => [
            'jp' => '外交官日本語コース',
            'en' => 'Diplomat Japanese Course'
        ],
        'jlpt_preparation' => [
            'jp' => 'JLPT対策',
            'en' => 'JLPT Preparation'
        ],
        
        // Testimonials translations
        'testimonial_emily_name' => [
            'jp' => 'エミリー（アメリカ）',
            'en' => 'Emily (America)'
        ],
        'testimonial_emily_country' => [
            'jp' => 'アメリカ',
            'en' => 'America'
        ],
        'testimonial_emily_course' => [
            'jp' => 'ゲートウェイ・ファンデーション',
            'en' => 'Gateway Foundation'
        ],
        'testimonial_emily_comment' => [
            'jp' => '基本的な会話を丁寧に教えてもらったので、東京旅行で実際に日本語を使うことができました。店員さんと日本語でコミュニケーションが取れて感動しました！次はJLPTに挑戦したいです。',
            'en' => 'They taught me basic conversation politely, so I could actually use Japanese during my Tokyo trip. Being able to communicate with shop staff in Japanese was amazing! Next, I want to challenge the JLPT.'
        ],
        'testimonial_emily_title' => [
            'jp' => '日本旅行がとても楽しくなりました！',
            'en' => 'My Japan trip became much more enjoyable!'
        ],
        'testimonial_emily_date' => [
            'jp' => '2025年5月10日',
            'en' => 'May 10, 2025'
        ],
        'testimonial_james_name' => [
            'jp' => 'ジェームズ（オーストラリア）',
            'en' => 'James (Australia)'
        ],
        'testimonial_james_country' => [
            'jp' => 'オーストラリア',
            'en' => 'Australia'
        ],
        'testimonial_james_course' => [
            'jp' => 'ビジネス日本語',
            'en' => 'Business Japanese'
        ],
        'testimonial_james_comment' => [
            'jp' => '日本のビジネスパートナーとのメール交換の機会が増えたので、ビジネス日本語を学ぶために入学しました。すぐに使える実用的な表現が多く、先生も優しく、安心して質問できるのも魅力です。',
            'en' => 'I had more opportunities to exchange emails with Japanese business partners, so I enrolled to learn business Japanese. There are many practical expressions that are immediately useful. The teacher is kind, and I can ask questions with confidence, which is also appealing.'
        ],
        'testimonial_james_title' => [
            'jp' => '仕事で使える日本語',
            'en' => 'Japanese useful for work'
        ],
        'testimonial_james_date' => [
            'jp' => '2025年6月22日',
            'en' => 'June 22, 2025'
        ],
        'testimonial_ayu_name' => [
            'jp' => 'アユ（インドネシア）',
            'en' => 'Ayu (Indonesia)'
        ],
        'testimonial_ayu_country' => [
            'jp' => 'インドネシア',
            'en' => 'Indonesia'
        ],
        'testimonial_ayu_course' => [
            'jp' => 'ニュース・レビュー',
            'en' => 'News Review'
        ],
        'testimonial_ayu_comment' => [
            'jp' => '授業では言語だけでなく、日本の文化やマナーも学べるのでとても興味深いです。アニメや音楽の話題も出るので、勉強時間があっという間に過ぎます。',
            'en' => 'In class, we learn not just language but also Japanese culture and manners, which is very interesting. Topics about anime and music also come up, so study time flies by.'
        ],
        'testimonial_ayu_title' => [
            'jp' => '日本文化への理解が深まりました',
            'en' => 'Deepened my understanding of Japanese culture'
        ],
        'testimonial_ayu_date' => [
            'jp' => '2025年7月5日',
            'en' => 'July 5, 2025'
        ],
        'testimonial_louis_name' => [
            'jp' => 'ルイ（フランス）',
            'en' => 'Louis (France)'
        ],
        'testimonial_louis_country' => [
            'jp' => 'フランス',
            'en' => 'France'
        ],
        'testimonial_louis_course' => [
            'jp' => 'ゲートウェイ・ファンデーション',
            'en' => 'Gateway Foundation'
        ],
        'testimonial_louis_comment' => [
            'jp' => '独学で文法を勉強するのは難しく、諦めかけていましたが、先生が分かりやすい例で説明してくれて理解が深まりました。徐々に日本語の新聞も読めるようになり、学習の成果を実感しています。',
            'en' => 'Self-study grammar was difficult and I was about to give up, but the teacher explained with clear examples and my understanding deepened. I can gradually read Japanese newspapers and feel the results of my learning.'
        ],
        'testimonial_louis_title' => [
            'jp' => '文法が明確になりました',
            'en' => 'Grammar became clear'
        ],
        'testimonial_louis_date' => [
            'jp' => '2025年3月14日',
            'en' => 'March 14, 2025'
        ],
        'testimonial_soojin_name' => [
            'jp' => 'スジン（韓国）',
            'en' => 'Soo-jin (Korea)'
        ],
        'testimonial_soojin_country' => [
            'jp' => '韓国',
            'en' => 'Korea'
        ],
        'testimonial_soojin_course' => [
            'jp' => 'ゲートウェイ・ファンデーション',
            'en' => 'Gateway Foundation'
        ],
        'testimonial_soojin_comment' => [
            'jp' => '日本人の友達は多いのですが、今までは英語でしか話せませんでした。授業を受けてからは自然に日常会話ができるようになり、より深い関係を築けるようになりました。',
            'en' => 'I have many Japanese friends, but until now I could only speak in English. Since taking classes, I can naturally have daily conversations and build deeper relationships.'
        ],
        'testimonial_soojin_title' => [
            'jp' => '友達との会話がスムーズに！',
            'en' => 'Conversations with friends became smooth!'
        ],
        'testimonial_soojin_date' => [
            'jp' => '2025年4月2日',
            'en' => 'April 2, 2025'
        ],
        'testimonial_carlos_name' => [
            'jp' => 'カルロス（ブラジル）',
            'en' => 'Carlos (Brazil)'
        ],
        'testimonial_carlos_country' => [
            'jp' => 'ブラジル',
            'en' => 'Brazil'
        ],
        'testimonial_carlos_course' => [
            'jp' => 'ニュース・レビュー',
            'en' => 'News Review'
        ],
        'testimonial_carlos_comment' => [
            'jp' => '授業はいつも明るい雰囲気で、間違えても笑って励ましてくれるので、安心して学習できます。スポーツの話題も日本語で話せるようになり、モチベーションが続いています。',
            'en' => 'Classes always have a bright atmosphere, and even when I make mistakes, they laugh and encourage me, so I can learn comfortably. I can also discuss sports topics in Japanese, and my motivation continues.'
        ],
        'testimonial_carlos_title' => [
            'jp' => '先生が明るくて勉強が楽しい！',
            'en' => 'The teacher is bright and learning is fun!'
        ],
        'testimonial_carlos_date' => [
            'jp' => '2025年2月18日',
            'en' => 'February 18, 2025'
        ],
        'testimonial_claudia_name' => [
            'jp' => 'クラウディア（ドイツ）',
            'en' => 'Claudia (Germany)'
        ],
        'testimonial_claudia_country' => [
            'jp' => 'ドイツ',
            'en' => 'Germany'
        ],
        'testimonial_claudia_course' => [
            'jp' => 'ゲートウェイ・ファンデーション',
            'en' => 'Gateway Foundation'
        ],
        'testimonial_claudia_comment' => [
            'jp' => '50代ですが、日本語を始めるのに年齢は関係ないと感じました。先生が私のペースに合わせて教えてくれるので、安心して続けられます。',
            'en' => 'I am in my 50s, but I felt that age doesn\'t matter when starting to learn Japanese. The teacher teaches according to my pace, so I can continue with peace of mind.'
        ],
        'testimonial_claudia_title' => [
            'jp' => '年齢に関係なく挑戦できます！',
            'en' => 'Can challenge regardless of age!'
        ],
        'testimonial_claudia_date' => [
            'jp' => '2025年1月29日',
            'en' => 'January 29, 2025'
        ],
        'testimonial_nicha_name' => [
            'jp' => 'ニチャ（タイ）',
            'en' => 'Nicha (Thailand)'
        ],
        'testimonial_nicha_country' => [
            'jp' => 'タイ',
            'en' => 'Thailand'
        ],
        'testimonial_nicha_course' => [
            'jp' => 'ニュース・レビュー',
            'en' => 'News Review'
        ],
        'testimonial_nicha_comment' => [
            'jp' => '日本のスイーツやカフェ巡りが好きで、もっと日本語を理解したいと思って始めました。スタッフと日本語で会話できるようになって、趣味の楽しさが倍増しました！',
            'en' => 'I love Japanese sweets and cafe hopping, so I started learning because I wanted to understand Japanese more. Being able to converse with staff in Japanese has doubled the fun of my hobby!'
        ],
        'testimonial_nicha_title' => [
            'jp' => '趣味がとても楽しくなりました！',
            'en' => 'My hobby became much more enjoyable!'
        ],
        'testimonial_nicha_date' => [
            'jp' => '2025年6月8日',
            'en' => 'June 8, 2025'
        ],
        'testimonial_michael_name' => [
            'jp' => 'マイケル（カナダ）',
            'en' => 'Michael (Canada)'
        ],
        'testimonial_michael_country' => [
            'jp' => 'カナダ',
            'en' => 'Canada'
        ],
        'testimonial_michael_course' => [
            'jp' => 'ビジネス日本語',
            'en' => 'Business Japanese'
        ],
        'testimonial_michael_comment' => [
            'jp' => '出張で日本に行く機会が増えたので、少しでも日本語を理解したいと思って入学しました。今では会議の基本的な内容も理解できるようになり、仕事の幅が広がりました。',
            'en' => 'I have more opportunities to go to Japan on business trips, so I enrolled because I wanted to understand Japanese even a little. Now I can understand the basic content of meetings, and my work scope has expanded.'
        ],
        'testimonial_michael_title' => [
            'jp' => 'ビジネスの幅が広がりました',
            'en' => 'Business scope has expanded'
        ],
        'testimonial_michael_date' => [
            'jp' => '2025年7月21日',
            'en' => 'July 21, 2025'
        ],
        'testimonial_linh_name' => [
            'jp' => 'リン（ベトナム）',
            'en' => 'Linh (Vietnam)'
        ],
        'testimonial_linh_country' => [
            'jp' => 'ベトナム',
            'en' => 'Vietnam'
        ],
        'testimonial_linh_course' => [
            'jp' => 'ニュース・レビュー',
            'en' => 'News Review'
        ],
        'testimonial_linh_comment' => [
            'jp' => '教科書にはない表現や若い人がよく使う言葉を学べて、とても役に立ちます。日本人の友達とのLINEでも自然な文章が書けるようになりました！',
            'en' => 'I learn expressions not in textbooks and words that young people often use, which is very useful. I can now write natural sentences in LINE with Japanese friends too!'
        ],
        'testimonial_linh_title' => [
            'jp' => '自然な会話表現が身につきました',
            'en' => 'Natural conversation expressions have been acquired'
        ],
        'testimonial_linh_date' => [
            'jp' => '2025年5月27日',
            'en' => 'May 27, 2025'
        ],
        'testimonial_oliver_name' => [
            'jp' => 'オリバー（イギリス）',
            'en' => 'Oliver (UK)'
        ],
        'testimonial_oliver_country' => [
            'jp' => 'イギリス',
            'en' => 'UK'
        ],
        'testimonial_oliver_course' => [
            'jp' => 'ゲートウェイ・ファンデーション',
            'en' => 'Gateway Foundation'
        ],
        'testimonial_oliver_comment' => [
            'jp' => 'オンラインクラスなので、通勤時間や休憩時間に学習できるのが大きなメリットです。ライフスタイルに合わせられるので、無理せず続けられます。',
            'en' => 'Since it\'s online classes, the big advantage is that I can learn during my commute or break time. I can adapt to my lifestyle, so I can continue without forcing myself.'
        ],
        'testimonial_oliver_title' => [
            'jp' => '通勤時間に便利に学習',
            'en' => 'Convenient to learn during commute'
        ],
        'testimonial_oliver_date' => [
            'jp' => '2025年3月30日',
            'en' => 'March 30, 2025'
        ],
        'testimonial_maria_name' => [
            'jp' => 'マリア（フィリピン）',
            'en' => 'Maria (Philippines)'
        ],
        'testimonial_maria_country' => [
            'jp' => 'フィリピン',
            'en' => 'Philippines'
        ],
        'testimonial_maria_course' => [
            'jp' => 'ニュース・レビュー',
            'en' => 'News Review'
        ],
        'testimonial_maria_comment' => [
            'jp' => '先生がとてもフレンドリーで、毎回のクラスで笑顔になれます。カジュアルな会話で自然に日本語を学べるので、勉強というより友達と話しているような感覚です。',
            'en' => 'The teacher is very friendly and I can smile every class. I can learn Japanese naturally in casual conversation, so it feels more like talking with a friend than studying.'
        ],
        'testimonial_maria_title' => [
            'jp' => '先生との会話が楽しい！',
            'en' => 'Conversations with the teacher are fun!'
        ],
        'testimonial_maria_date' => [
            'jp' => '2025年8月3日',
            'en' => 'August 3, 2025'
        ]
    ];
}
/**
 * Helper function to get courses
 */
function nihongo_get_courses($limit = -1) {
    $args = array(
        'post_type' => 'course',
        'posts_per_page' => $limit,
        'post_status' => 'publish',
        'orderby' => 'menu_order',
        'order' => 'ASC'
    );
    
    $courses = get_posts($args);
    $formatted_courses = array();
    
    foreach ($courses as $course) {
        $formatted_courses[] = array(
            'id' => $course->post_name,
            'title' => $course->post_title,
            'description' => $course->post_excerpt,
            'level' => get_post_meta($course->ID, '_course_level', true),
            'duration' => get_post_meta($course->ID, '_course_duration', true),
            'price' => get_post_meta($course->ID, '_course_price', true),
            'features' => explode("\n", get_post_meta($course->ID, '_course_features', true)),
            'image' => get_the_post_thumbnail_url($course->ID, 'course-thumbnail'),
            'url' => get_permalink($course->ID)
        );
    }
    
    return $formatted_courses;
}

/**
 * Helper function to get testimonials
 */
function nihongo_get_testimonials($limit = -1) {
    $args = array(
        'post_type' => 'testimonial',
        'posts_per_page' => $limit,
        'post_status' => 'publish',
        'orderby' => 'menu_order',
        'order' => 'ASC'
    );
    
    $testimonials = get_posts($args);
    $formatted_testimonials = array();
    
    foreach ($testimonials as $testimonial) {
        $formatted_testimonials[] = array(
            'name' => get_post_meta($testimonial->ID, '_testimonial_name', true),
            'country' => get_post_meta($testimonial->ID, '_testimonial_country', true),
            'course' => get_post_meta($testimonial->ID, '_testimonial_course', true),
            'comment' => $testimonial->post_content,
            'rating' => get_post_meta($testimonial->ID, '_testimonial_rating', true),
            'title' => $testimonial->post_title,
            'date' => get_the_date('Y年n月j日', $testimonial->ID),
            'image' => get_the_post_thumbnail_url($testimonial->ID, 'testimonial-thumbnail')
        );
    }
    
    return $formatted_testimonials;
}

/**
 * Helper function to get news
 */
function nihongo_get_news($limit = -1) {
    $args = array(
        'post_type' => 'news',
        'posts_per_page' => $limit,
        'post_status' => 'publish',
        'orderby' => 'date',
        'order' => 'DESC'
    );
    
    $news = get_posts($args);
    $formatted_news = array();
    
    foreach ($news as $news_item) {
        $formatted_news[] = array(
            'title' => $news_item->post_title,
            'excerpt' => $news_item->post_excerpt,
            'date' => get_the_date('Y年n月j日', $news_item->ID),
            'image' => get_the_post_thumbnail_url($news_item->ID, 'news-thumbnail'),
            'url' => get_permalink($news_item->ID)
        );
    }
    
    return $formatted_news;
}

/**
 * Customizer Settings
 */
function nihongo_customize_register($wp_customize) {
    // Add section for theme options
    $wp_customize->add_section('nihongo_theme_options', array(
        'title' => __('Theme Options', 'nihongo'),
        'priority' => 30,
    ));
    
    // Hero background image
    $wp_customize->add_setting('nihongo_hero_bg', array(
        'default' => '',
        'sanitize_callback' => 'esc_url_raw',
    ));
    
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'nihongo_hero_bg', array(
        'label' => __('Hero Background Image', 'nihongo'),
        'section' => 'nihongo_theme_options',
        'settings' => 'nihongo_hero_bg',
    )));
    
    // Contact information
    $wp_customize->add_setting('nihongo_contact_email', array(
        'default' => '',
        'sanitize_callback' => 'sanitize_email',
    ));
    
    $wp_customize->add_control('nihongo_contact_email', array(
        'label' => __('Contact Email', 'nihongo'),
        'section' => 'nihongo_theme_options',
        'type' => 'email',
    ));
    
    $wp_customize->add_setting('nihongo_contact_phone', array(
        'default' => '',
        'sanitize_callback' => 'sanitize_text_field',
    ));
    
    $wp_customize->add_control('nihongo_contact_phone', array(
        'label' => __('Contact Phone', 'nihongo'),
        'section' => 'nihongo_theme_options',
        'type' => 'text',
    ));
}
add_action('customize_register', 'nihongo_customize_register');

/**
 * AJAX handler for contact form
 */
function nihongo_handle_contact_form() {
    check_ajax_referer('nihongo_nonce', 'nonce');
    
    $name = sanitize_text_field($_POST['name']);
    $email = sanitize_email($_POST['email']);
    $phone = sanitize_text_field($_POST['phone']);
    $inquiry_type = sanitize_text_field($_POST['inquiry_type']);
    $subject = sanitize_text_field($_POST['subject']);
    $message = sanitize_textarea_field($_POST['message']);
    
    // Basic validation
    if (empty($name) || empty($email) || empty($message)) {
        wp_send_json_error(array('message' => __('Please fill in all required fields.', 'nihongo')));
    }
    
    if (!is_email($email)) {
        wp_send_json_error(array('message' => __('Please enter a valid email address.', 'nihongo')));
    }
    
    // Send email
    $to = get_option('admin_email');
    $email_subject = sprintf(__('New Contact Form Submission: %s', 'nihongo'), $subject);
    $email_message = sprintf(
        __("Name: %s\nEmail: %s\nPhone: %s\nInquiry Type: %s\nSubject: %s\n\nMessage:\n%s", 'nihongo'),
        $name, $email, $phone, $inquiry_type, $subject, $message
    );
    
    $headers = array('Content-Type: text/plain; charset=UTF-8');
    
    if (wp_mail($to, $email_subject, $email_message, $headers)) {
        wp_send_json_success(array('message' => __('Thank you for your message. We will contact you soon.', 'nihongo')));
    } else {
        wp_send_json_error(array('message' => __('Sorry, there was an error sending your message.', 'nihongo')));
    }
}
add_action('wp_ajax_nihongo_contact_form', 'nihongo_handle_contact_form');
add_action('wp_ajax_nopriv_nihongo_contact_form', 'nihongo_handle_contact_form');

/**
 * Add custom body classes
 */
function nihongo_body_classes($classes) {
    $classes[] = 'nihongo-theme';
    $classes[] = 'lang-' . nihongo_get_current_language();
    
    if (is_front_page()) {
        $classes[] = 'page-bg';
    }
    
    return $classes;
}
add_filter('body_class', 'nihongo_body_classes');

/**
 * Custom excerpt length
 */
function nihongo_excerpt_length($length) {
    return 20;
}
add_filter('excerpt_length', 'nihongo_excerpt_length');

/**
 * Custom excerpt more
 */
function nihongo_excerpt_more($more) {
    return '...';
}
add_filter('excerpt_more', 'nihongo_excerpt_more');

/**
 * Include template parts
 */
function nihongo_get_template_part($template_name, $args = array()) {
    if (!empty($args)) {
        extract($args);
    }
    
    $template_path = get_template_directory() . '/template-parts/' . $template_name . '.php';
    
    if (file_exists($template_path)) {
        include $template_path;
    }
}

/**
 * Navigation Helper Functions
 */

/**
 * Get current URL for language switching
 */
function get_current_url() {
    global $wp;
    return home_url(add_query_arg(array(), $wp->request));
}

/**
 * Get navigation items with proper links and icons
 */
function nihongo_get_nav_items() {
    return array(
        array(
            'title' => nihongo_translate('nav_home'),
            'url' => home_url(),
            'icon' => '🏠',
            'class' => 'nav-home',
            'is_current' => is_front_page()
        ),
        array(
            'title' => nihongo_translate('nav_courses'),
            'url' => nihongo_get_page_url('courses'),
            'icon' => '📚',
            'class' => 'nav-courses',
            'is_current' => is_page('courses') || is_post_type_archive('course') || is_singular('course')
        ),
        array(
            'title' => nihongo_translate('nav_j_bridge'),
            'url' => nihongo_get_page_url('j-bridge'),
            'icon' => '🌉',
            'class' => 'nav-j-bridge',
            'is_current' => is_page('j-bridge')
        ),
        array(
            'title' => nihongo_translate('nav_contact'),
            'url' => nihongo_get_page_url('contact'),
            'icon' => '📞',
            'class' => 'nav-contact',
            'is_current' => is_page('contact')
        )
    );
}

/**
 * Get page URL by slug with fallback
 */
function nihongo_get_page_url($page_slug) {
    $page = get_page_by_path($page_slug);
    if ($page) {
        return get_permalink($page->ID);
    }
    
    // Fallback URLs for common pages
    $fallback_urls = array(
        'courses' => home_url('/courses/'),
        'j-bridge' => home_url('/j-bridge/'),
        'news' => home_url('/news/'),
        'voices' => home_url('/voices/'),
        'contact' => home_url('/contact/')
    );
    
    return isset($fallback_urls[$page_slug]) ? $fallback_urls[$page_slug] : home_url();
}

/**
 * Get post type archive URL
 */
function nihongo_get_archive_url($post_type) {
    return get_post_type_archive_link($post_type);
}

/**
 * Get custom post type URLs
 */
function nihongo_get_course_url($course_id = null) {
    if ($course_id) {
        return get_permalink($course_id);
    }
    return nihongo_get_archive_url('course');
}

function nihongo_get_testimonial_url($testimonial_id = null) {
    if ($testimonial_id) {
        return get_permalink($testimonial_id);
    }
    return nihongo_get_archive_url('testimonial');
}

function nihongo_get_news_url($news_id = null) {
    if ($news_id) {
        return get_permalink($news_id);
    }
    return nihongo_get_archive_url('news');
}

/**
 * Generate navigation HTML
 */
function nihongo_render_navigation($nav_items = null, $class = 'nav-list') {
    if ($nav_items === null) {
        $nav_items = nihongo_get_nav_items();
    }
    
    $html = '<ul class="' . esc_attr($class) . '">';
    
    foreach ($nav_items as $item) {
        $active_class = $item['is_current'] ? ' active' : '';
        $html .= '<li class="nav-item' . $active_class . '">';
        $html .= '<a href="' . esc_url($item['url']) . '" class="nav-link ' . esc_attr($item['class']) . '">';
        $html .= '<span class="nav-icon">' . esc_html($item['icon']) . '</span>';
        $html .= '<span class="nav-text">' . esc_html($item['title']) . '</span>';
        $html .= '</a>';
        $html .= '</li>';
    }
    
    $html .= '</ul>';
    
    return $html;
}

/**
 * Fallback menu for primary navigation
 */
function nihongo_fallback_menu() {
    echo nihongo_render_navigation();
}

/**
 * Fallback menu for mobile navigation
 */
function nihongo_fallback_mobile_menu() {
    echo nihongo_render_navigation(null, 'mobile-nav-list');
}

/**
 * Breadcrumb Navigation
 */
function nihongo_breadcrumbs() {
    if (is_front_page()) {
        return;
    }
    
    $breadcrumbs = array();
    $breadcrumbs[] = array(
        'title' => nihongo_translate('nav_home'),
        'url' => home_url()
    );
    
    if (is_page()) {
        $page = get_post();
        $ancestors = get_post_ancestors($page->ID);
        
        if ($ancestors) {
            $ancestors = array_reverse($ancestors);
            foreach ($ancestors as $ancestor) {
                $breadcrumbs[] = array(
                    'title' => get_the_title($ancestor),
                    'url' => get_permalink($ancestor)
                );
            }
        }
        
        $breadcrumbs[] = array(
            'title' => get_the_title(),
            'url' => get_permalink()
        );
    } elseif (is_singular('course')) {
        $breadcrumbs[] = array(
            'title' => nihongo_translate('nav_courses'),
            'url' => nihongo_get_page_url('courses')
        );
        $breadcrumbs[] = array(
            'title' => get_the_title(),
            'url' => get_permalink()
        );
    } elseif (is_singular('testimonial')) {
        $breadcrumbs[] = array(
            'title' => nihongo_translate('nav_voices'),
            'url' => nihongo_get_page_url('voices')
        );
        $breadcrumbs[] = array(
            'title' => get_the_title(),
            'url' => get_permalink()
        );
    } elseif (is_singular('news')) {
        $breadcrumbs[] = array(
            'title' => nihongo_translate('nav_news'),
            'url' => nihongo_get_page_url('news')
        );
        $breadcrumbs[] = array(
            'title' => get_the_title(),
            'url' => get_permalink()
        );
    } elseif (is_post_type_archive('course')) {
        $breadcrumbs[] = array(
            'title' => nihongo_translate('nav_courses'),
            'url' => nihongo_get_page_url('courses')
        );
    } elseif (is_post_type_archive('testimonial')) {
        $breadcrumbs[] = array(
            'title' => nihongo_translate('nav_voices'),
            'url' => nihongo_get_page_url('voices')
        );
    } elseif (is_post_type_archive('news')) {
        $breadcrumbs[] = array(
            'title' => nihongo_translate('nav_news'),
            'url' => nihongo_get_page_url('news')
        );
    }
    
    if (count($breadcrumbs) <= 1) {
        return;
    }
    
    $html = '<nav class="breadcrumbs" aria-label="Breadcrumb">';
    $html .= '<ol class="breadcrumb-list">';
    
    foreach ($breadcrumbs as $index => $breadcrumb) {
        $is_last = ($index === count($breadcrumbs) - 1);
        
        $html .= '<li class="breadcrumb-item' . ($is_last ? ' current' : '') . '">';
        
        if ($is_last) {
            $html .= '<span class="breadcrumb-current">' . esc_html($breadcrumb['title']) . '</span>';
        } else {
            $html .= '<a href="' . esc_url($breadcrumb['url']) . '" class="breadcrumb-link">' . esc_html($breadcrumb['title']) . '</a>';
        }
        
        $html .= '</li>';
        
        if (!$is_last) {
            $html .= '<li class="breadcrumb-separator" aria-hidden="true">›</li>';
        }
    }
    
    $html .= '</ol>';
    $html .= '</nav>';
    
    return $html;
}

/**
 * Get related content links
 */
function nihongo_get_related_links($post_id = null) {
    if (!$post_id) {
        global $post;
        $post_id = $post->ID;
    }
    
    $related_links = array();
    
    if (is_singular('course')) {
        $related_links[] = array(
            'title' => nihongo_translate('view_all_courses'),
            'url' => nihongo_get_page_url('courses'),
            'icon' => '📚'
        );
        $related_links[] = array(
            'title' => nihongo_translate('contact_us'),
            'url' => nihongo_get_page_url('contact'),
            'icon' => '📞'
        );
    } elseif (is_singular('testimonial')) {
        $related_links[] = array(
            'title' => nihongo_translate('view_all_testimonials'),
            'url' => nihongo_get_page_url('voices'),
            'icon' => '💬'
        );
        $related_links[] = array(
            'title' => nihongo_translate('start_your_journey'),
            'url' => nihongo_get_page_url('contact'),
            'icon' => '🚀'
        );
    } elseif (is_singular('news')) {
        $related_links[] = array(
            'title' => nihongo_translate('view_all_news'),
            'url' => nihongo_get_page_url('news'),
            'icon' => '📰'
        );
        $related_links[] = array(
            'title' => nihongo_translate('subscribe_newsletter'),
            'url' => nihongo_get_page_url('contact'),
            'icon' => '📧'
        );
    }
    
    return $related_links;
}

/**
 * Get social sharing links
 */
function nihongo_get_social_links($post_id = null) {
    if (!$post_id) {
        global $post;
        $post_id = $post->ID;
    }
    
    $url = get_permalink($post_id);
    $title = get_the_title($post_id);
    $encoded_url = urlencode($url);
    $encoded_title = urlencode($title);
    
    return array(
        'twitter' => array(
            'title' => nihongo_translate('share_on_twitter'),
            'url' => "https://twitter.com/intent/tweet?url={$encoded_url}&text={$encoded_title}",
            'icon' => '🐦'
        ),
        'facebook' => array(
            'title' => nihongo_translate('share_on_facebook'),
            'url' => "https://www.facebook.com/sharer/sharer.php?u={$encoded_url}",
            'icon' => '📘'
        ),
        'linkedin' => array(
            'title' => nihongo_translate('share_on_linkedin'),
            'url' => "https://www.linkedin.com/sharing/share-offsite/?url={$encoded_url}",
            'icon' => '💼'
        ),
        'whatsapp' => array(
            'title' => nihongo_translate('share_on_whatsapp'),
            'url' => "https://wa.me/?text={$encoded_title}%20{$encoded_url}",
            'icon' => '💬'
        )
    );
}

/**
 * Theme activation hook
 */
function nihongo_theme_activation() {
    // Flush rewrite rules
    flush_rewrite_rules();
    
    // Create default pages
    $pages = array(
        'Home' => 'home.php',
        'Courses' => 'courses.php',
        'J-Bridge' => 'j-bridge.php',
        'Contact' => 'contact.php',
        'News' => 'news.php',
        'Voices' => 'voices.php'
    );
    
    foreach ($pages as $title => $template) {
        $page = get_page_by_title($title);
        if (!$page) {
            wp_insert_post(array(
                'post_title' => $title,
                'post_name' => strtolower(str_replace(' ', '-', $title)),
                'post_content' => '',
                'post_status' => 'publish',
                'post_type' => 'page',
                'page_template' => $template
            ));
        }
    }
}
add_action('after_switch_theme', 'nihongo_theme_activation');
