<!DOCTYPE html>
<html lang="ja">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="theme-color" content="#0066cc">

    {% if seo_settings %}
    {% if seo_settings.search_console_id %}
    <meta name="google-site-verification" content="{{ seo_settings.search_console_id }}">
    {% endif %}
    <meta property="og:site_name" content="{{ seo_settings.og_site_name or site_name }}">
    {% endif %}

    {% block meta %}{% endblock %}
    <title>{% block title %}{{ site_name }}{% endblock %}</title>

    {% if site_json_ld %}{{ site_json_ld | safe }}{% endif %}

    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&display=swap" rel="stylesheet">

    <link rel="stylesheet" href="/css/theme.css">

    <style>
        /* Corporate Theme - CTA Focused */
        :root {
            --cta-color: #ff6b35;
            --cta-hover: #e55a2b;
        }

        body {
            font-family: 'Noto Sans JP', sans-serif;
        }

        /* Header - Professional with CTA */
        .site-header {
            background: white;
            box-shadow: 0 2px 10px rgba(0,0,0,0.08);
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .site-header .container {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem 2rem;
            max-width: 1280px;
        }

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

        .header-right {
            display: flex;
            align-items: center;
            gap: 2rem;
        }

        .site-nav {
            display: flex;
            gap: 1.5rem;
        }

        .site-nav a {
            color: var(--color-text);
            font-weight: 500;
            font-size: 0.9rem;
            margin-left: 0;
        }

        .site-nav a:hover {
            color: var(--color-primary);
        }

        /* CTA Button - Key element */
        .cta-button {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            background: var(--cta-color);
            color: white;
            padding: 0.75rem 1.5rem;
            border-radius: 0.5rem;
            text-decoration: none;
            font-weight: 700;
            font-size: 0.9rem;
            transition: all 0.2s;
            box-shadow: 0 4px 14px rgba(255, 107, 53, 0.3);
        }

        .cta-button:hover {
            background: var(--cta-hover);
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
        }

        .cta-button--outline {
            background: transparent;
            color: var(--cta-color);
            border: 2px solid var(--cta-color);
            box-shadow: none;
        }

        .cta-button--outline:hover {
            background: var(--cta-color);
            color: white;
        }

        .cta-button--primary {
            background: var(--color-primary);
            box-shadow: 0 4px 14px rgba(0, 102, 204, 0.3);
        }

        .cta-button--primary:hover {
            background: var(--color-primary-hover);
            box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
        }

        .cta-button--large {
            padding: 1rem 2.5rem;
            font-size: 1.1rem;
        }

        /* Hero Section */
        .hero {
            background: linear-gradient(135deg, var(--color-primary) 0%, #004d99 100%);
            color: white;
            padding: 5rem 0;
            text-align: center;
        }

        .hero--large {
            padding: 7rem 0;
        }

        .hero--image {
            background-size: cover;
            background-position: center;
            position: relative;
        }

        .hero--image::before {
            content: '';
            position: absolute;
            inset: 0;
            background: rgba(0, 0, 0, 0.5);
        }

        .hero .container {
            position: relative;
            max-width: 900px;
        }

        .hero h1 {
            font-size: 2.75rem;
            font-weight: 700;
            line-height: 1.3;
            margin-bottom: 1.5rem;
        }

        .hero p {
            font-size: 1.25rem;
            opacity: 0.9;
            margin-bottom: 2rem;
            line-height: 1.7;
        }

        .hero-cta {
            display: flex;
            justify-content: center;
            gap: 1rem;
            flex-wrap: wrap;
        }

        .hero .cta-button {
            font-size: 1.1rem;
            padding: 1rem 2.5rem;
        }

        /* Features Section */
        .features {
            padding: 5rem 0;
            background: var(--color-surface);
        }

        .features-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 2rem;
            max-width: 1200px;
            margin: 0 auto;
        }

        .feature-card {
            background: white;
            padding: 2rem;
            border-radius: 1rem;
            text-align: center;
            box-shadow: 0 4px 20px rgba(0,0,0,0.05);
            transition: transform 0.2s;
        }

        .feature-card:hover {
            transform: translateY(-4px);
        }

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

        .feature-card h3 {
            font-size: 1.25rem;
            margin-bottom: 0.75rem;
        }

        .feature-card p {
            color: var(--color-text-muted);
            font-size: 0.95rem;
            line-height: 1.7;
        }

        /* CTA Banner */
        .cta-banner {
            background: var(--color-primary);
            color: white;
            padding: 4rem 0;
            text-align: center;
        }

        .cta-banner h2 {
            font-size: 2rem;
            margin-bottom: 1rem;
        }

        .cta-banner p {
            font-size: 1.1rem;
            opacity: 0.9;
            margin-bottom: 2rem;
        }

        .cta-banner .cta-button {
            background: white;
            color: var(--color-primary);
            font-size: 1.1rem;
        }

        .cta-banner .cta-button:hover {
            background: var(--color-surface);
        }

        /* News Section */
        .news-section {
            padding: 5rem 0;
        }

        .section-title {
            font-size: 2rem;
            text-align: center;
            margin-bottom: 3rem;
        }

        .news-list {
            max-width: 900px;
            margin: 0 auto;
        }

        .news-item {
            display: flex;
            gap: 1.5rem;
            padding: 1.5rem 0;
            border-bottom: 1px solid var(--color-border);
        }

        .news-date {
            color: var(--color-text-muted);
            font-size: 0.9rem;
            white-space: nowrap;
        }

        .news-item a {
            color: var(--color-text);
            text-decoration: none;
        }

        .news-item a:hover {
            color: var(--color-primary);
        }

        /* Page Content */
        .site-main {
            padding: 3rem 0;
        }

        .page-header {
            text-align: center;
            margin-bottom: 3rem;
        }

        .page-header h1 {
            font-size: 2.5rem;
            margin-bottom: 1rem;
        }

        .page-content {
            max-width: 800px;
            margin: 0 auto;
        }

        /* Footer - Trust building */
        .site-footer {
            background: #1a2332;
            color: rgba(255,255,255,0.8);
            padding: 4rem 0 2rem;
        }

        .footer-top {
            display: grid;
            grid-template-columns: 2fr 1fr 1fr 1fr;
            gap: 3rem;
            max-width: 1200px;
            margin: 0 auto 3rem;
            padding: 0 2rem;
        }

        .footer-company h3 {
            color: white;
            font-size: 1.5rem;
            margin-bottom: 1rem;
        }

        .footer-company p {
            line-height: 1.8;
            font-size: 0.9rem;
        }

        .footer-links h4 {
            color: white;
            font-size: 1rem;
            margin-bottom: 1rem;
        }

        .footer-links ul {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .footer-links li {
            margin-bottom: 0.5rem;
        }

        .footer-links a {
            color: rgba(255,255,255,0.7);
            text-decoration: none;
            font-size: 0.9rem;
        }

        .footer-links a:hover {
            color: white;
        }

        .footer-contact {
            background: rgba(255,255,255,0.05);
            padding: 1.5rem;
            border-radius: 0.5rem;
        }

        .footer-contact h4 {
            color: white;
            margin-bottom: 1rem;
        }

        .footer-contact .cta-button {
            width: 100%;
            justify-content: center;
            margin-top: 1rem;
        }

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

        /* Responsive */
        @media (max-width: 1024px) {
            .features-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            .footer-top {
                grid-template-columns: 1fr 1fr;
            }
        }

        @media (max-width: 768px) {
            .site-header .container {
                flex-direction: column;
                gap: 1rem;
            }

            .header-right {
                flex-direction: column;
                gap: 1rem;
            }

            .site-nav {
                flex-wrap: wrap;
                justify-content: center;
            }

            .hero h1 {
                font-size: 2rem;
            }

            .hero p {
                font-size: 1rem;
            }

            .features-grid {
                grid-template-columns: 1fr;
            }

            .footer-top {
                grid-template-columns: 1fr;
            }

            .news-item {
                flex-direction: column;
                gap: 0.5rem;
            }
        }

        {% block styles %}{% endblock %}
    </style>
</head>
<body>
    <header class="site-header">
        <div class="container">
            <a href="/" class="site-logo">{{ site_name }}</a>
            <div class="header-right">
                <nav class="site-nav">
                    {% if menus and menus.header %}
                        {% for item in menus.header %}
                        <a href="{{ item.url }}">{{ item.label }}</a>
                        {% endfor %}
                    {% endif %}
                </nav>
                <a href="/contact" class="cta-button">
                    お問い合わせ
                </a>
            </div>
        </div>
    </header>

    {% block hero %}{% endblock %}

    <main class="site-main">
        {% block content %}{% endblock %}
    </main>

    {% block cta_banner %}
    <section class="cta-banner">
        <div class="container">
            <h2>お気軽にご相談ください</h2>
            <p>お問い合わせは24時間受け付けております。</p>
            <a href="/contact" class="cta-button cta-button--large">無料相談はこちら</a>
        </div>
    </section>
    {% endblock %}

    <footer class="site-footer">
        <div class="footer-top">
            <div class="footer-company">
                <h3>{{ site_name }}</h3>
                <p>
                    {{ site_description or "お客様のビジネスを成功に導くパートナーとして、最高品質のサービスを提供します。" }}
                </p>
            </div>

            <div class="footer-links">
                <h4>サービス</h4>
                {% if menus and menus.footer_links %}
                <ul>
                    {% for item in menus.footer_links %}
                    <li><a href="{{ item.url }}">{{ item.label }}</a></li>
                    {% endfor %}
                </ul>
                {% endif %}
            </div>

            <div class="footer-links">
                <h4>会社情報</h4>
                {% if menus and menus.footer %}
                <ul>
                    {% for item in menus.footer %}
                    <li><a href="{{ item.url }}">{{ item.label }}</a></li>
                    {% endfor %}
                </ul>
                {% endif %}
            </div>

            <div class="footer-contact">
                <h4>お問い合わせ</h4>
                <p>お気軽にご連絡ください</p>
                <a href="/contact" class="cta-button">お問い合わせ</a>
            </div>
        </div>

        <div class="footer-bottom container">
            <p>&copy; {{ current_year }} {{ site_name }} All Rights Reserved.</p>
        </div>
    </footer>

    {% block scripts %}{% endblock %}

    {% if seo_settings and seo_settings.ga4_id %}
    <script async src="https://www.googletagmanager.com/gtag/js?id={{ seo_settings.ga4_id }}"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
      gtag('config', '{{ seo_settings.ga4_id }}');
    </script>
    {% endif %}
</body>
</html>
