/* リセットCSS */
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var,
b, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figcaption, figure,
footer, header, hgroup, menu, nav, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  font-size: 100%;
  vertical-align: baseline;
  background: transparent;
}

/* 拡大・縮小で線が入らないための基本設定 */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  line-height: 0; /* すべての行の高さをゼロに */
  font-size: 0; /* すべてのフォントサイズをゼロに */
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; /* 横スクロールを防止 */
}

/* 画像間の線を防ぐためのグローバルな設定 - 超強化版 */
img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  vertical-align: top; /* 画像下部の隙間を防ぐ */
  image-rendering: -webkit-optimize-contrast; /* 高解像度ディスプレイ対応 */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  /* ズーム時の問題対策 */
  transform: translateZ(0) scale(1.0, 1.0);
  -webkit-transform: translateZ(0) scale(1.0, 1.0);
  /* Safariのレンダリング問題対策 */
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}

/* 親要素の設定強化 - ズームに強い設定 */
div, section, article, figure, picture, main {
  display: block;
  margin: 0;
  padding: 0;
  font-size: 0;
  line-height: 0;
  /* 拡大・縮小に強い設定 */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: transform; /* ブラウザに変形があることを通知 */
}

/* コンテナ同士の隙間を埋める */
div + div, section + section, figure + figure {
  margin-top: -1px; /* 隙間を埋める */
}

/* テキスト要素の設定 */
p, h1, h2, h3, h4, h5, h6, span, a, li {
  font-size: 16px; /* PCでの基本フォントサイズ */
  line-height: 1.5;
}

.lp-container .wp-block-image {
  margin: 0 auto !important;
  font-size: 0;
  line-height: 0;
  /* 拡大・縮小対策 */
  will-change: transform;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.lp-container {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  padding: 0;
  color: #3c4449;
  background-color: transparent;
  /* 画像間の隙間を埋めるための追加 */
  font-size: 0;
  line-height: 0;
  /* オーバーフローを隠す */
  overflow: hidden;
  /* 拡大・縮小対策 */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: transform;
  /* Safariの問題対策 */
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  /* ボーダーを明示的に無効化 */
  border: none;
}

/* すべての画像に対する超強化設定 */
.lp-container img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
  margin: 0;
  padding: 0;
  border: 0;
  /* 拡大・縮小対策 */
  transform: translateZ(0) scale(1.0, 1.0);
  -webkit-transform: translateZ(0) scale(1.0, 1.0);
  will-change: transform;
  /* 高解像度ディスプレイ対応 */
  image-rendering: -webkit-optimize-contrast;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  /* Safariの問題対策 */
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}

/* 連続する画像の隙間対策を強化 */
.lp-container img + img {
  margin-top: -1px; /* 隙間を埋める */
}

.lp-fixed-button {
  display: block;
  position: fixed;
  bottom: 0;
  left: 50%;
  width: 100%;
  max-width: 640px;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  transform: translateX(-50%);
  z-index: 3;
}

.lp-fixed-button.active {
  opacity: 1;
  visibility: visible;
  background: rgba(0, 0, 0, 0);
}

.lp-footer {
  margin-top: 10%;
  background: #FFFFFF;
  max-width: 640px;
  margin-right: auto;
  margin-left: auto;
  /* テキスト要素を含むため、フォントサイズを戻す */
  font-size: 16px;
  line-height: 1.5;
}

.lp-footer-container {
  padding: 50px 20px;
  text-align: center;
}

.lp-footer-line {
  width: 100%;
  height: 1px;
  background-color: #005AA0;
  margin-bottom: 20px;
}

.lp-footer-logo {
  margin-left: auto;
  margin-right: auto;
}

.lp-footer-logo img {
  display: inline-block;
}

.lp-footer-address {
  margin-bottom: 30px;
  font-size: 12px;
  line-height: 1.75;
  text-align: center;
}

.lp-footer-nav {
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 0;
  font-size: 12px;
  list-style-type: none;
}

.lp-footer-nav li {
  padding-right: 15px;
  padding-left: 15px;
}

.lp-footer-nav li + li {
  border-left: 1px solid #000000;
}

.lp-footer-nav a {
  color: #000000;
  text-decoration: none;
}

.lp-footer-nav a:hover {
  text-decoration: underline;
}

.lp-copyright {
  height: 60px;
  color: #000000;
  font-size: 12px;
  line-height: 60px;
  text-align: center;
  background: #FFFFFF;
}

/* レイヤーコンテナの拡大・縮小対策強化 */
.layer-container {
  padding-top: 163%;
  font-size: 0;
  line-height: 0;
  overflow: hidden;
  /* 拡大・縮小対策 */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: transform;
  /* Safariの問題対策 */
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  /* クリッピング設定 */
  position: relative;
  z-index: 1;
}

/* レイヤー要素の拡大・縮小対策強化 */
.layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  /* 拡大・縮小対策 */
  transform: translateZ(0) scale(1.0, 1.0);
  -webkit-transform: translateZ(0) scale(1.0, 1.0);
  will-change: transform;
  /* 高解像度ディスプレイ対応 */
  image-rendering: -webkit-optimize-contrast;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  /* Safariの問題対策 */
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}

.bottom-image {
  z-index: 1;
}

.video-layer {
  z-index: 2;
  object-fit: contain;
  top: 4%;
}

.poster-image {
  z-index: 2;
  top: 4%;
}

.top-image {
  z-index: 3;
}

/* ピクセルスナップ問題に対応するための追加設定 */
@supports (-webkit-touch-callout: none) {
  /* iOS Safari特有の設定 */
  img {
    -webkit-transform: translateZ(0) scale(1.0000001); /* わずかなスケール変更でレンダリング問題回避 */
  }
  
  .layer {
    -webkit-transform: translateZ(0) scale(1.0000001);
  }
}

/* モバイル向け拡張スタイル - ズーム対応強化 */
@media screen and (max-width: 932px) {
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  img {
    /* 拡大・縮小対策をさらに強化 */
    -webkit-transform: translateZ(0) scale(1.0000001); /* わずかなスケール変更でレンダリング問題回避 */
    transform: translateZ(0) scale(1.0000001);
  }
  
  /* 連続画像の隙間対策をさらに強化 */
  img + img {
    margin-top: -1px;
  }
  
  /* 画像を包含する要素すべてに対して設定を強化 */
  div, section, article, figure, picture, main {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
  }
  
  /* テキストを含む要素は適切なフォントサイズに戻す */
  p, h1, h2, h3, h4, h5, h6, span, a, li {
    font-size: 12px;
    line-height: 1.5;
  }
  
  /* コンテナのレンダリング強化 */
  .lp-container {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
  }
  
  /* 画像にオーバーレイを追加して隙間問題を解決 */
  .lp-container:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
  }
}

/* 画像のポインターイベントを有効化 */
.lp-container img, .layer {
  pointer-events: auto;
}

/* HTMLの構造に応じて必要な場合はさらに追加 */
.lp-container > * {
  line-height: 0;
  font-size: 0;
}

/* ================================================
   Contact Form 7 カスタムスタイル
   ================================================ */

/* フォームエリア全体 */
#cf7-area {
    max-width: 800px;
    margin: 60px auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
}

/* フォーム見出し */
.form-heading {
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 40px;
    color: #333;
    position: relative;
    padding-bottom: 15px;
}

.form-heading:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* フォーム項目 */
.cf7-item {
    margin-bottom: 30px;
}

/* 質問ラベル */
.cf7-q {
    margin-bottom: 10px;
}

.cf7-q label {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    display: inline-block;
}

/* 必須マーク */
.cf7-req {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: #e74c3c;
    color: #ffffff;
    font-size: 11px;
    font-weight: normal;
    border-radius: 3px;
    vertical-align: middle;
}

/* 入力フィールドエリア */
.cf7-a {
    width: 100%;
}

/* 入力フィールド共通スタイル */
.form-control {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

/* フォーカス時 */
.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* プレースホルダー */
.form-control::placeholder {
    color: #999;
    font-size: 14px;
}

/* テキストエリア */
textarea.form-control {
    min-height: 150px;
    resize: vertical;
    font-family: inherit;
}

/* 送信ボタンコンテナ */
.cf7-submit {
    text-align: center;
    margin-top: 40px;
}

/* 送信ボタン */
.cf7-submit input[type="submit"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    padding: 15px 60px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.cf7-submit input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
}

/* エラーメッセージ */
.wpcf7-not-valid-tip {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 5px;
    display: block;
}

/* 送信結果メッセージ */
.wpcf7-response-output {
    margin: 30px 0 0;
    padding: 15px 20px;
    border-radius: 5px;
    text-align: center;
    font-weight: 500;
}

.wpcf7-mail-sent-ok {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.wpcf7-mail-sent-ng,
.wpcf7-validation-errors {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* スピナー（送信中） */
.wpcf7-spinner {
    margin-left: 15px;
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
    #cf7-area {
        margin: 40px 20px;
        padding: 30px 20px;
    }
    
    .form-heading {
        font-size: 24px;
        margin-bottom: 30px;
    }
    
    .cf7-item {
        margin-bottom: 25px;
    }
    
    .cf7-q label {
        font-size: 14px;
    }
    
    .form-control {
        font-size: 16px; /* iOSズーム防止 */
        padding: 10px 12px;
    }
    
    .cf7-submit input[type="submit"] {
        width: 100%;
        padding: 15px 40px;
        font-size: 16px;
    }
}

/* スマートフォン（480px以下） */
@media screen and (max-width: 480px) {
    #cf7-area {
        margin: 30px 15px;
        padding: 25px 15px;
    }
    
    .form-heading {
        font-size: 20px;
    }
    
    .cf7-req {
        font-size: 10px;
        padding: 2px 6px;
    }
}