/* CSS変数の定義 */
:root {
    --cta-height: 100px;
    --safe-area-inset-top: env(safe-area-inset-top);
    --safe-area-inset-bottom: env(safe-area-inset-bottom);
}

/* ベーススタイル - 通常スクロール */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans JP', sans-serif;
    overflow-x: hidden;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    background-color: #000;
    background-image: url('../images/pc_background.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
}

/* PC背景画像の上に半透明の黒オーバーレイ */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 0;
    pointer-events: none;
}

/* フォントサイズの基準設定 */
html {
    font-size: 62.5%;
    /* 1rem = 10px */
    scroll-behavior: smooth;
}

/* コンテンツラッパー - 常にモバイル幅で中央配置 */
.content-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
    background-color: #fff;
    margin: 0 auto;
}

/* スライドコンテナ - overflow:hiddenを削除し通常フロー化 */
.slide-container {
    position: relative;
    width: 100%;
    /* overflow: hidden を削除 */
    /* 固定高さを削除 */
}

/* スライドラッパー - translateYベースのスライドを削除 */
.slides-wrapper {
    position: relative;
    /* transition と will-change を削除 - 通常フローに変更 */
}



/* 各セクション（旧スライド） - 固定高さを削除 */
.slide {
    position: relative;
    width: 100%;
    /* 固定高さを削除し、コンテンツに合わせる */
}

/* セクション内部のコンテンツ */
.slide-inner {
    position: relative;
    width: 100%;
}

/* 背景画像 - 通常フローで表示 */
.bg-image {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    z-index: 1;
}

/* 背景動画用のスタイル */
.bg-video {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    pointer-events: none;
}

/* スライドコンテンツ */
.content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 10;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
}

.section-number {
    font-size: clamp(8rem, 15vw, 12rem);
    font-weight: 900;
    opacity: 0.3;
    line-height: 0.8;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.content h1 {
    font-size: clamp(2.4rem, 6vw, 4rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    line-height: 1.3;
}

.content p {
    font-size: clamp(1.4rem, 3.5vw, 2rem);
    line-height: 1.6;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
    opacity: 0.95;
}

/* 画像読み込みエラー時のプレースホルダー */
.slide-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
    z-index: -1;
}

/* 固定CTAボタン - 常に画面下部に固定 */
.cta-container {
    position: fixed;
    bottom: 0;
    bottom: env(safe-area-inset-bottom);
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    height: var(--cta-height);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.cta-button {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.cta-button:active {
    transform: translateY(0);
}

/* ページインジケーター - 通常スクロールでは不要なので非表示 */
.page-dots {
    display: none;
}

.dot {
    display: block;
    width: 1rem;
    height: 1rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    margin: 1rem 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: white;
    transform: scale(1.3);
}

/* レスポンシブ対応 - モバイル幅では背景を白に */
@media (max-width: 600px) {
    body {
        background-color: #fff;
    }

    .content-wrapper {
        max-width: 100%;
    }
}

/* コンテンツ末尾にCTAボタン分の余白 */
.slides-wrapper::after {
    content: '';
    display: block;
    height: var(--cta-height);
}

/* sec10のLINEボタン */
.sec10-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.line-btn {
    position: absolute;
    top: 65%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 500px;
    height: auto;
    z-index: 10;
    cursor: pointer;
    transition: all 0.3s ease;
}

.line-btn:hover {
    transform: translate(-50%, -50%) scale(1.05);
    filter: brightness(1.1);
}

.line-btn:active {
    transform: translate(-50%, -50%) scale(0.98);
}

/* sec10のWebボタン */
.web-btn {
    position: absolute;
    top: 80%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 500px;
    height: auto;
    z-index: 10;
    cursor: pointer;
    transition: all 0.3s ease;
}

.web-btn:hover {
    transform: translate(-50%, -50%) scale(1.05);
    filter: brightness(1.1);
}

.web-btn:active {
    transform: translate(-50%, -50%) scale(0.98);
}

/* ============================
   フォームページ用スタイル
   ============================ */

/* フォームコンテナ */
.form-container {
    position: relative;
    z-index: 1;
    width: 100%;
    flex-shrink: 0;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    min-height: 100vh;
    box-sizing: border-box;
}

.form-container * {
    box-sizing: border-box;
}

.form-container h1 {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.form-container .form-group {
    margin-bottom: 20px;
}

.form-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 16px;
}

.form-container label span.required {
    color: #e74c3c;
    font-size: 14px;
    margin-left: 5px;
}

.form-container input[type="text"],
.form-container input[type="email"],
.form-container input[type="tel"],
.form-container input[type="date"],
.form-container select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
    -webkit-appearance: none;
    appearance: none;
    background-color: #fff;
    line-height: normal;
    height: auto;
}

/* date input のスタイル統一 */
.form-container input[type="date"] {
    background-color: #fff;
    color: #333;
    height: 45px !important;
    min-height: 45px !important;
    line-height: 45px;
}

.form-container input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
}

.form-container textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
    -webkit-appearance: none;
    appearance: none;
    background-color: #fff;
    line-height: 1.5;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.form-container textarea:focus {
    outline: none;
    border-color: #4CAF50;
}

.form-container input[type="text"]:focus,
.form-container input[type="email"]:focus,
.form-container input[type="tel"]:focus,
.form-container input[type="date"]:focus,
.form-container select:focus {
    outline: none;
    border-color: #4CAF50;
}

.form-container select {
    background-color: #fff;
    cursor: pointer;
}

.form-container .button-group {
    margin-top: 30px;
    text-align: center;
}

.form-container .submit-button {
    background-color: #4CAF50;
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    max-width: 300px;
}

.form-container .submit-button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
}

.form-container .submit-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

.form-container .back-link {
    display: inline-block;
    margin-top: 20px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.form-container .back-link:hover {
    text-decoration: underline;
}

.form-container .error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.form-container .success-message {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: none;
}

.form-container .loading {
    display: none;
    text-align: center;
    margin: 20px 0;
}

.form-container .loading:after {
    content: "送信中...";
    display: inline-block;
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: "送信中"; }
    40% { content: "送信中."; }
    60% { content: "送信中.."; }
    80%, 100% { content: "送信中..."; }
}

/* 日付入力欄のプレースホルダー - モバイルのみ */
@media (max-width: 767px) {
    .form-container input[type="date"]:not(:valid) {
        position: relative;
    }

    .form-container input[type="date"]:not(:valid)::before {
        content: '日付を選択';
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: #888;
        pointer-events: none;
        font-family: inherit;
        font-size: 16px;
    }

    .form-container input[type="date"]:valid::before {
        display: none;
    }
}

/* フォームページのモバイル対応 */
@media (max-width: 600px) {
    .form-container {
        padding: 15px;
    }

    .form-container h1 {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .form-container input[type="text"],
    .form-container input[type="email"],
    .form-container input[type="tel"],
    .form-container input[type="date"],
    .form-container select {
        font-size: 16px;
        /* iOS Safari のズーム防止 */
    }
}
