/**
 * Dive Buddy's 統合サイト共通スタイル  
 * dive-buddys.com - あなた専属のダイビングバディ
 * 初心者ダイバーの仲間・相談相手・理解者
 */

/* ===== 基本設定 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    /* パフォーマンス最適化 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ===== パフォーマンス最適化 ===== */
/* 画像の遅延読み込み */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* GPU アクセラレーション */
.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

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

/* フォーカス表示の最適化 */
:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* アニメーションの最適化 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== 共通ヘッダー ===== */
.main-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.main-nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.main-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
}

.main-logo h1 {
    font-size: 32px;
    margin-right: 10px;
}

.main-logo span {
    font-size: 14px;
    opacity: 0.9;
}

.main-nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
    position: relative;
}

.main-nav-menu a:hover {
    opacity: 0.8;
}

.main-nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s ease;
}

.main-nav-menu a:hover::after,
.main-nav-menu a.active::after {
    width: 100%;
}

.main-nav-menu a.active {
    font-weight: 700;
    color: #ffd93d;
}

.main-nav-buttons {
    display: flex;
    gap: 15px;
}

.nav-hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.nav-hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* ===== 共通ボタン ===== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b6b, #ffd93d);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.6);
}

.btn-large {
    padding: 18px 36px;
    font-size: 18px;
}

/* LINE Bot連携強化ボタン */
.btn-line-connect {
    background: linear-gradient(135deg, #00c300, #009900) !important;
    position: relative;
    animation: pulse-green 2s infinite;
}

.btn-line-connect:hover {
    background: linear-gradient(135deg, #00b300, #008800) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 195, 0, 0.4);
}

.btn-line-connect::before {
    content: '💬';
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 12px;
    animation: bounce 1s infinite;
}

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(0, 195, 0, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(0, 195, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 195, 0, 0); }
}

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

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

/* ===== 共通レイアウト ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #2c3e50;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 60px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== グリッドレイアウト ===== */
.grid {
    display: grid;
    gap: 30px;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* ===== カード ===== */
.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.card-icon {
    font-size: 48px;
    margin-bottom: 20px;
    text-align: center;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #2c3e50;
    text-align: center;
}

.card-text {
    color: #666;
    line-height: 1.6;
    text-align: center;
}

/* ===== 共通フッター ===== */
.main-footer {
    background: #2c3e50;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    margin-bottom: 20px;
    color: #ffd93d;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 20px;
    text-align: center;
    color: #bdc3c7;
}

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

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

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

.floating {
    animation: float 3s ease-in-out infinite;
}

/* ===== レスポンシブ ===== */
@media (max-width: 768px) {
    .main-nav {
        flex-wrap: wrap;
        position: relative;
    }
    
    .main-nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(102, 126, 234, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 20px;
        gap: 20px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .main-nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .main-nav-buttons {
        order: -1;
        flex: 1;
        justify-content: flex-end;
    }
    
    .nav-hamburger {
        display: flex;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .grid {
        gap: 20px;
    }
    
    .btn-large {
        padding: 15px 30px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .main-nav {
        padding: 0 15px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .card {
        padding: 20px;
    }
}

/* ===== ユーティリティクラス ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-40 { margin-top: 40px; }

.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* LINE Bot連携フィードバックアニメーション */
@keyframes slideInRight {
    from {
        transform: translateX(300px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(300px);
        opacity: 0;
    }
}