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

/* ベースフォント */
body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.7;
    color: #333;
    scroll-behavior: smooth;
}

/* ヒーローセクションの背景 */
.hero-section {
    background: linear-gradient(135deg, 
        rgba(34, 197, 94, 0.7) 0%, 
        rgba(16, 185, 129, 0.7) 50%, 
        rgba(5, 150, 105, 0.8) 100%
    ), 
    url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

/* ヒーローセクションのオーバーレイ効果 */
.hero-overlay {
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.3) 0%, 
        rgba(34, 197, 94, 0.2) 50%, 
        rgba(0, 0, 0, 0.4) 100%
    );
}

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

.animate-fade-in {
    animation: fade-in 1s ease-out;
}

/* ナビゲーションのスクロール効果 */
.navbar-scrolled {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

/* カードホバー効果 */
.feature-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ボタンのホバー効果 */
.btn-hover-effect {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-hover-effect::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;
}

.btn-hover-effect:hover::before {
    left: 100%;
}

/* スクロールバーのカスタマイズ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #16a34a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #15803d;
}

/* フォーカススタイル */
input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* セクション間のスペーシング調整 */
section {
    scroll-margin-top: 80px;
}

/* レスポンシブ対応の追加調整 */
@media (max-width: 768px) {
    .hero-section {
        background-attachment: scroll;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .feature-card {
        margin-bottom: 1rem;
    }
    
    .grid {
        gap: 1rem;
    }
}

@media (max-width: 640px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1.125rem;
    }
    
    .px-4 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .py-16 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

/* 価格カードの特別スタイル */
.pricing-popular {
    transform: scale(1.05);
    position: relative;
    z-index: 10;
}

@media (max-width: 768px) {
    .pricing-popular {
        transform: none;
    }
}

/* フォームのバリデーションスタイル */
.form-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.form-success {
    border-color: #22c55e !important;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1) !important;
}

/* ローディングアニメーション */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* パラレックス効果 */
.parallax {
    transform: translateZ(0);
    will-change: transform;
}

/* スムーズなトランジション */
.smooth-transition {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* グラデーションボーダー */
.gradient-border {
    position: relative;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-radius: 0.75rem;
    padding: 2px;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 2px;
    background: white;
    border-radius: 0.625rem;
    z-index: -1;
}

/* 波のアニメーション */
@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    75% { transform: rotate(-5deg); }
}

.wave-animation {
    animation: wave 2s ease-in-out infinite;
    transform-origin: 70% 70%;
}

/* セクションの入場アニメーション */
.section-animate {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* カスタムチェックボックス */
input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    background-color: white;
    position: relative;
    cursor: pointer;
}

input[type="checkbox"]:checked {
    background-color: #22c55e;
    border-color: #22c55e;
}

input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* ツールチップ */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 14px;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* モーダルのスタイル */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal {
    transform: scale(1);
}

/* プログレスバー */
.progress-bar {
    width: 100%;
    height: 4px;
    background-color: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    transition: width 0.3s ease;
    border-radius: 2px;
}

/* カスタムセレクトボックス */
.custom-select {
    position: relative;
    display: inline-block;
    width: 100%;
}

.custom-select select {
    appearance: none;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6,9 12,15 18,9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 3rem;
}

/* アニメーション遅延クラス */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* フローティングアクションボタン */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
}

.fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4);
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    .dark-mode {
        background-color: #1f2937;
        color: #f9fafb;
    }
    
    .dark-mode .bg-white {
        background-color: #374151;
    }
    
    .dark-mode .text-gray-800 {
        color: #f9fafb;
    }
    
    .dark-mode .text-gray-600 {
        color: #d1d5db;
    }
}

/* ギャラリー画像のホバー効果 */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(-5px);
}

.gallery-item img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* ヒーローコンテンツのアニメーション強化 */
.hero-content .animate-fade-in {
    animation: heroFadeIn 1.5s ease-out;
}

@keyframes heroFadeIn {
    0% {
        opacity: 0;
        transform: translateY(60px) scale(0.95);
    }
    50% {
        opacity: 0.7;
        transform: translateY(20px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* バックドロップブラー効果の強化 */
.backdrop-blur-enhanced {
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 画像の遅延読み込みアニメーション */
img {
    transition: opacity 0.5s ease-in-out;
}

img.loading {
    opacity: 0.5;
}

img.loaded {
    opacity: 1;
}

/* レスポンシブ画像調整 */
@media (max-width: 768px) {
    .hero-section {
        background-attachment: scroll;
        background-position: center center;
    }
    
    .gallery-item {
        margin-bottom: 1.5rem;
    }
    
    .hero-content .bg-black\/20 {
        margin: 1rem;
        padding: 1.5rem;
    }
}

@media (max-width: 640px) {
    .hero-content h1 {
        font-size: 2.25rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .gallery-item {
        height: 200px;
    }
}

/* 印刷スタイル */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    .hero-section {
        background: none !important;
        color: black !important;
    }
    
    .gallery-item img {
        max-width: 100%;
        height: auto;
    }
}