/* モバイルファーストレスポンシブデザイン */

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

/* コンテナのレスポンシブ設定 */
.container {
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
    margin-left: auto;
    margin-right: auto;
}

/* モバイルファースト：320px以上 */
@media (min-width: 320px) {
    .container {
        max-width: 100%;
    }
}

/* タブレット：640px以上 */
@media (min-width: 640px) {
    .container {
        max-width: 640px;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* デスクトップ：1024px以上 */
@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* 大型デスクトップ：1280px以上 */
@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

/* フォントサイズのレスポンシブ設定 */
.text-responsive {
    font-size: clamp(1rem, 4vw, 1.25rem);
}

.text-responsive-lg {
    font-size: clamp(1.25rem, 6vw, 2rem);
}

.text-responsive-xl {
    font-size: clamp(1.5rem, 8vw, 3rem);
}

/* スムーズスクロール */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* カスタムプロパティ */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --text-dark: #2d3748;
    --text-light: #718096;
    --bg-light: #f7fafc;
}

/* ロゴ画像のスタイリング */
.logo {
    height: 2rem; /* 32px */
    width: auto;
    max-width: 120px;
    object-fit: contain;
    vertical-align: middle;
}

/* モバイル対応 */
@media (max-width: 640px) {
    .logo {
        height: 1.5rem; /* 24px */
        max-width: 100px;
    }
}

/* 画像遅延読み込み */
img[data-src] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.loaded {
    opacity: 1;
}

/* ヒーローセクション：モバイル（小画像） */
.hero-bg {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.85) 0%, rgba(118, 75, 162, 0.85) 100%),
                url('../images/hero-bg-mobile.webp') center/cover;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* タブレット以上：大画像に切り替え */
@media (min-width: 768px) {
    .hero-bg {
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.85) 0%, rgba(118, 75, 162, 0.85) 100%),
                    url('../images/hero-bg.webp') center/cover;
    }
}

/* テキスト可読性のためのオーバーレイ */
.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.25);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 10;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* フェードインアニメーション */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* フィーチャーカードのホバーエフェクト */
.feature-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

/* ボタンのホバーエフェクト */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

/* セクション間の装飾 */
.section-divider {
    position: relative;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
    margin: 4rem 0;
}

/* プログレスバー */
.progress-bar {
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.3s ease;
}

/* フォームのフォーカスエフェクト */
.form-input {
    transition: all 0.3s ease;
    border: 2px solid #e2e8f0;
}

.form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* カードのグリッドレイアウト */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

/* アニメーション遅延 */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .hero-bg h1 {
        font-size: 2rem;
    }
    
    .feature-card {
        margin-bottom: 1rem;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 640px) {
    .hero-bg {
        padding: 2rem 0;
    }
    
    .hero-bg h1 {
        font-size: 1.75rem;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* アクセシビリティ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ハイコントラストモード対応 */
@media (prefers-contrast: high) {
    .feature-card {
        border: 2px solid #000;
    }
    
    .btn-primary {
        border: 2px solid #000;
    }
}

/* リデュースモーション対応 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .fade-in {
        transition: none;
    }
}

/* ライトボックス */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    animation: lightboxIn 0.22s ease;
    text-align: center;
}

@keyframes lightboxIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

.lightbox-img {
    max-width: 100%;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: block;
}

.lightbox-caption {
    color: rgba(255, 255, 255, 0.85);
    margin-top: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.lightbox-close {
    position: fixed;
    top: 1rem;
    right: 1rem;
    color: white;
    background: rgba(255, 255, 255, 0.18);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    z-index: 10001;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.32);
    transform: scale(1.1);
}

/* 画像ホバー：拡大アイコンオーバーレイ */
.lightbox-hint {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s;
    pointer-events: none;
}

.lightbox-hint i {
    color: white;
    font-size: 2.25rem;
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.25s, transform 0.25s;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}

.group:hover .lightbox-hint {
    background: rgba(0, 0, 0, 0.38);
}

.group:hover .lightbox-hint i {
    opacity: 1;
    transform: scale(1);
}

/* ハニーポットフィールド（ボット対策） */
.honeypot-field {
    display: none;
}

/* フローティングボタン */
.floating-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 9999;
    transition: all 0.3s ease;
    white-space: nowrap;
    animation: floatPulse 2s ease-in-out infinite;
}

.floating-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    animation: none;
}

.floating-button:active {
    transform: translateY(-2px) scale(1.02);
}

@keyframes floatPulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.04); }
}

@media (max-width: 768px) {
    .floating-button {
        bottom: 20px;
        right: 20px;
        padding: 14px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .floating-button {
        bottom: 15px;
        right: 15px;
        padding: 12px 18px;
        font-size: 13px;
    }
}