/*
Theme Name: 備瀬のあそびば - Swipe Landing Page
Description: WordPress theme for 備瀬のあそびば swipe landing page with admin customization
Version: 2.0
Author: Custom Theme
*/

/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基本設定 */
html, body {
    height: 100%;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333333;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* スワイプコンテナ */
.swipe-container {
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* スライド */
.slide {
    height: 100vh;
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
    position: relative;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* スライド画像・動画 */
.slide-image {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.slide-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

/* 動画表示（画像と同じスタイル） */
.slide-video {
    position: relative;
}

.slide-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* スライドコンテンツ */
.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 60px 20px 40px;
    text-align: center;
    z-index: 2;
}

/* カスタマイザーで位置調整可能 */
.slide-content.position-top {
    top: 0;
    bottom: auto;
    background: linear-gradient(rgba(0, 0, 0, 0.8), transparent);
}

.slide-content.position-center {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
}

.slide-content.position-left {
    text-align: left;
    padding-left: 40px;
}

.slide-content.position-right {
    text-align: right;
    padding-right: 40px;
}

.slide-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.slide-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* CTAボタン */
.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
    color: white;
    text-decoration: none;
}

/* 固定CTAボタン */
.fixed-cta-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    border: none;
    cursor: pointer;
}

.fixed-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
    color: white;
    text-decoration: none;
}

/* CTAボタンの位置カスタマイズ */
.cta-button.position-top {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.cta-button.position-bottom {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.cta-button.position-left {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
}

.cta-button.position-right {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

.cta-button.position-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 固定CTAボタンの位置カスタマイズ */
.fixed-cta-button.position-top-left {
    top: 20px;
    left: 20px;
    right: auto;
    bottom: auto;
}

.fixed-cta-button.position-top-right {
    top: 20px;
    right: 20px;
    left: auto;
    bottom: auto;
}

.fixed-cta-button.position-bottom-left {
    bottom: 20px;
    left: 20px;
    right: auto;
    top: auto;
}

.fixed-cta-button.position-bottom-right {
    bottom: 20px;
    right: 20px;
    left: auto;
    top: auto;
}

.fixed-cta-button.position-center-left {
    top: 50%;
    left: 20px;
    right: auto;
    bottom: auto;
    transform: translateY(-50%);
}

.fixed-cta-button.position-center-right {
    top: 50%;
    right: 20px;
    left: auto;
    bottom: auto;
    transform: translateY(-50%);
}

/* インジケーター */
.slide-indicators {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.indicator.active {
    background: #ff6b6b;
    transform: scale(1.2);
}

/* アニメーション */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* CTAボタンのアニメーション */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

@keyframes glow {
    0% {
        box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(255, 107, 107, 0.8), 0 0 20px rgba(255, 107, 107, 0.6);
    }
    100% {
        box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    }
}

/* CTAボタンのアニメーションクラス */
.cta-button.animate-pulse {
    animation: pulse 2s infinite;
}

.cta-button.animate-bounce {
    animation: bounce 2s infinite;
}

.cta-button.animate-shake {
    animation: shake 0.5s ease-in-out;
}

.cta-button.animate-glow {
    animation: glow 2s infinite;
}

.fixed-cta-button.animate-pulse {
    animation: pulse 2s infinite;
}

.fixed-cta-button.animate-bounce {
    animation: bounce 2s infinite;
}

.fixed-cta-button.animate-shake {
    animation: shake 0.5s ease-in-out;
}

.fixed-cta-button.animate-glow {
    animation: glow 2s infinite;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .slide-content {
        padding: 40px 15px 30px;
    }
    
    .slide-content.position-left {
        padding-left: 20px;
    }
    
    .slide-content.position-right {
        padding-right: 20px;
    }
    
    .slide-content h2 {
        font-size: 1.8rem;
    }
    
    .slide-content p {
        font-size: 1rem;
    }
    
    .cta-button {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    .fixed-cta-button {
        bottom: 15px;
        right: 15px;
        padding: 10px 20px;
        font-size: 0.8rem;
    }
    
    .slide-indicators {
        right: 15px;
    }
    
    .indicator {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .slide-content h2 {
        font-size: 1.5rem;
    }
    
    .slide-content p {
        font-size: 0.9rem;
    }
    
    .cta-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* WordPress固有のスタイル調整 */
.wp-admin-bar ~ .swipe-container {
    height: calc(100vh - 32px);
}

@media (max-width: 782px) {
    .wp-admin-bar ~ .swipe-container {
        height: calc(100vh - 46px);
    }
}

/* ページタイトルとコンテンツを非表示 */
.page-title,
.page-content {
    display: none;
}

/* スワイプローディングページ専用 */
.swipe-landing-page {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* 管理画面用のスタイル */
.swipe-admin-preview {
    border: 2px dashed #0073aa;
    padding: 20px;
    margin: 20px 0;
    background: #f9f9f9;
}

.swipe-admin-preview h3 {
    color: #0073aa;
    margin-bottom: 10px;
}

.swipe-admin-preview img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
}