/* 愛媛県建設労働組合 組合員募集ページ カスタムCSS */

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

/* ロゴ画像の背景透過対応 */
.logo-transparent {
    background: transparent !important;
    /* PNG透過画像の場合、mix-blend-modeは使用しない */
    /* mix-blend-mode: multiply; */
}

/* ロゴのホバー効果 */
.logo-hover:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* ロゴ画像の最適化 */
.logo-image {
    background: transparent;
    /* PNG画像の透過部分を維持 */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    /* 鮮明な表示 */
}

/* ヘッダー用ロゴスタイル */
.header-logo {
    background: transparent;
    /* ヘッダーの背景色（青）に透過部分が馴染む */
}

/* フッター用ロゴスタイル */
.footer-logo {
    background: transparent;
    /* フッターの背景色（グレー）に透過部分が馴染む */
}

/* ロゴ表示のフォールバック対応 */
.logo-fallback {
    /* PNG画像で問題がある場合のJPG画像用スタイル */
    background: white;
    border-radius: 4px;
    padding: 2px;
}

/* PNG透過画像が正しく表示されない場合の対応 */
@supports not (background: transparent) {
    .logo-image {
        background: white;
        border-radius: 4px;
        padding: 2px;
    }
}

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

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

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

.pulse-hover:hover {
    animation: pulse 0.3s ease-in-out;
}

/* ヒーローセクションのグラデーション効果 */
.hero-gradient {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #3730a3 100%);
    position: relative;
    overflow: hidden;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><pattern id="grid" width="60" height="60" patternUnits="userSpaceOnUse"><path d="M 60 0 L 0 0 0 60" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

/* カードホバー効果 */
.card-hover {
    transition: all 0.3s ease;
}

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

/* ボタンのカスタムスタイル */
.btn-primary {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::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.6s;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(251, 191, 36, 0.3);
}

/* セクション区切り線 */
.section-divider {
    position: relative;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 2px;
}

/* 組合員の声カード */
.testimonial-card {
    position: relative;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-left: 4px solid #3b82f6;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 60px;
    font-weight: bold;
    color: #3b82f6;
    opacity: 0.3;
    line-height: 1;
}

/* 手順番号のスタイル */
.step-number {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 4px 8px rgba(251, 191, 36, 0.3);
    position: relative;
}

.step-number::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 30px;
    background: #fbbf24;
    display: none;
}

@media (min-width: 768px) {
    .step-number:not(:last-child)::after {
        display: block;
    }
}

/* フォームのカスタムスタイル */
.form-input {
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
}

.form-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: scale(1.02);
}

.form-input:invalid {
    border-color: #ef4444;
}

.form-input:valid {
    border-color: #10b981;
}

/* ローディングアニメーション */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* スクロールアニメーション用 */
.scroll-animate {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

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

/* モバイル対応の改善 */
@media (max-width: 640px) {
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .section-padding {
        padding: 3rem 0;
    }
    
    .card-hover {
        margin-bottom: 1rem;
    }
}

/* アクセシビリティ対応 */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

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

/* フォーカス表示の改善 */
.focus-visible:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

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

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

::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1d4ed8;
}

/* プリント用スタイル */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    .bg-blue-900,
    .bg-gradient-to-r {
        background: #fff !important;
        color: #000 !important;
    }
}

/* ページトップへ戻るボタンのスタイル */
#back-to-top {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(0.9);
    backdrop-filter: blur(10px);
}

#back-to-top:hover {
    transform: scale(1);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.6);
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
}

#back-to-top:active {
    transform: scale(0.95);
}

/* ボタンの表示・非表示アニメーション */
#back-to-top.opacity-0 {
    transform: scale(0.8) translateY(20px);
    visibility: hidden;
}

#back-to-top.opacity-100 {
    transform: scale(0.9) translateY(0);
    visibility: visible;
}

/* アイコンのアニメーション */
#back-to-top i {
    transition: transform 0.2s ease;
}

#back-to-top:hover i {
    transform: translateY(-2px);
}

/* モバイル対応 */
@media (max-width: 640px) {
    #back-to-top {
        bottom: 1rem;
        right: 1rem;
        padding: 0.75rem;
    }
    
    #back-to-top i {
        font-size: 1rem;
    }
}

/* ロゴフォールバック用のスタイル */
.logo-text-fallback {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    font-size: 0.75rem;
    font-weight: 900;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    border: 2px solid rgba(255,255,255,0.2);
}

.logo-container {
    position: relative;
}

/* ロゴ読み込みエラー時のスムーズな切り替え */
.logo-image {
    transition: opacity 0.3s ease;
}

.logo-text-fallback {
    animation: logoFadeIn 0.5s ease-out;
}

@keyframes logoFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}