/* 基本スタイル */
body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: #333;
    line-height: 1.7;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    color: #2c3e50; /* Dark Blue-Gray */
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.8rem;
    line-height: 1.3;
}

h2 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 0.5rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: #4a69bd; /* Medium Blue */
    border-radius: 2px;
}

h3 {
    font-size: 1.4rem;
    color: #4a69bd;
}

a {
    color: #4a69bd; /* Medium Blue */
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #3c56a0; /* Darker Blue */
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.section {
    padding: 60px 0;
}

.bg-light {
    background-color: #f8f9fa;
}

/* ヘッダー */
.header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 40px;
}

/* ロゴのリンクスタイルをリセット */
#logo-link {
    text-decoration: none;
    cursor: pointer;
}

.header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 25px;
    align-items: center;
}

.header nav a {
    color: #333;
    font-weight: 500;
    position: relative; /* 下線アニメーション用 */
    padding-bottom: 5px; /* 下線スペース確保 */
}

/* ヘッダー内のCTAボタンの文字色を強制的に白に */
.header nav .cta-button {
    color: #fff !important; /* !importantで上書き */
    padding-top: 6px; /* 他の nav アイテムとの垂直位置を微調整 */
}

.header nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #4a69bd;
    transition: width 0.3s ease;
}

.header nav a:hover {
    color: #4a69bd;
}

.header nav a:hover::after {
    width: 100%;
}

/* ホバー時も文字色を白に保つ */
.header nav .cta-button:hover {
    color: #fff !important;
}

/* CTAボタン */
.cta-button {
    background-color: #4a69bd; /* Medium Blue */
    color: #fff;
    padding: 0 25px; /* 左右のパディングのみ設定 */
    height: 35px;
    border-radius: 25px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(74, 105, 189, 0.2);
    font-size: 1.05rem;
    line-height: 1;
}

.cta-button:hover {
    background-color: #3c56a0; /* Darker Blue */
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(74, 105, 189, 0.3);
}

/* ハンバーガーメニュー */
.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
}

/* ヒーローセクション */
.hero {
    background: linear-gradient(135deg, #e0e7ff 0%, #c8d4f5 100%); /* Light Blue Gradient */
    padding: 60px 0;
    text-align: left;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 30px; /* 40pxから30pxに減らして余白を調整 */
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
     color: #2c3e50;
     line-height: 1.4;
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    color: #555;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 95%;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    border: 1px solid #bbb;
    image-rendering: -webkit-optimize-contrast; /* Webkit（Chrome、Safari）用 */
    image-rendering: -moz-crisp-edges; /* Firefox用 */
    image-rendering: -o-crisp-edges; /* Opera用 */
    image-rendering: crisp-edges; /* 標準プロパティ */
    -ms-interpolation-mode: nearest-neighbor; /* IE用 */
}


/* 特長セクション */
.features .feature-grid {
    display: grid;
    /* grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); */ /* 元のスタイルをコメントアウト */
    grid-template-columns: repeat(4, 1fr); /* デフォルトで4カラム */
    gap: 30px;
    text-align: center;
}

.feature-item {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid #dbe2f6;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.feature-item i {
    font-size: 2.5rem;
    color: #4a69bd;
    margin-bottom: 1.5rem;
}

/* ひな形セクション */
.templates .template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.template-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.template-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.template-card img,
.template-card .img-placeholder {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.template-card .img-placeholder {
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
}

.template-card h3,
.template-card p {
    padding: 0 20px;
}

.template-card h3 {
    margin-top: 15px;
    margin-bottom: 10px;
}

.template-card p {
    padding-bottom: 20px;
    color: #555;
    flex-grow: 1;
}

/* 導入事例セクション */
.use-cases .use-case-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    text-align: center;
    padding: 0 20px;
    margin: 0 auto;
}

.use-case-item {
    background: #e7f0ff; /* Lighter Blue */
    padding: 30px 20px; /* 上下30px、左右20pxに変更 */
    border-radius: 8px;
    border-left: 5px solid #4a69bd;
}

.use-case-item i {
    font-size: 2rem;
    color: #4a69bd;
    margin-bottom: 1rem;
}

.use-case-item h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

/* 画面イメージセクション */
.screenshots h2 {
    /* 他のセクションタイトルと同様のスタイルを適用 */
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.screenshots h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: #4a69bd; /* Medium Blue */
    border-radius: 2px;
}

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Changed 360px to 300px */
    gap: 30px;
}

.screenshot-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden; /* 画像のクロップに必要 */
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    border: 2px solid #dbe2f6;
    display: flex; /* 追加 */
    flex-direction: column; /* 追加 */
}

.screenshot-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.screenshot-item img {
    width: 100%;
    /* height: 200px; 固定の高さを削除 */
    aspect-ratio: 1 / 1; /* アスペクト比を1:1 (正方形) に設定 */
    object-fit: cover; /* アスペクト比を維持したままクロップ */
    object-position: top left; /* クロップ位置を左上に変更 */
    display: block;
    border: 1px solid #ddd; /* 枠線を追加 */
}

.screenshot-item figcaption {
    text-align: center;
    /* margin-top: 15px;  元のスタイルをコメントアウトまたは削除 */
    margin-top: auto; /* 追加: キャプションを下部に配置 */
    padding: 15px 0; /* 追加: 上下のパディング */
    font-weight: bold; /* 太字を追加 */
    font-size: 1.1em;  /* フォントサイズを少し大きく */
    color: #4a69bd;   /* テーマカラーに変更 */
}

/* お問い合わせセクション */
.contact {
    text-align: center;
}

.contact p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* フッター */
.footer {
    background-color: #2c3e50; /* Dark Blue-Gray */
    color: #ecf0f1; /* Light Gray */
    text-align: center;
    padding: 30px 0;
    margin-top: 30px;
}

/* レスポンシブ対応 */
@media (max-width: 1200px) {
    .hero-content {
        padding: 0 30px;
    }
    
    .hero-image img {
        max-width: 100%;
    }
}

@media (max-width: 992px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 20px; /* gap値を調整 */
    }
    
    .hero-text {
        margin-bottom: 20px; /* 30pxから20pxに減らす */
    }
    
    .hero-image img {
        max-width: 70%; /* ヒーロー画像のサイズを小さく設定 */
        margin: 0 auto; /* 画像を中央揃えに */
        display: block; /* ブロック要素として扱い中央揃えを可能に */
    }
    
    /* サービスの特長も2カラムに */
    .features .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .use-case-grid {
        grid-template-columns: repeat(2, 1fr); /* 992px以下で2カラム表示 */
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem; /* Slightly smaller H1 on mobile */
    }
    h2 {
        font-size: 1.8rem;
    }

    /* 全体のコンテナに適切な余白を設定 */
    .container {
        padding: 0 15px;
        width: calc(100% - 30px);
        max-width: 100%;
    }
    
    /* 各セクションのパディングを調整 */
    .section {
        padding: 30px 0;
    }

    /* Add this rule for the hero image */
    .hero-image img {
        max-width: 100%; /* Make image full width on small screens */
        margin: 0 auto; /* 画像を中央寄せに */
    }
    
    /* ヒーローセクションの調整 */
    .hero-content {
        padding: 0 15px;
        gap: 15px; /* モバイルでさらにgapを減らす */
    }
    
    /* ヒーローテキストの調整 */
    .hero-text {
        padding-right: 0; /* 右パディングを削除 */
        padding-left: 0; /* 左パディングを削除 */
        margin-bottom: 15px; /* 20px から 15px に微調整 */
    }

    .header nav {
        display: none; /* Hide nav by default */
        position: absolute;
        top: 70px; /* Adjust based on header height */
        left: 0;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        flex-direction: column; /* Stack links vertically */
        padding: 10px 0;
    }
    
    /* ヘッダーコンテナの調整 */
    .header .container {
        padding: 0 15px 0 10px; /* 左パディングを減らす */
        justify-content: flex-start;
    }

    .header nav.active {
        display: flex; /* Show mobile nav when active */
    }

    .header nav ul {
        flex-direction: column;
        width: 100%;
        text-align: center;
    }

    .header nav ul li {
         padding: 10px 0;
         border-bottom: 1px solid #eee;
    }
     .header nav ul li:last-child {
         border-bottom: none;
     }

    .header nav ul li a {
        display: block;
        padding: 5px 0;
    }

    /* モバイルメニュー内のCTAボタンのスタイル調整 */
    .header nav ul li a.cta-button {
        background: none;
        color: #333 !important;
        padding: 5px 0;
        display: block;
        width: 100%;
        margin: 0;
        box-shadow: none;
        border-radius: 0;
    }

    .header nav ul li a.cta-button:hover {
        background: none;
        color: #4a69bd !important;
        transform: none;
        box-shadow: none;
    }

    .hamburger {
        display: block; /* Show hamburger */
    }

    .feature-grid,
    .template-grid { /* .use-case-grid を削除 */
        grid-template-columns: 1fr; /* 768px以下で1カラム表示 */
    }
    .use-case-grid {
        grid-template-columns: 1fr; /* 768px以下で1カラム表示を再追加 */
        margin: 0 15px;
    }
     
    /* スマホサイズで画面イメージが幅いっぱいに表示されるように調整 */
    .screenshot-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 0;
        padding: 0;
        width: 100%;
    }
    
    .screenshot-item {
        width: 100%;
        margin: 0 0 15px 0;
        border-radius: 4px;
    }
    
    /* 画面イメージセクション専用の調整 */
    .screenshots .container {
        padding: 0 15px;
    }
    
    /* お問い合わせセクションの調整 */
    .contact.section {
        padding: 30px 15px;
    }

    /* ロゴを左寄せにし、ハンバーガーメニューを右に寄せる */
    #logo-link {
        margin-right: auto; /* これでハンバーガーが右に寄る */
        margin-left: -5px; /* 左への移動はリンクに適用 */
        display: inline-block; /*念のため追加*/
    }

    /* ロゴ画像自体のスタイル */
    .logo {
        padding-left: 0;
    }

    #service-details .container h2 {
        font-size: 1.6rem;
        margin-bottom: 2rem;
    }

    #service-details .container h3 {
        font-size: 1.2rem;
        margin-top: 2rem;
        margin-bottom: 1rem;
    }

    .data-table th,
    .data-table td {
        padding: 8px 10px; /* Reduce padding on mobile */
        font-size: 0.9rem; /* Slightly smaller font on mobile */
    }

    /* Consider making table cells display as block for better mobile view if scrolling isn't preferred */
    /*
    .data-table thead {
        display: none; 
    }
    .data-table, .data-table tbody, .data-table tr, .data-table td {
        display: block;
        width: 100%;
    }
    .data-table tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 4px;
    }
    .data-table td {
        text-align: right;
        padding-left: 50%; 
        position: relative;
        border: none;
        border-bottom: 1px solid #eee;
    }
     .data-table td::before {
        content: attr(data-label); 
        position: absolute;
        left: 10px;
        width: calc(50% - 20px); 
        padding-right: 10px;
        font-weight: bold;
        text-align: left;
        white-space: nowrap;
    }
    .data-table td:last-child {
        border-bottom: 0;
    }
    */
}

/* 簡単なフェードインアニメーション */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.feature-item,
.template-card,
.use-case-item {
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0; /* Start hidden for animation */
}

/* 遅延アニメーション（オプション） */
.feature-item:nth-child(1), .template-card:nth-child(1), .use-case-item:nth-child(1) { animation-delay: 0.1s; }
.feature-item:nth-child(2), .template-card:nth-child(2), .use-case-item:nth-child(2) { animation-delay: 0.2s; }
.feature-item:nth-child(3), .template-card:nth-child(3), .use-case-item:nth-child(3) { animation-delay: 0.3s; }
.feature-item:nth-child(4), .template-card:nth-child(4), .use-case-item:nth-child(4) { animation-delay: 0.4s; }
.feature-item:nth-child(5), .template-card:nth-child(5) { animation-delay: 0.5s; }

@media screen and (max-width: 992px) {
    /* サービスの特長も2カラムに (重複を避けるため、こちらにも念のため追加または確認) */
    .features .feature-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* 念のため!importantを追加 */
    }
    .use-case-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media screen and (max-width: 768px) {
    /* サービスの特長も1カラムに (重複を避けるため、こちらにも念のため追加または確認) */
    .features .feature-grid {
        grid-template-columns: 1fr !important; /* 念のため!importantを追加 */
    }
    .use-case-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Service Details Section */
#service-details .container h2 {
    text-align: center;
    margin-bottom: 3rem;
}

#service-details .container h3 {
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #4a69bd;
    padding-left: 10px;
}

#service-details .container > p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

#service-details ul {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 2rem;
}

#service-details ul li {
    margin-bottom: 0.5rem;
}

.table-responsive {
    overflow-x: auto;
    margin-bottom: 1.5rem;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    border: 1px solid #ddd;
    border-radius: 4px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px; /* Prevent table from becoming too narrow */
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    text-align: left;
    vertical-align: top;
    white-space: nowrap; /* Prevent text wrapping initially */
}

.data-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.data-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.data-table tbody tr:hover {
    background-color: #f1f1f1;
}

/* Allow text wrapping in specific columns if needed */
.data-table td:nth-child(3),
.data-table td:nth-child(4) { /* Example: Adjust indices as needed */
    white-space: normal;
}

/* Policy/Terms Page Specific Styles */
.policy-content .container h1,
.policy-content .container h2 {
    text-align: left; /* 見出しを左揃えに */
}

.policy-content .container h1 {
    margin-top: 0; /* h1の上のマージンをリセット */
}

.policy-content .container h2::after {
    content: none; /* h2の下線を削除 */
}

.policy-content .container h2 {
    margin-bottom: 1.5rem;
    padding-bottom: 0;
    font-size: 1.8rem;
}

/* Adjust container padding for policy/terms pages */
.policy-content.section .container {
     padding-top: 20px; /* h1の上の余白を削減 (30px -> 20px) */
     padding-bottom: 30px; /* 40px -> 30px */
}

/* Ensure list items are clearly indented */
.policy-content .container ul,
.policy-content .container ol {
    margin-left: 25px;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.policy-content .container ol li {
    margin-bottom: 0.5rem;
}

/* Adjust paragraph bottom margin */
.policy-content .container p {
     margin-bottom: 1rem;
}

/* Add some space above the first h2 */
.policy-content .container h2:first-of-type {
    margin-top: 2rem;
} 